#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 acos(double);
float asin(double);
float cos(float);
int fabs(float);
float sin(float);
void mattoang(float *r, float *a) {
  double temp;
  temp = -r[5];
  if (fabs(temp) > 1)
    temp = (temp > 0) - (temp < 0);
  a[1] = asin(temp);
  if (fabs(cos(a[1])) > 1e-30) {
    temp = r[3] / cos(a[1]);
    if (fabs(temp) > 1)
      temp = (temp > 0) - (temp < 0);
    a[0] = asin(temp);
    if (cos(a[0]) * cos(a[1]) * r[4] < 0)
      a[0] = 3.14159265358979323846264338327950 - a[0];
    temp = r[2] / cos(a[1]);
    if (fabs(temp) > 1)
      temp = (temp > 0) - (temp < 0);
    a[2] = asin(temp);
    if (cos(a[2]) * cos(a[1]) * r[8] < 0)
      a[2] = 3.14159265358979323846264338327950 - a[2];
    if (fabs(sin(a[1]) * sin(a[2]) * sin(a[0]) + cos(a[2]) * cos(a[0]) - r[0]) >
            1e-30 ||
        fabs(sin(a[1]) * sin(a[2]) * cos(a[0]) - cos(a[2]) * sin(a[0]) - r[1]) >
            1e-30) {
      a[0] = 3.14159265358979323846264338327950 + a[0];
      a[1] = 3.14159265358979323846264338327950 - a[1];
      a[2] = 3.14159265358979323846264338327950 + a[2];
    }
  } else {
    a[2] = 0;
    temp = r[0];
    if (fabs(temp) > 1)
      temp = (temp > 0) - (temp < 0);
    a[0] = acos(temp);
    if (fabs(-sin(a[0]) - r[1]) > 1e-30)
      a[0] *= -1;
  }
}


