#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 */
scalar_t__ RAND_MAX;
int /*<<< orphan*/ array_set(double *, int, int);
int atoi(char *);
double digit_reverse(int, int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, ...);
scalar_t__ rand();
int /*<<< orphan*/ srand(unsigned int);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcmp(char *, char *);
scalar_t__ strncmp(char *, char *, int);
scalar_t__ time(int /*<<< orphan*/ *);
void array_load(double *array, int n, char *loadtype) {
  static char *err = "array_load:  ";
  int i, base;
  static int randomized = 0;
  if (!strcmp(loadtype, "all_one")) {
    array_set(array, n, 0.);
    return;
  }
  if (!strcmp(loadtype, "random")) {
    if (!randomized) {
      srand((unsigned)time(NULL));
      rand();
      randomized = 1;
    }
    for (i = 0; i < n; i++)
      array[i] = (double)rand() / ((double)RAND_MAX + 1.);
    return;
  }
  if (!strcmp(loadtype, "uniform")) {
    for (i = 0; i < n; i++)
      array[i] = (double)i / n;
    return;
  }
  if (strncmp(loadtype, "hbase", 5)) {
    fprintf(stderr, "%sUnknown load type %s.\n", err, loadtype);
    return;
  }
  base = atoi(loadtype[5] == '_' ? &loadtype[6] : &loadtype[5]);
  if (base < 2) {
    fprintf(stderr, "%sBad Hammersley base %d.\n", err, base);
    return;
  }
  for (i = 0; i < n; i++) {
    array[i] = digit_reverse((i + base - 1) % n, base);
  }
}


