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

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double acos(double const);
double asin(double const);
double const sin(double);
double to_degrees(double);
double to_radians(double);
int arc_find_angles(double *angles, const double *sides) {
  double A, B, C;
  register int i;
  A = B = C = 0;
  for (i = 0; i < 3; i++) {
    const double a = sides[(i + 0)];
    const double b = sides[(i + 1) % 3];
    const double c = sides[(i + 2) % 3];
    A = to_radians(angles[(i + 0)]);
    B = to_radians(angles[(i + 1) % 3]);
    C = to_radians(angles[(i + 2) % 3]);
    if (!((A) > 0) && ((a) > 0) && ((C) > 0) && ((c) > 0)) {
      A = asin(a / c * sin(C));
      goto new_info;
    }
    if (!((B) > 0) && ((b) > 0) && ((C) > 0) && ((c) > 0)) {
      B = asin(b / c * sin(C));
      goto new_info;
    }
    if (!((C) > 0) && ((a) > 0) && ((b) > 0) && ((c) > 0)) {
      C = acos((a * a + b * b - c * c) / (2 * a * b));
      goto new_info;
    }
  }
  return 0;
new_info:
  angles[(i + 0) % 3] = to_degrees(A);
  angles[(i + 1) % 3] = to_degrees(B);
  angles[(i + 2) % 3] = to_degrees(C);
  return 1;
}


