#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 */
scalar_t__ cos(float);
scalar_t__ fabs(float);
void a2lsf(float *freq, float *a) {
  float steps[4] = {(float)0.00635, (float)0.003175, (float)0.0015875,
                    (float)0.00079375};
  float step;
  int step_idx;
  int lsp_index;
  float p[10 / 2];
  float q[10 / 2];
  float p_pre[10 / 2];
  float q_pre[10 / 2];
  float old_p, old_q, *old;
  float *pq_coef;
  float omega, old_omega;
  int i;
  float hlp, hlp1, hlp2, hlp3, hlp4, hlp5;
  for (i = 0; i < 10 / 2; i++) {
    p[i] = (float)-1.0 * (a[i + 1] + a[10 - i]);
    q[i] = a[10 - i] - a[i + 1];
  }
  p_pre[0] = (float)-1.0 - p[0];
  p_pre[1] = -p_pre[0] - p[1];
  p_pre[2] = -p_pre[1] - p[2];
  p_pre[3] = -p_pre[2] - p[3];
  p_pre[4] = -p_pre[3] - p[4];
  p_pre[4] = p_pre[4] / 2;
  q_pre[0] = (float)1.0 - q[0];
  q_pre[1] = q_pre[0] - q[1];
  q_pre[2] = q_pre[1] - q[2];
  q_pre[3] = q_pre[2] - q[3];
  q_pre[4] = q_pre[3] - q[4];
  q_pre[4] = q_pre[4] / 2;
  omega = 0.0;
  old_omega = 0.0;
  old_p = (float)1.0e37;
  old_q = (float)1.0e37;
  for (lsp_index = 0; lsp_index < 10; lsp_index++) {
    if ((lsp_index & 0x1) == 0) {
      pq_coef = p_pre;
      old = &old_p;
    } else {
      pq_coef = q_pre;
      old = &old_q;
    }
    for (step_idx = 0, step = steps[step_idx]; step_idx < 4;) {
      hlp = (float)cos(omega * (float)6.283185307);
      hlp1 = (float)2.0 * hlp + pq_coef[0];
      hlp2 = (float)2.0 * hlp * hlp1 - (float)1.0 + pq_coef[1];
      hlp3 = (float)2.0 * hlp * hlp2 - hlp1 + pq_coef[2];
      hlp4 = (float)2.0 * hlp * hlp3 - hlp2 + pq_coef[3];
      hlp5 = hlp * hlp4 - hlp3 + pq_coef[4];
      if (((hlp5 * (*old)) <= 0.0) || (omega >= 0.5)) {
        if (step_idx == (4 - 1)) {
          if (fabs(hlp5) >= fabs(*old)) {
            freq[lsp_index] = omega - step;
          } else {
            freq[lsp_index] = omega;
          }
          if ((*old) >= 0.0) {
            *old = (float)-1.0 * (float)1.0e37;
          } else {
            *old = (float)1.0e37;
          }
          omega = old_omega;
          step_idx = 0;
          step_idx = 4;
        } else {
          if (step_idx == 0) {
            old_omega = omega;
          }
          step_idx++;
          omega -= steps[step_idx];
          step = steps[step_idx];
        }
      } else {
        *old = hlp5;
        omega += step;
      }
    }
  }
  for (i = 0; i < 10; i++) {
    freq[i] = freq[i] * (float)6.283185307;
  }
}


