#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 O_CREAT;
int O_TRUNC;
int O_WRONLY;
int S_IRGRP;
int S_IROTH;
int S_IRUSR;
int S_IWUSR;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ free(double *);
double *malloc(long);
int open(char *, int, int);
int /*<<< orphan*/ printf(char *, ...);
double randn();
int /*<<< orphan*/ snprintf(char *, int, char *, ...);
double sqrt(double);
int /*<<< orphan*/ srandom(int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
double strtod(char *, int /*<<< orphan*/ *);
long strtol(char *, int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int /*<<< orphan*/ write(int, ...);
int main(int argc, char *argv[]) {
  if (argc < 3) {
    fprintf(stderr, "usage: %s count radius^2 [dim]\n", argv[0]);
    exit(1);
  }
  long int count = strtol(argv[1], NULL, 0);
  double rsquared = strtod(argv[2], NULL);
  long int dim = 3;
  if (argc > 3)
    dim = strtol(argv[3], NULL, 0);
  srandom(time(NULL));
  int i, j;
  for (i = 0; i < count + 1; i++) {
    double *coords = malloc(dim * sizeof(double));
    double nmsq = 0.0;
    for (j = 0; j < dim; j++) {
      if (i < count)
        coords[j] = randn();
      else
        coords[j] = 0.0;
      nmsq += coords[j] * coords[j];
    }
    double nm2 = 0.0;
    if (i < count) {
      nm2 = sqrt(rsquared / nmsq);
      for (j = 0; j < dim; j++)
        coords[j] *= nm2;
    }
    coords[dim - 1] += 1.0;
    nmsq = 0.0;
    for (j = 0; j < dim - 1; j++) {
      nmsq += coords[j] * coords[j];
    }
    double nth = coords[dim - 1];
    printf("(");
    for (j = 0; j < dim; j++)
      printf("%8.3f ", coords[j]);
    printf(") d = %8.3f\n", sqrt(nmsq + (nth - 1) * (nth - 1)));
    char name[40];
    if (i < count)
      snprintf(name, 39, i < 10 ? "testfeature0%d" : "testfeature%d", i);
    else
      snprintf(name, 39, "queryfeature");
    int fd = open(name, O_CREAT | O_TRUNC | O_WRONLY,
                  S_IWUSR | S_IRUSR | S_IRGRP | S_IROTH);
    write(fd, &dim, sizeof(int));
    for (j = 0; j < dim; j++)
      write(fd, coords + j, sizeof(double));
    close(fd);
    free(coords);
  }
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    1239 <main+0x49>
mov    0x2dae(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xdde(%rip),%rsi
call   10a0 <fprintf@plt>
mov    $0x1,%edi
call   1110 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   10b0 <strtol@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <strtod@plt>
movsd  %xmm0,-0x20(%rbp)
movq   $0x3,-0x28(%rbp)
cmpl   $0x3,-0x8(%rbp)
jle    128f <main+0x9f>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   10b0 <strtol@plt>
mov    %rax,-0x28(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   10c0 <time@plt>
mov    %eax,%edi
call   1040 <srandom@plt>
movl   $0x0,-0x2c(%rbp)
movslq -0x2c(%rbp),%rax
mov    -0x18(%rbp),%rcx
add    $0x1,%rcx
cmp    %rcx,%rax
jge    1602 <main+0x412>
mov    -0x28(%rbp),%rdi
shl    $0x3,%rdi
call   10d0 <malloc@plt>
mov    %rax,-0x38(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
movl   $0x0,-0x30(%rbp)
movslq -0x30(%rbp),%rax
cmp    -0x28(%rbp),%rax
jge    135a <main+0x16a>
movslq -0x2c(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    1310 <main+0x120>
mov    $0x0,%al
call   10f0 <randn@plt>
mov    -0x38(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    1320 <main+0x130>
mov    -0x38(%rbp),%rax
movslq -0x30(%rbp),%rcx
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x38(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x40(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    12db <main+0xeb>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
movslq -0x2c(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    13c3 <main+0x1d3>
movsd  -0x20(%rbp),%xmm0
divsd  -0x40(%rbp),%xmm0
call   1100 <sqrt@plt>
movsd  %xmm0,-0x48(%rbp)
movl   $0x0,-0x30(%rbp)
movslq -0x30(%rbp),%rax
cmp    -0x28(%rbp),%rax
jge    13be <main+0x1ce>
movsd  -0x48(%rbp),%xmm0
mov    -0x38(%rbp),%rax
movslq -0x30(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    138b <main+0x19b>
jmp    13c3 <main+0x1d3>
mov    -0x38(%rbp),%rax
mov    -0x28(%rbp),%rcx
sub    $0x1,%rcx
movsd  0xc29(%rip),%xmm0
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
movl   $0x0,-0x30(%rbp)
movslq -0x30(%rbp),%rax
mov    -0x28(%rbp),%rcx
sub    $0x1,%rcx
cmp    %rcx,%rax
jge    143f <main+0x24f>
mov    -0x38(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x40(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    13f0 <main+0x200>
mov    -0x38(%rbp),%rax
mov    -0x28(%rbp),%rcx
sub    $0x1,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x50(%rbp)
lea    0xbcc(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0x0,-0x30(%rbp)
movslq -0x30(%rbp),%rax
cmp    -0x28(%rbp),%rax
jge    14a1 <main+0x2b1>
mov    -0x38(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xb9e(%rip),%rdi
mov    $0x1,%al
call   1070 <printf@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    146a <main+0x27a>
movsd  -0x40(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm0
movsd  0xb4d(%rip),%xmm2
subsd  %xmm2,%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  0xb3c(%rip),%xmm3
subsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1100 <sqrt@plt>
lea    0xb55(%rip),%rdi
mov    $0x1,%al
call   1070 <printf@plt>
movslq -0x2c(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    1521 <main+0x331>
lea    -0x80(%rbp),%rdi
mov    -0x2c(%rbp),%ecx
lea    0xb4e(%rip),%rdx
lea    0xb38(%rip),%rax
cmp    $0xa,%ecx
cmovl  %rax,%rdx
mov    -0x2c(%rbp),%ecx
mov    $0x27,%esi
mov    $0x0,%al
call   1080 <snprintf@plt>
jmp    1538 <main+0x348>
lea    -0x80(%rbp),%rdi
mov    $0x27,%esi
lea    0xb2a(%rip),%rdx
mov    $0x0,%al
call   1080 <snprintf@plt>
lea    -0x80(%rbp),%rdi
mov    0x2ab5(%rip),%rax
mov    (%rax),%esi
mov    0x2aa4(%rip),%rax
or     (%rax),%esi
mov    0x2a4b(%rip),%rax
or     (%rax),%esi
mov    0x2a7a(%rip),%rax
mov    (%rax),%edx
mov    0x2a49(%rip),%rax
or     (%rax),%edx
mov    0x2a50(%rip),%rax
or     (%rax),%edx
mov    0x2a3f(%rip),%rax
or     (%rax),%edx
call   10e0 <open@plt>
mov    %eax,-0x84(%rbp)
mov    -0x84(%rbp),%edi
lea    -0x28(%rbp),%rsi
mov    $0x4,%edx
mov    $0x0,%al
call   1060 <write@plt>
movl   $0x0,-0x30(%rbp)
movslq -0x30(%rbp),%rax
cmp    -0x28(%rbp),%rax
jge    15e0 <main+0x3f0>
mov    -0x84(%rbp),%edi
mov    -0x38(%rbp),%rsi
movslq -0x30(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rsi
mov    $0x8,%edx
mov    $0x0,%al
call   1060 <write@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    15a3 <main+0x3b3>
mov    -0x84(%rbp),%edi
call   1090 <close@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    12a6 <main+0xb6>
xor    %edi,%edi
call   1110 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %rsi,%rbx
cmp    $0x2,%edi
jg     1238 <main+0x38>
mov    0x2dab(%rip),%rax
mov    (%rax),%edi
mov    (%rbx),%rdx
lea    0xdef(%rip),%rsi
call   10b0 <fprintf@plt>
mov    $0x1,%edi
call   1120 <exit@plt>
mov    %edi,%ebp
mov    0x8(%rbx),%rdi
xor    %esi,%esi
xor    %edx,%edx
call   10c0 <strtol@plt>
mov    %rax,%r12
mov    0x10(%rbx),%rdi
xor    %esi,%esi
call   1060 <strtod@plt>
movsd  %xmm0,0x18(%rsp)
movq   $0x3,(%rsp)
mov    $0x3,%r13d
cmp    $0x3,%ebp
je     1282 <main+0x82>
mov    0x18(%rbx),%rdi
xor    %esi,%esi
xor    %edx,%edx
call   10c0 <strtol@plt>
mov    %rax,%r13
mov    %rax,(%rsp)
xor    %edi,%edi
call   10d0 <time@plt>
mov    %eax,%edi
call   1050 <srandom@plt>
test   %r12,%r12
jns    129c <main+0x9c>
xor    %edi,%edi
call   1120 <exit@plt>
lea    0xd95(%rip),%rbp
xor    %r14d,%r14d
cs nopw 0x0(%rax,%rax,1)
lea    0x0(,%r13,8),%rdi
call   10e0 <malloc@plt>
mov    %rax,%r15
xorpd  %xmm1,%xmm1
test   %r13,%r13
jle    1310 <main+0x110>
xor    %ebx,%ebx
jmp    12e7 <main+0xe7>
nopl   (%rax)
movsd  %xmm0,(%r15,%rbx,8)
mulsd  %xmm0,%xmm0
addsd  %xmm0,%xmm1
add    $0x1,%rbx
cmp    %rbx,%r13
jle    1310 <main+0x110>
xorpd  %xmm0,%xmm0
cmp    %r14,%r12
jle    12d0 <main+0xd0>
xor    %eax,%eax
movsd  %xmm1,0x10(%rsp)
call   1100 <randn@plt>
movsd  0x10(%rsp),%xmm1
mov    (%rsp),%r13
jmp    12d0 <main+0xd0>
nopl   0x0(%rax)
cmp    %r14,%r12
jle    1469 <main+0x269>
movsd  0x18(%rsp),%xmm0
divsd  %xmm1,%xmm0
ucomisd 0xce5(%rip),%xmm0
jb     1340 <main+0x140>
sqrtsd %xmm0,%xmm0
jmp    1345 <main+0x145>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
call   1110 <sqrt@plt>
mov    (%rsp),%r13
test   %r13,%r13
jle    135b <main+0x15b>
cmp    $0x4,%r13
jae    138b <main+0x18b>
xor    %eax,%eax
jmp    1450 <main+0x250>
movsd  -0x8(%r15,%r13,8),%xmm0
addsd  0xc96(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  %xmm0,-0x8(%r15,%r13,8)
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x8(%rsp)
lea    0x20(%rsp),%r13
jmp    154c <main+0x34c>
mov    %r13,%rax
and    $0xfffffffffffffffc,%rax
movapd %xmm0,%xmm1
unpcklpd %xmm0,%xmm1
lea    -0x4(%rax),%rdx
mov    %rdx,%rcx
shr    $0x2,%rcx
add    $0x1,%rcx
test   %rdx,%rdx
je     1417 <main+0x217>
mov    %rcx,%rsi
and    $0xfffffffffffffffe,%rsi
xor    %edx,%edx
nopw   0x0(%rax,%rax,1)
movupd (%r15,%rdx,8),%xmm2
movupd 0x10(%r15,%rdx,8),%xmm3
movupd 0x20(%r15,%rdx,8),%xmm4
movupd 0x30(%r15,%rdx,8),%xmm5
mulpd  %xmm1,%xmm2
mulpd  %xmm1,%xmm3
movupd %xmm2,(%r15,%rdx,8)
movupd %xmm3,0x10(%r15,%rdx,8)
mulpd  %xmm1,%xmm4
mulpd  %xmm1,%xmm5
movupd %xmm4,0x20(%r15,%rdx,8)
movupd %xmm5,0x30(%r15,%rdx,8)
add    $0x8,%rdx
add    $0xfffffffffffffffe,%rsi
jne    13c0 <main+0x1c0>
test   $0x1,%cl
jne    141e <main+0x21e>
jmp    1464 <main+0x264>
xor    %edx,%edx
test   $0x1,%cl
je     1464 <main+0x264>
movupd (%r15,%rdx,8),%xmm2
movupd 0x10(%r15,%rdx,8),%xmm3
mulpd  %xmm1,%xmm2
mulpd  %xmm1,%xmm3
movupd %xmm2,(%r15,%rdx,8)
movupd %xmm3,0x10(%r15,%rdx,8)
jmp    1464 <main+0x264>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  (%r15,%rax,8),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%r15,%rax,8)
add    $0x1,%rax
cmp    %rax,%r13
jne    1450 <main+0x250>
movsd  -0x8(%r15,%r13,8),%xmm0
addsd  0xb88(%rip),%xmm0
movsd  %xmm0,-0x8(%r15,%r13,8)
cmp    $0x2,%r13
movsd  %xmm0,0x10(%rsp)
jl     14b0 <main+0x2b0>
lea    -0x1(%r13),%rcx
add    $0xfffffffffffffffe,%r13
mov    %ecx,%eax
and    $0x3,%eax
cmp    $0x3,%r13
jae    14d0 <main+0x2d0>
xorpd  %xmm2,%xmm2
xor    %edx,%edx
lea    0x20(%rsp),%r13
jmp    1524 <main+0x324>
nopl   0x0(%rax,%rax,1)
xorpd  %xmm1,%xmm1
movsd  %xmm1,0x8(%rsp)
lea    0x20(%rsp),%r13
jmp    154c <main+0x34c>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
and    $0xfffffffffffffffc,%rcx
xorpd  %xmm2,%xmm2
xor    %edx,%edx
lea    0x20(%rsp),%r13
nop
movsd  (%r15,%rdx,8),%xmm0
movsd  0x8(%r15,%rdx,8),%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%r15,%rdx,8),%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  0x18(%r15,%rdx,8),%xmm2
mulsd  %xmm2,%xmm2
addsd  %xmm0,%xmm2
add    $0x4,%rdx
cmp    %rdx,%rcx
jne    14e0 <main+0x2e0>
test   %rax,%rax
je     1546 <main+0x346>
lea    (%r15,%rdx,8),%rcx
xor    %edx,%edx
nop
movsd  (%rcx,%rdx,8),%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm0,%xmm2
add    $0x1,%rdx
cmp    %rdx,%rax
jne    1530 <main+0x330>
movsd  %xmm2,0x8(%rsp)
mov    $0x28,%edi
call   1040 <putchar@plt>
cmpq   $0x0,(%rsp)
jle    157a <main+0x37a>
xor    %ebx,%ebx
nop
movsd  (%r15,%rbx,8),%xmm0
mov    %rbp,%rdi
mov    $0x1,%al
call   1080 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,(%rsp)
jg     1560 <main+0x360>
movsd  0x10(%rsp),%xmm0
addsd  0xa80(%rip),%xmm0
mulsd  %xmm0,%xmm0
addsd  0x8(%rsp),%xmm0
ucomisd 0xa76(%rip),%xmm0
jb     15b0 <main+0x3b0>
sqrtsd %xmm0,%xmm0
jmp    15b5 <main+0x3b5>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
call   1110 <sqrt@plt>
lea    0xa83(%rip),%rdi
mov    $0x1,%al
call   1080 <printf@plt>
cmp    %r14,%r12
jle    1600 <main+0x400>
cmp    $0xa,%r14
lea    0xa88(%rip),%rdx
lea    0xa72(%rip),%rax
cmovb  %rax,%rdx
mov    %r13,%rdi
mov    $0x27,%esi
mov    %r14d,%ecx
xor    %eax,%eax
call   1090 <snprintf@plt>
jmp    1616 <main+0x416>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r13,%rdi
mov    $0x27,%esi
lea    0xa5a(%rip),%rdx
xor    %eax,%eax
call   1090 <snprintf@plt>
mov    0x29d3(%rip),%rax
mov    (%rax),%esi
mov    0x29d2(%rip),%rax
or     (%rax),%esi
mov    0x2971(%rip),%rax
or     (%rax),%esi
mov    0x2978(%rip),%rax
mov    (%rax),%edx
mov    0x2997(%rip),%rax
or     (%rax),%edx
mov    0x2976(%rip),%rax
or     (%rax),%edx
mov    0x2965(%rip),%rax
or     (%rax),%edx
mov    %r13,%rdi
call   10f0 <open@plt>
mov    %eax,%r13d
mov    $0x4,%edx
mov    %eax,%edi
mov    %rsp,%rsi
xor    %eax,%eax
call   1070 <write@plt>
cmpq   $0x0,(%rsp)
jle    16a0 <main+0x4a0>
mov    %r15,%rbp
xor    %ebx,%ebx
nopl   (%rax)
mov    $0x8,%edx
mov    %r13d,%edi
mov    %rbp,%rsi
xor    %eax,%eax
call   1070 <write@plt>
add    $0x1,%rbx
add    $0x8,%rbp
cmp    %rbx,(%rsp)
jg     1680 <main+0x480>
mov    %r13d,%edi
call   10a0 <close@plt>
mov    %r15,%rdi
call   1030 <free@plt>
add    $0x1,%r14
cmp    %r14,%r12
jl     1295 <main+0x95>
mov    (%rsp),%r13
lea    0x970(%rip),%rbp
jmp    12b0 <main+0xb0>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [32 x i8] c"usage: %s count radius^2 [dim]\0A\00"
@.str.1 = [2 x i8] c"(\00"
@.str.2 = [7 x i8] c"%8.3f \00"
@.str.3 = [13 x i8] c") d = %8.3f\0A\00"
@.str.4 = [15 x i8] c"testfeature0%d\00"
@.str.5 = [14 x i8] c"testfeature%d\00"
@.str.6 = [13 x i8] c"queryfeature\00"
@O_CREAT = global i32 0
@O_TRUNC = global i32 0
@O_WRONLY = global i32 0
@S_IWUSR = global i32 0
@S_IRUSR = global i32 0
@S_IRGRP = global i32 0
@S_IROTH = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
%7 = alloca double
%8 = alloca i64
%9 = alloca i32
%10 = alloca i32
%11 = alloca double*
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca [40 x i8]
%16 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%17 = load i32, i32* %4
%18 = icmp slt i32 %17, 3
br i1 %18, label %19, label %26
19: ; preds = %2
%20 = load i32, i32* @stderr
%21 = load i8**, i8*** %5
%22 = getelementptr inbounds i8*, i8** %21, i64 0
%23 = load i8*, i8** %22
%24 = call i32 @fprintf(i32 %20, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %23)
%25 = call i32 @exit(i32 1)
unreachable
26: ; preds = %2
%27 = load i8**, i8*** %5
%28 = getelementptr inbounds i8*, i8** %27, i64 1
%29 = load i8*, i8** %28
%30 = call i64 @strtol(i8* %29, i32* null, i32 0)
store i64 %30, i64* %6
%31 = load i8**, i8*** %5
%32 = getelementptr inbounds i8*, i8** %31, i64 2
%33 = load i8*, i8** %32
%34 = call double @strtod(i8* %33, i32* null)
store double %34, double* %7
store i64 3, i64* %8
%35 = load i32, i32* %4
%36 = icmp sgt i32 %35, 3
br i1 %36, label %37, label %42
37: ; preds = %26
%38 = load i8**, i8*** %5
%39 = getelementptr inbounds i8*, i8** %38, i64 3
%40 = load i8*, i8** %39
%41 = call i64 @strtol(i8* %40, i32* null, i32 0)
store i64 %41, i64* %8
br label %42
42: ; preds = %37, %26
%43 = call i32 @time(i32* null)
%44 = call i32 @srandom(i32 %43)
store i32 0, i32* %9
br label %45
45: ; preds = %231, %42
%46 = load i32, i32* %9
%47 = sext i32 %46 to i64
%48 = load i64, i64* %6
%49 = add nsw i64 %48, 1
%50 = icmp slt i64 %47, %49
br i1 %50, label %51, label %234
51: ; preds = %45
%52 = load i64, i64* %8
%53 = mul i64 %52, 8
%54 = call double* @malloc(i64 %53)
store double* %54, double** %11
store double 0.000000e+00, double* %12
store i32 0, i32* %10
br label %55
55: ; preds = %89, %51
%56 = load i32, i32* %10
%57 = sext i32 %56 to i64
%58 = load i64, i64* %8
%59 = icmp slt i64 %57, %58
br i1 %59, label %60, label %92
60: ; preds = %55
%61 = load i32, i32* %9
%62 = sext i32 %61 to i64
%63 = load i64, i64* %6
%64 = icmp slt i64 %62, %63
br i1 %64, label %65, label %71
65: ; preds = %60
%66 = call double (...) @randn()
%67 = load double*, double** %11
%68 = load i32, i32* %10
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds double, double* %67, i64 %69
store double %66, double* %70
br label %76
71: ; preds = %60
%72 = load double*, double** %11
%73 = load i32, i32* %10
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds double, double* %72, i64 %74
store double 0.000000e+00, double* %75
br label %76
76: ; preds = %71, %65
%77 = load double*, double** %11
%78 = load i32, i32* %10
%79 = sext i32 %78 to i64
%80 = getelementptr inbounds double, double* %77, i64 %79
%81 = load double, double* %80
%82 = load double*, double** %11
%83 = load i32, i32* %10
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds double, double* %82, i64 %84
%86 = load double, double* %85
%87 = load double, double* %12
%88 = call double @llvm.fmuladd.f64(double %81, double %86, double %87)
store double %88, double* %12
br label %89
89: ; preds = %76
%90 = load i32, i32* %10
%91 = add nsw i32 %90, 1
store i32 %91, i32* %10
br label %55
92: ; preds = %55
store double 0.000000e+00, double* %13
%93 = load i32, i32* %9
%94 = sext i32 %93 to i64
%95 = load i64, i64* %6
%96 = icmp slt i64 %94, %95
br i1 %96, label %97, label %119
97: ; preds = %92
%98 = load double, double* %7
%99 = load double, double* %12
%100 = fdiv double %98, %99
%101 = call double @sqrt(double %100)
store double %101, double* %13
store i32 0, i32* %10
br label %102
102: ; preds = %115, %97
%103 = load i32, i32* %10
%104 = sext i32 %103 to i64
%105 = load i64, i64* %8
%106 = icmp slt i64 %104, %105
br i1 %106, label %107, label %118
107: ; preds = %102
%108 = load double, double* %13
%109 = load double*, double** %11
%110 = load i32, i32* %10
%111 = sext i32 %110 to i64
%112 = getelementptr inbounds double, double* %109, i64 %111
%113 = load double, double* %112
%114 = fmul double %113, %108
store double %114, double* %112
br label %115
115: ; preds = %107
%116 = load i32, i32* %10
%117 = add nsw i32 %116, 1
store i32 %117, i32* %10
br label %102
118: ; preds = %102
br label %119
119: ; preds = %118, %92
%120 = load double*, double** %11
%121 = load i64, i64* %8
%122 = sub nsw i64 %121, 1
%123 = getelementptr inbounds double, double* %120, i64 %122
%124 = load double, double* %123
%125 = fadd double %124, 1.000000e+00
store double %125, double* %123
store double 0.000000e+00, double* %12
store i32 0, i32* %10
br label %126
126: ; preds = %145, %119
%127 = load i32, i32* %10
%128 = sext i32 %127 to i64
%129 = load i64, i64* %8
%130 = sub nsw i64 %129, 1
%131 = icmp slt i64 %128, %130
br i1 %131, label %132, label %148
132: ; preds = %126
%133 = load double*, double** %11
%134 = load i32, i32* %10
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds double, double* %133, i64 %135
%137 = load double, double* %136
%138 = load double*, double** %11
%139 = load i32, i32* %10
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds double, double* %138, i64 %140
%142 = load double, double* %141
%143 = load double, double* %12
%144 = call double @llvm.fmuladd.f64(double %137, double %142, double %143)
store double %144, double* %12
br label %145
145: ; preds = %132
%146 = load i32, i32* %10
%147 = add nsw i32 %146, 1
store i32 %147, i32* %10
br label %126
148: ; preds = %126
%149 = load double*, double** %11
%150 = load i64, i64* %8
%151 = sub nsw i64 %150, 1
%152 = getelementptr inbounds double, double* %149, i64 %151
%153 = load double, double* %152
store double %153, double* %14
%154 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %10
br label %155
155: ; preds = %167, %148
%156 = load i32, i32* %10
%157 = sext i32 %156 to i64
%158 = load i64, i64* %8
%159 = icmp slt i64 %157, %158
br i1 %159, label %160, label %170
160: ; preds = %155
%161 = load double*, double** %11
%162 = load i32, i32* %10
%163 = sext i32 %162 to i64
%164 = getelementptr inbounds double, double* %161, i64 %163
%165 = load double, double* %164
%166 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %165)
br label %167
167: ; preds = %160
%168 = load i32, i32* %10
%169 = add nsw i32 %168, 1
store i32 %169, i32* %10
br label %155
170: ; preds = %155
%171 = load double, double* %12
%172 = load double, double* %14
%173 = fsub double %172, 1.000000e+00
%174 = load double, double* %14
%175 = fsub double %174, 1.000000e+00
%176 = call double @llvm.fmuladd.f64(double %173, double %175, double %171)
%177 = call double @sqrt(double %176)
%178 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double %177)
%179 = load i32, i32* %9
%180 = sext i32 %179 to i64
%181 = load i64, i64* %6
%182 = icmp slt i64 %180, %181
br i1 %182, label %183, label %191
183: ; preds = %170
%184 = getelementptr inbounds [40 x i8], [40 x i8]* %15, i64 0, i64 0
%185 = load i32, i32* %9
%186 = icmp slt i32 %185, 10
%187 = zext i1 %186 to i64
%188 = select i1 %186, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0)
%189 = load i32, i32* %9
%190 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %184, i32 39, i8* %188, i32 %189)
br label %194
191: ; preds = %170
%192 = getelementptr inbounds [40 x i8], [40 x i8]* %15, i64 0, i64 0
%193 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %192, i32 39, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0))
br label %194
194: ; preds = %191, %183
%195 = getelementptr inbounds [40 x i8], [40 x i8]* %15, i64 0, i64 0
%196 = load i32, i32* @O_CREAT
%197 = load i32, i32* @O_TRUNC
%198 = or i32 %196, %197
%199 = load i32, i32* @O_WRONLY
%200 = or i32 %198, %199
%201 = load i32, i32* @S_IWUSR
%202 = load i32, i32* @S_IRUSR
%203 = or i32 %201, %202
%204 = load i32, i32* @S_IRGRP
%205 = or i32 %203, %204
%206 = load i32, i32* @S_IROTH
%207 = or i32 %205, %206
%208 = call i32 @open(i8* %195, i32 %200, i32 %207)
store i32 %208, i32* %16
%209 = load i32, i32* %16
%210 = call i32 (i32, ...) @write(i32 %209, i64* %8, i64 4)
store i32 0, i32* %10
br label %211
211: ; preds = %223, %194
%212 = load i32, i32* %10
%213 = sext i32 %212 to i64
%214 = load i64, i64* %8
%215 = icmp slt i64 %213, %214
br i1 %215, label %216, label %226
216: ; preds = %211
%217 = load i32, i32* %16
%218 = load double*, double** %11
%219 = load i32, i32* %10
%220 = sext i32 %219 to i64
%221 = getelementptr inbounds double, double* %218, i64 %220
%222 = call i32 (i32, ...) @write(i32 %217, double* %221, i64 8)
br label %223
223: ; preds = %216
%224 = load i32, i32* %10
%225 = add nsw i32 %224, 1
store i32 %225, i32* %10
br label %211
226: ; preds = %211
%227 = load i32, i32* %16
%228 = call i32 @close(i32 %227)
%229 = load double*, double** %11
%230 = call i32 @free(double* %229)
br label %231
231: ; preds = %226
%232 = load i32, i32* %9
%233 = add nsw i32 %232, 1
store i32 %233, i32* %9
br label %45
234: ; preds = %45
%235 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [32 x i8] c"usage: %s count radius^2 [dim]\0A\00"
@.str.2 = [7 x i8] c"%8.3f \00"
@.str.3 = [13 x i8] c") d = %8.3f\0A\00"
@.str.4 = [15 x i8] c"testfeature0%d\00"
@.str.5 = [14 x i8] c"testfeature%d\00"
@.str.6 = [13 x i8] c"queryfeature\00"
@O_CREAT = global i32 0
@O_TRUNC = global i32 0
@O_WRONLY = global i32 0
@S_IWUSR = global i32 0
@S_IRUSR = global i32 0
@S_IRGRP = global i32 0
@S_IROTH = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i64
%4 = alloca [40 x i8]
%5 = icmp slt i32 %0, 3
br i1 %5, label %6, label %11
6: ; preds = %2
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %1
%9 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = tail call i32 @exit(i32 1)
unreachable
11: ; preds = %2
%12 = getelementptr inbounds i8*, i8** %1, i64 1
%13 = load i8*, i8** %12
%14 = tail call i64 @strtol(i8* nocapture %13, i32* null, i32 0)
%15 = getelementptr inbounds i8*, i8** %1, i64 2
%16 = load i8*, i8** %15
%17 = tail call double @strtod(i8* nocapture %16, i32* null)
%18 = bitcast i64* %3 to i8*
store i64 3, i64* %3
%19 = icmp eq i32 %0, 3
br i1 %19, label %24, label %20
20: ; preds = %11
%21 = getelementptr inbounds i8*, i8** %1, i64 3
%22 = load i8*, i8** %21
%23 = tail call i64 @strtol(i8* nocapture %22, i32* null, i32 0)
store i64 %23, i64* %3
br label %24
24: ; preds = %20, %11
%25 = phi i64 [ %23, %20 ], [ 3, %11 ]
%26 = tail call i32 @time(i32* null)
%27 = tail call i32 @srandom(i32 %26)
%28 = icmp slt i64 %14, 0
br i1 %28, label %241, label %29
29: ; preds = %24
%30 = getelementptr inbounds [40 x i8], [40 x i8]* %4, i64 0, i64 0
br label %31
31: ; preds = %239, %29
%32 = phi i64 [ %25, %29 ], [ %240, %239 ]
%33 = phi i64 [ 0, %29 ], [ %237, %239 ]
%34 = shl i64 %32, 3
%35 = call double* @malloc(i64 %34)
%36 = icmp sgt i64 %32, 0
br i1 %36, label %37, label %53
37: ; preds = %31
%38 = icmp sgt i64 %14, %33
br label %39
39: ; preds = %37, %46
%40 = phi i64 [ %32, %37 ], [ %47, %46 ]
%41 = phi i64 [ 0, %37 ], [ %51, %46 ]
%42 = phi double [ 0.000000e+00, %37 ], [ %50, %46 ]
br i1 %38, label %43, label %46
43: ; preds = %39
%44 = call double (...) @randn()
%45 = load i64, i64* %3
br label %46
46: ; preds = %39, %43
%47 = phi i64 [ %45, %43 ], [ %40, %39 ]
%48 = phi double [ %44, %43 ], [ 0.000000e+00, %39 ]
%49 = getelementptr inbounds double, double* %35, i64 %41
store double %48, double* %49
%50 = call double @llvm.fmuladd.f64(double %48, double %48, double %42)
%51 = add nuw nsw i64 %41, 1
%52 = icmp sgt i64 %47, %51
br i1 %52, label %39, label %53
53: ; preds = %46, %31
%54 = phi i64 [ %32, %31 ], [ %47, %46 ]
%55 = phi double [ 0.000000e+00, %31 ], [ %50, %46 ]
%56 = icmp sgt i64 %14, %33
br i1 %56, label %57, label %134
57: ; preds = %53
%58 = fdiv double %17, %55
%59 = call double @sqrt(double %58)
%60 = load i64, i64* %3
%61 = icmp sgt i64 %60, 0
br i1 %61, label %62, label %122
62: ; preds = %57
%63 = icmp ult i64 %60, 4
br i1 %63, label %120, label %64
64: ; preds = %62
%65 = and i64 %60, -4
%66 = insertelement <2 x double> poison, double %59, i64 0
%67 = shufflevector <2 x double> %66, <2 x double> poison, <2 x i32> zeroinitializer
%68 = insertelement <2 x double> poison, double %59, i64 0
%69 = shufflevector <2 x double> %68, <2 x double> poison, <2 x i32> zeroinitializer
%70 = add i64 %65, -4
%71 = lshr exact i64 %70, 2
%72 = add nuw nsw i64 %71, 1
%73 = and i64 %72, 1
%74 = icmp eq i64 %70, 0
br i1 %74, label %104, label %75
75: ; preds = %64
%76 = and i64 %72, 9223372036854775806
br label %77
77: ; preds = %77, %75
%78 = phi i64 [ 0, %75 ], [ %101, %77 ]
%79 = phi i64 [ 0, %75 ], [ %102, %77 ]
%80 = getelementptr inbounds double, double* %35, i64 %78
%81 = bitcast double* %80 to <2 x double>*
%82 = load <2 x double>, <2 x double>* %81
%83 = getelementptr inbounds double, double* %80, i64 2
%84 = bitcast double* %83 to <2 x double>*
%85 = load <2 x double>, <2 x double>* %84
%86 = fmul <2 x double> %67, %82
%87 = fmul <2 x double> %69, %85
%88 = bitcast double* %80 to <2 x double>*
store <2 x double> %86, <2 x double>* %88
%89 = bitcast double* %83 to <2 x double>*
store <2 x double> %87, <2 x double>* %89
%90 = or i64 %78, 4
%91 = getelementptr inbounds double, double* %35, i64 %90
%92 = bitcast double* %91 to <2 x double>*
%93 = load <2 x double>, <2 x double>* %92
%94 = getelementptr inbounds double, double* %91, i64 2
%95 = bitcast double* %94 to <2 x double>*
%96 = load <2 x double>, <2 x double>* %95
%97 = fmul <2 x double> %67, %93
%98 = fmul <2 x double> %69, %96
%99 = bitcast double* %91 to <2 x double>*
store <2 x double> %97, <2 x double>* %99
%100 = bitcast double* %94 to <2 x double>*
store <2 x double> %98, <2 x double>* %100
%101 = add nuw i64 %78, 8
%102 = add i64 %79, 2
%103 = icmp eq i64 %102, %76
br i1 %103, label %104, label %77
104: ; preds = %77, %64
%105 = phi i64 [ 0, %64 ], [ %101, %77 ]
%106 = icmp eq i64 %73, 0
br i1 %106, label %118, label %107
107: ; preds = %104
%108 = getelementptr inbounds double, double* %35, i64 %105
%109 = bitcast double* %108 to <2 x double>*
%110 = load <2 x double>, <2 x double>* %109
%111 = getelementptr inbounds double, double* %108, i64 2
%112 = bitcast double* %111 to <2 x double>*
%113 = load <2 x double>, <2 x double>* %112
%114 = fmul <2 x double> %67, %110
%115 = fmul <2 x double> %69, %113
%116 = bitcast double* %108 to <2 x double>*
store <2 x double> %114, <2 x double>* %116
%117 = bitcast double* %111 to <2 x double>*
store <2 x double> %115, <2 x double>* %117
br label %118
118: ; preds = %104, %107
%119 = icmp eq i64 %60, %65
br i1 %119, label %134, label %120
120: ; preds = %62, %118
%121 = phi i64 [ 0, %62 ], [ %65, %118 ]
br label %127
122: ; preds = %57
%123 = add nsw i64 %60, -1
%124 = getelementptr inbounds double, double* %35, i64 %123
%125 = load double, double* %124
%126 = fadd double %125, 1.000000e+00
store double %126, double* %124
br label %184
127: ; preds = %120, %127
%128 = phi i64 [ %132, %127 ], [ %121, %120 ]
%129 = getelementptr inbounds double, double* %35, i64 %128
%130 = load double, double* %129
%131 = fmul double %59, %130
store double %131, double* %129
%132 = add nuw nsw i64 %128, 1
%133 = icmp eq i64 %132, %60
br i1 %133, label %134, label %127
134: ; preds = %127, %118, %53
%135 = phi i64 [ %54, %53 ], [ %60, %118 ], [ %60, %127 ]
%136 = add nsw i64 %135, -1
%137 = getelementptr inbounds double, double* %35, i64 %136
%138 = load double, double* %137
%139 = fadd double %138, 1.000000e+00
store double %139, double* %137
%140 = icmp sgt i64 %135, 1
br i1 %140, label %141, label %184
141: ; preds = %134
%142 = add i64 %135, -2
%143 = and i64 %136, 3
%144 = icmp ult i64 %142, 3
br i1 %144, label %169, label %145
145: ; preds = %141
%146 = and i64 %136, -4
br label %147
147: ; preds = %147, %145
%148 = phi i64 [ 0, %145 ], [ %166, %147 ]
%149 = phi double [ 0.000000e+00, %145 ], [ %165, %147 ]
%150 = phi i64 [ 0, %145 ], [ %167, %147 ]
%151 = getelementptr inbounds double, double* %35, i64 %148
%152 = load double, double* %151
%153 = call double @llvm.fmuladd.f64(double %152, double %152, double %149)
%154 = or i64 %148, 1
%155 = getelementptr inbounds double, double* %35, i64 %154
%156 = load double, double* %155
%157 = call double @llvm.fmuladd.f64(double %156, double %156, double %153)
%158 = or i64 %148, 2
%159 = getelementptr inbounds double, double* %35, i64 %158
%160 = load double, double* %159
%161 = call double @llvm.fmuladd.f64(double %160, double %160, double %157)
%162 = or i64 %148, 3
%163 = getelementptr inbounds double, double* %35, i64 %162
%164 = load double, double* %163
%165 = call double @llvm.fmuladd.f64(double %164, double %164, double %161)
%166 = add nuw nsw i64 %148, 4
%167 = add i64 %150, 4
%168 = icmp eq i64 %167, %146
br i1 %168, label %169, label %147
169: ; preds = %147, %141
%170 = phi double [ undef, %141 ], [ %165, %147 ]
%171 = phi i64 [ 0, %141 ], [ %166, %147 ]
%172 = phi double [ 0.000000e+00, %141 ], [ %165, %147 ]
%173 = icmp eq i64 %143, 0
br i1 %173, label %184, label %174
174: ; preds = %169, %174
%175 = phi i64 [ %181, %174 ], [ %171, %169 ]
%176 = phi double [ %180, %174 ], [ %172, %169 ]
%177 = phi i64 [ %182, %174 ], [ 0, %169 ]
%178 = getelementptr inbounds double, double* %35, i64 %175
%179 = load double, double* %178
%180 = call double @llvm.fmuladd.f64(double %179, double %179, double %176)
%181 = add nuw nsw i64 %175, 1
%182 = add i64 %177, 1
%183 = icmp eq i64 %182, %143
br i1 %183, label %184, label %174
184: ; preds = %169, %174, %122, %134
%185 = phi double [ %139, %134 ], [ %126, %122 ], [ %139, %174 ], [ %139, %169 ]
%186 = phi double [ 0.000000e+00, %134 ], [ 0.000000e+00, %122 ], [ %170, %169 ], [ %180, %174 ]
%187 = call i32 @putchar(i32 40)
%188 = load i64, i64* %3
%189 = icmp sgt i64 %188, 0
br i1 %189, label %190, label %198
190: ; preds = %184, %190
%191 = phi i64 [ %195, %190 ], [ 0, %184 ]
%192 = getelementptr inbounds double, double* %35, i64 %191
%193 = load double, double* %192
%194 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %193)
%195 = add nuw nsw i64 %191, 1
%196 = load i64, i64* %3
%197 = icmp sgt i64 %196, %195
br i1 %197, label %190, label %198
198: ; preds = %190, %184
%199 = fadd double %185, -1.000000e+00
%200 = call double @llvm.fmuladd.f64(double %199, double %199, double %186)
%201 = call double @sqrt(double %200)
%202 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0), double %201)
br i1 %56, label %203, label %208
203: ; preds = %198
%204 = icmp ult i64 %33, 10
%205 = select i1 %204, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.5, i64 0, i64 0)
%206 = trunc i64 %33 to i32
%207 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %30, i32 39, i8* %205, i32 %206)
br label %210
208: ; preds = %198
%209 = call i32 (i8*, i32, i8*, ...) @snprintf(i8* %30, i32 39, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0))
br label %210
210: ; preds = %208, %203
%211 = load i32, i32* @O_CREAT
%212 = load i32, i32* @O_TRUNC
%213 = or i32 %212, %211
%214 = load i32, i32* @O_WRONLY
%215 = or i32 %213, %214
%216 = load i32, i32* @S_IWUSR
%217 = load i32, i32* @S_IRUSR
%218 = or i32 %217, %216
%219 = load i32, i32* @S_IRGRP
%220 = or i32 %218, %219
%221 = load i32, i32* @S_IROTH
%222 = or i32 %220, %221
%223 = call i32 @open(i8* %30, i32 %215, i32 %222)
%224 = call i32 (i32, ...) @write(i32 %223, i64* %3, i64 4)
%225 = load i64, i64* %3
%226 = icmp sgt i64 %225, 0
br i1 %226, label %227, label %234
227: ; preds = %210, %227
%228 = phi i64 [ %231, %227 ], [ 0, %210 ]
%229 = getelementptr inbounds double, double* %35, i64 %228
%230 = call i32 (i32, ...) @write(i32 %223, double* %229, i64 8)
%231 = add nuw nsw i64 %228, 1
%232 = load i64, i64* %3
%233 = icmp sgt i64 %232, %231
br i1 %233, label %227, label %234
234: ; preds = %227, %210
%235 = call i32 @close(i32 %223)
%236 = call i32 @free(double* %35)
%237 = add nuw i64 %33, 1
%238 = icmp slt i64 %14, %237
br i1 %238, label %241, label %239
239: ; preds = %234
%240 = load i64, i64* %3
br label %31
241: ; preds = %234, %24
%242 = call i32 @exit(i32 0)
unreachable
}