#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 M_PI;
double atan(double);
int fabs(double);
double sin(double);
void gtdrli(double x, double y, double z, double *ag_xy, double *ag_z,
            double *bs_l, double *dr_l) {
  if (x > 0 && y > 0) {
    *ag_xy = atan(y / x) * 180.0 / M_PI;
    *bs_l = y / sin(*ag_xy * M_PI / 180.0);
  } else if (x < 0 && y > 0) {
    *ag_xy = 180 - fabs(atan(y / x) * 180.0 / M_PI);
    *bs_l = y / sin(*ag_xy * M_PI / 180.0);
  } else if (x < 0 && y < 0) {
    *ag_xy = 180 + fabs(atan(y / x) * 180.0 / M_PI);
    *bs_l = fabs(y / sin(*ag_xy * M_PI / 180.0));
  } else if (x > 0 && y < 0) {
    *ag_xy = 270 + fabs(atan(y / x) * 180.0 / M_PI);
    *bs_l = fabs(y / sin(*ag_xy * M_PI / 180.0));
  } else if (x == 0 && y > 0) {
    *ag_xy = 90;
    *bs_l = y;
  } else if (x == 0 && y < 0) {
    *ag_xy = 270;
    *bs_l = fabs(y);
  } else if (x > 0 && y == 0) {
    *ag_xy = 360;
    *bs_l = x;
  } else if (x < 0 && y == 0) {
    *ag_xy = 180;
    *bs_l = fabs(x);
  }
  if (z == 0) {
    *ag_z = fabs(atan(z / *bs_l) * 180.0 / M_PI);
    *dr_l = *bs_l;
  } else {
    *ag_z = fabs(atan(z / *bs_l) * 180.0 / M_PI);
    *dr_l = fabs(z / sin(*ag_z * M_PI / 180.0));
  }
}


