#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 M_PI;
double cos(double);
double sqrt(double);
void idct(int block[]) {
  int x, y, u, v;
  double v_sum, u_sum;
  int result[64];
  for (x = 0; x < 8; x++) {
    for (y = 0; y < 8; y++) {
      v_sum = 0.0;
      for (v = 0; v < 8; v++) {
        u_sum = 0.0;
        for (u = 0; u < 8; u++) {
          u_sum += (double)block[v * 8 + u] * 0.5 *
                   (cos((double)((x + x + 1) * u) * (M_PI / 16.0)) /
                    (double)((u == 0) ? sqrt(2.0) : 1.0));
        }
        v_sum += u_sum * 0.5 *
                 (cos((double)((y + y + 1) * v) * (M_PI / 16.0)) /
                  (double)((v == 0) ? sqrt(2.0) : 1.0));
      }
      result[y * 8 + x] = (int)(v_sum < 0.0) ? -(0.5 - v_sum) : v_sum + 0.5;
    }
  }
  for (x = 0; x < 8; x++)
    for (y = 0; y < 8; y++)
      block[y * 8 + x] = result[y * 8 + x];
}


x86 assembly (clang, -O0):
<idct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x170,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x8,-0xc(%rbp)
jge    13b0 <idct+0x290>
movl   $0x0,-0x10(%rbp)
cmpl   $0x8,-0x10(%rbp)
jge    139d <idct+0x27d>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0x8,-0x18(%rbp)
jge    131d <idct+0x1fd>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x8,-0x14(%rbp)
jge    125a <idct+0x13a>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%ecx
shl    $0x3,%ecx
add    -0x14(%rbp),%ecx
movslq %ecx,%rcx
cvtsi2sdl (%rax,%rcx,4),%xmm0
movsd  0xe60(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x140(%rbp)
ff
mov    -0xc(%rbp),%eax
add    -0xc(%rbp),%eax
add    $0x1,%eax
imul   -0x14(%rbp),%eax
cvtsi2sd %eax,%xmm0
mov    0x2e24(%rip),%rax
movsd  (%rax),%xmm1
movsd  0xe38(%rip),%xmm2
divsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
call   1030 <cos@plt>
movsd  %xmm0,-0x138(%rbp)
ff
cmpl   $0x0,-0x14(%rbp)
jne    1209 <idct+0xe9>
movsd  0xe21(%rip),%xmm0
call   1040 <sqrt@plt>
movsd  %xmm0,-0x148(%rbp)
ff
jmp    121e <idct+0xfe>
movsd  0xdff(%rip),%xmm0
movsd  %xmm0,-0x148(%rbp)
ff
jmp    121e <idct+0xfe>
movsd  -0x140(%rbp),%xmm0
ff
movsd  -0x138(%rbp),%xmm2
ff
movsd  -0x148(%rbp),%xmm1
ff
divsd  %xmm1,%xmm2
movsd  -0x28(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1179 <idct+0x59>
movsd  0xd9e(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x158(%rbp)
ff
mov    -0x10(%rbp),%eax
add    -0x10(%rbp),%eax
add    $0x1,%eax
imul   -0x18(%rbp),%eax
cvtsi2sd %eax,%xmm0
mov    0x2d61(%rip),%rax
movsd  (%rax),%xmm1
movsd  0xd75(%rip),%xmm2
divsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
call   1030 <cos@plt>
movsd  %xmm0,-0x150(%rbp)
ff
cmpl   $0x0,-0x18(%rbp)
jne    12cc <idct+0x1ac>
movsd  0xd5e(%rip),%xmm0
call   1040 <sqrt@plt>
movsd  %xmm0,-0x160(%rbp)
ff
jmp    12e1 <idct+0x1c1>
movsd  0xd3c(%rip),%xmm0
movsd  %xmm0,-0x160(%rbp)
ff
jmp    12e1 <idct+0x1c1>
movsd  -0x158(%rbp),%xmm0
ff
movsd  -0x150(%rbp),%xmm2
ff
movsd  -0x160(%rbp),%xmm1
ff
divsd  %xmm1,%xmm2
movsd  -0x20(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1160 <idct+0x40>
xorps  %xmm0,%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    135c <idct+0x23c>
movsd  0xccd(%rip),%xmm0
subsd  -0x20(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x168(%rbp)
ff
jmp    1371 <idct+0x251>
movsd  0xc9c(%rip),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x168(%rbp)
ff
movsd  -0x168(%rbp),%xmm0
ff
cvttsd2si %xmm0,%ecx
mov    -0x10(%rbp),%eax
shl    $0x3,%eax
add    -0xc(%rbp),%eax
cltq
mov    %ecx,-0x130(%rbp,%rax,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1147 <idct+0x27>
jmp    13a2 <idct+0x282>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1136 <idct+0x16>
movl   $0x0,-0xc(%rbp)
cmpl   $0x8,-0xc(%rbp)
jge    1418 <idct+0x2f8>
movl   $0x0,-0x10(%rbp)
cmpl   $0x8,-0x10(%rbp)
jge    1405 <idct+0x2e5>
mov    -0x10(%rbp),%eax
shl    $0x3,%eax
add    -0xc(%rbp),%eax
cltq
mov    -0x130(%rbp,%rax,4),%edx
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
shl    $0x3,%ecx
add    -0xc(%rbp),%ecx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    13c8 <idct+0x2a8>
jmp    140a <idct+0x2ea>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    13b7 <idct+0x297>
add    $0x170,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<idct>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x178,%rsp
mov    %rdi,%rbx
xor    %edi,%edi
movsd  0xed2(%rip),%xmm3
mov    0x2eb3(%rip),%r15
movsd  0xecb(%rip),%xmm4
xorpd  %xmm5,%xmm5
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
lea    (%rdi,%rdi,1),%eax
add    $0x1,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x58(%rsp)
lea    (%rdi,%rdi,1),%ecx
lea    0x2(%rcx,%rcx,1),%edx
xorps  %xmm0,%xmm0
cvtsi2sd %edx,%xmm0
movsd  %xmm0,0x50(%rsp)
lea    (%rax,%rax,2),%esi
xorps  %xmm0,%xmm0
cvtsi2sd %esi,%xmm0
movsd  %xmm0,0x48(%rsp)
lea    0x4(,%rcx,4),%esi
xorps  %xmm0,%xmm0
cvtsi2sd %esi,%xmm0
movsd  %xmm0,0x40(%rsp)
lea    (%rax,%rax,4),%esi
xorps  %xmm0,%xmm0
cvtsi2sd %esi,%xmm0
movsd  %xmm0,0x38(%rsp)
lea    (%rdx,%rdx,2),%edx
xorps  %xmm0,%xmm0
cvtsi2sd %edx,%xmm0
movsd  %xmm0,0x30(%rsp)
lea    0x8(,%rcx,8),%ecx
sub    %eax,%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
movsd  %xmm0,0x28(%rsp)
mov    $0x1,%ebp
xor    %edx,%edx
mov    %rdi,0x18(%rsp)
nopl   (%rax)
mov    %rdx,0x20(%rsp)
xorps  %xmm6,%xmm6
xor    %r14d,%r14d
xor    %r13d,%r13d
xchg   %ax,%ax
movaps %xmm6,0x60(%rsp)
xor    %r12d,%r12d
test   %r13,%r13
sete   %r12b
xorps  %xmm0,%xmm0
cvtsi2sdl (%rbx,%r13,1),%xmm0
mulsd  %xmm3,%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  (%r15),%xmm0
mulsd  %xmm4,%xmm0
mulsd  %xmm5,%xmm0
call   1030 <cos@plt>
divsd  0xde4(%rip),%xmm0
mulsd  0x8(%rsp),%xmm0
addsd  0xdde(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sdl 0x4(%rbx,%r13,1),%xmm0
mulsd  0xdae(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  (%r15),%xmm0
mulsd  0xda3(%rip),%xmm0
mulsd  0x58(%rsp),%xmm0
call   1030 <cos@plt>
mulsd  0x10(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sdl 0x8(%rbx,%r13,1),%xmm0
mulsd  0xd6c(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  (%r15),%xmm0
mulsd  0xd61(%rip),%xmm0
mulsd  0x50(%rsp),%xmm0
call   1030 <cos@plt>
mulsd  0x10(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sdl 0xc(%rbx,%r13,1),%xmm0
mulsd  0xd2a(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  (%r15),%xmm0
mulsd  0xd1f(%rip),%xmm0
mulsd  0x48(%rsp),%xmm0
call   1030 <cos@plt>
mulsd  0x10(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sdl 0x10(%rbx,%r13,1),%xmm0
mulsd  0xce8(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  (%r15),%xmm0
mulsd  0xcdd(%rip),%xmm0
mulsd  0x40(%rsp),%xmm0
call   1030 <cos@plt>
mulsd  0x10(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sdl 0x14(%rbx,%r13,1),%xmm0
mulsd  0xca6(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  (%r15),%xmm0
mulsd  0xc9b(%rip),%xmm0
mulsd  0x38(%rsp),%xmm0
call   1030 <cos@plt>
mulsd  0x10(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sdl 0x18(%rbx,%r13,1),%xmm0
mulsd  0xc64(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  (%r15),%xmm0
mulsd  0xc59(%rip),%xmm0
mulsd  0x30(%rsp),%xmm0
call   1030 <cos@plt>
mulsd  0x10(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sdl 0x1c(%rbx,%r13,1),%xmm0
mulsd  0xc22(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  (%r15),%xmm0
mulsd  0xc17(%rip),%xmm0
mulsd  0x28(%rsp),%xmm0
call   1030 <cos@plt>
mulsd  0x10(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
cvtsi2sd %r14d,%xmm1
mulsd  0xbeb(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  (%r15),%xmm0
mulsd  0xbe0(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1030 <cos@plt>
movapd 0x60(%rsp),%xmm6
lea    0xbe2(%rip),%rax
xorpd  %xmm5,%xmm5
movsd  0xbbe(%rip),%xmm4
movsd  0xbae(%rip),%xmm3
divsd  (%rax,%r12,8),%xmm0
mulsd  0x8(%rsp),%xmm0
addsd  %xmm0,%xmm6
add    $0x20,%r13
add    %ebp,%r14d
cmp    $0x100,%r13
jne    11f0 <idct+0xe0>
movapd %xmm3,%xmm0
subsd  %xmm6,%xmm0
xorpd  0xbaa(%rip),%xmm0
movapd %xmm6,%xmm1
addsd  %xmm3,%xmm1
cmpltsd %xmm5,%xmm6
movapd %xmm6,%xmm2
andnpd %xmm1,%xmm2
andpd  %xmm0,%xmm6
orpd   %xmm2,%xmm6
cvttsd2si %xmm6,%eax
mov    0x18(%rsp),%rdi
mov    0x20(%rsp),%rdx
lea    (%rdi,%rdx,8),%rcx
mov    %eax,0x70(%rsp,%rcx,4)
add    $0x1,%rdx
add    $0x2,%ebp
cmp    $0x8,%rdx
jne    11e0 <idct+0xd0>
add    $0x1,%rdi
cmp    $0x8,%rdi
jne    1150 <idct+0x40>
movaps 0x70(%rsp),%xmm0
movups %xmm0,(%rbx)
movaps 0x90(%rsp),%xmm0
movups %xmm0,0x20(%rbx)
movaps 0xb0(%rsp),%xmm0
movups %xmm0,0x40(%rbx)
movaps 0xd0(%rsp),%xmm0
movups %xmm0,0x60(%rbx)
movaps 0xf0(%rsp),%xmm0
movups %xmm0,0x80(%rbx)
movaps 0x110(%rsp),%xmm0
movups %xmm0,0xa0(%rbx)
movaps 0x130(%rsp),%xmm0
movups %xmm0,0xc0(%rbx)
movaps 0x150(%rsp),%xmm0
movups %xmm0,0xe0(%rbx)
movaps 0x80(%rsp),%xmm0
movups %xmm0,0x10(%rbx)
movaps 0xa0(%rsp),%xmm0
movups %xmm0,0x30(%rbx)
movaps 0xc0(%rsp),%xmm0
movups %xmm0,0x50(%rbx)
movaps 0xe0(%rsp),%xmm0
movups %xmm0,0x70(%rbx)
movaps 0x100(%rsp),%xmm0
movups %xmm0,0x90(%rbx)
movaps 0x120(%rsp),%xmm0
movups %xmm0,0xb0(%rbx)
movaps 0x140(%rsp),%xmm0
movups %xmm0,0xd0(%rbx)
movaps 0x160(%rsp),%xmm0
movups %xmm0,0xf0(%rbx)
add    $0x178,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define void @idct(i32* nocapture %0) {
%2 = alloca [64 x i32]
%3 = bitcast [64 x i32]* %2 to i8*
br label %4
4: ; preds = %1, %142
%5 = phi i64 [ 0, %1 ], [ %143, %142 ]
%6 = shl nuw nsw i64 %5, 1
%7 = or i64 %6, 1
%8 = trunc i64 %7 to i32
%9 = sitofp i32 %8 to double
%10 = trunc i64 %7 to i32
%11 = shl i32 %10, 1
%12 = sitofp i32 %11 to double
%13 = trunc i64 %7 to i32
%14 = mul i32 %13, 3
%15 = sitofp i32 %14 to double
%16 = trunc i64 %7 to i32
%17 = shl i32 %16, 2
%18 = sitofp i32 %17 to double
%19 = trunc i64 %7 to i32
%20 = mul i32 %19, 5
%21 = sitofp i32 %20 to double
%22 = trunc i64 %7 to i32
%23 = mul i32 %22, 6
%24 = sitofp i32 %23 to double
%25 = trunc i64 %7 to i32
%26 = mul i32 %25, 7
%27 = sitofp i32 %26 to double
br label %28
28: ; preds = %4, %130
%29 = phi i64 [ 0, %4 ], [ %140, %130 ]
%30 = shl nuw nsw i64 %29, 1
%31 = or i64 %30, 1
br label %32
32: ; preds = %28, %32
%33 = phi i64 [ 0, %28 ], [ %128, %32 ]
%34 = phi double [ 0.000000e+00, %28 ], [ %127, %32 ]
%35 = shl nsw i64 %33, 3
%36 = getelementptr inbounds i32, i32* %0, i64 %35
%37 = load i32, i32* %36
%38 = sitofp i32 %37 to double
%39 = fmul double %38, 5.000000e-01
%40 = load double, double* @M_PI
%41 = fmul double %40, 6.250000e-02
%42 = fmul double %41, 0.000000e+00
%43 = tail call double @cos(double %42)
%44 = fdiv double %43, 0x3FF6A09E667F3BCD
%45 = tail call double @llvm.fmuladd.f64(double %39, double %44, double 0.000000e+00)
%46 = or i64 %35, 1
%47 = getelementptr inbounds i32, i32* %0, i64 %46
%48 = load i32, i32* %47
%49 = sitofp i32 %48 to double
%50 = fmul double %49, 5.000000e-01
%51 = load double, double* @M_PI
%52 = fmul double %51, 6.250000e-02
%53 = fmul double %52, %9
%54 = tail call double @cos(double %53)
%55 = tail call double @llvm.fmuladd.f64(double %50, double %54, double %45)
%56 = or i64 %35, 2
%57 = getelementptr inbounds i32, i32* %0, i64 %56
%58 = load i32, i32* %57
%59 = sitofp i32 %58 to double
%60 = fmul double %59, 5.000000e-01
%61 = load double, double* @M_PI
%62 = fmul double %61, 6.250000e-02
%63 = fmul double %62, %12
%64 = tail call double @cos(double %63)
%65 = tail call double @llvm.fmuladd.f64(double %60, double %64, double %55)
%66 = or i64 %35, 3
%67 = getelementptr inbounds i32, i32* %0, i64 %66
%68 = load i32, i32* %67
%69 = sitofp i32 %68 to double
%70 = fmul double %69, 5.000000e-01
%71 = load double, double* @M_PI
%72 = fmul double %71, 6.250000e-02
%73 = fmul double %72, %15
%74 = tail call double @cos(double %73)
%75 = tail call double @llvm.fmuladd.f64(double %70, double %74, double %65)
%76 = or i64 %35, 4
%77 = getelementptr inbounds i32, i32* %0, i64 %76
%78 = load i32, i32* %77
%79 = sitofp i32 %78 to double
%80 = fmul double %79, 5.000000e-01
%81 = load double, double* @M_PI
%82 = fmul double %81, 6.250000e-02
%83 = fmul double %82, %18
%84 = tail call double @cos(double %83)
%85 = tail call double @llvm.fmuladd.f64(double %80, double %84, double %75)
%86 = or i64 %35, 5
%87 = getelementptr inbounds i32, i32* %0, i64 %86
%88 = load i32, i32* %87
%89 = sitofp i32 %88 to double
%90 = fmul double %89, 5.000000e-01
%91 = load double, double* @M_PI
%92 = fmul double %91, 6.250000e-02
%93 = fmul double %92, %21
%94 = tail call double @cos(double %93)
%95 = tail call double @llvm.fmuladd.f64(double %90, double %94, double %85)
%96 = or i64 %35, 6
%97 = getelementptr inbounds i32, i32* %0, i64 %96
%98 = load i32, i32* %97
%99 = sitofp i32 %98 to double
%100 = fmul double %99, 5.000000e-01
%101 = load double, double* @M_PI
%102 = fmul double %101, 6.250000e-02
%103 = fmul double %102, %24
%104 = tail call double @cos(double %103)
%105 = tail call double @llvm.fmuladd.f64(double %100, double %104, double %95)
%106 = or i64 %35, 7
%107 = getelementptr inbounds i32, i32* %0, i64 %106
%108 = load i32, i32* %107
%109 = sitofp i32 %108 to double
%110 = fmul double %109, 5.000000e-01
%111 = load double, double* @M_PI
%112 = fmul double %111, 6.250000e-02
%113 = fmul double %112, %27
%114 = tail call double @cos(double %113)
%115 = tail call double @llvm.fmuladd.f64(double %110, double %114, double %105)
%116 = fmul double %115, 5.000000e-01
%117 = mul nuw nsw i64 %33, %31
%118 = trunc i64 %117 to i32
%119 = sitofp i32 %118 to double
%120 = load double, double* @M_PI
%121 = fmul double %120, 6.250000e-02
%122 = fmul double %121, %119
%123 = tail call double @cos(double %122)
%124 = icmp eq i64 %33, 0
%125 = select i1 %124, double 0x3FF6A09E667F3BCD, double 1.000000e+00
%126 = fdiv double %123, %125
%127 = tail call double @llvm.fmuladd.f64(double %116, double %126, double %34)
%128 = add nuw nsw i64 %33, 1
%129 = icmp eq i64 %128, 8
br i1 %129, label %130, label %32
130: ; preds = %32
%131 = fcmp olt double %127, 0.000000e+00
%132 = fsub double 5.000000e-01, %127
%133 = fneg double %132
%134 = fadd double %127, 5.000000e-01
%135 = select i1 %131, double %133, double %134
%136 = fptosi double %135 to i32
%137 = shl nsw i64 %29, 3
%138 = add nuw nsw i64 %137, %5
%139 = getelementptr inbounds [64 x i32], [64 x i32]* %2, i64 0, i64 %138
store i32 %136, i32* %139
%140 = add nuw nsw i64 %29, 1
%141 = icmp eq i64 %140, 8
br i1 %141, label %142, label %28
142: ; preds = %130
%143 = add nuw nsw i64 %5, 1
%144 = icmp eq i64 %143, 8
br i1 %144, label %145, label %4
145: ; preds = %142
%146 = getelementptr inbounds [64 x i32], [64 x i32]* %2, i64 0, i64 8
%147 = getelementptr inbounds i32, i32* %0, i64 8
%148 = getelementptr inbounds [64 x i32], [64 x i32]* %2, i64 0, i64 16
%149 = getelementptr inbounds i32, i32* %0, i64 16
%150 = getelementptr inbounds [64 x i32], [64 x i32]* %2, i64 0, i64 24
%151 = getelementptr inbounds i32, i32* %0, i64 24
%152 = getelementptr inbounds [64 x i32], [64 x i32]* %2, i64 0, i64 32
%153 = getelementptr inbounds i32, i32* %0, i64 32
%154 = getelementptr inbounds [64 x i32], [64 x i32]* %2, i64 0, i64 40
%155 = getelementptr inbounds i32, i32* %0, i64 40
%156 = getelementptr inbounds [64 x i32], [64 x i32]* %2, i64 0, i64 48
%157 = getelementptr inbounds i32, i32* %0, i64 48
%158 = getelementptr inbounds [64 x i32], [64 x i32]* %2, i64 0, i64 56
%159 = getelementptr inbounds i32, i32* %0, i64 56
%160 = bitcast [64 x i32]* %2 to <4 x i32>*
%161 = load <4 x i32>, <4 x i32>* %160
%162 = bitcast i32* %0 to <4 x i32>*
store <4 x i32> %161, <4 x i32>* %162
%163 = bitcast i32* %146 to <4 x i32>*
%164 = load <4 x i32>, <4 x i32>* %163
%165 = bitcast i32* %147 to <4 x i32>*
store <4 x i32> %164, <4 x i32>* %165
%166 = bitcast i32* %148 to <4 x i32>*
%167 = load <4 x i32>, <4 x i32>* %166
%168 = bitcast i32* %149 to <4 x i32>*
store <4 x i32> %167, <4 x i32>* %168
%169 = bitcast i32* %150 to <4 x i32>*
%170 = load <4 x i32>, <4 x i32>* %169
%171 = bitcast i32* %151 to <4 x i32>*
store <4 x i32> %170, <4 x i32>* %171
%172 = bitcast i32* %152 to <4 x i32>*
%173 = load <4 x i32>, <4 x i32>* %172
%174 = bitcast i32* %153 to <4 x i32>*
store <4 x i32> %173, <4 x i32>* %174
%175 = bitcast i32* %154 to <4 x i32>*
%176 = load <4 x i32>, <4 x i32>* %175
%177 = bitcast i32* %155 to <4 x i32>*
store <4 x i32> %176, <4 x i32>* %177
%178 = bitcast i32* %156 to <4 x i32>*
%179 = load <4 x i32>, <4 x i32>* %178
%180 = bitcast i32* %157 to <4 x i32>*
store <4 x i32> %179, <4 x i32>* %180
%181 = bitcast i32* %158 to <4 x i32>*
%182 = load <4 x i32>, <4 x i32>* %181
%183 = bitcast i32* %159 to <4 x i32>*
store <4 x i32> %182, <4 x i32>* %183
%184 = getelementptr inbounds [64 x i32], [64 x i32]* %2, i64 0, i64 4
%185 = getelementptr inbounds i32, i32* %0, i64 4
%186 = getelementptr inbounds [64 x i32], [64 x i32]* %2, i64 0, i64 12
%187 = getelementptr inbounds i32, i32* %0, i64 12
%188 = getelementptr inbounds [64 x i32], [64 x i32]* %2, i64 0, i64 20
%189 = getelementptr inbounds i32, i32* %0, i64 20
%190 = getelementptr inbounds [64 x i32], [64 x i32]* %2, i64 0, i64 28
%191 = getelementptr inbounds i32, i32* %0, i64 28
%192 = getelementptr inbounds [64 x i32], [64 x i32]* %2, i64 0, i64 36
%193 = getelementptr inbounds i32, i32* %0, i64 36
%194 = getelementptr inbounds [64 x i32], [64 x i32]* %2, i64 0, i64 44
%195 = getelementptr inbounds i32, i32* %0, i64 44
%196 = getelementptr inbounds [64 x i32], [64 x i32]* %2, i64 0, i64 52
%197 = getelementptr inbounds i32, i32* %0, i64 52
%198 = getelementptr inbounds [64 x i32], [64 x i32]* %2, i64 0, i64 60
%199 = getelementptr inbounds i32, i32* %0, i64 60
%200 = bitcast i32* %184 to <4 x i32>*
%201 = load <4 x i32>, <4 x i32>* %200
%202 = bitcast i32* %185 to <4 x i32>*
store <4 x i32> %201, <4 x i32>* %202
%203 = bitcast i32* %186 to <4 x i32>*
%204 = load <4 x i32>, <4 x i32>* %203
%205 = bitcast i32* %187 to <4 x i32>*
store <4 x i32> %204, <4 x i32>* %205
%206 = bitcast i32* %188 to <4 x i32>*
%207 = load <4 x i32>, <4 x i32>* %206
%208 = bitcast i32* %189 to <4 x i32>*
store <4 x i32> %207, <4 x i32>* %208
%209 = bitcast i32* %190 to <4 x i32>*
%210 = load <4 x i32>, <4 x i32>* %209
%211 = bitcast i32* %191 to <4 x i32>*
store <4 x i32> %210, <4 x i32>* %211
%212 = bitcast i32* %192 to <4 x i32>*
%213 = load <4 x i32>, <4 x i32>* %212
%214 = bitcast i32* %193 to <4 x i32>*
store <4 x i32> %213, <4 x i32>* %214
%215 = bitcast i32* %194 to <4 x i32>*
%216 = load <4 x i32>, <4 x i32>* %215
%217 = bitcast i32* %195 to <4 x i32>*
store <4 x i32> %216, <4 x i32>* %217
%218 = bitcast i32* %196 to <4 x i32>*
%219 = load <4 x i32>, <4 x i32>* %218
%220 = bitcast i32* %197 to <4 x i32>*
store <4 x i32> %219, <4 x i32>* %220
%221 = bitcast i32* %198 to <4 x i32>*
%222 = load <4 x i32>, <4 x i32>* %221
%223 = bitcast i32* %199 to <4 x i32>*
store <4 x i32> %222, <4 x i32>* %223
ret void
}