#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 atan(double);
double cos(int);
double sin(int);
void makewt(int nw, int *ip, double *w) {
  void makeipt(int nw, int *ip);
  int j, nwh, nw0, nw1;
  double delta, wn4r, wk1r, wk1i, wk3r, wk3i;
  ip[0] = nw;
  ip[1] = 1;
  if (nw > 2) {
    nwh = nw >> 1;
    delta = atan(1.0) / nwh;
    wn4r = cos(delta * nwh);
    w[0] = 1;
    w[1] = wn4r;
    if (nwh == 4) {
      w[2] = cos(delta * 2);
      w[3] = sin(delta * 2);
    } else if (nwh > 4) {
      makeipt(nw, ip);
      w[2] = 0.5 / cos(delta * 2);
      w[3] = 0.5 / cos(delta * 6);
      for (j = 4; j < nwh; j += 4) {
        w[j] = cos(delta * j);
        w[j + 1] = sin(delta * j);
        w[j + 2] = cos(3 * delta * j);
        w[j + 3] = -sin(3 * delta * j);
      }
    }
    nw0 = 0;
    while (nwh > 2) {
      nw1 = nw0 + nwh;
      nwh >>= 1;
      w[nw1] = 1;
      w[nw1 + 1] = wn4r;
      if (nwh == 4) {
        wk1r = w[nw0 + 4];
        wk1i = w[nw0 + 5];
        w[nw1 + 2] = wk1r;
        w[nw1 + 3] = wk1i;
      } else if (nwh > 4) {
        wk1r = w[nw0 + 4];
        wk3r = w[nw0 + 6];
        w[nw1 + 2] = 0.5 / wk1r;
        w[nw1 + 3] = 0.5 / wk3r;
        for (j = 4; j < nwh; j += 4) {
          wk1r = w[nw0 + 2 * j];
          wk1i = w[nw0 + 2 * j + 1];
          wk3r = w[nw0 + 2 * j + 2];
          wk3i = w[nw0 + 2 * j + 3];
          w[nw1 + j] = wk1r;
          w[nw1 + j + 1] = wk1i;
          w[nw1 + j + 2] = wk3r;
          w[nw1 + j + 3] = wk3i;
        }
      }
      nw0 = nw1;
    }
  }
}


