#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*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ printf(char *);
void GenerateSampleFile() {
  FILE *sample = fopen("InitialConditions.ini", "w");
  fprintf(sample, "days, 27\n\n");
  fprintf(sample, "Earth\n");
  fprintf(sample, "mass, 5.97e24\n");
  fprintf(sample, "position, 0, 0, 0\n");
  fprintf(sample, "velocity, 0, 0, 0\n\n");
  fprintf(sample, "Moon\n");
  fprintf(sample, "mass, 7.34e22\n");
  fprintf(sample, "position, 3.84e8, 0, 0\n");
  fprintf(sample, "velocity, 0, 1000, 0\n\n");
  fprintf(sample, "GeostationarySatellite\n");
  fprintf(sample, "mass, 1200\n");
  fprintf(sample, "position, 3.58e7, 0, 0\n");
  fprintf(sample, "velocity, 0, 3070, 0");
  fprintf(sample, "InternationalSpaceStation\n");
  fprintf(sample, "mass, 419455\n");
  fprintf(sample, "position, 740626.73, -6644976.48, 1151109.69\n");
  fprintf(sample, "velocity, 4724.433862, 1545.169511, 5838.010655\n\n");
  fprintf(sample, "LunarReconOrbiter\n");
  fprintf(sample, "mass, 1000\n");
  fprintf(sample, "position, 3.84e8, 0, 1.787e6\n");
  fprintf(sample, "velocity, -1600, 1000, 0\n\n");
  fclose(sample);
  printf("\nSample file \"InitialConditions.ini\" has been created.");
}


