int runabc2() {
  int nparam, nstats;
  double tol;
  char str[256], input_dat[256], input_trg[256], input_rej[256];
  printf("\n  choose data file (.dat) (max %d character): ", 256 - 1);
  scanf("%s", input_dat);
  printf("\n  choose target file (.trg) (max %d character): ", 256 - 1);
  scanf("%s", input_trg);
  printf(
      "\n  insert name for rejection file (no extension) (max %d character): ",
      256 - 1);
  scanf("%s", input_rej);
  printf("\n");
  do {
    printf("  specify the number of parameters used (>0): ");
    scanf("%s", &str);
    nparam = atof(str);
  } while (nparam <= 0);
  printf("\n");
  do {
    printf("  specify the number of summary statistics used (>0): ");
    scanf("%s", &str);
    nstats = atof(str);
  } while (nstats <= 0);
  printf("\n");
  do {
    printf("  choose tolerance for rejection step (0 < tol < 1): ");
    scanf("%s", &str);
    tol = atof(str);
  } while (tol <= 0 || tol >= 1);
  return firstpass(input_dat, input_trg, input_rej, nparam, nstats, tol);
}


x86 assembly (clang, -O0):
<runabc2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
lea    0xeb6(%rip),%rdi
mov    $0xff,%esi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x210(%rbp),%rsi
lea    0xecc(%rip),%rdi
mov    $0x0,%al
call   1060 <scanf@plt>
lea    0xec1(%rip),%rdi
mov    $0xff,%esi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x310(%rbp),%rsi
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1060 <scanf@plt>
lea    0xecb(%rip),%rdi
mov    $0xff,%esi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x410(%rbp),%rsi
lea    0xe7c(%rip),%rdi
mov    $0x0,%al
call   1060 <scanf@plt>
lea    0xee9(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe52(%rip),%rdi
lea    -0x110(%rbp),%rsi
mov    $0x0,%al
call   1060 <scanf@plt>
lea    -0x110(%rbp),%rdi
mov    $0x0,%al
call   1030 <atof@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    11d1 <runabc2+0x91>
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xec0(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe06(%rip),%rdi
lea    -0x110(%rbp),%rsi
mov    $0x0,%al
call   1060 <scanf@plt>
lea    -0x110(%rbp),%rdi
mov    $0x0,%al
call   1030 <atof@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    121d <runabc2+0xdd>
lea    0xe51(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xdba(%rip),%rdi
lea    -0x110(%rbp),%rsi
mov    $0x0,%al
call   1060 <scanf@plt>
lea    -0x110(%rbp),%rdi
mov    $0x0,%al
call   1030 <atof@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    $0x1,%al
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
mov    %al,-0x411(%rbp)
jae    12d3 <runabc2+0x193>
movsd  -0x10(%rbp),%xmm0
movsd  0xd3a(%rip),%xmm1
ucomisd %xmm1,%xmm0
setae  %al
mov    %al,-0x411(%rbp)
mov    -0x411(%rbp),%al
test   $0x1,%al
jne    1269 <runabc2+0x129>
lea    -0x210(%rbp),%rdi
lea    -0x310(%rbp),%rsi
lea    -0x410(%rbp),%rdx
mov    -0x4(%rbp),%ecx
mov    -0x8(%rbp),%r8d
movsd  -0x10(%rbp),%xmm0
mov    $0x1,%al
call   1040 <firstpass@plt>
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<runabc2>:
push   %r15
push   %r14
push   %rbx
sub    $0x400,%rsp
lea    0xead(%rip),%rdi
mov    $0xff,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeca(%rip),%r14
lea    0x300(%rsp),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <scanf@plt>
lea    0xeb4(%rip),%rdi
mov    $0xff,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x200(%rsp),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <scanf@plt>
lea    0xec1(%rip),%rdi
mov    $0xff,%esi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0x100(%rsp),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xed8(%rip),%r15
mov    %rsp,%rbx
cs nopw 0x0(%rax,%rax,1)
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <atof@plt>
test   %eax,%eax
jle    11e0 <runabc2+0xa0>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xec4(%rip),%r14
lea    0xe13(%rip),%r15
mov    %rsp,%rbx
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <atof@plt>
test   %eax,%eax
jle    1220 <runabc2+0xe0>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xebb(%rip),%r14
lea    0xdd3(%rip),%r15
mov    %rsp,%rbx
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <atof@plt>
jmp    1260 <runabc2+0x120>

LLVM IR (-O0):
@.str = [48 x i8] c"\0A choose data file (.dat) (max %d character): \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [50 x i8] c"\0A choose target file (.trg) (max %d character): \00"
@.str.3 = [70 x i8] c"\0A insert name for rejection file (no extension) (max %d character): \00"
@.str.4 = [2 x i8] c"\0A\00"
@.str.5 = [47 x i8] c" specify the number of parameters used (>0): \00"
@.str.6 = [55 x i8] c" specify the number of summary statistics used (>0): \00"
@.str.7 = [54 x i8] c" choose tolerance for rejection step (0 < tol < 1): \00"
define i32 @runabc2() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca double
%4 = alloca [256 x i8]
%5 = alloca [256 x i8]
%6 = alloca [256 x i8]
%7 = alloca [256 x i8]
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32 255)
%9 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %9)
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.2, i64 0, i64 0), i32 255)
%12 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 0
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %12)
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.3, i64 0, i64 0), i32 255)
%15 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%16 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %15)
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %18
18: ; preds = %23, %0
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.5, i64 0, i64 0))
%20 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), [256 x i8]* %4)
%21 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%22 = call i32 (i8*, ...) bitcast (i32 (...)* @atof to i32 (i8*, ...)*)(i8* %21)
store i32 %22, i32* %1
br label %23
23: ; preds = %18
%24 = load i32, i32* %1
%25 = icmp sle i32 %24, 0
br i1 %25, label %18, label %26
26: ; preds = %23
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %28
28: ; preds = %33, %26
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.6, i64 0, i64 0))
%30 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), [256 x i8]* %4)
%31 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%32 = call i32 (i8*, ...) bitcast (i32 (...)* @atof to i32 (i8*, ...)*)(i8* %31)
store i32 %32, i32* %2
br label %33
33: ; preds = %28
%34 = load i32, i32* %2
%35 = icmp sle i32 %34, 0
br i1 %35, label %28, label %36
36: ; preds = %33
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
br label %38
38: ; preds = %50, %36
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.7, 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]* %4)
%41 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%42 = call i32 (i8*, ...) bitcast (i32 (...)* @atof to i32 (i8*, ...)*)(i8* %41)
%43 = sitofp i32 %42 to double
store double %43, double* %3
br label %44
44: ; preds = %38
%45 = load double, double* %3
%46 = fcmp ole double %45, 0.000000e+00
br i1 %46, label %50, label %47
47: ; preds = %44
%48 = load double, double* %3
%49 = fcmp oge double %48, 1.000000e+00
br label %50
50: ; preds = %47, %44
%51 = phi i1 [ true, %44 ], [ %49, %47 ]
br i1 %51, label %38, label %52
52: ; preds = %50
%53 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%54 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 0
%55 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%56 = load i32, i32* %1
%57 = load i32, i32* %2
%58 = load double, double* %3
%59 = call i32 (i8*, i8*, i8*, i32, i32, double, ...) bitcast (i32 (...)* @firstpass to i32 (i8*, i8*, i8*, i32, i32, double, ...)*)(i8* %53, i8* %54, i8* %55, i32 %56, i32 %57, double %58)
ret i32 %59
}

