#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);
int /*<<< orphan*/ printf(char *, double, double);
double sin(double);
void gt_agrad(double xy, double yz, double *ag_vh, double *rad) {
  if (xy > 0 && yz > 0) {
    *ag_vh = atan(yz / xy) * 180.0 / M_PI;
    *rad = yz / sin(*ag_vh * M_PI / 180.0);
  } else if (xy < 0 && yz > 0) {
    *ag_vh = 90 + fabs(atan(xy / yz) * 180.0 / M_PI);
    *rad = fabs(xy / sin(*ag_vh * M_PI / 180.0));
  } else if (xy < 0 && yz < 0) {
    *ag_vh = 180 + fabs(atan(yz / xy) * 180.0 / M_PI);
    *rad = fabs(yz / sin(*ag_vh * M_PI / 180.0));
  } else if (xy > 0 && yz < 0) {
    *ag_vh = 270 + fabs(atan(xy / yz) * 180.0 / M_PI);
    *rad = fabs(xy / sin(*ag_vh * M_PI / 180.0));
  } else if (xy == 0 && yz > 0) {
    *ag_vh = 90;
    *rad = yz;
  } else if (xy == 0 && yz < 0) {
    *ag_vh = 270;
    *rad = fabs(yz);
  } else if (xy > 0 && yz == 0) {
    *ag_vh = 360;
    *rad = xy;
    ;
  } else if (xy < 0 && yz == 0) {
    *ag_vh = 180;
    *rad = fabs(xy);
  }
  printf("xy=%f, yz=%f\n", xy, yz);
  printf("*ag_vh=%f, *rad=%f\n", *ag_vh, *rad);
}


