LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: get_next_tsip_byte()
unsigned get_next_tsip_byte()
{
u16 c;

   if(1 && early_end) {  // we are skipping message data
      if(log_comments && (log_stream & LOG_HEX_STREAM) && log_file) {
         fprintf(log_file, "[%04X]", early_end);
         if(log_flush_mode) fflush(log_file);
      }
      return early_end;
   }

   c = get_next_tsip();  // get next data stream element
   if(c & 0xFF00) {      // we saw something that was not expected
      if(log_comments && (log_stream & LOG_HEX_STREAM) && log_file) {
         fprintf(log_file, "<%04X>", c);
         if(log_flush_mode) fflush(log_file);
      }
      early_end = c;
   }
   return c;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movzwl 0x3135e1(%rip), %edx    # 0x36bdc0
testl %edx, %edx
je 0x5883b
leaq 0x1e5c2a(%rip), %rax    # 0x23e414
cmpb $0x0, (%rax)
je 0x5882f
leaq 0x1e5c1a(%rip), %rax    # 0x23e410
leaq 0x1e5b63(%rip), %rbx    # 0x23e360
movq (%rbx), %rdi
testq %rdi, %rdi
setne %cl
andb (%rax), %cl
cmpb $0x1, %cl
jne 0x5882f
leaq 0xc78c3(%rip), %rsi     # 0x1200d7
xorl %eax, %eax
callq 0x9560
leaq 0x1e5bfe(%rip), %rax    # 0x23e420
cmpl $0x0, (%rax)
je 0x5882f
movq (%rbx), %rdi
callq 0x9420
movzwl 0x31358a(%rip), %ebx    # 0x36bdc0
jmp 0x588cd
movw $0x0, 0x31357c(%rip)    # 0x36bdc0
leaq 0x2dfa09(%rip), %rcx    # 0x338254
movzwl (%rcx), %eax
leaq 0x2df9fd(%rip), %rdx    # 0x338252
movl $0x2000, %ebx           # imm = 0x2000
cmpw (%rdx), %ax
jae 0x58870
leal 0x1(%rax), %edx
movw %dx, (%rcx)
leaq 0x2de9e4(%rip), %rcx    # 0x337250
movzbl (%rcx,%rax), %ebx
cmpl $0x100, %ebx            # imm = 0x100
jb 0x588cd
leaq 0x1e5b95(%rip), %rax    # 0x23e414
cmpb $0x0, (%rax)
je 0x588c6
leaq 0x1e5b85(%rip), %rax    # 0x23e410
leaq 0x1e5ace(%rip), %r14    # 0x23e360
movq (%r14), %rdi
testq %rdi, %rdi
setne %cl
andb (%rax), %cl
cmpb $0x1, %cl
jne 0x588c6
leaq 0xc7835(%rip), %rsi     # 0x1200de
movl %ebx, %edx
xorl %eax, %eax
callq 0x9560
leaq 0x1e5b67(%rip), %rax    # 0x23e420
cmpl $0x0, (%rax)
je 0x588c6
movq (%r14), %rdi
callq 0x9420
movw %bx, 0x3134f3(%rip)     # 0x36bdc0
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: tsip_word()
u16 tsip_word()   /* get next two byte (word) field from binary message */
{
u08 i;
u08 word[2];
u16 c;

   for(i=0; i<2; i++) {
      c = get_next_tsip_byte();
      if(c & 0xFF00) tsip_error |= WORD_ERROR; 
      if(ENDIAN) word[i] = (u08) c;
      else       word[1-i] = (u08) c;
   }
   return * ((u16 *) (void *) &word[0]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl $0x1, %ebx
xorl %r14d, %r14d
leaq 0x1bfec6(%rip), %r15    # 0x2187d4
leaq 0x1e665b(%rip), %r12    # 0x23ef70
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x58926
orb $0x10, (%r12)
cmpb $0x0, (%r15)
movq %r14, %rcx
cmoveq %rbx, %rcx
movb %al, -0x22(%rbp,%rcx)
incq %r14
decq %rbx
cmpq $0x1, %r14
je 0x58915
movzwl -0x22(%rbp), %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: tsip_tbyte()
u32 tsip_tbyte()   /* get next 3 byte field from binary message */
{
u08 i;
u08 word[3];
u16 c;

   for(i=0; i<3; i++) {
      c = get_next_tsip_byte();
      if(c & 0xFF00) tsip_error |= DWORD_ERROR;
      if(ENDIAN) word[i] = (u08) c;
      else       word[2-i] = (u08) c;
   }
   return * ((u32 *) (void *) &word[0]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl $0x2, %ebx
xorl %r14d, %r14d
leaq 0x1bfe64(%rip), %r15    # 0x2187d4
leaq 0x1e65f9(%rip), %r12    # 0x23ef70
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x58988
orb $0x20, (%r12)
cmpb $0x0, (%r15)
movq %r14, %rcx
cmoveq %rbx, %rcx
movb %al, -0x23(%rbp,%rcx)
incq %r14
addq $-0x1, %rbx
jb 0x58977
movl -0x23(%rbp), %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: tsip_dword()
u32 tsip_dword()   /* get next dword field from binary message */
{
u08 i;
u08 word[4];
u16 c;

   for(i=0; i<4; i++) {
      c = get_next_tsip_byte();
      if(c & 0xFF00) tsip_error |= DWORD_ERROR;
      if(ENDIAN) word[i] = (u08) c;
      else       word[3-i] = (u08) c;
   }
   return * ((u32 *) (void *) &word[0]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl $0x3, %ebx
xorl %r14d, %r14d
leaq 0x1bfe06(%rip), %r15    # 0x2187d4
leaq 0x1e659b(%rip), %r12    # 0x23ef70
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x589e6
orb $0x20, (%r12)
cmpb $0x0, (%r15)
movq %r14, %rcx
cmoveq %rbx, %rcx
movb %al, -0x24(%rbp,%rcx)
incq %r14
addq $-0x1, %rbx
jb 0x589d5
movl -0x24(%rbp), %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: tsip_tword()
u48 tsip_tword()   /* get next tword field (48 bit) from binary message */
{
u08 i;
u08 word[3];
u16 c;

   for(i=0; i<3; i++) {
      c = get_next_tsip_byte();
      if(c & 0xFF00) tsip_error |= TWORD_ERROR;
      if(ENDIAN) word[i] = (u08) c;
      else       word[2-i] = (u08) c;
   }
   return * ((u48 *) (void *) &word[0]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl $0x2, %ebx
xorl %r14d, %r14d
leaq 0x1bfda8(%rip), %r15    # 0x2187d4
leaq 0x1e653d(%rip), %r12    # 0x23ef70
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x58a45
orb $0x1, 0x1(%r12)
cmpb $0x0, (%r15)
movq %r14, %rcx
cmoveq %rbx, %rcx
movb %al, -0x23(%rbp,%rcx)
incq %r14
addq $-0x1, %rbx
jb 0x58a33
movq -0x23(%rbp), %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: check_float(float)
float check_float(float val) 
{
   // validate a float as being resonable

   if(val != val) {
      tsip_error |= NAN_ERROR;
      return 0.0F;  // kludgy NAN check
   }
   if(val > 1.0E30F) {
      tsip_error |= RANGE_ERROR;
      return 1.0E30F;        // prevent run-away printf's
   }
   if(val < (-1.0E30F)) {
      tsip_error |= RANGE_ERROR;
      return (-1.0E30F);
   }
   return val;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
ucomiss %xmm0, %xmm0
jp 0x58aa4
movss 0xc5ef1(%rip), %xmm1    # 0x11e970
movl $0x800, %eax            # imm = 0x800
ucomiss %xmm1, %xmm0
ja 0x58a96
movss 0xc5ee3(%rip), %xmm1    # 0x11e974
ucomiss %xmm0, %xmm1
jbe 0x58aa2
leaq 0x1e64d3(%rip), %rcx    # 0x23ef70
orl %eax, (%rcx)
movaps %xmm1, %xmm0
popq %rbp
retq
xorps %xmm1, %xmm1
movl $0x400, %eax            # imm = 0x400
jmp 0x58a96
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: tsip_single()
float tsip_single()   /* get next four byte floating number from binary message */
{
u08 i;
u08 word[4];
u16 c;
float val;

   for(i=0; i<4; i++) {
      c = get_next_tsip_byte();
      if(c & 0xFF00) tsip_error |= FLOAT_ERROR;
      if(ENDIAN) word[i] = (u08) c;
      else       word[3-i] = (u08) c;
   }

   val = (* ((float *) (void *) &word[0]));
   val = check_float(val);   // checks for NAN's
   return val;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl $0x3, %r14d
xorl %r15d, %r15d
leaq 0x1bfd07(%rip), %r12    # 0x2187d4
leaq 0x1e649c(%rip), %rbx    # 0x23ef70
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x58ae3
orb $0x40, (%rbx)
cmpb $0x0, (%r12)
movq %r15, %rcx
cmoveq %r14, %rcx
movb %al, -0x24(%rbp,%rcx)
incq %r15
addq $-0x1, %r14
jb 0x58ad4
movss -0x24(%rbp), %xmm0
ucomiss %xmm0, %xmm0
jp 0x58b37
movss 0xc5e62(%rip), %xmm1    # 0x11e970
movl $0x800, %eax            # imm = 0x800
ucomiss %xmm1, %xmm0
ja 0x58b25
movss 0xc5e54(%rip), %xmm1    # 0x11e974
ucomiss %xmm0, %xmm1
jbe 0x58b2a
orl %eax, (%rbx)
movaps %xmm1, %xmm0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorps %xmm1, %xmm1
movl $0x400, %eax            # imm = 0x400
jmp 0x58b25
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: check_double(double)
double check_double(double val) 
{
   // validate a double as being resonable

   if(val != val) {
      tsip_error |= NAN_ERROR;
      return 0.0;  // kludgy NAN check
   }
   if(val > 1.0E30) {
      tsip_error |= RANGE_ERROR;
      return 1.0E30;        // prevent runaway printf's
   }
   if(val < (-1.0E30)) {
      tsip_error |= RANGE_ERROR;
      return (-1.0E30);
   }
   return val;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
ucomisd %xmm0, %xmm0
jp 0x58b7b
movsd 0xc5525(%rip), %xmm1    # 0x11e078
movl $0x800, %eax            # imm = 0x800
ucomisd %xmm1, %xmm0
ja 0x58b6c
movsd 0xc551a(%rip), %xmm1    # 0x11e080
ucomisd %xmm0, %xmm1
jbe 0x58b79
leaq 0x1e63fd(%rip), %rcx    # 0x23ef70
orl %eax, (%rcx)
movapd %xmm1, %xmm0
popq %rbp
retq
xorpd %xmm1, %xmm1
movl $0x400, %eax            # imm = 0x400
jmp 0x58b6c
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: tsip_double()
double tsip_double()   /* get next eight byte floating number from binary message */
{
u08 i;
u08 word[8];
u16 c;
double val;

   for(i=0; i<8; i++) {
      c = get_next_tsip_byte();
      if(c & 0xFF00) tsip_error |= DOUBLE_ERROR;
      if(ENDIAN) word[i] = (u08) c;
      else       word[7-i] = (u08) c;
   }

   val = (* ((double *) (void *) &word[0]));
   val = check_double(val);   // checks for NAN's, etc
   return val;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl $0x7, %r14d
xorl %r15d, %r15d
leaq 0x1bfc2f(%rip), %r12    # 0x2187d4
leaq 0x1e63c4(%rip), %rbx    # 0x23ef70
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x58bbb
orb $-0x80, (%rbx)
cmpb $0x0, (%r12)
movq %r15, %rcx
cmoveq %r14, %rcx
movb %al, -0x28(%rbp,%rcx)
incq %r15
addq $-0x1, %r14
jb 0x58bac
movsd -0x28(%rbp), %xmm0
ucomisd %xmm0, %xmm0
jp 0x58c13
movsd 0xc5491(%rip), %xmm1    # 0x11e078
movl $0x800, %eax            # imm = 0x800
ucomisd %xmm1, %xmm0
ja 0x58c00
movsd 0xc5486(%rip), %xmm1    # 0x11e080
ucomisd %xmm0, %xmm1
jbe 0x58c06
orl %eax, (%rbx)
movapd %xmm1, %xmm0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
xorpd %xmm1, %xmm1
movl $0x400, %eax            # imm = 0x400
jmp 0x58c00
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: tsip_string(char*, int)
void tsip_string(char *s, int len)
{
int i;

   // get a 'len" byte string into 's'.  Terminate string with a 0 byte

   if(s == 0) return;

   i = 0;
   s[i] = 0;
   if(len < 0) return;

   while(len--) {
      s[i++] = tsip_byte();
      s[i] = 0;
   }
}

// Assembly:
testq %rdi, %rdi
je 0x58e76
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movb $0x0, (%rdi)
testl %esi, %esi
jle 0x58e6e
movl %esi, %r14d
xorl %r12d, %r12d
leaq 0x1e6129(%rip), %r15    # 0x23ef70
callq 0x587d1
cmpl $0x100, %eax            # imm = 0x100
jb 0x58e57
orb $0x8, (%r15)
movb %al, (%rbx,%r12)
movb $0x0, 0x1(%rbx,%r12)
leaq 0x1(%r12), %rax
movq %rax, %r12
cmpl %eax, %r14d
jne 0x58e47
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: log_packet_id(char*)
void log_packet_id(char *s)
{
   if((log_stream & LOG_PACKET_ID) || (zoom_screen == 'H')) {
      if(HEX_PACKET_IDS) {
         if(s) strcpy(packet_id, s);
         else  strcpy(packet_id, "{null packet id string}\n");
      }
      else if(s) {
         if(log_file) fprintf(log_file, "   {%s}\n", s);
      }
      else {
         if(log_file) fprintf(log_file, "   {null packet id string}\n");
      }
      if(log_flush_mode && log_file) fflush(log_file);
   }
}

// Assembly:
movq %rdi, %rdx
leaq 0x1e558f(%rip), %rax    # 0x23e410
testb $0x2, (%rax)
jne 0x58e96
leaq 0x2b391b(%rip), %rax    # 0x30c7a8
cmpb $0x48, (%rax)
jne 0x58f4f
pushq %rbp
movq %rsp, %rbp
leaq 0x1bfa2f(%rip), %rax    # 0x2188d0
movabsq $0x1b197411ff, %rcx     # imm = 0x1B197411FF
testq %rcx, (%rax)
je 0x58ec6
testq %rdx, %rdx
je 0x58eed
leaq 0x312de4(%rip), %rdi    # 0x36bca0
movq %rdx, %rsi
callq 0x9340
jmp 0x58f26
leaq 0x1e5493(%rip), %rax    # 0x23e360
movq (%rax), %rcx
testq %rdx, %rdx
je 0x58f0b
testq %rcx, %rcx
je 0x58f26
leaq 0xc71e7(%rip), %rsi     # 0x1200c8
movq %rcx, %rdi
xorl %eax, %eax
callq 0x9560
jmp 0x58f26
movups 0xc71fd(%rip), %xmm0    # 0x1200f1
movups %xmm0, 0x312dae(%rip)   # 0x36bca9
movups 0xc71e6(%rip), %xmm0    # 0x1200e8
movaps %xmm0, 0x312d97(%rip)   # 0x36bca0
jmp 0x58f26
testq %rcx, %rcx
je 0x58f26
leaq 0xc71ce(%rip), %rdi     # 0x1200e5
movl $0x1b, %esi
movl $0x1, %edx
callq 0x9750
leaq 0x1e54f3(%rip), %rax    # 0x23e420
cmpl $0x0, (%rax)
setne %al
leaq 0x1e5426(%rip), %rcx    # 0x23e360
movq (%rcx), %rdi
testq %rdi, %rdi
setne %cl
andb %al, %cl
cmpb $0x1, %cl
popq %rbp
je 0x9420
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: average_dop()
DATA_SIZE average_dop()
{
DATA_SIZE dop, div;

   // returns the average of all dop values
   // (this should probably be a geometric average or maybe an AGM average !!!!!)

   dop = 0.0;
   div = 0.0;

   if((have_dops & TDOP) && tdop) { dop += tdop; ++div; }
   if((have_dops & HDOP) && hdop) { dop += hdop; ++div; }
   if((have_dops & VDOP) && vdop) { dop += vdop; ++div; }
   if((have_dops & PDOP) && pdop) { dop += pdop; ++div; }
   if((have_dops & GDOP) && gdop) { dop += gdop; ++div; }
   if((have_dops & EDOP) && edop) { dop += edop; ++div; }
   if((have_dops & NDOP) && ndop) { dop += ndop; ++div; }
   if((have_dops & XDOP) && xdop) { dop += xdop; ++div; }
   if((have_dops & YDOP) && ydop) { dop += ydop; ++div; }
   if(div) dop /= div;

   avg_dop = dop;
   return dop;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x1c9fc0(%rip), %rax    # 0x2234e4
movl (%rax), %eax
movl %eax, %ecx
shrb $0x4, %cl
leaq 0x1c9fd6(%rip), %rdx    # 0x223508
movsd (%rdx), %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
setp %dl
setne %sil
orb %dl, %sil
testb %sil, %cl
jne 0x59553
xorpd %xmm1, %xmm1
jmp 0x59557
addsd %xmm0, %xmm1
movsd 0xafb11(%rip), %xmm3    # 0x109070
movapd %xmm3, %xmm2
jne 0x59569
xorpd %xmm2, %xmm2
movl %eax, %ecx
shrb %cl
leaq 0x1c9f7c(%rip), %rdx    # 0x2234f0
movsd (%rdx), %xmm4
ucomisd %xmm0, %xmm4
setp %dl
setne %sil
orb %dl, %sil
testb %sil, %cl
je 0x59593
addsd %xmm4, %xmm1
addsd %xmm3, %xmm2
movl %eax, %ecx
shrb $0x2, %cl
leaq 0x1c9f59(%rip), %rdx    # 0x2234f8
movsd (%rdx), %xmm4
ucomisd %xmm0, %xmm4
setp %dl
setne %sil
orb %dl, %sil
testb %sil, %cl
je 0x595be
addsd %xmm4, %xmm1
addsd %xmm3, %xmm2
leaq 0x1c9f23(%rip), %rcx    # 0x2234e8
movsd (%rcx), %xmm4
ucomisd %xmm0, %xmm4
setp %cl
setne %dl
orb %cl, %dl
testb %dl, %al
je 0x595e1
addsd %xmm4, %xmm1
addsd %xmm3, %xmm2
movl %eax, %ecx
shrb $0x3, %cl
leaq 0x1c9f13(%rip), %rdx    # 0x223500
movsd (%rdx), %xmm4
ucomisd %xmm0, %xmm4
setp %dl
setne %sil
orb %dl, %sil
testb %sil, %cl
je 0x5960c
addsd %xmm4, %xmm1
addsd %xmm3, %xmm2
movl %eax, %ecx
shrb $0x6, %cl
leaq 0x1c9f00(%rip), %rdx    # 0x223518
movsd (%rdx), %xmm4
ucomisd %xmm0, %xmm4
setp %dl
setne %sil
orb %dl, %sil
testb %sil, %cl
je 0x59637
addsd %xmm4, %xmm1
addsd %xmm3, %xmm2
movl %eax, %ecx
shrb $0x5, %cl
leaq 0x1c9ecd(%rip), %rdx    # 0x223510
movsd (%rdx), %xmm4
ucomisd %xmm0, %xmm4
setp %dl
setne %sil
orb %dl, %sil
testb %sil, %cl
je 0x59662
addsd %xmm4, %xmm1
addsd %xmm3, %xmm2
testb %al, %al
sets %cl
leaq 0x1c9eb2(%rip), %rdx    # 0x223520
movsd (%rdx), %xmm4
ucomisd %xmm0, %xmm4
setp %dl
setne %sil
orb %dl, %sil
testb %sil, %cl
je 0x5968d
addsd %xmm4, %xmm1
addsd %xmm3, %xmm2
shrl $0x8, %eax
leaq 0x1c9e91(%rip), %rcx    # 0x223528
movsd (%rcx), %xmm4
ucomisd %xmm0, %xmm4
setp %cl
setne %dl
orb %cl, %dl
testb %dl, %al
je 0x596b3
addsd %xmm4, %xmm1
addsd %xmm3, %xmm2
movapd %xmm1, %xmm3
divsd %xmm2, %xmm3
cmpneqsd %xmm2, %xmm0
andpd %xmm0, %xmm3
andnpd %xmm1, %xmm0
orpd %xmm3, %xmm0
leaq 0x1c9e5d(%rip), %rax    # 0x223530
movlpd %xmm0, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: echo_nmea_string(char*)
void echo_nmea_string(char *ss)
{
u08 cksum;
char buf[2048+1];
unsigned i;

   // send a NMEA command out the NMEA_PORT.  Leading '$' and checksum are added.

   if(ss == 0) return;
   strcpy(buf,ss);

   sendout(NMEA_PORT, '$', ADD_CHAR);
   cksum = 0;

   for(i=0; i<strlen(buf); i++) {
      sendout(NMEA_PORT, buf[i], ADD_CHAR);
      cksum ^= buf[i];
   }

   sendout(NMEA_PORT, '*', ADD_CHAR);  
   i = (cksum >> 4) & 0x0F;
   if(i > 9) i += ('A'-10);
   else      i += '0';
   sendout(NMEA_PORT, (u08) i, ADD_CHAR);  
   i = cksum & 0x0F;
   if(i > 9) i += ('A'-10);
   else      i += '0';
   sendout(NMEA_PORT, (u08) i, ADD_CHAR);  

   sendout(NMEA_PORT, 0x0D, ADD_CHAR);
   sendout(NMEA_PORT, 0x0A, EOM);

   drain_port(NMEA_PORT);   // we ignore any data comming in the NMEA echo port

// if(debug_file) fprintf(debug_file, "echo nmea:%s\n", s);
}

// Assembly:
testq %rdi, %rdi
je 0x59806
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x810, %rsp            # imm = 0x810
movq %rdi, %rsi
leaq -0x830(%rbp), %rbx
movq %rbx, %rdi
callq 0x9340
xorl %r14d, %r14d
movl $0xc, %edi
movl $0x24, %esi
xorl %edx, %edx
callq 0xbcc0
cmpb $0x0, (%rbx)
je 0x5977b
movl $0x1, %r15d
xorl %r12d, %r12d
xorl %r14d, %r14d
movzbl -0x830(%rbp,%r12), %esi
movl $0xc, %edi
xorl %edx, %edx
callq 0xbcc0
xorb -0x830(%rbp,%r12), %r14b
movl %r15d, %r12d
movq %rbx, %rdi
callq 0x9120
incl %r15d
cmpq %r12, %rax
ja 0x5974b
movl $0xc, %edi
movl $0x2a, %esi
xorl %edx, %edx
callq 0xbcc0
movzbl %r14b, %ebx
movl %ebx, %esi
shrl $0x4, %esi
leal 0x37(%rsi), %eax
orl $0x30, %esi
cmpb $-0x60, %bl
cmovael %eax, %esi
movl $0xc, %edi
xorl %edx, %edx
callq 0xbcc0
andl $0xf, %ebx
leal 0x37(%rbx), %eax
leal 0x30(%rbx), %esi
cmpl $0xa, %ebx
cmovael %eax, %esi
movl $0xc, %edi
xorl %edx, %edx
callq 0xbcc0
movl $0xc, %edi
movl $0xd, %esi
xorl %edx, %edx
callq 0xbcc0
movl $0xc, %edi
movl $0xa, %esi
movl $0x1, %edx
callq 0xbcc0
movl $0xc, %edi
callq 0x5804f
addq $0x810, %rsp            # imm = 0x810
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: nmea_time()
double nmea_time()
{
double time;

   // return UTC time as a floating point number

//   gregorian(0, jd_utc);
   time = ((double) g_hours) * 100 * 100.0;
   time += ((double) g_minutes) * 100.0;
   time += ((double) g_seconds);
   time += g_frac;

   return time;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x2b3e96(%rip), %rax    # 0x30d6a8
cvtsi2sdl (%rax), %xmm0
movsd 0xaf842(%rip), %xmm1    # 0x109060
mulsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
leaq 0x2b3e7f(%rip), %rax    # 0x30d6ac
cvtsi2sdl (%rax), %xmm2
mulsd %xmm1, %xmm2
addsd %xmm0, %xmm2
leaq 0x2b3e70(%rip), %rax    # 0x30d6b0
xorps %xmm0, %xmm0
cvtsi2sdl (%rax), %xmm0
addsd %xmm2, %xmm0
leaq 0x2b3e66(%rip), %rax    # 0x30d6b8
addsd (%rax), %xmm0
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: nmea_date()
int nmea_date()
{
int date;

   // return date as an integer (year modulo 100)

   date = g_day * 100 * 100;
   date += g_month * 100;
   date += (g_year % 100);

   return date;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x2b3e3d(%rip), %rax    # 0x30d6a0
imull $0x2710, (%rax), %eax   # imm = 0x2710
leaq 0x2b3e2c(%rip), %rcx    # 0x30d69c
imull $0x64, (%rcx), %ecx
addl %eax, %ecx
leaq 0x2b3e28(%rip), %rax    # 0x30d6a4
movslq (%rax), %rax
imulq $0x51eb851f, %rax, %rdx # imm = 0x51EB851F
movq %rdx, %rsi
shrq $0x3f, %rsi
sarq $0x25, %rdx
addl %esi, %edx
imull $0x64, %edx, %edx
subl %edx, %eax
addl %ecx, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: nmea_lat()
char *nmea_lat()
{
static char s[256];
double val;
int deg;
char c;

   // return latitude as a NMEA format string

   if(lat < 0.0) c = 'S';
   else          c = 'N';

   val = fabs(lat) * 180.0 / PI;
   deg = (int) val;
   val -= (double) deg;        // fractional degrees
   val *= 60.0;                // fractional minutes
   val += (double) (deg*100);  // NMEA location

   s[0] = 0;
   if(echo_fmt & ECHO_LLA) sprintf(s, "%.4f,%c", val,c);
   else                    sprintf(s, "%.3f,%c", val,c);
   return &s[0];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x2b3727(%rip), %rax    # 0x30cfd0
movsd (%rax), %xmm1
xorpd %xmm0, %xmm0
xorl %eax, %eax
ucomisd %xmm1, %xmm0
seta %al
andpd 0xaf8be(%rip), %xmm1    # 0x109180
mulsd 0xb1f56(%rip), %xmm1    # 0x10b820
divsd 0xb1f46(%rip), %xmm1    # 0x10b818
cvttsd2si %xmm1, %ecx
cvttpd2dq %xmm1, %xmm0
cvtdq2pd %xmm0, %xmm0
leal (%rax,%rax,4), %edx
addl $0x4e, %edx
subsd %xmm0, %xmm1
mulsd 0xaf718(%rip), %xmm1    # 0x109008
imull $0x64, %ecx, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
addsd %xmm1, %xmm0
movb $0x0, 0x31671b(%rip)    # 0x370020
leaq 0x316714(%rip), %rbx    # 0x370020
cmpb $0x0, 0x110c6d(%rip)    # 0x16a580
leaq 0xc6870(%rip), %rax     # 0x12018a
leaq 0xc6861(%rip), %rsi     # 0x120182
cmovnsq %rax, %rsi
movq %rbx, %rdi
movb $0x1, %al
callq 0x9060
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: nmea_lon()
char *nmea_lon()
{
static char s[256];
double val;
int deg;
char c;

   // return longitude as a NMEA format string

   s[0] = 0;
   if(lon < 0.0) c = 'W';
   else          c = 'E';

   val = fabs(lon) * 180.0 / PI;
   deg = (int) val;
   val -= (double) deg;        // fractional degrees
   val *= 60.0;                // fractional minutes
   val += (double) (deg*100);  // NMEA location
   

   if(echo_fmt & ECHO_LLA) sprintf(s, "%.4f,%c", val,c);
   else                    sprintf(s, "%.3f,%c", val,c);
   return &s[0];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x2b3692(%rip), %rax    # 0x30cfd8
movsd (%rax), %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm1, %xmm0
movl $0x57, %eax
movl $0x45, %edx
cmoval %eax, %edx
andpd 0xaf819(%rip), %xmm1    # 0x109180
mulsd 0xb1eb1(%rip), %xmm1    # 0x10b820
divsd 0xb1ea1(%rip), %xmm1    # 0x10b818
cvttsd2si %xmm1, %eax
cvttpd2dq %xmm1, %xmm0
cvtdq2pd %xmm0, %xmm0
subsd %xmm0, %xmm1
mulsd 0xaf679(%rip), %xmm1    # 0x109008
movb $0x0, 0x31678a(%rip)    # 0x370120
imull $0x64, %eax, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
leaq 0x316779(%rip), %rbx    # 0x370120
addsd %xmm1, %xmm0
cmpb $0x0, 0x110bce(%rip)    # 0x16a580
leaq 0xc67d1(%rip), %rax     # 0x12018a
leaq 0xc67c2(%rip), %rsi     # 0x120182
cmovnsq %rax, %rsi
movq %rbx, %rdi
movb $0x1, %al
callq 0x9060
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: nmea_speed()
char *nmea_speed()
{
static char s[256];

   // return speed as a NMEA format string

   s[0] = 0;
   if(have_speed) {
      sprintf(s, "%.2f", speed / 0.514444);
   }
   return &s[0];
}

// Assembly:
movb $0x0, 0x316902(%rip)    # 0x370320
leaq 0x2b3913(%rip), %rax    # 0x30d338
cmpl $0x0, (%rax)
je 0x59a57
pushq %rbp
movq %rsp, %rbp
leaq 0x2b35eb(%rip), %rax    # 0x30d020
movsd (%rax), %xmm0
divsd 0xc4647(%rip), %xmm0    # 0x11e088
leaq 0x3168d8(%rip), %rdi    # 0x370320
leaq 0xca41d(%rip), %rsi     # 0x123e6c
movb $0x1, %al
callq 0x9060
popq %rbp
leaq 0x3168c2(%rip), %rax    # 0x370320
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: nmea_heading()
char *nmea_heading()
{
static char s[256];

   // return heading as a NMEA format string

   s[0] = 0;
   if(have_heading) {
      sprintf(s, "%.2f", heading);
   }
   return &s[0];
}

// Assembly:
movb $0x0, 0x3169ba(%rip)    # 0x370420
leaq 0x2b38c7(%rip), %rax    # 0x30d334
cmpl $0x0, (%rax)
je 0x59a97
pushq %rbp
movq %rsp, %rbp
leaq 0x2b35ab(%rip), %rax    # 0x30d028
movsd (%rax), %xmm0
leaq 0x316998(%rip), %rdi    # 0x370420
leaq 0xca3dd(%rip), %rsi     # 0x123e6c
movb $0x1, %al
callq 0x9060
popq %rbp
leaq 0x316982(%rip), %rax    # 0x370420
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: send_zda()
void send_zda()
{
   // send time/date as a NMEA GPZDA sentence
   
//   gregorian(0, jd_utc);

   if     (echo_fmt & ECHO_MSECS) sprintf(out, "GPZDA,%010.3f,%02d,%02d,%04d,00,00", nmea_time(), g_day,g_month,g_year);
   else if(echo_fmt & ECHO_HSECS) sprintf(out, "GPZDA,%09.2f,%02d,%02d,%04d,00,00", nmea_time(), g_day,g_month,g_year);
   else                           sprintf(out, "GPZDA,%06d,%02d,%02d,%04d,00,00", (int)nmea_time(), g_day,g_month,g_year);
   echo_nmea_string(out);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x110ad7(%rip), %eax    # 0x16a580
testb $0x4, %al
jne 0x59b3f
leaq 0x2b3bf0(%rip), %rcx    # 0x30d6a8
cvtsi2sdl (%rcx), %xmm0
movsd 0xaf59c(%rip), %xmm1    # 0x109060
mulsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
leaq 0x2b3bd9(%rip), %rcx    # 0x30d6ac
cvtsi2sdl (%rcx), %xmm2
mulsd %xmm1, %xmm2
addsd %xmm0, %xmm2
leaq 0x2b3bca(%rip), %rcx    # 0x30d6b0
xorps %xmm0, %xmm0
cvtsi2sdl (%rcx), %xmm0
addsd %xmm2, %xmm0
leaq 0x2b3bc0(%rip), %rcx    # 0x30d6b8
addsd (%rcx), %xmm0
testb $0x2, %al
jne 0x59bb6
cvttsd2si %xmm0, %edx
leaq 0x2b3b91(%rip), %rax    # 0x30d6a0
movl (%rax), %ecx
leaq 0x2b3b84(%rip), %rax    # 0x30d69c
movl (%rax), %r8d
leaq 0x2b3b82(%rip), %rax    # 0x30d6a4
movl (%rax), %r9d
leaq 0x2e26f4(%rip), %rdi    # 0x33c220
leaq 0xc66ac(%rip), %rsi     # 0x1201df
xorl %eax, %eax
callq 0x9060
jmp 0x59be7
leaq 0x2b3b62(%rip), %rax    # 0x30d6a8
cvtsi2sdl (%rax), %xmm0
movsd 0xaf50e(%rip), %xmm1    # 0x109060
mulsd %xmm1, %xmm0
leaq 0x2b3b4f(%rip), %rax    # 0x30d6ac
cvtsi2sdl (%rax), %xmm2
mulsd %xmm1, %xmm0
mulsd %xmm1, %xmm2
addsd %xmm0, %xmm2
leaq 0x2b3b3c(%rip), %rax    # 0x30d6b0
xorps %xmm0, %xmm0
cvtsi2sdl (%rax), %xmm0
addsd %xmm2, %xmm0
leaq 0x2b3b32(%rip), %rax    # 0x30d6b8
addsd (%rax), %xmm0
leaq 0x2b3b0f(%rip), %rax    # 0x30d6a0
movl (%rax), %edx
leaq 0x2b3b02(%rip), %rax    # 0x30d69c
movl (%rax), %ecx
leaq 0x2b3b01(%rip), %rax    # 0x30d6a4
movl (%rax), %r8d
leaq 0x2e2673(%rip), %rdi    # 0x33c220
leaq 0xc65e6(%rip), %rsi     # 0x12019a
jmp 0x59be0
leaq 0x2b3ae3(%rip), %rax    # 0x30d6a0
movl (%rax), %edx
leaq 0x2b3ad6(%rip), %rax    # 0x30d69c
movl (%rax), %ecx
leaq 0x2b3ad5(%rip), %rax    # 0x30d6a4
movl (%rax), %r8d
leaq 0x2e2647(%rip), %rdi    # 0x33c220
leaq 0xc65dd(%rip), %rsi     # 0x1201bd
movb $0x1, %al
callq 0x9060
leaq 0x2e2632(%rip), %rdi    # 0x33c220
popq %rbp
jmp 0x596f9
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: echo_nmea()
void echo_nmea()
{
int last_sec = 99;

   // send receiver data formmated as NMEA to the NMEA_PORT

   if(com[NMEA_PORT].process_com == 0) return;  // NMEA_PORT not open
   if(com[NMEA_PORT].com_running <= 0) return;
//ffff if(fake_time_stamp) return;   // don't echo faked time stamps so NTP works better?

   gregorian(0, jd_utc + jtime(0,0,0,TSX_TWEAK));

   if(echo_fmt & ECHO_ZDA) send_zda();
   if(echo_fmt & ECHO_VTG) send_vtg();  // we don't do this one for now
   if(echo_fmt & ECHO_RMC) send_rmc();
   if(echo_fmt & ECHO_GGA) send_gga();


   if(POLLED_RCVR) {
      if(g_seconds == (SCPI_STATUS_SECOND+10)) {
         if(echo_fmt & ECHO_GSA) send_gsa();
         if(echo_fmt & ECHO_GSV) send_gsv();
      }
   }
   else if((g_seconds % 10) == (SCPI_STATUS_SECOND%10)) {
      if(echo_fmt & ECHO_GSA) send_gsa();
      if(echo_fmt & ECHO_GSV) send_gsv();
   }

   last_sec = g_seconds;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x2b3c37(%rip), %rax    # 0x30e2e0
cmpl $0x0, 0x1beb4(%rax)
je 0x5a787
cmpl $0x0, 0x1beb0(%rax)
jle 0x5a787
leaq 0x2b2e66(%rip), %rax    # 0x30d530
movsd (%rax), %xmm0
movsd %xmm0, -0x8(%rbp)
leaq 0x2b37ee(%rip), %rax    # 0x30dec8
movsd (%rax), %xmm0
divsd 0xae952(%rip), %xmm0    # 0x109038
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0xd41e0
addsd -0x8(%rbp), %xmm0
xorl %edi, %edi
callq 0xd0c46
testb $0x1, 0x10fe7d(%rip)    # 0x16a581
je 0x5a70b
callq 0x59a9f
testb $0x4, 0x10fe6f(%rip)    # 0x16a581
je 0x5a719
callq 0x59bf4
testb $0x8, 0x10fe61(%rip)    # 0x16a581
je 0x5a727
callq 0x5a001
leaq 0x1be1a2(%rip), %rcx    # 0x2188d0
movabsq $0x101b0e5018, %rdx     # imm = 0x101B0E5018
leaq 0x2b2f71(%rip), %rax    # 0x30d6b0
movl (%rax), %eax
testq %rdx, (%rcx)
je 0x5a74d
cmpl $0x2a, %eax
je 0x5a770
jmp 0x5a787
movslq %eax, %rcx
imulq $0x66666667, %rcx, %rcx # imm = 0x66666667
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x22, %rcx
addl %edx, %ecx
addl %ecx, %ecx
leal (%rcx,%rcx,4), %ecx
subl %ecx, %eax
cmpl $0x2, %eax
jne 0x5a787
testb $0x10, 0x10fe0a(%rip)   # 0x16a581
je 0x5a77e
callq 0x5a2d8
testb $0x20, 0x10fdfc(%rip)   # 0x16a581
jne 0x5a78d
addq $0x10, %rsp
popq %rbp
retq
addq $0x10, %rsp
popq %rbp
jmp 0x5a4cd
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: dump_prn_info()
void dump_prn_info()
{
int i;

   if(prn_file == 0) return;
   if(new_sat_azel == 0) return;
   new_sat_azel = 0;

   for(i=0; i<=SUN_MOON_PRN; i++) {
      if((sat[i].tracking > 0) || (i == SUN_PRN) || (i == MOON_PRN)) {
         fprintf(prn_file, "%.6f %4d %6.2f %6.2f %6.2f\n", jd_utc, i, sat[i].azimuth, sat[i].elevation, sat[i].sig_level);
      }
   }

   ++prn_count;
   fprintf(prn_file, "# %d\n", prn_count);
   if(prn_flush_mode) fflush(prn_file);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x1e2a0f(%rip), %r15    # 0x23e378
cmpq $0x0, (%r15)
je 0x5ba45
cmpl $0x0, 0x310442(%rip)    # 0x36bdbc
je 0x5ba45
movl $0x218, %r12d           # imm = 0x218
addq 0xf45b3(%rip), %r12     # 0x14ff40
movl $0x0, 0x310425(%rip)    # 0x36bdbc
xorl %ebx, %ebx
leaq 0x2b1b90(%rip), %r13    # 0x30d530
leaq 0xcb7ca(%rip), %r14     # 0x127171
movl %ebx, %eax
andl $0x3fe, %eax            # imm = 0x3FE
cmpl $0x3e8, %eax            # imm = 0x3E8
je 0x5b9bc
cmpl $0x0, (%r12)
jle 0x5b9f2
movq (%r15), %rdi
movsd (%r13), %xmm0
xorps %xmm1, %xmm1
cvtss2sd -0x10(%r12), %xmm1
xorps %xmm2, %xmm2
cvtss2sd -0xc(%r12), %xmm2
xorps %xmm3, %xmm3
cvtss2sd -0x1f8(%r12), %xmm3
movq %r14, %rsi
movl %ebx, %edx
movb $0x4, %al
callq 0x9560
incq %rbx
addq $0x348, %r12            # imm = 0x348
cmpq $0x3ea, %rbx            # imm = 0x3EA
jne 0x5b9a7
leaq 0x1e2a0c(%rip), %rax    # 0x23e418
movl (%rax), %edx
incl %edx
movl %edx, (%rax)
movq (%r15), %rdi
leaq 0xcb771(%rip), %rsi     # 0x12718d
xorl %eax, %eax
callq 0x9560
leaq 0x1e2a02(%rip), %rax    # 0x23e42c
cmpl $0x0, (%rax)
je 0x5ba45
movq (%r15), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9420
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: set_gregorian_time(double)
void set_gregorian_time(double jd)
{
   // set the receiver time/date variables to jd decoded to gregorian

   gregorian(0, jd);  // convert julian date to gregorian

   pri_year = year = g_year;  // update date/time variables to the gregorian values
   pri_month = month = g_month;
   pri_day = day = g_day;

   pri_hours = hours = g_hours;
   pri_minutes = minutes = g_minutes;
   pri_seconds = seconds = g_seconds;
   pri_frac = raw_frac = g_frac;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %edi, %edi
callq 0xd0c46
leaq 0x2b0e5b(%rip), %rax    # 0x30d6a4
movl (%rax), %eax
leaq 0x2b0c8a(%rip), %rcx    # 0x30d4dc
movl %eax, (%rcx)
leaq 0x2b0cb9(%rip), %rcx    # 0x30d514
movl %eax, (%rcx)
leaq 0x2b0e38(%rip), %rax    # 0x30d69c
movl (%rax), %eax
leaq 0x2b0c6b(%rip), %rcx    # 0x30d4d8
movl %eax, (%rcx)
leaq 0x2b0c9a(%rip), %rcx    # 0x30d510
movl %eax, (%rcx)
leaq 0x2b0e21(%rip), %rax    # 0x30d6a0
movl (%rax), %eax
leaq 0x2b0c4c(%rip), %rcx    # 0x30d4d4
movl %eax, (%rcx)
leaq 0x2b0c7b(%rip), %rcx    # 0x30d50c
movl %eax, (%rcx)
leaq 0x2b0e0e(%rip), %rax    # 0x30d6a8
movl (%rax), %eax
leaq 0x2b0c2d(%rip), %rcx    # 0x30d4d0
movl %eax, (%rcx)
leaq 0x2b0c5c(%rip), %rcx    # 0x30d508
movl %eax, (%rcx)
leaq 0x2b0df7(%rip), %rax    # 0x30d6ac
movl (%rax), %eax
leaq 0x2b0c0e(%rip), %rcx    # 0x30d4cc
movl %eax, (%rcx)
leaq 0x2b0c3d(%rip), %rcx    # 0x30d504
movl %eax, (%rcx)
leaq 0x2b0de0(%rip), %rax    # 0x30d6b0
movl (%rax), %eax
leaq 0x2b0bef(%rip), %rcx    # 0x30d4c8
movl %eax, (%rcx)
leaq 0x2b0c1e(%rip), %rcx    # 0x30d500
movl %eax, (%rcx)
leaq 0x2b0dcd(%rip), %rax    # 0x30d6b8
movsd (%rax), %xmm0
leaq 0x2b0bea(%rip), %rax    # 0x30d4e0
movsd %xmm0, (%rax)
leaq 0x2b0c17(%rip), %rax    # 0x30d518
movsd %xmm0, (%rax)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: lla_to_ecef(double, double, double)
void lla_to_ecef(double lat, double lon, double alt)
{   
double clat;
double slat;
double clon;
double slon;
double N;

   // convert lat/lon/alt values (in radians/meters) to ECEF coordinates

   clat = cos(lat);
   slat = sin(lat);
   clon = cos(lon);
   slon = sin(lon);

   N = WGS84_A / sqrt(1.0 - WGS84_E * WGS84_E * slat * slat);

   ecef_x = (N + alt) * clat * clon;
   ecef_y = (N + alt) * clat * slon;
   ecef_z = (N * (1.0 - WGS84_E * WGS84_E) + alt) * slat;
// sprintf(plot_title, "ecef: %f %f %f", ecef_x,ecef_y,ecef_z);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movsd %xmm2, -0x28(%rbp)
movsd %xmm1, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
callq 0x9710
movsd %xmm0, -0x20(%rbp)
movsd -0x10(%rbp), %xmm0
callq 0x9080
movsd %xmm0, -0x10(%rbp)
movsd -0x8(%rbp), %xmm0
callq 0x9710
movsd %xmm0, -0x18(%rbp)
movsd -0x8(%rbp), %xmm0
callq 0x9080
movsd 0xc1675(%rip), %xmm1    # 0x11e0a0
movsd -0x10(%rbp), %xmm2
mulsd %xmm2, %xmm1
mulsd %xmm2, %xmm1
addsd 0xac630(%rip), %xmm1    # 0x109070
movapd %xmm0, %xmm4
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jb 0x5ca57
xorps %xmm0, %xmm0
sqrtsd %xmm1, %xmm0
jmp 0x5ca6a
movapd %xmm1, %xmm0
movsd %xmm4, -0x8(%rbp)
callq 0x9270
movsd -0x8(%rbp), %xmm4
movsd 0xc1636(%rip), %xmm1    # 0x11e0a8
divsd %xmm0, %xmm1
movapd %xmm1, %xmm0
movsd -0x28(%rbp), %xmm2
addsd %xmm2, %xmm0
movsd -0x20(%rbp), %xmm3
mulsd %xmm0, %xmm3
movsd -0x18(%rbp), %xmm0
mulsd %xmm3, %xmm0
leaq 0x2b054c(%rip), %rax    # 0x30cfe8
movsd %xmm0, (%rax)
mulsd %xmm3, %xmm4
leaq 0x2b0545(%rip), %rax    # 0x30cff0
movsd %xmm4, (%rax)
mulsd 0xc15f9(%rip), %xmm1    # 0x11e0b0
addsd %xmm2, %xmm1
movsd -0x10(%rbp), %xmm0
mulsd %xmm1, %xmm0
leaq 0x2b052d(%rip), %rax    # 0x30cff8
movsd %xmm0, (%rax)
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: ecef_to_lla(double, double, double)
void ecef_to_lla(double x, double y, double z)
{
  // convert ECEF coordinate to geocentric lat/lon/alt in radians/meters

  double b = sqrt( (WGS84_A*WGS84_A) * (1.0-(WGS84_E*WGS84_E)) );
  double bsq = (b * b);
  double ep = sqrt( (WGS84_A*WGS84_A - bsq) / bsq);
  double p = sqrt( (x*x) + (y*y) );
  double th = atan2(WGS84_A*z, b*p);

  elon = atan2(y,x);
  elat = atan2( (z + (ep*ep)*b*(sin(th)*sin(th)*sin(th)) ), (p - (WGS84_E*WGS84_E)*WGS84_A*(cos(th)*cos(th)*cos(th))) );

  double N = WGS84_A / ( sqrt(1.0-(WGS84_E*WGS84_E)*(sin(elat)*sin(elat))) );
  ealt = (p / cos(elat)) - N;

  // mod lon to 0-2pi
  elon = fmod(elon,(2.0*PI));
  // correction for altitude near poles left out.  // zork
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movsd %xmm2, -0x18(%rbp)
movsd %xmm1, -0x28(%rbp)
mulsd %xmm1, %xmm1
movsd %xmm0, -0x10(%rbp)
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x5cb0b
xorps %xmm2, %xmm2
sqrtsd %xmm0, %xmm2
jmp 0x5cb14
callq 0x9270
movapd %xmm0, %xmm2
movsd %xmm2, -0x20(%rbp)
movsd 0xc1587(%rip), %xmm0    # 0x11e0a8
mulsd -0x18(%rbp), %xmm0
movsd 0xc158a(%rip), %xmm1    # 0x11e0b8
mulsd %xmm2, %xmm1
callq 0x9050
movsd %xmm0, -0x8(%rbp)
movsd -0x28(%rbp), %xmm0
movsd -0x10(%rbp), %xmm1
callq 0x9050
movsd %xmm0, 0x30ff4d(%rip)   # 0x36caa0
movsd -0x8(%rbp), %xmm0
callq 0x9080
movsd %xmm0, -0x10(%rbp)
movsd -0x8(%rbp), %xmm0
callq 0x9080
mulsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x10(%rbp)
movsd -0x8(%rbp), %xmm0
callq 0x9080
mulsd -0x10(%rbp), %xmm0
mulsd 0xc1533(%rip), %xmm0    # 0x11e0c0
addsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x10(%rbp)
movsd -0x8(%rbp), %xmm0
callq 0x9710
movsd %xmm0, -0x18(%rbp)
movsd -0x8(%rbp), %xmm0
callq 0x9710
movsd -0x18(%rbp), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, -0x18(%rbp)
movsd -0x8(%rbp), %xmm0
callq 0x9710
movsd -0x18(%rbp), %xmm1
mulsd %xmm0, %xmm1
mulsd 0xc14ef(%rip), %xmm1    # 0x11e0c8
addsd -0x20(%rbp), %xmm1
movsd -0x10(%rbp), %xmm0
callq 0x9050
movsd %xmm0, 0x30fea8(%rip)   # 0x36ca98
callq 0x9080
movsd %xmm0, -0x8(%rbp)
movsd 0x30fe96(%rip), %xmm0   # 0x36ca98
callq 0x9080
mulsd -0x8(%rbp), %xmm0
mulsd 0xc148c(%rip), %xmm0    # 0x11e0a0
addsd 0xac454(%rip), %xmm0    # 0x109070
ucomisd 0xac4f4(%rip), %xmm0    # 0x109118
jb 0x5cc2c
sqrtsd %xmm0, %xmm0
jmp 0x5cc31
callq 0x9270
movsd 0xc1497(%rip), %xmm1    # 0x11e0d0
divsd %xmm0, %xmm1
movsd %xmm1, -0x8(%rbp)
movsd 0x30fe4e(%rip), %xmm0   # 0x36ca98
callq 0x9710
movsd -0x20(%rbp), %xmm1
divsd %xmm0, %xmm1
addsd -0x8(%rbp), %xmm1
movsd %xmm1, 0x30fe43(%rip)   # 0x36caa8
movsd 0x30fe33(%rip), %xmm0   # 0x36caa0
movsd 0xc1463(%rip), %xmm1    # 0x11e0d8
callq 0x94d0
movsd %xmm0, 0x30fe1e(%rip)   # 0x36caa0
addq $0x30, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: calc_jd_leap(int)
void calc_jd_leap(int why)
{
double days;

   // calculate the Julian date of the next leapsecond and how many days
   // until the event

   days = jd_leap - jd_utc;
   if(days < 0.0) have_jd_leap = have_leap_days = 0;
   else if(days >= ((double) LEAP_THRESH)) have_jd_leap = have_leap_days = 0;
   else have_jd_leap = have_leap_days = why;

   leap_days = (int) days;

//gregorian(0, jd_leap);
//sprintf(plot_title, "jd_leap %d:  have:%d  %04d/%02d/%02d %02d:%02d:%02d   days:%f", 
//why, have_jd_leap, g_year,g_month,g_day, g_hours,g_minutes,g_seconds, days);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x2b08cd(%rip), %rax    # 0x30d560
movsd (%rax), %xmm0
leaq 0x2b0892(%rip), %rax    # 0x30d530
subsd (%rax), %xmm0
xorl %eax, %eax
ucomisd 0xc1434(%rip), %xmm0    # 0x11e0e0
cmovael %eax, %edi
xorpd %xmm1, %xmm1
ucomisd %xmm0, %xmm1
cmoval %eax, %edi
leaq 0x2b052f(%rip), %rax    # 0x30d1f0
movl %edi, (%rax)
leaq 0x2b089e(%rip), %rax    # 0x30d568
movl %edi, (%rax)
cvttsd2si %xmm0, %eax
leaq 0x2b0515(%rip), %rcx    # 0x30d1ec
movl %eax, (%rcx)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: calc_leap_days(double, unsigned short, int)
void calc_leap_days(double wn_lsf, unsigned short dn, int why)
{
double jd;

   jd = GPS_EPOCH + (wn_lsf * 7.0) + (dn) - jtime(0,0,0,1.0); // Julian day of leapsecond
if(wn_lsf < 1024) jd += rollover / (1024.0 * 7.0 * 24.0*60.0*60.0);
   jd_leap = jd;
   calc_jd_leap(1);
   return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movapd %xmm0, -0x20(%rbp)
movsd 0xaec10(%rip), %xmm1    # 0x10b900
mulsd %xmm0, %xmm1
addsd 0xaeb8c(%rip), %xmm1    # 0x10b888
xorps %xmm0, %xmm0
cvtsi2sd %edi, %xmm0
addsd %xmm1, %xmm0
movapd %xmm0, -0x10(%rbp)
movsd 0xac35c(%rip), %xmm0    # 0x109070
xorl %edi, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0xd41e0
leaq 0x1be73a(%rip), %rax    # 0x21b460
movsd (%rax), %xmm1
divsd 0xaedee(%rip), %xmm1    # 0x10bb20
movapd -0x10(%rbp), %xmm2
subsd %xmm0, %xmm2
addsd %xmm2, %xmm1
movapd %xmm2, %xmm3
movapd -0x20(%rbp), %xmm2
cmpltsd 0xc1397(%rip), %xmm2    # 0x11e0e8
movapd %xmm2, %xmm0
andnpd %xmm3, %xmm0
andpd %xmm1, %xmm2
orpd %xmm0, %xmm2
leaq 0x2b07f8(%rip), %rax    # 0x30d560
movlpd %xmm2, (%rax)
leaq 0x2b07bd(%rip), %rax    # 0x30d530
movsd (%rax), %xmm0
subsd %xmm0, %xmm2
movsd 0xc135d(%rip), %xmm0    # 0x11e0e0
cmpnlepd %xmm2, %xmm0
xorpd %xmm1, %xmm1
cvttsd2si %xmm2, %eax
cmpnltpd %xmm1, %xmm2
andpd %xmm0, %xmm2
movd %xmm2, %ecx
andl $0x1, %ecx
leaq 0x2b0449(%rip), %rdx    # 0x30d1f0
movl %ecx, (%rdx)
leaq 0x2b07b8(%rip), %rdx    # 0x30d568
movl %ecx, (%rdx)
leaq 0x2b0433(%rip), %rcx    # 0x30d1ec
movl %eax, (%rcx)
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: guess_leap_days()
void guess_leap_days()
{
double today;
double days;

   // If receiver has no day of leapsecond info, we attempt to guess it
   // assuming the leapsecond occurs on 30 Jun or 31 Dec.

   if((minor_alarms & MINOR_LEAP_PEND) == 0) return;  // no leap pending flag
   if(have_leap_days) return;  // receiver provided the leap day

   today = jdate(year,month,day);
   if(month >= 7) {
      days = jdate(year,12,31);
   }
   else {
      days = jdate(year,6,30);
   }
   jd_leap = days + jtime(23,59,59, 0.0);
   have_jd_leap = 2;
//   calc_jd_leap(2);

   days = days-today;
   if(days < 180.0) leap_days = (int) days;
   else leap_days = (-1);
   guessed_leap_days = '?';
}

// Assembly:
leaq 0x2b0410(%rip), %rax    # 0x30d1d8
testb $-0x80, (%rax)
je 0x5ceab
leaq 0x2b0418(%rip), %rax    # 0x30d1f0
cmpl $0x0, (%rax)
jne 0x5ceab
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
leaq 0x2b06e9(%rip), %rbx    # 0x30d4dc
movl (%rbx), %edi
leaq 0x2b06dc(%rip), %r14    # 0x30d4d8
movl (%r14), %esi
leaq 0x2b06ce(%rip), %rax    # 0x30d4d4
movl (%rax), %edx
callq 0xd4110
movsd %xmm0, -0x20(%rbp)
cmpl $0x7, (%r14)
movl (%rbx), %edi
jl 0x5ce26
movl $0xc, %esi
movl $0x1f, %edx
jmp 0x5ce30
movl $0x6, %esi
movl $0x1e, %edx
callq 0xd4110
movsd %xmm0, -0x18(%rbp)
xorpd %xmm0, %xmm0
movl $0x17, %edi
movl $0x3b, %esi
movl $0x3b, %edx
callq 0xd41e0
movsd -0x18(%rbp), %xmm1
addsd %xmm1, %xmm0
leaq 0x2b06fe(%rip), %rax    # 0x30d560
movsd %xmm0, (%rax)
leaq 0x2b06fb(%rip), %rax    # 0x30d568
movl $0x2, (%rax)
subsd -0x20(%rbp), %xmm1
movsd 0xae9a0(%rip), %xmm0    # 0x10b820
ucomisd %xmm1, %xmm0
cvttsd2si %xmm1, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmoval %eax, %ecx
leaq 0x2b0355(%rip), %rax    # 0x30d1ec
movl %ecx, (%rax)
leaq 0x2b0354(%rip), %rax    # 0x30d1f4
movb $0x3f, (%rax)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: record_sig_levels(int)
void record_sig_levels(int prn)
{
float sig;

   // check the signal level for sat PRN "prn", update the sats' max signal
   // level,  and update the signal level map info

   if(prn < 0) return;
   if(prn > MAX_PRN) return;
   if(rcvr_type == RFTG_RCVR) ; 
   else if((lat == 0.0) && (lon == 0.0)) return;

#ifdef SIG_LEVELS
   if(sat[prn].level_msg != 0) { 
      sig = sat[prn].sig_level;
      if(sig < 0.0F) sig = 0.0F - sig;

      if(sat[prn].sig_level > max_sat_db[prn]) {
         max_sat_db[prn] = sig;
      }

      if(sig > max_sig_level) {
         max_sig_level = sig;
      }
      if(sig) {
         if(sig < min_sig_level) {
            min_sig_level = sig;
         }
      }

      sig_level_sum += sig;
      ++sig_level_count;

      if(pause_data) ;
      else if(reading_signals == 0) {
         log_signal(sat[prn].azimuth+0.5F, sat[prn].elevation+0.5F, sig, amu_mode);
      }
      have_snr |= rinex_gnss(prn);
   }
#endif
}

// Assembly:
cmpl $0x3e7, %edi            # imm = 0x3E7
ja 0x5d035
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl %edi, %ebx
leaq 0x1bb9e2(%rip), %rax    # 0x2188d0
cmpq $0x400000, (%rax)       # imm = 0x400000
jne 0x5cff5
movl %ebx, %ecx
imulq $0x348, %rcx, %rdx      # imm = 0x348
leaq 0x1e20a5(%rip), %rax    # 0x23efb0
cmpl $0x0, 0x1c(%rax,%rdx)
je 0x5d02f
addq %rdx, %rax
movss 0x20(%rax), %xmm0
xorpd %xmm1, %xmm1
movaps %xmm0, %xmm2
cmpltss %xmm1, %xmm2
subss %xmm0, %xmm1
andps %xmm2, %xmm1
andnps %xmm0, %xmm2
orps %xmm1, %xmm2
leaq 0x156382(%rip), %rdx    # 0x1b32c0
ucomiss (%rdx,%rcx,4), %xmm0
jbe 0x5cf49
movss %xmm2, (%rdx,%rcx,4)
leaq 0x157318(%rip), %rcx    # 0x1b4268
ucomiss (%rcx), %xmm2
jbe 0x5cf59
movss %xmm2, (%rcx)
xorps %xmm0, %xmm0
ucomiss %xmm0, %xmm2
jne 0x5cf63
jnp 0x5cf77
leaq 0x157302(%rip), %rcx    # 0x1b426c
movss (%rcx), %xmm0
ucomiss %xmm2, %xmm0
jbe 0x5cf77
movss %xmm2, (%rcx)
xorps %xmm0, %xmm0
cvtss2sd %xmm2, %xmm0
leaq 0x1572eb(%rip), %rcx    # 0x1b4270
addsd (%rcx), %xmm0
movsd %xmm0, (%rcx)
leaq 0x1572e4(%rip), %rcx    # 0x1b4278
movsd (%rcx), %xmm0
addsd 0xac0d0(%rip), %xmm0    # 0x109070
movsd %xmm0, (%rcx)
leaq 0x1be289(%rip), %rcx    # 0x21b234
leaq 0x2de326(%rip), %rdx    # 0x33b2d8
movb (%rdx), %dl
orb (%rcx), %dl
jne 0x5cfe3
movss 0xb0024(%rip), %xmm1    # 0x10cfe4
movss 0x208(%rax), %xmm0
addss %xmm1, %xmm0
addss 0x20c(%rax), %xmm1
leaq 0x1e1f15(%rip), %rax    # 0x23eef0
movzbl (%rax), %edi
callq 0xf8ef5
movl %ebx, %edi
callq 0xdbb74
leaq 0x2b035b(%rip), %rcx    # 0x30d34c
orl %eax, (%rcx)
jmp 0x5d02f
leaq 0x2affd4(%rip), %rax    # 0x30cfd0
movsd (%rax), %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jne 0x5cefb
jp 0x5cefb
leaq 0x2affbd(%rip), %rax    # 0x30cfd8
movsd (%rax), %xmm1
ucomisd %xmm0, %xmm1
jne 0x5cefb
jp 0x5cefb
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: config_sat_rows()
void config_sat_rows()
{
   // calculate how many rows on the screen the sat info display will use

   if(sat_cols <= 0) return;

   sat_rows = max_sat_display / sat_cols;
   ms_row = ms_col = 0;
   if(sat_cols > 1) {
      if(max_sat_display & 1) ++sat_rows;
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x2ae3bf(%rip), %rax    # 0x30c784
movl (%rax), %esi
testl %esi, %esi
jle 0x5e40f
leaq 0x1e0bd2(%rip), %rax    # 0x23efa4
movl (%rax), %ecx
movl %ecx, %eax
cltd
idivl %esi
leaq 0x2ae3a8(%rip), %rdx    # 0x30c788
movl %eax, (%rdx)
leaq 0x2ae3a7(%rip), %rdi    # 0x30c790
xorl %r8d, %r8d
movl %r8d, (%rdi)
leaq 0x2ae396(%rip), %rdi    # 0x30c78c
movl %r8d, (%rdi)
cmpl $0x1, %esi
sete %sil
testb $0x1, %cl
sete %cl
orb %sil, %cl
jne 0x5e40f
incl %eax
movl %eax, (%rdx)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/jkingan[P]ladyheather/heathgps.cpp
// Function: config_sat_count(int)
void config_sat_count(int sat_count)
{
   // configure the display for the number of satellite channels

   if(first_key) return;  // delay screen size update until not in a menu
// sprintf(debug_text3, "csc:%d   msd:%d  msc:%d", sat_count, max_sat_display, max_sat_count);
   if(sat_count > max_sat_display) {
      sat_count = max_sat_display;
      have_count = 30;
   }

   if(sat_count > max_sat_count) {
      max_sat_count = sat_count;
      last_ebolt = (-1);
      saw_ebolt();  // !!!! we should do this better  zzzzz
   }

   config_sat_rows();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x1e0b3a(%rip), %rax    # 0x23ef58
cmpl $0x0, (%rax)
je 0x5e42a
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x1e0b73(%rip), %rbx    # 0x23efa4
movl (%rbx), %eax
cmpl %edi, %eax
jge 0x5e446
leaq 0x2aeeda(%rip), %rcx    # 0x30d318
movl $0x1e, (%rcx)
movl %eax, %edi
leaq 0x2ae333(%rip), %rax    # 0x30c780
cmpl (%rax), %edi
jle 0x5e465
movl %edi, (%rax)
leaq 0x1e0ace(%rip), %rax    # 0x23ef28
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
callq 0x5e1a6
leaq 0x2ae318(%rip), %rax    # 0x30c784
movl (%rax), %esi
testl %esi, %esi
jle 0x5e423
movl (%rbx), %ecx
movl %ecx, %eax
cltd
idivl %esi
leaq 0x2ae308(%rip), %rdx    # 0x30c788
movl %eax, (%rdx)
leaq 0x2ae307(%rip), %rdi    # 0x30c790
xorl %r8d, %r8d
movl %r8d, (%rdi)
leaq 0x2ae2f6(%rip), %rdi    # 0x30c78c
movl %r8d, (%rdi)
cmpl $0x1, %esi
sete %sil
testb $0x1, %cl
sete %cl
orb %sil, %cl
jne 0x5e423
incl %eax
movl %eax, (%rdx)
jmp 0x5e423