#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 cos(double);
int log(double);
double sqrt(int);
int odrnv_(int *idist, int *iseed, int *n, double *x) {
  int i__1, i__2, i__3;
  int i__;
  double u[128];
  int il, iv, il2;
  extern int odruv_(int *, int *, double *);
  --x;
  --iseed;
  i__1 = *n;
  for (iv = 1; iv <= i__1; iv += 64) {
    i__2 = 64, i__3 = *n - iv + 1;
    il = ((i__2) < (i__3) ? (i__2) : (i__3));
    if (*idist == 3) {
      il2 = il << 1;
    } else {
      il2 = il;
    }
    odruv_(&iseed[1], &il2, u);
    if (*idist == 1) {
      i__2 = il;
      for (i__ = 1; i__ <= i__2; ++i__) {
        x[iv + i__ - 1] = u[i__ - 1];
      }
    } else if (*idist == 2) {
      i__2 = il;
      for (i__ = 1; i__ <= i__2; ++i__) {
        x[iv + i__ - 1] = u[i__ - 1] * 2. - 1.;
      }
    } else if (*idist == 3) {
      i__2 = il;
      for (i__ = 1; i__ <= i__2; ++i__) {
        x[iv + i__ - 1] =
            sqrt(log(u[(i__ << 1) - 2]) * -2.) *
            cos(u[(i__ << 1) - 1] * 6.2831853071795864769252867663);
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<odrnv_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x450,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
add    $0xfffffffffffffffc,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
movl   $0x1,-0x438(%rbp)
mov    -0x438(%rbp),%eax
cmp    -0x24(%rbp),%eax
jg     13e0 <odrnv_+0x2a0>
movl   $0x40,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
sub    -0x438(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    11c8 <odrnv_+0x88>
mov    -0x28(%rbp),%eax
mov    %eax,-0x440(%rbp)
jmp    11d1 <odrnv_+0x91>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x440(%rbp)
mov    -0x440(%rbp),%eax
mov    %eax,-0x434(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x3,(%rax)
jne    11fe <odrnv_+0xbe>
mov    -0x434(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x43c(%rbp)
jmp    120a <odrnv_+0xca>
mov    -0x434(%rbp),%eax
mov    %eax,-0x43c(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x4,%rdi
lea    -0x430(%rbp),%rdx
lea    -0x43c(%rbp),%rsi
call   1030 <odruv_@plt>
mov    -0x8(%rbp),%rax
cmpl   $0x1,(%rax)
jne    128a <odrnv_+0x14a>
mov    -0x434(%rbp),%eax
mov    %eax,-0x28(%rbp)
movl   $0x1,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x28(%rbp),%eax
jg     1285 <odrnv_+0x145>
mov    -0x30(%rbp),%eax
sub    $0x1,%eax
cltq
movsd  -0x430(%rbp,%rax,8),%xmm0
ff ff
mov    -0x20(%rbp),%rax
mov    -0x438(%rbp),%ecx
add    -0x30(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1242 <odrnv_+0x102>
jmp    13c7 <odrnv_+0x287>
mov    -0x8(%rbp),%rax
cmpl   $0x2,(%rax)
jne    12ff <odrnv_+0x1bf>
mov    -0x434(%rbp),%eax
mov    %eax,-0x28(%rbp)
movl   $0x1,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x28(%rbp),%eax
jg     12fa <odrnv_+0x1ba>
mov    -0x30(%rbp),%eax
sub    $0x1,%eax
cltq
movsd  -0x430(%rbp,%rax,8),%xmm0
ff ff
addsd  %xmm0,%xmm0
movsd  0xd40(%rip),%xmm1
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
mov    -0x438(%rbp),%ecx
add    -0x30(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    12a7 <odrnv_+0x167>
jmp    13c2 <odrnv_+0x282>
mov    -0x8(%rbp),%rax
cmpl   $0x3,(%rax)
jne    13bd <odrnv_+0x27d>
mov    -0x434(%rbp),%eax
mov    %eax,-0x28(%rbp)
movl   $0x1,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x28(%rbp),%eax
jg     13b8 <odrnv_+0x278>
mov    -0x30(%rbp),%eax
shl    $0x1,%eax
sub    $0x2,%eax
cltq
movsd  -0x430(%rbp,%rax,8),%xmm0
ff ff
call   1050 <log@plt>
cvtsi2sd %eax,%xmm0
movsd  0xcbb(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1060 <sqrt@plt>
movsd  %xmm0,-0x448(%rbp)
ff
mov    -0x30(%rbp),%eax
shl    $0x1,%eax
sub    $0x1,%eax
cltq
movsd  0xc8b(%rip),%xmm0
mulsd  -0x430(%rbp,%rax,8),%xmm0
ff ff
call   1040 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x448(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
mov    -0x438(%rbp),%ecx
add    -0x30(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    131c <odrnv_+0x1dc>
jmp    13bd <odrnv_+0x27d>
jmp    13c2 <odrnv_+0x282>
jmp    13c7 <odrnv_+0x287>
jmp    13cc <odrnv_+0x28c>
mov    -0x438(%rbp),%eax
add    $0x40,%eax
mov    %eax,-0x438(%rbp)
jmp    1186 <odrnv_+0x46>
xor    %eax,%eax
add    $0x450,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<odrnv_>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x468,%rsp
mov    %rsi,0x48(%rsp)
mov    %rdi,0x40(%rsp)
mov    %rdx,0x38(%rsp)
mov    (%rdx),%eax
mov    %rax,0x30(%rsp)
test   %eax,%eax
jle    1619 <odrnv_+0x4d9>
mov    %rcx,%r15
movabs $0x100000000,%rax
mov    $0x1,%r14d
xor    %ecx,%ecx
movabs $0x500000000,%rdx
mov    %rdx,0x18(%rsp)
movl   $0xffffffff,0xc(%rsp)
ff
mov    %rax,%rdx
mov    %rax,0x20(%rsp)
mov    %rax,0x10(%rsp)
mov    0x30(%rsp),%r13
nopl   (%rax)
mov    %rcx,0x50(%rsp)
mov    %ecx,%ebp
shl    $0x6,%ebp
or     $0x1,%ebp
mov    %r13d,%r12d
sub    %r14d,%r12d
cmp    $0x3f,%r12d
mov    $0x3f,%eax
cmovge %eax,%r12d
lea    0x1(%r12),%eax
mov    0x40(%rsp),%rbx
cmpl   $0x3,(%rbx)
sete   %cl
shl    %cl,%eax
mov    %eax,0x2c(%rsp)
mov    0x48(%rsp),%rdi
lea    0x2c(%rsp),%rsi
lea    0x60(%rsp),%rdx
call   1030 <odruv_@plt>
mov    (%rbx),%eax
cmp    $0x1,%eax
je     1290 <odrnv_+0x150>
cmp    $0x2,%eax
je     1400 <odrnv_+0x2c0>
cmp    $0x3,%eax
jne    15b0 <odrnv_+0x470>
test   %r12d,%r12d
js     15b0 <odrnv_+0x470>
mov    %r12d,%r12d
mov    0x10(%rsp),%r13
lea    0x68(%rsp),%rbp
xor    %ebx,%ebx
nop
movsd  -0x8(%rbp),%xmm0
call   1050 <log@plt>
lea    (%rax,%rax,1),%edi
neg    %edi
call   1060 <sqrt@plt>
movsd  %xmm0,0x58(%rsp)
movsd  0x0(%rbp),%xmm0
mulsd  0xda9(%rip),%xmm0
call   1040 <cos@plt>
mulsd  0x58(%rsp),%xmm0
mov    %r13,%rax
sar    $0x1d,%rax
movsd  %xmm0,-0x8(%r15,%rax,1)
add    $0x1,%rbx
add    $0x10,%rbp
movabs $0x100000000,%rax
add    %rax,%r13
cmp    %r12,%rbx
jbe    1230 <odrnv_+0xf0>
jmp    15b0 <odrnv_+0x470>
nop
test   %r12d,%r12d
movabs $0x100000000,%r11
js     15b0 <odrnv_+0x470>
mov    %r12d,%r10d
mov    $0x1,%ecx
cmp    $0x3,%r12d
jb     13c3 <odrnv_+0x283>
add    %ebp,%r12d
cmp    %ebp,%r12d
jl     13c3 <odrnv_+0x283>
lea    0x1(%r10),%r8
mov    %r8,%rcx
movabs $0x1fffffffc,%rax
and    %rax,%rcx
lea    -0x4(%rcx),%rdi
mov    %rdi,%r9
shr    $0x2,%r9
add    $0x1,%r9
test   %rdi,%rdi
je     15ef <odrnv_+0x4af>
add    0xc(%rsp),%r13d
cmp    $0x3f,%r13d
mov    $0x3f,%eax
cmovge %eax,%r13d
add    $0x1,%r13
and    $0xfffffffffffffffc,%r13
add    $0xfffffffffffffffc,%r13
shr    $0x2,%r13
add    $0x1,%r13
and    $0xfffffffffffffffe,%r13
mov    0x10(%rsp),%rdx
mov    0x18(%rsp),%rsi
xor    %edi,%edi
movabs $0x800000000,%rax
nopl   (%rax)
movaps 0x60(%rsp,%rdi,8),%xmm0
movaps 0x70(%rsp,%rdi,8),%xmm1
mov    %rdx,%rbp
sar    $0x1d,%rbp
movups %xmm0,-0x8(%r15,%rbp,1)
movups %xmm1,0x8(%r15,%rbp,1)
movapd 0x80(%rsp,%rdi,8),%xmm0
movapd 0x90(%rsp,%rdi,8),%xmm1
mov    %rsi,%rbx
sar    $0x1d,%rbx
movupd %xmm0,-0x8(%r15,%rbx,1)
movupd %xmm1,0x8(%r15,%rbx,1)
add    $0x8,%rdi
add    %rax,%rsi
add    %rax,%rdx
add    $0xfffffffffffffffe,%r13
jne    1330 <odrnv_+0x1f0>
test   $0x1,%r9b
je     13b6 <odrnv_+0x276>
lea    (%r11,%r14,1),%rdx
add    $0xffffffffffffffff,%rdx
mov    %edi,%esi
or     $0x1,%esi
movapd 0x60(%rsp,%rdi,8),%xmm0
movapd 0x70(%rsp,%rdi,8),%xmm1
add    %esi,%edx
movslq %edx,%rdx
movupd %xmm0,-0x8(%r15,%rdx,8)
movupd %xmm1,0x8(%r15,%rdx,8)
cmp    %rcx,%r8
je     15b0 <odrnv_+0x470>
or     $0x1,%rcx
lea    -0x1(%rcx),%rdx
add    0x20(%rsp),%ecx
shl    $0x20,%rcx
nop
movsd  0x60(%rsp,%rdx,8),%xmm0
mov    %rcx,%rsi
sar    $0x1d,%rsi
movsd  %xmm0,-0x8(%r15,%rsi,1)
add    $0x1,%rdx
add    %r11,%rcx
cmp    %r10,%rdx
jbe    13d0 <odrnv_+0x290>
jmp    15b0 <odrnv_+0x470>
cs nopw 0x0(%rax,%rax,1)
nop
test   %r12d,%r12d
movabs $0x100000000,%r11
js     15b0 <odrnv_+0x470>
mov    %r12d,%r10d
mov    $0x1,%ecx
cmp    $0x3,%r12d
jb     1573 <odrnv_+0x433>
add    %ebp,%r12d
cmp    %ebp,%r12d
jl     1573 <odrnv_+0x433>
lea    0x1(%r10),%r8
mov    %r8,%rcx
movabs $0x1fffffffc,%rax
and    %rax,%rcx
lea    -0x4(%rcx),%rdx
mov    %rdx,%r9
shr    $0x2,%r9
add    $0x1,%r9
test   %rdx,%rdx
je     1600 <odrnv_+0x4c0>
add    0xc(%rsp),%r13d
cmp    $0x3f,%r13d
mov    $0x3f,%eax
cmovge %eax,%r13d
add    $0x1,%r13
and    $0xfffffffffffffffc,%r13
add    $0xfffffffffffffffc,%r13
shr    $0x2,%r13
add    $0x1,%r13
and    $0xfffffffffffffffe,%r13
mov    0x10(%rsp),%rbx
mov    0x18(%rsp),%rsi
xor    %edi,%edi
movabs $0x800000000,%rax
movapd 0xb6b(%rip),%xmm2
cs nopw 0x0(%rax,%rax,1)
nop
movapd 0x60(%rsp,%rdi,8),%xmm0
movapd 0x70(%rsp,%rdi,8),%xmm1
addpd  %xmm0,%xmm0
addpd  %xmm2,%xmm0
addpd  %xmm1,%xmm1
addpd  %xmm2,%xmm1
mov    %rbx,%rbp
sar    $0x1d,%rbp
movupd %xmm0,-0x8(%r15,%rbp,1)
movupd %xmm1,0x8(%r15,%rbp,1)
movapd 0x80(%rsp,%rdi,8),%xmm0
movapd 0x90(%rsp,%rdi,8),%xmm1
addpd  %xmm0,%xmm0
addpd  %xmm2,%xmm0
addpd  %xmm1,%xmm1
addpd  %xmm2,%xmm1
mov    %rsi,%rdx
sar    $0x1d,%rdx
movupd %xmm0,-0x8(%r15,%rdx,1)
movupd %xmm1,0x8(%r15,%rdx,1)
add    $0x8,%rdi
add    %rax,%rsi
add    %rax,%rbx
add    $0xfffffffffffffffe,%r13
jne    14b0 <odrnv_+0x370>
test   $0x1,%r9b
je     156a <odrnv_+0x42a>
lea    (%r11,%r14,1),%rdx
add    $0xffffffffffffffff,%rdx
mov    %edi,%esi
or     $0x1,%esi
movapd 0x60(%rsp,%rdi,8),%xmm0
movapd 0x70(%rsp,%rdi,8),%xmm1
addpd  %xmm0,%xmm0
addpd  %xmm2,%xmm0
addpd  %xmm1,%xmm1
addpd  %xmm2,%xmm1
add    %esi,%edx
movslq %edx,%rdx
movupd %xmm0,-0x8(%r15,%rdx,8)
movupd %xmm1,0x8(%r15,%rdx,8)
cmp    %rcx,%r8
je     15b0 <odrnv_+0x470>
or     $0x1,%rcx
lea    -0x1(%rcx),%rdx
add    0x20(%rsp),%ecx
shl    $0x20,%rcx
nop
movsd  0x60(%rsp,%rdx,8),%xmm0
addsd  %xmm0,%xmm0
addsd  0xa76(%rip),%xmm0
mov    %rcx,%rsi
sar    $0x1d,%rsi
movsd  %xmm0,-0x8(%r15,%rsi,1)
add    $0x1,%rdx
add    %r11,%rcx
cmp    %r10,%rdx
jbe    1580 <odrnv_+0x440>
nopl   0x0(%rax)
add    $0x40,%r14
cmp    0x30(%rsp),%r14
jg     1619 <odrnv_+0x4d9>
mov    0x38(%rsp),%rax
mov    (%rax),%r13d
mov    0x50(%rsp),%rcx
add    $0x1,%ecx
movabs $0x4000000000,%rax
add    %rax,0x10(%rsp)
add    %rax,0x18(%rsp)
addl   $0xffffffc0,0xc(%rsp)
addq   $0x40,0x20(%rsp)
jmp    11b0 <odrnv_+0x70>
xor    %edi,%edi
test   $0x1,%r9b
jne    138a <odrnv_+0x24a>
jmp    13b6 <odrnv_+0x276>
xor    %edi,%edi
movapd 0xa06(%rip),%xmm2
test   $0x1,%r9b
jne    152e <odrnv_+0x3ee>
jmp    156a <odrnv_+0x42a>
xor    %eax,%eax
add    $0x468,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @odrnv_(i32* %0, i32* %1, i32* %2, double* %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca double*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca [128 x double]
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store double* %3, double** %8
%17 = load double*, double** %8
%18 = getelementptr inbounds double, double* %17, i32 -1
store double* %18, double** %8
%19 = load i32*, i32** %6
%20 = getelementptr inbounds i32, i32* %19, i32 -1
store i32* %20, i32** %6
%21 = load i32*, i32** %7
%22 = load i32, i32* %21
store i32 %22, i32* %9
store i32 1, i32* %15
br label %23
23: ; preds = %154, %4
%24 = load i32, i32* %15
%25 = load i32, i32* %9
%26 = icmp sle i32 %24, %25
br i1 %26, label %27, label %157
27: ; preds = %23
store i32 64, i32* %10
%28 = load i32*, i32** %7
%29 = load i32, i32* %28
%30 = load i32, i32* %15
%31 = sub nsw i32 %29, %30
%32 = add nsw i32 %31, 1
store i32 %32, i32* %11
%33 = load i32, i32* %10
%34 = load i32, i32* %11
%35 = icmp slt i32 %33, %34
br i1 %35, label %36, label %38
36: ; preds = %27
%37 = load i32, i32* %10
br label %40
38: ; preds = %27
%39 = load i32, i32* %11
br label %40
40: ; preds = %38, %36
%41 = phi i32 [ %37, %36 ], [ %39, %38 ]
store i32 %41, i32* %14
%42 = load i32*, i32** %5
%43 = load i32, i32* %42
%44 = icmp eq i32 %43, 3
br i1 %44, label %45, label %48
45: ; preds = %40
%46 = load i32, i32* %14
%47 = shl i32 %46, 1
store i32 %47, i32* %16
br label %50
48: ; preds = %40
%49 = load i32, i32* %14
store i32 %49, i32* %16
br label %50
50: ; preds = %48, %45
%51 = load i32*, i32** %6
%52 = getelementptr inbounds i32, i32* %51, i64 1
%53 = getelementptr inbounds [128 x double], [128 x double]* %13, i64 0, i64 0
%54 = call i32 @odruv_(i32* %52, i32* %16, double* %53)
%55 = load i32*, i32** %5
%56 = load i32, i32* %55
%57 = icmp eq i32 %56, 1
br i1 %57, label %58, label %81
58: ; preds = %50
%59 = load i32, i32* %14
store i32 %59, i32* %10
store i32 1, i32* %12
br label %60
60: ; preds = %77, %58
%61 = load i32, i32* %12
%62 = load i32, i32* %10
%63 = icmp sle i32 %61, %62
br i1 %63, label %64, label %80
64: ; preds = %60
%65 = load i32, i32* %12
%66 = sub nsw i32 %65, 1
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds [128 x double], [128 x double]* %13, i64 0, i64 %67
%69 = load double, double* %68
%70 = load double*, double** %8
%71 = load i32, i32* %15
%72 = load i32, i32* %12
%73 = add nsw i32 %71, %72
%74 = sub nsw i32 %73, 1
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds double, double* %70, i64 %75
store double %69, double* %76
br label %77
77: ; preds = %64
%78 = load i32, i32* %12
%79 = add nsw i32 %78, 1
store i32 %79, i32* %12
br label %60
80: ; preds = %60
br label %153
81: ; preds = %50
%82 = load i32*, i32** %5
%83 = load i32, i32* %82
%84 = icmp eq i32 %83, 2
br i1 %84, label %85, label %109
85: ; preds = %81
%86 = load i32, i32* %14
store i32 %86, i32* %10
store i32 1, i32* %12
br label %87
87: ; preds = %105, %85
%88 = load i32, i32* %12
%89 = load i32, i32* %10
%90 = icmp sle i32 %88, %89
br i1 %90, label %91, label %108
91: ; preds = %87
%92 = load i32, i32* %12
%93 = sub nsw i32 %92, 1
%94 = sext i32 %93 to i64
%95 = getelementptr inbounds [128 x double], [128 x double]* %13, i64 0, i64 %94
%96 = load double, double* %95
%97 = call double @llvm.fmuladd.f64(double %96, double 2.000000e+00, double -1.000000e+00)
%98 = load double*, double** %8
%99 = load i32, i32* %15
%100 = load i32, i32* %12
%101 = add nsw i32 %99, %100
%102 = sub nsw i32 %101, 1
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds double, double* %98, i64 %103
store double %97, double* %104
br label %105
105: ; preds = %91
%106 = load i32, i32* %12
%107 = add nsw i32 %106, 1
store i32 %107, i32* %12
br label %87
108: ; preds = %87
br label %152
109: ; preds = %81
%110 = load i32*, i32** %5
%111 = load i32, i32* %110
%112 = icmp eq i32 %111, 3
br i1 %112, label %113, label %151
113: ; preds = %109
%114 = load i32, i32* %14
store i32 %114, i32* %10
store i32 1, i32* %12
br label %115
115: ; preds = %147, %113
%116 = load i32, i32* %12
%117 = load i32, i32* %10
%118 = icmp sle i32 %116, %117
br i1 %118, label %119, label %150
119: ; preds = %115
%120 = load i32, i32* %12
%121 = shl i32 %120, 1
%122 = sub nsw i32 %121, 2
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds [128 x double], [128 x double]* %13, i64 0, i64 %123
%125 = load double, double* %124
%126 = call i32 @log(double %125)
%127 = sitofp i32 %126 to double
%128 = fmul double %127, -2.000000e+00
%129 = fptosi double %128 to i32
%130 = call double @sqrt(i32 %129)
%131 = load i32, i32* %12
%132 = shl i32 %131, 1
%133 = sub nsw i32 %132, 1
%134 = sext i32 %133 to i64
%135 = getelementptr inbounds [128 x double], [128 x double]* %13, i64 0, i64 %134
%136 = load double, double* %135
%137 = fmul double %136, 0x401921FB54442D18
%138 = call double @cos(double %137)
%139 = fmul double %130, %138
%140 = load double*, double** %8
%141 = load i32, i32* %15
%142 = load i32, i32* %12
%143 = add nsw i32 %141, %142
%144 = sub nsw i32 %143, 1
%145 = sext i32 %144 to i64
%146 = getelementptr inbounds double, double* %140, i64 %145
store double %139, double* %146
br label %147
147: ; preds = %119
%148 = load i32, i32* %12
%149 = add nsw i32 %148, 1
store i32 %149, i32* %12
br label %115
150: ; preds = %115
br label %151
151: ; preds = %150, %109
br label %152
152: ; preds = %151, %108
br label %153
153: ; preds = %152, %80
br label %154
154: ; preds = %153
%155 = load i32, i32* %15
%156 = add nsw i32 %155, 64
store i32 %156, i32* %15
br label %23
157: ; preds = %23
ret i32 0
}

LLVM IR (-O2):
define i32 @odrnv_(i32* nocapture %0, i32* %1, i32* nocapture %2, double* nocapture writeonly %3) {
%5 = alloca [128 x double]
%6 = alloca i32
%7 = bitcast [128 x double]* %5 to i8*
%8 = bitcast i32* %6 to i8*
%9 = getelementptr inbounds double, double* %3, i64 -1
%10 = load i32, i32* %2
%11 = icmp slt i32 %10, 1
br i1 %11, label %249, label %12
12: ; preds = %4
%13 = getelementptr inbounds [128 x double], [128 x double]* %5, i64 0, i64 0
%14 = zext i32 %10 to i64
br label %15
15: ; preds = %246, %12
%16 = phi i32 [ %248, %246 ], [ 0, %12 ]
%17 = phi i32 [ %247, %246 ], [ %10, %12 ]
%18 = phi i64 [ %244, %246 ], [ 1, %12 ]
%19 = shl i32 %16, 6
%20 = or i32 %19, 1
%21 = shl i32 %16, 6
%22 = or i32 %21, 1
%23 = trunc i64 %18 to i32
%24 = sub nsw i32 %17, %23
%25 = icmp slt i32 %24, 63
%26 = select i1 %25, i32 %24, i32 63
%27 = add nsw i32 %26, 1
%28 = load i32, i32* %0
%29 = icmp eq i32 %28, 3
%30 = zext i1 %29 to i32
%31 = shl i32 %27, %30
store i32 %31, i32* %6
%32 = call i32 @odruv_(i32* %1, i32* %6, double* %13)
%33 = load i32, i32* %0
switch i32 %33, label %243 [
i32 1, label %122
i32 2, label %39
i32 3, label %34
]
34: ; preds = %15
%35 = icmp slt i32 %26, 0
br i1 %35, label %243, label %36
36: ; preds = %34
%37 = add i64 %18, 4294967295
%38 = zext i32 %26 to i64
br label %222
39: ; preds = %15
%40 = icmp slt i32 %26, 0
br i1 %40, label %243, label %41
41: ; preds = %39
%42 = add i64 %18, 4294967295
%43 = zext i32 %26 to i64
%44 = add nuw nsw i64 %43, 1
%45 = icmp ult i32 %26, 3
%46 = add i32 %20, %26
%47 = icmp slt i32 %46, %20
%48 = select i1 %45, i1 true, i1 %47
br i1 %48, label %120, label %49
49: ; preds = %41
%50 = and i64 %44, 8589934588
%51 = or i64 %50, 1
%52 = add nsw i64 %50, -4
%53 = lshr exact i64 %52, 2
%54 = add nuw nsw i64 %53, 1
%55 = and i64 %54, 1
%56 = icmp eq i64 %52, 0
br i1 %56, label %98, label %57
57: ; preds = %49
%58 = and i64 %54, 9223372036854775806
br label %59
59: ; preds = %59, %57
%60 = phi i64 [ 0, %57 ], [ %95, %59 ]
%61 = phi i64 [ 0, %57 ], [ %96, %59 ]
%62 = or i64 %60, 1
%63 = getelementptr inbounds [128 x double], [128 x double]* %5, i64 0, i64 %60
%64 = bitcast double* %63 to <2 x double>*
%65 = load <2 x double>, <2 x double>* %64
%66 = getelementptr inbounds double, double* %63, i64 2
%67 = bitcast double* %66 to <2 x double>*
%68 = load <2 x double>, <2 x double>* %67
%69 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %65, <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double> <double -1.000000e+00, double -1.000000e+00>)
%70 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %68, <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double> <double -1.000000e+00, double -1.000000e+00>)
%71 = add i64 %42, %62
%72 = shl i64 %71, 32
%73 = ashr exact i64 %72, 32
%74 = getelementptr inbounds double, double* %9, i64 %73
%75 = bitcast double* %74 to <2 x double>*
store <2 x double> %69, <2 x double>* %75
%76 = getelementptr inbounds double, double* %74, i64 2
%77 = bitcast double* %76 to <2 x double>*
store <2 x double> %70, <2 x double>* %77
%78 = or i64 %60, 4
%79 = or i64 %60, 5
%80 = getelementptr inbounds [128 x double], [128 x double]* %5, i64 0, 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 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %82, <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double> <double -1.000000e+00, double -1.000000e+00>)
%87 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %85, <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double> <double -1.000000e+00, double -1.000000e+00>)
%88 = add i64 %42, %79
%89 = shl i64 %88, 32
%90 = ashr exact i64 %89, 32
%91 = getelementptr inbounds double, double* %9, i64 %90
%92 = bitcast double* %91 to <2 x double>*
store <2 x double> %86, <2 x double>* %92
%93 = getelementptr inbounds double, double* %91, i64 2
%94 = bitcast double* %93 to <2 x double>*
store <2 x double> %87, <2 x double>* %94
%95 = add nuw i64 %60, 8
%96 = add i64 %61, 2
%97 = icmp eq i64 %96, %58
br i1 %97, label %98, label %59
98: ; preds = %59, %49
%99 = phi i64 [ 0, %49 ], [ %95, %59 ]
%100 = icmp eq i64 %55, 0
br i1 %100, label %118, label %101
101: ; preds = %98
%102 = or i64 %99, 1
%103 = getelementptr inbounds [128 x double], [128 x double]* %5, i64 0, i64 %99
%104 = bitcast double* %103 to <2 x double>*
%105 = load <2 x double>, <2 x double>* %104
%106 = getelementptr inbounds double, double* %103, i64 2
%107 = bitcast double* %106 to <2 x double>*
%108 = load <2 x double>, <2 x double>* %107
%109 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %105, <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double> <double -1.000000e+00, double -1.000000e+00>)
%110 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %108, <2 x double> <double 2.000000e+00, double 2.000000e+00>, <2 x double> <double -1.000000e+00, double -1.000000e+00>)
%111 = add i64 %42, %102
%112 = shl i64 %111, 32
%113 = ashr exact i64 %112, 32
%114 = getelementptr inbounds double, double* %9, i64 %113
%115 = bitcast double* %114 to <2 x double>*
store <2 x double> %109, <2 x double>* %115
%116 = getelementptr inbounds double, double* %114, i64 2
%117 = bitcast double* %116 to <2 x double>*
store <2 x double> %110, <2 x double>* %117
br label %118
118: ; preds = %98, %101
%119 = icmp eq i64 %44, %50
br i1 %119, label %243, label %120
120: ; preds = %41, %118
%121 = phi i64 [ 1, %41 ], [ %51, %118 ]
br label %210
122: ; preds = %15
%123 = icmp slt i32 %26, 0
br i1 %123, label %243, label %124
124: ; preds = %122
%125 = add i64 %18, 4294967295
%126 = zext i32 %26 to i64
%127 = add nuw nsw i64 %126, 1
%128 = icmp ult i32 %26, 3
%129 = add i32 %22, %26
%130 = icmp slt i32 %129, %22
%131 = select i1 %128, i1 true, i1 %130
br i1 %131, label %197, label %132
132: ; preds = %124
%133 = and i64 %127, 8589934588
%134 = or i64 %133, 1
%135 = add nsw i64 %133, -4
%136 = lshr exact i64 %135, 2
%137 = add nuw nsw i64 %136, 1
%138 = and i64 %137, 1
%139 = icmp eq i64 %135, 0
br i1 %139, label %177, label %140
140: ; preds = %132
%141 = and i64 %137, 9223372036854775806
br label %142
142: ; preds = %142, %140
%143 = phi i64 [ 0, %140 ], [ %174, %142 ]
%144 = phi i64 [ 0, %140 ], [ %175, %142 ]
%145 = or i64 %143, 1
%146 = getelementptr inbounds [128 x double], [128 x double]* %5, i64 0, i64 %143
%147 = bitcast double* %146 to <2 x double>*
%148 = load <2 x double>, <2 x double>* %147
%149 = getelementptr inbounds double, double* %146, i64 2
%150 = bitcast double* %149 to <2 x double>*
%151 = load <2 x double>, <2 x double>* %150
%152 = add i64 %125, %145
%153 = shl i64 %152, 32
%154 = ashr exact i64 %153, 32
%155 = getelementptr inbounds double, double* %9, i64 %154
%156 = bitcast double* %155 to <2 x double>*
store <2 x double> %148, <2 x double>* %156
%157 = getelementptr inbounds double, double* %155, i64 2
%158 = bitcast double* %157 to <2 x double>*
store <2 x double> %151, <2 x double>* %158
%159 = or i64 %143, 4
%160 = or i64 %143, 5
%161 = getelementptr inbounds [128 x double], [128 x double]* %5, i64 0, i64 %159
%162 = bitcast double* %161 to <2 x double>*
%163 = load <2 x double>, <2 x double>* %162
%164 = getelementptr inbounds double, double* %161, i64 2
%165 = bitcast double* %164 to <2 x double>*
%166 = load <2 x double>, <2 x double>* %165
%167 = add i64 %125, %160
%168 = shl i64 %167, 32
%169 = ashr exact i64 %168, 32
%170 = getelementptr inbounds double, double* %9, i64 %169
%171 = bitcast double* %170 to <2 x double>*
store <2 x double> %163, <2 x double>* %171
%172 = getelementptr inbounds double, double* %170, i64 2
%173 = bitcast double* %172 to <2 x double>*
store <2 x double> %166, <2 x double>* %173
%174 = add nuw i64 %143, 8
%175 = add i64 %144, 2
%176 = icmp eq i64 %175, %141
br i1 %176, label %177, label %142
177: ; preds = %142, %132
%178 = phi i64 [ 0, %132 ], [ %174, %142 ]
%179 = icmp eq i64 %138, 0
br i1 %179, label %195, label %180
180: ; preds = %177
%181 = or i64 %178, 1
%182 = getelementptr inbounds [128 x double], [128 x double]* %5, i64 0, i64 %178
%183 = bitcast double* %182 to <2 x double>*
%184 = load <2 x double>, <2 x double>* %183
%185 = getelementptr inbounds double, double* %182, i64 2
%186 = bitcast double* %185 to <2 x double>*
%187 = load <2 x double>, <2 x double>* %186
%188 = add i64 %125, %181
%189 = shl i64 %188, 32
%190 = ashr exact i64 %189, 32
%191 = getelementptr inbounds double, double* %9, i64 %190
%192 = bitcast double* %191 to <2 x double>*
store <2 x double> %184, <2 x double>* %192
%193 = getelementptr inbounds double, double* %191, i64 2
%194 = bitcast double* %193 to <2 x double>*
store <2 x double> %187, <2 x double>* %194
br label %195
195: ; preds = %177, %180
%196 = icmp eq i64 %127, %133
br i1 %196, label %243, label %197
197: ; preds = %124, %195
%198 = phi i64 [ 1, %124 ], [ %134, %195 ]
br label %199
199: ; preds = %197, %199
%200 = phi i64 [ %208, %199 ], [ %198, %197 ]
%201 = add nsw i64 %200, -1
%202 = getelementptr inbounds [128 x double], [128 x double]* %5, i64 0, i64 %201
%203 = load double, double* %202
%204 = add i64 %125, %200
%205 = shl i64 %204, 32
%206 = ashr exact i64 %205, 32
%207 = getelementptr inbounds double, double* %9, i64 %206
store double %203, double* %207
%208 = add nuw nsw i64 %200, 1
%209 = icmp ugt i64 %200, %126
br i1 %209, label %243, label %199
210: ; preds = %120, %210
%211 = phi i64 [ %220, %210 ], [ %121, %120 ]
%212 = add nsw i64 %211, -1
%213 = getelementptr inbounds [128 x double], [128 x double]* %5, i64 0, i64 %212
%214 = load double, double* %213
%215 = call double @llvm.fmuladd.f64(double %214, double 2.000000e+00, double -1.000000e+00)
%216 = add i64 %42, %211
%217 = shl i64 %216, 32
%218 = ashr exact i64 %217, 32
%219 = getelementptr inbounds double, double* %9, i64 %218
store double %215, double* %219
%220 = add nuw nsw i64 %211, 1
%221 = icmp ugt i64 %211, %43
br i1 %221, label %243, label %210
222: ; preds = %36, %222
%223 = phi i64 [ 1, %36 ], [ %241, %222 ]
%224 = shl nuw i64 %223, 1
%225 = add nsw i64 %224, -2
%226 = getelementptr inbounds [128 x double], [128 x double]* %5, i64 0, i64 %225
%227 = load double, double* %226
%228 = call i32 @log(double %227)
%229 = mul i32 %228, -2
%230 = call double @sqrt(i32 %229)
%231 = add nsw i64 %224, -1
%232 = getelementptr inbounds [128 x double], [128 x double]* %5, i64 0, i64 %231
%233 = load double, double* %232
%234 = fmul double %233, 0x401921FB54442D18
%235 = call double @cos(double %234)
%236 = fmul double %230, %235
%237 = add i64 %37, %223
%238 = shl i64 %237, 32
%239 = ashr exact i64 %238, 32
%240 = getelementptr inbounds double, double* %9, i64 %239
store double %236, double* %240
%241 = add nuw nsw i64 %223, 1
%242 = icmp ugt i64 %223, %38
br i1 %242, label %243, label %222
243: ; preds = %222, %210, %199, %118, %195, %34, %39, %122, %15
%244 = add nuw i64 %18, 64
%245 = icmp sgt i64 %244, %14
br i1 %245, label %249, label %246
246: ; preds = %243
%247 = load i32, i32* %2
%248 = add i32 %16, 1
br label %15
249: ; preds = %243, %4
ret i32 0
}