x86 assembly (clang, -O0):
<makewt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x1,0x4(%rax)
cmpl   $0x2,-0x4(%rbp)
jle    15c7 <makewt+0x487>
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x20(%rbp)
movsd  0xe7e(%rip),%xmm0
call   1040 <atan@plt>
cltd
idivl  -0x20(%rbp)
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
cvtsi2sdl -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1050 <cos@plt>
movsd  %xmm0,-0x38(%rbp)
mov    -0x18(%rbp),%rax
movsd  0xe44(%rip),%xmm0
movsd  %xmm0,(%rax)
movsd  -0x38(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x8(%rax)
cmpl   $0x4,-0x20(%rbp)
jne    121b <makewt+0xdb>
movsd  0xe38(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <cos@plt>
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  0xe19(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <sin@plt>
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x18(%rax)
jmp    137e <makewt+0x23e>
cmpl   $0x4,-0x20(%rbp)
jle    1379 <makewt+0x239>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1060 <makeipt@plt>
movsd  0xddf(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <cos@plt>
movaps %xmm0,%xmm1
movsd  0xdb6(%rip),%xmm0
divsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  0xda9(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <cos@plt>
movaps %xmm0,%xmm1
movsd  0xd88(%rip),%xmm0
divsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x18(%rax)
movl   $0x4,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1374 <makewt+0x234>
movsd  -0x30(%rbp),%xmm0
cvtsi2sdl -0x1c(%rbp),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1050 <cos@plt>
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x30(%rbp),%xmm0
cvtsi2sdl -0x1c(%rbp),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <sin@plt>
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  0xd2b(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
cvtsi2sdl -0x1c(%rbp),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1050 <cos@plt>
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  0xcfa(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
cvtsi2sdl -0x1c(%rbp),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <sin@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x1c(%rbp)
jmp    1294 <makewt+0x154>
jmp    1379 <makewt+0x239>
jmp    137e <makewt+0x23e>
movl   $0x0,-0x24(%rbp)
cmpl   $0x2,-0x20(%rbp)
jle    15c2 <makewt+0x482>
mov    -0x24(%rbp),%eax
add    -0x20(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x20(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  0xc4f(%rip),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x38(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
cmpl   $0x4,-0x20(%rbp)
jne    1438 <makewt+0x2f8>
mov    -0x18(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x4,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x5,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x40(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x48(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
jmp    15b7 <makewt+0x477>
cmpl   $0x4,-0x20(%rbp)
jle    15b2 <makewt+0x472>
mov    -0x18(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x4,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x6,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xb90(%rip),%xmm0
divsd  -0x40(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  0xb71(%rip),%xmm0
divsd  -0x50(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x4,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    15ad <makewt+0x46d>
mov    -0x18(%rbp),%rax
mov    -0x24(%rbp),%ecx
mov    -0x1c(%rbp),%edx
shl    $0x1,%edx
add    %edx,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x24(%rbp),%ecx
mov    -0x1c(%rbp),%edx
shl    $0x1,%edx
add    %edx,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x24(%rbp),%ecx
mov    -0x1c(%rbp),%edx
shl    $0x1,%edx
add    %edx,%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x24(%rbp),%ecx
mov    -0x1c(%rbp),%edx
shl    $0x1,%edx
add    %edx,%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x40(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    -0x1c(%rbp),%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x48(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    -0x1c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x50(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    -0x1c(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x58(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    -0x1c(%rbp),%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x1c(%rbp)
jmp    14b5 <makewt+0x375>
jmp    15b2 <makewt+0x472>
jmp    15b7 <makewt+0x477>
mov    -0x28(%rbp),%eax
mov    %eax,-0x24(%rbp)
jmp    1385 <makewt+0x245>
jmp    15c7 <makewt+0x487>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<makewt>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %edi,(%rsi)
movl   $0x1,0x4(%rsi)
cmp    $0x3,%edi
jl     13a5 <makewt+0x265>
mov    %rdx,%rbx
mov    %rsi,%rbp
mov    %edi,%r14d
mov    %edi,%r15d
shr    %r15d
movsd  0xe89(%rip),%xmm0
call   1040 <atan@plt>
cltd
idiv   %r15d
cvtsi2sd %eax,%xmm1
xorps  %xmm0,%xmm0
cvtsi2sd %r15d,%xmm0
movsd  %xmm1,0x8(%rsp)
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1050 <cos@plt>
movabs $0x3ff0000000000000,%rax
mov    %rax,(%rbx)
movsd  %xmm0,0x10(%rsp)
movsd  %xmm0,0x8(%rbx)
cmp    $0x4,%r15d
jne    11e8 <makewt+0xa8>
movsd  0x8(%rsp),%xmm0
addsd  %xmm0,%xmm0
cvttsd2si %xmm0,%ebp
mov    %ebp,%edi
call   1050 <cos@plt>
movsd  %xmm0,0x10(%rbx)
mov    %ebp,%edi
call   1030 <sin@plt>
movsd  %xmm0,0x18(%rbx)
jmp    12e4 <makewt+0x1a4>
cmp    $0xa,%r14d
jb     12e4 <makewt+0x1a4>
mov    %r14d,%edi
mov    %rbp,%rsi
call   1060 <makeipt@plt>
movsd  0x8(%rsp),%xmm0
addsd  %xmm0,%xmm0
cvttsd2si %xmm0,%edi
call   1050 <cos@plt>
movsd  0xdf0(%rip),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rbx)
movsd  0xde7(%rip),%xmm0
mulsd  0x8(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <cos@plt>
movsd  0xdc8(%rip),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x18(%rbx)
movsd  0xdc7(%rip),%xmm0
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
mov    %r15d,%r13d
mov    $0x4,%r12d
cs nopw 0x0(%rax,%rax,1)
xorps  %xmm1,%xmm1
cvtsi2sd %r12d,%xmm1
movsd  %xmm1,0x20(%rsp)
movsd  0x8(%rsp),%xmm0
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%ebp
mov    %ebp,%edi
call   1050 <cos@plt>
movsd  %xmm0,(%rbx,%r12,8)
mov    %ebp,%edi
call   1030 <sin@plt>
movsd  %xmm0,0x8(%rbx,%r12,8)
movsd  0x20(%rsp),%xmm0
mulsd  0x18(%rsp),%xmm0
cvttsd2si %xmm0,%ebp
mov    %ebp,%edi
call   1050 <cos@plt>
movsd  %xmm0,0x10(%rbx,%r12,8)
mov    %ebp,%edi
call   1030 <sin@plt>
xorpd  0xd4c(%rip),%xmm0
movlpd %xmm0,0x18(%rbx,%r12,8)
add    $0x4,%r12
cmp    %r13,%r12
jb     1270 <makewt+0x130>
cmp    $0x6,%r14d
movsd  0x10(%rsp),%xmm3
movabs $0x3ff0000000000000,%r9
jb     13a5 <makewt+0x265>
lea    0x50(%rbx),%r8
xor    %ecx,%ecx
movsd  0xcfc(%rip),%xmm0
jmp    1327 <makewt+0x1e7>
xchg   %ax,%ax
mov    %esi,%eax
movupd 0x20(%rbx,%rax,8),%xmm1
movupd %xmm1,0x10(%rbx,%rcx,8)
cmp    $0x5,%edx
jbe    13a5 <makewt+0x265>
mov    %ecx,%esi
mov    %r15d,%edx
lea    (%rdx,%rsi,1),%ecx
shr    %r15d
mov    %r9,(%rbx,%rcx,8)
movsd  %xmm3,0x8(%rbx,%rcx,8)
cmp    $0x4,%r15d
je     1310 <makewt+0x1d0>
cmp    $0xa,%edx
jb     131e <makewt+0x1de>
mov    %esi,%eax
movapd %xmm0,%xmm1
divsd  0x20(%rbx,%rax,8),%xmm1
movapd %xmm0,%xmm2
divsd  0x30(%rbx,%rax,8),%xmm2
movsd  %xmm1,0x10(%rbx,%rcx,8)
movsd  %xmm2,0x18(%rbx,%rcx,8)
mov    %r15d,%esi
lea    (%rbx,%rcx,8),%rdi
lea    (%r8,%rax,8),%rbp
mov    $0x4,%eax
nopl   0x0(%rax)
movupd -0x10(%rbp),%xmm1
movups 0x0(%rbp),%xmm2
movupd %xmm1,(%rdi,%rax,8)
movups %xmm2,0x10(%rdi,%rax,8)
add    $0x4,%rax
add    $0x40,%rbp
cmp    %rsi,%rax
jb     1380 <makewt+0x240>
jmp    131e <makewt+0x1de>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @makewt(i32 %0, i32* %1, double* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca double*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
store i32 %0, i32* %4
store i32* %1, i32** %5
store double* %2, double** %6
%17 = load i32, i32* %4
%18 = load i32*, i32** %5
%19 = getelementptr inbounds i32, i32* %18, i64 0
store i32 %17, i32* %19
%20 = load i32*, i32** %5
%21 = getelementptr inbounds i32, i32* %20, i64 1
store i32 1, i32* %21
%22 = load i32, i32* %4
%23 = icmp sgt i32 %22, 2
br i1 %23, label %24, label %289
24: ; preds = %3
%25 = load i32, i32* %4
%26 = ashr i32 %25, 1
store i32 %26, i32* %8
%27 = call i32 @atan(double 1.000000e+00)
%28 = load i32, i32* %8
%29 = sdiv i32 %27, %28
%30 = sitofp i32 %29 to double
store double %30, double* %11
%31 = load double, double* %11
%32 = load i32, i32* %8
%33 = sitofp i32 %32 to double
%34 = fmul double %31, %33
%35 = fptosi double %34 to i32
%36 = call double @cos(i32 %35)
store double %36, double* %12
%37 = load double*, double** %6
%38 = getelementptr inbounds double, double* %37, i64 0
store double 1.000000e+00, double* %38
%39 = load double, double* %12
%40 = load double*, double** %6
%41 = getelementptr inbounds double, double* %40, i64 1
store double %39, double* %41
%42 = load i32, i32* %8
%43 = icmp eq i32 %42, 4
br i1 %43, label %44, label %57
44: ; preds = %24
%45 = load double, double* %11
%46 = fmul double %45, 2.000000e+00
%47 = fptosi double %46 to i32
%48 = call double @cos(i32 %47)
%49 = load double*, double** %6
%50 = getelementptr inbounds double, double* %49, i64 2
store double %48, double* %50
%51 = load double, double* %11
%52 = fmul double %51, 2.000000e+00
%53 = fptosi double %52 to i32
%54 = call double @sin(i32 %53)
%55 = load double*, double** %6
%56 = getelementptr inbounds double, double* %55, i64 3
store double %54, double* %56
br label %133
57: ; preds = %24
%58 = load i32, i32* %8
%59 = icmp sgt i32 %58, 4
br i1 %59, label %60, label %132
60: ; preds = %57
%61 = load i32, i32* %4
%62 = load i32*, i32** %5
%63 = load double, double* %11
%64 = fmul double %63, 2.000000e+00
%65 = fptosi double %64 to i32
%66 = call double @cos(i32 %65)
%67 = fdiv double 5.000000e-01, %66
%68 = load double*, double** %6
%69 = getelementptr inbounds double, double* %68, i64 2
store double %67, double* %69
%70 = load double, double* %11
%71 = fmul double %70, 6.000000e+00
%72 = fptosi double %71 to i32
%73 = call double @cos(i32 %72)
%74 = fdiv double 5.000000e-01, %73
%75 = load double*, double** %6
%76 = getelementptr inbounds double, double* %75, i64 3
store double %74, double* %76
store i32 4, i32* %7
br label %77
77: ; preds = %128, %60
%78 = load i32, i32* %7
%79 = load i32, i32* %8
%80 = icmp slt i32 %78, %79
br i1 %80, label %81, label %131
81: ; preds = %77
%82 = load double, double* %11
%83 = load i32, i32* %7
%84 = sitofp i32 %83 to double
%85 = fmul double %82, %84
%86 = fptosi double %85 to i32
%87 = call double @cos(i32 %86)
%88 = load double*, double** %6
%89 = load i32, i32* %7
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds double, double* %88, i64 %90
store double %87, double* %91
%92 = load double, double* %11
%93 = load i32, i32* %7
%94 = sitofp i32 %93 to double
%95 = fmul double %92, %94
%96 = fptosi double %95 to i32
%97 = call double @sin(i32 %96)
%98 = load double*, double** %6
%99 = load i32, i32* %7
%100 = add nsw i32 %99, 1
%101 = sext i32 %100 to i64
%102 = getelementptr inbounds double, double* %98, i64 %101
store double %97, double* %102
%103 = load double, double* %11
%104 = fmul double 3.000000e+00, %103
%105 = load i32, i32* %7
%106 = sitofp i32 %105 to double
%107 = fmul double %104, %106
%108 = fptosi double %107 to i32
%109 = call double @cos(i32 %108)
%110 = load double*, double** %6
%111 = load i32, i32* %7
%112 = add nsw i32 %111, 2
%113 = sext i32 %112 to i64
%114 = getelementptr inbounds double, double* %110, i64 %113
store double %109, double* %114
%115 = load double, double* %11
%116 = fmul double 3.000000e+00, %115
%117 = load i32, i32* %7
%118 = sitofp i32 %117 to double
%119 = fmul double %116, %118
%120 = fptosi double %119 to i32
%121 = call double @sin(i32 %120)
%122 = fneg double %121
%123 = load double*, double** %6
%124 = load i32, i32* %7
%125 = add nsw i32 %124, 3
%126 = sext i32 %125 to i64
%127 = getelementptr inbounds double, double* %123, i64 %126
store double %122, double* %127
br label %128
128: ; preds = %81
%129 = load i32, i32* %7
%130 = add nsw i32 %129, 4
store i32 %130, i32* %7
br label %77
131: ; preds = %77
br label %132
132: ; preds = %131, %57
br label %133
133: ; preds = %132, %44
store i32 0, i32* %9
br label %134
134: ; preds = %286, %133
%135 = load i32, i32* %8
%136 = icmp sgt i32 %135, 2
br i1 %136, label %137, label %288
137: ; preds = %134
%138 = load i32, i32* %9
%139 = load i32, i32* %8
%140 = add nsw i32 %138, %139
store i32 %140, i32* %10
%141 = load i32, i32* %8
%142 = ashr i32 %141, 1
store i32 %142, i32* %8
%143 = load double*, double** %6
%144 = load i32, i32* %10
%145 = sext i32 %144 to i64
%146 = getelementptr inbounds double, double* %143, i64 %145
store double 1.000000e+00, double* %146
%147 = load double, double* %12
%148 = load double*, double** %6
%149 = load i32, i32* %10
%150 = add nsw i32 %149, 1
%151 = sext i32 %150 to i64
%152 = getelementptr inbounds double, double* %148, i64 %151
store double %147, double* %152
%153 = load i32, i32* %8
%154 = icmp eq i32 %153, 4
br i1 %154, label %155, label %180
155: ; preds = %137
%156 = load double*, double** %6
%157 = load i32, i32* %9
%158 = add nsw i32 %157, 4
%159 = sext i32 %158 to i64
%160 = getelementptr inbounds double, double* %156, i64 %159
%161 = load double, double* %160
store double %161, double* %13
%162 = load double*, double** %6
%163 = load i32, i32* %9
%164 = add nsw i32 %163, 5
%165 = sext i32 %164 to i64
%166 = getelementptr inbounds double, double* %162, i64 %165
%167 = load double, double* %166
store double %167, double* %14
%168 = load double, double* %13
%169 = load double*, double** %6
%170 = load i32, i32* %10
%171 = add nsw i32 %170, 2
%172 = sext i32 %171 to i64
%173 = getelementptr inbounds double, double* %169, i64 %172
store double %168, double* %173
%174 = load double, double* %14
%175 = load double*, double** %6
%176 = load i32, i32* %10
%177 = add nsw i32 %176, 3
%178 = sext i32 %177 to i64
%179 = getelementptr inbounds double, double* %175, i64 %178
store double %174, double* %179
br label %286
180: ; preds = %137
%181 = load i32, i32* %8
%182 = icmp sgt i32 %181, 4
br i1 %182, label %183, label %285
183: ; preds = %180
%184 = load double*, double** %6
%185 = load i32, i32* %9
%186 = add nsw i32 %185, 4
%187 = sext i32 %186 to i64
%188 = getelementptr inbounds double, double* %184, i64 %187
%189 = load double, double* %188
store double %189, double* %13
%190 = load double*, double** %6
%191 = load i32, i32* %9
%192 = add nsw i32 %191, 6
%193 = sext i32 %192 to i64
%194 = getelementptr inbounds double, double* %190, i64 %193
%195 = load double, double* %194
store double %195, double* %15
%196 = load double, double* %13
%197 = fdiv double 5.000000e-01, %196
%198 = load double*, double** %6
%199 = load i32, i32* %10
%200 = add nsw i32 %199, 2
%201 = sext i32 %200 to i64
%202 = getelementptr inbounds double, double* %198, i64 %201
store double %197, double* %202
%203 = load double, double* %15
%204 = fdiv double 5.000000e-01, %203
%205 = load double*, double** %6
%206 = load i32, i32* %10
%207 = add nsw i32 %206, 3
%208 = sext i32 %207 to i64
%209 = getelementptr inbounds double, double* %205, i64 %208
store double %204, double* %209
store i32 4, i32* %7
br label %210
210: ; preds = %281, %183
%211 = load i32, i32* %7
%212 = load i32, i32* %8
%213 = icmp slt i32 %211, %212
br i1 %213, label %214, label %284
214: ; preds = %210
%215 = load double*, double** %6
%216 = load i32, i32* %9
%217 = load i32, i32* %7
%218 = mul nsw i32 2, %217
%219 = add nsw i32 %216, %218
%220 = sext i32 %219 to i64
%221 = getelementptr inbounds double, double* %215, i64 %220
%222 = load double, double* %221
store double %222, double* %13
%223 = load double*, double** %6
%224 = load i32, i32* %9
%225 = load i32, i32* %7
%226 = mul nsw i32 2, %225
%227 = add nsw i32 %224, %226
%228 = add nsw i32 %227, 1
%229 = sext i32 %228 to i64
%230 = getelementptr inbounds double, double* %223, i64 %229
%231 = load double, double* %230
store double %231, double* %14
%232 = load double*, double** %6
%233 = load i32, i32* %9
%234 = load i32, i32* %7
%235 = mul nsw i32 2, %234
%236 = add nsw i32 %233, %235
%237 = add nsw i32 %236, 2
%238 = sext i32 %237 to i64
%239 = getelementptr inbounds double, double* %232, i64 %238
%240 = load double, double* %239
store double %240, double* %15
%241 = load double*, double** %6
%242 = load i32, i32* %9
%243 = load i32, i32* %7
%244 = mul nsw i32 2, %243
%245 = add nsw i32 %242, %244
%246 = add nsw i32 %245, 3
%247 = sext i32 %246 to i64
%248 = getelementptr inbounds double, double* %241, i64 %247
%249 = load double, double* %248
store double %249, double* %16
%250 = load double, double* %13
%251 = load double*, double** %6
%252 = load i32, i32* %10
%253 = load i32, i32* %7
%254 = add nsw i32 %252, %253
%255 = sext i32 %254 to i64
%256 = getelementptr inbounds double, double* %251, i64 %255
store double %250, double* %256
%257 = load double, double* %14
%258 = load double*, double** %6
%259 = load i32, i32* %10
%260 = load i32, i32* %7
%261 = add nsw i32 %259, %260
%262 = add nsw i32 %261, 1
%263 = sext i32 %262 to i64
%264 = getelementptr inbounds double, double* %258, i64 %263
store double %257, double* %264
%265 = load double, double* %15
%266 = load double*, double** %6
%267 = load i32, i32* %10
%268 = load i32, i32* %7
%269 = add nsw i32 %267, %268
%270 = add nsw i32 %269, 2
%271 = sext i32 %270 to i64
%272 = getelementptr inbounds double, double* %266, i64 %271
store double %265, double* %272
%273 = load double, double* %16
%274 = load double*, double** %6
%275 = load i32, i32* %10
%276 = load i32, i32* %7
%277 = add nsw i32 %275, %276
%278 = add nsw i32 %277, 3
%279 = sext i32 %278 to i64
%280 = getelementptr inbounds double, double* %274, i64 %279
store double %273, double* %280
br label %281
281: ; preds = %214
%282 = load i32, i32* %7
%283 = add nsw i32 %282, 4
store i32 %283, i32* %7
br label %210
284: ; preds = %210
br label %285
285: ; preds = %284, %180
br label %286
286: ; preds = %285, %155
%287 = load i32, i32* %10
store i32 %287, i32* %9
br label %134
288: ; preds = %134
br label %289
289: ; preds = %288, %3
ret void
}

LLVM IR (-O2):
define void @makewt(i32 %0, i32* %1, double* %2) {
store i32 %0, i32* %1
%4 = getelementptr inbounds i32, i32* %1, i64 1
store i32 1, i32* %4
%5 = icmp sgt i32 %0, 2
br i1 %5, label %6, label %133
6: ; preds = %3
%7 = lshr i32 %0, 1
%8 = tail call i32 @atan(double 1.000000e+00)
%9 = sdiv i32 %8, %7
%10 = sitofp i32 %9 to double
%11 = sitofp i32 %7 to double
%12 = fmul double %11, %10
%13 = fptosi double %12 to i32
%14 = tail call double @cos(i32 %13)
store double 1.000000e+00, double* %2
%15 = getelementptr inbounds double, double* %2, i64 1
store double %14, double* %15
%16 = icmp eq i32 %7, 4
br i1 %16, label %17, label %24
17: ; preds = %6
%18 = fmul double %10, 2.000000e+00
%19 = fptosi double %18 to i32
%20 = tail call double @cos(i32 %19)
%21 = getelementptr inbounds double, double* %2, i64 2
store double %20, double* %21
%22 = tail call double @sin(i32 %19)
%23 = getelementptr inbounds double, double* %2, i64 3
store double %22, double* %23
br label %61
24: ; preds = %6
%25 = icmp ugt i32 %0, 9
br i1 %25, label %26, label %61
26: ; preds = %24
tail call void @makeipt(i32 %0, i32* %1)
%27 = fmul double %10, 2.000000e+00
%28 = fptosi double %27 to i32
%29 = tail call double @cos(i32 %28)
%30 = fdiv double 5.000000e-01, %29
%31 = getelementptr inbounds double, double* %2, i64 2
store double %30, double* %31
%32 = fmul double %10, 6.000000e+00
%33 = fptosi double %32 to i32
%34 = tail call double @cos(i32 %33)
%35 = fdiv double 5.000000e-01, %34
%36 = getelementptr inbounds double, double* %2, i64 3
store double %35, double* %36
%37 = fmul double %10, 3.000000e+00
%38 = zext i32 %7 to i64
br label %39
39: ; preds = %26, %39
%40 = phi i64 [ 4, %26 ], [ %59, %39 ]
%41 = trunc i64 %40 to i32
%42 = sitofp i32 %41 to double
%43 = fmul double %10, %42
%44 = fptosi double %43 to i32
%45 = tail call double @cos(i32 %44)
%46 = getelementptr inbounds double, double* %2, i64 %40
store double %45, double* %46
%47 = tail call double @sin(i32 %44)
%48 = or i64 %40, 1
%49 = getelementptr inbounds double, double* %2, i64 %48
store double %47, double* %49
%50 = fmul double %37, %42
%51 = fptosi double %50 to i32
%52 = tail call double @cos(i32 %51)
%53 = or i64 %40, 2
%54 = getelementptr inbounds double, double* %2, i64 %53
store double %52, double* %54
%55 = tail call double @sin(i32 %51)
%56 = fneg double %55
%57 = or i64 %40, 3
%58 = getelementptr inbounds double, double* %2, i64 %57
store double %56, double* %58
%59 = add nuw nsw i64 %40, 4
%60 = icmp ult i64 %59, %38
br i1 %60, label %39, label %61
61: ; preds = %39, %24, %17
%62 = icmp ugt i32 %0, 5
br i1 %62, label %63, label %133
63: ; preds = %61, %131
%64 = phi i32 [ %67, %131 ], [ %7, %61 ]
%65 = phi i32 [ %66, %131 ], [ 0, %61 ]
%66 = add nuw nsw i32 %64, %65
%67 = lshr i32 %64, 1
%68 = zext i32 %66 to i64
%69 = getelementptr inbounds double, double* %2, i64 %68
store double 1.000000e+00, double* %69
%70 = add nuw nsw i32 %66, 1
%71 = zext i32 %70 to i64
%72 = getelementptr inbounds double, double* %2, i64 %71
store double %14, double* %72
%73 = icmp eq i32 %67, 4
br i1 %73, label %74, label %89
74: ; preds = %63
%75 = add nuw nsw i32 %65, 4
%76 = zext i32 %75 to i64
%77 = getelementptr inbounds double, double* %2, i64 %76
%78 = load double, double* %77
%79 = add nuw nsw i32 %65, 5
%80 = zext i32 %79 to i64
%81 = getelementptr inbounds double, double* %2, i64 %80
%82 = load double, double* %81
%83 = add nuw nsw i32 %66, 2
%84 = zext i32 %83 to i64
%85 = getelementptr inbounds double, double* %2, i64 %84
store double %78, double* %85
%86 = add nuw nsw i32 %66, 3
%87 = zext i32 %86 to i64
%88 = getelementptr inbounds double, double* %2, i64 %87
store double %82, double* %88
br label %131
89: ; preds = %63
%90 = icmp ugt i32 %64, 9
br i1 %90, label %91, label %131
91: ; preds = %89
%92 = add nuw nsw i32 %65, 4
%93 = zext i32 %92 to i64
%94 = getelementptr inbounds double, double* %2, i64 %93
%95 = load double, double* %94
%96 = add nuw nsw i32 %65, 6
%97 = zext i32 %96 to i64
%98 = getelementptr inbounds double, double* %2, i64 %97
%99 = load double, double* %98
%100 = fdiv double 5.000000e-01, %95
%101 = add nuw nsw i32 %66, 2
%102 = zext i32 %101 to i64
%103 = getelementptr inbounds double, double* %2, i64 %102
store double %100, double* %103
%104 = fdiv double 5.000000e-01, %99
%105 = add nuw nsw i32 %66, 3
%106 = zext i32 %105 to i64
%107 = getelementptr inbounds double, double* %2, i64 %106
store double %104, double* %107
%108 = zext i32 %65 to i64
%109 = zext i32 %67 to i64
br label %110
110: ; preds = %91, %110
%111 = phi i64 [ 4, %91 ], [ %129, %110 ]
%112 = shl nuw nsw i64 %111, 1
%113 = add nuw i64 %112, %108
%114 = and i64 %113, 4294967295
%115 = getelementptr inbounds double, double* %2, i64 %114
%116 = bitcast double* %115 to <2 x double>*
%117 = load <2 x double>, <2 x double>* %116
%118 = add i64 %113, 2
%119 = and i64 %118, 4294967295
%120 = getelementptr inbounds double, double* %2, i64 %119
%121 = bitcast double* %120 to <2 x double>*
%122 = load <2 x double>, <2 x double>* %121
%123 = add nuw nsw i64 %111, %68
%124 = getelementptr inbounds double, double* %2, i64 %123
%125 = bitcast double* %124 to <2 x double>*
store <2 x double> %117, <2 x double>* %125
%126 = add nuw nsw i64 %123, 2
%127 = getelementptr inbounds double, double* %2, i64 %126
%128 = bitcast double* %127 to <2 x double>*
store <2 x double> %122, <2 x double>* %128
%129 = add nuw nsw i64 %111, 4
%130 = icmp ult i64 %129, %109
br i1 %130, label %110, label %131
131: ; preds = %110, %89, %74
%132 = icmp ugt i32 %64, 5
br i1 %132, label %63, label %133
133: ; preds = %131, %61, %3
ret void
}