x86 assembly (clang, -O0):
<a2lsf>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xee6(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xee3(%rip),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0xc4(%rbp)
cmpl   $0x5,-0xc4(%rbp)
jge    11f2 <a2lsf+0xd2>
mov    -0x10(%rbp),%rax
mov    -0xc4(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm1
mov    -0x10(%rbp),%rax
mov    $0xa,%ecx
sub    -0xc4(%rbp),%ecx
movslq %ecx,%rcx
addss  (%rax,%rcx,4),%xmm1
movss  0xe78(%rip),%xmm0
mulss  %xmm1,%xmm0
movslq -0xc4(%rbp),%rax
movss  %xmm0,-0x40(%rbp,%rax,4)
mov    -0x10(%rbp),%rax
mov    $0xa,%ecx
sub    -0xc4(%rbp),%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x10(%rbp),%rax
mov    -0xc4(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
subss  (%rax,%rcx,4),%xmm0
movslq -0xc4(%rbp),%rax
movss  %xmm0,-0x60(%rbp,%rax,4)
mov    -0xc4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc4(%rbp)
jmp    1153 <a2lsf+0x33>
movss  0xe12(%rip),%xmm0
subss  -0x40(%rbp),%xmm0
movss  %xmm0,-0x80(%rbp)
movss  -0x80(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
subss  -0x3c(%rbp),%xmm0
movss  %xmm0,-0x7c(%rbp)
movss  -0x7c(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
subss  -0x38(%rbp),%xmm0
movss  %xmm0,-0x78(%rbp)
movss  -0x78(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
subss  -0x34(%rbp),%xmm0
movss  %xmm0,-0x74(%rbp)
movss  -0x74(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
subss  -0x30(%rbp),%xmm0
movss  %xmm0,-0x70(%rbp)
movss  -0x70(%rbp),%xmm0
movss  0xd83(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x70(%rbp)
movss  0xd76(%rip),%xmm0
subss  -0x60(%rbp),%xmm0
movss  %xmm0,-0xa0(%rbp)
ff
movss  -0xa0(%rbp),%xmm0
ff
subss  -0x5c(%rbp),%xmm0
movss  %xmm0,-0x9c(%rbp)
ff
movss  -0x9c(%rbp),%xmm0
ff
subss  -0x58(%rbp),%xmm0
movss  %xmm0,-0x98(%rbp)
ff
movss  -0x98(%rbp),%xmm0
ff
subss  -0x54(%rbp),%xmm0
movss  %xmm0,-0x94(%rbp)
ff
movss  -0x94(%rbp),%xmm0
ff
subss  -0x50(%rbp),%xmm0
movss  %xmm0,-0x90(%rbp)
ff
movss  -0x90(%rbp),%xmm0
ff
movss  0xd01(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x90(%rbp)
ff
xorps  %xmm0,%xmm0
movss  %xmm0,-0xbc(%rbp)
ff
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc0(%rbp)
ff
movss  0xcd3(%rip),%xmm0
movss  %xmm0,-0xa4(%rbp)
ff
movss  0xcc3(%rip),%xmm0
movss  %xmm0,-0xa8(%rbp)
ff
movl   $0x0,-0x2c(%rbp)
cmpl   $0xa,-0x2c(%rbp)
jge    16c9 <a2lsf+0x5a9>
mov    -0x2c(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
jne    1383 <a2lsf+0x263>
lea    -0x80(%rbp),%rax
mov    %rax,-0xb8(%rbp)
lea    -0xa4(%rbp),%rax
mov    %rax,-0xb0(%rbp)
jmp    139f <a2lsf+0x27f>
lea    -0xa0(%rbp),%rax
mov    %rax,-0xb8(%rbp)
lea    -0xa8(%rbp),%rax
mov    %rax,-0xb0(%rbp)
movl   $0x0,-0x28(%rbp)
movslq -0x28(%rbp),%rax
movss  -0x20(%rbp,%rax,4),%xmm0
movss  %xmm0,-0x24(%rbp)
cmpl   $0x4,-0x28(%rbp)
jge    16b6 <a2lsf+0x596>
movss  0xc49(%rip),%xmm0
mulss  -0xbc(%rbp),%xmm0
ff
call   1040 <cos@plt>
cvtsi2ss %rax,%xmm0
movss  %xmm0,-0xc8(%rbp)
ff
movss  -0xc8(%rbp),%xmm0
ff
mov    -0xb8(%rbp),%rax
movss  (%rax),%xmm1
addss  %xmm0,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0xcc(%rbp)
ff
movss  0xbf8(%rip),%xmm0
mulss  -0xc8(%rbp),%xmm0
ff
movss  -0xcc(%rbp),%xmm1
ff
mulss  %xmm1,%xmm0
movss  0xbe4(%rip),%xmm1
addss  %xmm1,%xmm0
mov    -0xb8(%rbp),%rax
addss  0x4(%rax),%xmm0
movss  %xmm0,-0xd0(%rbp)
ff
movss  0xbbc(%rip),%xmm0
mulss  -0xc8(%rbp),%xmm0
ff
movss  -0xd0(%rbp),%xmm2
ff
movss  -0xcc(%rbp),%xmm1
ff
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0xb8(%rbp),%rax
addss  0x8(%rax),%xmm0
movss  %xmm0,-0xd4(%rbp)
ff
movss  0xb73(%rip),%xmm0
mulss  -0xc8(%rbp),%xmm0
ff
movss  -0xd4(%rbp),%xmm2
ff
movss  -0xd0(%rbp),%xmm1
ff
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0xb8(%rbp),%rax
addss  0xc(%rax),%xmm0
movss  %xmm0,-0xd8(%rbp)
ff
movss  -0xc8(%rbp),%xmm0
ff
movss  -0xd8(%rbp),%xmm2
ff
movss  -0xd4(%rbp),%xmm1
ff
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0xb8(%rbp),%rax
addss  0x10(%rax),%xmm0
movss  %xmm0,-0xdc(%rbp)
ff
movss  -0xdc(%rbp),%xmm0
ff
mov    -0xb0(%rbp),%rax
mulss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jae    1555 <a2lsf+0x435>
movss  -0xbc(%rbp),%xmm0
ff
cvtss2sd %xmm0,%xmm0
movsd  0xacd(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1689 <a2lsf+0x569>
cmpl   $0x3,-0x28(%rbp)
jne    1634 <a2lsf+0x514>
movss  -0xdc(%rbp),%xmm0
ff
call   1030 <fabs@plt>
mov    %rax,-0xe8(%rbp)
mov    -0xb0(%rbp),%rax
movss  (%rax),%xmm0
call   1030 <fabs@plt>
mov    %rax,%rcx
mov    -0xe8(%rbp),%rax
cmp    %rcx,%rax
jl     15b5 <a2lsf+0x495>
movss  -0xbc(%rbp),%xmm0
ff
subss  -0x24(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
jmp    15ca <a2lsf+0x4aa>
movss  -0xbc(%rbp),%xmm0
ff
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0xb0(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     15fe <a2lsf+0x4de>
mov    -0xb0(%rbp),%rax
movss  0xa1f(%rip),%xmm0
movss  %xmm0,(%rax)
jmp    1611 <a2lsf+0x4f1>
mov    -0xb0(%rbp),%rax
movss  0x9f3(%rip),%xmm0
movss  %xmm0,(%rax)
movss  -0xc0(%rbp),%xmm0
ff
movss  %xmm0,-0xbc(%rbp)
ff
movl   $0x0,-0x28(%rbp)
movl   $0x4,-0x28(%rbp)
jmp    1684 <a2lsf+0x564>
cmpl   $0x0,-0x28(%rbp)
jne    164e <a2lsf+0x52e>
movss  -0xbc(%rbp),%xmm0
ff
movss  %xmm0,-0xc0(%rbp)
ff
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
movslq -0x28(%rbp),%rax
movss  -0x20(%rbp,%rax,4),%xmm1
movss  -0xbc(%rbp),%xmm0
ff
subss  %xmm1,%xmm0
movss  %xmm0,-0xbc(%rbp)
ff
movslq -0x28(%rbp),%rax
movss  -0x20(%rbp,%rax,4),%xmm0
movss  %xmm0,-0x24(%rbp)
jmp    16b1 <a2lsf+0x591>
movss  -0xdc(%rbp),%xmm0
ff
mov    -0xb0(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x24(%rbp),%xmm0
addss  -0xbc(%rbp),%xmm0
ff
movss  %xmm0,-0xbc(%rbp)
ff
jmp    13b5 <a2lsf+0x295>
jmp    16bb <a2lsf+0x59b>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    134c <a2lsf+0x22c>
movl   $0x0,-0xc4(%rbp)
cmpl   $0xa,-0xc4(%rbp)
jge    171c <a2lsf+0x5fc>
mov    -0x8(%rbp),%rax
movslq -0xc4(%rbp),%rcx
movss  0x91d(%rip),%xmm0
mulss  (%rax,%rcx,4),%xmm0
mov    -0x8(%rbp),%rax
movslq -0xc4(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0xc4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc4(%rbp)
jmp    16d3 <a2lsf+0x5b3>
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a2lsf>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %rdi,0x50(%rsp)
movss  0x28(%rsi),%xmm8
movss  0x4(%rsi),%xmm6
movss  0x8(%rsi),%xmm0
movaps %xmm6,%xmm7
addss  %xmm8,%xmm7
movss  0x24(%rsi),%xmm9
movaps %xmm0,%xmm2
addss  %xmm9,%xmm2
subss  %xmm0,%xmm9
movss  0xc(%rsi),%xmm4
movss  0x20(%rsi),%xmm10
movaps %xmm4,%xmm3
addss  %xmm10,%xmm3
subss  %xmm4,%xmm10
movss  0x10(%rsi),%xmm1
movss  0x1c(%rsi),%xmm11
movaps %xmm1,%xmm5
addss  %xmm11,%xmm5
subss  %xmm1,%xmm11
movss  0x14(%rsi),%xmm1
movss  0x18(%rsi),%xmm0
movaps %xmm1,%xmm4
addss  %xmm0,%xmm4
subss  %xmm1,%xmm0
addss  0xe55(%rip),%xmm7
movss  %xmm7,0x40(%rsp)
subss  %xmm7,%xmm2
movss  %xmm2,0x3c(%rsp)
subss  %xmm2,%xmm3
movss  %xmm3,0x38(%rsp)
subss  %xmm3,%xmm5
movss  %xmm5,0x34(%rsp)
subss  %xmm5,%xmm4
movss  %xmm4,0x30(%rsp)
subss  %xmm8,%xmm6
addss  0xe1e(%rip),%xmm6
movss  %xmm6,0x2c(%rsp)
subss  %xmm9,%xmm6
movss  %xmm6,0x28(%rsp)
subss  %xmm10,%xmm6
movss  %xmm6,0x24(%rsp)
subss  %xmm11,%xmm6
movss  %xmm6,0x20(%rsp)
subss  %xmm0,%xmm6
movss  %xmm6,0x1c(%rsp)
movl   $0x7cf0bdc2,0x4c(%rsp)
7c
movl   $0x7cf0bdc2,0x48(%rsp)
7c
xor    %ebx,%ebx
lea    0x4c(%rsp),%r15
lea    0x48(%rsp),%r14
lea    0xdf6(%rip),%r12
xorps  %xmm1,%xmm1
xorps  %xmm0,%xmm0
movss  %xmm0,0x4(%rsp)
jmp    129b <a2lsf+0x17b>
nopl   0x0(%rax,%rax,1)
movss  0x18(%rsp),%xmm2
subss  %xmm1,%xmm2
mov    0x50(%rsp),%rax
movss  %xmm2,(%rax,%rbx,4)
movss  0x0(%r13),%xmm1
xor    %eax,%eax
ucomiss %xmm0,%xmm1
setb   %al
lea    0xd9f(%rip),%rcx
movss  (%rcx,%rax,4),%xmm0
movss  %xmm0,0x0(%r13)
movss  0x4(%rsp),%xmm1
mov    %rbp,%r15
add    $0x1,%rbx
cmp    $0xa,%rbx
je     145f <a2lsf+0x33f>
mov    %r14,%r13
movss  0x40(%rsp),%xmm0
movss  %xmm0,0x14(%rsp)
movss  0x3c(%rsp),%xmm0
movss  %xmm0,0x10(%rsp)
movss  0x38(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
movss  0x34(%rsp),%xmm0
movss  %xmm0,0x8(%rsp)
movss  0x30(%rsp),%xmm3
test   $0x1,%bl
cmove  %r15,%r13
je     1313 <a2lsf+0x1f3>
movss  0x2c(%rsp),%xmm0
movss  %xmm0,0x14(%rsp)
movss  0x28(%rsp),%xmm0
movss  %xmm0,0x10(%rsp)
movss  0x24(%rsp),%xmm0
movss  %xmm0,0xc(%rsp)
movss  0x20(%rsp),%xmm0
movss  %xmm0,0x8(%rsp)
movss  0x1c(%rsp),%xmm3
mulss  0xced(%rip),%xmm3
xor    %ebp,%ebp
movss  0xce7(%rip),%xmm0
movss  %xmm0,(%rsp)
movss  %xmm3,0x44(%rsp)
jmp    1354 <a2lsf+0x234>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movss  %xmm0,0x0(%r13)
addss  (%rsp),%xmm1
cmp    $0x4,%ebp
jge    128d <a2lsf+0x16d>
movss  %xmm1,0x18(%rsp)
movaps %xmm1,%xmm0
mulss  0xcab(%rip),%xmm0
call   1040 <cos@plt>
xorps  %xmm1,%xmm1
cvtsi2ss %rax,%xmm1
movaps %xmm1,%xmm0
addss  %xmm1,%xmm0
movaps %xmm0,%xmm2
addss  0x14(%rsp),%xmm2
movaps %xmm0,%xmm3
mulss  %xmm2,%xmm3
addss  0xc6f(%rip),%xmm3
addss  0x10(%rsp),%xmm3
movaps %xmm0,%xmm4
mulss  %xmm3,%xmm4
subss  %xmm2,%xmm4
addss  0xc(%rsp),%xmm4
mulss  %xmm4,%xmm0
subss  %xmm3,%xmm0
movss  0x44(%rsp),%xmm3
addss  0x8(%rsp),%xmm0
mulss  %xmm1,%xmm0
subss  %xmm4,%xmm0
addss  %xmm3,%xmm0
movss  0x0(%r13),%xmm1
mulss  %xmm0,%xmm1
xorps  %xmm2,%xmm2
ucomiss %xmm1,%xmm2
movss  0x18(%rsp),%xmm1
jae    13ed <a2lsf+0x2cd>
ucomiss 0xc21(%rip),%xmm1
jb     1340 <a2lsf+0x220>
test   %ebp,%ebp
je     1400 <a2lsf+0x2e0>
cmp    $0x3,%ebp
jne    1406 <a2lsf+0x2e6>
jmp    1430 <a2lsf+0x310>
nopl   0x0(%rax,%rax,1)
movss  %xmm1,0x4(%rsp)
movslq %ebp,%rax
add    $0x1,%ebp
movss  0x4(%r12,%rax,4),%xmm0
movss  %xmm0,(%rsp)
subss  %xmm0,%xmm1
cmp    $0x4,%ebp
jl     1354 <a2lsf+0x234>
jmp    128d <a2lsf+0x16d>
nopw   0x0(%rax,%rax,1)
mov    %r15,%rbp
call   1030 <fabs@plt>
mov    %rax,%r15
movss  0x0(%r13),%xmm0
call   1030 <fabs@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
cmp    %rax,%r15
jl     1250 <a2lsf+0x130>
movss  (%rsp),%xmm1
jmp    1250 <a2lsf+0x130>
movaps 0xbba(%rip),%xmm0
mov    0x50(%rsp),%rax
movups (%rax),%xmm1
movups 0x10(%rax),%xmm2
mulps  %xmm0,%xmm1
movups %xmm1,(%rax)
mulps  %xmm0,%xmm2
movups %xmm2,0x10(%rax)
movss  0x20(%rax),%xmm0
movss  0xb84(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,0x20(%rax)
mulss  0x24(%rax),%xmm1
movss  %xmm1,0x24(%rax)
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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