x86 assembly (clang, -O0):
<GenerateSampleFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rdi
lea    0xec0(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeae(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xea9(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xea0(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xe9f(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xea2(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xea6(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xe9c(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xe9b(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xea3(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xeaa(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xeb2(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xeae(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xeb6(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xebb(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xec6(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xec4(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xee2(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf04(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf07(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf03(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf11(%rip),%rsi
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <fclose@plt>
lea    0xf17(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GenerateSampleFile>:
push   %rbx
lea    0xeb8(%rip),%rdi
lea    0xec7(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,%rbx
lea    0xeba(%rip),%rdi
mov    $0xa,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   1060 <fwrite@plt>
lea    0xeac(%rip),%rdi
mov    $0x6,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xe9a(%rip),%rdi
mov    $0xe,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xe90(%rip),%rdi
mov    $0x12,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xe8a(%rip),%rdi
mov    $0x13,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xe85(%rip),%rdi
mov    $0x5,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xe72(%rip),%rdi
mov    $0xe,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xe68(%rip),%rdi
mov    $0x17,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xe67(%rip),%rdi
mov    $0x16,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xe65(%rip),%rdi
mov    $0x17,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xe64(%rip),%rdi
mov    $0xb,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xe57(%rip),%rdi
mov    $0x17,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xe56(%rip),%rdi
mov    $0x14,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xe52(%rip),%rdi
mov    $0x1a,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xe54(%rip),%rdi
mov    $0xd,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xe49(%rip),%rdi
mov    $0x2d,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xe5e(%rip),%rdi
mov    $0x31,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xe77(%rip),%rdi
mov    $0x12,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xe71(%rip),%rdi
mov    $0xb,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xe64(%rip),%rdi
mov    $0x1d,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
lea    0xe69(%rip),%rdi
mov    $0x1a,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1060 <fwrite@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
lea    0xe63(%rip),%rdi
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"InitialConditions.ini\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [11 x i8] c"days, 27\0A\0A\00"
@.str.3 = [7 x i8] c"Earth\0A\00"
@.str.4 = [15 x i8] c"mass, 5.97e24\0A\00"
@.str.5 = [19 x i8] c"position, 0, 0, 0\0A\00"
@.str.6 = [20 x i8] c"velocity, 0, 0, 0\0A\0A\00"
@.str.7 = [6 x i8] c"Moon\0A\00"
@.str.8 = [15 x i8] c"mass, 7.34e22\0A\00"
@.str.9 = [24 x i8] c"position, 3.84e8, 0, 0\0A\00"
@.str.10 = [23 x i8] c"velocity, 0, 1000, 0\0A\0A\00"
@.str.11 = [24 x i8] c"GeostationarySatellite\0A\00"
@.str.12 = [12 x i8] c"mass, 1200\0A\00"
@.str.13 = [24 x i8] c"position, 3.58e7, 0, 0\0A\00"
@.str.14 = [21 x i8] c"velocity, 0, 3070, 0\00"
@.str.15 = [27 x i8] c"InternationalSpaceStation\0A\00"
@.str.16 = [14 x i8] c"mass, 419455\0A\00"
@.str.17 = [46 x i8] c"position, 740626.73, -6644976.48, 1151109.69\0A\00"
@.str.18 = [50 x i8] c"velocity, 4724.433862, 1545.169511, 5838.010655\0A\0A\00"
@.str.19 = [19 x i8] c"LunarReconOrbiter\0A\00"
@.str.20 = [12 x i8] c"mass, 1000\0A\00"
@.str.21 = [30 x i8] c"position, 3.84e8, 0, 1.787e6\0A\00"
@.str.22 = [27 x i8] c"velocity, -1600, 1000, 0\0A\0A\00"
@.str.23 = [55 x i8] c"\0ASample file \22InitialConditions.ini\22 has been created.\00"
define void @GenerateSampleFile() {
%1 = alloca i32*
%2 = call i32* @fopen(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %2, i32** %1
%3 = load i32*, i32** %1
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%5 = load i32*, i32** %1
%6 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%7 = load i32*, i32** %1
%8 = call i32 @fprintf(i32* %7, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0))
%9 = load i32*, i32** %1
%10 = call i32 @fprintf(i32* %9, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0))
%11 = load i32*, i32** %1
%12 = call i32 @fprintf(i32* %11, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0))
%13 = load i32*, i32** %1
%14 = call i32 @fprintf(i32* %13, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
%15 = load i32*, i32** %1
%16 = call i32 @fprintf(i32* %15, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.8, i64 0, i64 0))
%17 = load i32*, i32** %1
%18 = call i32 @fprintf(i32* %17, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0))
%19 = load i32*, i32** %1
%20 = call i32 @fprintf(i32* %19, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.10, i64 0, i64 0))
%21 = load i32*, i32** %1
%22 = call i32 @fprintf(i32* %21, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.11, i64 0, i64 0))
%23 = load i32*, i32** %1
%24 = call i32 @fprintf(i32* %23, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.12, i64 0, i64 0))
%25 = load i32*, i32** %1
%26 = call i32 @fprintf(i32* %25, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.13, i64 0, i64 0))
%27 = load i32*, i32** %1
%28 = call i32 @fprintf(i32* %27, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.14, i64 0, i64 0))
%29 = load i32*, i32** %1
%30 = call i32 @fprintf(i32* %29, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.15, i64 0, i64 0))
%31 = load i32*, i32** %1
%32 = call i32 @fprintf(i32* %31, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.16, i64 0, i64 0))
%33 = load i32*, i32** %1
%34 = call i32 @fprintf(i32* %33, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.17, i64 0, i64 0))
%35 = load i32*, i32** %1
%36 = call i32 @fprintf(i32* %35, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.18, i64 0, i64 0))
%37 = load i32*, i32** %1
%38 = call i32 @fprintf(i32* %37, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.19, i64 0, i64 0))
%39 = load i32*, i32** %1
%40 = call i32 @fprintf(i32* %39, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.20, i64 0, i64 0))
%41 = load i32*, i32** %1
%42 = call i32 @fprintf(i32* %41, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.21, i64 0, i64 0))
%43 = load i32*, i32** %1
%44 = call i32 @fprintf(i32* %43, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.22, i64 0, i64 0))
%45 = load i32*, i32** %1
%46 = call i32 @fclose(i32* %45)
%47 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.23, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"InitialConditions.ini\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [11 x i8] c"days, 27\0A\0A\00"
@.str.3 = [7 x i8] c"Earth\0A\00"
@.str.4 = [15 x i8] c"mass, 5.97e24\0A\00"
@.str.5 = [19 x i8] c"position, 0, 0, 0\0A\00"
@.str.6 = [20 x i8] c"velocity, 0, 0, 0\0A\0A\00"
@.str.7 = [6 x i8] c"Moon\0A\00"
@.str.8 = [15 x i8] c"mass, 7.34e22\0A\00"
@.str.9 = [24 x i8] c"position, 3.84e8, 0, 0\0A\00"
@.str.10 = [23 x i8] c"velocity, 0, 1000, 0\0A\0A\00"
@.str.11 = [24 x i8] c"GeostationarySatellite\0A\00"
@.str.12 = [12 x i8] c"mass, 1200\0A\00"
@.str.13 = [24 x i8] c"position, 3.58e7, 0, 0\0A\00"
@.str.14 = [21 x i8] c"velocity, 0, 3070, 0\00"
@.str.15 = [27 x i8] c"InternationalSpaceStation\0A\00"
@.str.16 = [14 x i8] c"mass, 419455\0A\00"
@.str.17 = [46 x i8] c"position, 740626.73, -6644976.48, 1151109.69\0A\00"
@.str.18 = [50 x i8] c"velocity, 4724.433862, 1545.169511, 5838.010655\0A\0A\00"
@.str.19 = [19 x i8] c"LunarReconOrbiter\0A\00"
@.str.20 = [12 x i8] c"mass, 1000\0A\00"
@.str.21 = [30 x i8] c"position, 3.84e8, 0, 1.787e6\0A\00"
@.str.22 = [27 x i8] c"velocity, -1600, 1000, 0\0A\0A\00"
@.str.23 = [55 x i8] c"\0ASample file \22InitialConditions.ini\22 has been created.\00"
define void @GenerateSampleFile() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i64 10, i64 1, i32* %1)
%3 = tail call i64 @fwrite(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i64 6, i64 1, i32* %1)
%4 = tail call i64 @fwrite(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i64 14, i64 1, i32* %1)
%5 = tail call i64 @fwrite(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i64 18, i64 1, i32* %1)
%6 = tail call i64 @fwrite(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), i64 19, i64 1, i32* %1)
%7 = tail call i64 @fwrite(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i64 5, i64 1, i32* %1)
%8 = tail call i64 @fwrite(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.8, i64 0, i64 0), i64 14, i64 1, i32* %1)
%9 = tail call i64 @fwrite(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.9, i64 0, i64 0), i64 23, i64 1, i32* %1)
%10 = tail call i64 @fwrite(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.10, i64 0, i64 0), i64 22, i64 1, i32* %1)
%11 = tail call i64 @fwrite(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.11, i64 0, i64 0), i64 23, i64 1, i32* %1)
%12 = tail call i64 @fwrite(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.12, i64 0, i64 0), i64 11, i64 1, i32* %1)
%13 = tail call i64 @fwrite(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.13, i64 0, i64 0), i64 23, i64 1, i32* %1)
%14 = tail call i64 @fwrite(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.14, i64 0, i64 0), i64 20, i64 1, i32* %1)
%15 = tail call i64 @fwrite(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.15, i64 0, i64 0), i64 26, i64 1, i32* %1)
%16 = tail call i64 @fwrite(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.16, i64 0, i64 0), i64 13, i64 1, i32* %1)
%17 = tail call i64 @fwrite(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.17, i64 0, i64 0), i64 45, i64 1, i32* %1)
%18 = tail call i64 @fwrite(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.18, i64 0, i64 0), i64 49, i64 1, i32* %1)
%19 = tail call i64 @fwrite(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.19, i64 0, i64 0), i64 18, i64 1, i32* %1)
%20 = tail call i64 @fwrite(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.20, i64 0, i64 0), i64 11, i64 1, i32* %1)
%21 = tail call i64 @fwrite(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.21, i64 0, i64 0), i64 29, i64 1, i32* %1)
%22 = tail call i64 @fwrite(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.22, i64 0, i64 0), i64 26, i64 1, i32* %1)
%23 = tail call i32 @fclose(i32* %1)
%24 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @.str.23, i64 0, i64 0))
ret void
}