LLVM IR (-O2):
@.str = [48 x i8] c"\0A choose data file (.dat) (max %d character): \00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [50 x i8] c"\0A choose target file (.trg) (max %d character): \00"
@.str.3 = [70 x i8] c"\0A insert name for rejection file (no extension) (max %d character): \00"
@.str.5 = [47 x i8] c" specify the number of parameters used (>0): \00"
@.str.6 = [55 x i8] c" specify the number of summary statistics used (>0): \00"
@.str.7 = [54 x i8] c" choose tolerance for rejection step (0 < tol < 1): \00"
define i32 @runabc2() {
%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 ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32 255)
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.2, 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 ([70 x i8], [70 x i8]* @.str.3, 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 @putchar(i32 10)
br label %16
16: ; preds = %16, %0
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.5, i64 0, i64 0))
%18 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), [256 x i8]* %1)
%19 = call i32 (i8*, ...) bitcast (i32 (...)* @atof to i32 (i8*, ...)*)(i8* %5)
%20 = icmp slt i32 %19, 1
br i1 %20, label %16, label %21
21: ; preds = %16
%22 = call i32 @putchar(i32 10)
br label %23
23: ; preds = %23, %21
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @.str.6, i64 0, i64 0))
%25 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), [256 x i8]* %1)
%26 = call i32 (i8*, ...) bitcast (i32 (...)* @atof to i32 (i8*, ...)*)(i8* %5)
%27 = icmp slt i32 %26, 1
br i1 %27, label %23, label %28
28: ; preds = %23
%29 = call i32 @putchar(i32 10)
br label %30
30: ; preds = %30, %28
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str.7, 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 (i8*, ...) bitcast (i32 (...)* @atof to i32 (i8*, ...)*)(i8* %5)
br label %30
}