#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*/ GenerateSampleFile();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
int /*<<< orphan*/ stderr;
void FileNotFound() {
  fprintf(stderr, "\nError: file \"InitialConditions.ini\" not found. Could "
                  "not read data.");
  fprintf(stderr, "\nWould you like to generate a sample file? (Y/N)\n");
  char UserChoice;
  scanf("%c", &UserChoice);
  switch (UserChoice) {
  case 'Y':
  case 'y':
    GenerateSampleFile();
    printf("\nTerminating program.");
    exit(0);
    break;
  case 'N':
  case 'n':
  default:
    printf("\nTerminating program.");
    exit(0);
    break;
  }
}


x86 assembly (clang, -O0):
<FileNotFound>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2e81(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    (%rax),%edi
lea    0xe94(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
lea    0xec7(%rip),%rsi
call   1040 <fprintf@plt>
lea    0xeed(%rip),%rdi
lea    -0x1(%rbp),%rsi
call   1060 <scanf@plt>
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
sub    $0x4e,%eax
je     11f5 <FileNotFound+0xa5>
jmp    11a8 <FileNotFound+0x58>
mov    -0x8(%rbp),%eax
sub    $0x59,%eax
je     11db <FileNotFound+0x8b>
jmp    11b9 <FileNotFound+0x69>
mov    -0x8(%rbp),%eax
sub    $0x6e,%eax
je     11f5 <FileNotFound+0xa5>
jmp    11ca <FileNotFound+0x7a>
mov    -0x8(%rbp),%eax
sub    $0x79,%eax
jne    11fa <FileNotFound+0xaa>
jmp    11db <FileNotFound+0x8b>
mov    $0x0,%al
call   1050 <GenerateSampleFile@plt>
lea    0xe91(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1070 <exit@plt>
jmp    11fa <FileNotFound+0xaa>
lea    0xe79(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1070 <exit@plt>

x86 assembly (clang, -O2):
<FileNotFound>:
push   %rbx
sub    $0x10,%rsp
mov    0x2e84(%rip),%rbx
mov    (%rbx),%edi
lea    0xe9b(%rip),%rsi
call   1040 <fprintf@plt>
mov    (%rbx),%edi
lea    0xed2(%rip),%rsi
call   1040 <fprintf@plt>
lea    0xef8(%rip),%rdi
lea    0xf(%rsp),%rsi
call   1060 <scanf@plt>
movsbl 0xf(%rsp),%eax
or     $0x20,%eax
cmp    $0x79,%eax
jne    119d <FileNotFound+0x4d>
xor    %eax,%eax
call   1050 <GenerateSampleFile@plt>
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [69 x i8] c"\0AError: file \22InitialConditions.ini\22 not found. Could not read data.\00"
@.str.1 = [50 x i8] c"\0AWould you like to generate a sample file? (Y/N)\0A\00"
@.str.2 = [3 x i8] c"%c\00"
@.str.3 = [22 x i8] c"\0ATerminating program.\00"
define void @FileNotFound() {
%1 = alloca i8
%2 = load i32, i32* @stderr
%3 = call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stderr
%5 = call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %1)
%7 = load i8, i8* %1
%8 = sext i8 %7 to i32
switch i32 %8, label %14 [
i32 89, label %9
i32 121, label %9
i32 78, label %13
i32 110, label %13
]
9: ; preds = %0, %0
%10 = call i32 (...) @GenerateSampleFile()
%11 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
%12 = call i32 @exit(i32 0)
unreachable
13: ; preds = %0, %0
br label %14
14: ; preds = %0, %13
%15 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
%16 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [69 x i8] c"\0AError: file \22InitialConditions.ini\22 not found. Could not read data.\00"
@.str.1 = [50 x i8] c"\0AWould you like to generate a sample file? (Y/N)\0A\00"
@.str.2 = [3 x i8] c"%c\00"
@.str.3 = [22 x i8] c"\0ATerminating program.\00"
define void @FileNotFound() {
%1 = alloca i8
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %1)
%7 = load i8, i8* %1
%8 = sext i8 %7 to i32
switch i32 %8, label %13 [
i32 89, label %9
i32 121, label %9
]
9: ; preds = %0, %0
%10 = call i32 (...) @GenerateSampleFile()
%11 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
%12 = call i32 @exit(i32 0)
unreachable
13: ; preds = %0
%14 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
%15 = call i32 @exit(i32 0)
unreachable
}