#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 atoi(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, ...);
int runabc1() {
  int printIt, printMut, printRec;
  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);
  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);
  printf("\n");
  do {
    printf("  choose if table files (.len) for each simulation will be created "
           "(0 - file");
    printf("\n  not created;1 - file created)");
    printf("\n  THIS OPTION MEANS ONE .LEN FILE PER SIMULATION: ");
    scanf("%s", &str);
    printIt = atoi(str);
  } while (printIt != 0 && printIt != 1);
  printf("\n");
  do {
    printf("  choose if file with mutation rate will be created (0 - file not "
           "created;");
    printf("\n  1 - file created): ");
    scanf("%s", &str);
    printMut = atoi(str);
  } while (printMut != 0 && printMut != 1);
  printf("\n");
  do {
    printf("  choose if file with recombination rate will be created (0 - file "
           "not created;");
    printf("\n  1 - file created): ");
    scanf("%s", &str);
    printRec = atoi(str);
  } while (printRec != 0 && printRec != 1);
  return abc(input_prs, input_ssz, input_sst, output, printIt, printMut,
             printRec);
}


x86 assembly (clang, -O0):
<runabc1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x520,%rsp
lea    0xeae(%rip),%rdi
mov    $0xff,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x210(%rbp),%rsi
lea    0xec5(%rip),%rdi
mov    $0x0,%al
call   1050 <scanf@plt>
lea    0xeba(%rip),%rdi
mov    $0xff,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x310(%rbp),%rsi
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1050 <scanf@plt>
lea    0xec9(%rip),%rdi
mov    $0xff,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x410(%rbp),%rsi
lea    0xe75(%rip),%rdi
mov    $0x0,%al
call   1050 <scanf@plt>
lea    0xee3(%rip),%rdi
mov    $0xff,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x510(%rbp),%rsi
lea    0xe4d(%rip),%rdi
mov    $0x0,%al
call   1050 <scanf@plt>
lea    0xefe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf31(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf44(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe07(%rip),%rdi
lea    -0x110(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
lea    -0x110(%rbp),%rdi
call   1060 <atoi@plt>
mov    %eax,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x511(%rbp)
je     1266 <runabc1+0x126>
cmpl   $0x1,-0x4(%rbp)
setne  %al
mov    %al,-0x511(%rbp)
mov    -0x511(%rbp),%al
test   $0x1,%al
jne    11f9 <runabc1+0xb9>
lea    0xe75(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf0b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf48(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd8c(%rip),%rdi
lea    -0x110(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
lea    -0x110(%rbp),%rdi
call   1060 <atoi@plt>
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x512(%rbp)
je     12e1 <runabc1+0x1a1>
cmpl   $0x1,-0x8(%rbp)
setne  %al
mov    %al,-0x512(%rbp)
mov    -0x512(%rbp),%al
test   $0x1,%al
jne    1282 <runabc1+0x142>
lea    0xdfa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xd11(%rip),%rdi
lea    -0x110(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
lea    -0x110(%rbp),%rdi
call   1060 <atoi@plt>
mov    %eax,-0xc(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0xc(%rbp)
mov    %al,-0x513(%rbp)
je     135c <runabc1+0x21c>
cmpl   $0x1,-0xc(%rbp)
setne  %al
mov    %al,-0x513(%rbp)
mov    -0x513(%rbp),%al
test   $0x1,%al
jne    12fd <runabc1+0x1bd>
lea    -0x210(%rbp),%rdi
lea    -0x310(%rbp),%rsi
lea    -0x410(%rbp),%rdx
lea    -0x510(%rbp),%rcx
mov    -0x4(%rbp),%r8d
mov    -0x8(%rbp),%r9d
mov    -0xc(%rbp),%eax
mov    %eax,(%rsp)
call   1040 <abc@plt>
add    $0x520,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<runabc1>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x518,%rsp
lea    0xe98(%rip),%rdi
mov    $0xff,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeb6(%rip),%r14
lea    0x410(%rsp),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <scanf@plt>
lea    0xea0(%rip),%rdi
mov    $0xff,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x310(%rsp),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <scanf@plt>
lea    0xeb2(%rip),%rdi
mov    $0xff,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x210(%rsp),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <scanf@plt>
lea    0xecf(%rip),%rdi
mov    $0xff,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x110(%rsp),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xee3(%rip),%r15
lea    0xf29(%rip),%r12
lea    0xf43(%rip),%r13
lea    0x10(%rsp),%rbp
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r13,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    %rbp,%rdi
call   1070 <atoi@plt>
cmp    $0x1,%eax
ja     1220 <runabc1+0xd0>
mov    %eax,%ebx
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xf27(%rip),%r14
lea    0xf6b(%rip),%r15
lea    0xdb8(%rip),%r12
lea    0x10(%rsp),%r13
xchg   %ax,%ax
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    %r13,%rdi
call   1070 <atoi@plt>
cmp    $0x1,%eax
ja     1280 <runabc1+0x130>
mov    %eax,%ebp
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xf33(%rip),%r14
lea    0xf15(%rip),%r15
lea    0xd62(%rip),%r12
lea    0x10(%rsp),%r13
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r12,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    %r13,%rdi
call   1070 <atoi@plt>
cmp    $0x1,%eax
ja     12e0 <runabc1+0x190>
mov    %eax,(%rsp)
lea    0x410(%rsp),%rdi
lea    0x310(%rsp),%rsi
lea    0x210(%rsp),%rdx
lea    0x110(%rsp),%rcx
mov    %ebx,%r8d
mov    %ebp,%r9d
call   1050 <abc@plt>
add    $0x518,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [49 x i8] c"\0A choose prior file (.prs) (max %d character): \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [55 x i8] c"\0A choose sample size file (.ssz) (max %d character): \00"
@.str.3 = [66 x i8] c"\0A choose summary statistics set file (.sst) (max %d character): \00"
@.str.4 = [67 x i8] c"\0A insert name for output file (no extension) (max %d character): \00"
@.str.5 = [2 x i8] c"\0A\00"
@.str.6 = [77 x i8] c" choose if table files (.len) for each simulation will be created (0 - file\00"
@.str.7 = [33 x i8] c"\0A not created;1 - file created)\00"
@.str.8 = [52 x i8] c"\0A THIS OPTION MEANS ONE .LEN FILE PER SIMULATION: \00"
@.str.9 = [75 x i8] c" choose if file with mutation rate will be created (0 - file not created;\00"
@.str.10 = [23 x i8] c"\0A 1 - file created): \00"
@.str.11 = [80 x i8] c" choose if file with recombination rate will be created (0 - file not created;\00"
define i32 @runabc1() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [256 x i8]
%5 = alloca [256 x i8]
%6 = alloca [256 x i8]
%7 = alloca [256 x i8]
%8 = alloca [256 x i8]
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i32 255)
%10 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %10)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.2, i64 0, i64 0), i32 255)
%13 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 0
%14 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %13)
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.3, i64 0, i64 0), i32 255)
%16 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%17 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %16)
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str.4, i64 0, i64 0), i32 255)
%19 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%20 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %19)
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %22
22: ; preds = %35, %0
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str.6, i64 0, i64 0))
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.7, i64 0, i64 0))
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.8, i64 0, i64 0))
%26 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), [256 x i8]* %4)
%27 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%28 = call i32 @atoi(i8* %27)
store i32 %28, i32* %1
br label %29
29: ; preds = %22
%30 = load i32, i32* %1
%31 = icmp ne i32 %30, 0
br i1 %31, label %32, label %35
32: ; preds = %29
%33 = load i32, i32* %1
%34 = icmp ne i32 %33, 1
br label %35
35: ; preds = %32, %29
%36 = phi i1 [ false, %29 ], [ %34, %32 ]
br i1 %36, label %22, label %37
37: ; preds = %35
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %39
39: ; preds = %51, %37
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.9, i64 0, i64 0))
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.10, i64 0, i64 0))
%42 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), [256 x i8]* %4)
%43 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%44 = call i32 @atoi(i8* %43)
store i32 %44, i32* %2
br label %45
45: ; preds = %39
%46 = load i32, i32* %2
%47 = icmp ne i32 %46, 0
br i1 %47, label %48, label %51
48: ; preds = %45
%49 = load i32, i32* %2
%50 = icmp ne i32 %49, 1
br label %51
51: ; preds = %48, %45
%52 = phi i1 [ false, %45 ], [ %50, %48 ]
br i1 %52, label %39, label %53
53: ; preds = %51
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %55
55: ; preds = %67, %53
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str.11, i64 0, i64 0))
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.10, i64 0, i64 0))
%58 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), [256 x i8]* %4)
%59 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%60 = call i32 @atoi(i8* %59)
store i32 %60, i32* %3
br label %61
61: ; preds = %55
%62 = load i32, i32* %3
%63 = icmp ne i32 %62, 0
br i1 %63, label %64, label %67
64: ; preds = %61
%65 = load i32, i32* %3
%66 = icmp ne i32 %65, 1
br label %67
67: ; preds = %64, %61
%68 = phi i1 [ false, %61 ], [ %66, %64 ]
br i1 %68, label %55, label %69
69: ; preds = %67
%70 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%71 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 0
%72 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%73 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%74 = load i32, i32* %1
%75 = load i32, i32* %2
%76 = load i32, i32* %3
%77 = call i32 @abc(i8* %70, i8* %71, i8* %72, i8* %73, i32 %74, i32 %75, i32 %76)
ret i32 %77
}

