#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) {
  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] = 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];
        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    14c8 <makewt+0x398>
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x20(%rbp)
movsd  0xe8e(%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  0xe54(%rip),%xmm0
movsd  %xmm0,(%rax)
movsd  -0x38(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x8(%rax)
cmpl   $0x4,-0x20(%rbp)
jl     1224 <makewt+0xf4>
movsd  0xe48(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <cos@plt>
movaps %xmm0,%xmm1
movsd  0xe1f(%rip),%xmm0
divsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  0xe12(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <cos@plt>
movaps %xmm0,%xmm1
movsd  0xdf1(%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    12f4 <makewt+0x1c4>
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  0xd94(%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  0xd63(%rip),%xmm0
mulsd  -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    $0x3,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x1c(%rbp)
jmp    122b <makewt+0xfb>
movl   $0x0,-0x24(%rbp)
cmpl   $0x2,-0x20(%rbp)
jle    14c3 <makewt+0x393>
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  0xcd9(%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)
jl     13b9 <makewt+0x289>
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  0xc85(%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  0xc66(%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    14b8 <makewt+0x388>
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    13c0 <makewt+0x290>
mov    -0x28(%rbp),%eax
mov    %eax,-0x24(%rbp)
jmp    12fb <makewt+0x1cb>
jmp    14c8 <makewt+0x398>
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     1367 <makewt+0x237>
mov    %rdx,%rbx
mov    %edi,%r14d
mov    %edi,%r15d
shr    %r15d
movsd  0xe9c(%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    $0x8,%r14d
jb     12ac <makewt+0x17c>
movsd  0x8(%rsp),%xmm0
addsd  %xmm0,%xmm0
cvttsd2si %xmm0,%edi
call   1050 <cos@plt>
movsd  0xe3f(%rip),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rbx)
movsd  0xe36(%rip),%xmm0
mulsd  0x8(%rsp),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <cos@plt>
movsd  0xe17(%rip),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x18(%rbx)
cmp    $0xa,%r14d
movsd  0x10(%rsp),%xmm3
movabs $0x3ff0000000000000,%r9
jb     12c6 <makewt+0x196>
movsd  0xdfc(%rip),%xmm0
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
mov    %r15d,%r13d
mov    $0x4,%r12d
cs nopw 0x0(%rax,%rax,1)
nopl   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>
movsd  %xmm0,0x18(%rbx,%r12,8)
add    $0x4,%r12
cmp    %r13,%r12
jb     1240 <makewt+0x110>
cmp    $0x6,%r14d
movsd  0x10(%rsp),%xmm3
movabs $0x3ff0000000000000,%r9
jb     1367 <makewt+0x237>
lea    0x58(%rbx),%r8
xor    %ecx,%ecx
movsd  0xd34(%rip),%xmm0
jmp    12e9 <makewt+0x1b9>
cs nopw 0x0(%rax,%rax,1)
cmp    $0x6,%edx
jb     1367 <makewt+0x237>
mov    %ecx,%eax
mov    %r15d,%edx
lea    (%rdx,%rax,1),%ecx
shr    %r15d
mov    %r9,(%rbx,%rcx,8)
movsd  %xmm3,0x8(%rbx,%rcx,8)
cmp    $0x8,%edx
jb     12e0 <makewt+0x1b0>
mov    %eax,%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)
cmp    $0xa,%edx
jb     12e0 <makewt+0x1b0>
mov    %r15d,%esi
lea    (%rbx,%rcx,8),%rdi
lea    (%r8,%rax,8),%rbp
mov    $0x4,%eax
nopw   0x0(%rax,%rax,1)
movupd -0x18(%rbp),%xmm1
movupd -0x8(%rbp),%xmm2
movupd %xmm1,(%rdi,%rax,8)
movupd %xmm2,0x10(%rdi,%rax,8)
add    $0x4,%rax
add    $0x40,%rbp
cmp    %rsi,%rax
jb     1340 <makewt+0x210>
jmp    12e0 <makewt+0x1b0>
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 %240
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 sge i32 %42, 4
br i1 %43, label %44, label %59
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 = fdiv double 5.000000e-01, %48
%50 = load double*, double** %6
%51 = getelementptr inbounds double, double* %50, i64 2
store double %49, double* %51
%52 = load double, double* %11
%53 = fmul double %52, 6.000000e+00
%54 = fptosi double %53 to i32
%55 = call double @cos(i32 %54)
%56 = fdiv double 5.000000e-01, %55
%57 = load double*, double** %6
%58 = getelementptr inbounds double, double* %57, i64 3
store double %56, double* %58
br label %59
59: ; preds = %44, %24
store i32 4, i32* %7
br label %60
60: ; preds = %110, %59
%61 = load i32, i32* %7
%62 = load i32, i32* %8
%63 = icmp slt i32 %61, %62
br i1 %63, label %64, label %113
64: ; preds = %60
%65 = load double, double* %11
%66 = load i32, i32* %7
%67 = sitofp i32 %66 to double
%68 = fmul double %65, %67
%69 = fptosi double %68 to i32
%70 = call double @cos(i32 %69)
%71 = load double*, double** %6
%72 = load i32, i32* %7
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds double, double* %71, i64 %73
store double %70, double* %74
%75 = load double, double* %11
%76 = load i32, i32* %7
%77 = sitofp i32 %76 to double
%78 = fmul double %75, %77
%79 = fptosi double %78 to i32
%80 = call double @sin(i32 %79)
%81 = load double*, double** %6
%82 = load i32, i32* %7
%83 = add nsw i32 %82, 1
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds double, double* %81, i64 %84
store double %80, double* %85
%86 = load double, double* %11
%87 = fmul double 3.000000e+00, %86
%88 = load i32, i32* %7
%89 = sitofp i32 %88 to double
%90 = fmul double %87, %89
%91 = fptosi double %90 to i32
%92 = call double @cos(i32 %91)
%93 = load double*, double** %6
%94 = load i32, i32* %7
%95 = add nsw i32 %94, 2
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds double, double* %93, i64 %96
store double %92, double* %97
%98 = load double, double* %11
%99 = fmul double 3.000000e+00, %98
%100 = load i32, i32* %7
%101 = sitofp i32 %100 to double
%102 = fmul double %99, %101
%103 = fptosi double %102 to i32
%104 = call double @sin(i32 %103)
%105 = load double*, double** %6
%106 = load i32, i32* %7
%107 = add nsw i32 %106, 3
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds double, double* %105, i64 %108
store double %104, double* %109
br label %110
110: ; preds = %64
%111 = load i32, i32* %7
%112 = add nsw i32 %111, 4
store i32 %112, i32* %7
br label %60
113: ; preds = %60
store i32 0, i32* %9
br label %114
114: ; preds = %237, %113
%115 = load i32, i32* %8
%116 = icmp sgt i32 %115, 2
br i1 %116, label %117, label %239
117: ; preds = %114
%118 = load i32, i32* %9
%119 = load i32, i32* %8
%120 = add nsw i32 %118, %119
store i32 %120, i32* %10
%121 = load i32, i32* %8
%122 = ashr i32 %121, 1
store i32 %122, i32* %8
%123 = load double*, double** %6
%124 = load i32, i32* %10
%125 = sext i32 %124 to i64
%126 = getelementptr inbounds double, double* %123, i64 %125
store double 1.000000e+00, double* %126
%127 = load double, double* %12
%128 = load double*, double** %6
%129 = load i32, i32* %10
%130 = add nsw i32 %129, 1
%131 = sext i32 %130 to i64
%132 = getelementptr inbounds double, double* %128, i64 %131
store double %127, double* %132
%133 = load i32, i32* %8
%134 = icmp sge i32 %133, 4
br i1 %134, label %135, label %162
135: ; preds = %117
%136 = load double*, double** %6
%137 = load i32, i32* %9
%138 = add nsw i32 %137, 4
%139 = sext i32 %138 to i64
%140 = getelementptr inbounds double, double* %136, i64 %139
%141 = load double, double* %140
store double %141, double* %13
%142 = load double*, double** %6
%143 = load i32, i32* %9
%144 = add nsw i32 %143, 6
%145 = sext i32 %144 to i64
%146 = getelementptr inbounds double, double* %142, i64 %145
%147 = load double, double* %146
store double %147, double* %15
%148 = load double, double* %13
%149 = fdiv double 5.000000e-01, %148
%150 = load double*, double** %6
%151 = load i32, i32* %10
%152 = add nsw i32 %151, 2
%153 = sext i32 %152 to i64
%154 = getelementptr inbounds double, double* %150, i64 %153
store double %149, double* %154
%155 = load double, double* %15
%156 = fdiv double 5.000000e-01, %155
%157 = load double*, double** %6
%158 = load i32, i32* %10
%159 = add nsw i32 %158, 3
%160 = sext i32 %159 to i64
%161 = getelementptr inbounds double, double* %157, i64 %160
store double %156, double* %161
br label %162
162: ; preds = %135, %117
store i32 4, i32* %7
br label %163
163: ; preds = %234, %162
%164 = load i32, i32* %7
%165 = load i32, i32* %8
%166 = icmp slt i32 %164, %165
br i1 %166, label %167, label %237
167: ; preds = %163
%168 = load double*, double** %6
%169 = load i32, i32* %9
%170 = load i32, i32* %7
%171 = mul nsw i32 2, %170
%172 = add nsw i32 %169, %171
%173 = sext i32 %172 to i64
%174 = getelementptr inbounds double, double* %168, i64 %173
%175 = load double, double* %174
store double %175, double* %13
%176 = load double*, double** %6
%177 = load i32, i32* %9
%178 = load i32, i32* %7
%179 = mul nsw i32 2, %178
%180 = add nsw i32 %177, %179
%181 = add nsw i32 %180, 1
%182 = sext i32 %181 to i64
%183 = getelementptr inbounds double, double* %176, i64 %182
%184 = load double, double* %183
store double %184, double* %14
%185 = load double*, double** %6
%186 = load i32, i32* %9
%187 = load i32, i32* %7
%188 = mul nsw i32 2, %187
%189 = add nsw i32 %186, %188
%190 = add nsw i32 %189, 2
%191 = sext i32 %190 to i64
%192 = getelementptr inbounds double, double* %185, i64 %191
%193 = load double, double* %192
store double %193, double* %15
%194 = load double*, double** %6
%195 = load i32, i32* %9
%196 = load i32, i32* %7
%197 = mul nsw i32 2, %196
%198 = add nsw i32 %195, %197
%199 = add nsw i32 %198, 3
%200 = sext i32 %199 to i64
%201 = getelementptr inbounds double, double* %194, i64 %200
%202 = load double, double* %201
store double %202, double* %16
%203 = load double, double* %13
%204 = load double*, double** %6
%205 = load i32, i32* %10
%206 = load i32, i32* %7
%207 = add nsw i32 %205, %206
%208 = sext i32 %207 to i64
%209 = getelementptr inbounds double, double* %204, i64 %208
store double %203, double* %209
%210 = load double, double* %14
%211 = load double*, double** %6
%212 = load i32, i32* %10
%213 = load i32, i32* %7
%214 = add nsw i32 %212, %213
%215 = add nsw i32 %214, 1
%216 = sext i32 %215 to i64
%217 = getelementptr inbounds double, double* %211, i64 %216
store double %210, double* %217
%218 = load double, double* %15
%219 = load double*, double** %6
%220 = load i32, i32* %10
%221 = load i32, i32* %7
%222 = add nsw i32 %220, %221
%223 = add nsw i32 %222, 2
%224 = sext i32 %223 to i64
%225 = getelementptr inbounds double, double* %219, i64 %224
store double %218, double* %225
%226 = load double, double* %16
%227 = load double*, double** %6
%228 = load i32, i32* %10
%229 = load i32, i32* %7
%230 = add nsw i32 %228, %229
%231 = add nsw i32 %230, 3
%232 = sext i32 %231 to i64
%233 = getelementptr inbounds double, double* %227, i64 %232
store double %226, double* %233
br label %234
234: ; preds = %167
%235 = load i32, i32* %7
%236 = add nsw i32 %235, 4
store i32 %236, i32* %7
br label %163
237: ; preds = %163
%238 = load i32, i32* %10
store i32 %238, i32* %9
br label %114
239: ; preds = %114
br label %240
240: ; preds = %239, %3
ret void
}

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