x86 assembly (clang, -O0):
<gt_agrad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    11f3 <gt_agrad+0xb3>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    11f3 <gt_agrad+0xb3>
movsd  -0x10(%rbp),%xmm0
divsd  -0x8(%rbp),%xmm0
call   1060 <atan@plt>
movsd  0xe6b(%rip),%xmm1
mulsd  %xmm1,%xmm0
mov    0x2e48(%rip),%rax
divsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    0x2e23(%rip),%rax
mulsd  (%rax),%xmm0
movsd  0xe2f(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
divsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    1549 <gt_agrad+0x409>
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    129d <gt_agrad+0x15d>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    129d <gt_agrad+0x15d>
movsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
call   1060 <atan@plt>
movsd  0xdd6(%rip),%xmm1
mulsd  %xmm1,%xmm0
mov    0x2db3(%rip),%rax
divsd  (%rax),%xmm0
call   1040 <fabs@plt>
add    $0x5a,%eax
cvtsi2sd %eax,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    0x2d82(%rip),%rax
mulsd  (%rax),%xmm0
movsd  0xd8e(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
divsd  %xmm1,%xmm0
call   1040 <fabs@plt>
cvtsi2sd %eax,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    1544 <gt_agrad+0x404>
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1345 <gt_agrad+0x205>
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1345 <gt_agrad+0x205>
movsd  -0x10(%rbp),%xmm0
divsd  -0x8(%rbp),%xmm0
call   1060 <atan@plt>
movsd  0xd30(%rip),%xmm1
mulsd  %xmm1,%xmm0
mov    0x2d0d(%rip),%rax
divsd  (%rax),%xmm0
call   1040 <fabs@plt>
add    $0xb4,%eax
cvtsi2sd %eax,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    0x2cda(%rip),%rax
mulsd  (%rax),%xmm0
movsd  0xce6(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
divsd  %xmm1,%xmm0
call   1040 <fabs@plt>
cvtsi2sd %eax,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    153f <gt_agrad+0x3ff>
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    13f1 <gt_agrad+0x2b1>
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    13f1 <gt_agrad+0x2b1>
movsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
call   1060 <atan@plt>
movsd  0xc84(%rip),%xmm1
mulsd  %xmm1,%xmm0
mov    0x2c61(%rip),%rax
divsd  (%rax),%xmm0
call   1040 <fabs@plt>
add    $0x10e,%eax
cvtsi2sd %eax,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    0x2c2e(%rip),%rax
mulsd  (%rax),%xmm0
movsd  0xc3a(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
divsd  %xmm1,%xmm0
call   1040 <fabs@plt>
cvtsi2sd %eax,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    153a <gt_agrad+0x3fa>
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    143d <gt_agrad+0x2fd>
jp     143d <gt_agrad+0x2fd>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    143d <gt_agrad+0x2fd>
mov    -0x18(%rbp),%rax
movsd  0xbf1(%rip),%xmm0
movsd  %xmm0,(%rax)
movsd  -0x10(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    1535 <gt_agrad+0x3f5>
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    148e <gt_agrad+0x34e>
jp     148e <gt_agrad+0x34e>
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    148e <gt_agrad+0x34e>
mov    -0x18(%rbp),%rax
movsd  0xba1(%rip),%xmm0
movsd  %xmm0,(%rax)
movsd  -0x10(%rbp),%xmm0
call   1040 <fabs@plt>
cvtsi2sd %eax,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    1530 <gt_agrad+0x3f0>
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    14da <gt_agrad+0x39a>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    14da <gt_agrad+0x39a>
jp     14da <gt_agrad+0x39a>
mov    -0x18(%rbp),%rax
movsd  0xb44(%rip),%xmm0
movsd  %xmm0,(%rax)
movsd  -0x8(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    152b <gt_agrad+0x3eb>
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1526 <gt_agrad+0x3e6>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1526 <gt_agrad+0x3e6>
jp     1526 <gt_agrad+0x3e6>
mov    -0x18(%rbp),%rax
movsd  0xaf4(%rip),%xmm0
movsd  %xmm0,(%rax)
movsd  -0x8(%rbp),%xmm0
call   1040 <fabs@plt>
cvtsi2sd %eax,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    152b <gt_agrad+0x3eb>
jmp    1530 <gt_agrad+0x3f0>
jmp    1535 <gt_agrad+0x3f5>
jmp    153a <gt_agrad+0x3fa>
jmp    153f <gt_agrad+0x3ff>
jmp    1544 <gt_agrad+0x404>
jmp    1549 <gt_agrad+0x409>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
lea    0xac6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm1
lea    0xab8(%rip),%rdi
call   1030 <printf@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gt_agrad>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
movapd %xmm0,%xmm3
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm3
movsd  %xmm1,0x8(%rsp)
movsd  %xmm3,(%rsp)
jbe    11bb <gt_agrad+0x7b>
ucomisd %xmm0,%xmm1
jbe    11bb <gt_agrad+0x7b>
movapd %xmm1,%xmm0
divsd  %xmm3,%xmm0
call   1060 <atan@plt>
movsd  0xe7d(%rip),%xmm1
mulsd  %xmm1,%xmm0
mov    0x2e5a(%rip),%rax
divsd  (%rax),%xmm0
movsd  %xmm0,(%rbx)
mulsd  (%rax),%xmm0
divsd  %xmm1,%xmm0
call   1050 <sin@plt>
movsd  (%rsp),%xmm3
movsd  0x8(%rsp),%xmm1
movapd %xmm1,%xmm2
divsd  %xmm0,%xmm2
jmp    129a <gt_agrad+0x15a>
ucomisd %xmm3,%xmm0
jbe    1218 <gt_agrad+0xd8>
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
jbe    1218 <gt_agrad+0xd8>
movapd %xmm3,%xmm0
divsd  %xmm1,%xmm0
call   1060 <atan@plt>
mulsd  0xe20(%rip),%xmm0
mov    0x2e01(%rip),%r15
divsd  (%r15),%xmm0
call   1040 <fabs@plt>
add    $0x5a,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,(%rbx)
mulsd  (%r15),%xmm0
divsd  0xdf4(%rip),%xmm0
call   1050 <sin@plt>
movsd  (%rsp),%xmm1
jmp    127e <gt_agrad+0x13e>
xorpd  %xmm0,%xmm0
ucomisd %xmm3,%xmm0
jbe    12cd <gt_agrad+0x18d>
ucomisd %xmm1,%xmm0
jbe    12cd <gt_agrad+0x18d>
movapd %xmm1,%xmm0
divsd  %xmm3,%xmm0
call   1060 <atan@plt>
mulsd  0xdbb(%rip),%xmm0
mov    0x2d9c(%rip),%r15
divsd  (%r15),%xmm0
call   1040 <fabs@plt>
add    $0xb4,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,(%rbx)
mulsd  (%r15),%xmm0
divsd  0xd8d(%rip),%xmm0
call   1050 <sin@plt>
movsd  0x8(%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1040 <fabs@plt>
movsd  (%rsp),%xmm3
movsd  0x8(%rsp),%xmm1
cvtsi2sd %eax,%xmm2
movsd  %xmm2,(%r14)
lea    0xd62(%rip),%rdi
movapd %xmm3,%xmm0
call   1030 <printf@plt>
movsd  (%rbx),%xmm0
movsd  (%r14),%xmm1
lea    0xd57(%rip),%rdi
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <printf@plt>
ucomisd %xmm0,%xmm3
jbe    130d <gt_agrad+0x1cd>
xorpd  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    130d <gt_agrad+0x1cd>
movapd %xmm3,%xmm0
divsd  %xmm1,%xmm0
call   1060 <atan@plt>
mulsd  0xd0e(%rip),%xmm0
mov    0x2cef(%rip),%r15
divsd  (%r15),%xmm0
call   1040 <fabs@plt>
add    $0x10e,%eax
jmp    11f4 <gt_agrad+0xb4>
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm3
jne    1335 <gt_agrad+0x1f5>
jp     1335 <gt_agrad+0x1f5>
ucomisd %xmm0,%xmm1
jbe    1335 <gt_agrad+0x1f5>
movabs $0x4056800000000000,%rax
80 56 40
mov    %rax,(%rbx)
movapd %xmm1,%xmm2
jmp    129a <gt_agrad+0x15a>
ucomisd %xmm0,%xmm3
jne    1359 <gt_agrad+0x219>
jp     1359 <gt_agrad+0x219>
xorpd  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    1359 <gt_agrad+0x219>
movabs $0x4070e00000000000,%rax
e0 70 40
mov    %rax,(%rbx)
jmp    1282 <gt_agrad+0x142>
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm3
jbe    1381 <gt_agrad+0x241>
ucomisd %xmm0,%xmm1
jne    1381 <gt_agrad+0x241>
jp     1381 <gt_agrad+0x241>
movabs $0x4076800000000000,%rax
80 76 40
mov    %rax,(%rbx)
movapd %xmm3,%xmm2
jmp    129a <gt_agrad+0x15a>
ucomisd %xmm3,%xmm0
jbe    129f <gt_agrad+0x15f>
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
jne    129f <gt_agrad+0x15f>
jp     129f <gt_agrad+0x15f>
movabs $0x4066800000000000,%rax
80 66 40
mov    %rax,(%rbx)
movapd %xmm3,%xmm0
jmp    1286 <gt_agrad+0x146>

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

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