#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 */
double fabs(double);
double fgamma(int, double);
double fgamma_pyquante(int, int);
int /*<<< orphan*/ fgamma_set(int, int, double *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ time_str(int, char *);
int main(int argc, char *argv[]) {
  int m, i, j, k, l;
  double maxerr, err;
  double fset[20];
  char str[256];
  printf("Testing FGamma using PyQuante by Richard Muller as references\n");
  printf("Case 1: double fgamma(int m, double x);\n");
  for (m = 0; m <= 15; m++) {
    maxerr = 0.0;
    for (i = 0; i < 100000; i++) {
      err = fgamma_pyquante(m, i / 1000.) - fgamma(m, i / 1000.);
      err = fabs(err);
      if (err > maxerr)
        maxerr = err;
    }
    printf("m = %2d maxerr = %20.8E\n", m, maxerr);
  }
  printf("Case 2: void fgamma_set(int max, double x);\n");
  for (m = 0; m <= 15; m++) {
    maxerr = 0.0;
    for (i = 0; i < 100000; i++) {
      fgamma_set(19, i / 1000., fset);
      err = fgamma_pyquante(m, i / 1000.) - fset[m];
      err = fabs(err);
      if (err > maxerr)
        maxerr = err;
    }
    printf("m = %2d maxerr = %20.8E\n", m, maxerr);
  }
  printf("Evaluate fgamma(0,...) 100,000,000 times\n");
  time_str(256, str);
  printf("Start: %s\n", str);
  m = 100;
  err = 0.0;
  for (i = 0; i < m; i++)
    for (j = 0; j < m; j++)
      for (k = 0; k < m; k++)
        for (l = 0; l < m; l++) {
          err += fgamma(0, err);
        }
  time_str(256, str);
  printf("Done:  %s\n", str);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1f0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xea8(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0xf,-0x14(%rbp)
jg     126a <main+0x11a>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0x186a0,-0x18(%rbp)
jge    1246 <main+0xf6>
mov    -0x14(%rbp),%edi
cvtsi2sdl -0x18(%rbp),%xmm0
movsd  0xe4e(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%esi
call   1060 <fgamma_pyquante@plt>
movsd  %xmm0,-0x1e8(%rbp)
ff
mov    -0x14(%rbp),%edi
cvtsi2sdl -0x18(%rbp),%xmm0
movsd  0xe29(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1070 <fgamma@plt>
movaps %xmm0,%xmm1
movsd  -0x1e8(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
movaps 0xdf0(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
ucomisd -0x30(%rbp),%xmm0
jbe    1233 <main+0xe3>
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
jmp    1238 <main+0xe8>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11a5 <main+0x55>
mov    -0x14(%rbp),%esi
movsd  -0x30(%rbp),%xmm0
lea    0xe2b(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    118c <main+0x3c>
lea    0xe28(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0xf,-0x14(%rbp)
jg     1360 <main+0x210>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0x186a0,-0x18(%rbp)
jge    133c <main+0x1ec>
cvtsi2sdl -0x18(%rbp),%xmm0
movsd  0xd5e(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%esi
lea    -0xe0(%rbp),%rdx
mov    $0x13,%edi
call   1030 <fgamma_set@plt>
mov    -0x14(%rbp),%edi
cvtsi2sdl -0x18(%rbp),%xmm0
movsd  0xd35(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%esi
call   1060 <fgamma_pyquante@plt>
movslq -0x14(%rbp),%rax
subsd  -0xe0(%rbp,%rax,8),%xmm0
ff ff
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
movaps 0xcfa(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
ucomisd -0x30(%rbp),%xmm0
jbe    1329 <main+0x1d9>
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
jmp    132e <main+0x1de>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1298 <main+0x148>
mov    -0x14(%rbp),%esi
movsd  -0x30(%rbp),%xmm0
lea    0xd35(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    127f <main+0x12f>
lea    0xd5f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x1e0(%rbp),%rsi
mov    $0x100,%edi
call   1040 <time_str@plt>
lea    -0x1e0(%rbp),%rsi
lea    0xd63(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x64,-0x14(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    144c <main+0x2fc>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1439 <main+0x2e9>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1426 <main+0x2d6>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1413 <main+0x2c3>
movsd  -0x38(%rbp),%xmm0
xor    %edi,%edi
call   1070 <fgamma@plt>
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    13e3 <main+0x293>
jmp    1418 <main+0x2c8>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    13d0 <main+0x280>
jmp    142b <main+0x2db>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    13bd <main+0x26d>
jmp    143e <main+0x2ee>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    13aa <main+0x25a>
lea    -0x1e0(%rbp),%rsi
mov    $0x100,%edi
call   1040 <time_str@plt>
lea    -0x1e0(%rbp),%rsi
lea    0xc90(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x1e0,%rsp
lea    0xed9(%rip),%rdi
call   1040 <puts@plt>
lea    0xf0b(%rip),%rdi
call   1040 <puts@plt>
xor    %ebx,%ebx
lea    0xe90(%rip),%r14
xorps  %xmm2,%xmm2
mov    $0x186a0,%ebp
xorpd  %xmm1,%xmm1
nopl   0x0(%rax)
movapd %xmm1,0x10(%rsp)
movsd  %xmm2,0x8(%rsp)
divsd  0xe4c(%rip),%xmm1
movsd  %xmm1,0x28(%rsp)
cvttsd2si %xmm1,%esi
mov    %ebx,%edi
call   1070 <fgamma_pyquante@plt>
movaps %xmm0,0x30(%rsp)
mov    %ebx,%edi
movsd  0x28(%rsp),%xmm0
call   1080 <fgamma@plt>
movapd 0x30(%rsp),%xmm2
movapd 0x10(%rsp),%xmm1
subsd  %xmm0,%xmm2
andpd  0xe21(%rip),%xmm2
maxsd  0x8(%rsp),%xmm2
addsd  0xe0b(%rip),%xmm1
add    $0xffffffff,%ebp
jne    11a0 <main+0x40>
mov    %r14,%rdi
mov    %ebx,%esi
movapd %xmm2,%xmm0
mov    $0x1,%al
call   1060 <printf@plt>
add    $0x1,%ebx
cmp    $0x10,%ebx
jne    1190 <main+0x30>
lea    0xe90(%rip),%rdi
call   1040 <puts@plt>
xor    %r12d,%r12d
lea    0x40(%rsp),%r14
lea    0xde7(%rip),%r15
nopl   0x0(%rax)
xorpd  %xmm0,%xmm0
mov    $0x186a0,%ebx
xorpd  %xmm2,%xmm2
nopl   (%rax)
movapd %xmm2,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
movapd %xmm2,%xmm0
divsd  0xd98(%rip),%xmm0
cvttsd2si %xmm0,%ebp
mov    $0x13,%edi
mov    %ebp,%esi
mov    %r14,%rdx
call   1030 <fgamma_set@plt>
mov    %r12d,%edi
mov    %ebp,%esi
call   1070 <fgamma_pyquante@plt>
movapd 0x10(%rsp),%xmm2
subsd  0x40(%rsp,%r12,8),%xmm0
andpd  0xd76(%rip),%xmm0
maxsd  0x8(%rsp),%xmm0
addsd  0xd60(%rip),%xmm2
add    $0xffffffff,%ebx
jne    1250 <main+0xf0>
mov    %r15,%rdi
mov    %r12d,%esi
mov    $0x1,%al
call   1060 <printf@plt>
add    $0x1,%r12
cmp    $0x10,%r12
jne    1240 <main+0xe0>
lea    0xe12(%rip),%rdi
call   1040 <puts@plt>
lea    0xe0(%rsp),%rbx
mov    $0x100,%edi
mov    %rbx,%rsi
call   1050 <time_str@plt>
lea    0xd49(%rip),%rdi
xor    %r14d,%r14d
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
xorpd  %xmm0,%xmm0
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x64,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
movsd  %xmm0,0x10(%rsp)
xor    %edi,%edi
call   1080 <fgamma@plt>
addsd  0x10(%rsp),%xmm0
add    $0xffffffff,%ebx
jne    1340 <main+0x1e0>
add    $0x1,%ebp
cmp    $0x64,%ebp
jne    1330 <main+0x1d0>
add    $0x1,%r15d
cmp    $0x64,%r15d
jne    1320 <main+0x1c0>
add    $0x1,%r14d
cmp    $0x64,%r14d
jne    1310 <main+0x1b0>
lea    0xe0(%rsp),%rbx
mov    $0x100,%edi
mov    %rbx,%rsi
call   1050 <time_str@plt>
lea    0xcb4(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %eax,%eax
add    $0x1e0,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [63 x i8] c"Testing FGamma using PyQuante by Richard Muller as references\0A\00"
@.str.1 = [41 x i8] c"Case 1: double fgamma(int m, double x);\0A\00"
@.str.2 = [25 x i8] c"m = %2d maxerr = %20.8E\0A\00"
@.str.3 = [45 x i8] c"Case 2: void fgamma_set(int max, double x);\0A\00"
@.str.4 = [42 x i8] c"Evaluate fgamma(0,...) 100,000,000 times\0A\00"
@.str.5 = [11 x i8] c"Start: %s\0A\00"
@.str.6 = [11 x i8] c"Done: %s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca double
%12 = alloca double
%13 = alloca [20 x double]
%14 = alloca [256 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0))
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %6
br label %17
17: ; preds = %52, %2
%18 = load i32, i32* %6
%19 = icmp sle i32 %18, 15
br i1 %19, label %20, label %55
20: ; preds = %17
store double 0.000000e+00, double* %11
store i32 0, i32* %7
br label %21
21: ; preds = %45, %20
%22 = load i32, i32* %7
%23 = icmp slt i32 %22, 100000
br i1 %23, label %24, label %48
24: ; preds = %21
%25 = load i32, i32* %6
%26 = load i32, i32* %7
%27 = sitofp i32 %26 to double
%28 = fdiv double %27, 1.000000e+03
%29 = fptosi double %28 to i32
%30 = call double @fgamma_pyquante(i32 %25, i32 %29)
%31 = load i32, i32* %6
%32 = load i32, i32* %7
%33 = sitofp i32 %32 to double
%34 = fdiv double %33, 1.000000e+03
%35 = call double @fgamma(i32 %31, double %34)
%36 = fsub double %30, %35
store double %36, double* %12
%37 = load double, double* %12
%38 = call double @llvm.fabs.f64(double %37)
store double %38, double* %12
%39 = load double, double* %12
%40 = load double, double* %11
%41 = fcmp ogt double %39, %40
br i1 %41, label %42, label %44
42: ; preds = %24
%43 = load double, double* %12
store double %43, double* %11
br label %44
44: ; preds = %42, %24
br label %45
45: ; preds = %44
%46 = load i32, i32* %7
%47 = add nsw i32 %46, 1
store i32 %47, i32* %7
br label %21
48: ; preds = %21
%49 = load i32, i32* %6
%50 = load double, double* %11
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %49, double %50)
br label %52
52: ; preds = %48
%53 = load i32, i32* %6
%54 = add nsw i32 %53, 1
store i32 %54, i32* %6
br label %17
55: ; preds = %17
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %6
br label %57
57: ; preds = %97, %55
%58 = load i32, i32* %6
%59 = icmp sle i32 %58, 15
br i1 %59, label %60, label %100
60: ; preds = %57
store double 0.000000e+00, double* %11
store i32 0, i32* %7
br label %61
61: ; preds = %90, %60
%62 = load i32, i32* %7
%63 = icmp slt i32 %62, 100000
br i1 %63, label %64, label %93
64: ; preds = %61
%65 = load i32, i32* %7
%66 = sitofp i32 %65 to double
%67 = fdiv double %66, 1.000000e+03
%68 = fptosi double %67 to i32
%69 = getelementptr inbounds [20 x double], [20 x double]* %13, i64 0, i64 0
%70 = call i32 @fgamma_set(i32 19, i32 %68, double* %69)
%71 = load i32, i32* %6
%72 = load i32, i32* %7
%73 = sitofp i32 %72 to double
%74 = fdiv double %73, 1.000000e+03
%75 = fptosi double %74 to i32
%76 = call double @fgamma_pyquante(i32 %71, i32 %75)
%77 = load i32, i32* %6
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds [20 x double], [20 x double]* %13, i64 0, i64 %78
%80 = load double, double* %79
%81 = fsub double %76, %80
store double %81, double* %12
%82 = load double, double* %12
%83 = call double @llvm.fabs.f64(double %82)
store double %83, double* %12
%84 = load double, double* %12
%85 = load double, double* %11
%86 = fcmp ogt double %84, %85
br i1 %86, label %87, label %89
87: ; preds = %64
%88 = load double, double* %12
store double %88, double* %11
br label %89
89: ; preds = %87, %64
br label %90
90: ; preds = %89
%91 = load i32, i32* %7
%92 = add nsw i32 %91, 1
store i32 %92, i32* %7
br label %61
93: ; preds = %61
%94 = load i32, i32* %6
%95 = load double, double* %11
%96 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %94, double %95)
br label %97
97: ; preds = %93
%98 = load i32, i32* %6
%99 = add nsw i32 %98, 1
store i32 %99, i32* %6
br label %57
100: ; preds = %57
%101 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.4, i64 0, i64 0))
%102 = getelementptr inbounds [256 x i8], [256 x i8]* %14, i64 0, i64 0
%103 = call i32 @time_str(i32 256, i8* %102)
%104 = getelementptr inbounds [256 x i8], [256 x i8]* %14, i64 0, i64 0
%105 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i8* %104)
store i32 100, i32* %6
store double 0.000000e+00, double* %12
store i32 0, i32* %7
br label %106
106: ; preds = %142, %100
%107 = load i32, i32* %7
%108 = load i32, i32* %6
%109 = icmp slt i32 %107, %108
br i1 %109, label %110, label %145
110: ; preds = %106
store i32 0, i32* %8
br label %111
111: ; preds = %138, %110
%112 = load i32, i32* %8
%113 = load i32, i32* %6
%114 = icmp slt i32 %112, %113
br i1 %114, label %115, label %141
115: ; preds = %111
store i32 0, i32* %9
br label %116
116: ; preds = %134, %115
%117 = load i32, i32* %9
%118 = load i32, i32* %6
%119 = icmp slt i32 %117, %118
br i1 %119, label %120, label %137
120: ; preds = %116
store i32 0, i32* %10
br label %121
121: ; preds = %130, %120
%122 = load i32, i32* %10
%123 = load i32, i32* %6
%124 = icmp slt i32 %122, %123
br i1 %124, label %125, label %133
125: ; preds = %121
%126 = load double, double* %12
%127 = call double @fgamma(i32 0, double %126)
%128 = load double, double* %12
%129 = fadd double %128, %127
store double %129, double* %12
br label %130
130: ; preds = %125
%131 = load i32, i32* %10
%132 = add nsw i32 %131, 1
store i32 %132, i32* %10
br label %121
133: ; preds = %121
br label %134
134: ; preds = %133
%135 = load i32, i32* %9
%136 = add nsw i32 %135, 1
store i32 %136, i32* %9
br label %116
137: ; preds = %116
br label %138
138: ; preds = %137
%139 = load i32, i32* %8
%140 = add nsw i32 %139, 1
store i32 %140, i32* %8
br label %111
141: ; preds = %111
br label %142
142: ; preds = %141
%143 = load i32, i32* %7
%144 = add nsw i32 %143, 1
store i32 %144, i32* %7
br label %106
145: ; preds = %106
%146 = getelementptr inbounds [256 x i8], [256 x i8]* %14, i64 0, i64 0
%147 = call i32 @time_str(i32 256, i8* %146)
%148 = getelementptr inbounds [256 x i8], [256 x i8]* %14, i64 0, i64 0
%149 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i8* %148)
%150 = load i32, i32* %3
ret i32 %150
}

LLVM IR (-O2):
@.str.2 = [25 x i8] c"m = %2d maxerr = %20.8E\0A\00"
@.str.5 = [11 x i8] c"Start: %s\0A\00"
@.str.6 = [11 x i8] c"Done: %s\0A\00"
@str = [62 x i8] c"Testing FGamma using PyQuante by Richard Muller as references\00"
@str.7 = [40 x i8] c"Case 1: double fgamma(int m, double x);\00"
@str.8 = [44 x i8] c"Case 2: void fgamma_set(int max, double x);\00"
@str.9 = [41 x i8] c"Evaluate fgamma(0,...) 100,000,000 times\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [20 x double]
%4 = alloca [256 x i8]
%5 = bitcast [20 x double]* %3 to i8*
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.7, i64 0, i64 0))
br label %9
9: ; preds = %2, %25
%10 = phi i32 [ 0, %2 ], [ %27, %25 ]
br label %11
11: ; preds = %9, %11
%12 = phi double [ 0.000000e+00, %9 ], [ %22, %11 ]
%13 = phi i32 [ 0, %9 ], [ %23, %11 ]
%14 = sitofp i32 %13 to double
%15 = fdiv double %14, 1.000000e+03
%16 = fptosi double %15 to i32
%17 = tail call double @fgamma_pyquante(i32 %10, i32 %16)
%18 = tail call double @fgamma(i32 %10, double %15)
%19 = fsub double %17, %18
%20 = tail call double @llvm.fabs.f64(double %19)
%21 = fcmp ogt double %20, %12
%22 = select i1 %21, double %20, double %12
%23 = add nuw nsw i32 %13, 1
%24 = icmp eq i32 %23, 100000
br i1 %24, label %25, label %11
25: ; preds = %11
%26 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %10, double %22)
%27 = add nuw nsw i32 %10, 1
%28 = icmp eq i32 %27, 16
br i1 %28, label %29, label %9
29: ; preds = %25
%30 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @str.8, i64 0, i64 0))
%31 = getelementptr inbounds [20 x double], [20 x double]* %3, i64 0, i64 0
br label %32
32: ; preds = %29, %51
%33 = phi i64 [ 0, %29 ], [ %54, %51 ]
%34 = getelementptr inbounds [20 x double], [20 x double]* %3, i64 0, i64 %33
%35 = trunc i64 %33 to i32
br label %36
36: ; preds = %32, %36
%37 = phi double [ 0.000000e+00, %32 ], [ %48, %36 ]
%38 = phi i32 [ 0, %32 ], [ %49, %36 ]
%39 = sitofp i32 %38 to double
%40 = fdiv double %39, 1.000000e+03
%41 = fptosi double %40 to i32
%42 = call i32 @fgamma_set(i32 19, i32 %41, double* %31)
%43 = call double @fgamma_pyquante(i32 %35, i32 %41)
%44 = load double, double* %34
%45 = fsub double %43, %44
%46 = call double @llvm.fabs.f64(double %45)
%47 = fcmp ogt double %46, %37
%48 = select i1 %47, double %46, double %37
%49 = add nuw nsw i32 %38, 1
%50 = icmp eq i32 %49, 100000
br i1 %50, label %51, label %36
51: ; preds = %36
%52 = trunc i64 %33 to i32
%53 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0), i32 %52, double %48)
%54 = add nuw nsw i64 %33, 1
%55 = icmp eq i64 %54, 16
br i1 %55, label %56, label %32
56: ; preds = %51
%57 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.9, i64 0, i64 0))
%58 = call i32 @time_str(i32 256, i8* %6)
%59 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i8* %6)
br label %60
60: ; preds = %56, %82
%61 = phi double [ 0.000000e+00, %56 ], [ %73, %82 ]
%62 = phi i32 [ 0, %56 ], [ %83, %82 ]
br label %63
63: ; preds = %60, %79
%64 = phi double [ %61, %60 ], [ %73, %79 ]
%65 = phi i32 [ 0, %60 ], [ %80, %79 ]
br label %66
66: ; preds = %63, %76
%67 = phi double [ %64, %63 ], [ %73, %76 ]
%68 = phi i32 [ 0, %63 ], [ %77, %76 ]
br label %69
69: ; preds = %66, %69
%70 = phi double [ %67, %66 ], [ %73, %69 ]
%71 = phi i32 [ 0, %66 ], [ %74, %69 ]
%72 = call double @fgamma(i32 0, double %70)
%73 = fadd double %70, %72
%74 = add nuw nsw i32 %71, 1
%75 = icmp eq i32 %74, 100
br i1 %75, label %76, label %69
76: ; preds = %69
%77 = add nuw nsw i32 %68, 1
%78 = icmp eq i32 %77, 100
br i1 %78, label %79, label %66
79: ; preds = %76
%80 = add nuw nsw i32 %65, 1
%81 = icmp eq i32 %80, 100
br i1 %81, label %82, label %63
82: ; preds = %79
%83 = add nuw nsw i32 %62, 1
%84 = icmp eq i32 %83, 100
br i1 %84, label %85, label %60
85: ; preds = %82
%86 = call i32 @time_str(i32 256, i8* %6)
%87 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i8* %6)
ret i32 0
}