x86 assembly (clang, -O0):
<array_load>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xe68(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    11cf <array_load+0x3f>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
xor    %edx,%edx
call   1090 <array_set@plt>
jmp    13c0 <array_load+0x230>
mov    -0x18(%rbp),%rdi
lea    0xe44(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    1271 <array_load+0xe1>
cmpl   $0x0,0x2e89(%rip)
jne    1216 <array_load+0x86>
xor    %eax,%eax
mov    %eax,%edi
call   1080 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
mov    $0x0,%al
call   10b0 <rand@plt>
movl   $0x1,0x2e62(%rip)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    126c <array_load+0xdc>
mov    $0x0,%al
call   10b0 <rand@plt>
cvtsi2sd %rax,%xmm0
mov    0x2dac(%rip),%rax
cvtsi2sdq (%rax),%xmm1
movsd  0xdb7(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    121d <array_load+0x8d>
jmp    13c0 <array_load+0x230>
mov    -0x18(%rbp),%rdi
lea    0xda9(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    12cb <array_load+0x13b>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    12c6 <array_load+0x136>
cvtsi2sdl -0x1c(%rbp),%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
divsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1291 <array_load+0x101>
jmp    13c0 <array_load+0x230>
mov    -0x18(%rbp),%rdi
lea    0xd57(%rip),%rsi
mov    $0x5,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
je     1311 <array_load+0x181>
mov    0x2ce7(%rip),%rax
mov    (%rax),%edi
mov    0x2d6e(%rip),%rdx
mov    -0x18(%rbp),%rcx
lea    0xd2e(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    13c0 <array_load+0x230>
mov    -0x18(%rbp),%rax
movsbl 0x5(%rax),%eax
cmp    $0x5f,%eax
jne    1333 <array_load+0x1a3>
mov    -0x18(%rbp),%rax
add    $0x6,%rax
mov    %rax,-0x28(%rbp)
jmp    133f <array_load+0x1af>
mov    -0x18(%rbp),%rax
add    $0x5,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
call   10a0 <atoi@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0x2,-0x20(%rbp)
jge    137b <array_load+0x1eb>
mov    0x2c7c(%rip),%rax
mov    (%rax),%edi
mov    0x2d03(%rip),%rdx
mov    -0x20(%rbp),%ecx
lea    0xcdd(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    13c0 <array_load+0x230>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    13c0 <array_load+0x230>
mov    -0x1c(%rbp),%eax
add    -0x20(%rbp),%eax
sub    $0x1,%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,%edi
mov    -0x20(%rbp),%esi
call   1040 <digit_reverse@plt>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1382 <array_load+0x1f2>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<array_load>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdx,%rbp
mov    %esi,%r14d
mov    %rdi,%r13
lea    0xea3(%rip),%rsi
mov    %rdx,%rdi
call   1060 <strcmp@plt>
test   %eax,%eax
je     1230 <array_load+0xa0>
mov    %r14d,%r15d
lea    0xe95(%rip),%rsi
mov    %rbp,%rdi
call   1060 <strcmp@plt>
test   %eax,%eax
je     124b <array_load+0xbb>
lea    0xe89(%rip),%rsi
mov    %rbp,%rdi
call   1060 <strcmp@plt>
test   %eax,%eax
je     12c9 <array_load+0x139>
lea    0xe7a(%rip),%rsi
mov    %rbp,%rdi
mov    $0x5,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     12e4 <array_load+0x154>
mov    0x2dd0(%rip),%rax
mov    (%rax),%edi
lea    0xe5a(%rip),%rsi
lea    0xe28(%rip),%rdx
mov    %rbp,%rcx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1070 <fprintf@plt>
mov    %r13,%rdi
mov    %r14d,%esi
xor    %edx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1090 <array_set@plt>
cmpb   $0x0,0x2e1e(%rip)
jne    1270 <array_load+0xe0>
xor    %edi,%edi
call   1080 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
xor    %eax,%eax
call   10b0 <rand@plt>
movb   $0x1,0x2e00(%rip)
test   %r14d,%r14d
jle    143b <array_load+0x2ab>
mov    0x2d68(%rip),%rbp
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   10b0 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
xorps  %xmm1,%xmm1
cvtsi2sdq 0x0(%rbp),%xmm1
addsd  0xd50(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,0x0(%r13,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1290 <array_load+0x100>
jmp    143b <array_load+0x2ab>
test   %r14d,%r14d
jle    143b <array_load+0x2ab>
cvtsi2sd %r14d,%xmm0
cmp    $0x1,%r14d
jne    1334 <array_load+0x1a4>
xor    %eax,%eax
jmp    1420 <array_load+0x290>
lea    0x5(%rbp),%rdi
lea    0x6(%rbp),%rax
cmpb   $0x5f,0x5(%rbp)
cmove  %rax,%rdi
call   10a0 <atoi@plt>
mov    %eax,%r12d
cmp    $0x2,%eax
jge    13ba <array_load+0x22a>
mov    0x2ccc(%rip),%rax
mov    (%rax),%edi
lea    0xd6f(%rip),%rsi
lea    0xd24(%rip),%rdx
mov    %r12d,%ecx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1070 <fprintf@plt>
mov    %r15d,%eax
and    $0xfffffffe,%eax
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
lea    -0x2(%rax),%rdx
mov    %rdx,%rcx
shr    %rcx
add    $0x1,%rcx
test   %rdx,%rdx
je     13f4 <array_load+0x264>
mov    %rcx,%rsi
and    $0xfffffffffffffffe,%rsi
movdqa 0xca8(%rip),%xmm2
xor    %edx,%edx
movdqa 0xcae(%rip),%xmm3
movdqa 0xcb6(%rip),%xmm4
nopw   0x0(%rax,%rax,1)
cvtdq2pd %xmm2,%xmm5
divpd  %xmm1,%xmm5
movupd %xmm5,0x0(%r13,%rdx,8)
movdqa %xmm2,%xmm5
paddd  %xmm3,%xmm5
cvtdq2pd %xmm5,%xmm5
divpd  %xmm1,%xmm5
movupd %xmm5,0x10(%r13,%rdx,8)
add    $0x4,%rdx
paddd  %xmm4,%xmm2
add    $0xfffffffffffffffe,%rsi
jne    1380 <array_load+0x1f0>
cvtdq2pd %xmm2,%xmm2
jmp    1402 <array_load+0x272>
test   %r14d,%r14d
jle    143b <array_load+0x2ab>
mov    %r12d,%r14d
add    $0xffffffff,%r14d
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
lea    (%r14,%rbp,1),%eax
cltd
idiv   %r15d
mov    %edx,%edi
mov    %r12d,%esi
call   1040 <digit_reverse@plt>
movsd  %xmm0,0x0(%r13,%rbp,8)
add    $0x1,%rbp
cmp    %rbp,%r15
jne    13d0 <array_load+0x240>
jmp    143b <array_load+0x2ab>
xorpd  %xmm2,%xmm2
movhpd 0xc00(%rip),%xmm2
xor    %edx,%edx
test   $0x1,%cl
je     1412 <array_load+0x282>
divpd  %xmm1,%xmm2
movupd %xmm2,0x0(%r13,%rdx,8)
cmp    %r15,%rax
je     143b <array_load+0x2ab>
nopw   0x0(%rax,%rax,1)
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x0(%r13,%rax,8)
add    $0x1,%rax
cmp    %rax,%r15
jne    1420 <array_load+0x290>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@array_load.err = internal global i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i32 0, i32 0)
@.str = [14 x i8] c"array_load: \00"
@array_load.randomized = internal global i32 0
@.str.1 = [8 x i8] c"all_one\00"
@.str.2 = [7 x i8] c"random\00"
@RAND_MAX = global i64 0
@.str.3 = [8 x i8] c"uniform\00"
@.str.4 = [6 x i8] c"hbase\00"
@stderr = global i32 0
@.str.5 = [25 x i8] c"%sUnknown load type %s.\0A\00"
@.str.6 = [27 x i8] c"%sBad Hammersley base %d.\0A\00"
define void @array_load(double* %0, i32 %1, i8* %2) {
%4 = alloca double*
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store double* %0, double** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%9 = load i8*, i8** %6
%10 = call i32 @strcmp(i8* %9, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%11 = icmp ne i32 %10, 0
br i1 %11, label %16, label %12
12: ; preds = %3
%13 = load double*, double** %4
%14 = load i32, i32* %5
%15 = call i32 @array_set(double* %13, i32 %14, i32 0)
br label %123
16: ; preds = %3
%17 = load i8*, i8** %6
%18 = call i32 @strcmp(i8* %17, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%19 = icmp ne i32 %18, 0
br i1 %19, label %48, label %20
20: ; preds = %16
%21 = load i32, i32* @array_load.randomized
%22 = icmp ne i32 %21, 0
br i1 %22, label %28, label %23
23: ; preds = %20
%24 = call i64 @time(i32* null)
%25 = trunc i64 %24 to i32
%26 = call i32 @srand(i32 %25)
%27 = call i64 (...) @rand()
store i32 1, i32* @array_load.randomized
br label %28
28: ; preds = %23, %20
store i32 0, i32* %7
br label %29
29: ; preds = %44, %28
%30 = load i32, i32* %7
%31 = load i32, i32* %5
%32 = icmp slt i32 %30, %31
br i1 %32, label %33, label %47
33: ; preds = %29
%34 = call i64 (...) @rand()
%35 = sitofp i64 %34 to double
%36 = load i64, i64* @RAND_MAX
%37 = sitofp i64 %36 to double
%38 = fadd double %37, 1.000000e+00
%39 = fdiv double %35, %38
%40 = load double*, double** %4
%41 = load i32, i32* %7
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds double, double* %40, i64 %42
store double %39, double* %43
br label %44
44: ; preds = %33
%45 = load i32, i32* %7
%46 = add nsw i32 %45, 1
store i32 %46, i32* %7
br label %29
47: ; preds = %29
br label %123
48: ; preds = %16
%49 = load i8*, i8** %6
%50 = call i32 @strcmp(i8* %49, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%51 = icmp ne i32 %50, 0
br i1 %51, label %71, label %52
52: ; preds = %48
store i32 0, i32* %7
br label %53
53: ; preds = %67, %52
%54 = load i32, i32* %7
%55 = load i32, i32* %5
%56 = icmp slt i32 %54, %55
br i1 %56, label %57, label %70
57: ; preds = %53
%58 = load i32, i32* %7
%59 = sitofp i32 %58 to double
%60 = load i32, i32* %5
%61 = sitofp i32 %60 to double
%62 = fdiv double %59, %61
%63 = load double*, double** %4
%64 = load i32, i32* %7
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds double, double* %63, i64 %65
store double %62, double* %66
br label %67
67: ; preds = %57
%68 = load i32, i32* %7
%69 = add nsw i32 %68, 1
store i32 %69, i32* %7
br label %53
70: ; preds = %53
br label %123
71: ; preds = %48
%72 = load i8*, i8** %6
%73 = call i64 @strncmp(i8* %72, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 5)
%74 = icmp ne i64 %73, 0
br i1 %74, label %75, label %80
75: ; preds = %71
%76 = load i32, i32* @stderr
%77 = load i8*, i8** @array_load.err
%78 = load i8*, i8** %6
%79 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %76, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), i8* %77, i8* %78)
br label %123
80: ; preds = %71
%81 = load i8*, i8** %6
%82 = getelementptr inbounds i8, i8* %81, i64 5
%83 = load i8, i8* %82
%84 = sext i8 %83 to i32
%85 = icmp eq i32 %84, 95
br i1 %85, label %86, label %89
86: ; preds = %80
%87 = load i8*, i8** %6
%88 = getelementptr inbounds i8, i8* %87, i64 6
br label %92
89: ; preds = %80
%90 = load i8*, i8** %6
%91 = getelementptr inbounds i8, i8* %90, i64 5
br label %92
92: ; preds = %89, %86
%93 = phi i8* [ %88, %86 ], [ %91, %89 ]
%94 = call i32 @atoi(i8* %93)
store i32 %94, i32* %8
%95 = load i32, i32* %8
%96 = icmp slt i32 %95, 2
br i1 %96, label %97, label %102
97: ; preds = %92
%98 = load i32, i32* @stderr
%99 = load i8*, i8** @array_load.err
%100 = load i32, i32* %8
%101 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %98, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0), i8* %99, i32 %100)
br label %123
102: ; preds = %92
store i32 0, i32* %7
br label %103
103: ; preds = %120, %102
%104 = load i32, i32* %7
%105 = load i32, i32* %5
%106 = icmp slt i32 %104, %105
br i1 %106, label %107, label %123
107: ; preds = %103
%108 = load i32, i32* %7
%109 = load i32, i32* %8
%110 = add nsw i32 %108, %109
%111 = sub nsw i32 %110, 1
%112 = load i32, i32* %5
%113 = srem i32 %111, %112
%114 = load i32, i32* %8
%115 = call double @digit_reverse(i32 %113, i32 %114)
%116 = load double*, double** %4
%117 = load i32, i32* %7
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds double, double* %116, i64 %118
store double %115, double* %119
br label %120
120: ; preds = %107
%121 = load i32, i32* %7
%122 = add nsw i32 %121, 1
store i32 %122, i32* %7
br label %103
123: ; preds = %12, %47, %70, %75, %97, %103
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"array_load: \00"
@array_load.randomized = internal unnamed_addr global i1 false
@.str.1 = [8 x i8] c"all_one\00"
@.str.2 = [7 x i8] c"random\00"
@RAND_MAX = global i64 0
@.str.3 = [8 x i8] c"uniform\00"
@.str.4 = [6 x i8] c"hbase\00"
@stderr = global i32 0
@.str.5 = [25 x i8] c"%sUnknown load type %s.\0A\00"
@.str.6 = [27 x i8] c"%sBad Hammersley base %d.\0A\00"
define void @array_load(double* %0, i32 %1, i8* %2) {
%4 = tail call i32 @strcmp(i8* dereferenceable(1) %2, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @array_set(double* %0, i32 %1, i32 0)
br label %124
8: ; preds = %3
%9 = tail call i32 @strcmp(i8* dereferenceable(1) %2, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %33
11: ; preds = %8
%12 = load i1, i1* @array_load.randomized
br i1 %12, label %18, label %13
13: ; preds = %11
%14 = tail call i64 @time(i32* null)
%15 = trunc i64 %14 to i32
%16 = tail call i32 @srand(i32 %15)
%17 = tail call i64 (...) @rand()
store i1 true, i1* @array_load.randomized
br label %18
18: ; preds = %13, %11
%19 = icmp sgt i32 %1, 0
br i1 %19, label %20, label %124
20: ; preds = %18
%21 = zext i32 %1 to i64
br label %22
22: ; preds = %20, %22
%23 = phi i64 [ 0, %20 ], [ %31, %22 ]
%24 = tail call i64 (...) @rand()
%25 = sitofp i64 %24 to double
%26 = load i64, i64* @RAND_MAX
%27 = sitofp i64 %26 to double
%28 = fadd double %27, 1.000000e+00
%29 = fdiv double %25, %28
%30 = getelementptr inbounds double, double* %0, i64 %23
store double %29, double* %30
%31 = add nuw nsw i64 %23, 1
%32 = icmp eq i64 %31, %21
br i1 %32, label %124, label %22
33: ; preds = %8
%34 = tail call i32 @strcmp(i8* dereferenceable(1) %2, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%35 = icmp eq i32 %34, 0
br i1 %35, label %36, label %93
36: ; preds = %33
%37 = icmp sgt i32 %1, 0
br i1 %37, label %38, label %124
38: ; preds = %36
%39 = sitofp i32 %1 to double
%40 = zext i32 %1 to i64
%41 = icmp eq i32 %1, 1
br i1 %41, label %83, label %42
42: ; preds = %38
%43 = and i64 %40, 4294967294
%44 = insertelement <2 x double> poison, double %39, i64 0
%45 = shufflevector <2 x double> %44, <2 x double> poison, <2 x i32> zeroinitializer
%46 = add nsw i64 %43, -2
%47 = lshr exact i64 %46, 1
%48 = add nuw i64 %47, 1
%49 = and i64 %48, 1
%50 = icmp eq i64 %46, 0
br i1 %50, label %73, label %51
51: ; preds = %42
%52 = and i64 %48, -2
br label %53
53: ; preds = %53, %51
%54 = phi i64 [ 0, %51 ], [ %67, %53 ]
%55 = phi <2 x i32> [ <i32 0, i32 1>, %51 ], [ %68, %53 ]
%56 = phi i64 [ 0, %51 ], [ %69, %53 ]
%57 = sitofp <2 x i32> %55 to <2 x double>
%58 = fdiv <2 x double> %57, %45
%59 = getelementptr inbounds double, double* %0, i64 %54
%60 = bitcast double* %59 to <2 x double>*
store <2 x double> %58, <2 x double>* %60
%61 = or i64 %54, 2
%62 = add <2 x i32> %55, <i32 2, i32 2>
%63 = sitofp <2 x i32> %62 to <2 x double>
%64 = fdiv <2 x double> %63, %45
%65 = getelementptr inbounds double, double* %0, i64 %61
%66 = bitcast double* %65 to <2 x double>*
store <2 x double> %64, <2 x double>* %66
%67 = add nuw i64 %54, 4
%68 = add <2 x i32> %55, <i32 4, i32 4>
%69 = add nuw i64 %56, 2
%70 = icmp eq i64 %69, %52
br i1 %70, label %71, label %53
71: ; preds = %53
%72 = sitofp <2 x i32> %68 to <2 x double>
br label %73
73: ; preds = %71, %42
%74 = phi i64 [ 0, %42 ], [ %67, %71 ]
%75 = phi <2 x double> [ <double 0.000000e+00, double 1.000000e+00>, %42 ], [ %72, %71 ]
%76 = icmp eq i64 %49, 0
br i1 %76, label %81, label %77
77: ; preds = %73
%78 = fdiv <2 x double> %75, %45
%79 = getelementptr inbounds double, double* %0, i64 %74
%80 = bitcast double* %79 to <2 x double>*
store <2 x double> %78, <2 x double>* %80
br label %81
81: ; preds = %73, %77
%82 = icmp eq i64 %43, %40
br i1 %82, label %124, label %83
83: ; preds = %38, %81
%84 = phi i64 [ 0, %38 ], [ %43, %81 ]
br label %85
85: ; preds = %83, %85
%86 = phi i64 [ %91, %85 ], [ %84, %83 ]
%87 = trunc i64 %86 to i32
%88 = sitofp i32 %87 to double
%89 = fdiv double %88, %39
%90 = getelementptr inbounds double, double* %0, i64 %86
store double %89, double* %90
%91 = add nuw nsw i64 %86, 1
%92 = icmp eq i64 %91, %40
br i1 %92, label %124, label %85
93: ; preds = %33
%94 = tail call i64 @strncmp(i8* %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 5)
%95 = icmp eq i64 %94, 0
br i1 %95, label %99, label %96
96: ; preds = %93
%97 = load i32, i32* @stderr
%98 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %97, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %2)
br label %124
99: ; preds = %93
%100 = getelementptr inbounds i8, i8* %2, i64 5
%101 = load i8, i8* %100
%102 = icmp eq i8 %101, 95
%103 = getelementptr inbounds i8, i8* %2, i64 6
%104 = select i1 %102, i8* %103, i8* %100
%105 = tail call i32 @atoi(i8* %104)
%106 = icmp slt i32 %105, 2
br i1 %106, label %112, label %107
107: ; preds = %99
%108 = icmp sgt i32 %1, 0
br i1 %108, label %109, label %124
109: ; preds = %107
%110 = add nsw i32 %105, -1
%111 = zext i32 %1 to i64
br label %115
112: ; preds = %99
%113 = load i32, i32* @stderr
%114 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %113, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %105)
br label %124
115: ; preds = %109, %115
%116 = phi i64 [ 0, %109 ], [ %122, %115 ]
%117 = trunc i64 %116 to i32
%118 = add i32 %110, %117
%119 = srem i32 %118, %1
%120 = tail call double @digit_reverse(i32 %119, i32 %105)
%121 = getelementptr inbounds double, double* %0, i64 %116
store double %120, double* %121
%122 = add nuw nsw i64 %116, 1
%123 = icmp eq i64 %122, %111
br i1 %123, label %124, label %115
124: ; preds = %115, %85, %22, %81, %107, %36, %18, %112, %96, %6
ret void
}