#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(int);
int /*<<< orphan*/ m1ftrw(double *, int, int, int, int, int, int, int, int,
                          double *);
int /*<<< orphan*/ m1tr(double *, int, int, int, int, int, int, int);
int pow(int, int);
double sin(int);
void m1spfar(double *a, int p, int n, int dir, int off, int str, int max, int r,
             int rep, int rstr) {
  int j, k, len, stride, blocks, ind1, ind2;
  int pass, stride_in, stride_butt, butt, nbutt, nsubblock;
  int sb, butt1, butt2;
  double c0[2], wr[2], wrk[2], twopibyn, tmp;
  len = pow(p, n);
  twopibyn = dir * 2 * 3.14159265358979 / len;
  c0[0] = cos(dir * 2 * (r % p) * 3.14159265358979 / p);
  c0[1] = sin(dir * 2 * (r % p) * 3.14159265358979 / p);
  stride = len / p;
  blocks = 1;
  for (pass = 0; pass <= (n - 1) / 2; pass++) {
    for (j = 0; j < blocks; j++) {
      ind1 = (j * p * stride * str + off) % max;
      wr[0] = cos(((blocks * r) % len) * twopibyn);
      wr[1] = sin(((blocks * r) % len) * twopibyn);
      wrk[0] = 1.0;
      wrk[1] = 0.0;
      for (k = 0; k < stride; k++) {
        m1ftrw(a, p, stride * str, dir, ind1, max, r, rep, rstr, wrk);
        tmp = wrk[0];
        wrk[0] = wrk[0] * wr[0] - wrk[1] * wr[1];
        wrk[1] = tmp * wr[1] + wrk[1] * wr[0];
        ind1 = ind1 + str;
        if (ind1 >= max)
          ind1 -= max;
      }
    }
    stride = stride / p;
    blocks = blocks * p;
  }
  for (pass = (n - 1) / 2 + 1; pass < n; pass++) {
    nsubblock = len / pow(p, n - pass - 1);
    nbutt = nsubblock / (p * p);
    stride_in = pow(p, n - pass - 1);
    stride_butt = pow(p, pass);
    for (sb = 0; sb < stride_in; sb++) {
      for (butt1 = 0; butt1 < stride_in; butt1++) {
        wr[0] = cos(((stride_butt * butt1 * r) % len) * twopibyn);
        wr[1] = sin(((stride_butt * butt1 * r) % len) * twopibyn);
        for (butt2 = 0; butt2 < nbutt / stride_in; butt2++) {
          butt = butt1 + p * stride_in * butt2;
          ind1 = sb * nsubblock + butt;
          ind1 = (ind1 * str + off) % max;
          ind2 = ind1;
          for (j = 0; j < p; j++) {
            m1ftrw(a, p, stride_in * str, dir, ind2, max, r, rep, rstr, wr);
            ind2 = ind2 + stride_butt * str;
            if (ind2 >= max)
              ind2 -= max;
          }
          m1tr(a, p, stride_in * str, stride_butt * str, ind1, max, rep, rstr);
        }
      }
    }
  }
}