x86 assembly (clang, -O0):
<arc_find_angles>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
movl   $0x0,-0x34(%rbp)
cmpl   $0x3,-0x34(%rbp)
jge    1422 <arc_find_angles+0x2d2>
mov    -0x18(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    -0x70(%rbp),%rax
movslq %edx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0x34(%rbp),%eax
add    $0x2,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    -0x68(%rbp),%rax
movslq %edx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x34(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1030 <to_radians@plt>
movsd  %xmm0,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    -0x60(%rbp),%rax
movslq %edx,%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1030 <to_radians@plt>
movsd  %xmm0,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x34(%rbp),%eax
add    $0x2,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    -0x58(%rbp),%rax
movslq %edx,%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1030 <to_radians@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x20(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
ja     12e1 <arc_find_angles+0x191>
movsd  -0x40(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    12e1 <arc_find_angles+0x191>
movsd  -0x30(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    12e1 <arc_find_angles+0x191>
movsd  -0x50(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    12e1 <arc_find_angles+0x191>
movsd  -0x40(%rbp),%xmm0
divsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x30(%rbp),%xmm0
call   1060 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x78(%rbp),%xmm0
mulsd  %xmm1,%xmm0
call   1070 <asin@plt>
movsd  %xmm0,-0x20(%rbp)
jmp    142e <arc_find_angles+0x2de>
movsd  -0x28(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
ja     135d <arc_find_angles+0x20d>
movsd  -0x48(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    135d <arc_find_angles+0x20d>
movsd  -0x30(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    135d <arc_find_angles+0x20d>
movsd  -0x50(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    135d <arc_find_angles+0x20d>
movsd  -0x48(%rbp),%xmm0
divsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x30(%rbp),%xmm0
call   1060 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x80(%rbp),%xmm0
mulsd  %xmm1,%xmm0
call   1070 <asin@plt>
movsd  %xmm0,-0x28(%rbp)
jmp    142e <arc_find_angles+0x2de>
movsd  -0x30(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
ja     140f <arc_find_angles+0x2bf>
movsd  -0x40(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    140f <arc_find_angles+0x2bf>
movsd  -0x48(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    140f <arc_find_angles+0x2bf>
movsd  -0x50(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    140f <arc_find_angles+0x2bf>
movsd  -0x40(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x50(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xc0e(%rip),%xmm1
mulsd  -0x40(%rbp),%xmm1
mulsd  -0x48(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1040 <acos@plt>
movsd  %xmm0,-0x30(%rbp)
jmp    142e <arc_find_angles+0x2de>
jmp    1414 <arc_find_angles+0x2c4>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1182 <arc_find_angles+0x32>
movl   $0x0,-0x4(%rbp)
jmp    14cb <arc_find_angles+0x37b>
movsd  -0x20(%rbp),%xmm0
call   1050 <to_degrees@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x98(%rbp)
mov    -0x34(%rbp),%eax
add    $0x0,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    -0x98(%rbp),%rax
movslq %edx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x28(%rbp),%xmm0
call   1050 <to_degrees@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x90(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    -0x90(%rbp),%rax
movslq %edx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x30(%rbp),%xmm0
call   1050 <to_degrees@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x88(%rbp)
mov    -0x34(%rbp),%eax
add    $0x2,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    -0x88(%rbp),%rax
movslq %edx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arc_find_angles>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
lea    0x10(%rdi),%rax
mov    %rax,0x48(%rsp)
lea    0x10(%rsi),%rax
mov    %rax,0x40(%rsp)
mov    %rdi,0x28(%rsp)
lea    0x8(%rdi),%rax
mov    %rax,0x38(%rsp)
mov    %rsi,0x50(%rsp)
lea    0x8(%rsi),%rax
mov    %rax,0x30(%rsp)
mov    $0x2,%eax
mov    $0x1,%r8d
xor    %edi,%edi
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    %rax,%r14
movabs $0xaaaaaaaaaaaaaaab,%rsi
aa aa aa
mul    %rsi
mov    %rdx,%rcx
mov    %r8,%rax
mul    %rsi
cmp    $0x18,%rdi
je     1324 <arc_find_angles+0x1d4>
mov    %rbx,%r15
mov    %rdi,%rbp
mov    %r8,%r12
shl    $0x2,%rcx
and    $0xfffffffffffffff8,%rcx
lea    (%rcx,%rcx,2),%rax
mov    0x48(%rsp),%rbx
sub    %rax,%rbx
mov    0x40(%rsp),%rcx
sub    %rax,%rcx
shl    $0x2,%rdx
and    $0xfffffffffffffff8,%rdx
lea    (%rdx,%rdx,2),%rax
mov    0x38(%rsp),%r13
sub    %rax,%r13
mov    0x30(%rsp),%rdx
sub    %rax,%rdx
mov    0x50(%rsp),%rax
movsd  (%rax,%rdi,1),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  (%rdx,%rdi,1),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  (%rcx,%rdi,1),%xmm0
movsd  %xmm0,(%rsp)
mov    0x28(%rsp),%rax
movsd  (%rax,%rdi,1),%xmm0
call   1030 <to_radians@plt>
movsd  %xmm0,0x20(%rsp)
movsd  0x0(%r13,%rbp,1),%xmm0
call   1030 <to_radians@plt>
movsd  %xmm0,0x18(%rsp)
movsd  (%rbx,%rbp,1),%xmm0
call   1030 <to_radians@plt>
movsd  (%rsp),%xmm5
movsd  0x10(%rsp),%xmm3
xorpd  %xmm2,%xmm2
movapd %xmm0,%xmm1
movsd  0x20(%rsp),%xmm0
ucomisd %xmm2,%xmm0
ja     128f <arc_find_angles+0x13f>
ucomisd %xmm2,%xmm3
jbe    128f <arc_find_angles+0x13f>
ucomisd %xmm2,%xmm1
jbe    128f <arc_find_angles+0x13f>
ucomisd %xmm2,%xmm5
ja     132b <arc_find_angles+0x1db>
movsd  0x18(%rsp),%xmm0
ucomisd %xmm2,%xmm0
movsd  0x8(%rsp),%xmm4
ja     12b7 <arc_find_angles+0x167>
ucomisd %xmm2,%xmm4
jbe    12b7 <arc_find_angles+0x167>
ucomisd %xmm2,%xmm1
jbe    12b7 <arc_find_angles+0x167>
ucomisd %xmm2,%xmm5
ja     1356 <arc_find_angles+0x206>
lea    0x8(%rbp),%rdi
lea    0x1(%r14),%rax
lea    0x1(%r12),%r8
lea    0x1(%r15),%rbx
ucomisd %xmm2,%xmm1
ja     11a0 <arc_find_angles+0x50>
ucomisd %xmm2,%xmm3
jbe    11a0 <arc_find_angles+0x50>
ucomisd %xmm2,%xmm4
jbe    11a0 <arc_find_angles+0x50>
ucomisd %xmm2,%xmm5
jbe    11a0 <arc_find_angles+0x50>
movapd %xmm4,%xmm1
mulsd  %xmm4,%xmm1
movapd %xmm3,%xmm0
mulsd  %xmm3,%xmm0
addsd  %xmm1,%xmm0
mulsd  %xmm5,%xmm5
subsd  %xmm5,%xmm0
addsd  %xmm3,%xmm3
mulsd  %xmm4,%xmm3
divsd  %xmm3,%xmm0
call   1040 <acos@plt>
movsd  %xmm0,(%rsp)
jmp    137f <arc_find_angles+0x22f>
xor    %eax,%eax
jmp    140c <arc_find_angles+0x2bc>
divsd  %xmm5,%xmm3
movsd  %xmm3,0x10(%rsp)
movapd %xmm1,%xmm0
movsd  %xmm1,(%rsp)
call   1060 <sin@plt>
mulsd  0x10(%rsp),%xmm0
call   1070 <asin@plt>
movsd  %xmm0,0x20(%rsp)
jmp    137f <arc_find_angles+0x22f>
divsd  %xmm5,%xmm4
movsd  %xmm4,0x8(%rsp)
movapd %xmm1,%xmm0
movsd  %xmm1,(%rsp)
call   1060 <sin@plt>
mulsd  0x8(%rsp),%xmm0
call   1070 <asin@plt>
movsd  %xmm0,0x18(%rsp)
mov    %r14,%rax
movabs $0xaaaaaaaaaaaaaaab,%r13
aa aa aa
mul    %r13
shl    $0x2,%rdx
and    $0xfffffffffffffff8,%rdx
lea    (%rdx,%rdx,2),%rax
mov    0x28(%rsp),%rbx
mov    %rbx,%r14
sub    %rax,%r14
mov    %r12,%rax
mul    %r13
shl    $0x2,%rdx
and    $0xfffffffffffffff8,%rdx
lea    (%rdx,%rdx,2),%rax
mov    %rbx,%r12
sub    %rax,%r12
movsd  0x20(%rsp),%xmm0
call   1050 <to_degrees@plt>
mov    %r15,%rax
mul    %r13
shl    $0x2,%rdx
and    $0xfffffffffffffff8,%rdx
lea    (%rdx,%rdx,2),%rax
sub    %rax,%rbx
movsd  %xmm0,0x0(%rbp,%rbx,1)
movsd  0x18(%rsp),%xmm0
call   1050 <to_degrees@plt>
movsd  %xmm0,0x8(%rbp,%r12,1)
movsd  (%rsp),%xmm0
call   1050 <to_degrees@plt>
movsd  %xmm0,0x10(%rbp,%r14,1)
mov    $0x1,%eax
add    $0x58,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @arc_find_angles(double* nocapture %0, double* nocapture %1) {
br label %3
3: ; preds = %53, %2
%4 = phi i64 [ %9, %53 ], [ 0, %2 ]
%5 = icmp eq i64 %4, 3
br i1 %5, label %80, label %6
6: ; preds = %3
%7 = getelementptr inbounds double, double* %1, i64 %4
%8 = load double, double* %7
%9 = add nuw nsw i64 %4, 1
%10 = trunc i64 %9 to i8
%11 = urem i8 %10, 3
%12 = zext i8 %11 to i64
%13 = getelementptr inbounds double, double* %1, i64 %12
%14 = load double, double* %13
%15 = trunc i64 %4 to i8
%16 = add i8 %15, 2
%17 = urem i8 %16, 3
%18 = zext i8 %17 to i64
%19 = getelementptr inbounds double, double* %1, i64 %18
%20 = load double, double* %19
%21 = getelementptr inbounds double, double* %0, i64 %4
%22 = load double, double* %21
%23 = tail call double @to_radians(double %22)
%24 = getelementptr inbounds double, double* %0, i64 %12
%25 = load double, double* %24
%26 = tail call double @to_radians(double %25)
%27 = getelementptr inbounds double, double* %0, i64 %18
%28 = load double, double* %27
%29 = tail call double @to_radians(double %28)
%30 = fcmp ule double %23, 0.000000e+00
%31 = fcmp ogt double %8, 0.000000e+00
%32 = select i1 %30, i1 %31, i1 false
%33 = fcmp ogt double %29, 0.000000e+00
%34 = select i1 %32, i1 %33, i1 false
%35 = fcmp ogt double %20, 0.000000e+00
%36 = select i1 %34, i1 %35, i1 false
br i1 %36, label %37, label %42
37: ; preds = %6
%38 = fdiv double %8, %20
%39 = tail call double @sin(double %29)
%40 = fmul double %38, %39
%41 = tail call double @asin(double %40)
br label %67
42: ; preds = %6
%43 = fcmp ule double %26, 0.000000e+00
%44 = fcmp ogt double %14, 0.000000e+00
%45 = select i1 %43, i1 %44, i1 false
%46 = select i1 %45, i1 %33, i1 false
%47 = select i1 %46, i1 %35, i1 false
br i1 %47, label %48, label %53
48: ; preds = %42
%49 = fdiv double %14, %20
%50 = tail call double @sin(double %29)
%51 = fmul double %49, %50
%52 = tail call double @asin(double %51)
br label %67
53: ; preds = %42
%54 = fcmp ule double %29, 0.000000e+00
%55 = select i1 %54, i1 %31, i1 false
%56 = select i1 %55, i1 %44, i1 false
%57 = select i1 %56, i1 %35, i1 false
br i1 %57, label %58, label %3
58: ; preds = %53
%59 = fmul double %14, %14
%60 = tail call double @llvm.fmuladd.f64(double %8, double %8, double %59)
%61 = fneg double %20
%62 = tail call double @llvm.fmuladd.f64(double %61, double %20, double %60)
%63 = fmul double %8, 2.000000e+00
%64 = fmul double %63, %14
%65 = fdiv double %62, %64
%66 = tail call double @acos(double %65)
br label %67
67: ; preds = %37, %48, %58
%68 = phi double [ %66, %58 ], [ %29, %48 ], [ %29, %37 ]
%69 = phi double [ %26, %58 ], [ %52, %48 ], [ %26, %37 ]
%70 = phi double [ %23, %58 ], [ %23, %48 ], [ %41, %37 ]
%71 = getelementptr inbounds double, double* %0, i64 %18
%72 = getelementptr inbounds double, double* %0, i64 %12
%73 = trunc i64 %4 to i8
%74 = tail call double @to_degrees(double %70)
%75 = urem i8 %73, 3
%76 = zext i8 %75 to i64
%77 = getelementptr inbounds double, double* %0, i64 %76
store double %74, double* %77
%78 = tail call double @to_degrees(double %69)
store double %78, double* %72
%79 = tail call double @to_degrees(double %68)
store double %79, double* %71
br label %80
80: ; preds = %3, %67
%81 = phi i32 [ 1, %67 ], [ 0, %3 ]
ret i32 %81
}