LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: tick_radial(int, int, int, int, int)
void tick_radial(int grid_x,int grid_y, int grid_r, int max_el, int az)
{
int x0,y0;
int x1,y1;
int x2,y2;
int el;
double len;
double r;

   x0 = grid_x;
   y0 = grid_y;
   r = (double) grid_r;
   if(plot_signals == 3) {
      x0 -= grid_r;
      y0 += grid_r;
      r *= 2.0F;
   }

   for(el=0; el<max_el; el+=5) {
      len = (r * ((double)(max_el-el)/(double) max_el));
      x1 = (int) (len * cos360(az-2));
      y1 = (int) (len * sin360(az-2));

      x2 = (int) (len * cos360(az+2));
      y2 = (int) (len * sin360(az+2));

      line(x0+x1,y0+y1, x0+x2,y0+y2, azel_grid_color);
   }
}

// Assembly:
cvtsi2sd %edx, %xmm0
leaq 0x126f11(%rip), %r9     # 0x21b415
xorl %eax, %eax
cmpb $0x3, (%r9)
cmovel %edx, %eax
jne 0xf4513
addsd %xmm0, %xmm0
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edi, -0x2c(%rbp)
movl %esi, -0x30(%rbp)
testl %ecx, %ecx
jle 0xf468d
addl %eax, -0x30(%rbp)
cvtsi2sd %ecx, %xmm1
movsd %xmm1, -0x58(%rbp)
subl %eax, -0x2c(%rbp)
leal -0x2(%r8), %eax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
movsd %xmm1, -0x50(%rbp)
addl $0x2, %r8d
xorps %xmm1, %xmm1
cvtsi2sd %r8d, %xmm1
movsd %xmm1, -0x48(%rbp)
xorl %r14d, %r14d
movl %ecx, %r15d
movl %ecx, -0x3c(%rbp)
movsd %xmm0, -0x60(%rbp)
xorps %xmm1, %xmm1
cvtsi2sd %r15d, %xmm1
divsd -0x58(%rbp), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, -0x38(%rbp)
movsd -0x50(%rbp), %xmm0
movsd 0x29ba5(%rip), %xmm1    # 0x11e138
callq 0x94d0
movsd 0x14bc0(%rip), %xmm1    # 0x109160
divsd %xmm1, %xmm0
callq 0x9710
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
mulsd -0x38(%rbp), %xmm0
cvttsd2si %xmm0, %r12d
movsd -0x50(%rbp), %xmm0
movsd 0x29b70(%rip), %xmm1    # 0x11e138
callq 0x94d0
divsd 0x14b8b(%rip), %xmm0    # 0x109160
callq 0x9080
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
mulsd -0x38(%rbp), %xmm0
cvttsd2si %xmm0, %r13d
movsd -0x48(%rbp), %xmm0
movsd 0x29b3f(%rip), %xmm1    # 0x11e138
callq 0x94d0
divsd 0x14b5a(%rip), %xmm0    # 0x109160
callq 0x9710
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
mulsd -0x38(%rbp), %xmm0
cvttsd2si %xmm0, %ebx
movsd -0x48(%rbp), %xmm0
movsd 0x29b0f(%rip), %xmm1    # 0x11e138
callq 0x94d0
divsd 0x14b2a(%rip), %xmm0    # 0x109160
callq 0x9080
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
mulsd -0x38(%rbp), %xmm0
cvttsd2si %xmm0, %ecx
movl -0x2c(%rbp), %edx
addl %edx, %r12d
movl -0x30(%rbp), %eax
addl %eax, %r13d
addl %edx, %ebx
addl %eax, %ecx
leaq 0x246d45(%rip), %rax    # 0x33b3a8
movzbl (%rax), %r8d
movl %r12d, %edi
movl %r13d, %esi
movl %ebx, %edx
callq 0xe38a
movsd -0x60(%rbp), %xmm0
movl -0x3c(%rbp), %ecx
addl $0x5, %r14d
addl $-0x5, %r15d
cmpl %ecx, %r14d
jl 0xf4570
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: clear_sat_trails()
void clear_sat_trails()
{
int i;
int prn;

   for(prn=0; prn<=MOON_PRN; prn++) {
      for(i=0; i<TRAIL_POINTS; i++) {  // clear the sat's position list
         sat_trail[prn].az[i] = 0.0F;
         sat_trail[prn].el[i] = 0.0F;
         sat_trail[prn].mins[i] = 0;
      }
   }
   trail_count = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x287017(%rip), %rax    # 0x37bab8
xorl %ecx, %ecx
xorl %edx, %edx
movq $-0x48, %rsi
movl %ecx, -0x128(%rax,%rsi,4)
movl %ecx, -0x4(%rax,%rsi,4)
movl %ecx, 0x120(%rax,%rsi,4)
incq %rsi
jne 0xf4aac
incq %rdx
addq $0x36c, %rax            # imm = 0x36C
cmpq $0x3ea, %rdx            # imm = 0x3EA
jne 0xf4aa5
movl $0x0, 0x286d81(%rip)    # 0x37b860
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: dbc_to_amu(float)
float dbc_to_amu(float sig_level)
{
int i;

   if(sig_level <= 0.0F)  return 0.0F;
   if(sig_level >= 51.0F) return 25.1F + ((sig_level - 51.0F) * 3.0F);

   for(i=0; i<256; i++) {
      if(amu_2_dbc[i] > sig_level) return ((float) i) / 10.0F;
   }
   return 0.0F;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movaps %xmm0, %xmm1
xorps %xmm0, %xmm0
ucomiss %xmm1, %xmm0
jae 0xf7a3c
ucomiss 0x34e0d(%rip), %xmm1    # 0x12c7f8
jae 0xf7a10
leaq 0x78e4c(%rip), %rcx     # 0x170840
xorl %eax, %eax
movss (%rcx), %xmm2
ucomiss %xmm1, %xmm2
ja 0xf7a2d
incq %rax
addq $0x4, %rcx
cmpq $0x100, %rax            # imm = 0x100
jne 0xf79f6
jmp 0xf7a3c
addss 0x34de4(%rip), %xmm1    # 0x12c7fc
mulss 0x1563c(%rip), %xmm1    # 0x10d05c
addss 0x34dc8(%rip), %xmm1    # 0x12c7f0
movaps %xmm1, %xmm0
jmp 0xf7a3c
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
divss 0x15614(%rip), %xmm0    # 0x10d050
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: small_screen_watch()
void small_screen_watch()
{
int medium_touch;  // for 1024x600 touch screen

if(plot_lla && lla_showing) return;

   medium_touch = ((SCREEN_WIDTH > MEDIUM_WIDTH) && (SCREEN_WIDTH <= (MEDIUM_WIDTH+X11_MARGIN)) && (SCREEN_HEIGHT <= SHORT_SCREEN) && (all_adevs == SINGLE_ADEVS));

   if(medium_touch || (SMALL_SCREEN && (SCREEN_WIDTH > NARROW_SCREEN) && (all_adevs == SINGLE_ADEVS))) {
      if(rcvr_type == NO_RCVR) {
         aclock_y = WATCH_ROW + ACLOCK_R + TEXT_WIDTH;
         aclock_x = WATCH_COL + TEXT_WIDTH;
      }
      else {
         ACLOCK_SIZE = WATCH_SIZE;
         aclock_y = WATCH_ROW + ACLOCK_R + TEXT_WIDTH;
         aclock_x = WATCH_COL + ACLOCK_R + TEXT_WIDTH;
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x243867(%rip), %rax    # 0x33b2b0
cmpb $0x0, (%rax)
je 0xf7a5e
leaq 0x24386b(%rip), %rax    # 0x33b2c0
cmpl $0x0, (%rax)
jne 0xf7b68
leaq 0x120d9b(%rip), %rax    # 0x218800
movl (%rax), %eax
leal -0x3e3(%rax), %ecx
cmpl $0x6, %ecx
setb %dl
leaq 0x120d8a(%rip), %rcx    # 0x218804
movl (%rcx), %ecx
cmpl $0x259, %ecx            # imm = 0x259
setl %sil
andb %dl, %sil
leaq 0x1452ae(%rip), %rdx    # 0x23cd3e
movb (%rdx), %dl
testb %dl, %dl
sete %dil
testb %dil, %sil
jne 0xf7ae1
testb %dl, %dl
sete %dl
leaq 0x12ba9b(%rip), %rsi    # 0x223544
imull $0x31a, (%rsi), %esi    # imm = 0x31A
movslq %esi, %rsi
imulq $0x51eb851f, %rsi, %rsi # imm = 0x51EB851F
movq %rsi, %rdi
shrq $0x3f, %rdi
sarq $0x25, %rsi
addl %edi, %esi
cmpl $0x258, %ecx            # imm = 0x258
setl %cl
cmpl %esi, %eax
setg %al
andb %dl, %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0xf7b68
leaq 0x120de8(%rip), %rax    # 0x2188d0
cmpq $0x400, (%rax)          # imm = 0x400
jne 0xf7b27
leaq 0x24386c(%rip), %rax    # 0x33b364
leaq 0x243871(%rip), %rcx    # 0x33b370
movl (%rcx), %ecx
movl %ecx, %edx
shrl $0x1f, %edx
addl %ecx, %edx
sarl %edx
addl (%rax), %edx
leaq 0x243865(%rip), %rax    # 0x33b378
movl %edx, (%rax)
leaq 0x24384c(%rip), %rax    # 0x33b368
movl (%rax), %eax
leaq 0x120ceb(%rip), %rcx    # 0x218810
jmp 0xf7b5d
leaq 0x24383e(%rip), %rax    # 0x33b36c
movl (%rax), %ecx
leaq 0x243839(%rip), %rax    # 0x33b370
movl %ecx, (%rax)
leaq 0x243824(%rip), %rdx    # 0x33b364
movl %ecx, %eax
shrl $0x1f, %eax
addl %ecx, %eax
sarl %eax
movl (%rdx), %ecx
addl %eax, %ecx
leaq 0x243824(%rip), %rdx    # 0x33b378
movl %ecx, (%rdx)
leaq 0x24380b(%rip), %rcx    # 0x33b368
addl (%rcx), %eax
leaq 0x24380e(%rip), %rcx    # 0x33b374
movl %eax, (%rcx)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: zoom_all_signals()
void zoom_all_signals()
{
int old_sigs;
int old_row, old_col;
int old_size;
int w;

   old_sigs = plot_signals;
   old_row = AZEL_ROW;
   old_col = AZEL_COL;
   old_size = AZEL_SIZE;

   if((SCREEN_WIDTH < TINY_TINY_WIDTH) || (SCREEN_WIDTH < SCREEN_HEIGHT)) {
      w = SCREEN_WIDTH;
   }
   else {
      w = SCREEN_HEIGHT;
   }
   AZEL_SIZE = ((w / 2) * 8) / 10;

   plot_signals = 1;
   AZEL_COL = 0 + TEXT_WIDTH*8;
   AZEL_ROW = TEXT_HEIGHT*2;
   erase_azel(2);
   draw_signal_map(3);

   plot_signals = 2;
   AZEL_COL = SCREEN_WIDTH/2;
   erase_azel(3);
   draw_signal_map(4);

   plot_signals = 3;
   AZEL_COL = 0 + TEXT_WIDTH*8;
   AZEL_ROW = (SCREEN_HEIGHT/2) + (TEXT_HEIGHT/2);
   erase_azel(4);
   draw_signal_map(5);

   plot_signals = 4;
   AZEL_COL = SCREEN_WIDTH/2;
   erase_azel(5);
   draw_signal_map(6);

   AZEL_COL = old_col;
   AZEL_ROW = old_row;
   AZEL_SIZE = old_size;
   plot_signals = old_sigs;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
leaq 0x123039(%rip), %rbx    # 0x21b415
movb (%rbx), %al
movb %al, -0x29(%rbp)
leaq 0x242fa8(%rip), %r15    # 0x33b390
movl (%r15), %eax
movl %eax, -0x38(%rbp)
leaq 0x242f9f(%rip), %r13    # 0x33b394
movl (%r13), %eax
movl %eax, -0x34(%rbp)
leaq 0x242f89(%rip), %rax    # 0x33b38c
movl (%rax), %ecx
movl %ecx, -0x30(%rbp)
movq %rax, %rdx
leaq 0x1203ee(%rip), %rax    # 0x218800
movl (%rax), %eax
leaq 0x1203e9(%rip), %rcx    # 0x218804
movl (%rcx), %ecx
cmpl %ecx, %eax
cmovll %eax, %ecx
cmpl $0x1c2, %eax            # imm = 0x1C2
cmovll %eax, %ecx
movl %ecx, %eax
shrl $0x1f, %eax
addl %ecx, %eax
shll $0x2, %eax
andl $-0x8, %eax
cltq
imulq $0x66666667, %rax, %rax # imm = 0x66666667
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x22, %rax
addl %ecx, %eax
movl %eax, (%rdx)
movb $0x1, (%rbx)
leaq 0x1203b7(%rip), %r14    # 0x218810
movl (%r14), %eax
shll $0x3, %eax
movl %eax, (%r13)
leaq 0x1203aa(%rip), %r12    # 0x218814
movl (%r12), %eax
addl %eax, %eax
movl %eax, (%r15)
movl $0x2, %edi
callq 0xed9e
callq 0xf8e75
movb $0x2, (%rbx)
leaq 0x120374(%rip), %rax    # 0x218800
movl (%rax), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
movl %ecx, (%r13)
movl $0x3, %edi
callq 0xed9e
callq 0xf8e75
movb $0x3, (%rbx)
movl (%r14), %eax
shll $0x3, %eax
movl %eax, (%r13)
leaq 0x120346(%rip), %rax    # 0x218804
movl (%rax), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
movl (%r12), %eax
movl %eax, %edx
shrl $0x1f, %edx
addl %eax, %edx
sarl %edx
addl %ecx, %edx
movl %edx, (%r15)
movl $0x4, %edi
callq 0xed9e
callq 0xf8e75
movb $0x4, (%rbx)
leaq 0x12030c(%rip), %rax    # 0x218800
movl (%rax), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
movl %ecx, (%r13)
movl $0x5, %edi
callq 0xed9e
callq 0xf8e75
movl -0x34(%rbp), %eax
movl %eax, (%r13)
movl -0x38(%rbp), %eax
movl %eax, (%r15)
movl -0x30(%rbp), %eax
leaq 0x242e63(%rip), %rcx    # 0x33b38c
movl %eax, (%rcx)
movb -0x29(%rbp), %al
movb %al, (%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: clear_signals()
void clear_signals()
{
int x, y;

   // clear out the signal level data structures

   for(x=0; x<=360; x++) {
      db_az_sum[x] = 0.0F;
      db_weighted_az_sum[x] = 0.0F;
      db_az_count[x] = 0.0F;
      max_el[x] = 0;
      min_el[x] = 90;

      for(y=0; y<=90; y++) {
         db_3d_sum[x][y] = 0.0F;
         db_3d_count[x][y] = (-1.0F);
      }
   }

   for(y=0; y<=90; y++) {
      db_el_sum[y]= 0.0F;
      db_el_count[y] = 0.0F;
   }

   max_sig_level = 0.0F;
   min_sig_level = 999.0F;
   sig_level_sum = 0.0;
   sig_level_count = 0.0;
   max_sat_prn = 0;
   for(x=0; x<=32; x++) {
      max_sat_db[x] = 0.0F;
   }

   reading_signals = 0;  // re-enable live data recording
   signal_length = 0L;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x79b96(%rip), %rdi     # 0x173020
xorl %ebx, %ebx
movl $0x2014c, %edx          # imm = 0x2014C
xorl %esi, %esi
callq 0x91a0
leaq 0x99cd1(%rip), %rax     # 0x193170
leaq 0x7878a(%rip), %rcx     # 0x171c30
leaq 0x78d33(%rip), %rdx     # 0x1721e0
leaq 0x792dc(%rip), %rsi     # 0x172790
leaq 0x781c5(%rip), %rdi     # 0x171680
leaq 0x77c0e(%rip), %r8      # 0x1710d0
xorl %r9d, %r9d
movl %ebx, (%rcx,%r9,4)
movl %ebx, (%rdx,%r9,4)
movl %ebx, (%rsi,%r9,4)
movl %ebx, (%rdi,%r9,4)
movl $0x5a, (%r8,%r9,4)
xorl %r10d, %r10d
movl $0xbf800000, (%rax,%r10,4) # imm = 0xBF800000
incq %r10
cmpq $0x5b, %r10
jne 0xf94e0
incq %r9
addq $0x16c, %rax            # imm = 0x16C
cmpq $0x169, %r9             # imm = 0x169
jne 0xf94c5
leaq 0x79836(%rip), %rdi     # 0x172d40
xorl %ebx, %ebx
movl $0x16c, %edx            # imm = 0x16C
xorl %esi, %esi
callq 0x91a0
leaq 0x79991(%rip), %rdi     # 0x172eb0
movl $0x16c, %edx            # imm = 0x16C
xorl %esi, %esi
callq 0x91a0
leaq 0xbad36(%rip), %rax     # 0x1b4268
movl %ebx, (%rax)
leaq 0xbad31(%rip), %rax     # 0x1b426c
movl $0x4479c000, (%rax)     # imm = 0x4479C000
leaq 0xbad28(%rip), %rax     # 0x1b4270
movq %rbx, (%rax)
leaq 0xbad26(%rip), %rax     # 0x1b4278
movq %rbx, (%rax)
leaq 0x77b6c(%rip), %rax     # 0x1710c8
movl %ebx, (%rax)
leaq 0xb9d5b(%rip), %rdi     # 0x1b32c0
movl $0x84, %edx
xorl %esi, %esi
callq 0x91a0
leaq 0x241d60(%rip), %rax    # 0x33b2d8
movb $0x0, (%rax)
leaq 0x241d5a(%rip), %rax    # 0x33b2dc
movl %ebx, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: freshen_sig_info()
void freshen_sig_info()
{
int az, ell;

   // keep signal level maps "fresh" by periodically re-starting the averaging
   // of readings from the current avaerage.

   for(az=0; az<=360; az++) {
      if(db_az_count[az]) {
         db_weighted_az_sum[az] = (db_weighted_az_sum[az] / db_az_count[az]);
         db_az_sum[az] = (db_az_sum[az] / db_az_count[az]);
         db_az_count[az] = 1;
      }
   }

   for(ell=0; ell<=90; ell++) {
      if(db_el_count[ell]) {
         db_el_sum[ell] = (db_el_sum[ell] / db_el_count[ell]);
         db_el_count[ell] = 1;
      }
   }
}

// Assembly:
xorl %eax, %eax
leaq 0x791fc(%rip), %rcx     # 0x172790
xorps %xmm0, %xmm0
leaq 0x78c42(%rip), %rdx     # 0x1721e0
leaq 0x7868b(%rip), %rsi     # 0x171c30
movss (%rcx,%rax,4), %xmm1
ucomiss %xmm0, %xmm1
jne 0xf95b1
jnp 0xf95d4
movss (%rdx,%rax,4), %xmm2
divss %xmm1, %xmm2
movss %xmm2, (%rdx,%rax,4)
movss (%rsi,%rax,4), %xmm2
divss %xmm1, %xmm2
movss %xmm2, (%rsi,%rax,4)
movl $0x3f800000, (%rcx,%rax,4) # imm = 0x3F800000
incq %rax
cmpq $0x169, %rax            # imm = 0x169
jne 0xf95a5
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
leaq 0x798c4(%rip), %rcx     # 0x172eb0
xorps %xmm0, %xmm0
leaq 0x7974a(%rip), %rdx     # 0x172d40
popq %rbp
movss (%rcx,%rax,4), %xmm1
ucomiss %xmm0, %xmm1
jne 0xf9603
jnp 0xf9618
movss (%rdx,%rax,4), %xmm2
divss %xmm1, %xmm2
movss %xmm2, (%rdx,%rax,4)
movl $0x3f800000, (%rcx,%rax,4) # imm = 0x3F800000
incq %rax
cmpq $0x5b, %rax
jne 0xf95f7
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: dump_signals(char*)
void dump_signals(char *fn)
{
FILE *f;
int az, el;

   // write signal strength data to a log file

   if(!strstr(fn, ".")) {
      strcat(fn, ".sig");
   }
   f = topen(fn, "w");
   if(f == 0) return;

   write_log_header(f, 3);
   month = fix_month(month);
   fprintf(f,"#   %02d:%02d:%02d %s   %02d %s %04d\n", 
      hours,minutes,seconds, (time_flags & TFLAGS_UTC)?"UTC":"GPS", day,months[month],year);
   fprintf(f, "#\n");
   fprintf(f, "#az el dBc\n");

   for(el=0; el<=90; el++) {
      for(az=0; az<=360; az++) {
         if(db_3d_count[az][el] > 0.0F) {
            fprintf(f, "%03d %02d %5.2f\n", az, el, db_3d_sum[az][el]/db_3d_count[az][el]);
         }
      }
   }

   fclose(f);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x2e, %esi
callq 0x9100
testq %rax, %rax
jne 0xf97fb
movq %rbx, %rdi
callq 0x9120
movl $0x6769732e, (%rbx,%rax) # imm = 0x6769732E
movb $0x0, 0x4(%rbx,%rax)
leaq 0x27bb9(%rip), %rsi     # 0x1213bb
movq %rbx, %rdi
callq 0x9a47
testq %rax, %rax
je 0xf9967
movq %rax, %r12
movq %rax, %rdi
callq 0xc678f
leaq 0x213cb3(%rip), %rbx    # 0x30d4d8
movl (%rbx), %edi
callq 0x723a5
movl %eax, (%rbx)
leaq 0x213c9b(%rip), %rcx    # 0x30d4d0
movl (%rcx), %edx
leaq 0x213c8e(%rip), %rcx    # 0x30d4cc
movl (%rcx), %ecx
leaq 0x213c81(%rip), %rsi    # 0x30d4c8
movl (%rsi), %r8d
leaq 0x213c53(%rip), %rsi    # 0x30d4a4
testb $0x1, (%rsi)
leaq 0x3a096(%rip), %rsi     # 0x1338f1
leaq 0x3b64c(%rip), %r9      # 0x134eae
cmoveq %rsi, %r9
leaq 0x213c67(%rip), %rsi    # 0x30d4d4
movl (%rsi), %r10d
movslq %eax, %r11
leaq 0x70ec6(%rip), %rbx     # 0x16a740
leaq 0x213c5b(%rip), %rax    # 0x30d4dc
movl (%rax), %r15d
subq $0x8, %rsp
leaq 0x3b8d6(%rip), %rsi     # 0x135165
xorl %r14d, %r14d
movq %r12, %rdi
xorl %eax, %eax
pushq %r15
pushq (%rbx,%r11,8)
pushq %r10
callq 0x9560
addq $0x20, %rsp
leaq 0x380be(%rip), %rdi     # 0x13196d
movl $0x2, %esi
movl $0x1, %edx
movq %r12, %rcx
callq 0x9750
leaq 0x3b8c3(%rip), %rdi     # 0x13518b
movl $0xb, %esi
movl $0x1, %edx
movq %r12, -0x30(%rbp)
movq %r12, %rcx
callq 0x9750
leaq 0x9988b(%rip), %r13     # 0x193170
leaq 0x79734(%rip), %r15     # 0x173020
xorps %xmm1, %xmm1
xorl %ebx, %ebx
xorl %r12d, %r12d
movss (%r13,%rbx), %xmm0
ucomiss %xmm1, %xmm0
jbe 0xf992c
movss (%r15,%rbx), %xmm1
divss %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
movq -0x30(%rbp), %rdi
leaq 0x3b87b(%rip), %rsi     # 0x135197
movl %r12d, %edx
movl %r14d, %ecx
movb $0x1, %al
callq 0x9560
xorps %xmm1, %xmm1
incq %r12
addq $0x16c, %rbx            # imm = 0x16C
cmpq $0x169, %r12            # imm = 0x169
jne 0xf98f4
incq %r14
addq $0x4, %r13
addq $0x4, %r15
cmpq $0x5b, %r14
jne 0xf98ef
movq -0x30(%rbp), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9370
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: next_az_point(int, int)
int next_az_point(int start_az, int el)
{
   if(start_az >= 360) return 360;
   while(++start_az < 360) {
      if(db_3d_count[start_az][el] > 0.0F) break;
      if((lat < 0.0) || (DABS(lat*RAD_TO_DEG) > HIGH_LATS)) {
         if(start_az == 180) break;
      }
   }
   return start_az;
}

// Assembly:
movl $0x168, %eax            # imm = 0x168
cmpl $0x166, %edi            # imm = 0x166
jg 0xf9ec1
pushq %rbp
movq %rsp, %rbp
movslq %esi, %rdx
leaq 0x2131c6(%rip), %rcx    # 0x30cfd0
movsd (%rcx), %xmm0
movsd 0xf34a(%rip), %xmm3     # 0x109160
mulsd %xmm0, %xmm3
xorpd %xmm1, %xmm1
xorpd %xmm4, %xmm4
subsd %xmm3, %xmm4
movapd %xmm3, %xmm2
cmpltsd %xmm1, %xmm2
andpd %xmm2, %xmm4
andnpd %xmm3, %xmm2
orpd %xmm4, %xmm2
movslq %edi, %rcx
incl %edi
imulq $0x16c, %rcx, %rsi      # imm = 0x16C
leaq (%rsi,%rdx,4), %rdx
addq 0x5605e(%rip), %rdx     # 0x14feb0
addq $0x2, %rcx
addq $0x16c, %rdx            # imm = 0x16C
xorpd %xmm3, %xmm3
movsd 0x24b97(%rip), %xmm4    # 0x11ea00
movss (%rdx), %xmm5
ucomiss %xmm3, %xmm5
ja 0xf9eb7
ucomisd %xmm0, %xmm1
jbe 0xf9e83
cmpq $0xb5, %rcx
jne 0xf9e9b
jmp 0xf9ebb
cmpq $0xb5, %rcx
sete %sil
ucomisd %xmm4, %xmm2
seta %r8b
testb %sil, %r8b
jne 0xf9ebb
incl %edi
movq %rcx, %rsi
incq %rsi
addq $0x16c, %rdx            # imm = 0x16C
cmpl $0x168, %ecx            # imm = 0x168
movq %rsi, %rcx
jne 0xf9e69
jmp 0xf9ec0
movl %edi, %eax
jmp 0xf9ec0
movl $0xb4, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: draw_3d_signals()
void draw_3d_signals()
{
int el;

   // draw signal level map as a function of az/el
   start_color = BLACK;
   if(plot_signals == 4) {  // find min and max elevations seen at each az angle
      calc_az_clip();
   }
   else if(plot_signals) ;
   else if(zoom_screen == 'S') {
      calc_az_clip();
   }

   for(el=0; el<90; el++) {
      if(plot_signals >= 5) {  // just show raw data points
         plot_raw_signals(el);
      }
      else {                   // show fully expanded color data plot
         plot_3d_signals(el);
      }
   }

   azel_grid_color = WHITE;  // AZEL_COLOR;
   draw_azel_grid(1, AZEL_X,AZEL_Y, AZEL_RADIUS);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl $0x0, 0x35876a(%rip)    # 0x452884
xorl %ebx, %ebx
leaq 0x1212f2(%rip), %r14    # 0x21b415
cmpb $0x5, (%r14)
jb 0xfa132
movl %ebx, %edi
callq 0xf9976
jmp 0xfa139
movl %ebx, %edi
callq 0xf9ec2
incl %ebx
cmpl $0x5a, %ebx
jne 0xfa123
leaq 0x241261(%rip), %rax    # 0x33b3a8
movl $0xf, (%rax)
leaq 0x24124c(%rip), %rax    # 0x33b3a0
movl (%rax), %esi
leaq 0x241247(%rip), %rax    # 0x33b3a4
movl (%rax), %edx
leaq 0x241226(%rip), %rax    # 0x33b38c
movl (%rax), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
leaq 0x241220(%rip), %rax    # 0x33b398
subl (%rax), %ecx
movl $0x1, %edi
popq %rbx
popq %r14
popq %rbp
jmp 0xf469c
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: good_el_level()
int good_el_level()
{
int el;
float max_db;
float r;
#define MAX_GOOD_EL 75

   // find lowest EL level that has good signal
   max_db = 0.0F;
   for(el=0; el<=MAX_GOOD_EL; el++) {  // find max db value
      if(db_el_count[el]) {
         r = db_el_sum[el] / db_el_count[el];
         if(r > max_db) max_db = r;
      }
   }
   if(max_db == 0.0F) return GOOD_EL_LEVEL;

   for(el=0; el<=MAX_GOOD_EL; el++) {
      if(db_el_count[el] && db_el_sum[el]) {
         r = (db_el_sum[el] / db_el_count[el]) / max_db;
         if(r > EL_THRESHOLD) {
            return el;
         }
      }
   }

   return GOOD_EL_LEVEL;
}

// Assembly:
xorps %xmm1, %xmm1
xorl %eax, %eax
leaq 0x78472(%rip), %rcx     # 0x172eb0
leaq 0x782fb(%rip), %rdx     # 0x172d40
xorps %xmm0, %xmm0
movss (%rcx,%rax,4), %xmm3
ucomiss %xmm1, %xmm3
jne 0xfaa54
jnp 0xfaa65
movss (%rdx,%rax,4), %xmm2
divss %xmm3, %xmm2
ucomiss %xmm0, %xmm2
jbe 0xfaa65
movaps %xmm2, %xmm0
incq %rax
cmpq $0x4c, %rax
jne 0xfaa48
movl $0x1e, %eax
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0xfaa7e
jp 0xfaa7e
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x11de7b(%rip), %rsi    # 0x218904
xorl %edi, %edi
cmpb $0x2, (%rsi)
setae %dil
leaq 0x31cc7(%rip), %rsi     # 0x12c760
movss (%rsi,%rdi,4), %xmm2
xorl %esi, %esi
popq %rbp
movss (%rcx,%rsi,4), %xmm3
ucomiss %xmm1, %xmm3
jne 0xfaaad
jnp 0xfaac6
movss (%rdx,%rsi,4), %xmm4
ucomiss %xmm1, %xmm4
jne 0xfaab9
jnp 0xfaac6
divss %xmm3, %xmm4
divss %xmm0, %xmm4
ucomiss %xmm2, %xmm4
ja 0xfaad1
incq %rsi
cmpq $0x4c, %rsi
jne 0xfaaa1
jmp 0xfaa7d
movl %esi, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: good_sig_level()
int good_sig_level()
{
float count, sum;
int prn;

   // find reasonable signal level mask setting (0.4 * the average max sig level)

   count = sum = 0.0;
   for(prn=1; prn<=MAX_PRN; prn++) {
      if(max_sat_db[prn]) {
         sum += max_sat_db[prn];
         ++count;
      }
   }

   if(count) {
      sum /= count;
      sum *= 0.40F;
   }
   else {
      sum = GOOD_SIG_LEVEL;
   }

   return (int) (sum+0.50F);
}

// Assembly:
xorps %xmm1, %xmm1
movl $0x1, %eax
leaq 0xb87dd(%rip), %rcx     # 0x1b32c0
movss 0x12581(%rip), %xmm2    # 0x10d06c
xorps %xmm0, %xmm0
xorps %xmm3, %xmm3
movaps %xmm3, %xmm5
movaps %xmm0, %xmm4
movss (%rcx,%rax,4), %xmm0
ucomiss %xmm0, %xmm1
addss %xmm2, %xmm3
jne 0xfab0a
jp 0xfab0a
movaps %xmm5, %xmm3
addss %xmm4, %xmm0
jne 0xfab15
jp 0xfab15
movaps %xmm4, %xmm0
incq %rax
cmpq $0x3e8, %rax            # imm = 0x3E8
jne 0xfaaf1
pushq %rbp
movq %rsp, %rbp
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm3
divss %xmm3, %xmm0
mulss 0x31cce(%rip), %xmm0    # 0x12c804
addss 0x1253a(%rip), %xmm0    # 0x10d078
cvttss2si %xmm0, %ecx
movl $0x14, %eax
cmovnel %ecx, %eax
cmovpl %ecx, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: clear_maps()
void clear_maps()
{
   // clear the signal level at sat position data

#ifdef SAT_TRAILS
   clear_sat_trails();
   need_redraw = 1101;
#endif

#ifdef SIG_LEVELS
   clear_signals();
   need_redraw = 1102;
#endif

   need_posns = 2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
xorl %r15d, %r15d
leaq 0x280d0c(%rip), %r12    # 0x37b870
leaq (%r12,%r15), %rdi
leaq (%r15,%r12), %rbx
addq $0x248, %rbx            # imm = 0x248
leaq (%r15,%r12), %r14
addq $0x124, %r14            # imm = 0x124
movl $0x120, %edx            # imm = 0x120
xorl %esi, %esi
callq 0x91a0
movl $0x120, %edx            # imm = 0x120
movq %r14, %rdi
xorl %esi, %esi
callq 0x91a0
movl $0x120, %edx            # imm = 0x120
movq %rbx, %rdi
xorl %esi, %esi
callq 0x91a0
addq $0x36c, %r15            # imm = 0x36C
cmpq $0xd64b8, %r15          # imm = 0xD64B8
jne 0xfab64
movl $0x0, 0x280c9e(%rip)    # 0x37b860
callq 0xf947d
leaq 0x11dc76(%rip), %rax    # 0x218844
movl $0x44e, (%rax)          # imm = 0x44E
leaq 0x120805(%rip), %rax    # 0x21b3e0
movb $0x2, (%rax)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: open_lla_file(int)
void open_lla_file(int why)
{
   if(lla_file == 0) {
//    strcpy(out, LLA_FILE);
      sprintf(out, "%s.lla", unit_file_name);
      lla_file = topen(out, "w");
   }
   if(lla_file == 0) return;
//fprintf(lla_file, "### open_lla_file(%d)\n", why);

   month = fix_month(month);
   fprintf(lla_file, "#TITLE: LLA log %s: %02d %s %04d  %02d:%02d:%02d - receiver mode %d\n", 
      out, day, months[month], year, hours,minutes,seconds, rcvr_mode);
   fprintf(lla_file, "#LLA: %.9f %.9f %.4f\n", precise_lat*RAD_TO_DEG, precise_lon*RAD_TO_DEG, precise_alt);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x143775(%rip), %r14    # 0x23e3a0
cmpq $0x0, (%r14)
jne 0xfac6e
leaq 0x76050(%rip), %rax     # 0x170c88
movq (%rax), %rdx
leaq 0x2415de(%rip), %rbx    # 0x33c220
leaq 0x3a56f(%rip), %rsi     # 0x1351b8
movq %rbx, %rdi
xorl %eax, %eax
callq 0x9060
leaq 0x26761(%rip), %rsi     # 0x1213bb
movq %rbx, %rdi
callq 0x9a47
movq %rax, (%r14)
testq %rax, %rax
je 0xfad31
leaq 0x212863(%rip), %rbx    # 0x30d4d8
movl (%rbx), %edi
callq 0x723a5
movl %eax, (%rbx)
movq (%r14), %rdi
leaq 0x21284c(%rip), %rcx    # 0x30d4d4
movl (%rcx), %ecx
cltq
leaq 0x6faad(%rip), %rdx     # 0x16a740
movq (%rdx,%rax,8), %r8
leaq 0x21283e(%rip), %rax    # 0x30d4dc
movl (%rax), %r9d
leaq 0x212828(%rip), %rax    # 0x30d4d0
movl (%rax), %r10d
leaq 0x21281a(%rip), %rax    # 0x30d4cc
movl (%rax), %r11d
leaq 0x21280c(%rip), %rax    # 0x30d4c8
movl (%rax), %ebx
leaq 0x21240b(%rip), %rax    # 0x30d0d0
movzbl (%rax), %r15d
leaq 0x3a4ef(%rip), %rsi     # 0x1351bf
leaq 0x241549(%rip), %rdx    # 0x33c220
xorl %eax, %eax
pushq %r15
pushq %rbx
pushq %r11
pushq %r10
callq 0x9560
addq $0x20, %rsp
movq (%r14), %rdi
leaq 0x2405fd(%rip), %rax    # 0x33b2f0
movsd 0xe465(%rip), %xmm1     # 0x109160
movsd (%rax), %xmm0
mulsd %xmm1, %xmm0
leaq 0x2405ee(%rip), %rax    # 0x33b2f8
mulsd (%rax), %xmm1
leaq 0x2405eb(%rip), %rax    # 0x33b300
movsd (%rax), %xmm2
leaq 0x3a4e4(%rip), %rsi     # 0x135204
movb $0x3, %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x9560
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: start_3d_fixes(int, int)
void start_3d_fixes(int mode, int why)
{
   #ifdef BUFFER_LLA
      if(mode >= 0) clear_lla_points(0);
   #endif
// open_lla_file(1);

   if(mode >= 0) set_rcvr_mode(mode);  // 0=auto 2D/3D  or  4=3D only mode
   request_sat_list();

   plot_lla = 2;
   plot_azel = 1;
   update_azel = 1;
   if(WIDE_SCREEN == 0) {
      shared_plot = 1; 
      if(rcvr_type == TICC_RCVR) all_adevs = ALL_CHANS;
      else                       all_adevs = SINGLE_ADEVS;
   }
if(mode >= 0) precision_samples = 0L;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
testl %edi, %edi
js 0xfad9a
xorl %edi, %edi
callq 0xfae0d
movzbl %bl, %edi
movss 0x122e6(%rip), %xmm0    # 0x10d068
movl $0xff, %esi
movaps %xmm0, %xmm1
movaps %xmm0, %xmm2
movaps %xmm0, %xmm3
movl $0xff, %edx
callq 0x5cf59
callq 0x6649d
leaq 0x24050a(%rip), %rax    # 0x33b2b0
movb $0x2, (%rax)
leaq 0x120663(%rip), %rax    # 0x21b413
movb $0x1, %cl
movb %cl, (%rax)
leaq 0x120659(%rip), %rax    # 0x21b414
movb %cl, (%rax)
leaq 0x11da3c(%rip), %rax    # 0x218800
cmpl $0x68f, (%rax)          # imm = 0x68F
jg 0xfadf5
leaq 0x240615(%rip), %rax    # 0x33b3e8
movb $0x1, (%rax)
leaq 0x11daf3(%rip), %rax    # 0x2188d0
xorl %ecx, %ecx
cmpq $0x10000, (%rax)        # imm = 0x10000
sete %cl
leal (%rcx,%rcx,4), %eax
leaq 0x141f4b(%rip), %rcx    # 0x23cd3e
movb %al, (%rcx)
testl %ebx, %ebx
js 0xfae06
leaq 0x2404e4(%rip), %rax    # 0x33b2e4
movl $0x0, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: clear_lla_points(int)
void clear_lla_points(int force_clear)
{
int x, y;

   // clear splatter plot data buffer

   if(force_clear) ;    // llascale
   else if(zoom_screen == 'L') return;

   for(x=0; x<MAX_LLA_SIZE; x++) {
      for(y=0; y<MAX_LLA_SIZE; y++) {
         lla_data[x][y] = 0;
      }
   }

   if(user_set_ref_lla == 0) {
      ref_lat = lat;
      ref_lon = lon;
      ref_alt = alt;
   }
   cos_factor = cos(ref_lat);
   if(cos_factor == 0.0) cos_factor = 0.001;
   lla_points = 0;
}

// Assembly:
testl %edi, %edi
jne 0xfae1e
leaq 0x211990(%rip), %rax    # 0x30c7a8
cmpb $0x4c, (%rax)
jne 0xfae1e
retq
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
xorl %ebx, %ebx
leaq 0xb9462(%rip), %r14     # 0x1b4290
leaq (%rbx,%r14), %rdi
movl $0x280, %edx            # imm = 0x280
xorl %esi, %esi
callq 0x91a0
addq $0x281, %rbx            # imm = 0x281
cmpq $0x64280, %rbx          # imm = 0x64280
jne 0xfae2e
leaq 0x2404eb(%rip), %rax    # 0x33b340
cmpl $0x0, (%rax)
je 0xfae67
leaq 0x2404af(%rip), %rax    # 0x33b310
movsd (%rax), %xmm0
jmp 0xfaea9
leaq 0x212162(%rip), %rax    # 0x30cfd0
movsd (%rax), %xmm0
leaq 0x240497(%rip), %rax    # 0x33b310
movsd %xmm0, (%rax)
leaq 0x212154(%rip), %rax    # 0x30cfd8
movsd (%rax), %xmm1
leaq 0x240489(%rip), %rax    # 0x33b318
movsd %xmm1, (%rax)
leaq 0x212146(%rip), %rax    # 0x30cfe0
movsd (%rax), %xmm1
leaq 0x24047b(%rip), %rax    # 0x33b320
movsd %xmm1, (%rax)
callq 0x9710
xorpd %xmm1, %xmm1
cmpeqsd %xmm0, %xmm1
movsd 0x10a71(%rip), %xmm2    # 0x10b930
andpd %xmm1, %xmm2
andnpd %xmm0, %xmm1
orpd %xmm2, %xmm1
leaq 0x2120f6(%rip), %rax    # 0x30cfc8
movlpd %xmm1, (%rax)
leaq 0x24040b(%rip), %rax    # 0x33b2e8
movl $0x0, (%rax)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: stop_precision_survey(int)
void stop_precision_survey(int why)
{
   if(precision_survey == 0) return;
   precision_survey = 0;

//if(debug_file) fprintf(debug_file, "stop precision survey:%d\n", why); //plugh
   sprintf(log_text, "# Precision survey stopped.  why:%d", why);
   write_log_comment(1);

   show_fixes = 0;
   change_fix_config(show_fixes);
   set_rcvr_mode(RCVR_MODE_HOLD);     // overdetermined clock mode
   if(lla_file) { //!!!! kludge - add a extra entry so external processor program works correctly
      fprintf(lla_file, "# time filler kludge\n");
      fprintf(lla_file, "%-6ld %d %13.8f  %13.8f  %8.3f\n", 
      tow+60L, 0, lat*RAD_TO_DEG, lon*RAD_TO_DEG, alt);
   }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x212c06(%rip), %rax    # 0x30de98
cmpb $0x0, (%rax)
je 0xfb36d
movl %edi, %edx
xorl %ebx, %ebx
movb %bl, (%rax)
leaq 0x1426b8(%rip), %rdi    # 0x23d960
leaq 0x3a0f4(%rip), %rsi     # 0x1353a3
xorl %eax, %eax
callq 0x9060
movl $0x1, %edi
callq 0xc36e2
leaq 0x24000d(%rip), %rax    # 0x33b2d4
movb %bl, (%rax)
xorl %edi, %edi
callq 0x3ab43
movss 0x11d90(%rip), %xmm0    # 0x10d068
movl $0x7, %edi
movl $0xff, %esi
movaps %xmm0, %xmm1
movaps %xmm0, %xmm2
movaps %xmm0, %xmm3
movl $0xff, %edx
callq 0x5cf59
leaq 0x1430a4(%rip), %rbx    # 0x23e3a0
movq (%rbx), %rcx
testq %rcx, %rcx
je 0xfb36d
leaq 0x3a0bc(%rip), %rdi     # 0x1353c7
movl $0x15, %esi
movl $0x1, %edx
callq 0x9750
movq (%rbx), %rdi
leaq 0x212418(%rip), %rax    # 0x30d73c
movl (%rax), %edx
leaq 0x211ca3(%rip), %rax    # 0x30cfd0
movsd 0xde2b(%rip), %xmm1     # 0x109160
movsd (%rax), %xmm0
mulsd %xmm1, %xmm0
leaq 0x211c94(%rip), %rax    # 0x30cfd8
mulsd (%rax), %xmm1
addq $0x3c, %rdx
leaq 0x211c8d(%rip), %rax    # 0x30cfe0
movsd (%rax), %xmm2
leaq 0x3a07f(%rip), %rsi     # 0x1353dd
xorl %ecx, %ecx
movb $0x3, %al
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x9560
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: lla_header(char*, int)
void lla_header(char *s, int color)
{
int xx;
int yy;

   // label the lat/lon/alt data block

   if(text_mode) {
      yy = MOUSE_ROW-1;
      xx = MOUSE_COL;
   }
   else {
      xx = (LLA_COL/TEXT_WIDTH)+1;
      yy = (LLA_ROW+LLA_SIZE)/TEXT_HEIGHT+0;
      if(SCREEN_WIDTH > (NARROW_SCREEN+X11_MARGIN)) xx += 5;
      else                                          xx -= 2;
   }

   vidstr(yy, xx, color, s);
   strcpy(lla_msg, s);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x11d2b4(%rip), %rax    # 0x2187d8
cmpl $0x0, (%rax)
je 0xfb53f
leaq 0x11d278(%rip), %rax    # 0x2187a8
movl (%rax), %edi
decl %edi
leaq 0x11d271(%rip), %rax    # 0x2187ac
movl (%rax), %ecx
jmp 0xfb5ac
leaq 0x23fd66(%rip), %rax    # 0x33b2ac
movl (%rax), %eax
leaq 0x11d2c1(%rip), %rcx    # 0x218810
cltd
idivl (%rcx)
movl %eax, %ecx
leaq 0x23fd4d(%rip), %rdx    # 0x33b2a8
leaq 0x23fd36(%rip), %rax    # 0x33b298
movl (%rax), %eax
addl (%rdx), %eax
leaq 0x11d2a7(%rip), %rdi    # 0x218814
cltd
idivl (%rdi)
movl %eax, %edi
leaq 0x11d287(%rip), %rax    # 0x218800
leaq 0x127fc4(%rip), %rdx    # 0x223544
imull $0x31a, (%rdx), %edx    # imm = 0x31A
movslq %edx, %rdx
imulq $0x51eb851f, %rdx, %rdx # imm = 0x51EB851F
movq %rdx, %r8
sarq $0x25, %r8
shrq $0x3f, %rdx
addl %r8d, %edx
addl $0x6, %edx
cmpl %edx, (%rax)
jle 0xfb5aa
addl $0x6, %ecx
jmp 0xfb5ac
decl %ecx
movzbl %sil, %edx
movl %ecx, %esi
movq %rbx, %rcx
callq 0xe787
leaq 0x27edef(%rip), %rdi    # 0x37a3b0
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x9340
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: find_mouse_lla()
int find_mouse_lla()
{
int map_r;
int x,y;

   // set mouse_lat and mouse_lon variables to the lat/lon in the scattergram
   // where the mouse cursor is located.  Returns true is mouse values are
   // valid.

   mouse_lat = mouse_lon = 0.0;
   if(autoscale_lla == 0) return 0;
   if(have_valid_lla == 0) return 0;
   
   map_r = LLA_SIZE / 2;
   if(mouse_x < LLA_X-map_r) return 0;
   if(mouse_x > LLA_X+map_r) return 0;
   if(mouse_y < LLA_Y-map_r) return 0;
   if(mouse_y > LLA_Y+map_r) return 0;

   x = mouse_x - LLA_X;
   y = LLA_Y - mouse_y;

   if(cos_factor == 0.0) cos_factor = 0.001;
   mouse_lat = (ref_lat*RAD_TO_DEG) + ( (((double) y) / (double) LLA_SIZE) * ref_lat_span ); 
   mouse_lon = (ref_lon*RAD_TO_DEG) + ( (((double) x) / (double) LLA_SIZE) * (ref_lon_span / cos_factor));
   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
movq %rax, 0x358371(%rip)    # 0x453e98
movq %rax, 0x358362(%rip)    # 0x453e90
leaq 0x23f77f(%rip), %rcx    # 0x33b2b4
cmpl $0x0, (%rcx)
je 0xfbc6e
leaq 0x21177f(%rip), %rcx    # 0x30d2c4
cmpl $0x0, (%rcx)
je 0xfbc6e
leaq 0x23f743(%rip), %rcx    # 0x33b298
movl (%rcx), %edx
movl %edx, %edi
shrl $0x1f, %edi
addl %edx, %edi
sarl %edi
leaq 0x11f6d9(%rip), %rcx    # 0x21b240
movl (%rcx), %ecx
leaq 0x23f73c(%rip), %rsi    # 0x33b2ac
movl (%rsi), %esi
leal (%rdi,%rsi), %r8d
decl %r8d
decl %esi
cmpl %esi, %ecx
setl %sil
leal (%r8,%rdi), %r9d
cmpl %r9d, %ecx
setg %r9b
orb %sil, %r9b
jne 0xfbc6e
leal -0x1(%rdi), %esi
leaq 0x11f6a5(%rip), %r9     # 0x21b244
movl (%r9), %r9d
leaq 0x23f6ff(%rip), %r10    # 0x33b2a8
addl (%r10), %esi
movl %esi, %r10d
subl %edi, %r10d
cmpl %r10d, %r9d
setl %r10b
addl %esi, %edi
cmpl %edi, %r9d
setg %dil
orb %r10b, %dil
jne 0xfbc6e
subl %r8d, %ecx
subl %r9d, %esi
leaq 0x2113f0(%rip), %rax    # 0x30cfc8
movsd (%rax), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xfbbfd
jp 0xfbbfd
movabsq $0x3f50624dd2f1a9fc, %rdi # imm = 0x3F50624DD2F1A9FC
movq %rdi, (%rax)
movsd 0xfd33(%rip), %xmm0     # 0x10b930
leaq 0x23f70c(%rip), %rax    # 0x33b310
xorps %xmm1, %xmm1
cvtsi2sd %esi, %xmm1
cvtsi2sd %edx, %xmm2
divsd %xmm2, %xmm1
mulsd 0x358285(%rip), %xmm1   # 0x453ea0
movsd 0xd53d(%rip), %xmm3     # 0x109160
movsd (%rax), %xmm4
mulsd %xmm3, %xmm4
addsd %xmm1, %xmm4
movsd %xmm4, 0x358259(%rip)   # 0x453e90
leaq 0x23f6da(%rip), %rax    # 0x33b318
xorps %xmm1, %xmm1
cvtsi2sd %ecx, %xmm1
divsd %xmm2, %xmm1
movsd 0x358257(%rip), %xmm2   # 0x453ea8
divsd %xmm0, %xmm2
mulsd (%rax), %xmm3
mulsd %xmm1, %xmm2
addsd %xmm2, %xmm3
movsd %xmm3, 0x35822f(%rip)   # 0x453e98
movl $0x1, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: show_mouse_lla()
void show_mouse_lla()
{
int xx;

   // label the lat/lon scattergram

   if(text_mode && first_key) return;
   if(plot_lla == 0) return;

   xx = LLA_COL/TEXT_WIDTH+1;
   if(SCREEN_WIDTH > (NARROW_SCREEN+X11_MARGIN)) xx += 5;
   else                                          xx -= 2;

   if(find_mouse_lla()) {
      label_lla_header();
      format_lla(mouse_lat*DEG_TO_RAD,mouse_lon*DEG_TO_RAD,ref_alt, (LLA_ROW+LLA_SIZE)/TEXT_HEIGHT+1, xx, 0);
   }
   else {
      label_lla_header();
      format_lla(ref_lat,ref_lon,ref_alt, (LLA_ROW+LLA_SIZE)/TEXT_HEIGHT+1, xx, 0);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x11c7f0(%rip), %rax    # 0x2187d8
cmpl $0x0, (%rax)
setne %al
leaq 0x142f63(%rip), %rcx    # 0x23ef58
cmpl $0x0, (%rcx)
setne %cl
testb %cl, %al
jne 0xfc08e
leaq 0x23f2a6(%rip), %rax    # 0x33b2b0
cmpb $0x0, (%rax)
je 0xfc08e
leaq 0x23f296(%rip), %rax    # 0x33b2ac
movl (%rax), %eax
leaq 0x11c7f1(%rip), %rcx    # 0x218810
cltd
idivl (%rcx)
leaq 0x11c7d7(%rip), %rcx    # 0x218800
leaq 0x127514(%rip), %rdx    # 0x223544
imull $0x31a, (%rdx), %edx    # imm = 0x31A
movslq %edx, %rdx
imulq $0x51eb851f, %rdx, %rdx # imm = 0x51EB851F
movq %rdx, %rsi
sarq $0x25, %rsi
shrq $0x3f, %rdx
addl %esi, %edx
addl $0x6, %edx
xorl %ebx, %ebx
cmpl %edx, (%rcx)
setle %bl
negl %ebx
orl $0x6, %ebx
addl %eax, %ebx
callq 0xfbb1a
movl %eax, %r14d
callq 0xfbc70
testl %r14d, %r14d
je 0xfc093
movsd 0xf898(%rip), %xmm1     # 0x10b910
movsd 0x357e10(%rip), %xmm0   # 0x453e90
mulsd %xmm1, %xmm0
mulsd 0x357e0c(%rip), %xmm1   # 0x453e98
jmp 0xfc0a9
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x23f276(%rip), %rax    # 0x33b310
movsd (%rax), %xmm0
leaq 0x23f273(%rip), %rax    # 0x33b318
movsd (%rax), %xmm1
leaq 0x23f270(%rip), %rax    # 0x33b320
movsd (%rax), %xmm2
leaq 0x23f1ed(%rip), %rcx    # 0x33b2a8
leaq 0x23f1d6(%rip), %rax    # 0x33b298
movl (%rax), %eax
addl (%rcx), %eax
leaq 0x11c747(%rip), %rcx    # 0x218814
cltd
idivl (%rcx)
leal 0x1(%rax), %edi
movl %ebx, %esi
xorl %edx, %edx
popq %rbx
popq %r14
popq %rbp
jmp 0xb27ba
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: redraw_lla_points()
void redraw_lla_points()
{
int x, y;
int xs, ys;
int xx,yy;

   // redraw splatter plot from the saved data points

   for(x=0; x<MAX_LLA_SIZE; x++) {
      xs = (int) ((float) x * (float) lla_width / (float) MAX_LLA_SIZE);
      if((xs < 0) || (xs >= MAX_LLA_SIZE)) continue;

      for(y=0; y<MAX_LLA_SIZE; y++) {
         ys = (int) ((float) y * (float) lla_width / (float) MAX_LLA_SIZE);
         if((ys < 0) || (ys >= MAX_LLA_SIZE)) continue;
         if(lla_data[x][y]) {
            xx = LLA_X+xs-(lla_width/2);
            yy = LLA_Y+ys-(lla_width/2);
            if(xx < 0) continue;
            if(yy < 0) continue;
            if(xx >= SCREEN_WIDTH) continue;
            if(yy >= SCREEN_HEIGHT) continue;
            dot(xx,yy, lla_data[x][y]);
         }
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x23ebbb(%rip), %rax    # 0x33b2a4
movl (%rax), %eax
leaq 0xb7b9e(%rip), %r14     # 0x1b4290
xorl %ecx, %ecx
movss 0x3010c(%rip), %xmm2    # 0x12c808
leaq 0x23eba9(%rip), %r13    # 0x33b2ac
leaq 0x23eb8e(%rip), %r15    # 0x33b298
movq %rcx, -0x30(%rbp)
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
xorps %xmm1, %xmm1
cvtsi2ss %eax, %xmm1
mulss %xmm0, %xmm1
divss %xmm2, %xmm1
cvttss2si %xmm1, %ebx
cmpl $0x27f, %ebx            # imm = 0x27F
ja 0xfc7df
decl %ebx
xorl %r12d, %r12d
xorps %xmm0, %xmm0
cvtsi2ss %r12d, %xmm0
xorps %xmm1, %xmm1
cvtsi2ss %eax, %xmm1
mulss %xmm0, %xmm1
divss %xmm2, %xmm1
cvttss2si %xmm1, %edx
cmpl $0x27f, %edx            # imm = 0x27F
ja 0xfc7cf
movb (%r14,%r12), %cl
testb %cl, %cl
je 0xfc7cf
movl (%r15), %edi
movl %edi, %esi
shrl $0x1f, %esi
addl %edi, %esi
sarl %esi
movl %eax, %r8d
shrl $0x1f, %r8d
addl %eax, %r8d
sarl %r8d
movl %ebx, %edi
subl %r8d, %edi
addl (%r13), %edi
addl %esi, %edi
js 0xfc7cf
subl %r8d, %edx
addl %esi, %edx
leaq 0x23eb12(%rip), %rsi    # 0x33b2a8
movl (%rsi), %esi
addl %edx, %esi
decl %esi
testl %esi, %esi
js 0xfc7cf
leaq 0x11c059(%rip), %rdx    # 0x218800
cmpl (%rdx), %edi
jge 0xfc7cf
leaq 0x11c052(%rip), %rdx    # 0x218804
cmpl (%rdx), %esi
jge 0xfc7cf
movzbl %cl, %edx
callq 0xe657
movss 0x30042(%rip), %xmm2    # 0x12c808
leaq 0x23ead7(%rip), %rax    # 0x33b2a4
movl (%rax), %eax
incq %r12
cmpq $0x280, %r12            # imm = 0x280
jne 0xfc739
movq -0x30(%rbp), %rcx
incq %rcx
addq $0x281, %r14            # imm = 0x281
cmpq $0x280, %rcx            # imm = 0x280
jne 0xfc70a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: add_to_bin(double, double*, int)
int add_to_bin(double val,  double bin[],  int bins_filled)
{
int i;

   if(bins_filled >= SURVEY_BIN_COUNT) {
     return bins_filled;
   }

   bin[bins_filled] = val;
   for(i=bins_filled-1; i>=0; i--) {
      if(bin[i] > val) {
         bin[i+1] = bin[i];
         bin[i] = val;
      }
      else break;
   }

   bins_filled += 1;
   return bins_filled;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %esi, %eax
cmpl $0x5f, %esi
jg 0xfce1d
movslq %eax, %rcx
movsd %xmm0, (%rdi,%rcx,8)
testl %eax, %eax
jle 0xfce1b
movl %eax, %ecx
incq %rcx
movsd -0x10(%rdi,%rcx,8), %xmm1
ucomisd %xmm0, %xmm1
jbe 0xfce1b
movsd %xmm1, -0x8(%rdi,%rcx,8)
movsd %xmm0, -0x10(%rdi,%rcx,8)
decq %rcx
cmpq $0x1, %rcx
ja 0xfcdfa
incl %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: show_precise_info(int)
void show_precise_info(int flag)
{
int i;
double xlat,xlon,xalt;

   if(debug_lla) {
      for(i=flag; i<hour_lats; i++) {
         xlat = lat_hr_bins[i];
         xlon = lon_hr_bins[i];
         xalt = alt_hr_bins[i];

         xlat *= RAD_TO_DEG;
         xlon *= RAD_TO_DEG;
         if(lla_file) {
            fprintf(lla_file, "#\n");
            fprintf(lla_file, "# Hour %2d: lat:%14.9f  %.9f\n",  i+1, xlat, (xlat-LAT_REF)/ANGLE_SCALE);
            fprintf(lla_file, "# Hour %2d: lon:%14.9f  %.9f\n",  i+1, xlon, (xlon-LON_REF)/ANGLE_SCALE*COS_FACTOR(xlat));
            fprintf(lla_file, "# Hour %2d: alt:%14.9f  %.9f\n",  i+1, xalt, (xalt-ALT_REF)*FEET_PER_METER);
            fprintf(lla_file, "#\n");
         }
      }
   }
}

// Assembly:
cmpb $0x0, 0x73e1a(%rip)     # 0x170c40
setne %cl
movl 0x27cf51(%rip), %eax    # 0x379d80
cmpl %edi, %eax
setg %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0xfcfd6
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movslq %edi, %rbx
leaq 0x141546(%rip), %r12    # 0x23e3a0
movq (%r12), %rcx
leaq 0x34b08(%rip), %r14     # 0x13196d
leaq 0x21014c(%rip), %r13    # 0x30cfb8
testq %rcx, %rcx
je 0xfcfb7
leaq 0x27d224(%rip), %rax    # 0x37a0a0
movsd (%rax,%rbx,8), %xmm1
movsd 0xc2d7(%rip), %xmm0     # 0x109160
mulsd %xmm0, %xmm1
movsd %xmm1, -0x38(%rbp)
leaq 0x27cef7(%rip), %rax    # 0x379d90
movsd (%rax,%rbx,8), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, -0x30(%rbp)
leaq 0x356cd2(%rip), %rax    # 0x453b80
movsd (%rax,%rbx,8), %xmm0
movsd %xmm0, -0x48(%rbp)
movl $0x2, %esi
movl $0x1, %edx
movq %r14, %rdi
callq 0x9750
movq (%r12), %rdi
incq %rbx
leaq 0x23e418(%rip), %rax    # 0x33b2f0
movsd (%rax), %xmm2
mulsd 0xc27c(%rip), %xmm2     # 0x109160
movsd -0x30(%rbp), %xmm0
movapd %xmm0, %xmm1
subsd %xmm2, %xmm1
divsd (%r13), %xmm1
leaq 0x38932(%rip), %rsi     # 0x135830
movl %ebx, %edx
movb $0x2, %al
callq 0x9560
movq (%r12), %r15
leaq 0x23e3e6(%rip), %rax    # 0x33b2f8
movsd (%rax), %xmm0
movsd 0xc242(%rip), %xmm1     # 0x109160
mulsd %xmm1, %xmm0
movsd -0x38(%rbp), %xmm2
subsd %xmm0, %xmm2
divsd (%r13), %xmm2
movsd %xmm2, -0x40(%rbp)
movsd -0x30(%rbp), %xmm0
divsd %xmm1, %xmm0
callq 0x9710
movsd -0x40(%rbp), %xmm1
mulsd %xmm0, %xmm1
movq %r15, %rdi
leaq 0x388f7(%rip), %rsi     # 0x13584e
movl %ebx, %edx
movsd -0x38(%rbp), %xmm0
movb $0x2, %al
callq 0x9560
movq (%r12), %rdi
movsd -0x48(%rbp), %xmm0
movapd %xmm0, %xmm1
leaq 0x23e387(%rip), %rax    # 0x33b300
subsd (%rax), %xmm1
mulsd 0xe923(%rip), %xmm1     # 0x10b8a8
leaq 0x388e0(%rip), %rsi     # 0x13586c
movl %ebx, %edx
movb $0x2, %al
callq 0x9560
movq (%r12), %rcx
movl $0x2, %esi
movl $0x1, %edx
movq %r14, %rdi
callq 0x9750
movq (%r12), %rcx
movl 0x27cdcb(%rip), %eax    # 0x379d80
jmp 0xfcfbc
incq %rbx
xorl %ecx, %ecx
movslq %eax, %rdx
cmpq %rdx, %rbx
jl 0xfce6c
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: update_precise_survey()
void update_precise_survey()
{
int color;
int plotted;
int i;

   plotted = 0;
   color = precision_samples / (60L*60L);
   color %= 12;

   if(precision_survey || check_precise_posn || show_fixes) {  // plot the points
      if((gps_status == GPS_FIXES) && plot_lla) {  // plot data
         plot_lla_point(1, color+3);
         plotted = 1;
      }
   }
   if(plotted == 0) { // just add point to lla map buffer
      plot_lla_point(0, color+3);
   }

   if(precision_survey) {
      i = add_survey_point();
      if(i) {                      // precision survey has completed
         stop_precision_survey(1); // stop doing the precison survey
         analyze_hours();          // analyze the hourly data
         calc_precise_lla();       // figure up where we are
      }
   }
   else {
      if(show_fixes) ++precision_samples;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x23d422(%rip), %rbx    # 0x33b2e4
movl (%rbx), %eax
movl $0x91a2b3c5, %esi       # imm = 0x91A2B3C5
imulq %rax, %rsi
shrq $0x2b, %rsi
imulq $0x15555556, %rsi, %rax # imm = 0x15555556
shrq $0x20, %rax
shll $0x2, %eax
leal (%rax,%rax,2), %eax
subl %eax, %esi
leaq 0x20ffad(%rip), %r15    # 0x30de98
cmpb $0x0, (%r15)
leaq 0x23d3de(%rip), %r14    # 0x33b2d4
jne 0xfdf0e
leaq 0x23d3e1(%rip), %rax    # 0x33b2e0
cmpb $0x0, (%rax)
jne 0xfdf0e
cmpb $0x0, (%r14)
jne 0xfdf0e
xorl %edi, %edi
jmp 0xfdf2b
leaq 0x20f587(%rip), %rax    # 0x30d49c
cmpl $0x0, (%rax)
jne 0xfdf0a
leaq 0x23d38f(%rip), %rax    # 0x33b2b0
movl $0x1, %edi
cmpb $0x0, (%rax)
je 0xfdf0a
addl $0x3, %esi
callq 0xdb67a
cmpb $0x0, (%r15)
je 0xfdf60
callq 0xfdc76
testl %eax, %eax
je 0xfdf68
movl $0x1, %edi
callq 0xfb285
callq 0xfcfd7
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xfc809
cmpb $0x0, (%r14)
je 0xfdf68
incl (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq