// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_gcd()
void rpn_gcd()
{
double last;
double x0,y0;
double x1,y1;
double val;
double az;

   // great circle distance between two locations (lat,lon = R,Z and Y,X)
   // also calculate azimuth angle

   last = rpn[0];

   x0 = rpn_top() / deg_mode;
   y0 = rpn_top() / deg_mode;
   x1 = rpn_top() / deg_mode;
   y1 = rpn_top() / deg_mode;

   val = greatcircle(y0,x0, y1,x1) * 1000.0;

   az = az_angle(y1,x1, y0,x0);
   if(deg_mode == 1.0) az = az * PI / 180.0;
   rpn_push(az);
   rpn_push(val);

   last_x = last;
   last_was_clx = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x38, %rsp
movsd 0x320657(%rip), %xmm0   # 0x342970
movl $0x0, 0x320a0d(%rip)    # 0x342d30
movsd %xmm0, 0x320a0d(%rip)   # 0x342d38
movsd %xmm0, -0x30(%rbp)
movsd %xmm0, 0x3209f0(%rip)   # 0x342d28
movl 0x147d12(%rip), %ebx    # 0x16a050
cmpl $0x2, %ebx
jl 0x2235d
leal -0x1(%rbx), %edx
shlq $0x3, %rdx
leaq 0x32061f(%rip), %rdi    # 0x342970
leaq 0x320620(%rip), %rsi    # 0x342978
callq 0x9650
movsd 0x147cf3(%rip), %xmm0   # 0x16a058
movsd %xmm0, -0x10(%rbp)
movl $0x0, 0x3209bc(%rip)    # 0x342d30
movsd 0x3205f4(%rip), %xmm0   # 0x342970
movsd %xmm0, 0x3209b4(%rip)   # 0x342d38
movsd %xmm0, -0x28(%rbp)
movsd %xmm0, 0x320997(%rip)   # 0x342d28
cmpl $0x2, %ebx
jl 0x223b0
leal -0x1(%rbx), %edx
shlq $0x3, %rdx
leaq 0x3205cc(%rip), %rdi    # 0x342970
leaq 0x3205cd(%rip), %rsi    # 0x342978
callq 0x9650
movl $0x0, 0x320976(%rip)    # 0x342d30
movsd 0x3205ae(%rip), %xmm0   # 0x342970
movsd %xmm0, 0x32096e(%rip)   # 0x342d38
movsd %xmm0, -0x20(%rbp)
movsd %xmm0, 0x320951(%rip)   # 0x342d28
cmpl $0x2, %ebx
jl 0x223f6
leal -0x1(%rbx), %edx
shlq $0x3, %rdx
leaq 0x320586(%rip), %rdi    # 0x342970
leaq 0x320587(%rip), %rsi    # 0x342978
callq 0x9650
movl $0x0, 0x320930(%rip)    # 0x342d30
movsd 0x320568(%rip), %xmm0   # 0x342970
movsd %xmm0, 0x320928(%rip)   # 0x342d38
movsd %xmm0, -0x18(%rbp)
movsd %xmm0, 0x32090b(%rip)   # 0x342d28
cmpl $0x2, %ebx
jl 0x2243e
decl %ebx
shlq $0x3, %rbx
leaq 0x320541(%rip), %rdi    # 0x342970
leaq 0x320542(%rip), %rsi    # 0x342978
movq %rbx, %rdx
callq 0x9650
movsd -0x10(%rbp), %xmm4
movsd -0x20(%rbp), %xmm1
divsd %xmm4, %xmm1
movapd %xmm1, %xmm3
movsd %xmm1, -0x20(%rbp)
movsd -0x28(%rbp), %xmm0
divsd %xmm4, %xmm0
movsd %xmm0, -0x28(%rbp)
movsd -0x30(%rbp), %xmm1
divsd %xmm4, %xmm1
movsd %xmm1, -0x38(%rbp)
movsd -0x18(%rbp), %xmm2
divsd %xmm4, %xmm2
movsd %xmm2, -0x18(%rbp)
callq 0xe956f
movsd %xmm0, -0x10(%rbp)
movsd -0x18(%rbp), %xmm0
movsd -0x20(%rbp), %xmm1
movsd -0x28(%rbp), %xmm2
movsd -0x38(%rbp), %xmm3
callq 0xe9680
movsd 0xe936e(%rip), %xmm2    # 0x10b818
mulsd %xmm0, %xmm2
divsd 0xe936a(%rip), %xmm2    # 0x10b820
movsd 0xe6bb2(%rip), %xmm1    # 0x109070
cmpeqsd 0x147b91(%rip), %xmm1   # 0x16a058
movapd %xmm1, %xmm3
andnpd %xmm0, %xmm3
andpd %xmm2, %xmm1
orpd %xmm3, %xmm1
movsd -0x10(%rbp), %xmm0
mulsd 0xe6b54(%rip), %xmm0    # 0x109038
movsd %xmm0, -0x10(%rbp)
movapd %xmm1, %xmm0
callq 0x21298
movsd -0x10(%rbp), %xmm0
callq 0x21298
movsd -0x30(%rbp), %xmm0
movsd %xmm0, 0x32081f(%rip)   # 0x342d28
movl $0x0, 0x32081d(%rip)    # 0x342d30
addq $0x38, %rsp
popq %rbx
popq %rbp
retq