#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 abc(char *, char *, char *, char *, int, int, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
int simulate() {
  char str[256], input_prs[256], input_ssz[256], input_sst[256], output[256];
  printf("\n  choose prior file (.prs) (max %d character)", 256 - 1);
  printf("\n  SHOULD HAVE ONLY ONE ITERATION: ");
  scanf("%s", input_prs);
  printf("\n  choose sample size file (.ssz) (max %d character): ", 256 - 1);
  scanf("%s", input_ssz);
  printf("\n  choose summary statistics set file (.sst) (max %d character): ",
         256 - 1);
  scanf("%s", input_sst);
  printf("\n  insert name for output file (no extension) (max %d character): ",
         256 - 1);
  scanf("%s", output);
  return abc(input_prs, input_ssz, input_sst, output, 1, 1, 1);
}


x86 assembly (clang, -O0):
<simulate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x510,%rsp
lea    0xebe(%rip),%rdi
mov    $0xff,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x200(%rbp),%rsi
lea    0xee9(%rip),%rdi
call   1050 <scanf@plt>
lea    0xee0(%rip),%rdi
mov    $0xff,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x300(%rbp),%rsi
lea    0xec3(%rip),%rdi
call   1050 <scanf@plt>
lea    0xef1(%rip),%rdi
mov    $0xff,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x400(%rbp),%rsi
lea    0xe9d(%rip),%rdi
call   1050 <scanf@plt>
lea    0xf0d(%rip),%rdi
mov    $0xff,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x500(%rbp),%rsi
lea    0xe77(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x200(%rbp),%rdi
lea    -0x300(%rbp),%rsi
lea    -0x400(%rbp),%rdx
lea    -0x500(%rbp),%rcx
mov    $0x1,%r9d
mov    %r9d,%r8d
movl   $0x1,(%rsp)
call   1040 <abc@plt>
add    $0x510,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<simulate>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x410,%rsp
lea    0xeb9(%rip),%rdi
mov    $0xff,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeeb(%rip),%r13
lea    0x310(%rsp),%r14
mov    %r13,%rdi
mov    %r14,%rsi
call   1050 <scanf@plt>
lea    0xed4(%rip),%rdi
mov    $0xff,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x210(%rsp),%r15
mov    %r13,%rdi
mov    %r15,%rsi
call   1050 <scanf@plt>
lea    0xee5(%rip),%rdi
mov    $0xff,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x110(%rsp),%r12
mov    %r13,%rdi
mov    %r12,%rsi
call   1050 <scanf@plt>
lea    0xf01(%rip),%rdi
mov    $0xff,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x10(%rsp),%rbx
mov    %r13,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
movl   $0x1,(%rsp)
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
mov    %rbx,%rcx
mov    $0x1,%r8d
mov    $0x1,%r9d
call   1040 <abc@plt>
add    $0x410,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [47 x i8] c"\0A choose prior file (.prs) (max %d character)\00"
@.str.1 = [36 x i8] c"\0A SHOULD HAVE ONLY ONE ITERATION: \00"
@.str.2 = [3 x i8] c"%s\00"
@.str.3 = [55 x i8] c"\0A choose sample size file (.ssz) (max %d character): \00"
@.str.4 = [66 x i8] c"\0A choose summary statistics set file (.sst) (max %d character): \00"
@.str.5 = [67 x i8] c"\0A insert name for output file (no extension) (max %d character): \00"
define i32 @simulate() {
%1 = alloca [256 x i8]
%2 = alloca [256 x i8]
%3 = alloca [256 x i8]
%4 = alloca [256 x i8]
%5 = alloca [256 x i8]
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 255)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
%8 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %8)
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.3, i64 0, i64 0), i32 255)
%11 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %11)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.4, i64 0, i64 0), i32 255)
%14 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %14)
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.5, i64 0, i64 0), i32 255)
%17 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%18 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %17)
%19 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%20 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%21 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%22 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%23 = call i32 @abc(i8* %19, i8* %20, i8* %21, i8* %22, i32 1, i32 1, i32 1)
ret i32 %23
}

LLVM IR (-O2):
@.str = [47 x i8] c"\0A choose prior file (.prs) (max %d character)\00"
@.str.1 = [36 x i8] c"\0A SHOULD HAVE ONLY ONE ITERATION: \00"
@.str.2 = [3 x i8] c"%s\00"
@.str.3 = [55 x i8] c"\0A choose sample size file (.ssz) (max %d character): \00"
@.str.4 = [66 x i8] c"\0A choose summary statistics set file (.sst) (max %d character): \00"
@.str.5 = [67 x i8] c"\0A insert name for output file (no extension) (max %d character): \00"
define i32 @simulate() {
%1 = alloca [256 x i8]
%2 = alloca [256 x i8]
%3 = alloca [256 x i8]
%4 = alloca [256 x i8]
%5 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%7 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%8 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 255)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %5)
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @.str.3, i64 0, i64 0), i32 255)
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %6)
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @.str.4, i64 0, i64 0), i32 255)
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %7)
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @.str.5, i64 0, i64 0), i32 255)
%17 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %8)
%18 = call i32 @abc(i8* %5, i8* %6, i8* %7, i8* %8, i32 1, i32 1, i32 1)
ret i32 %18
}