Moved stub function generation to import.c. Added a get_stub_name function to ensure naming consistency.