// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathmsc.cpp
// Function: write_rinex_header(_IO_FILE*)
void write_rinex_header(FILE *file)
{
char *type;
char fmt[SLEN+1];
char core[SLEN+1];
int mask;
int i;
FILE *old_log;
int old_fmt;

   // write the RINEX .OBS file header info
   if(rinex_header_written) return;
   obs_data_written = 0;
   if(time_flags & TFLAGS_BAD_TIME) return;
   if(jd_obs == 0.0) return;
   if(first_obs) {
      first_obs = 0;
      return;
   }

   mask = gnss_mask;
   if(rcvr_type == ESIP_RCVR) mask = GPS;  // only does GPS raw measurements

   if     (mask == GPS)     type = "G (GPS)";
   else if(mask == GLONASS) type = "R (GLONASS)";
   else if(mask == SBAS)    type = "S (SBAS)";
   else if(mask == GALILEO) type = "E (GALILEO)";
   else if(mask == BEIDOU)  type = "C (BEIDOU)";
   else if(have_gnss_mask)  type = "M (MIXED)";
   else                     type = "M (MIXED)";  // "G (GPS)";
   sprintf(out,"     %4.2f           OBSERVATION DATA    %-20.20s", rinex_fmt, type);
   write_rinex_line(file, out, "RINEX VERSION / TYPE");

   gregorian(1, jd_utc);
   if(rinex_fmt >= 3.00) {
      sprintf(out,          "HEATHER %-9.9s                       %04d%02d%02d %02d%02d%02d UTC", VERSION, g_year,g_month,g_day, g_hours,g_minutes,g_seconds);
   }
   else {
      sprintf(out,          "HEATHER %-9.9s                       %04d%02d%02d %02d:%02d:%02dUTC", VERSION, g_year,g_month,g_day, g_hours,g_minutes,g_seconds);
   }
   write_rinex_line(file, out, "PGM / RUN BY / DATE"); 

   if((marker_name[0] == 0) || strstr(marker_name, DEFAULT_NAME)) {  // create a marker name
      sprintf(fmt, "%s ", unit_file_name);
      if(mask & GPS)     strcat(fmt, "G+");
      if(mask & SBAS)    strcat(fmt, "S+");
      if(mask & GLONASS) strcat(fmt, "R+");
      if(mask & GALILEO) strcat(fmt, "E+");
      if(mask & BEIDOU)  strcat(fmt, "C+");
//    if(mask & QZSS)    strcat(fmt, "J+");
//    if(mask & IRNSS)   strcat(fmt, "I+");
      i = strlen(fmt);
      if(i) {
         if(fmt[i-1] == '+') fmt[i-1] = ' ';
      }
      strupr(fmt);
   }
   else strcpy(fmt, marker_name);

   sprintf(out, "%-20.20s", fmt);
   write_rinex_line(file, out, "MARKER NAME");      

   sprintf(out, "%-20.20s", marker_number);
   write_rinex_line(file, out,  "MARKER NUMBER");      

   sprintf(out, "%-20.20s", marker_type);
   if(rinex_fmt >= 3.00) {
      write_rinex_line(file, out, "MARKER TYPE");      
   }

   write_rinex_line(file, "", "OBSERVER / AGENCY");      

   strcpy(fmt, unit_file_name);
   strupr(fmt);
   if(rcvr_type == ESIP_RCVR) {
      sprintf(out, "ID:%-17.17s%-20.20sVER:%-4.4s", esip_model, fmt, esip_version);
   }
   else if(rcvr_type == NVS_RCVR) {
      sprintf(out, "ID:%-17.17s%-20.20sFW:%-17.17s", nvs_id2, fmt, nvs_id);
   }
   else if(rcvr_type == TSIP_RCVR) {
      sprintf(core, "FW:%2d.%-2d %02d %s %02d", 
         core_major, core_minor,  core_day, months[core_month], core_year);  //!!! docs say 1900
         core[20] = 0;
      if(unit_name[0]) {
         sprintf(out, "%-20.20s%-20.20s%-20.20s", core, fmt, unit_name);
      }
      else {
         sprintf(out, "%-20.20s%-20.20s%-20.20s", core, fmt, "TRIMBLE TSIP");
      }
   }
   else if(rcvr_type == UBX_RCVR) {
      sprintf(out, "HW:%-17.17s%-20.20sFW:%-17.17s", ubx_hw, fmt, ubx_sw);
   }
   else if(rcvr_type == VENUS_RCVR) {
      sprintf(out, "%-20.20s%-20.20s%-20.20s", venus_odm, fmt, venus_rev);
   }
   else if(rcvr_type == Z12_RCVR) {
      sprintf(out, "TYPE:%-15.15s%-20.20sVER:%-4.4s %-4.4s-%-4.4s", z12_type, fmt, z12_chan_opt, z12_nav_ver,z12_chan_ver);
   }
   else {
      sprintf(out, "%-20.20s%-20.20s%-20.20s", "", fmt, "");
   }
   write_rinex_line(file, out, "REC # / TYPE / VERS"); 

   sprintf(out, "%-20.20s%-20.20s", antenna_number, antenna_type);
   write_rinex_line(file, out, "ANT # / TYPE");        
   sprintf(out, "  LAT:%14.9f  LON:%14.9f  ALT:%10.4f", lat*180.0/PI,lon*180.0/PI,alt), 
   write_rinex_line(file, out,  "COMMENT"); 
   lla_to_ecef(lat, lon, alt);
   sprintf(out, "%14.4f%14.4f%14.4f", ecef_x,ecef_y,ecef_z), 
   write_rinex_line(file, out,  "APPROX POSITION XYZ"); 

   sprintf(out, "%14.4f%14.4f%14.4f", antenna_height, antenna_ew, antenna_ns);
   if(rinex_fmt >= 3.0) {
      write_rinex_line(file, out, "ANTENNA:DELTA H/E/N");
   }
   else {
      write_rinex_line(file, out, "ANTENNA: DELTA H/E/N");
   }
   write_rinex_line(file, "     1     1", "WAVELENGTH FACT L1/2");

   if(0 && mixed_obs_list[0]) {  // user specifed observations
      mixed_num_obs = get_obs_types(file, mixed_obs_list, MIXED, &mixed_obs_type[0]);
   }
   else if(1) { // build observation list from data type seen
      if(rinex_fmt >= 3.0) {
         gps_num_obs     = get_obs_types(file, gps_obs_list,     GPS,     &gps_obs_type[0]);
         sbas_num_obs    = get_obs_types(file, sbas_obs_list,    SBAS,    &sbas_obs_type[0]);
         glonass_num_obs = get_obs_types(file, glonass_obs_list, GLONASS, &glonass_obs_type[0]);
         galileo_num_obs = get_obs_types(file, galileo_obs_list, GALILEO, &galileo_obs_type[0]);
         beidou_num_obs  = get_obs_types(file, beidou_obs_list,  BEIDOU,  &beidou_obs_type[0]);
      }
      else {
         mixed_num_obs = get_obs_types(file, mixed_obs_list, MIXED, &mixed_obs_type[0]);
      }
   }
   else if(USE_L2 && (rcvr_type == Z12_RCVR)) {
///   mixed_num_obs = get_obs_types(file, "C1    L1    D1    S1    P1    P2    L2    D2    S2", MIXED, mixed_obs_type);
      mixed_num_obs = get_obs_types(file, "L1    L2    C1    P1    P2    S1    S2", MIXED, &mixed_obs_type[0]);
   }
   else if(have_phase == 0) {  // (rcvr_type == ESIP_RCVR) 
     mixed_num_obs = get_obs_types(file, "C1    D1    S1", MIXED, &mixed_obs_type[0]); // pseudorange, doppler, snr
   }
   else {
      mixed_num_obs = get_obs_types(file, "C1    L1    D1    S1", MIXED, &mixed_obs_type[0]);
   }

   get_obs_time(jd_obs, obs_tow);
   sprintf(out, "%6d%6d%6d%6d%6d%13.7f%s", g_year,g_month,g_day, g_hours,g_minutes,(double)g_seconds+g_frac, "     GPS");
   write_rinex_line(file, out, "TIME OF FIRST OBS");

   if((rinex_fmt >= 3.02) && glonass_num_obs) {  // !!!!! do this properly
      fmt[0] = 0;
      if(1) sprintf(fmt, " C1C %8.3f", 0.0);
      else  sprintf(fmt, "             ");
      strcat(out, fmt);

      if(1) sprintf(fmt, " C1P %8.3f", 0.0);
      else  sprintf(fmt, "             ");
      strcat(out, fmt);

      if(1) sprintf(fmt, " C2C %8.3f", 0.0);
      else  sprintf(fmt, "             ");
      strcat(out, fmt);

      if(1) sprintf(fmt, " C2P %8.3f", 0.0);
      else  sprintf(fmt, "             ");
      strcat(out, fmt);
      write_rinex_line(file, out, "GLONASS COD/PHS/BIS");
   }


   write_rinex_line(file, " ",  "COMMENT"); 

   if(el_mask || amu_mask) {
      sprintf(out, "  Elevation mask: %4.1f    Signal mask: %.1f", el_mask, amu_mask);
      write_rinex_line(file, out,  "COMMENT"); 
   }

   if(have_tc) {
      sprintf(out, "  Time constant: %.3f seconds", time_constant);
      write_rinex_line(file, out,  "COMMENT"); 
   }
   if(have_damp) {
      sprintf(out, "  Damping: %.3f", damping_factor);
      write_rinex_line(file, out,  "COMMENT"); 
   }
   if(have_gain) {
      sprintf(out, "  Osc EFC gain: %.3f Hz/V", osc_gain);
      write_rinex_line(file, out,  "COMMENT"); 
   }
   if(have_initv) {
      sprintf(out, "  Initial EFC voltage : %.3f V", initial_voltage);
      write_rinex_line(file, out,  "COMMENT"); 
   }
   if(use_rinex_cppr) {
      sprintf(out, "  GPS/SBAS/GALILEO L1 pseudorange derived from carrier phase data");
      write_rinex_line(file, out,  "COMMENT"); 
   }

   rinex_header_written = 1;
   obs_data_written = 0;
   if(rinex_file) {
      old_log = log_file;
      old_fmt = log_fmt;

      log_file = rinex_file;
      log_fmt = RINEX;
      write_log_id();

      log_file = old_log;
      log_fmt = old_fmt;
   }

   write_rinex_line(file, "", "END OF HEADER");

   if(rinex_file && (file == rinex_file) && rinex_flush_mode) {
     fflush(file);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
leaq 0x172bce(%rip), %rax    # 0x2283ec
cmpl $0x0, (%rax)
je 0xb5835
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x172bb8(%rip), %rax    # 0x2283f4
andl $0x0, (%rax)
leaq 0x241c5e(%rip), %rax    # 0x2f74a4
testb $0xc, (%rax)
jne 0xb5823
leaq 0x241d1e(%rip), %rax    # 0x2f7570
movsd (%rax), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xb5862
jnp 0xb5823
leaq 0x241d17(%rip), %rax    # 0x2f7580
cmpl $0x0, (%rax)
je 0xb5873
andl $0x0, (%rax)
jmp 0xb5823
movq %rdi, %rbx
leaq 0x14d053(%rip), %rcx    # 0x2028d0
movl $0x80000000, %eax       # imm = 0x80000000
cmpq %rax, (%rcx)
je 0xb5893
leaq 0xa53e6(%rip), %rax     # 0x15ac74
movl (%rax), %r15d
jmp 0xb5897
pushq $0x1
popq %r15
leal -0x1(%r15), %eax
cmpl $0x7, %eax
ja 0xb58b9
leaq 0x5f5bd(%rip), %rcx     # 0x114e64
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x67c55(%rip), %rdx     # 0x11d50c
jmp 0xb58ed
cmpl $0x8000, %r15d          # imm = 0x8000
jne 0xb58cb
leaq 0x67c57(%rip), %rdx     # 0x11d520
jmp 0xb58ed
leaq 0x67c6e(%rip), %rdx     # 0x11d540
jmp 0xb58ed
leaq 0x67c4e(%rip), %rdx     # 0x11d529
jmp 0xb58ed
leaq 0x67c51(%rip), %rdx     # 0x11d535
jmp 0xb58ed
leaq 0x67c27(%rip), %rdx     # 0x11d514
leaq 0x172c8c(%rip), %r12    # 0x228580
movsd (%r12), %xmm0
leaq 0x27091f(%rip), %r14    # 0x326220
leaq 0x67c42(%rip), %rsi     # 0x11d54a
movq %r14, %rdi
movb $0x1, %al
callq 0x9060
leaq 0x67c63(%rip), %rdx     # 0x11d57c
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb2e38
leaq 0x241c05(%rip), %rax    # 0x2f7530
movsd (%rax), %xmm0
pushq $0x1
popq %rdi
callq 0xbfac2
movsd (%r12), %xmm0
ucomisd 0x4013b(%rip), %xmm0    # 0xf5a80
leaq 0x241d58(%rip), %rax    # 0x2f76a4
movl (%rax), %ecx
leaq 0x241d47(%rip), %rax    # 0x2f769c
movl (%rax), %r8d
leaq 0x241d41(%rip), %rax    # 0x2f76a0
movl (%rax), %r9d
leaq 0x241d3f(%rip), %rax    # 0x2f76a8
movl (%rax), %r10d
leaq 0x241d39(%rip), %rax    # 0x2f76ac
movl (%rax), %r11d
leaq 0x241d33(%rip), %rdx    # 0x2f76b0
leaq 0x67c50(%rip), %rax     # 0x11d5d4
leaq 0x67c06(%rip), %rsi     # 0x11d591
cmovbq %rax, %rsi
movl (%rdx), %r13d
subq $0x8, %rsp
leaq 0x42230(%rip), %rdx     # 0xf7bcd
movq %r14, %rdi
xorl %eax, %eax
pushq %r13
pushq %r11
pushq %r10
callq 0x9060
addq $0x20, %rsp
leaq 0x67c60(%rip), %rdx     # 0x11d618
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb2e38
leaq 0x172a86(%rip), %rax    # 0x228450
cmpb $0x0, (%rax)
je 0xb59eb
leaq 0x172a7a(%rip), %rdi    # 0x228450
leaq 0x3f486(%rip), %rsi     # 0xf4e63
callq 0x9090
testq %rax, %rax
je 0xb5af2
leaq 0xa5296(%rip), %rax     # 0x15ac88
movq (%rax), %rdx
leaq 0x5c70f(%rip), %rsi     # 0x11210b
leaq -0x130(%rbp), %rdi
xorl %eax, %eax
callq 0x9060
testb $0x1, %r15b
je 0xb5a2e
leaq -0x130(%rbp), %rdi
callq 0x9120
movw $0x2b47, -0x130(%rbp,%rax) # imm = 0x2B47
movb $0x0, -0x12e(%rbp,%rax)
testw %r15w, %r15w
jns 0xb5a52
leaq -0x130(%rbp), %rdi
callq 0x9120
movw $0x2b53, -0x130(%rbp,%rax) # imm = 0x2B53
movb $0x0, -0x12e(%rbp,%rax)
testb $0x2, %r15b
je 0xb5a76
leaq -0x130(%rbp), %rdi
callq 0x9120
movw $0x2b52, -0x130(%rbp,%rax) # imm = 0x2B52
movb $0x0, -0x12e(%rbp,%rax)
testb $0x4, %r15b
je 0xb5a9a
leaq -0x130(%rbp), %rdi
callq 0x9120
movw $0x2b45, -0x130(%rbp,%rax) # imm = 0x2B45
movb $0x0, -0x12e(%rbp,%rax)
testb $0x8, %r15b
je 0xb5abe
leaq -0x130(%rbp), %rdi
callq 0x9120
movw $0x2b43, -0x130(%rbp,%rax) # imm = 0x2B43
movb $0x0, -0x12e(%rbp,%rax)
leaq -0x130(%rbp), %rdi
callq 0x9120
testl %eax, %eax
je 0xb5ae4
decl %eax
cltq
cmpb $0x2b, -0x130(%rbp,%rax)
jne 0xb5ae4
movb $0x20, -0x130(%rbp,%rax)
leaq -0x130(%rbp), %rdi
callq 0x988f
jmp 0xb5b05
leaq 0x172957(%rip), %rsi    # 0x228450
leaq -0x130(%rbp), %rdi
callq 0x9330
leaq 0x270714(%rip), %r14    # 0x326220
leaq 0x67a60(%rip), %r15     # 0x11d573
leaq -0x130(%rbp), %rdx
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x9060
leaq 0x67b0d(%rip), %rdx     # 0x11d63b
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb2e38
leaq 0x172940(%rip), %rdx    # 0x228480
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x9060
leaq 0x67af3(%rip), %rdx     # 0x11d647
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb2e38
leaq 0x17294a(%rip), %rdx    # 0x2284b0
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x9060
leaq 0x172a06(%rip), %rax    # 0x228580
movsd (%rax), %xmm0
ucomisd 0x3fefa(%rip), %xmm0    # 0xf5a80
jb 0xb5b9e
leaq 0x270691(%rip), %rsi    # 0x326220
leaq 0x67abf(%rip), %rdx     # 0x11d655
movq %rbx, %rdi
callq 0xb2e38
leaq 0x65e11(%rip), %rsi     # 0x11b9b6
leaq 0x67ab5(%rip), %rdx     # 0x11d661
movq %rbx, %rdi
callq 0xb2e38
leaq 0xa50cd(%rip), %rax     # 0x15ac88
movq (%rax), %rsi
leaq -0x130(%rbp), %r14
movq %r14, %rdi
callq 0x9330
movq %r14, %rdi
callq 0x988f
leaq 0x14ccf4(%rip), %rax    # 0x2028d0
movq (%rax), %rax
cmpq $0x1, %rax
je 0xb5d0a
cmpq $0x4, %rax
je 0xb5ce9
cmpq $0x80, %rax
je 0xb5c45
cmpq $0x800, %rax            # imm = 0x800
je 0xb5cab
movabsq $0x100000000, %rcx      # imm = 0x100000000
cmpq %rcx, %rax
je 0xb5c66
movl $0x80000000, %ecx       # imm = 0x80000000
leaq 0x2705fe(%rip), %rdi    # 0x326220
cmpq %rcx, %rax
jne 0xb5ccc
leaq 0x67a41(%rip), %rsi     # 0x11d673
leaq 0x271707(%rip), %rdx    # 0x327340
leaq 0x2716a0(%rip), %r8     # 0x3272e0
jmp 0xb5dad
leaq 0x2705d4(%rip), %rdi    # 0x326220
leaq 0x67a76(%rip), %rsi     # 0x11d6c9
leaq 0x272156(%rip), %rdx    # 0x327db0
leaq 0x27216f(%rip), %r8     # 0x327dd0
jmp 0xb5dad
subq $0x8, %rsp
leaq 0x271fdf(%rip), %r10    # 0x327c50
leaq 0x2705a8(%rip), %rdi    # 0x326220
leaq 0x67a8f(%rip), %rsi     # 0x11d70e
leaq 0x271f0a(%rip), %rdx    # 0x327b90
leaq 0x271f33(%rip), %r8     # 0x327bc0
leaq 0x271f5c(%rip), %r9     # 0x327bf0
leaq -0x130(%rbp), %rcx
xorl %eax, %eax
pushq %r10
callq 0x9060
popq %rcx
popq %rdx
jmp 0xb5dbb
leaq 0x27056e(%rip), %rdi    # 0x326220
leaq 0x679d8(%rip), %rsi     # 0x11d691
leaq 0x14f2b0(%rip), %rdx    # 0x204f70
leaq 0x14f279(%rip), %r8     # 0x204f40
jmp 0xb5dad
leaq 0x679f6(%rip), %rsi     # 0x11d6c9
leaq 0x65cdc(%rip), %rdx     # 0x11b9b6
leaq -0x130(%rbp), %rcx
movq %rdx, %r8
jmp 0xb5db4
leaq 0x270530(%rip), %rdi    # 0x326220
leaq 0x679f8(%rip), %rsi     # 0x11d6ef
leaq 0x2719e0(%rip), %rdx    # 0x3276de
leaq 0x2719bb(%rip), %r8     # 0x3276c0
jmp 0xb5dad
leaq 0x241c99(%rip), %rax    # 0x2f79aa
movzbl (%rax), %edx
leaq 0x241c90(%rip), %rax    # 0x2f79ab
movzbl (%rax), %ecx
leaq 0x241c88(%rip), %rax    # 0x2f79ad
movzbl (%rax), %r8d
leaq 0x241c7c(%rip), %rax    # 0x2f79ac
movzbl (%rax), %eax
leaq 0x9ea06(%rip), %rsi     # 0x154740
movq (%rsi,%rax,8), %r9
leaq 0x241c69(%rip), %rax    # 0x2f79ae
movzwl (%rax), %r10d
subq $0x8, %rsp
leaq 0x6795c(%rip), %rsi     # 0x11d6b0
leaq -0x230(%rbp), %r14
movq %r14, %rdi
xorl %eax, %eax
pushq %r10
callq 0x9060
popq %rcx
popq %rdx
movb $0x0, 0x14(%r14)
leaq 0x2708cb(%rip), %rax    # 0x326640
cmpb $0x0, (%rax)
je 0xb5d91
leaq 0x27049f(%rip), %rdi    # 0x326220
leaq 0x67941(%rip), %rsi     # 0x11d6c9
leaq 0x2708b1(%rip), %r8     # 0x326640
jmp 0xb5da6
leaq 0x270488(%rip), %rdi    # 0x326220
leaq 0x6792a(%rip), %rsi     # 0x11d6c9
leaq 0x6793c(%rip), %r8      # 0x11d6e2
leaq -0x230(%rbp), %rdx
leaq -0x130(%rbp), %rcx
xorl %eax, %eax
callq 0x9060
leaq 0x27045e(%rip), %r14    # 0x326220
leaq 0x67973(%rip), %rdx     # 0x11d73c
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb2e38
leaq 0x678f6(%rip), %rsi     # 0x11d6d1
leaq 0x17272e(%rip), %rdx    # 0x228510
leaq 0x1726f7(%rip), %rcx    # 0x2284e0
movq %r14, %rdi
xorl %eax, %eax
callq 0x9060
leaq 0x67956(%rip), %rdx     # 0x11d750
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb2e38
leaq 0x2411c4(%rip), %r15    # 0x2f6fd0
movsd 0x3fa94(%rip), %xmm1    # 0xf58a8
movsd (%r15), %xmm0
mulsd %xmm1, %xmm0
movsd 0x3fa7b(%rip), %xmm2    # 0xf58a0
leaq 0x2411ac(%rip), %r13    # 0x2f6fd8
mulsd (%r13), %xmm1
divsd %xmm2, %xmm0
divsd %xmm2, %xmm1
leaq 0x24119f(%rip), %r12    # 0x2f6fe0
movsd (%r12), %xmm2
leaq 0x6790f(%rip), %rsi     # 0x11d75d
movq %r14, %rdi
movb $0x3, %al
callq 0x9060
leaq 0x61871(%rip), %rdx     # 0x1176d0
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb2e38
movsd (%r15), %xmm0
movsd (%r13), %xmm1
movsd (%r12), %xmm2
callq 0x55535
leaq 0x241161(%rip), %rax    # 0x2f6fe8
movsd (%rax), %xmm0
leaq 0x24115e(%rip), %rax    # 0x2f6ff0
movsd (%rax), %xmm1
leaq 0x24115b(%rip), %rax    # 0x2f6ff8
movsd (%rax), %xmm2
leaq 0x678da(%rip), %r15     # 0x11d782
movq %r14, %rdi
movq %r15, %rsi
movb $0x3, %al
callq 0x9060
leaq 0x678d9(%rip), %rdx     # 0x11d795
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb2e38
leaq 0x17269a(%rip), %rax    # 0x228568
movsd (%rax), %xmm0
leaq 0x17269f(%rip), %rax    # 0x228578
movsd (%rax), %xmm1
leaq 0x17268c(%rip), %rax    # 0x228570
movsd (%rax), %xmm2
movq %r14, %rdi
movq %r15, %rsi
movb $0x3, %al
callq 0x9060
leaq 0x172684(%rip), %r15    # 0x228580
movsd (%r15), %xmm0
ucomisd 0x3fb77(%rip), %xmm0    # 0xf5a80
leaq 0x678ad(%rip), %rax     # 0x11d7bd
leaq 0x67892(%rip), %rdx     # 0x11d7a9
cmovbq %rax, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb2e38
leaq 0x678a5(%rip), %rsi     # 0x11d7d2
leaq 0x678ab(%rip), %rdx     # 0x11d7df
movq %rbx, %rdi
callq 0xb2e38
movsd (%r15), %xmm0
ucomisd 0x3fb37(%rip), %xmm0    # 0xf5a80
jae 0xb5f71
leaq 0x17263e(%rip), %rsi    # 0x228590
leaq 0x2ae797(%rip), %rcx    # 0x3646f0
movq %rbx, %rdi
movl $0xc00f, %edx           # imm = 0xC00F
callq 0xca73d
movl %eax, 0x2ae7f4(%rip)    # 0x364760
jmp 0xb600e
leaq 0x172718(%rip), %rsi    # 0x228690
leaq 0x2ae7f1(%rip), %rcx    # 0x364770
pushq $0x1
popq %rdx
movq %rbx, %rdi
callq 0xca73d
movl %eax, 0x2ae850(%rip)    # 0x3647e0
leaq 0x1727f9(%rip), %rsi    # 0x228790
leaq 0x2ae852(%rip), %rcx    # 0x3647f0
movq %rbx, %rdi
movl $0x8000, %edx           # imm = 0x8000
callq 0xca73d
movl %eax, 0x2ae8af(%rip)    # 0x364860
leaq 0x1728d8(%rip), %rsi    # 0x228890
leaq 0x2ae8b1(%rip), %rcx    # 0x364870
pushq $0x2
popq %rdx
movq %rbx, %rdi
callq 0xca73d
movl %eax, 0x2ae910(%rip)    # 0x3648e0
leaq 0x1729b9(%rip), %rsi    # 0x228990
leaq 0x2ae912(%rip), %rcx    # 0x3648f0
pushq $0x4
popq %rdx
movq %rbx, %rdi
callq 0xca73d
movl %eax, 0x2ae971(%rip)    # 0x364960
leaq 0x172a9a(%rip), %rsi    # 0x228a90
leaq 0x2ae973(%rip), %rcx    # 0x364970
pushq $0x8
popq %rdx
movq %rbx, %rdi
callq 0xca73d
movl %eax, 0x2ae9d2(%rip)    # 0x3649e0
leaq 0x1723d7(%rip), %r12    # 0x2283ec
leaq 0x241554(%rip), %rax    # 0x2f7570
movsd (%rax), %xmm0
leaq 0x241551(%rip), %rax    # 0x2f7578
movsd (%rax), %xmm1
callq 0xcb71f
leaq 0x24166d(%rip), %rax    # 0x2f76a4
movl (%rax), %edx
leaq 0x24165c(%rip), %rax    # 0x2f769c
movl (%rax), %ecx
leaq 0x241657(%rip), %rax    # 0x2f76a0
movl (%rax), %r8d
leaq 0x241655(%rip), %rax    # 0x2f76a8
movl (%rax), %r9d
leaq 0x241653(%rip), %rax    # 0x2f76b0
cvtsi2sdl (%rax), %xmm0
leaq 0x241644(%rip), %rax    # 0x2f76ac
movl (%rax), %r10d
leaq 0x241646(%rip), %rax    # 0x2f76b8
addsd (%rax), %xmm0
leaq 0x6778f(%rip), %r11     # 0x11d80c
leaq 0x27019c(%rip), %r14    # 0x326220
leaq 0x67769(%rip), %rsi     # 0x11d7f4
movq %r14, %rdi
movb $0x1, %al
pushq %r11
pushq %r10
callq 0x9060
popq %rcx
popq %rdx
leaq 0x67773(%rip), %rdx     # 0x11d815
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb2e38
movsd (%r15), %xmm0
ucomisd 0x5f5de(%rip), %xmm0    # 0x115698
jb 0xb6171
cmpl $0x0, 0x2ae819(%rip)    # 0x3648e0
je 0xb6171
leaq -0x130(%rbp), %r14
movb $0x0, (%r14)
leaq 0x67748(%rip), %rsi     # 0x11d827
xorpd %xmm0, %xmm0
movq %r14, %rdi
movb $0x1, %al
callq 0x9060
leaq 0x27012c(%rip), %r15    # 0x326220
movq %r15, %rdi
movq %r14, %rsi
callq 0x96c0
leaq 0x6772c(%rip), %rsi     # 0x11d832
xorpd %xmm0, %xmm0
movq %r14, %rdi
movb $0x1, %al
callq 0x9060
movq %r15, %rdi
movq %r14, %rsi
callq 0x96c0
leaq 0x67717(%rip), %rsi     # 0x11d83d
xorpd %xmm0, %xmm0
movq %r14, %rdi
movb $0x1, %al
callq 0x9060
movq %r15, %rdi
movq %r14, %rsi
callq 0x96c0
leaq 0x67702(%rip), %rsi     # 0x11d848
xorpd %xmm0, %xmm0
movq %r14, %rdi
movb $0x1, %al
callq 0x9060
movq %r15, %rdi
movq %r14, %rsi
callq 0x96c0
leaq 0x676ed(%rip), %rdx     # 0x11d853
movq %rbx, %rdi
movq %r15, %rsi
callq 0xb2e38
leaq 0x56924(%rip), %rsi     # 0x10ca9c
leaq 0x61551(%rip), %rdx     # 0x1176d0
movq %rbx, %rdi
callq 0xb2e38
leaq 0x240f26(%rip), %rax    # 0x2f70b4
movss (%rax), %xmm0
xorps %xmm2, %xmm2
ucomiss %xmm2, %xmm0
leaq 0x240f19(%rip), %rax    # 0x2f70b8
movss (%rax), %xmm1
jne 0xb61ae
jp 0xb61ae
ucomiss %xmm2, %xmm1
jne 0xb61ae
jnp 0xb61e0
cvtss2sd %xmm0, %xmm0
cvtss2sd %xmm1, %xmm1
leaq 0x270063(%rip), %r14    # 0x326220
leaq 0x676a3(%rip), %rsi     # 0x11d867
movq %r14, %rdi
movb $0x2, %al
callq 0x9060
leaq 0x614fb(%rip), %rdx     # 0x1176d0
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb2e38
leaq 0x241109(%rip), %rax    # 0x2f72f0
cmpl $0x0, (%rax)
je 0xb6221
leaq 0x240efd(%rip), %rax    # 0x2f70f0
movsd (%rax), %xmm0
leaq 0x270022(%rip), %r14    # 0x326220
leaq 0x6768f(%rip), %rsi     # 0x11d894
movq %r14, %rdi
movb $0x1, %al
callq 0x9060
leaq 0x614ba(%rip), %rdx     # 0x1176d0
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb2e38
leaq 0x2410cc(%rip), %rax    # 0x2f72f4
cmpl $0x0, (%rax)
je 0xb6262
leaq 0x240ecc(%rip), %rax    # 0x2f7100
movsd (%rax), %xmm0
leaq 0x26ffe1(%rip), %r14    # 0x326220
leaq 0x6766c(%rip), %rsi     # 0x11d8b2
movq %r14, %rdi
movb $0x1, %al
callq 0x9060
leaq 0x61479(%rip), %rdx     # 0x1176d0
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb2e38
leaq 0x24108f(%rip), %rax    # 0x2f72f8
cmpl $0x0, (%rax)
je 0xb62a3
leaq 0x240e93(%rip), %rax    # 0x2f7108
movsd (%rax), %xmm0
leaq 0x26ffa0(%rip), %r14    # 0x326220
leaq 0x6763b(%rip), %rsi     # 0x11d8c2
movq %r14, %rdi
movb $0x1, %al
callq 0x9060
leaq 0x61438(%rip), %rdx     # 0x1176d0
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb2e38
leaq 0x241056(%rip), %rax    # 0x2f7300
cmpl $0x0, (%rax)
je 0xb62e4
leaq 0x240e9a(%rip), %rax    # 0x2f7150
movsd (%rax), %xmm0
leaq 0x26ff5f(%rip), %r14    # 0x326220
leaq 0x67614(%rip), %rsi     # 0x11d8dc
movq %r14, %rdi
movb $0x1, %al
callq 0x9060
leaq 0x613f7(%rip), %rdx     # 0x1176d0
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb2e38
leaq 0x1722a1(%rip), %rax    # 0x22858c
cmpl $0x0, (%rax)
je 0xb631b
leaq 0x26ff29(%rip), %r14    # 0x326220
leaq 0x675fd(%rip), %rsi     # 0x11d8fb
pushq $0x42
popq %rdx
movq %r14, %rdi
callq 0x92a0
leaq 0x613c0(%rip), %rdx     # 0x1176d0
movq %rbx, %rdi
movq %r14, %rsi
callq 0xb2e38
leaq 0x1720d2(%rip), %rax    # 0x2283f4
andl $0x0, (%rax)
movl $0x1, (%r12)
leaq 0x172034(%rip), %r14    # 0x228368
movq (%r14), %rax
testq %rax, %rax
je 0xb636f
leaq 0x17201d(%rip), %r15    # 0x228360
movq (%r15), %r12
leaq 0x1720fb(%rip), %r13    # 0x228448
movl (%r13), %r14d
movq %rax, (%r15)
movl $0x12e, (%r13)          # imm = 0x12E
callq 0xb385a
movq %r12, (%r15)
movl %r14d, (%r13)
leaq 0x171ff9(%rip), %r14    # 0x228368
leaq 0x65640(%rip), %rsi     # 0x11b9b6
leaq 0x675c0(%rip), %rdx     # 0x11d93d
movq %rbx, %rdi
callq 0xb2e38
movq (%r14), %rax
testq %rax, %rax
je 0xb5823
cmpq %rbx, %rax
jne 0xb5823
leaq 0x172083(%rip), %rax    # 0x228424
cmpl $0x0, (%rax)
je 0xb5823
movq %rbx, %rdi
callq 0x9420
jmp 0xb5823