x86 assembly (clang, -O0):
<mattoang>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  0x14(%rax),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
call   1040 <fabs@plt>
cmp    $0x1,%eax
jle    11c6 <mattoang+0x76>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
seta   %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1060 <asin@plt>
mov    -0x10(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
call   1070 <cos@plt>
call   1040 <fabs@plt>
cvtsi2sd %eax,%xmm0
movsd  0xe08(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    15ab <mattoang+0x45b>
mov    -0x8(%rbp),%rax
movss  0xc(%rax),%xmm0
movss  %xmm0,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
call   1070 <cos@plt>
movaps %xmm0,%xmm1
movss  -0x1c(%rbp),%xmm0
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
call   1040 <fabs@plt>
cmp    $0x1,%eax
jle    127a <mattoang+0x12a>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
seta   %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1060 <asin@plt>
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
call   1070 <cos@plt>
movss  %xmm0,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
call   1070 <cos@plt>
movss  -0x20(%rbp),%xmm1
mulss  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
mulss  0x10(%rax),%xmm1
xorps  %xmm0,%xmm0
ucomiss %xmm1,%xmm0
jbe    12ee <mattoang+0x19e>
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xd2a(%rip),%xmm0
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
movss  %xmm0,-0x24(%rbp)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
call   1070 <cos@plt>
movaps %xmm0,%xmm1
movss  -0x24(%rbp),%xmm0
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
call   1040 <fabs@plt>
cmp    $0x1,%eax
jle    1366 <mattoang+0x216>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
seta   %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1060 <asin@plt>
mov    -0x10(%rbp),%rax
movss  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
call   1070 <cos@plt>
movss  %xmm0,-0x28(%rbp)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
call   1070 <cos@plt>
movss  -0x28(%rbp),%xmm1
mulss  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
mulss  0x20(%rax),%xmm1
xorps  %xmm0,%xmm0
ucomiss %xmm1,%xmm0
jbe    13de <mattoang+0x28e>
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xc3b(%rip),%xmm0
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
call   1050 <sin@plt>
movss  %xmm0,-0x38(%rbp)
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movss  -0x38(%rbp),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,-0x2c(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
call   1050 <sin@plt>
movss  %xmm0,-0x30(%rbp)
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
call   1070 <cos@plt>
movss  %xmm0,-0x34(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
call   1070 <cos@plt>
movss  -0x34(%rbp),%xmm1
movss  -0x30(%rbp),%xmm2
movaps %xmm0,%xmm3
movss  -0x2c(%rbp),%xmm0
mulss  %xmm3,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
subss  (%rax),%xmm0
call   1040 <fabs@plt>
cvtsi2sd %eax,%xmm0
movsd  0xb87(%rip),%xmm1
ucomisd %xmm1,%xmm0
ja     1536 <mattoang+0x3e6>
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
call   1050 <sin@plt>
movss  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movss  -0x48(%rbp),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,-0x3c(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
call   1070 <cos@plt>
movss  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
call   1070 <cos@plt>
movss  %xmm0,-0x44(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
call   1050 <sin@plt>
movss  -0x44(%rbp),%xmm1
movss  -0x40(%rbp),%xmm2
movaps %xmm0,%xmm3
movss  -0x3c(%rbp),%xmm0
mulss  %xmm3,%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
subss  0x4(%rax),%xmm0
call   1040 <fabs@plt>
cvtsi2sd %eax,%xmm0
movsd  0xad4(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    15a6 <mattoang+0x456>
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xabe(%rip),%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xa99(%rip),%xmm0
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xa73(%rip),%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,0x8(%rax)
jmp    1678 <mattoang+0x528>
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
cvtsd2ss %xmm0,%xmm0
call   1040 <fabs@plt>
cmp    $0x1,%eax
jle    160f <mattoang+0x4bf>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
seta   %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <acos@plt>
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
call   1050 <sin@plt>
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mov    -0x8(%rbp),%rax
subss  0x4(%rax),%xmm0
call   1040 <fabs@plt>
cvtsi2sd %eax,%xmm0
movsd  0x9ab(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1673 <mattoang+0x523>
mov    -0x10(%rbp),%rax
movss  0x9a5(%rip),%xmm0
mulss  (%rax),%xmm0
movss  %xmm0,(%rax)
jmp    1678 <mattoang+0x528>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mattoang>:
push   %r14
push   %rbx
sub    $0x38,%rsp
mov    %rsi,%rbx
mov    %rdi,%r14
movss  0x14(%rdi),%xmm1
movaps 0xe97(%rip),%xmm0
movaps %xmm1,(%rsp)
xorps  %xmm1,%xmm0
movaps %xmm0,0x20(%rsp)
call   1040 <fabs@plt>
cmp    $0x2,%eax
jl     11a1 <mattoang+0x51>
xorps  %xmm0,%xmm0
xor    %eax,%eax
movaps (%rsp),%xmm1
ucomiss %xmm1,%xmm0
seta   %al
xor    %ecx,%ecx
ucomiss %xmm0,%xmm1
seta   %cl
sub    %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
jmp    11aa <mattoang+0x5a>
movaps 0x20(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
call   1060 <asin@plt>
movss  %xmm0,0x4(%rbx)
call   1070 <cos@plt>
call   1040 <fabs@plt>
test   %eax,%eax
jle    1215 <mattoang+0xc5>
movss  0xc(%r14),%xmm0
movss  %xmm0,(%rsp)
movss  0x4(%rbx),%xmm0
call   1070 <cos@plt>
movss  (%rsp),%xmm1
divss  %xmm0,%xmm1
movss  %xmm1,(%rsp)
movaps %xmm1,%xmm0
call   1040 <fabs@plt>
cmp    $0x2,%eax
jl     125a <mattoang+0x10a>
xorps  %xmm0,%xmm0
xor    %eax,%eax
movss  (%rsp),%xmm1
ucomiss %xmm0,%xmm1
seta   %al
xor    %ecx,%ecx
ucomiss %xmm1,%xmm0
seta   %cl
sub    %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
jmp    1263 <mattoang+0x113>
movl   $0x0,0x8(%rbx)
movss  (%r14),%xmm0
movss  %xmm0,(%rsp)
call   1040 <fabs@plt>
cmp    $0x2,%eax
jl     1492 <mattoang+0x342>
xorps  %xmm0,%xmm0
xor    %eax,%eax
movss  (%rsp),%xmm1
ucomiss %xmm0,%xmm1
seta   %al
xor    %ecx,%ecx
ucomiss %xmm1,%xmm0
seta   %cl
sub    %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
jmp    149b <mattoang+0x34b>
movss  (%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
call   1060 <asin@plt>
movss  %xmm0,(%rbx)
call   1070 <cos@plt>
movss  %xmm0,(%rsp)
movss  0x4(%rbx),%xmm0
call   1070 <cos@plt>
mulss  (%rsp),%xmm0
mulss  0x10(%r14),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm0,%xmm1
jbe    12b2 <mattoang+0x162>
movss  (%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd6d(%rip),%xmm1
subsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
movss  %xmm0,(%rbx)
movss  0x8(%r14),%xmm0
movss  %xmm0,(%rsp)
movss  0x4(%rbx),%xmm0
call   1070 <cos@plt>
movss  (%rsp),%xmm1
divss  %xmm0,%xmm1
movss  %xmm1,(%rsp)
movaps %xmm1,%xmm0
call   1040 <fabs@plt>
cmp    $0x2,%eax
jl     1305 <mattoang+0x1b5>
xorps  %xmm0,%xmm0
xor    %eax,%eax
movss  (%rsp),%xmm1
ucomiss %xmm0,%xmm1
seta   %al
xor    %ecx,%ecx
ucomiss %xmm1,%xmm0
seta   %cl
sub    %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
jmp    130e <mattoang+0x1be>
movss  (%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
call   1060 <asin@plt>
movss  %xmm0,0x8(%rbx)
call   1070 <cos@plt>
movss  %xmm0,(%rsp)
movss  0x4(%rbx),%xmm0
call   1070 <cos@plt>
mulss  (%rsp),%xmm0
mulss  0x20(%r14),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm0,%xmm1
jbe    1360 <mattoang+0x210>
movss  0x8(%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xcc0(%rip),%xmm1
subsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
movss  %xmm0,0x8(%rbx)
movss  0x4(%rbx),%xmm0
call   1050 <sin@plt>
movss  %xmm0,(%rsp)
movss  0x8(%rbx),%xmm0
call   1050 <sin@plt>
mulss  (%rsp),%xmm0
movss  %xmm0,(%rsp)
movss  (%rbx),%xmm0
call   1050 <sin@plt>
movss  %xmm0,0x20(%rsp)
movss  0x8(%rbx),%xmm0
call   1070 <cos@plt>
movss  %xmm0,0x1c(%rsp)
movss  (%rbx),%xmm0
call   1070 <cos@plt>
mulss  0x1c(%rsp),%xmm0
movss  0x20(%rsp),%xmm1
mulss  (%rsp),%xmm1
addss  %xmm1,%xmm0
subss  (%r14),%xmm0
call   1040 <fabs@plt>
test   %eax,%eax
jg     1444 <mattoang+0x2f4>
movss  0x4(%rbx),%xmm0
call   1050 <sin@plt>
movss  %xmm0,(%rsp)
movss  0x8(%rbx),%xmm0
call   1050 <sin@plt>
mulss  (%rsp),%xmm0
movss  %xmm0,(%rsp)
movss  (%rbx),%xmm0
call   1070 <cos@plt>
movss  %xmm0,0x20(%rsp)
movss  0x8(%rbx),%xmm0
call   1070 <cos@plt>
movss  %xmm0,0x1c(%rsp)
movss  (%rbx),%xmm0
call   1050 <sin@plt>
mulss  0x1c(%rsp),%xmm0
movss  0x20(%rsp),%xmm1
mulss  (%rsp),%xmm1
subss  %xmm0,%xmm1
subss  0x4(%r14),%xmm1
movaps %xmm1,%xmm0
call   1040 <fabs@plt>
test   %eax,%eax
jle    14cf <mattoang+0x37f>
movss  0x4(%rbx),%xmm0
movsd  0xbbf(%rip),%xmm1
cvtss2sd %xmm0,%xmm0
movapd %xmm1,%xmm2
subsd  %xmm0,%xmm2
movss  (%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
cvtsd2ss %xmm2,%xmm2
movss  %xmm0,(%rbx)
movss  %xmm2,0x4(%rbx)
movss  0x8(%rbx),%xmm0
cvtss2sd %xmm0,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x8(%rbx)
jmp    14cf <mattoang+0x37f>
movss  (%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
call   1030 <acos@plt>
movss  %xmm0,(%rbx)
call   1050 <sin@plt>
xorpd  0xb4f(%rip),%xmm0
subss  0x4(%r14),%xmm0
call   1040 <fabs@plt>
test   %eax,%eax
jle    14cf <mattoang+0x37f>
movss  (%rbx),%xmm0
xorps  0xb35(%rip),%xmm0
movss  %xmm0,(%rbx)
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret

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

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