x86 assembly (clang, -O0):
<gtdrli>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x28(%rbp)
mov    %rdx,-0x30(%rbp)
mov    %rcx,-0x38(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    11f0 <gtdrli+0xc0>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    11f0 <gtdrli+0xc0>
movsd  -0x10(%rbp),%xmm0
divsd  -0x8(%rbp),%xmm0
call   1050 <atan@plt>
movsd  0xe6e(%rip),%xmm1
mulsd  %xmm1,%xmm0
mov    0x2e4b(%rip),%rax
divsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
mov    0x2e26(%rip),%rax
mulsd  (%rax),%xmm0
movsd  0xe32(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
divsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    1543 <gtdrli+0x413>
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1297 <gtdrli+0x167>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1297 <gtdrli+0x167>
movsd  -0x10(%rbp),%xmm0
divsd  -0x8(%rbp),%xmm0
call   1050 <atan@plt>
movsd  0xdd9(%rip),%xmm1
mulsd  %xmm1,%xmm0
mov    0x2db6(%rip),%rax
divsd  (%rax),%xmm0
call   1030 <fabs@plt>
mov    %eax,%ecx
mov    $0xb4,%eax
sub    %ecx,%eax
cvtsi2sd %eax,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
mov    0x2d7f(%rip),%rax
mulsd  (%rax),%xmm0
movsd  0xd8b(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
divsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    153e <gtdrli+0x40e>
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    133f <gtdrli+0x20f>
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    133f <gtdrli+0x20f>
movsd  -0x10(%rbp),%xmm0
divsd  -0x8(%rbp),%xmm0
call   1050 <atan@plt>
movsd  0xd36(%rip),%xmm1
mulsd  %xmm1,%xmm0
mov    0x2d13(%rip),%rax
divsd  (%rax),%xmm0
call   1030 <fabs@plt>
add    $0xb4,%eax
cvtsi2sd %eax,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
mov    0x2ce0(%rip),%rax
mulsd  (%rax),%xmm0
movsd  0xcec(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x50(%rbp),%xmm0
divsd  %xmm1,%xmm0
call   1030 <fabs@plt>
cvtsi2sd %eax,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    1539 <gtdrli+0x409>
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    13eb <gtdrli+0x2bb>
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    13eb <gtdrli+0x2bb>
movsd  -0x10(%rbp),%xmm0
divsd  -0x8(%rbp),%xmm0
call   1050 <atan@plt>
movsd  0xc8a(%rip),%xmm1
mulsd  %xmm1,%xmm0
mov    0x2c67(%rip),%rax
divsd  (%rax),%xmm0
call   1030 <fabs@plt>
add    $0x10e,%eax
cvtsi2sd %eax,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
mov    0x2c34(%rip),%rax
mulsd  (%rax),%xmm0
movsd  0xc40(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x58(%rbp),%xmm0
divsd  %xmm1,%xmm0
call   1030 <fabs@plt>
cvtsi2sd %eax,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    1534 <gtdrli+0x404>
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1437 <gtdrli+0x307>
jp     1437 <gtdrli+0x307>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1437 <gtdrli+0x307>
mov    -0x20(%rbp),%rax
movsd  0xbf7(%rip),%xmm0
movsd  %xmm0,(%rax)
movsd  -0x10(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    152f <gtdrli+0x3ff>
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1488 <gtdrli+0x358>
jp     1488 <gtdrli+0x358>
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1488 <gtdrli+0x358>
mov    -0x20(%rbp),%rax
movsd  0xba7(%rip),%xmm0
movsd  %xmm0,(%rax)
movsd  -0x10(%rbp),%xmm0
call   1030 <fabs@plt>
cvtsi2sd %eax,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    152a <gtdrli+0x3fa>
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    14d4 <gtdrli+0x3a4>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    14d4 <gtdrli+0x3a4>
jp     14d4 <gtdrli+0x3a4>
mov    -0x20(%rbp),%rax
movsd  0xb4a(%rip),%xmm0
movsd  %xmm0,(%rax)
movsd  -0x8(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    1525 <gtdrli+0x3f5>
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1520 <gtdrli+0x3f0>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1520 <gtdrli+0x3f0>
jp     1520 <gtdrli+0x3f0>
mov    -0x20(%rbp),%rax
movsd  0xafa(%rip),%xmm0
movsd  %xmm0,(%rax)
movsd  -0x8(%rbp),%xmm0
call   1030 <fabs@plt>
cvtsi2sd %eax,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    1525 <gtdrli+0x3f5>
jmp    152a <gtdrli+0x3fa>
jmp    152f <gtdrli+0x3ff>
jmp    1534 <gtdrli+0x404>
jmp    1539 <gtdrli+0x409>
jmp    153e <gtdrli+0x40e>
jmp    1543 <gtdrli+0x413>
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    15aa <gtdrli+0x47a>
jp     15aa <gtdrli+0x47a>
movsd  -0x18(%rbp),%xmm0
mov    -0x30(%rbp),%rax
divsd  (%rax),%xmm0
call   1050 <atan@plt>
movsd  0xa8b(%rip),%xmm1
mulsd  %xmm1,%xmm0
mov    0x2a68(%rip),%rax
divsd  (%rax),%xmm0
call   1030 <fabs@plt>
cvtsi2sd %eax,%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    162f <gtdrli+0x4ff>
movsd  -0x18(%rbp),%xmm0
mov    -0x30(%rbp),%rax
divsd  (%rax),%xmm0
call   1050 <atan@plt>
movsd  0xa3c(%rip),%xmm1
mulsd  %xmm1,%xmm0
mov    0x2a19(%rip),%rax
divsd  (%rax),%xmm0
call   1030 <fabs@plt>
cvtsi2sd %eax,%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
mov    0x29eb(%rip),%rax
mulsd  (%rax),%xmm0
movsd  0x9f7(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1040 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x60(%rbp),%xmm0
divsd  %xmm1,%xmm0
call   1030 <fabs@plt>
cvtsi2sd %eax,%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gtdrli>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %rcx,%r14
mov    %rdx,%r13
mov    %rsi,%r15
mov    %rdi,%r12
movapd %xmm1,%xmm3
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
movsd  %xmm2,(%rsp)
movsd  %xmm3,0x8(%rsp)
jbe    11a0 <gtdrli+0x70>
ucomisd %xmm1,%xmm3
jbe    11a0 <gtdrli+0x70>
movapd %xmm3,%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1050 <atan@plt>
movsd  0xe7f(%rip),%xmm1
mulsd  %xmm1,%xmm0
mov    0x2e5c(%rip),%rax
divsd  (%rax),%xmm0
movsd  %xmm0,(%r12)
mulsd  (%rax),%xmm0
divsd  %xmm1,%xmm0
jmp    11f9 <gtdrli+0xc9>
ucomisd %xmm0,%xmm1
jbe    1212 <gtdrli+0xe2>
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm3
jbe    1212 <gtdrli+0xe2>
movapd %xmm3,%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1050 <atan@plt>
mulsd  0xe37(%rip),%xmm0
mov    0x2e18(%rip),%rbx
divsd  (%rbx),%xmm0
call   1030 <fabs@plt>
mov    $0xb4,%ecx
sub    %eax,%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
movsd  %xmm0,(%r12)
mulsd  (%rbx),%xmm0
divsd  0xe07(%rip),%xmm0
call   1040 <sin@plt>
movsd  0x8(%rsp),%xmm3
movsd  (%rsp),%xmm2
divsd  %xmm0,%xmm3
jmp    12d5 <gtdrli+0x1a5>
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jbe    1252 <gtdrli+0x122>
ucomisd %xmm3,%xmm1
jbe    1252 <gtdrli+0x122>
movapd %xmm3,%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1050 <atan@plt>
mulsd  0xdc5(%rip),%xmm0
mov    0x2da6(%rip),%rbx
divsd  (%rbx),%xmm0
call   1030 <fabs@plt>
add    $0xb4,%eax
jmp    1298 <gtdrli+0x168>
ucomisd %xmm1,%xmm0
jbe    1364 <gtdrli+0x234>
xorpd  %xmm1,%xmm1
ucomisd %xmm3,%xmm1
jbe    1364 <gtdrli+0x234>
movapd %xmm3,%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1050 <atan@plt>
mulsd  0xd7d(%rip),%xmm0
mov    0x2d5e(%rip),%rbx
divsd  (%rbx),%xmm0
call   1030 <fabs@plt>
add    $0x10e,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,(%r12)
mulsd  (%rbx),%xmm0
divsd  0xd4f(%rip),%xmm0
call   1040 <sin@plt>
movsd  0x8(%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1030 <fabs@plt>
movsd  (%rsp),%xmm2
xorps  %xmm3,%xmm3
cvtsi2sd %eax,%xmm3
movsd  %xmm3,0x0(%r13)
movapd %xmm2,%xmm0
divsd  0x0(%r13),%xmm0
call   1050 <atan@plt>
mulsd  0xd0e(%rip),%xmm0
mov    0x2cef(%rip),%rbx
divsd  (%rbx),%xmm0
call   1030 <fabs@plt>
movsd  (%rsp),%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,(%r15)
jne    1327 <gtdrli+0x1f7>
jp     1327 <gtdrli+0x1f7>
movsd  0x0(%r13),%xmm0
jmp    1351 <gtdrli+0x221>
mulsd  (%rbx),%xmm0
divsd  0xccd(%rip),%xmm0
call   1040 <sin@plt>
movsd  (%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1030 <fabs@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,(%r14)
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1389 <gtdrli+0x259>
jp     1389 <gtdrli+0x259>
ucomisd %xmm1,%xmm3
jbe    1389 <gtdrli+0x259>
movabs $0x4056800000000000,%rax
80 56 40
mov    %rax,(%r12)
jmp    12d5 <gtdrli+0x1a5>
ucomisd %xmm1,%xmm0
jne    13c3 <gtdrli+0x293>
jp     13c3 <gtdrli+0x293>
xorpd  %xmm1,%xmm1
ucomisd %xmm3,%xmm1
jbe    13c3 <gtdrli+0x293>
movabs $0x4070e00000000000,%rax
e0 70 40
mov    %rax,(%r12)
movapd %xmm3,%xmm0
call   1030 <fabs@plt>
xorps  %xmm3,%xmm3
cvtsi2sd %eax,%xmm3
movsd  (%rsp),%xmm2
jmp    12d5 <gtdrli+0x1a5>
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    13f1 <gtdrli+0x2c1>
ucomisd %xmm1,%xmm3
jne    13f1 <gtdrli+0x2c1>
jp     13f1 <gtdrli+0x2c1>
movabs $0x4076800000000000,%rax
80 76 40
mov    %rax,(%r12)
movapd %xmm0,%xmm3
movsd  (%rsp),%xmm2
jmp    12d5 <gtdrli+0x1a5>
ucomisd %xmm0,%xmm1
movsd  (%rsp),%xmm2
jbe    12db <gtdrli+0x1ab>
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm3
jne    12db <gtdrli+0x1ab>
jp     12db <gtdrli+0x1ab>
movabs $0x4066800000000000,%rax
80 66 40
mov    %rax,(%r12)
jmp    12c4 <gtdrli+0x194>

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define void @gtdrli(double %0, double %1, double %2, double* %3, double* %4, double* %5, double* %6) {
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double*
%12 = alloca double*
%13 = alloca double*
%14 = alloca double*
store double %0, double* %8
store double %1, double* %9
store double %2, double* %10
store double* %3, double** %11
store double* %4, double** %12
store double* %5, double** %13
store double* %6, double** %14
%15 = load double, double* %8
%16 = fcmp ogt double %15, 0.000000e+00
br i1 %16, label %17, label %38
17: ; preds = %7
%18 = load double, double* %9
%19 = fcmp ogt double %18, 0.000000e+00
br i1 %19, label %20, label %38
20: ; preds = %17
%21 = load double, double* %9
%22 = load double, double* %8
%23 = fdiv double %21, %22
%24 = call double @atan(double %23)
%25 = fmul double %24, 1.800000e+02
%26 = load double, double* @M_PI
%27 = fdiv double %25, %26
%28 = load double*, double** %11
store double %27, double* %28
%29 = load double, double* %9
%30 = load double*, double** %11
%31 = load double, double* %30
%32 = load double, double* @M_PI
%33 = fmul double %31, %32
%34 = fdiv double %33, 1.800000e+02
%35 = call double @sin(double %34)
%36 = fdiv double %29, %35
%37 = load double*, double** %13
store double %36, double* %37
br label %174
38: ; preds = %17, %7
%39 = load double, double* %8
%40 = fcmp olt double %39, 0.000000e+00
br i1 %40, label %41, label %65
41: ; preds = %38
%42 = load double, double* %9
%43 = fcmp ogt double %42, 0.000000e+00
br i1 %43, label %44, label %65
44: ; preds = %41
%45 = load double, double* %9
%46 = load double, double* %8
%47 = fdiv double %45, %46
%48 = call double @atan(double %47)
%49 = fmul double %48, 1.800000e+02
%50 = load double, double* @M_PI
%51 = fdiv double %49, %50
%52 = call i32 @fabs(double %51)
%53 = sub nsw i32 180, %52
%54 = sitofp i32 %53 to double
%55 = load double*, double** %11
store double %54, double* %55
%56 = load double, double* %9
%57 = load double*, double** %11
%58 = load double, double* %57
%59 = load double, double* @M_PI
%60 = fmul double %58, %59
%61 = fdiv double %60, 1.800000e+02
%62 = call double @sin(double %61)
%63 = fdiv double %56, %62
%64 = load double*, double** %13
store double %63, double* %64
br label %173
65: ; preds = %41, %38
%66 = load double, double* %8
%67 = fcmp olt double %66, 0.000000e+00
br i1 %67, label %68, label %94
68: ; preds = %65
%69 = load double, double* %9
%70 = fcmp olt double %69, 0.000000e+00
br i1 %70, label %71, label %94
71: ; preds = %68
%72 = load double, double* %9
%73 = load double, double* %8
%74 = fdiv double %72, %73
%75 = call double @atan(double %74)
%76 = fmul double %75, 1.800000e+02
%77 = load double, double* @M_PI
%78 = fdiv double %76, %77
%79 = call i32 @fabs(double %78)
%80 = add nsw i32 180, %79
%81 = sitofp i32 %80 to double
%82 = load double*, double** %11
store double %81, double* %82
%83 = load double, double* %9
%84 = load double*, double** %11
%85 = load double, double* %84
%86 = load double, double* @M_PI
%87 = fmul double %85, %86
%88 = fdiv double %87, 1.800000e+02
%89 = call double @sin(double %88)
%90 = fdiv double %83, %89
%91 = call i32 @fabs(double %90)
%92 = sitofp i32 %91 to double
%93 = load double*, double** %13
store double %92, double* %93
br label %172
94: ; preds = %68, %65
%95 = load double, double* %8
%96 = fcmp ogt double %95, 0.000000e+00
br i1 %96, label %97, label %123
97: ; preds = %94
%98 = load double, double* %9
%99 = fcmp olt double %98, 0.000000e+00
br i1 %99, label %100, label %123
100: ; preds = %97
%101 = load double, double* %9
%102 = load double, double* %8
%103 = fdiv double %101, %102
%104 = call double @atan(double %103)
%105 = fmul double %104, 1.800000e+02
%106 = load double, double* @M_PI
%107 = fdiv double %105, %106
%108 = call i32 @fabs(double %107)
%109 = add nsw i32 270, %108
%110 = sitofp i32 %109 to double
%111 = load double*, double** %11
store double %110, double* %111
%112 = load double, double* %9
%113 = load double*, double** %11
%114 = load double, double* %113
%115 = load double, double* @M_PI
%116 = fmul double %114, %115
%117 = fdiv double %116, 1.800000e+02
%118 = call double @sin(double %117)
%119 = fdiv double %112, %118
%120 = call i32 @fabs(double %119)
%121 = sitofp i32 %120 to double
%122 = load double*, double** %13
store double %121, double* %122
br label %171
123: ; preds = %97, %94
%124 = load double, double* %8
%125 = fcmp oeq double %124, 0.000000e+00
br i1 %125, label %126, label %133
126: ; preds = %123
%127 = load double, double* %9
%128 = fcmp ogt double %127, 0.000000e+00
br i1 %128, label %129, label %133
129: ; preds = %126
%130 = load double*, double** %11
store double 9.000000e+01, double* %130
%131 = load double, double* %9
%132 = load double*, double** %13
store double %131, double* %132
br label %170
133: ; preds = %126, %123
%134 = load double, double* %8
%135 = fcmp oeq double %134, 0.000000e+00
br i1 %135, label %136, label %145
136: ; preds = %133
%137 = load double, double* %9
%138 = fcmp olt double %137, 0.000000e+00
br i1 %138, label %139, label %145
139: ; preds = %136
%140 = load double*, double** %11
store double 2.700000e+02, double* %140
%141 = load double, double* %9
%142 = call i32 @fabs(double %141)
%143 = sitofp i32 %142 to double
%144 = load double*, double** %13
store double %143, double* %144
br label %169
145: ; preds = %136, %133
%146 = load double, double* %8
%147 = fcmp ogt double %146, 0.000000e+00
br i1 %147, label %148, label %155
148: ; preds = %145
%149 = load double, double* %9
%150 = fcmp oeq double %149, 0.000000e+00
br i1 %150, label %151, label %155
151: ; preds = %148
%152 = load double*, double** %11
store double 3.600000e+02, double* %152
%153 = load double, double* %8
%154 = load double*, double** %13
store double %153, double* %154
br label %168
155: ; preds = %148, %145
%156 = load double, double* %8
%157 = fcmp olt double %156, 0.000000e+00
br i1 %157, label %158, label %167
158: ; preds = %155
%159 = load double, double* %9
%160 = fcmp oeq double %159, 0.000000e+00
br i1 %160, label %161, label %167
161: ; preds = %158
%162 = load double*, double** %11
store double 1.800000e+02, double* %162
%163 = load double, double* %8
%164 = call i32 @fabs(double %163)
%165 = sitofp i32 %164 to double
%166 = load double*, double** %13
store double %165, double* %166
br label %167
167: ; preds = %161, %158, %155
br label %168
168: ; preds = %167, %151
br label %169
169: ; preds = %168, %139
br label %170
170: ; preds = %169, %129
br label %171
171: ; preds = %170, %100
br label %172
172: ; preds = %171, %71
br label %173
173: ; preds = %172, %44
br label %174
174: ; preds = %173, %20
%175 = load double, double* %10
%176 = fcmp oeq double %175, 0.000000e+00
br i1 %176, label %177, label %192
177: ; preds = %174
%178 = load double, double* %10
%179 = load double*, double** %13
%180 = load double, double* %179
%181 = fdiv double %178, %180
%182 = call double @atan(double %181)
%183 = fmul double %182, 1.800000e+02
%184 = load double, double* @M_PI
%185 = fdiv double %183, %184
%186 = call i32 @fabs(double %185)
%187 = sitofp i32 %186 to double
%188 = load double*, double** %12
store double %187, double* %188
%189 = load double*, double** %13
%190 = load double, double* %189
%191 = load double*, double** %14
store double %190, double* %191
br label %215
192: ; preds = %174
%193 = load double, double* %10
%194 = load double*, double** %13
%195 = load double, double* %194
%196 = fdiv double %193, %195
%197 = call double @atan(double %196)
%198 = fmul double %197, 1.800000e+02
%199 = load double, double* @M_PI
%200 = fdiv double %198, %199
%201 = call i32 @fabs(double %200)
%202 = sitofp i32 %201 to double
%203 = load double*, double** %12
store double %202, double* %203
%204 = load double, double* %10
%205 = load double*, double** %12
%206 = load double, double* %205
%207 = load double, double* @M_PI
%208 = fmul double %206, %207
%209 = fdiv double %208, 1.800000e+02
%210 = call double @sin(double %209)
%211 = fdiv double %204, %210
%212 = call i32 @fabs(double %211)
%213 = sitofp i32 %212 to double
%214 = load double*, double** %14
store double %213, double* %214
br label %215
215: ; preds = %192, %177
ret void
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define void @gtdrli(double %0, double %1, double %2, double* nocapture writeonly %3, double* nocapture writeonly %4, double* nocapture %5, double* nocapture writeonly %6) {
%8 = fcmp ogt double %0, 0.000000e+00
%9 = fcmp ogt double %1, 0.000000e+00
%10 = and i1 %8, %9
br i1 %10, label %11, label %22
11: ; preds = %7
%12 = fdiv double %1, %0
%13 = tail call double @atan(double %12)
%14 = fmul double %13, 1.800000e+02
%15 = load double, double* @M_PI
%16 = fdiv double %14, %15
store double %16, double* %3
%17 = load double, double* @M_PI
%18 = fmul double %16, %17
%19 = fdiv double %18, 1.800000e+02
%20 = tail call double @sin(double %19)
%21 = fdiv double %1, %20
br label %94
22: ; preds = %7
%23 = fcmp olt double %0, 0.000000e+00
%24 = and i1 %23, %9
br i1 %24, label %25, label %39
25: ; preds = %22
%26 = fdiv double %1, %0
%27 = tail call double @atan(double %26)
%28 = fmul double %27, 1.800000e+02
%29 = load double, double* @M_PI
%30 = fdiv double %28, %29
%31 = tail call i32 @fabs(double %30)
%32 = sub nsw i32 180, %31
%33 = sitofp i32 %32 to double
store double %33, double* %3
%34 = load double, double* @M_PI
%35 = fmul double %34, %33
%36 = fdiv double %35, 1.800000e+02
%37 = tail call double @sin(double %36)
%38 = fdiv double %1, %37
br label %94
39: ; preds = %22
%40 = fcmp olt double %1, 0.000000e+00
%41 = and i1 %23, %40
br i1 %41, label %42, label %58
42: ; preds = %39
%43 = fdiv double %1, %0
%44 = tail call double @atan(double %43)
%45 = fmul double %44, 1.800000e+02
%46 = load double, double* @M_PI
%47 = fdiv double %45, %46
%48 = tail call i32 @fabs(double %47)
%49 = add nsw i32 %48, 180
%50 = sitofp i32 %49 to double
store double %50, double* %3
%51 = load double, double* @M_PI
%52 = fmul double %51, %50
%53 = fdiv double %52, 1.800000e+02
%54 = tail call double @sin(double %53)
%55 = fdiv double %1, %54
%56 = tail call i32 @fabs(double %55)
%57 = sitofp i32 %56 to double
br label %94
58: ; preds = %39
%59 = and i1 %8, %40
br i1 %59, label %60, label %76
60: ; preds = %58
%61 = fdiv double %1, %0
%62 = tail call double @atan(double %61)
%63 = fmul double %62, 1.800000e+02
%64 = load double, double* @M_PI
%65 = fdiv double %63, %64
%66 = tail call i32 @fabs(double %65)
%67 = add nsw i32 %66, 270
%68 = sitofp i32 %67 to double
store double %68, double* %3
%69 = load double, double* @M_PI
%70 = fmul double %69, %68
%71 = fdiv double %70, 1.800000e+02
%72 = tail call double @sin(double %71)
%73 = fdiv double %1, %72
%74 = tail call i32 @fabs(double %73)
%75 = sitofp i32 %74 to double
br label %94
76: ; preds = %58
%77 = fcmp oeq double %0, 0.000000e+00
%78 = and i1 %77, %9
br i1 %78, label %79, label %80
79: ; preds = %76
store double 9.000000e+01, double* %3
br label %94
80: ; preds = %76
%81 = and i1 %77, %40
br i1 %81, label %82, label %85
82: ; preds = %80
store double 2.700000e+02, double* %3
%83 = tail call i32 @fabs(double %1)
%84 = sitofp i32 %83 to double
br label %94
85: ; preds = %80
%86 = fcmp oeq double %1, 0.000000e+00
%87 = and i1 %8, %86
br i1 %87, label %88, label %89
88: ; preds = %85
store double 3.600000e+02, double* %3
br label %94
89: ; preds = %85
%90 = and i1 %23, %86
br i1 %90, label %91, label %96
91: ; preds = %89
store double 1.800000e+02, double* %3
%92 = tail call i32 @fabs(double %0)
%93 = sitofp i32 %92 to double
br label %94
94: ; preds = %11, %42, %79, %88, %91, %82, %60, %25
%95 = phi double [ %38, %25 ], [ %75, %60 ], [ %84, %82 ], [ %93, %91 ], [ %0, %88 ], [ %1, %79 ], [ %57, %42 ], [ %21, %11 ]
store double %95, double* %5
br label %96
96: ; preds = %94, %89
%97 = fcmp oeq double %2, 0.000000e+00
%98 = load double, double* %5
%99 = fdiv double %2, %98
%100 = tail call double @atan(double %99)
%101 = fmul double %100, 1.800000e+02
%102 = load double, double* @M_PI
%103 = fdiv double %101, %102
%104 = tail call i32 @fabs(double %103)
%105 = sitofp i32 %104 to double
store double %105, double* %4
br i1 %97, label %106, label %108
106: ; preds = %96
%107 = load double, double* %5
br label %116
108: ; preds = %96
%109 = load double, double* @M_PI
%110 = fmul double %109, %105
%111 = fdiv double %110, 1.800000e+02
%112 = tail call double @sin(double %111)
%113 = fdiv double %2, %112
%114 = tail call i32 @fabs(double %113)
%115 = sitofp i32 %114 to double
br label %116
116: ; preds = %108, %106
%117 = phi double [ %115, %108 ], [ %107, %106 ]
store double %117, double* %6
ret void
}