LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_range(int)
void rpn_range(int i)
{
   // push sat pseudorange

   if(i == 0) {
      i = highest_sat();
      if(isdigit(msg_field[5])) {
         i = atoi(&msg_field[5]);
      }
   }
   if(i < 0) i = 0 - i;

   sprintf(out, "PRN out of range 0..%d", SUN_MOON_PRN);
   if(i > SUN_MOON_PRN) rpn_error(out);
   else if(NO_SATS || (sat[i].level_msg == 0)) {
      rpn_error("Satellite info not available");
   }
   else rpn_push(sat[i].range);
   last_was_clx = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
testl %edi, %edi
jne 0x2070f
callq 0x9e00c
movl %eax, %edi
leaq 0x30534b(%rip), %rax    # 0x325a40
movsbl 0x5(%rax), %ecx
addl $-0x30, %ecx
cmpl $0x9, %ecx
ja 0x2070f
addq $0x5, %rax
movq %rax, %rdi
callq 0x95e0
movl %eax, %edi
movl %edi, %ebx
negl %ebx
cmovsl %edi, %ebx
leaq 0x305b03(%rip), %rdi    # 0x326220
leaq 0xd6ed0(%rip), %rsi     # 0xf75f4
movl $0x3e9, %edx            # imm = 0x3E9
xorl %eax, %eax
callq 0x9060
cmpl $0x3ea, %ebx            # imm = 0x3EA
jb 0x20741
leaq 0x305ae1(%rip), %rdi    # 0x326220
jmp 0x207b3
leaq 0x1e2188(%rip), %rax    # 0x2028d0
movq (%rax), %rax
movabsq $0x105b8b0400, %rcx     # imm = 0x105B8B0400
testq %rcx, %rax
jne 0x207ac
leaq 0x1e486f(%rip), %rcx    # 0x204fd0
cmpl $0x0, (%rcx)
je 0x20772
leaq 0x2d6c57(%rip), %rcx    # 0x2f73c4
cmpl $0x0, (%rcx)
je 0x207ac
cmpq $0x400000, %rax         # imm = 0x400000
jne 0x20786
leaq 0x2d7233(%rip), %rax    # 0x2f79b4
cmpl $0x0, (%rax)
je 0x207ac
movl %ebx, %eax
imulq $0x348, %rax, %rcx      # imm = 0x348
leaq 0x20881a(%rip), %rax    # 0x228fb0
cmpl $0x0, 0x1c(%rax,%rcx)
je 0x207ac
addq %rcx, %rax
movsd 0x38(%rax), %xmm0
callq 0x1fcb6
jmp 0x207b8
leaq 0xd6e58(%rip), %rdi     # 0xf760b
callq 0x1f963
andl $0x0, 0x30c571(%rip)    # 0x32cd30
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_phase(int)
void rpn_phase(int i)
{
   // push sat code or carrier phase

   if(i == 0) {
      i = highest_sat();
      if(isdigit(msg_field[5])) {
         i = atoi(&msg_field[5]);
      }
   }
   if(i < 0) i = 0 - i;

   sprintf(out, "PRN out of range 1..%d", SUN_MOON_PRN);
   if(i > SUN_MOON_PRN) rpn_error(out);
   else if(i <= 0) rpn_error(out);
   else if(NO_SATS || (sat[i].level_msg == 0)) {
      rpn_error("Satellite info not available");
   }
   else rpn_push(sat[i].code_phase);
   last_was_clx = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
testl %edi, %edi
jne 0x207f8
callq 0x9e00c
movl %eax, %ebx
leaq 0x30525f(%rip), %rdi    # 0x325a40
movsbl 0x5(%rdi), %eax
addl $-0x30, %eax
cmpl $0x9, %eax
ja 0x207f8
addq $0x5, %rdi
callq 0x95e0
movl %eax, %ebx
movl %ebx, %r14d
negl %r14d
cmovsl %ebx, %r14d
leaq 0x305a17(%rip), %rdi    # 0x326220
leaq 0xd6e18(%rip), %rsi     # 0xf7628
movl $0x3e9, %edx            # imm = 0x3E9
xorl %eax, %eax
callq 0x9060
cmpl $0x3ea, %r14d           # imm = 0x3EA
jae 0x20895
testl %ebx, %ebx
je 0x20895
leaq 0x1e20a0(%rip), %rax    # 0x2028d0
movq (%rax), %rax
movabsq $0x105b8b0400, %rcx     # imm = 0x105B8B0400
testq %rcx, %rax
jne 0x2089e
leaq 0x1e4787(%rip), %rcx    # 0x204fd0
cmpl $0x0, (%rcx)
je 0x2085a
leaq 0x2d6b6f(%rip), %rcx    # 0x2f73c4
cmpl $0x0, (%rcx)
je 0x2089e
cmpq $0x400000, %rax         # imm = 0x400000
jne 0x2086e
leaq 0x2d714b(%rip), %rax    # 0x2f79b4
cmpl $0x0, (%rax)
je 0x2089e
movl %r14d, %eax
imulq $0x348, %rax, %rcx      # imm = 0x348
leaq 0x208731(%rip), %rax    # 0x228fb0
cmpl $0x0, 0x1c(%rax,%rcx)
je 0x2089e
addq %rcx, %rax
movsd 0x28(%rax), %xmm0
callq 0x1fcb6
jmp 0x208aa
leaq 0x305984(%rip), %rdi    # 0x326220
jmp 0x208a5
leaq 0xd6d66(%rip), %rdi     # 0xf760b
callq 0x1f963
andl $0x0, 0x30c47f(%rip)    # 0x32cd30
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_prn(int)
void rpn_prn(int i)
{
   // push all info for a sat prn onto the stack

   if(i == 0) {
      i = highest_sat();
      if(isdigit(msg_field[3])) {
         i = atoi(&msg_field[3]);
      }
   }
   if(i < 0) i = 0 - i;

   sprintf(out, "PRN out of range 0..%d", SUN_MOON_PRN);
   if((i == 0) || (i > SUN_MOON_PRN)) rpn_error(out);
   else if(NO_SATS || (sat[i].level_msg == 0)) {
      rpn_error("Satellite info not available");
   }
   else {
      rpn_phase(i);
      rpn_range(i);
      rpn_doppler(i);
      rpn_sig(i);
      rpn_el(i);
      rpn_az(i);
   }
   last_was_clx = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %r14d
testl %edi, %edi
jne 0x208eb
callq 0x9e00c
movl %eax, %r14d
leaq 0x30516d(%rip), %rdi    # 0x325a40
movsbl 0x3(%rdi), %eax
addl $-0x30, %eax
cmpl $0x9, %eax
ja 0x208eb
addq $0x3, %rdi
callq 0x95e0
movl %eax, %r14d
movl %r14d, %ebx
negl %ebx
cmovsl %r14d, %ebx
leaq 0x305925(%rip), %rdi    # 0x326220
leaq 0xd6cf2(%rip), %rsi     # 0xf75f4
movl $0x3e9, %edx            # imm = 0x3E9
xorl %eax, %eax
callq 0x9060
testl %r14d, %r14d
setne %al
cmpl $0x3ea, %ebx            # imm = 0x3EA
setb %cl
testb %cl, %al
jne 0x2092d
leaq 0x3058f8(%rip), %rdi    # 0x326220
jmp 0x209bc
leaq 0x1e1f9c(%rip), %rax    # 0x2028d0
movq (%rax), %rax
movabsq $0x105b8b0400, %rcx     # imm = 0x105B8B0400
testq %rcx, %rax
jne 0x209b5
leaq 0x1e4683(%rip), %rcx    # 0x204fd0
cmpl $0x0, (%rcx)
je 0x2095e
leaq 0x2d6a6b(%rip), %rcx    # 0x2f73c4
cmpl $0x0, (%rcx)
je 0x209b5
cmpq $0x400000, %rax         # imm = 0x400000
jne 0x20972
leaq 0x2d7047(%rip), %rax    # 0x2f79b4
cmpl $0x0, (%rax)
je 0x209b5
movl %ebx, %eax
imulq $0x348, %rax, %rax      # imm = 0x348
leaq 0x20862e(%rip), %rcx    # 0x228fb0
cmpl $0x0, 0x1c(%rcx,%rax)
je 0x209b5
movl %ebx, %edi
callq 0x207c6
movl %ebx, %edi
callq 0x206dd
movl %ebx, %edi
callq 0x205f4
movl %ebx, %edi
callq 0x2050b
movl %ebx, %edi
callq 0x203e3
movl %ebx, %edi
callq 0x202bb
jmp 0x209c1
leaq 0xd6c4f(%rip), %rdi     # 0xf760b
callq 0x1f963
andl $0x0, 0x30c368(%rip)    # 0x32cd30
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_dist()
void rpn_dist()
{
double last;
double x0,y0;
double x1,y1;
double val;

   // linear distance between two points

   last = rpn[0];
   x0 = rpn_top();
   y0 = rpn_top();
   x1 = rpn_top();
   y1 = rpn_top();

   x0 -= x1;
   y0 -= y1;
   val = sqrt(x0*x0 + y0*y0);
   rpn_new(val);

   last_x = last;
   last_was_clx = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movsd 0x30bf93(%rip), %xmm0   # 0x32c970
movsd %xmm0, -0x20(%rbp)
callq 0x1fbfe
movsd %xmm0, -0x18(%rbp)
callq 0x1fbfe
movsd %xmm0, -0x10(%rbp)
callq 0x1fbfe
movsd %xmm0, -0x8(%rbp)
callq 0x1fbfe
movsd -0x18(%rbp), %xmm1
subsd -0x8(%rbp), %xmm1
movsd -0x10(%rbp), %xmm2
subsd %xmm0, %xmm2
mulsd %xmm2, %xmm2
mulsd %xmm1, %xmm1
addsd %xmm2, %xmm1
sqrtsd %xmm1, %xmm0
movsd %xmm0, 0x30c308(%rip)   # 0x32cd38
movsd %xmm0, 0x30bf38(%rip)   # 0x32c970
movsd -0x20(%rbp), %xmm0
movsd %xmm0, 0x30c2e3(%rip)   # 0x32cd28
andl $0x0, 0x30c2e4(%rip)    # 0x32cd30
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
subq $0x30, %rsp
movsd 0x30bf0e(%rip), %xmm0   # 0x32c970
movsd %xmm0, -0x30(%rbp)
callq 0x1fbfe
divsd 0x1335e4(%rip), %xmm0   # 0x154058
movsd %xmm0, -0x20(%rbp)
callq 0x1fbfe
divsd 0x1335d2(%rip), %xmm0   # 0x154058
movsd %xmm0, -0x18(%rbp)
callq 0x1fbfe
divsd 0x1335c0(%rip), %xmm0   # 0x154058
movsd %xmm0, -0x10(%rbp)
callq 0x1fbfe
movapd %xmm0, %xmm2
divsd 0x1335aa(%rip), %xmm2   # 0x154058
movsd %xmm2, -0x28(%rbp)
movsd -0x18(%rbp), %xmm0
movsd -0x20(%rbp), %xmm1
movsd -0x10(%rbp), %xmm3
callq 0xd59ef
movsd %xmm0, -0x8(%rbp)
movsd -0x28(%rbp), %xmm0
movsd -0x10(%rbp), %xmm1
movsd -0x18(%rbp), %xmm2
movsd -0x20(%rbp), %xmm3
callq 0xd5b00
movsd 0xd4db3(%rip), %xmm2    # 0xf58a0
mulsd %xmm0, %xmm2
divsd 0xd4daf(%rip), %xmm2    # 0xf58a8
movsd 0xd256f(%rip), %xmm1    # 0xf3070
cmpeqsd 0x13354e(%rip), %xmm1   # 0x154058
movapd %xmm1, %xmm3
andnpd %xmm0, %xmm3
andpd %xmm2, %xmm1
orpd %xmm3, %xmm1
movsd -0x8(%rbp), %xmm0
mulsd 0xd2511(%rip), %xmm0    # 0xf3038
movsd %xmm0, -0x8(%rbp)
movapd %xmm1, %xmm0
callq 0x1fcb6
movsd -0x8(%rbp), %xmm0
callq 0x1fcb6
movsd -0x30(%rbp), %xmm0
movsd %xmm0, 0x30c1dc(%rip)   # 0x32cd28
andl $0x0, 0x30c1dd(%rip)    # 0x32cd30
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_bearing()
void rpn_bearing()
{
double last;
double x0,y0;
double x1,y1;
double az;

   // calculate azimuth angle between two points

   last = rpn[0];

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

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

   last_x = last;
   last_was_clx = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movsd 0x30be07(%rip), %xmm0   # 0x32c970
movsd %xmm0, -0x20(%rbp)
callq 0x1fbfe
divsd 0x1334dd(%rip), %xmm0   # 0x154058
movsd %xmm0, -0x18(%rbp)
callq 0x1fbfe
divsd 0x1334cb(%rip), %xmm0   # 0x154058
movsd %xmm0, -0x10(%rbp)
callq 0x1fbfe
divsd 0x1334b9(%rip), %xmm0   # 0x154058
movsd %xmm0, -0x8(%rbp)
callq 0x1fbfe
divsd 0x1334a7(%rip), %xmm0   # 0x154058
movsd -0x8(%rbp), %xmm1
movsd -0x10(%rbp), %xmm2
movsd -0x18(%rbp), %xmm3
callq 0xd5b00
movsd 0xd4cd3(%rip), %xmm2    # 0xf58a0
mulsd %xmm0, %xmm2
divsd 0xd4ccf(%rip), %xmm2    # 0xf58a8
movsd 0xd248f(%rip), %xmm1    # 0xf3070
cmpeqsd 0x13346e(%rip), %xmm1   # 0x154058
movapd %xmm1, %xmm3
andnpd %xmm0, %xmm3
andpd %xmm2, %xmm1
orpd %xmm3, %xmm1
movapd %xmm1, %xmm0
callq 0x1fcb6
movsd -0x20(%rbp), %xmm0
movsd %xmm0, 0x30c118(%rip)   # 0x32cd28
andl $0x0, 0x30c119(%rip)    # 0x32cd30
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_secs()
void rpn_secs()
{
double val;
double last;

   // convert hours minutes sseconds in top 3 stack entries to seconds

   last = rpn[0];

   val = rpn_top();
   val += rpn_top() * 60.0;
   val += rpn_top() * 3600.0;
   rpn_push(val);

   last_x = last;
   last_was_clx = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movsd 0x30bd43(%rip), %xmm0   # 0x32c970
movsd %xmm0, -0x10(%rbp)
callq 0x1fbfe
movsd %xmm0, -0x8(%rbp)
callq 0x1fbfe
mulsd 0xd23bf(%rip), %xmm0    # 0xf3008
addsd -0x8(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
callq 0x1fbfe
mulsd 0xd23b0(%rip), %xmm0    # 0xf3010
addsd -0x8(%rbp), %xmm0
callq 0x1fcb6
movsd -0x10(%rbp), %xmm0
movsd %xmm0, 0x30c0b1(%rip)   # 0x32cd28
andl $0x0, 0x30c0b2(%rip)    # 0x32cd30
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_dow()
void rpn_dow()
{
double val;
double last;
int year,month,day;

   // convert year month day in top 3 stack entries to day-of-week (0..6)

   last = rpn[0];

   day = (int) rpn_top();
   month = (int) rpn_top();
   year = (int) rpn_top();

   val = day_of_week(year,month,day);
   rpn_push(val);

   last_x = last;
   last_was_clx = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movsd 0x30bcd9(%rip), %xmm0   # 0x32c970
movsd %xmm0, -0x18(%rbp)
callq 0x1fbfe
cvttsd2si %xmm0, %ebx
callq 0x1fbfe
cvttsd2si %xmm0, %r14d
callq 0x1fbfe
cvttsd2si %xmm0, %edi
movl %r14d, %esi
movl %ebx, %edx
callq 0xcd7b8
movzbl %al, %eax
cvtsi2sd %eax, %xmm0
callq 0x1fcb6
movsd -0x18(%rbp), %xmm0
movsd %xmm0, 0x30c04d(%rip)   # 0x32cd28
andl $0x0, 0x30c04e(%rip)    # 0x32cd30
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_dms()
void rpn_dms()
{
double last;
double val;
double degs, mins, secs;
double sign;

   // break up X into degrees minutes seconds

   last = rpn[0];

   val = rpn_top();
   if(deg_mode == 1.0) {
      val = val * 180.0 / PI;
   }
   if(val < 0) {
      sign = (-1.0);
      val = 0.0 - val;
   }
   else sign = 1.0;

   degs = (double) (int) val;

   val = (val - degs) * 60.0;
   mins = (double) (int) val;

   val = (val - mins) * 60.0;
   secs = val;

   rpn_push(degs*sign);
   rpn_push(mins);
   rpn_push(secs);

   last_x = last;
   last_was_clx = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movsd 0x30bc75(%rip), %xmm0   # 0x32c970
movsd %xmm0, -0x8(%rbp)
callq 0x1fbfe
movsd 0xd4b9b(%rip), %xmm1    # 0xf58a8
mulsd %xmm0, %xmm1
divsd 0xd4b87(%rip), %xmm1    # 0xf58a0
movsd 0xd234f(%rip), %xmm2    # 0xf3070
cmpeqsd 0x13332e(%rip), %xmm2   # 0x154058
movapd %xmm2, %xmm3
andnpd %xmm0, %xmm3
andpd %xmm1, %xmm2
orpd %xmm3, %xmm2
xorpd %xmm0, %xmm0
ucomisd %xmm2, %xmm0
xorpd %xmm1, %xmm1
subsd %xmm2, %xmm1
movapd %xmm2, %xmm3
cmpltsd %xmm0, %xmm3
andpd %xmm3, %xmm1
andnpd %xmm2, %xmm3
orpd %xmm1, %xmm3
cvttpd2dq %xmm3, %xmm0
cvtdq2pd %xmm0, %xmm0
subsd %xmm0, %xmm3
movsd 0xd2295(%rip), %xmm1    # 0xf3008
mulsd %xmm1, %xmm3
cvttpd2dq %xmm3, %xmm2
cvtdq2pd %xmm2, %xmm2
movapd %xmm2, -0x20(%rbp)
subsd %xmm2, %xmm3
mulsd %xmm1, %xmm3
movapd %xmm3, -0x30(%rbp)
jbe 0x20d9b
xorpd 0xd2415(%rip), %xmm0    # 0xf31b0
callq 0x1fcb6
movaps -0x20(%rbp), %xmm0
callq 0x1fcb6
movaps -0x30(%rbp), %xmm0
callq 0x1fcb6
movsd -0x8(%rbp), %xmm0
movsd %xmm0, 0x30bf69(%rip)   # 0x32cd28
andl $0x0, 0x30bf6a(%rip)    # 0x32cd30
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_time()
void rpn_time()
{
double last;

   // put current displayed time on stack

   last = rpn[0];

   rpn_push((double) pri_hours);
   rpn_push((double) pri_minutes);
   rpn_push((double) pri_seconds + pri_frac);

   last_x = last;
   last_was_clx = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movsd 0x30bb94(%rip), %xmm0   # 0x32c970
movsd %xmm0, -0x8(%rbp)
leaq 0x2d6720(%rip), %rax    # 0x2f7508
cvtsi2sdl (%rax), %xmm0
callq 0x1fcb6
leaq 0x2d670c(%rip), %rax    # 0x2f7504
cvtsi2sdl (%rax), %xmm0
callq 0x1fcb6
leaq 0x2d66f8(%rip), %rax    # 0x2f7500
cvtsi2sdl (%rax), %xmm0
leaq 0x2d6705(%rip), %rax    # 0x2f7518
addsd (%rax), %xmm0
callq 0x1fcb6
movsd -0x8(%rbp), %xmm0
movsd %xmm0, 0x30beff(%rip)   # 0x32cd28
andl $0x0, 0x30bf00(%rip)    # 0x32cd30
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_date()
void rpn_date()
{
double last;

   // put current displayed date on stack

   last = rpn[0];

   rpn_push((double) pri_year);
   rpn_push((double) pri_month);
   rpn_push((double) pri_day);

   last_x = last;
   last_was_clx = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movsd 0x30bb2a(%rip), %xmm0   # 0x32c970
movsd %xmm0, -0x8(%rbp)
leaq 0x2d66c2(%rip), %rax    # 0x2f7514
cvtsi2sdl (%rax), %xmm0
callq 0x1fcb6
leaq 0x2d66ae(%rip), %rax    # 0x2f7510
cvtsi2sdl (%rax), %xmm0
callq 0x1fcb6
leaq 0x2d669a(%rip), %rax    # 0x2f750c
cvtsi2sdl (%rax), %xmm0
callq 0x1fcb6
movsd -0x8(%rbp), %xmm0
movsd %xmm0, 0x30bea0(%rip)   # 0x32cd28
andl $0x0, 0x30bea1(%rip)    # 0x32cd30
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_gregorian()
void rpn_gregorian()
{
double last;

   // convert rpn[0] julian date to gregorian date / time

   last = rpn[0];
   gregorian(0, rpn[0]);

   rpn_push((double) g_year);
   rpn_push((double) g_month);
   rpn_push((double) g_day);

   rpn_push((double) g_hours);
   rpn_push((double) g_minutes);
   rpn_push((double) g_seconds + g_frac);

   last_x = last;
   last_was_clx = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movsd 0x30bacb(%rip), %xmm0   # 0x32c970
movsd %xmm0, -0x8(%rbp)
xorl %edi, %edi
callq 0xbfac2
leaq 0x2d67ec(%rip), %rax    # 0x2f76a4
cvtsi2sdl (%rax), %xmm0
callq 0x1fcb6
leaq 0x2d67d4(%rip), %rax    # 0x2f769c
cvtsi2sdl (%rax), %xmm0
callq 0x1fcb6
leaq 0x2d67c8(%rip), %rax    # 0x2f76a0
cvtsi2sdl (%rax), %xmm0
callq 0x1fcb6
leaq 0x2d67c0(%rip), %rax    # 0x2f76a8
cvtsi2sdl (%rax), %xmm0
callq 0x1fcb6
leaq 0x2d67b4(%rip), %rax    # 0x2f76ac
cvtsi2sdl (%rax), %xmm0
callq 0x1fcb6
leaq 0x2d67a8(%rip), %rax    # 0x2f76b0
cvtsi2sdl (%rax), %xmm0
leaq 0x2d67a5(%rip), %rax    # 0x2f76b8
addsd (%rax), %xmm0
callq 0x1fcb6
movsd -0x8(%rbp), %xmm0
movsd %xmm0, 0x30bdff(%rip)   # 0x32cd28
andl $0x0, 0x30be00(%rip)    # 0x32cd30
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_dec()
void rpn_dec()
{
double last;
double val;
double degs, mins, secs;
double sign;

   // convert X,Y,Z degrees minutes seconds to decimal

   last = rpn[0];

   secs = rpn_top();
   mins = rpn_top();
   degs = rpn_top();
   if(degs < 0.0) {
      sign = (-1.0);
      degs = 0.0 - degs;
   }
   else sign = 1.0;

   secs = fabs(secs) * sign;
   mins = fabs(mins) * sign;
   degs *= sign;

   val = degs + (mins/60.0) + (secs/3600.0);

   if(deg_mode == 1.0) {
      val = val * PI / 180.0;
   }

   rpn_push(val);

   last_x = last;
   last_was_clx = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movsd 0x30ba2a(%rip), %xmm0   # 0x32c970
movsd %xmm0, -0x8(%rbp)
callq 0x1fbfe
movapd %xmm0, -0x30(%rbp)
callq 0x1fbfe
movapd %xmm0, -0x20(%rbp)
callq 0x1fbfe
xorpd %xmm1, %xmm1
xorl %eax, %eax
ucomisd %xmm0, %xmm1
seta %cl
jbe 0x20f7b
subsd %xmm0, %xmm1
movapd %xmm1, %xmm0
movb %cl, %al
leaq 0xd5fec(%rip), %rcx     # 0xf6f70
movsd (%rcx,%rax,8), %xmm1
movapd 0xd21ff(%rip), %xmm2    # 0xf3190
movapd -0x30(%rbp), %xmm3
andpd %xmm2, %xmm3
mulsd %xmm1, %xmm3
movapd -0x20(%rbp), %xmm4
andpd %xmm2, %xmm4
mulsd %xmm1, %xmm4
mulsd %xmm1, %xmm0
divsd 0xd2051(%rip), %xmm4    # 0xf3008
addsd %xmm0, %xmm4
divsd 0xd204d(%rip), %xmm3    # 0xf3010
addsd %xmm4, %xmm3
movsd 0xd48d1(%rip), %xmm1    # 0xf58a0
mulsd %xmm3, %xmm1
divsd 0xd48cd(%rip), %xmm1    # 0xf58a8
movsd 0xd208d(%rip), %xmm0    # 0xf3070
cmpeqsd 0x13306c(%rip), %xmm0   # 0x154058
movapd %xmm0, %xmm2
andnpd %xmm3, %xmm2
andpd %xmm1, %xmm0
orpd %xmm2, %xmm0
callq 0x1fcb6
movsd -0x8(%rbp), %xmm0
movsd %xmm0, 0x30bd1a(%rip)   # 0x32cd28
andl $0x0, 0x30bd1b(%rip)    # 0x32cd30
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_shr()
void rpn_shr()
{
int count;
s32 val;

   // shift right

   if(isdigit(msg_field[2])) count = atoi(&msg_field[2]);
   else if(msg_field[2] == '-') count = atoi(&msg_field[2]);
   else count = 1;

   val = (int) rpn[0];
   if(count > 0) {
      val >>= count;
   }
   else if(count < 0) {
      count = 0-count;
      val <<= count;
   }

   last_x = rpn[0];
   rpn[0] = (double) val;
   last_was_clx = 0;
}

// Assembly:
leaq 0x304a1e(%rip), %rdi    # 0x325a40
movsbl 0x2(%rdi), %eax
cmpl $0x2d, %eax
sete %cl
addl $-0x30, %eax
cmpl $0xa, %eax
setb %al
orb %cl, %al
je 0x21061
pushq %rbp
movq %rsp, %rbp
addq $0x2, %rdi
callq 0x95e0
movl %eax, %ecx
movsd 0x30b920(%rip), %xmm0   # 0x32c970
cvttsd2si %xmm0, %eax
testl %ecx, %ecx
popq %rbp
jg 0x21070
jns 0x21072
negb %cl
shll %cl, %eax
jmp 0x21072
movsd 0x30b907(%rip), %xmm0   # 0x32c970
cvttsd2si %xmm0, %eax
pushq $0x1
popq %rcx
sarl %cl, %eax
movsd %xmm0, 0x30bcae(%rip)   # 0x32cd28
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x30b8ea(%rip)   # 0x32c970
andl $0x0, 0x30bca3(%rip)    # 0x32cd30
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_shl()
void rpn_shl()
{
int count;
s32 val;

   // shift left

   if(isdigit(msg_field[2])) count = atoi(&msg_field[2]);
   else if(msg_field[2] == '-') count = atoi(&msg_field[2]);
   else count = 1;

   val = (int) rpn[0];
   if(count > 0) {
      val <<= count;
   }
   else if(count < 0) {
      count = 0-count;
      val >>= count;
   }

   last_x = rpn[0];
   rpn[0] = (double) val;
   last_was_clx = 0;
}

// Assembly:
leaq 0x3049ab(%rip), %rdi    # 0x325a40
movsbl 0x2(%rdi), %eax
cmpl $0x2d, %eax
sete %cl
addl $-0x30, %eax
cmpl $0xa, %eax
setb %al
orb %cl, %al
je 0x210d4
pushq %rbp
movq %rsp, %rbp
addq $0x2, %rdi
callq 0x95e0
movl %eax, %ecx
movsd 0x30b8ad(%rip), %xmm0   # 0x32c970
cvttsd2si %xmm0, %eax
testl %ecx, %ecx
popq %rbp
jg 0x210e3
jns 0x210e5
negb %cl
sarl %cl, %eax
jmp 0x210e5
movsd 0x30b894(%rip), %xmm0   # 0x32c970
cvttsd2si %xmm0, %eax
pushq $0x1
popq %rcx
shll %cl, %eax
movsd %xmm0, 0x30bc3b(%rip)   # 0x32cd28
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x30b877(%rip)   # 0x32c970
andl $0x0, 0x30bc30(%rip)    # 0x32cd30
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_size()
void rpn_size()
{
int count;

   // set stack size

   count = 6;
   if(isdigit(msg_field[4])) count = atoi(&msg_field[4]);
   if((count < 4) || (count > MAX_RPN_SIZE)) {
      sprintf(out, "Stack size must be 4..%d", MAX_RPN_SIZE);
      rpn_error(out);
      return;
   }
   RPN_SIZE = count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x304932(%rip), %rdi    # 0x325a40
movsbl 0x4(%rdi), %eax
addl $-0x30, %eax
cmpl $0x9, %eax
ja 0x21156
addq $0x4, %rdi
callq 0x95e0
movl %eax, %ecx
addl $-0x11, %ecx
cmpl $-0xe, %ecx
ja 0x21159
leaq 0x3050ec(%rip), %rbx    # 0x326220
leaq 0xd6504(%rip), %rsi     # 0xf763f
pushq $0x10
popq %rdx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1f963
pushq $0x6
popq %rax
movl %eax, 0x132ef1(%rip)    # 0x154050
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_digits(int)
void rpn_digits(int sign)
{
int count;
int digits;

   // set output format digits

   count = IABS(rpn_format);
   if(isdigit(msg_field[3])) count = atoi(&msg_field[3]);
   else if(msg_field[3] == '-') count = atoi(&msg_field[3]);
   else if(msg_field[3] == '+') count = atoi(&msg_field[3]);
   count *= sign;

   if(hex_mode == 2) {
      digits = ISIZE;
      if(IABS(count) > ISIZE) {  // binary
         sprintf(out, "Decimal place count must be 0..%d", digits);
         rpn_error(out);
         return;
      }
   }
   else if(hex_mode == 8) {  // octal
      digits = (ISIZE+2) / 3;
      if(IABS(count) > digits) {
         sprintf(out, "Decimal place count must be 0..%d", digits);
         rpn_error(out);
         return;
      }
   }
   else if(hex_mode == 16) {  // hex
      digits = (ISIZE+3) / 4;
      if(IABS(count) > digits) {
         sprintf(out, "Decimal place count must be 0..%d", digits);
         rpn_error(out);
         return;
      }
   }
   else {  // decimal
      if(IABS(count) > 16) {
         sprintf(out, "Decimal place count must be 0..16");
         rpn_error(out);
         return;
      }
   }
   rpn_format = count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
leaq 0x3048cb(%rip), %rdi    # 0x325a40
movsbl 0x3(%rdi), %eax
leal -0x30(%rax), %ecx
cmpl $0xa, %ecx
jb 0x2119b
movzbl %al, %ecx
movl 0x132ed6(%rip), %edx    # 0x154060
movl %edx, %eax
negl %eax
cmovsl %edx, %eax
cmpl $0x2d, %ecx
je 0x2119b
cmpl $0x2b, %ecx
jne 0x211a4
addq $0x3, %rdi
callq 0x95e0
imull %ebx, %eax
movl 0x30bb93(%rip), %edx    # 0x32cd40
movl %eax, %ecx
negl %ecx
cmovsl %eax, %ecx
cmpl $0x10, %edx
je 0x211f5
cmpl $0x8, %edx
je 0x211de
cmpl $0x2, %edx
jne 0x2121a
cmpl $0x41, %ecx
jb 0x2124c
leaq 0x30504d(%rip), %rbx    # 0x326220
leaq 0xd647e(%rip), %rsi     # 0xf7658
pushq $0x40
jmp 0x2120a
cmpl $0x17, %ecx
jb 0x2124c
leaq 0x305036(%rip), %rbx    # 0x326220
leaq 0xd6467(%rip), %rsi     # 0xf7658
pushq $0x16
jmp 0x2120a
cmpl $0x11, %ecx
jb 0x2124c
leaq 0x30501f(%rip), %rbx    # 0x326220
leaq 0xd6450(%rip), %rsi     # 0xf7658
pushq $0x10
popq %rdx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
jmp 0x21241
cmpl $0x11, %ecx
jb 0x2124c
movups 0xd6464(%rip), %xmm0    # 0xf768a
leaq 0x304ff3(%rip), %rdi    # 0x326220
movaps %xmm0, 0x10(%rdi)
movups 0xd6442(%rip), %xmm0    # 0xf767a
movaps %xmm0, (%rdi)
movw $0x36, 0x20(%rdi)
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1f963
movl %eax, 0x132e0e(%rip)    # 0x154060
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: find_rpn_def(char*)
int find_rpn_def(char *s)
{
int i;

   // see if user defined command has been defined

   if(s == 0) {
      return (-2);
   }

   for(i=0; i<num_rpn_defs; i++) {
      if(!strncmp(s, rpn_defs[i], strlen(s))) return i;
   }

   return (-1);
}

// Assembly:
testq %rdi, %rdi
je 0x212b2
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x30be12(%rip), %r13d   # 0x32d088
xorl %r12d, %r12d
testl %r13d, %r13d
cmovlel %r12d, %r13d
leaq 0x30bad9(%rip), %r14    # 0x32cd60
cmpq %r12, %r13
je 0x212b6
movq (%r14), %r15
movq %rbx, %rdi
callq 0x9120
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x9140
testl %eax, %eax
je 0x212bb
incq %r12
addq $0x8, %r14
jmp 0x21287
pushq $-0x2
popq %rax
retq
pushq $-0x1
popq %rax
jmp 0x212be
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_edit()
void rpn_edit()
{
int i;

   // edit a user defined command
   if(get_msg_field()) {
      i = find_rpn_def(msg_field);
      if(i >= 0) {
         if(zoom_screen) remove_zoom();
         rpn_mode = 0;
         show_version_header();
         add_kbd(0x0D);
         add_kbd('!'); // edit DEFINE
         add_kbd('`');
         strcpy(edit_buffer, rpn_defs[i]);
      }
      else {
         sprintf(out, "DEFINE %s not found!", msg_field);
         edit_error(out);
      }
   }
   else {
      edit_error("DEFINE name missing!");
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
callq 0x75767
testl %eax, %eax
je 0x21cd5
leaq 0x303dcd(%rip), %rdi    # 0x325a40
callq 0x21259
testl %eax, %eax
js 0x21cde
movl %eax, %ebx
leaq 0x2d4b23(%rip), %rax    # 0x2f67a8
cmpb $0x0, (%rax)
je 0x21c8f
callq 0x21d0b
leaq 0x303b92(%rip), %rax    # 0x325828
andl $0x0, (%rax)
callq 0x68b5b
pushq $0xd
popq %rdi
callq 0xd140
pushq $0x21
popq %rdi
callq 0xd140
pushq $0x60
popq %rdi
callq 0xd140
movl %ebx, %eax
leaq 0x30b0a1(%rip), %rcx    # 0x32cd60
movq (%rcx,%rax,8), %rsi
leaq 0x307616(%rip), %rdi    # 0x3292e0
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x9330
leaq 0xd5a77(%rip), %rdi     # 0xf7753
jmp 0x21d00
leaq 0x30453b(%rip), %rbx    # 0x326220
leaq 0xd5a7c(%rip), %rsi     # 0xf7768
leaq 0x303d4d(%rip), %rdx    # 0x325a40
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x214df
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: remove_zoom()
void remove_zoom()
{
   // exit a zoomed screen mode and re-config the screen
   change_zoom_config(-2);
   cancel_zoom(2);
   zoom_fixes = show_fixes;
   show_rpn_help = 0;
   config_screen(117);
   force_adev_redraw(106);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq $-0x2
popq %rdi
callq 0x257d9
callq 0x258aa
leaq 0x3035b1(%rip), %rax    # 0x3252d4
movzbl (%rax), %eax
leaq 0x2d4a7f(%rip), %rcx    # 0x2f67ac
movl %eax, (%rcx)
leaq 0x303af6(%rip), %rax    # 0x32582c
andl $0x0, (%rax)
pushq $0x75
popq %rdi
callq 0xcc4f
pushq $0x6a
popq %rdi
popq %rbp
jmp 0xc7144
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_nest()
int rpn_nest()
{
   // save where we are in the current line

   if(rpn_exec_level < RPN_EXEC_DEPTH) {
      rpn_exec_stack[rpn_exec_level].col = msg_col;
      rpn_exec_stack[rpn_exec_level].skip = skip_next_rpn;
      strcpy(rpn_exec_stack[rpn_exec_level].msg, nmea_msg);
      skip_next_rpn = 0;
      ++rpn_exec_level;
      return 0;
   }

   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movslq 0x30c9bd(%rip), %rbx    # 0x32e714
cmpq $0x9, %rbx
jg 0x21dac
leaq 0x303ee0(%rip), %rax    # 0x325c44
movl (%rax), %eax
imulq $0x20c, %rbx, %rcx      # imm = 0x20C
leaq 0x30b31c(%rip), %rdx    # 0x32d090
leaq (%rdx,%rcx), %rdi
movl %eax, 0x204(%rcx,%rdx)
movl 0x30afc7(%rip), %eax    # 0x32cd4c
movl %eax, 0x208(%rcx,%rdx)
leaq 0x303a9d(%rip), %rsi    # 0x325830
callq 0x9330
andl $0x0, 0x30afad(%rip)    # 0x32cd4c
leal 0x1(%rbx), %eax
movl %eax, 0x30c96c(%rip)    # 0x32e714
xorl %eax, %eax
jmp 0x21daf
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_unnest()
int rpn_unnest()
{
   // exit a user defined command string back to the previous nesting level

   if(rpn_exec_level) {
      --rpn_exec_level;
      msg_col = rpn_exec_stack[rpn_exec_level].col;
      skip_next_rpn = rpn_exec_stack[rpn_exec_level].skip;
      strcpy(nmea_msg, rpn_exec_stack[rpn_exec_level].msg);
      return 1;
   }

   return 0;
}

// Assembly:
movslq 0x30c957(%rip), %rax    # 0x32e714
testq %rax, %rax
je 0x21e0f
pushq %rbp
movq %rsp, %rbp
decq %rax
movl %eax, 0x30c945(%rip)    # 0x32e714
imulq $0x20c, %rax, %rax      # imm = 0x20C
leaq 0x30b2b3(%rip), %rcx    # 0x32d090
leaq (%rcx,%rax), %rsi
movl 0x204(%rax,%rcx), %edx
leaq 0x303e55(%rip), %rdi    # 0x325c44
movl %edx, (%rdi)
movl 0x208(%rax,%rcx), %eax
movl %eax, 0x30af4e(%rip)    # 0x32cd4c
leaq 0x303a2b(%rip), %rdi    # 0x325830
callq 0x9330
pushq $0x1
popq %rax
popq %rbp
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_save(int)
void rpn_save(int save_mem)
{
FILE *file;
int i;

   // save the current DEFINEs (and optionally memory) to a file

   get_msg_field();
   if(msg_field[0]) {
      file = topen(msg_field, "w");
      if(file) {
         for(i=0; i<num_rpn_defs; i++) {
            if(rpn_defs[i]) fprintf(file, "define %s\n", rpn_defs[i]);
         }

         if(save_mem) {  // also save the rpn memory and stack
            for(i=0; i<RPN_MEM; i++) { // save memory regs
               fprintf(file, "%.16g sto%d\n", rpn_mem[i], i);
            }
            for(i=RPN_SIZE-1; i>=0; i--) {  // save stack values
               fprintf(file, "%.16g\n", rpn[i]);
            }
         }
         fclose(file);
      }
      else {
         sprintf(out, "Could not write DEFINEs file: %s", msg_field);
         edit_error(out);
      }
   }
   else {
      edit_error("No file name given.");
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %r14d
callq 0x75767
leaq 0x303c11(%rip), %rax    # 0x325a40
cmpb $0x0, (%rax)
je 0x21ed6
leaq 0x303c01(%rip), %rdi    # 0x325a40
leaq 0xe94bd(%rip), %rsi     # 0x10b303
callq 0x9a22
testq %rax, %rax
je 0x21f28
movq %rax, %rbx
leaq 0x30af02(%rip), %r12    # 0x32cd60
movl 0x30b224(%rip), %eax    # 0x32d088
leaq 0xd5912(%rip), %r15     # 0xf777d
xorl %r13d, %r13d
movslq %eax, %rcx
cmpq %rcx, %r13
jge 0x21e9b
movq (%r12), %rdx
testq %rdx, %rdx
je 0x21e92
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x9560
movl 0x30b1f6(%rip), %eax    # 0x32d088
incq %r13
addq $0x8, %r12
jmp 0x21e6e
testl %r14d, %r14d
je 0x21f12
leaq 0x30ab59(%rip), %r12    # 0x32ca00
xorl %r14d, %r14d
leaq 0xd58d7(%rip), %r15     # 0xf7788
cmpq $0x64, %r14
je 0x21edf
movsd (%r12), %xmm0
movq %rbx, %rdi
movq %r15, %rsi
movl %r14d, %edx
movb $0x1, %al
callq 0x9560
incq %r14
addq $0x8, %r12
jmp 0x21eb1
leaq 0xd58e0(%rip), %rdi     # 0xf77bd
jmp 0x21f4a
movl 0x13216a(%rip), %r15d   # 0x154050
leaq 0x30aa83(%rip), %r12    # 0x32c970
leaq 0xd58a1(%rip), %r14     # 0xf7795
testl %r15d, %r15d
jle 0x21f12
movsd -0x8(%r12,%r15,8), %xmm0
decq %r15
movq %rbx, %rdi
movq %r14, %rsi
movb $0x1, %al
callq 0x9560
jmp 0x21ef4
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9360
leaq 0x3042f1(%rip), %rbx    # 0x326220
leaq 0xd5866(%rip), %rsi     # 0xf779c
leaq 0x303b03(%rip), %rdx    # 0x325a40
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x214df
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_run()
void rpn_run()
{
int i;

   // read and execute the commands in a RPN file

   get_msg_field();
   if(msg_field[0]) {
      i = read_rpn_file(msg_field, 0);
      if(i == (-1)) {
         sprintf(out, "Could not read RPN file: %s", msg_field);
         edit_error(out);
      }
      else if(i) {
         edit_error("Error in RPN file.");
      }
   }
   else {
      edit_error("No file name given.");
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
callq 0x75767
leaq 0x303ad1(%rip), %rax    # 0x325a40
cmpb $0x0, (%rax)
je 0x21fac
leaq 0x303ac5(%rip), %rdi    # 0x325a40
xorl %esi, %esi
callq 0x21774
testl %eax, %eax
je 0x21fb5
cmpl $-0x1, %eax
jne 0x21fbc
leaq 0x30428e(%rip), %rbx    # 0x326220
leaq 0xd5838(%rip), %rsi     # 0xf77d1
leaq 0x303aa0(%rip), %rdx    # 0x325a40
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
jmp 0x21fc3
leaq 0xd580a(%rip), %rbx     # 0xf77bd
jmp 0x21fc3
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0xd582a(%rip), %rbx     # 0xf77ed
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x214df
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: rpn_space(char*, unsigned int, char*)
void rpn_space(char *s, unsigned max_len, char *fmt)
{
unsigned j;
int i;

   // space over the formatted stack value so columns align

   if(s == 0) return;
   if(fmt == 0) return;

   j = strlen(fmt);
   i = 0;
   s[i] = 0;
   while(j < max_len) {
      s[i++] = ' ';
      s[i] = 0;
      ++j;
      if(i > 60) break;
   }
   strcat(s, fmt);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
sete %al
testq %rdx, %rdx
sete %cl
orb %al, %cl
je 0x22582
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %rbx
movl %esi, %r15d
movq %rdi, %r14
movq %rdx, %rdi
callq 0x9120
movb $0x0, (%r14)
xorl %ecx, %ecx
leal (%rax,%rcx), %edx
cmpl %r15d, %edx
jae 0x225b1
movw $0x20, (%r14,%rcx)
incq %rcx
cmpq $0x3d, %rcx
jne 0x22599
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x96c0
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: valid_hex(char*)
int valid_hex(char *s)
{
unsigned j;
char c;

   // returns true if s is a valid hex number

   if(s == 0) return 0;
   if(strlen(s) < 1) return 0;

   for(j=0; j<strlen(s); j++) {
      c = s[j];
      if((c >= '0') && (c <= '9')) continue;
      else if((c >= 'a') && (c <= 'f')) continue;
      return 0;
   }
   return 1;
}

// Assembly:
xorl %eax, %eax
testq %rdi, %rdi
je 0x229ed
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x0, (%rdi)
je 0x229e7
movq %rbx, %rdi
callq 0x9120
movq %rax, %rcx
xorl %edx, %edx
pushq $0x1
popq %rax
movl %edx, %edx
cmpq %rdx, %rcx
jbe 0x229e7
movb (%rbx,%rdx), %sil
leal -0x30(%rsi), %edi
cmpb $0xa, %dil
setb %dil
addb $-0x61, %sil
cmpb $0x6, %sil
setb %sil
orb %dil, %sil
incl %edx
testb %sil, %sil
jne 0x229b9
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: valid_octal(char*)
int valid_octal(char *s)
{
unsigned j;
char c;

   // returns true if s is a valid octal number

   if(s == 0) return 0;
   if(strlen(s) < 1) return 0;

   for(j=0; j<strlen(s); j++) {
      c = s[j];
      if((c >= '0') && (c <= '7')) continue;
      return 0;
   }
   return 1;
}

// Assembly:
xorl %eax, %eax
testq %rdi, %rdi
je 0x22a32
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x0, (%rdi)
je 0x22a2c
movq %rbx, %rdi
callq 0x9120
movq %rax, %rcx
xorl %edx, %edx
pushq $0x1
popq %rax
movl %edx, %edx
cmpq %rdx, %rcx
jbe 0x22a2c
movb (%rbx,%rdx), %sil
andb $-0x8, %sil
incl %edx
cmpb $0x30, %sil
je 0x22a13
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: valid_binary(char*)
int valid_binary(char *s)
{
unsigned j;
char c;

   // returns true if s is a valid binary number

   if(s == 0) return 0;
   if(strlen(s) < 1) return 0;

   for(j=0; j<strlen(s); j++) {
      c = s[j];
      if((c == '0') || (c == '1')) continue;
      return 0;
   }
   return 1;
}

// Assembly:
xorl %eax, %eax
testq %rdi, %rdi
je 0x22a77
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpb $0x0, (%rdi)
je 0x22a71
movq %rbx, %rdi
callq 0x9120
movq %rax, %rcx
xorl %edx, %edx
pushq $0x1
popq %rax
movl %edx, %edx
cmpq %rdx, %rcx
jbe 0x22a71
movb (%rbx,%rdx), %sil
andb $-0x2, %sil
incl %edx
cmpb $0x30, %sil
je 0x22a58
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: valid_num(char*)
int valid_num(char *s)
{
unsigned j;
char c;
int saw_sign;
int saw_exp;
int saw_e;
int saw_dp;
int saw_digit;

   // returns true if s is a valid decimal number

   if(s == 0) return 0;
   saw_sign = 0;
   saw_dp = 0;
   saw_exp = 0;
   saw_e = 0;
   saw_digit = 0;

   for(j=0; j<strlen(s); j++) {
      c = s[j];
      if(c == '.') {
         if(saw_dp) return 0;
         if(saw_e) return 0;
         saw_dp = 1;
      }
      else if(c == 'e') {
         if(saw_e) return 0;
         saw_e = 1;
         saw_sign = 0;
         saw_digit = 0;
      }
      else if((c == '+') || (c == '-')) {
         if(saw_sign) return 0;
         if(saw_exp) return 0;
         if(saw_digit) return 0;
         saw_sign = 1;
      }
      else if((c >= '0') && (c <= '9')) {
         if(saw_e) saw_exp = c;
         saw_digit = 1;
         continue;
      }
      else return 0;
   }

   if(saw_e && (saw_exp == 0)) return 0;
   return 1;
}

// Assembly:
testq %rdi, %rdi
je 0x22b2c
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x9120
xorl %edx, %edx
pushq $0x1
popq %rsi
xorl %r10d, %r10d
xorl %edi, %edi
xorl %r8d, %r8d
xorl %r9d, %r9d
xorl %r11d, %r11d
movl %edx, %edx
cmpq %rdx, %rax
jbe 0x22b30
movzbl (%rbx,%rdx), %ecx
cmpl $0x2b, %ecx
je 0x22ad7
cmpl $0x2d, %ecx
je 0x22ad7
cmpl $0x65, %ecx
je 0x22af7
cmpl $0x2e, %ecx
jne 0x22b0f
xorl %ecx, %ecx
orl %r8d, %r9d
movl $0x0, %r8d
movl %esi, %r9d
je 0x22b25
jmp 0x22b40
xorl %ecx, %ecx
testl %r10d, %r10d
jne 0x22b40
testl %edi, %edi
jne 0x22b40
movl %esi, %r10d
movl $0x0, %edi
testl %r11d, %r11d
movl $0x0, %r11d
je 0x22b25
jmp 0x22b40
xorl %r10d, %r10d
movl $0x0, %r11d
movl $0x0, %ecx
testl %r8d, %r8d
movl %esi, %r8d
je 0x22b25
jmp 0x22b40
leal -0x30(%rcx), %r11d
cmpb $0x9, %r11b
ja 0x22b49
movsbl %cl, %ecx
testl %r8d, %r8d
cmovnel %ecx, %edi
movl %esi, %r11d
incl %edx
jmp 0x22aa2
xorl %ecx, %ecx
jmp 0x22b46
testl %r8d, %r8d
sete %al
testl %edi, %edi
setne %cl
orb %al, %cl
movzbl %cl, %ecx
addq $0x8, %rsp
popq %rbx
popq %rbp
movl %ecx, %eax
retq
xorl %ecx, %ecx
jmp 0x22b40
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: get_rpn_num()
double get_rpn_num()
{
double val;
unsigned i, j;
int c;

   // decode ascii value (can be integer hex or binary string) and
   // push value onto stack

   if((msg_field[0] == '0') && (msg_field[1] == 'x')) {  // hex integer
      strupr(msg_field);
      i = strlen(msg_field);
      val = 0.0;
      for(j=2; j<i; j++) {
         c = msg_field[j];
         if((c >= '0') && (c <= '9')) c = (c - '0');
         else if((c >= 'A') && (c <= 'F')) c = (c - 'A' + 10);
         val = (val * 16.0) + (double) c;
      }
   }
   else if((msg_field[0] == '0') && (msg_field[1] == 'o')) {  // octal integer
      i = strlen(msg_field);
      val = 0.0;
      for(j=2; j<i; j++) {
         c = msg_field[j] - '0';
         val = (val * 8.0) + (double) c;
      }
   }
   else if((msg_field[0] == '0') && (msg_field[1] == 'b')) {  // binary integer
      i = strlen(msg_field);
      val = 0.0;
      for(j=2; j<i; j++) {
         c = msg_field[j] - '0';
         val = (val * 2.0) + (double) c;
      }
   }
   else val = atof(msg_field);

   last_rpn0 = rpn[0];
   rpn_push(val);
   last_was_clx = 0;
   return rpn[0];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x302ee6(%rip), %rbx    # 0x325a40
movb (%rbx), %al
movb 0x1(%rbx), %cl
xorb $0x30, %al
movl %ecx, %edx
xorb $0x78, %dl
orb %al, %dl
jne 0x22bc6
movq %rbx, %rdi
callq 0x988f
movq %rbx, %rdi
callq 0x9120
movl %eax, %eax
xorpd %xmm0, %xmm0
pushq $0x2
popq %rcx
movsd 0xd2d3d(%rip), %xmm1    # 0xf58c8
cmpq %rax, %rcx
jae 0x22c46
movsbl (%rbx,%rcx), %edx
leal -0x30(%rdx), %esi
cmpb $0x9, %sil
ja 0x22ba6
addl $-0x30, %edx
jmp 0x22bb5
leal -0x41(%rdx), %esi
leal -0x37(%rdx), %edi
cmpb $0x6, %sil
cmovael %edx, %edi
movl %edi, %edx
cvtsi2sd %edx, %xmm2
mulsd %xmm1, %xmm0
addsd %xmm2, %xmm0
incq %rcx
jmp 0x22b8b
movl %ecx, %edx
xorb $0x6f, %dl
orb %al, %dl
jne 0x22c05
movq %rbx, %rdi
callq 0x9120
movl %eax, %eax
xorpd %xmm0, %xmm0
pushq $0x2
popq %rcx
movsd 0xd2cd8(%rip), %xmm1    # 0xf58c0
cmpq %rax, %rcx
jae 0x22c46
movsbl (%rbx,%rcx), %edx
addl $-0x30, %edx
cvtsi2sd %edx, %xmm2
mulsd %xmm1, %xmm0
addsd %xmm2, %xmm0
incq %rcx
jmp 0x22be8
xorb $0x62, %cl
orb %cl, %al
jne 0x22c3a
movq %rbx, %rdi
callq 0x9120
movl %eax, %eax
xorpd %xmm0, %xmm0
pushq $0x2
popq %rcx
cmpq %rax, %rcx
jae 0x22c46
movsbl (%rbx,%rcx), %edx
addl $-0x30, %edx
cvtsi2sd %edx, %xmm1
addsd %xmm0, %xmm0
addsd %xmm1, %xmm0
incq %rcx
jmp 0x22c1d
leaq 0x302dff(%rip), %rdi    # 0x325a40
callq 0x9470
movsd 0x309d22(%rip), %xmm1   # 0x32c970
movsd %xmm1, 0x30a0e2(%rip)   # 0x32cd38
callq 0x1fcb6
andl $0x0, 0x30a0ce(%rip)    # 0x32cd30
movsd 0x309d06(%rip), %xmm0   # 0x32c970
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: force_rcvr_baud(int)
void force_rcvr_baud(int baud)
{
int i;

   // attempt to force the receiver baud rate regardless of its current setting
   // !!!! this code currently only configures for 8,N,1 serial port params

   i = 0;
   while(baud_list[i]) {
      sprintf(out, "%d,8,N,1", baud_list[i]);  // set com port rate
      set_serial_params(RCVR_PORT, out, 1);

      sprintf(out, "%d,8,N,1", baud);          // attempt to change receiver baud rate
      set_serial_params(RCVR_PORT, out, 2);    // this will only be accepted if current receiver baud rate is correct
      ++i;
   }

   // at this point the receiver should be configured for the desired baud rate
   sprintf(out, "%d,8,N,1", baud);  // set com port rate
   set_serial_params(RCVR_PORT, out, 1);

   sprintf(out, "%d,8,N,1", baud); // attempt to change baud rate
   set_serial_params(RCVR_PORT, out, 2);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edi, %ebx
leaq 0x12f4e1(%rip), %r13    # 0x154070
leaq 0x30168a(%rip), %r14    # 0x326220
leaq 0xd2fcb(%rip), %r15     # 0xf7b68
pushq $0xa
popq %r12
movl (%r13), %edx
testl %edx, %edx
je 0x24be7
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x9060
movl %r12d, %edi
movq %r14, %rsi
pushq $0x1
popq %rdx
callq 0x246b8
movq %r14, %rdi
movq %r15, %rsi
movl %ebx, %edx
xorl %eax, %eax
callq 0x9060
movl %r12d, %edi
movq %r14, %rsi
pushq $0x2
popq %rdx
callq 0x246b8
addq $0x4, %r13
jmp 0x24ba1
leaq 0x301632(%rip), %r14    # 0x326220
leaq 0xd2f73(%rip), %r15     # 0xf7b68
movq %r14, %rdi
movq %r15, %rsi
movl %ebx, %edx
xorl %eax, %eax
callq 0x9060
pushq $0xa
popq %r12
pushq $0x1
popq %rdx
movl %r12d, %edi
movq %r14, %rsi
callq 0x246b8
movq %r14, %rdi
movq %r15, %rsi
movl %ebx, %edx
xorl %eax, %eax
callq 0x9060
pushq $0x2
popq %rdx
movl %r12d, %edi
movq %r14, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x246b8
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: change_zoom_config(int)
void change_zoom_config(int save)
{
static int old_watch = 0;
static int old_azel = 0;
static int old_share = 0;
static int old_sigs = 0;
static int old_lla = 0;
static int saved_config = 0;
static int save_count = 0;
static int restore_count = 0;

// return;
if(zoom_screen == 'K') return;

   if(save > 0) {
      ++save_count;
//sprintf(debug_text, "plot watch config save# %d: why:%d  pw:%d", save_count, save, plot_watch);
      old_watch = plot_watch;
      old_azel = plot_azel;
      old_share = shared_plot;
      old_sigs = plot_signals;
      old_lla = plot_lla;
      saved_config = save;
   }
   else if(saved_config) {
      ++restore_count;
//sprintf(debug_text2, "plot watch config restore# %d: why:%d  saved:%d %d: pw:%d  ow:%d", restore_count, save, saved_config, plot_watch, old_watch);
      plot_watch = old_watch;
      plot_azel = old_azel;
      shared_plot = old_share;
      plot_signals = old_sigs;
      if(1 && (show_fixes == 0)) {
         plot_lla = 0; // !!!!! old_lla;
      }
else if(show_fixes) plot_lla = 1;
      else plot_lla = old_lla;
//saved_config = 0;  // (555)
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x2d0fc4(%rip), %rax    # 0x2f67a8
cmpb $0x4b, (%rax)
je 0x25839
testl %edi, %edi
jle 0x2583b
incl 0x308f5d(%rip)          # 0x32e750
leaq 0x1dfc0e(%rip), %rax    # 0x205408
movzbl (%rax), %eax
movl %eax, 0x308f39(%rip)    # 0x32e73c
leaq 0x1dfc09(%rip), %rax    # 0x205413
movzbl (%rax), %eax
movl %eax, 0x308f2d(%rip)    # 0x32e740
leaq 0x2ffbce(%rip), %rax    # 0x3253e8
movzbl (%rax), %eax
movl %eax, 0x308f21(%rip)    # 0x32e744
leaq 0x1dfbeb(%rip), %rax    # 0x205415
movzbl (%rax), %eax
movl %eax, 0x308f15(%rip)    # 0x32e748
movl %edi, 0x308f13(%rip)    # 0x32e74c
popq %rbp
retq
cmpl $0x0, 0x308f0a(%rip)    # 0x32e74c
je 0x25839
incl 0x308f0a(%rip)          # 0x32e754
movb 0x308eec(%rip), %al     # 0x32e73c
leaq 0x1dfbb1(%rip), %rcx    # 0x205408
movb %al, (%rcx)
movb 0x308ee1(%rip), %al     # 0x32e740
leaq 0x1dfbad(%rip), %rcx    # 0x205413
movb %al, (%rcx)
movb 0x308ed6(%rip), %al     # 0x32e744
leaq 0x2ffb73(%rip), %rcx    # 0x3253e8
movb %al, (%rcx)
movb 0x308ecb(%rip), %al     # 0x32e748
leaq 0x1dfb91(%rip), %rcx    # 0x205415
movb %al, (%rcx)
leaq 0x2ffa47(%rip), %rax    # 0x3252d4
cmpb $0x0, (%rax)
je 0x2589e
leaq 0x2ffa17(%rip), %rax    # 0x3252b0
movb $0x1, (%rax)
jmp 0x25839
leaq 0x2ffa0b(%rip), %rax    # 0x3252b0
movb $0x0, (%rax)
jmp 0x25839
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: sure_exit()
int sure_exit()
{
   // normal keystroke processor exit
   if(rcvr_type == NO_RCVR) need_redraw = 1;  // erase any menu that was showing
   if(first_key) {    // we were processing a two-character command
      reset_first_key(23);  // command sequence is done
first_key = 0;
      prot_menu = 0;
      draw_plot(REFRESH_SCREEN);   // replace command sub-menu with the normal plot
   }
   return 0;
}

// Assembly:
leaq 0x1dcffc(%rip), %rax    # 0x2028d0
cmpq $0x400, (%rax)          # imm = 0x400
jne 0x258ea
leaq 0x1dcf60(%rip), %rax    # 0x202844
movl $0x1, (%rax)
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x203661(%rip), %rbx    # 0x228f58
cmpl $0x0, (%rbx)
je 0x25916
callq 0x2591f
andl $0x0, (%rbx)
leaq 0x1df84d(%rip), %rax    # 0x205158
movb $0x0, (%rax)
pushq $0x1
popq %rdi
callq 0x18cb0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: reset_first_key(int)
void reset_first_key(int why)
{
   if(first_key && (zoom_screen == 'K')) {
      cancel_zoom(11);
//(555)   change_zoom_config(-101);
      need_redraw = 5599;
   }

   first_key = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x20362c(%rip), %rbx    # 0x228f58
cmpl $0x0, (%rbx)
je 0x2594f
leaq 0x2d0e70(%rip), %rax    # 0x2f67a8
cmpb $0x4b, (%rax)
jne 0x2594f
callq 0x258aa
leaq 0x1dcefb(%rip), %rax    # 0x202844
movl $0x15df, (%rax)         # imm = 0x15DF
andl $0x0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq