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


x86 assembly (clang, -O0):
<a2lsf>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0xb4(%rbp)
cmpl   $0x5,-0xb4(%rbp)
jge    11dc <a2lsf+0xbc>
mov    -0x10(%rbp),%rax
mov    -0xb4(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm1
mov    -0x10(%rbp),%rax
mov    $0xa,%ecx
sub    -0xb4(%rbp),%ecx
movslq %ecx,%rcx
addss  (%rax,%rcx,4),%xmm1
movss  0xe8e(%rip),%xmm0
mulss  %xmm1,%xmm0
movslq -0xb4(%rbp),%rax
movss  %xmm0,-0x30(%rbp,%rax,4)
mov    -0x10(%rbp),%rax
mov    $0xa,%ecx
sub    -0xb4(%rbp),%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x10(%rbp),%rax
mov    -0xb4(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
subss  (%rax,%rcx,4),%xmm0
movslq -0xb4(%rbp),%rax
movss  %xmm0,-0x50(%rbp,%rax,4)
mov    -0xb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb4(%rbp)
jmp    113d <a2lsf+0x1d>
movss  0xe28(%rip),%xmm0
subss  -0x30(%rbp),%xmm0
movss  %xmm0,-0x70(%rbp)
movss  -0x70(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
subss  -0x2c(%rbp),%xmm0
movss  %xmm0,-0x6c(%rbp)
movss  -0x6c(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
subss  -0x28(%rbp),%xmm0
movss  %xmm0,-0x68(%rbp)
movss  -0x68(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
subss  -0x24(%rbp),%xmm0
movss  %xmm0,-0x64(%rbp)
movss  -0x64(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
subss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x60(%rbp)
movss  -0x60(%rbp),%xmm0
movss  0xd99(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x60(%rbp)
movss  0xd8c(%rip),%xmm0
subss  -0x50(%rbp),%xmm0
movss  %xmm0,-0x90(%rbp)
ff
movss  -0x90(%rbp),%xmm0
ff
subss  -0x4c(%rbp),%xmm0
movss  %xmm0,-0x8c(%rbp)
ff
movss  -0x8c(%rbp),%xmm0
ff
subss  -0x48(%rbp),%xmm0
movss  %xmm0,-0x88(%rbp)
ff
movss  -0x88(%rbp),%xmm0
ff
subss  -0x44(%rbp),%xmm0
movss  %xmm0,-0x84(%rbp)
ff
movss  -0x84(%rbp),%xmm0
ff
subss  -0x40(%rbp),%xmm0
movss  %xmm0,-0x80(%rbp)
movss  -0x80(%rbp),%xmm0
movss  0xd1d(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x80(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0xac(%rbp)
ff
xorps  %xmm0,%xmm0
movss  %xmm0,-0xb0(%rbp)
ff
movss  0xcf2(%rip),%xmm0
movss  %xmm0,-0x94(%rbp)
ff
movss  0xce2(%rip),%xmm0
movss  %xmm0,-0x98(%rbp)
ff
movl   $0x0,-0x1c(%rbp)
cmpl   $0xa,-0x1c(%rbp)
jge    16a8 <a2lsf+0x588>
mov    -0x1c(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
jne    1364 <a2lsf+0x244>
lea    -0x70(%rbp),%rax
mov    %rax,-0xa8(%rbp)
lea    -0x94(%rbp),%rax
mov    %rax,-0xa0(%rbp)
jmp    1380 <a2lsf+0x260>
lea    -0x90(%rbp),%rax
mov    %rax,-0xa8(%rbp)
lea    -0x98(%rbp),%rax
mov    %rax,-0xa0(%rbp)
movl   $0x0,-0x18(%rbp)
movslq -0x18(%rbp),%rcx
lea    0xc8e(%rip),%rax
movss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x14(%rbp)
cmpl   $0x4,-0x18(%rbp)
jge    1695 <a2lsf+0x575>
movss  0xc62(%rip),%xmm0
mulss  -0xac(%rbp),%xmm0
ff
call   1040 <cosf@plt>
movss  %xmm0,-0xb8(%rbp)
ff
movss  -0xb8(%rbp),%xmm0
ff
mov    -0xa8(%rbp),%rax
movss  (%rax),%xmm1
addss  %xmm0,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0xbc(%rbp)
ff
movss  0xc16(%rip),%xmm0
mulss  -0xb8(%rbp),%xmm0
ff
movss  -0xbc(%rbp),%xmm1
ff
mulss  %xmm1,%xmm0
movss  0xc02(%rip),%xmm1
addss  %xmm1,%xmm0
mov    -0xa8(%rbp),%rax
addss  0x4(%rax),%xmm0
movss  %xmm0,-0xc0(%rbp)
ff
movss  0xbda(%rip),%xmm0
mulss  -0xb8(%rbp),%xmm0
ff
movss  -0xc0(%rbp),%xmm2
ff
movss  -0xbc(%rbp),%xmm1
ff
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0xa8(%rbp),%rax
addss  0x8(%rax),%xmm0
movss  %xmm0,-0xc4(%rbp)
ff
movss  0xb91(%rip),%xmm0
mulss  -0xb8(%rbp),%xmm0
ff
movss  -0xc4(%rbp),%xmm2
ff
movss  -0xc0(%rbp),%xmm1
ff
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0xa8(%rbp),%rax
addss  0xc(%rax),%xmm0
movss  %xmm0,-0xc8(%rbp)
ff
movss  -0xb8(%rbp),%xmm0
ff
movss  -0xc8(%rbp),%xmm2
ff
movss  -0xc4(%rbp),%xmm1
ff
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0xa8(%rbp),%rax
addss  0x10(%rax),%xmm0
movss  %xmm0,-0xcc(%rbp)
ff
movss  -0xcc(%rbp),%xmm1
ff
mov    -0xa0(%rbp),%rax
mulss  (%rax),%xmm1
xorps  %xmm0,%xmm0
ucomiss %xmm1,%xmm0
jae    152d <a2lsf+0x40d>
movss  -0xac(%rbp),%xmm0
ff
movss  0xaf0(%rip),%xmm1
ucomiss %xmm1,%xmm0
jb     1668 <a2lsf+0x548>
cmpl   $0x3,-0x18(%rbp)
jne    1607 <a2lsf+0x4e7>
movss  -0xcc(%rbp),%xmm0
ff
call   1030 <fabsf@plt>
mov    %rax,-0xd8(%rbp)
mov    -0xa0(%rbp),%rax
movss  (%rax),%xmm0
call   1030 <fabsf@plt>
mov    %rax,%rcx
mov    -0xd8(%rbp),%rax
cmp    %rcx,%rax
jl     158d <a2lsf+0x46d>
movss  -0xac(%rbp),%xmm0
ff
subss  -0x14(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
jmp    15a2 <a2lsf+0x482>
movss  -0xac(%rbp),%xmm0
ff
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0xa0(%rbp),%rax
movss  (%rax),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     15d1 <a2lsf+0x4b1>
mov    -0xa0(%rbp),%rax
movss  0xa50(%rip),%xmm0
movss  %xmm0,(%rax)
jmp    15e4 <a2lsf+0x4c4>
mov    -0xa0(%rbp),%rax
movss  0xa20(%rip),%xmm0
movss  %xmm0,(%rax)
movss  -0xb0(%rbp),%xmm0
ff
movss  %xmm0,-0xac(%rbp)
ff
movl   $0x0,-0x18(%rbp)
movl   $0x4,-0x18(%rbp)
jmp    1663 <a2lsf+0x543>
cmpl   $0x0,-0x18(%rbp)
jne    1621 <a2lsf+0x501>
movss  -0xac(%rbp),%xmm0
ff
movss  %xmm0,-0xb0(%rbp)
ff
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
movslq -0x18(%rbp),%rcx
lea    0x9eb(%rip),%rax
movss  (%rax,%rcx,4),%xmm1
movss  -0xac(%rbp),%xmm0
ff
subss  %xmm1,%xmm0
movss  %xmm0,-0xac(%rbp)
ff
movslq -0x18(%rbp),%rcx
lea    0x9c7(%rip),%rax
movss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1690 <a2lsf+0x570>
movss  -0xcc(%rbp),%xmm0
ff
mov    -0xa0(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x14(%rbp),%xmm0
addss  -0xac(%rbp),%xmm0
ff
movss  %xmm0,-0xac(%rbp)
ff
jmp    139c <a2lsf+0x27c>
jmp    169a <a2lsf+0x57a>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    132d <a2lsf+0x20d>
movl   $0x0,-0xb4(%rbp)
cmpl   $0xa,-0xb4(%rbp)
jge    16f0 <a2lsf+0x5d0>
mov    -0x8(%rbp),%rax
movslq -0xb4(%rbp),%rcx
movss  0x93e(%rip),%xmm0
mulss  (%rax,%rcx,4),%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0xb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb4(%rbp)
jmp    16b2 <a2lsf+0x592>
add    $0xe0,%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     144f <a2lsf+0x32f>
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 <cosf@plt>
movaps %xmm0,%xmm1
addss  %xmm0,%xmm0
movaps %xmm0,%xmm2
addss  0x14(%rsp),%xmm2
movaps %xmm0,%xmm3
mulss  %xmm2,%xmm3
addss  0xc77(%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    13e5 <a2lsf+0x2c5>
ucomiss 0xc29(%rip),%xmm1
jb     1340 <a2lsf+0x220>
test   %ebp,%ebp
je     13f0 <a2lsf+0x2d0>
cmp    $0x3,%ebp
jne    13f6 <a2lsf+0x2d6>
jmp    1420 <a2lsf+0x300>
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 <fabsf@plt>
mov    %rax,%r15
movss  0x0(%r13),%xmm0
call   1030 <fabsf@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
cmp    %rax,%r15
jl     1250 <a2lsf+0x130>
movss  (%rsp),%xmm1
jmp    1250 <a2lsf+0x130>
movaps 0xbca(%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  0xb94(%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):
@a2lsf.steps = internal constant [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 float
%6 = alloca i32
%7 = alloca i32
%8 = alloca [5 x float]
%9 = alloca [5 x float]
%10 = alloca [5 x float]
%11 = alloca [5 x float]
%12 = alloca float
%13 = alloca float
%14 = alloca float*
%15 = alloca float*
%16 = alloca float
%17 = alloca float
%18 = alloca i32
%19 = alloca float
%20 = alloca float
%21 = alloca float
%22 = alloca float
%23 = alloca float
%24 = alloca float
store float* %0, float** %3
store float* %1, float** %4
store i32 0, i32* %18
br label %25
25: ; preds = %62, %2
%26 = load i32, i32* %18
%27 = icmp slt i32 %26, 5
br i1 %27, label %28, label %65
28: ; preds = %25
%29 = load float*, float** %4
%30 = load i32, i32* %18
%31 = add nsw i32 %30, 1
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds float, float* %29, i64 %32
%34 = load float, float* %33
%35 = load float*, float** %4
%36 = load i32, i32* %18
%37 = sub nsw i32 10, %36
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds float, float* %35, i64 %38
%40 = load float, float* %39
%41 = fadd float %34, %40
%42 = fmul float -1.000000e+00, %41
%43 = load i32, i32* %18
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [5 x float], [5 x float]* %8, i64 0, i64 %44
store float %42, float* %45
%46 = load float*, float** %4
%47 = load i32, i32* %18
%48 = sub nsw i32 10, %47
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds float, float* %46, i64 %49
%51 = load float, float* %50
%52 = load float*, float** %4
%53 = load i32, i32* %18
%54 = add nsw i32 %53, 1
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds float, float* %52, i64 %55
%57 = load float, float* %56
%58 = fsub float %51, %57
%59 = load i32, i32* %18
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds [5 x float], [5 x float]* %9, i64 0, i64 %60
store float %58, float* %61
br label %62
62: ; preds = %28
%63 = load i32, i32* %18
%64 = add nsw i32 %63, 1
store i32 %64, i32* %18
br label %25
65: ; preds = %25
%66 = getelementptr inbounds [5 x float], [5 x float]* %8, i64 0, i64 0
%67 = load float, float* %66
%68 = fsub float -1.000000e+00, %67
%69 = getelementptr inbounds [5 x float], [5 x float]* %10, i64 0, i64 0
store float %68, float* %69
%70 = getelementptr inbounds [5 x float], [5 x float]* %10, i64 0, i64 0
%71 = load float, float* %70
%72 = fneg float %71
%73 = getelementptr inbounds [5 x float], [5 x float]* %8, i64 0, i64 1
%74 = load float, float* %73
%75 = fsub float %72, %74
%76 = getelementptr inbounds [5 x float], [5 x float]* %10, i64 0, i64 1
store float %75, float* %76
%77 = getelementptr inbounds [5 x float], [5 x float]* %10, i64 0, i64 1
%78 = load float, float* %77
%79 = fneg float %78
%80 = getelementptr inbounds [5 x float], [5 x float]* %8, i64 0, i64 2
%81 = load float, float* %80
%82 = fsub float %79, %81
%83 = getelementptr inbounds [5 x float], [5 x float]* %10, i64 0, i64 2
store float %82, float* %83
%84 = getelementptr inbounds [5 x float], [5 x float]* %10, i64 0, i64 2
%85 = load float, float* %84
%86 = fneg float %85
%87 = getelementptr inbounds [5 x float], [5 x float]* %8, i64 0, i64 3
%88 = load float, float* %87
%89 = fsub float %86, %88
%90 = getelementptr inbounds [5 x float], [5 x float]* %10, i64 0, i64 3
store float %89, float* %90
%91 = getelementptr inbounds [5 x float], [5 x float]* %10, i64 0, i64 3
%92 = load float, float* %91
%93 = fneg float %92
%94 = getelementptr inbounds [5 x float], [5 x float]* %8, i64 0, i64 4
%95 = load float, float* %94
%96 = fsub float %93, %95
%97 = getelementptr inbounds [5 x float], [5 x float]* %10, i64 0, i64 4
store float %96, float* %97
%98 = getelementptr inbounds [5 x float], [5 x float]* %10, i64 0, i64 4
%99 = load float, float* %98
%100 = fdiv float %99, 2.000000e+00
%101 = getelementptr inbounds [5 x float], [5 x float]* %10, i64 0, i64 4
store float %100, float* %101
%102 = getelementptr inbounds [5 x float], [5 x float]* %9, i64 0, i64 0
%103 = load float, float* %102
%104 = fsub float 1.000000e+00, %103
%105 = getelementptr inbounds [5 x float], [5 x float]* %11, i64 0, i64 0
store float %104, float* %105
%106 = getelementptr inbounds [5 x float], [5 x float]* %11, i64 0, i64 0
%107 = load float, float* %106
%108 = getelementptr inbounds [5 x float], [5 x float]* %9, i64 0, i64 1
%109 = load float, float* %108
%110 = fsub float %107, %109
%111 = getelementptr inbounds [5 x float], [5 x float]* %11, i64 0, i64 1
store float %110, float* %111
%112 = getelementptr inbounds [5 x float], [5 x float]* %11, i64 0, i64 1
%113 = load float, float* %112
%114 = getelementptr inbounds [5 x float], [5 x float]* %9, i64 0, i64 2
%115 = load float, float* %114
%116 = fsub float %113, %115
%117 = getelementptr inbounds [5 x float], [5 x float]* %11, i64 0, i64 2
store float %116, float* %117
%118 = getelementptr inbounds [5 x float], [5 x float]* %11, i64 0, i64 2
%119 = load float, float* %118
%120 = getelementptr inbounds [5 x float], [5 x float]* %9, i64 0, i64 3
%121 = load float, float* %120
%122 = fsub float %119, %121
%123 = getelementptr inbounds [5 x float], [5 x float]* %11, i64 0, i64 3
store float %122, float* %123
%124 = getelementptr inbounds [5 x float], [5 x float]* %11, i64 0, i64 3
%125 = load float, float* %124
%126 = getelementptr inbounds [5 x float], [5 x float]* %9, i64 0, i64 4
%127 = load float, float* %126
%128 = fsub float %125, %127
%129 = getelementptr inbounds [5 x float], [5 x float]* %11, i64 0, i64 4
store float %128, float* %129
%130 = getelementptr inbounds [5 x float], [5 x float]* %11, i64 0, i64 4
%131 = load float, float* %130
%132 = fdiv float %131, 2.000000e+00
%133 = getelementptr inbounds [5 x float], [5 x float]* %11, i64 0, i64 4
store float %132, float* %133
store float 0.000000e+00, float* %16
store float 0.000000e+00, float* %17
store float 0x479E17B840000000, float* %12
store float 0x479E17B840000000, float* %13
store i32 0, i32* %7
br label %134
134: ; preds = %268, %65
%135 = load i32, i32* %7
%136 = icmp slt i32 %135, 10
br i1 %136, label %137, label %271
137: ; preds = %134
%138 = load i32, i32* %7
%139 = and i32 %138, 1
%140 = icmp eq i32 %139, 0
br i1 %140, label %141, label %143
141: ; preds = %137
%142 = getelementptr inbounds [5 x float], [5 x float]* %10, i64 0, i64 0
store float* %142, float** %15
store float* %12, float** %14
br label %145
143: ; preds = %137
%144 = getelementptr inbounds [5 x float], [5 x float]* %11, i64 0, i64 0
store float* %144, float** %15
store float* %13, float** %14
br label %145
145: ; preds = %143, %141
store i32 0, i32* %6
%146 = load i32, i32* %6
%147 = sext i32 %146 to i64
%148 = getelementptr inbounds [4 x float], [4 x float]* @a2lsf.steps, i64 0, i64 %147
%149 = load float, float* %148
store float %149, float* %5
br label %150
150: ; preds = %266, %145
%151 = load i32, i32* %6
%152 = icmp slt i32 %151, 4
br i1 %152, label %153, label %267
153: ; preds = %150
%154 = load float, float* %16
%155 = fmul float %154, 0x401921FB60000000
%156 = call float @cosf(float %155)
store float %156, float* %19
%157 = load float, float* %19
%158 = load float*, float** %15
%159 = getelementptr inbounds float, float* %158, i64 0
%160 = load float, float* %159
%161 = call float @llvm.fmuladd.f32(float 2.000000e+00, float %157, float %160)
store float %161, float* %20
%162 = load float, float* %19
%163 = fmul float 2.000000e+00, %162
%164 = load float, float* %20
%165 = call float @llvm.fmuladd.f32(float %163, float %164, float -1.000000e+00)
%166 = load float*, float** %15
%167 = getelementptr inbounds float, float* %166, i64 1
%168 = load float, float* %167
%169 = fadd float %165, %168
store float %169, float* %21
%170 = load float, float* %19
%171 = fmul float 2.000000e+00, %170
%172 = load float, float* %21
%173 = load float, float* %20
%174 = fneg float %173
%175 = call float @llvm.fmuladd.f32(float %171, float %172, float %174)
%176 = load float*, float** %15
%177 = getelementptr inbounds float, float* %176, i64 2
%178 = load float, float* %177
%179 = fadd float %175, %178
store float %179, float* %22
%180 = load float, float* %19
%181 = fmul float 2.000000e+00, %180
%182 = load float, float* %22
%183 = load float, float* %21
%184 = fneg float %183
%185 = call float @llvm.fmuladd.f32(float %181, float %182, float %184)
%186 = load float*, float** %15
%187 = getelementptr inbounds float, float* %186, i64 3
%188 = load float, float* %187
%189 = fadd float %185, %188
store float %189, float* %23
%190 = load float, float* %19
%191 = load float, float* %23
%192 = load float, float* %22
%193 = fneg float %192
%194 = call float @llvm.fmuladd.f32(float %190, float %191, float %193)
%195 = load float*, float** %15
%196 = getelementptr inbounds float, float* %195, i64 4
%197 = load float, float* %196
%198 = fadd float %194, %197
store float %198, float* %24
%199 = load float, float* %24
%200 = load float*, float** %14
%201 = load float, float* %200
%202 = fmul float %199, %201
%203 = fcmp ole float %202, 0.000000e+00
br i1 %203, label %207, label %204
204: ; preds = %153
%205 = load float, float* %16
%206 = fcmp oge float %205, 5.000000e-01
br i1 %206, label %207, label %260
207: ; preds = %204, %153
%208 = load i32, i32* %6
%209 = icmp eq i32 %208, 3
br i1 %209, label %210, label %241
210: ; preds = %207
%211 = load float, float* %24
%212 = call i64 @fabsf(float %211)
%213 = load float*, float** %14
%214 = load float, float* %213
%215 = call i64 @fabsf(float %214)
%216 = icmp sge i64 %212, %215
br i1 %216, label %217, label %225
217: ; preds = %210
%218 = load float, float* %16
%219 = load float, float* %5
%220 = fsub float %218, %219
%221 = load float*, float** %3
%222 = load i32, i32* %7
%223 = sext i32 %222 to i64
%224 = getelementptr inbounds float, float* %221, i64 %223
store float %220, float* %224
br label %231
225: ; preds = %210
%226 = load float, float* %16
%227 = load float*, float** %3
%228 = load i32, i32* %7
%229 = sext i32 %228 to i64
%230 = getelementptr inbounds float, float* %227, i64 %229
store float %226, float* %230
br label %231
231: ; preds = %225, %217
%232 = load float*, float** %14
%233 = load float, float* %232
%234 = fcmp oge float %233, 0.000000e+00
br i1 %234, label %235, label %237
235: ; preds = %231
%236 = load float*, float** %14
store float 0xC79E17B840000000, float* %236
br label %239
237: ; preds = %231
%238 = load float*, float** %14
store float 0x479E17B840000000, float* %238
br label %239
239: ; preds = %237, %235
%240 = load float, float* %17
store float %240, float* %16
store i32 0, i32* %6
store i32 4, i32* %6
br label %259
241: ; preds = %207
%242 = load i32, i32* %6
%243 = icmp eq i32 %242, 0
br i1 %243, label %244, label %246
244: ; preds = %241
%245 = load float, float* %16
store float %245, float* %17
br label %246
246: ; preds = %244, %241
%247 = load i32, i32* %6
%248 = add nsw i32 %247, 1
store i32 %248, i32* %6
%249 = load i32, i32* %6
%250 = sext i32 %249 to i64
%251 = getelementptr inbounds [4 x float], [4 x float]* @a2lsf.steps, i64 0, i64 %250
%252 = load float, float* %251
%253 = load float, float* %16
%254 = fsub float %253, %252
store float %254, float* %16
%255 = load i32, i32* %6
%256 = sext i32 %255 to i64
%257 = getelementptr inbounds [4 x float], [4 x float]* @a2lsf.steps, i64 0, i64 %256
%258 = load float, float* %257
store float %258, float* %5
br label %259
259: ; preds = %246, %239
br label %266
260: ; preds = %204
%261 = load float, float* %24
%262 = load float*, float** %14
store float %261, float* %262
%263 = load float, float* %5
%264 = load float, float* %16
%265 = fadd float %264, %263
store float %265, float* %16
br label %266
266: ; preds = %260, %259
br label %150
267: ; preds = %150
br label %268
268: ; preds = %267
%269 = load i32, i32* %7
%270 = add nsw i32 %269, 1
store i32 %270, i32* %7
br label %134
271: ; preds = %134
store i32 0, i32* %18
br label %272
272: ; preds = %282, %271
%273 = load i32, i32* %18
%274 = icmp slt i32 %273, 10
br i1 %274, label %275, label %285
275: ; preds = %272
%276 = load float*, float** %3
%277 = load i32, i32* %18
%278 = sext i32 %277 to i64
%279 = getelementptr inbounds float, float* %276, i64 %278
%280 = load float, float* %279
%281 = fmul float %280, 0x401921FB60000000
store float %281, float* %279
br label %282
282: ; preds = %275
%283 = load i32, i32* %18
%284 = add nsw i32 %283, 1
store i32 %284, i32* %18
br label %272
285: ; preds = %272
ret void
}

LLVM IR (-O2):
@a2lsf.steps = internal unnamed_addr constant [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, %113
%48 = phi i64 [ 0, %2 ], [ %116, %113 ]
%49 = phi float [ 0.000000e+00, %2 ], [ %114, %113 ]
%50 = phi float [ 0.000000e+00, %2 ], [ %115, %113 ]
%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, %107
%62 = phi float [ 0x3F7A027520000000, %47 ], [ %111, %107 ]
%63 = phi i32 [ 0, %47 ], [ %110, %107 ]
%64 = phi float [ %49, %47 ], [ %109, %107 ]
%65 = phi float [ %50, %47 ], [ %108, %107 ]
%66 = fmul float %64, 0x401921FB60000000
%67 = tail call float @cosf(float %66)
%68 = tail call float @llvm.fmuladd.f32(float %67, float 2.000000e+00, float %54)
%69 = fmul float %67, 2.000000e+00
%70 = tail call float @llvm.fmuladd.f32(float %69, float %68, float -1.000000e+00)
%71 = fadd float %55, %70
%72 = fneg float %68
%73 = tail call float @llvm.fmuladd.f32(float %69, float %71, float %72)
%74 = fadd float %56, %73
%75 = fneg float %71
%76 = tail call float @llvm.fmuladd.f32(float %69, float %74, float %75)
%77 = fadd float %57, %76
%78 = fneg float %74
%79 = tail call float @llvm.fmuladd.f32(float %67, float %77, float %78)
%80 = fadd float %59, %79
%81 = load float, float* %53
%82 = fmul float %81, %80
%83 = fcmp ole float %82, 0.000000e+00
%84 = fcmp oge float %64, 5.000000e-01
%85 = select i1 %83, i1 true, i1 %84
br i1 %85, label %86, label %105
86: ; preds = %61
switch i32 %63, label %98 [
i32 3, label %87
i32 0, label %97
]
87: ; preds = %86
%88 = tail call i64 @fabsf(float %80)
%89 = load float, float* %53
%90 = tail call i64 @fabsf(float %89)
%91 = icmp slt i64 %88, %90
%92 = select i1 %91, float 0.000000e+00, float %62
%93 = fsub float %64, %92
store float %93, float* %60
%94 = load float, float* %53
%95 = fcmp ult float %94, 0.000000e+00
%96 = select i1 %95, float 0x479E17B840000000, float 0xC79E17B840000000
store float %96, float* %53
br label %113
97: ; preds = %86
br label %98
98: ; preds = %86, %97
%99 = phi float [ %64, %97 ], [ %65, %86 ]
%100 = add nsw i32 %63, 1
%101 = sext i32 %100 to i64
%102 = getelementptr inbounds [4 x float], [4 x float]* @a2lsf.steps, i64 0, i64 %101
%103 = load float, float* %102
%104 = fsub float %64, %103
br label %107
105: ; preds = %61
store float %80, float* %53
%106 = fadd float %64, %62
br label %107
107: ; preds = %98, %105
%108 = phi float [ %99, %98 ], [ %65, %105 ]
%109 = phi float [ %104, %98 ], [ %106, %105 ]
%110 = phi i32 [ %100, %98 ], [ %63, %105 ]
%111 = phi float [ %103, %98 ], [ %62, %105 ]
%112 = icmp slt i32 %110, 4
br i1 %112, label %61, label %113
113: ; preds = %107, %87
%114 = phi float [ %65, %87 ], [ %109, %107 ]
%115 = phi float [ %65, %87 ], [ %108, %107 ]
%116 = add nuw nsw i64 %48, 1
%117 = icmp eq i64 %116, 10
br i1 %117, label %118, label %47
118: ; preds = %113
%119 = bitcast float* %0 to <4 x float>*
%120 = load <4 x float>, <4 x float>* %119
%121 = fmul <4 x float> %120, <float 0x401921FB60000000, float 0x401921FB60000000, float 0x401921FB60000000, float 0x401921FB60000000>
%122 = bitcast float* %0 to <4 x float>*
store <4 x float> %121, <4 x float>* %122
%123 = getelementptr inbounds float, float* %0, i64 4
%124 = bitcast float* %123 to <4 x float>*
%125 = load <4 x float>, <4 x float>* %124
%126 = fmul <4 x float> %125, <float 0x401921FB60000000, float 0x401921FB60000000, float 0x401921FB60000000, float 0x401921FB60000000>
%127 = bitcast float* %123 to <4 x float>*
store <4 x float> %126, <4 x float>* %127
%128 = getelementptr inbounds float, float* %0, i64 8
%129 = load float, float* %128
%130 = fmul float %129, 0x401921FB60000000
store float %130, float* %128
%131 = getelementptr inbounds float, float* %0, i64 9
%132 = load float, float* %131
%133 = fmul float %132, 0x401921FB60000000
store float %133, float* %131
ret void
}