#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double cos(double);
double sin(double);
void mp_mul_rcsqu_save(int n, double *a, double *b) {
  int i, i0, j, k;
  double ec, w1r, w1i, wkr, wki, wdr, wdi, ss;
  double xr, xi, yr, yi, ajr, aji, akr, aki;
  ec = 2 * ((double)1.570796326794896619231321691639751442098584) / n;
  wkr = 0;
  wki = 0;
  wdi = cos(ec);
  wdr = sin(ec);
  wdi *= wdr;
  wdr *= wdr;
  w1r = 1 - 2 * wdr;
  w1i = 2 * wdi;
  ss = 2 * w1i;
  i = n >> 1;
  xr = a[i];
  xi = a[i + 1];
  b[i] = xr * xr - xi * xi;
  b[i + 1] = 2 * xr * xi;
  for (;;) {
    i0 = i - 4 * 64;
    if (i0 < 2) {
      i0 = 2;
    }
    for (j = i - 2; j >= i0; j -= 2) {
      k = n - j;
      xr = wkr + ss * wdi;
      xi = wki + ss * (((double)0.5) - wdr);
      wkr = wdr;
      wki = wdi;
      wdr = xr;
      wdi = xi;
      xr = a[j] - a[k];
      xi = a[j + 1] + a[k + 1];
      yr = wkr * xr - wki * xi;
      yi = wkr * xi + wki * xr;
      xr = a[j] - yr;
      xi = a[j + 1] - yi;
      yr = a[k] + yr;
      yi = a[k + 1] - yi;
      a[j] = xr;
      a[j + 1] = xi;
      a[k] = yr;
      a[k + 1] = yi;
      ajr = xr * xr - xi * xi;
      aji = 2 * xr * xi;
      akr = yr * yr - yi * yi;
      aki = 2 * yr * yi;
      xr = ajr - akr;
      xi = aji + aki;
      yr = wkr * xr + wki * xi;
      yi = wkr * xi - wki * xr;
      b[j] = ajr - yr;
      b[j + 1] = aji - yi;
      b[k] = akr + yr;
      b[k + 1] = aki - yi;
    }
    if (i0 == 2) {
      break;
    }
    wkr = ((double)0.5) * sin(ec * i0);
    wki = ((double)0.5) * cos(ec * i0);
    wdr = ((double)0.5) - (wkr * w1r - wki * w1i);
    wdi = wkr * w1i + wki * w1r;
    wkr = ((double)0.5) - wkr;
    i = i0;
  }
}