x86 assembly (clang, -O0):
<m1spfar>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0xe8,%rsp
mov    0x28(%rbp),%eax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1060 <pow@plt>
mov    %eax,-0x30(%rbp)
mov    -0x1c(%rbp),%eax
shl    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  0xe63(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsi2sdl -0x30(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
mov    -0x1c(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xb8(%rbp)
mov    0x18(%rbp),%eax
cltd
idivl  -0x14(%rbp)
mov    -0xb8(%rbp),%eax
imul   %edx,%eax
cvtsi2sd %eax,%xmm0
movsd  0xe26(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsi2sdl -0x14(%rbp),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1050 <cos@plt>
movsd  %xmm0,-0x80(%rbp)
mov    -0x1c(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xb4(%rbp)
mov    0x18(%rbp),%eax
cltd
idivl  -0x14(%rbp)
mov    -0xb4(%rbp),%eax
imul   %edx,%eax
cvtsi2sd %eax,%xmm0
movsd  0xde3(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvtsi2sdl -0x14(%rbp),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <sin@plt>
movsd  %xmm0,-0x78(%rbp)
mov    -0x30(%rbp),%eax
cltd
idivl  -0x14(%rbp)
mov    %eax,-0x34(%rbp)
movl   $0x1,-0x38(%rbp)
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
mov    %eax,-0xbc(%rbp)
mov    -0x18(%rbp),%eax
sub    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xbc(%rbp),%eax
cmp    %ecx,%eax
jg     1452 <m1spfar+0x302>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x38(%rbp),%eax
jge    1430 <m1spfar+0x2e0>
mov    -0x28(%rbp),%eax
imul   -0x14(%rbp),%eax
imul   -0x34(%rbp),%eax
imul   -0x24(%rbp),%eax
add    -0x20(%rbp),%eax
cltd
idivl  0x10(%rbp)
mov    %edx,-0x3c(%rbp)
mov    -0x38(%rbp),%eax
imul   0x18(%rbp),%eax
cltd
idivl  -0x30(%rbp)
cvtsi2sd %edx,%xmm0
mulsd  -0xa8(%rbp),%xmm0
ff
cvttsd2si %xmm0,%edi
call   1050 <cos@plt>
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x38(%rbp),%eax
imul   0x18(%rbp),%eax
cltd
idivl  -0x30(%rbp)
cvtsi2sd %edx,%xmm0
mulsd  -0xa8(%rbp),%xmm0
ff
cvttsd2si %xmm0,%edi
call   1040 <sin@plt>
movsd  %xmm0,-0x88(%rbp)
ff
movsd  0xd0d(%rip),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    141d <m1spfar+0x2cd>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x34(%rbp),%edx
imul   -0x24(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    -0x3c(%rbp),%r8d
mov    0x10(%rbp),%r9d
mov    0x18(%rbp),%ebx
mov    0x20(%rbp),%r11d
mov    0x28(%rbp),%r10d
lea    -0xa0(%rbp),%rax
mov    %ebx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1070 <m1ftrw@plt>
movsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
movsd  -0x90(%rbp),%xmm2
ff
movsd  -0x98(%rbp),%xmm1
ff
mulsd  -0x88(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
movsd  -0x88(%rbp),%xmm2
ff
movsd  -0x98(%rbp),%xmm1
ff
mulsd  -0x90(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
mov    -0x3c(%rbp),%eax
add    -0x24(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    0x10(%rbp),%eax
jl     140a <m1spfar+0x2ba>
mov    0x10(%rbp),%ecx
mov    -0x3c(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x3c(%rbp)
jmp    140f <m1spfar+0x2bf>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1315 <m1spfar+0x1c5>
jmp    1422 <m1spfar+0x2d2>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    127e <m1spfar+0x12e>
mov    -0x34(%rbp),%eax
cltd
idivl  -0x14(%rbp)
mov    %eax,-0x34(%rbp)
mov    -0x38(%rbp),%eax
imul   -0x14(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1250 <m1spfar+0x100>
mov    -0x18(%rbp),%eax
sub    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    16ae <m1spfar+0x55e>
mov    -0x30(%rbp),%eax
mov    %eax,-0xc0(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
sub    -0x44(%rbp),%esi
sub    $0x1,%esi
call   1060 <pow@plt>
mov    %eax,%ecx
mov    -0xc0(%rbp),%eax
cltd
idiv   %ecx
mov    %eax,-0x58(%rbp)
mov    -0x58(%rbp),%eax
mov    -0x14(%rbp),%ecx
imul   -0x14(%rbp),%ecx
cltd
idiv   %ecx
mov    %eax,-0x54(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
sub    -0x44(%rbp),%esi
sub    $0x1,%esi
call   1060 <pow@plt>
mov    %eax,-0x48(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x44(%rbp),%esi
call   1060 <pow@plt>
mov    %eax,-0x4c(%rbp)
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x48(%rbp),%eax
jge    169b <m1spfar+0x54b>
movl   $0x0,-0x60(%rbp)
mov    -0x60(%rbp),%eax
cmp    -0x48(%rbp),%eax
jge    1688 <m1spfar+0x538>
mov    -0x4c(%rbp),%eax
imul   -0x60(%rbp),%eax
imul   0x18(%rbp),%eax
cltd
idivl  -0x30(%rbp)
cvtsi2sd %edx,%xmm0
mulsd  -0xa8(%rbp),%xmm0
ff
cvttsd2si %xmm0,%edi
call   1050 <cos@plt>
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x4c(%rbp),%eax
imul   -0x60(%rbp),%eax
imul   0x18(%rbp),%eax
cltd
idivl  -0x30(%rbp)
cvtsi2sd %edx,%xmm0
mulsd  -0xa8(%rbp),%xmm0
ff
cvttsd2si %xmm0,%edi
call   1040 <sin@plt>
movsd  %xmm0,-0x88(%rbp)
ff
movl   $0x0,-0x64(%rbp)
mov    -0x64(%rbp),%eax
mov    %eax,-0xc4(%rbp)
mov    -0x54(%rbp),%eax
cltd
idivl  -0x48(%rbp)
mov    %eax,%ecx
mov    -0xc4(%rbp),%eax
cmp    %ecx,%eax
jge    1675 <m1spfar+0x525>
mov    -0x60(%rbp),%eax
mov    -0x14(%rbp),%ecx
imul   -0x48(%rbp),%ecx
imul   -0x64(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x50(%rbp)
mov    -0x5c(%rbp),%eax
imul   -0x58(%rbp),%eax
add    -0x50(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
imul   -0x24(%rbp),%eax
add    -0x20(%rbp),%eax
cltd
idivl  0x10(%rbp)
mov    %edx,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
mov    %eax,-0x40(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1636 <m1spfar+0x4e6>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x48(%rbp),%edx
imul   -0x24(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    -0x40(%rbp),%r8d
mov    0x10(%rbp),%r9d
mov    0x18(%rbp),%ebx
mov    0x20(%rbp),%r11d
mov    0x28(%rbp),%r10d
lea    -0x90(%rbp),%rax
mov    %ebx,(%rsp)
mov    %r11d,0x8(%rsp)
mov    %r10d,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1070 <m1ftrw@plt>
mov    -0x40(%rbp),%eax
mov    -0x4c(%rbp),%ecx
imul   -0x24(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x40(%rbp)
mov    -0x40(%rbp),%eax
cmp    0x10(%rbp),%eax
jl     1623 <m1spfar+0x4d3>
mov    0x10(%rbp),%ecx
mov    -0x40(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x40(%rbp)
jmp    1628 <m1spfar+0x4d8>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    15af <m1spfar+0x45f>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x48(%rbp),%edx
imul   -0x24(%rbp),%edx
mov    -0x4c(%rbp),%ecx
imul   -0x24(%rbp),%ecx
mov    -0x3c(%rbp),%r8d
mov    0x10(%rbp),%r9d
mov    0x20(%rbp),%r10d
mov    0x28(%rbp),%eax
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
call   1030 <m1tr@plt>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    1551 <m1spfar+0x401>
jmp    167a <m1spfar+0x52a>
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
jmp    14e6 <m1spfar+0x396>
jmp    168d <m1spfar+0x53d>
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    14d3 <m1spfar+0x383>
jmp    16a0 <m1spfar+0x550>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1466 <m1spfar+0x316>
add    $0xe8,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<m1spfar>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc8,%rsp
mov    %r9d,%r14d
mov    %r8d,0x2c(%rsp)
mov    %ecx,%r15d
mov    %edx,%ebx
mov    %esi,%r12d
mov    %rdi,0x40(%rsp)
mov    0x110(%rsp),%ebp
mov    0x108(%rsp),%r13d
mov    %esi,%edi
mov    %edx,%esi
call   1060 <pow@plt>
mov    %r15,0x50(%rsp)
lea    (%r15,%r15,1),%ecx
cvtsi2sd %ecx,%xmm2
movsd  0xe5d(%rip),%xmm0
mulsd  %xmm0,%xmm2
mov    %eax,0x1c(%rsp)
cvtsi2sd %eax,%xmm1
divsd  %xmm1,%xmm2
movsd  %xmm2,0x98(%rsp)
mov    %r13d,%eax
cltd
idiv   %r12d
imul   %ecx,%edx
xorps  %xmm1,%xmm1
cvtsi2sd %edx,%xmm1
xorps  %xmm2,%xmm2
cvtsi2sd %r12d,%xmm2
mulsd  %xmm0,%xmm1
divsd  %xmm2,%xmm1
cvttsd2si %xmm1,%r15d
mov    %r15d,%edi
call   1050 <cos@plt>
mov    %r15d,%edi
call   1040 <sin@plt>
lea    -0x1(%rbx),%eax
shr    $0x1f,%eax
add    %ebx,%eax
add    $0xffffffff,%eax
sar    %eax
mov    %rax,0x30(%rsp)
mov    %rbx,0x90(%rsp)
test   %ebx,%ebx
mov    %r12d,0xc(%rsp)
js     1426 <m1spfar+0x2d6>
mov    0x30(%rsp),%rax
test   %eax,%eax
mov    $0x0,%ecx
cmovg  %eax,%ecx
mov    %ecx,0x20(%rsp)
mov    $0x1,%esi
mov    0x1c(%rsp),%eax
mov    %eax,0x10(%rsp)
xor    %eax,%eax
jmp    125b <m1spfar+0x10b>
nopl   (%rax)
mov    0xc(%rsp),%r12d
imul   %r12d,%esi
mov    0x48(%rsp),%rcx
lea    0x1(%rcx),%eax
cmp    0x20(%rsp),%ecx
je     1426 <m1spfar+0x2d6>
mov    %rax,0x48(%rsp)
mov    0x10(%rsp),%eax
cltd
idiv   %r12d
mov    %eax,0x10(%rsp)
test   %esi,%esi
jle    1240 <m1spfar+0xf0>
mov    0x10(%rsp),%eax
imul   %r14d,%eax
mov    %eax,0x18(%rsp)
imul   0xc(%rsp),%eax
mov    %eax,0x38(%rsp)
mov    %esi,%eax
mov    0x108(%rsp),%ecx
imul   %ecx,%eax
cltd
idivl  0x1c(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %edx,%xmm0
mulsd  0x98(%rsp),%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,0x24(%rsp)
movl   $0x0,0x14(%rsp)
mov    %esi,0x28(%rsp)
jmp    12d7 <m1spfar+0x187>
nopl   0x0(%rax)
mov    0x14(%rsp),%eax
add    $0x1,%eax
mov    0x28(%rsp),%esi
mov    %eax,0x14(%rsp)
cmp    %esi,%eax
je     1240 <m1spfar+0xf0>
mov    0x24(%rsp),%ebx
mov    %ebx,%edi
call   1050 <cos@plt>
movapd %xmm0,0x70(%rsp)
movsd  %xmm0,0xb0(%rsp)
mov    %ebx,%edi
call   1040 <sin@plt>
movapd %xmm0,%xmm1
movsd  %xmm0,0xb8(%rsp)
movsd  0xcfb(%rip),%xmm0
movapd %xmm0,0x80(%rsp)
cmpl   $0x0,0x10(%rsp)
mov    0x118(%rsp),%eax
mov    0x108(%rsp),%r12d
lea    0x80(%rsp),%rbx
mov    0x18(%rsp),%ecx
jle    12c0 <m1spfar+0x170>
mov    %rax,%r10
mov    0x38(%rsp),%eax
imul   0x14(%rsp),%eax
add    0x2c(%rsp),%eax
cltd
idivl  0x100(%rsp)
mov    %edx,%r15d
movapd 0x70(%rsp),%xmm2
movapd %xmm2,%xmm0
unpcklpd %xmm1,%xmm0
movapd %xmm0,0xa0(%rsp)
unpcklpd %xmm2,%xmm1
movapd %xmm1,0x70(%rsp)
mov    0x10(%rsp),%r13d
nopl   0x0(%rax)
mov    0x40(%rsp),%rdi
mov    0xc(%rsp),%esi
mov    %ecx,%edx
mov    0x50(%rsp),%rcx
mov    %r15d,%r8d
mov    0x100(%rsp),%r9d
push   %rbx
push   %r10
push   %rbp
push   %r12
mov    %r10,%rbx
call   1070 <m1ftrw@plt>
mov    0x38(%rsp),%ecx
movapd 0xc5b(%rip),%xmm3
xor    %edx,%edx
mov    %rbx,%r10
lea    0xa0(%rsp),%rbx
add    $0x20,%rsp
movsd  0x80(%rsp),%xmm0
movsd  0x88(%rsp),%xmm1
movapd %xmm1,%xmm2
xorpd  %xmm3,%xmm2
unpcklpd %xmm1,%xmm2
mulpd  0x70(%rsp),%xmm2
unpcklpd %xmm0,%xmm0
mulpd  0xa0(%rsp),%xmm0
addpd  %xmm2,%xmm0
movapd %xmm0,0x80(%rsp)
add    %r14d,%r15d
mov    0x100(%rsp),%eax
cmp    %eax,%r15d
cmovl  %edx,%eax
sub    %eax,%r15d
add    $0xffffffff,%r13d
jne    1380 <m1spfar+0x230>
jmp    12c0 <m1spfar+0x170>
mov    0x30(%rsp),%rcx
lea    0x1(%rcx),%eax
mov    0x90(%rsp),%rdx
cmp    %edx,%eax
jge    16c4 <m1spfar+0x574>
mov    0xc(%rsp),%esi
imul   %esi,%esi
mov    %esi,0x5c(%rsp)
mov    %r14d,0x6c(%rsp)
jmp    1468 <m1spfar+0x318>
mov    0x30(%rsp),%rcx
lea    0x1(%rcx),%eax
mov    0x90(%rsp),%rdx
cmp    %edx,%eax
je     16c4 <m1spfar+0x574>
mov    %edx,%r15d
sub    %ecx,%r15d
mov    %eax,%r12d
add    $0xfffffffe,%r15d
mov    0xc(%rsp),%r13d
mov    %r13d,%edi
mov    %r15d,%esi
call   1060 <pow@plt>
mov    %eax,%ecx
mov    0x1c(%rsp),%eax
cltd
idiv   %ecx
mov    %eax,0x60(%rsp)
cltd
idivl  0x5c(%rsp)
mov    %eax,0x48(%rsp)
mov    %r13d,%edi
mov    %r15d,%esi
call   1060 <pow@plt>
mov    %eax,%ebx
mov    %r13d,%edi
mov    %r12,0x30(%rsp)
mov    %r12d,%esi
call   1060 <pow@plt>
test   %ebx,%ebx
mov    0x100(%rsp),%r12d
jle    1450 <m1spfar+0x300>
mov    %eax,%r15d
mov    %eax,%ecx
mov    0x108(%rsp),%eax
imul   %eax,%ecx
mov    %ecx,0x68(%rsp)
mov    %ebx,%eax
imul   0xc(%rsp),%eax
mov    %eax,0x24(%rsp)
mov    %ebx,%eax
imul   %r14d,%eax
mov    %eax,0x18(%rsp)
imul   %r14d,%r15d
xor    %eax,%eax
mov    %ebx,0x20(%rsp)
mov    %r15d,0x70(%rsp)
jmp    150f <m1spfar+0x3bf>
nopl   (%rax)
mov    0x64(%rsp),%eax
add    $0x1,%eax
cmp    %ebx,%eax
je     1450 <m1spfar+0x300>
mov    %eax,0x64(%rsp)
imul   0x60(%rsp),%eax
mov    %rax,0xc0(%rsp)
xor    %ecx,%ecx
jmp    1540 <m1spfar+0x3f0>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x38(%rsp),%rcx
add    $0x1,%ecx
mov    0x20(%rsp),%ebx
cmp    %ebx,%ecx
je     1500 <m1spfar+0x3b0>
mov    0x68(%rsp),%eax
mov    %rcx,0x38(%rsp)
imul   %ecx,%eax
cltd
idivl  0x1c(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %edx,%xmm0
mulsd  0x98(%rsp),%xmm0
cvttsd2si %xmm0,%r13d
mov    %r13d,%edi
call   1050 <cos@plt>
movsd  %xmm0,0xb0(%rsp)
mov    %r13d,%edi
call   1040 <sin@plt>
movsd  %xmm0,0xb8(%rsp)
mov    0x48(%rsp),%eax
cltd
idiv   %ebx
mov    %eax,0x10(%rsp)
test   %eax,%eax
mov    0xc(%rsp),%ebx
jle    1530 <m1spfar+0x3e0>
mov    0xc0(%rsp),%rax
mov    0x38(%rsp),%rcx
add    %ecx,%eax
mov    %eax,0x28(%rsp)
xor    %ecx,%ecx
jmp    15f7 <m1spfar+0x4a7>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %esi,%ebx
mov    %r8d,%r15d
mov    %r8d,%ecx
mov    0xa0(%rsp),%r8d
mov    %r12d,%r9d
push   %rbp
push   %rax
mov    %rax,%rbp
call   1030 <m1tr@plt>
add    $0x10,%rsp
mov    0x14(%rsp),%ecx
add    $0x1,%ecx
cmp    0x10(%rsp),%ecx
mov    0x6c(%rsp),%r14d
je     1530 <m1spfar+0x3e0>
mov    0x24(%rsp),%eax
mov    %ecx,0x14(%rsp)
imul   %ecx,%eax
add    0x28(%rsp),%eax
imul   %r14d,%eax
add    0x2c(%rsp),%eax
cltd
idiv   %r12d
mov    %edx,0xa0(%rsp)
test   %ebx,%ebx
mov    0x50(%rsp),%rcx
mov    %ebx,%esi
mov    0x40(%rsp),%rdi
mov    %rbp,%rax
mov    0x118(%rsp),%ebp
mov    %r15d,%r8d
mov    0x108(%rsp),%r15d
lea    0xb0(%rsp),%r14
mov    0x18(%rsp),%edx
jle    15c0 <m1spfar+0x470>
mov    %r15,%r10
mov    %esi,%ebx
mov    0xa0(%rsp),%r13d
nopl   0x0(%rax,%rax,1)
mov    0x40(%rsp),%rdi
mov    %r13d,%r8d
mov    %r12d,%r9d
push   %r14
push   %rbp
push   %rax
push   %r10
mov    %rax,%r15
mov    %r10,%rbp
call   1070 <m1ftrw@plt>
xor    %r9d,%r9d
mov    %rbp,%r10
mov    0x70(%rsp),%rcx
mov    0x90(%rsp),%r8d
mov    0x38(%rsp),%edx
mov    0x138(%rsp),%ebp
mov    0x60(%rsp),%rdi
mov    0x2c(%rsp),%esi
add    $0x20,%rsp
add    %r8d,%r13d
cmp    %r12d,%r13d
mov    %r12d,%eax
cmovl  %r9d,%eax
sub    %eax,%r13d
mov    %r15,%rax
add    $0xffffffff,%ebx
jne    1660 <m1spfar+0x510>
jmp    15c0 <m1spfar+0x470>
add    $0xc8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @m1spfar(double* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8, i32 %9) {
%11 = alloca double*
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
%24 = alloca i32
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32
%28 = alloca i32
%29 = alloca i32
%30 = alloca i32
%31 = alloca i32
%32 = alloca i32
%33 = alloca i32
%34 = alloca i32
%35 = alloca i32
%36 = alloca i32
%37 = alloca [2 x double]
%38 = alloca [2 x double]
%39 = alloca [2 x double]
%40 = alloca double
%41 = alloca double
store double* %0, double** %11
store i32 %1, i32* %12
store i32 %2, i32* %13
store i32 %3, i32* %14
store i32 %4, i32* %15
store i32 %5, i32* %16
store i32 %6, i32* %17
store i32 %7, i32* %18
store i32 %8, i32* %19
store i32 %9, i32* %20
%42 = load i32, i32* %12
%43 = load i32, i32* %13
%44 = call i32 @pow(i32 %42, i32 %43)
store i32 %44, i32* %23
%45 = load i32, i32* %14
%46 = mul nsw i32 %45, 2
%47 = sitofp i32 %46 to double
%48 = fmul double %47, 0x400921FB54442D11
%49 = load i32, i32* %23
%50 = sitofp i32 %49 to double
%51 = fdiv double %48, %50
store double %51, double* %40
%52 = load i32, i32* %14
%53 = mul nsw i32 %52, 2
%54 = load i32, i32* %18
%55 = load i32, i32* %12
%56 = srem i32 %54, %55
%57 = mul nsw i32 %53, %56
%58 = sitofp i32 %57 to double
%59 = fmul double %58, 0x400921FB54442D11
%60 = load i32, i32* %12
%61 = sitofp i32 %60 to double
%62 = fdiv double %59, %61
%63 = fptosi double %62 to i32
%64 = call double @cos(i32 %63)
%65 = getelementptr inbounds [2 x double], [2 x double]* %37, i64 0, i64 0
store double %64, double* %65
%66 = load i32, i32* %14
%67 = mul nsw i32 %66, 2
%68 = load i32, i32* %18
%69 = load i32, i32* %12
%70 = srem i32 %68, %69
%71 = mul nsw i32 %67, %70
%72 = sitofp i32 %71 to double
%73 = fmul double %72, 0x400921FB54442D11
%74 = load i32, i32* %12
%75 = sitofp i32 %74 to double
%76 = fdiv double %73, %75
%77 = fptosi double %76 to i32
%78 = call double @sin(i32 %77)
%79 = getelementptr inbounds [2 x double], [2 x double]* %37, i64 0, i64 1
store double %78, double* %79
%80 = load i32, i32* %23
%81 = load i32, i32* %12
%82 = sdiv i32 %80, %81
store i32 %82, i32* %24
store i32 1, i32* %25
store i32 0, i32* %28
br label %83
83: ; preds = %197, %10
%84 = load i32, i32* %28
%85 = load i32, i32* %13
%86 = sub nsw i32 %85, 1
%87 = sdiv i32 %86, 2
%88 = icmp sle i32 %84, %87
br i1 %88, label %89, label %200
89: ; preds = %83
store i32 0, i32* %21
br label %90
90: ; preds = %187, %89
%91 = load i32, i32* %21
%92 = load i32, i32* %25
%93 = icmp slt i32 %91, %92
br i1 %93, label %94, label %190
94: ; preds = %90
%95 = load i32, i32* %21
%96 = load i32, i32* %12
%97 = mul nsw i32 %95, %96
%98 = load i32, i32* %24
%99 = mul nsw i32 %97, %98
%100 = load i32, i32* %16
%101 = mul nsw i32 %99, %100
%102 = load i32, i32* %15
%103 = add nsw i32 %101, %102
%104 = load i32, i32* %17
%105 = srem i32 %103, %104
store i32 %105, i32* %26
%106 = load i32, i32* %25
%107 = load i32, i32* %18
%108 = mul nsw i32 %106, %107
%109 = load i32, i32* %23
%110 = srem i32 %108, %109
%111 = sitofp i32 %110 to double
%112 = load double, double* %40
%113 = fmul double %111, %112
%114 = fptosi double %113 to i32
%115 = call double @cos(i32 %114)
%116 = getelementptr inbounds [2 x double], [2 x double]* %38, i64 0, i64 0
store double %115, double* %116
%117 = load i32, i32* %25
%118 = load i32, i32* %18
%119 = mul nsw i32 %117, %118
%120 = load i32, i32* %23
%121 = srem i32 %119, %120
%122 = sitofp i32 %121 to double
%123 = load double, double* %40
%124 = fmul double %122, %123
%125 = fptosi double %124 to i32
%126 = call double @sin(i32 %125)
%127 = getelementptr inbounds [2 x double], [2 x double]* %38, i64 0, i64 1
store double %126, double* %127
%128 = getelementptr inbounds [2 x double], [2 x double]* %39, i64 0, i64 0
store double 1.000000e+00, double* %128
%129 = getelementptr inbounds [2 x double], [2 x double]* %39, i64 0, i64 1
store double 0.000000e+00, double* %129
store i32 0, i32* %22
br label %130
130: ; preds = %183, %94
%131 = load i32, i32* %22
%132 = load i32, i32* %24
%133 = icmp slt i32 %131, %132
br i1 %133, label %134, label %186
134: ; preds = %130
%135 = load double*, double** %11
%136 = load i32, i32* %12
%137 = load i32, i32* %24
%138 = load i32, i32* %16
%139 = mul nsw i32 %137, %138
%140 = load i32, i32* %14
%141 = load i32, i32* %26
%142 = load i32, i32* %17
%143 = load i32, i32* %18
%144 = load i32, i32* %19
%145 = load i32, i32* %20
%146 = getelementptr inbounds [2 x double], [2 x double]* %39, i64 0, i64 0
%147 = call i32 @m1ftrw(double* %135, i32 %136, i32 %139, i32 %140, i32 %141, i32 %142, i32 %143, i32 %144, i32 %145, double* %146)
%148 = getelementptr inbounds [2 x double], [2 x double]* %39, i64 0, i64 0
%149 = load double, double* %148
store double %149, double* %41
%150 = getelementptr inbounds [2 x double], [2 x double]* %39, i64 0, i64 0
%151 = load double, double* %150
%152 = getelementptr inbounds [2 x double], [2 x double]* %38, i64 0, i64 0
%153 = load double, double* %152
%154 = getelementptr inbounds [2 x double], [2 x double]* %39, i64 0, i64 1
%155 = load double, double* %154
%156 = getelementptr inbounds [2 x double], [2 x double]* %38, i64 0, i64 1
%157 = load double, double* %156
%158 = fmul double %155, %157
%159 = fneg double %158
%160 = call double @llvm.fmuladd.f64(double %151, double %153, double %159)
%161 = getelementptr inbounds [2 x double], [2 x double]* %39, i64 0, i64 0
store double %160, double* %161
%162 = load double, double* %41
%163 = getelementptr inbounds [2 x double], [2 x double]* %38, i64 0, i64 1
%164 = load double, double* %163
%165 = getelementptr inbounds [2 x double], [2 x double]* %39, i64 0, i64 1
%166 = load double, double* %165
%167 = getelementptr inbounds [2 x double], [2 x double]* %38, i64 0, i64 0
%168 = load double, double* %167
%169 = fmul double %166, %168
%170 = call double @llvm.fmuladd.f64(double %162, double %164, double %169)
%171 = getelementptr inbounds [2 x double], [2 x double]* %39, i64 0, i64 1
store double %170, double* %171
%172 = load i32, i32* %26
%173 = load i32, i32* %16
%174 = add nsw i32 %172, %173
store i32 %174, i32* %26
%175 = load i32, i32* %26
%176 = load i32, i32* %17
%177 = icmp sge i32 %175, %176
br i1 %177, label %178, label %182
178: ; preds = %134
%179 = load i32, i32* %17
%180 = load i32, i32* %26
%181 = sub nsw i32 %180, %179
store i32 %181, i32* %26
br label %182
182: ; preds = %178, %134
br label %183
183: ; preds = %182
%184 = load i32, i32* %22
%185 = add nsw i32 %184, 1
store i32 %185, i32* %22
br label %130
186: ; preds = %130
br label %187
187: ; preds = %186
%188 = load i32, i32* %21
%189 = add nsw i32 %188, 1
store i32 %189, i32* %21
br label %90
190: ; preds = %90
%191 = load i32, i32* %24
%192 = load i32, i32* %12
%193 = sdiv i32 %191, %192
store i32 %193, i32* %24
%194 = load i32, i32* %25
%195 = load i32, i32* %12
%196 = mul nsw i32 %194, %195
store i32 %196, i32* %25
br label %197
197: ; preds = %190
%198 = load i32, i32* %28
%199 = add nsw i32 %198, 1
store i32 %199, i32* %28
br label %83
200: ; preds = %83
%201 = load i32, i32* %13
%202 = sub nsw i32 %201, 1
%203 = sdiv i32 %202, 2
%204 = add nsw i32 %203, 1
store i32 %204, i32* %28
br label %205
205: ; preds = %355, %200
%206 = load i32, i32* %28
%207 = load i32, i32* %13
%208 = icmp slt i32 %206, %207
br i1 %208, label %209, label %358
209: ; preds = %205
%210 = load i32, i32* %23
%211 = load i32, i32* %12
%212 = load i32, i32* %13
%213 = load i32, i32* %28
%214 = sub nsw i32 %212, %213
%215 = sub nsw i32 %214, 1
%216 = call i32 @pow(i32 %211, i32 %215)
%217 = sdiv i32 %210, %216
store i32 %217, i32* %33
%218 = load i32, i32* %33
%219 = load i32, i32* %12
%220 = load i32, i32* %12
%221 = mul nsw i32 %219, %220
%222 = sdiv i32 %218, %221
store i32 %222, i32* %32
%223 = load i32, i32* %12
%224 = load i32, i32* %13
%225 = load i32, i32* %28
%226 = sub nsw i32 %224, %225
%227 = sub nsw i32 %226, 1
%228 = call i32 @pow(i32 %223, i32 %227)
store i32 %228, i32* %29
%229 = load i32, i32* %12
%230 = load i32, i32* %28
%231 = call i32 @pow(i32 %229, i32 %230)
store i32 %231, i32* %30
store i32 0, i32* %34
br label %232
232: ; preds = %351, %209
%233 = load i32, i32* %34
%234 = load i32, i32* %29
%235 = icmp slt i32 %233, %234
br i1 %235, label %236, label %354
236: ; preds = %232
store i32 0, i32* %35
br label %237
237: ; preds = %347, %236
%238 = load i32, i32* %35
%239 = load i32, i32* %29
%240 = icmp slt i32 %238, %239
br i1 %240, label %241, label %350
241: ; preds = %237
%242 = load i32, i32* %30
%243 = load i32, i32* %35
%244 = mul nsw i32 %242, %243
%245 = load i32, i32* %18
%246 = mul nsw i32 %244, %245
%247 = load i32, i32* %23
%248 = srem i32 %246, %247
%249 = sitofp i32 %248 to double
%250 = load double, double* %40
%251 = fmul double %249, %250
%252 = fptosi double %251 to i32
%253 = call double @cos(i32 %252)
%254 = getelementptr inbounds [2 x double], [2 x double]* %38, i64 0, i64 0
store double %253, double* %254
%255 = load i32, i32* %30
%256 = load i32, i32* %35
%257 = mul nsw i32 %255, %256
%258 = load i32, i32* %18
%259 = mul nsw i32 %257, %258
%260 = load i32, i32* %23
%261 = srem i32 %259, %260
%262 = sitofp i32 %261 to double
%263 = load double, double* %40
%264 = fmul double %262, %263
%265 = fptosi double %264 to i32
%266 = call double @sin(i32 %265)
%267 = getelementptr inbounds [2 x double], [2 x double]* %38, i64 0, i64 1
store double %266, double* %267
store i32 0, i32* %36
br label %268
268: ; preds = %343, %241
%269 = load i32, i32* %36
%270 = load i32, i32* %32
%271 = load i32, i32* %29
%272 = sdiv i32 %270, %271
%273 = icmp slt i32 %269, %272
br i1 %273, label %274, label %346
274: ; preds = %268
%275 = load i32, i32* %35
%276 = load i32, i32* %12
%277 = load i32, i32* %29
%278 = mul nsw i32 %276, %277
%279 = load i32, i32* %36
%280 = mul nsw i32 %278, %279
%281 = add nsw i32 %275, %280
store i32 %281, i32* %31
%282 = load i32, i32* %34
%283 = load i32, i32* %33
%284 = mul nsw i32 %282, %283
%285 = load i32, i32* %31
%286 = add nsw i32 %284, %285
store i32 %286, i32* %26
%287 = load i32, i32* %26
%288 = load i32, i32* %16
%289 = mul nsw i32 %287, %288
%290 = load i32, i32* %15
%291 = add nsw i32 %289, %290
%292 = load i32, i32* %17
%293 = srem i32 %291, %292
store i32 %293, i32* %26
%294 = load i32, i32* %26
store i32 %294, i32* %27
store i32 0, i32* %21
br label %295
295: ; preds = %326, %274
%296 = load i32, i32* %21
%297 = load i32, i32* %12
%298 = icmp slt i32 %296, %297
br i1 %298, label %299, label %329
299: ; preds = %295
%300 = load double*, double** %11
%301 = load i32, i32* %12
%302 = load i32, i32* %29
%303 = load i32, i32* %16
%304 = mul nsw i32 %302, %303
%305 = load i32, i32* %14
%306 = load i32, i32* %27
%307 = load i32, i32* %17
%308 = load i32, i32* %18
%309 = load i32, i32* %19
%310 = load i32, i32* %20
%311 = getelementptr inbounds [2 x double], [2 x double]* %38, i64 0, i64 0
%312 = call i32 @m1ftrw(double* %300, i32 %301, i32 %304, i32 %305, i32 %306, i32 %307, i32 %308, i32 %309, i32 %310, double* %311)
%313 = load i32, i32* %27
%314 = load i32, i32* %30
%315 = load i32, i32* %16
%316 = mul nsw i32 %314, %315
%317 = add nsw i32 %313, %316
store i32 %317, i32* %27
%318 = load i32, i32* %27
%319 = load i32, i32* %17
%320 = icmp sge i32 %318, %319
br i1 %320, label %321, label %325
321: ; preds = %299
%322 = load i32, i32* %17
%323 = load i32, i32* %27
%324 = sub nsw i32 %323, %322
store i32 %324, i32* %27
br label %325
325: ; preds = %321, %299
br label %326
326: ; preds = %325
%327 = load i32, i32* %21
%328 = add nsw i32 %327, 1
store i32 %328, i32* %21
br label %295
329: ; preds = %295
%330 = load double*, double** %11
%331 = load i32, i32* %12
%332 = load i32, i32* %29
%333 = load i32, i32* %16
%334 = mul nsw i32 %332, %333
%335 = load i32, i32* %30
%336 = load i32, i32* %16
%337 = mul nsw i32 %335, %336
%338 = load i32, i32* %26
%339 = load i32, i32* %17
%340 = load i32, i32* %19
%341 = load i32, i32* %20
%342 = call i32 @m1tr(double* %330, i32 %331, i32 %334, i32 %337, i32 %338, i32 %339, i32 %340, i32 %341)
br label %343
343: ; preds = %329
%344 = load i32, i32* %36
%345 = add nsw i32 %344, 1
store i32 %345, i32* %36
br label %268
346: ; preds = %268
br label %347
347: ; preds = %346
%348 = load i32, i32* %35
%349 = add nsw i32 %348, 1
store i32 %349, i32* %35
br label %237
350: ; preds = %237
br label %351
351: ; preds = %350
%352 = load i32, i32* %34
%353 = add nsw i32 %352, 1
store i32 %353, i32* %34
br label %232
354: ; preds = %232
br label %355
355: ; preds = %354
%356 = load i32, i32* %28
%357 = add nsw i32 %356, 1
store i32 %357, i32* %28
br label %205
358: ; preds = %205
ret void
}

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