#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ CloseAllFiles();
int /*<<< orphan*/ GenerateInitialFileLines();
int /*<<< orphan*/ OpenAllFiles();
int /*<<< orphan*/ ParseDefinitionsAndWriteOutput();
int /*<<< orphan*/ WriteFileTrailers();
int /*<<< orphan*/ print_args(int, char **);
int /*<<< orphan*/ print_version(char *);
int /*<<< orphan*/ process_args(int, char **);
int main(int argc, char **argv) {
  print_version(argv[0]);
  process_args(argc, argv);
  print_args(argc, argv);
  OpenAllFiles();
  GenerateInitialFileLines();
  ParseDefinitionsAndWriteOutput();
  WriteFileTrailers();
  CloseAllFiles();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1040 <print_version@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1090 <process_args@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1080 <print_args@plt>
mov    $0x0,%al
call   1060 <OpenAllFiles@plt>
mov    $0x0,%al
call   10a0 <GenerateInitialFileLines@plt>
mov    $0x0,%al
call   1070 <ParseDefinitionsAndWriteOutput@plt>
mov    $0x0,%al
call   1030 <WriteFileTrailers@plt>
mov    $0x0,%al
call   1050 <CloseAllFiles@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    (%rsi),%rdi
call   1040 <print_version@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1090 <process_args@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1080 <print_args@plt>
xor    %eax,%eax
call   1060 <OpenAllFiles@plt>
xor    %eax,%eax
call   10a0 <GenerateInitialFileLines@plt>
xor    %eax,%eax
call   1070 <ParseDefinitionsAndWriteOutput@plt>
xor    %eax,%eax
call   1030 <WriteFileTrailers@plt>
xor    %eax,%eax
call   1050 <CloseAllFiles@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 0
%8 = load i8*, i8** %7
%9 = call i32 @print_version(i8* %8)
%10 = load i32, i32* %4
%11 = load i8**, i8*** %5
%12 = call i32 @process_args(i32 %10, i8** %11)
%13 = load i32, i32* %4
%14 = load i8**, i8*** %5
%15 = call i32 @print_args(i32 %13, i8** %14)
%16 = call i32 (...) @OpenAllFiles()
%17 = call i32 (...) @GenerateInitialFileLines()
%18 = call i32 (...) @ParseDefinitionsAndWriteOutput()
%19 = call i32 (...) @WriteFileTrailers()
%20 = call i32 (...) @CloseAllFiles()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = load i8*, i8** %1
%4 = tail call i32 @print_version(i8* %3)
%5 = tail call i32 @process_args(i32 %0, i8** %1)
%6 = tail call i32 @print_args(i32 %0, i8** %1)
%7 = tail call i32 (...) @OpenAllFiles()
%8 = tail call i32 (...) @GenerateInitialFileLines()
%9 = tail call i32 (...) @ParseDefinitionsAndWriteOutput()
%10 = tail call i32 (...) @WriteFileTrailers()
%11 = tail call i32 (...) @CloseAllFiles()
ret i32 0
}