#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ CloseFiles(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ OpenFiles(int /*<<< orphan*/ **, char *,
                             int /*<<< orphan*/ **, char *);
int /*<<< orphan*/ StartupValidate(int, char **);
int /*<<< orphan*/ WriteCharArrayExpression(int /*<<< orphan*/ *,
                                            int /*<<< orphan*/ *, char *,
                                            char *);
int /*<<< orphan*/ WriteHeaderComment(int /*<<< orphan*/ *);
int /*<<< orphan*/ WritePreProcessorUndefineExpression(int /*<<< orphan*/ *);
int /*<<< orphan*/ WritePreProcessors(int /*<<< orphan*/ *);
int /*<<< orphan*/ puts(char *);
int main(int argc, char **argv) {
  FILE *in, *out;
  puts("Debug: StartupValidate");
  StartupValidate(argc, argv);
  puts("Debug: OpenFiles");
  OpenFiles(&in, argv[1], &out, argv[2]);
  puts("Debug: WriteHeaderComment");
  WriteHeaderComment(out);
  puts("Debug: WritePreProcessors");
  WritePreProcessors(out);
  puts("Debug: WriteCharArrayExpression");
  WriteCharArrayExpression(out, in, argv[3], argv[4]);
  puts("Debug: WritePreProcessorUndefineExpression");
  WritePreProcessorUndefineExpression(out);
  CloseFiles(in, out);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xe63(%rip),%rdi
call   1030 <puts@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1050 <StartupValidate@plt>
lea    0xe62(%rip),%rdi
call   1030 <puts@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rcx
lea    -0x18(%rbp),%rdi
lea    -0x20(%rbp),%rdx
call   1040 <OpenFiles@plt>
lea    0xe4a(%rip),%rdi
call   1030 <puts@plt>
mov    -0x20(%rbp),%rdi
call   1060 <WriteHeaderComment@plt>
lea    0xe4f(%rip),%rdi
call   1030 <puts@plt>
mov    -0x20(%rbp),%rdi
call   10a0 <WritePreProcessors@plt>
lea    0xe54(%rip),%rdi
call   1030 <puts@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdx
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rcx
call   1070 <WriteCharArrayExpression@plt>
lea    0xe4b(%rip),%rdi
call   1030 <puts@plt>
mov    -0x20(%rbp),%rdi
call   1090 <WritePreProcessorUndefineExpression@plt>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1080 <CloseFiles@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xe6e(%rip),%rdi
call   1030 <puts@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1050 <StartupValidate@plt>
lea    0xe6f(%rip),%rdi
call   1030 <puts@plt>
mov    0x8(%rbx),%rsi
mov    0x10(%rbx),%rcx
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rdx
call   1040 <OpenFiles@plt>
lea    0xe5d(%rip),%rdi
call   1030 <puts@plt>
mov    0x8(%rsp),%rdi
call   1060 <WriteHeaderComment@plt>
lea    0xe61(%rip),%rdi
call   1030 <puts@plt>
mov    0x8(%rsp),%rdi
call   10a0 <WritePreProcessors@plt>
lea    0xe65(%rip),%rdi
call   1030 <puts@plt>
mov    0x8(%rsp),%rdi
mov    0x10(%rsp),%rsi
mov    0x18(%rbx),%rdx
mov    0x20(%rbx),%rcx
call   1070 <WriteCharArrayExpression@plt>
lea    0xe62(%rip),%rdi
call   1030 <puts@plt>
mov    0x8(%rsp),%rdi
call   1090 <WritePreProcessorUndefineExpression@plt>
mov    0x10(%rsp),%rdi
mov    0x8(%rsp),%rsi
call   1080 <CloseFiles@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [23 x i8] c"Debug: StartupValidate\00"
@.str.1 = [17 x i8] c"Debug: OpenFiles\00"
@.str.2 = [26 x i8] c"Debug: WriteHeaderComment\00"
@.str.3 = [26 x i8] c"Debug: WritePreProcessors\00"
@.str.4 = [32 x i8] c"Debug: WriteCharArrayExpression\00"
@.str.5 = [43 x i8] c"Debug: WritePreProcessorUndefineExpression\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i32 @puts(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* %4
%10 = load i8**, i8*** %5
%11 = call i32 @StartupValidate(i32 %9, i8** %10)
%12 = call i32 @puts(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = load i8**, i8*** %5
%17 = getelementptr inbounds i8*, i8** %16, i64 2
%18 = load i8*, i8** %17
%19 = call i32 @OpenFiles(i32** %6, i8* %15, i32** %7, i8* %18)
%20 = call i32 @puts(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
%21 = load i32*, i32** %7
%22 = call i32 @WriteHeaderComment(i32* %21)
%23 = call i32 @puts(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
%24 = load i32*, i32** %7
%25 = call i32 @WritePreProcessors(i32* %24)
%26 = call i32 @puts(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0))
%27 = load i32*, i32** %7
%28 = load i32*, i32** %6
%29 = load i8**, i8*** %5
%30 = getelementptr inbounds i8*, i8** %29, i64 3
%31 = load i8*, i8** %30
%32 = load i8**, i8*** %5
%33 = getelementptr inbounds i8*, i8** %32, i64 4
%34 = load i8*, i8** %33
%35 = call i32 @WriteCharArrayExpression(i32* %27, i32* %28, i8* %31, i8* %34)
%36 = call i32 @puts(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.5, i64 0, i64 0))
%37 = load i32*, i32** %7
%38 = call i32 @WritePreProcessorUndefineExpression(i32* %37)
%39 = load i32*, i32** %6
%40 = load i32*, i32** %7
%41 = call i32 @CloseFiles(i32* %39, i32* %40)
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"Debug: StartupValidate\00"
@.str.1 = [17 x i8] c"Debug: OpenFiles\00"
@.str.2 = [26 x i8] c"Debug: WriteHeaderComment\00"
@.str.3 = [26 x i8] c"Debug: WritePreProcessors\00"
@.str.4 = [32 x i8] c"Debug: WriteCharArrayExpression\00"
@.str.5 = [43 x i8] c"Debug: WritePreProcessorUndefineExpression\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = bitcast i32** %3 to i8*
%6 = bitcast i32** %4 to i8*
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @StartupValidate(i32 %0, i8** %1)
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%10 = getelementptr inbounds i8*, i8** %1, i64 1
%11 = load i8*, i8** %10
%12 = getelementptr inbounds i8*, i8** %1, i64 2
%13 = load i8*, i8** %12
%14 = call i32 @OpenFiles(i32** %3, i8* %11, i32** %4, i8* %13)
%15 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
%16 = load i32*, i32** %4
%17 = call i32 @WriteHeaderComment(i32* %16)
%18 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
%19 = load i32*, i32** %4
%20 = call i32 @WritePreProcessors(i32* %19)
%21 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0))
%22 = load i32*, i32** %4
%23 = load i32*, i32** %3
%24 = getelementptr inbounds i8*, i8** %1, i64 3
%25 = load i8*, i8** %24
%26 = getelementptr inbounds i8*, i8** %1, i64 4
%27 = load i8*, i8** %26
%28 = call i32 @WriteCharArrayExpression(i32* %22, i32* %23, i8* %25, i8* %27)
%29 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.5, i64 0, i64 0))
%30 = load i32*, i32** %4
%31 = call i32 @WritePreProcessorUndefineExpression(i32* %30)
%32 = load i32*, i32** %3
%33 = load i32*, i32** %4
%34 = call i32 @CloseFiles(i32* %32, i32* %33)
ret i32 0
}