x86 assembly (clang, -O0):
<mp_mul_rcsqu_save>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm1
movsd  0xecd(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x48(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x30(%rbp),%xmm0
call   1040 <cos@plt>
movsd  %xmm0,-0x60(%rbp)
movsd  -0x30(%rbp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x58(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm1
addsd  %xmm1,%xmm1
movsd  0xe5f(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xe46(%rip),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xe34(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x70(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm2
movsd  -0x78(%rbp),%xmm1
mulsd  -0x78(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  0xdb0(%rip),%xmm0
mulsd  -0x70(%rbp),%xmm0
mulsd  -0x78(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
sub    $0x100,%eax
mov    %eax,-0x20(%rbp)
cmpl   $0x2,-0x20(%rbp)
jge    1288 <mp_mul_rcsqu_save+0x168>
movl   $0x2,-0x20(%rbp)
mov    -0x1c(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x20(%rbp),%eax
jl     1635 <mp_mul_rcsqu_save+0x515>
mov    -0x4(%rbp),%eax
sub    -0x24(%rbp),%eax
mov    %eax,-0x28(%rbp)
movsd  -0x48(%rbp),%xmm1
movsd  -0x68(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x50(%rbp),%xmm1
movsd  -0x68(%rbp),%xmm0
movsd  0xd44(%rip),%xmm2
subsd  -0x58(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
addsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
mulsd  -0x78(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
mulsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x78(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
subsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x78(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x80(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x88(%rbp),%xmm0
ff
mov    -0x10(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x70(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm2
movsd  -0x78(%rbp),%xmm1
mulsd  -0x78(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  0xb47(%rip),%xmm0
mulsd  -0x70(%rbp),%xmm0
mulsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm2
movsd  -0x88(%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  0xaec(%rip),%xmm0
mulsd  -0x80(%rbp),%xmm0
mulsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
subsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0x70(%rbp)
movsd  -0x98(%rbp),%xmm0
ff
addsd  -0xa8(%rbp),%xmm0
ff
movsd  %xmm0,-0x78(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
mulsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
mulsd  -0x70(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
subsd  -0x80(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x98(%rbp),%xmm0
ff
subsd  -0x88(%rbp),%xmm0
ff
mov    -0x18(%rbp),%rax
mov    -0x24(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0xa0(%rbp),%xmm0
ff
addsd  -0x80(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0xa8(%rbp),%xmm0
ff
subsd  -0x88(%rbp),%xmm0
ff
mov    -0x18(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x24(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x24(%rbp)
jmp    1291 <mp_mul_rcsqu_save+0x171>
cmpl   $0x2,-0x20(%rbp)
jne    1644 <mp_mul_rcsqu_save+0x524>
jmp    1714 <mp_mul_rcsqu_save+0x5f4>
movsd  -0x30(%rbp),%xmm0
cvtsi2sdl -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
call   1030 <sin@plt>
movaps %xmm0,%xmm1
movsd  0x9b6(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x30(%rbp),%xmm0
cvtsi2sdl -0x20(%rbp),%xmm1
mulsd  %xmm1,%xmm0
call   1040 <cos@plt>
movaps %xmm0,%xmm1
movsd  0x98f(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x48(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0x94b(%rip),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
mulsd  -0x38(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0x919(%rip),%xmm0
subsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    126c <mp_mul_rcsqu_save+0x14c>
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp_mul_rcsqu_save>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x40,%rsp
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %edi,%ebp
cvtsi2sd %edi,%xmm1
movsd  0xec0(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rsp)
call   1040 <cos@plt>
movapd %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1030 <sin@plt>
movapd 0x10(%rsp),%xmm7
mulsd  %xmm0,%xmm7
mulsd  %xmm0,%xmm0
movapd %xmm0,%xmm1
addsd  %xmm0,%xmm1
movsd  0xe8a(%rip),%xmm2
subsd  %xmm1,%xmm2
movsd  %xmm2,0x30(%rsp)
movapd %xmm7,%xmm1
addsd  %xmm7,%xmm1
movsd  %xmm1,0x28(%rsp)
movapd %xmm1,%xmm12
addsd  %xmm1,%xmm12
movslq %ebp,%r15
sar    %ebp
movslq %ebp,%rax
movsd  (%rbx,%rax,8),%xmm1
movsd  0x8(%rbx,%rax,8),%xmm2
movapd %xmm1,%xmm3
addsd  %xmm1,%xmm1
mulsd  %xmm2,%xmm1
mulsd  %xmm2,%xmm2
mulsd  %xmm3,%xmm3
subsd  %xmm2,%xmm3
movsd  %xmm3,(%r14,%rax,8)
movsd  %xmm1,0x8(%r14,%rax,8)
add    $0x2,%r15
xorpd  %xmm10,%xmm10
movsd  0xe26(%rip),%xmm13
movapd 0xe2d(%rip),%xmm14
xorpd  %xmm4,%xmm4
movsd  %xmm12,0x20(%rsp)
xchg   %ax,%ax
cmp    $0x103,%ebp
mov    $0x102,%eax
cmovge %ebp,%eax
lea    -0x100(%rax),%r12d
add    $0xffffff02,%eax
cmp    %eax,%ebp
jl     1388 <mp_mul_rcsqu_save+0x268>
movslq %ebp,%rax
mov    %r12d,%ecx
mov    %r15,%rdx
sub    %rax,%rdx
add    $0xfffffffffffffffe,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movapd %xmm12,%xmm8
mulsd  %xmm7,%xmm8
addsd  %xmm4,%xmm8
movapd %xmm13,%xmm9
subsd  %xmm0,%xmm9
mulsd  %xmm12,%xmm9
addsd  %xmm10,%xmm9
movupd (%rbx,%rax,8),%xmm6
movupd (%rbx,%rdx,8),%xmm1
movapd %xmm6,%xmm2
subpd  %xmm1,%xmm2
movapd %xmm6,%xmm3
addpd  %xmm1,%xmm3
movapd %xmm3,%xmm4
movsd  %xmm2,%xmm4
movapd %xmm7,%xmm5
xorpd  %xmm14,%xmm5
shufpd $0x1,%xmm7,%xmm3
unpcklpd %xmm2,%xmm5
mulpd  %xmm3,%xmm5
movapd %xmm0,%xmm2
unpcklpd %xmm0,%xmm2
mulpd  %xmm4,%xmm2
addpd  %xmm5,%xmm2
subpd  %xmm2,%xmm6
movapd %xmm6,%xmm4
unpckhpd %xmm6,%xmm4
movapd %xmm1,%xmm5
addpd  %xmm2,%xmm5
subpd  %xmm2,%xmm1
movapd %xmm1,%xmm2
movsd  %xmm5,%xmm2
movupd %xmm6,(%rbx,%rax,8)
movupd %xmm2,(%rbx,%rdx,8)
movapd %xmm6,%xmm3
addsd  %xmm6,%xmm6
mulsd  %xmm4,%xmm6
mulsd  %xmm4,%xmm4
mulsd  %xmm3,%xmm3
subsd  %xmm4,%xmm3
unpckhpd %xmm1,%xmm1
movapd %xmm5,%xmm11
addsd  %xmm5,%xmm5
mulsd  %xmm1,%xmm5
mulsd  %xmm1,%xmm1
mulsd  %xmm11,%xmm11
subsd  %xmm1,%xmm11
movapd %xmm3,%xmm2
subsd  %xmm11,%xmm2
movapd %xmm6,%xmm4
addsd  %xmm5,%xmm4
movapd %xmm0,%xmm1
mulsd  %xmm2,%xmm1
mulsd  %xmm7,%xmm2
movapd %xmm7,%xmm10
mulsd  %xmm4,%xmm7
addsd  %xmm7,%xmm1
mulsd  %xmm0,%xmm4
subsd  %xmm2,%xmm4
subsd  %xmm1,%xmm3
movsd  %xmm3,(%r14,%rax,8)
subsd  %xmm4,%xmm6
movsd  %xmm6,0x8(%r14,%rax,8)
addsd  %xmm11,%xmm1
movsd  %xmm1,(%r14,%rdx,8)
subsd  %xmm4,%xmm5
movsd  %xmm5,0x8(%r14,%rdx,8)
add    $0xfffffffffffffffe,%rax
add    $0x2,%rdx
movapd %xmm0,%xmm4
movapd %xmm8,%xmm0
movapd %xmm9,%xmm7
cmp    %rcx,%rax
jge    1240 <mp_mul_rcsqu_save+0x120>
cmp    $0x2,%r12d
je     1439 <mp_mul_rcsqu_save+0x319>
xorps  %xmm0,%xmm0
cvtsi2sd %r12d,%xmm0
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x38(%rsp)
call   1030 <sin@plt>
mulsd  0xc5d(%rip),%xmm0
movapd %xmm0,0x10(%rsp)
movsd  0x38(%rsp),%xmm0
call   1040 <cos@plt>
movapd 0xc53(%rip),%xmm14
movsd  0xc3a(%rip),%xmm13
movsd  0x20(%rsp),%xmm12
movapd 0x10(%rsp),%xmm7
movapd %xmm0,%xmm10
mulsd  %xmm13,%xmm10
movsd  0x28(%rsp),%xmm3
movapd %xmm3,%xmm0
mulsd  %xmm10,%xmm0
movapd %xmm7,%xmm1
movsd  0x30(%rsp),%xmm2
mulsd  %xmm2,%xmm1
subsd  %xmm0,%xmm1
movapd %xmm13,%xmm0
subsd  %xmm1,%xmm0
movapd %xmm2,%xmm1
mulsd  %xmm10,%xmm1
movapd %xmm13,%xmm4
subsd  %xmm7,%xmm4
mulsd  %xmm3,%xmm7
addsd  %xmm1,%xmm7
mov    %r12d,%ebp
jmp    1200 <mp_mul_rcsqu_save+0xe0>
add    $0x40,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

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