LLVM IR (-O2):
@.str = [49 x i8] c"\0A choose prior file (.prs) (max %d character): \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [55 x i8] c"\0A choose sample size file (.ssz) (max %d character): \00"
@.str.3 = [66 x i8] c"\0A choose summary statistics set file (.sst) (max %d character): \00"
@.str.4 = [67 x i8] c"\0A insert name for output file (no extension) (max %d character): \00"
@.str.6 = [77 x i8] c" choose if table files (.len) for each simulation will be created (0 - file\00"
@.str.7 = [33 x i8] c"\0A not created;1 - file created)\00"
@.str.8 = [52 x i8] c"\0A THIS OPTION MEANS ONE .LEN FILE PER SIMULATION: \00"
@.str.9 = [75 x i8] c" choose if file with mutation rate will be created (0 - file not created;\00"
@.str.10 = [23 x i8] c"\0A 1 - file created): \00"
@.str.11 = [80 x i8] c" choose if file with recombination rate will be created (0 - file not created;\00"
define i32 @runabc1() {
%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 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%7 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%8 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%9 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%10 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i32 255)
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %7)
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @.str.2, i64 0, i64 0), i32 255)
%14 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %8)
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @.str.3, i64 0, i64 0), i32 255)
%16 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %9)
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @.str.4, i64 0, i64 0), i32 255)
%18 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %10)
%19 = call i32 @putchar(i32 10)
br label %20
20: ; preds = %20, %0
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([77 x i8], [77 x i8]* @.str.6, i64 0, i64 0))
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.7, i64 0, i64 0))
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.8, i64 0, i64 0))
%24 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), [256 x i8]* %1)
%25 = call i32 @atoi(i8* %6)
%26 = icmp ult i32 %25, 2
br i1 %26, label %27, label %20
27: ; preds = %20
%28 = call i32 @putchar(i32 10)
br label %29
29: ; preds = %29, %27
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([75 x i8], [75 x i8]* @.str.9, i64 0, i64 0))
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.10, i64 0, i64 0))
%32 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), [256 x i8]* %1)
%33 = call i32 @atoi(i8* %6)
%34 = icmp ult i32 %33, 2
br i1 %34, label %35, label %29
35: ; preds = %29
%36 = call i32 @putchar(i32 10)
br label %37
37: ; preds = %37, %35
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @.str.11, i64 0, i64 0))
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.10, i64 0, i64 0))
%40 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), [256 x i8]* %1)
%41 = call i32 @atoi(i8* %6)
%42 = icmp ult i32 %41, 2
br i1 %42, label %43, label %37
43: ; preds = %37
%44 = call i32 @abc(i8* %7, i8* %8, i8* %9, i8* %10, i32 %25, i32 %33, i32 %41)
ret i32 %44
}