// File: 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
subq $0x240, %rsp            # imm = 0x240
movq %rdi, -0x8(%rbp)
leaq 0x18ce36(%rip), %rax    # 0x29d5cc
cmpl $0x0, (%rax)
je 0x1107a0
jmp 0x11159a
leaq 0x18ce2d(%rip), %rax    # 0x29d5d4
movl $0x0, (%rax)
leaq 0x25bed0(%rip), %rax    # 0x36c684
movl (%rax), %eax
andl $0xc, %eax
cmpl $0x0, %eax
je 0x1107c3
jmp 0x11159a
leaq 0x25bf86(%rip), %rax    # 0x36c750
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x1107de
jp 0x1107de
jmp 0x11159a
leaq 0x25bf7b(%rip), %rax    # 0x36c760
cmpl $0x0, (%rax)
je 0x1107fc
leaq 0x25bf6f(%rip), %rax    # 0x36c760
movl $0x0, (%rax)
jmp 0x11159a
leaq 0xbf651(%rip), %rax     # 0x1cfe54
movl (%rax), %eax
movl %eax, -0x214(%rbp)
movl $0x80000000, %ecx       # imm = 0x80000000
leaq 0x167299(%rip), %rax    # 0x277ab0
cmpq %rcx, (%rax)
jne 0x110826
movl $0x1, -0x214(%rbp)
cmpl $0x1, -0x214(%rbp)
jne 0x11083f
leaq 0x8591e(%rip), %rax     # 0x196154
movq %rax, -0x10(%rbp)
jmp 0x1108c8
cmpl $0x2, -0x214(%rbp)
jne 0x110855
leaq 0x8590d(%rip), %rax     # 0x19615c
movq %rax, -0x10(%rbp)
jmp 0x1108c6
cmpl $0x8000, -0x214(%rbp)   # imm = 0x8000
jne 0x11086e
leaq 0x85900(%rip), %rax     # 0x196168
movq %rax, -0x10(%rbp)
jmp 0x1108c4
cmpl $0x4, -0x214(%rbp)
jne 0x110884
leaq 0x858f3(%rip), %rax     # 0x196171
movq %rax, -0x10(%rbp)
jmp 0x1108c2
cmpl $0x8, -0x214(%rbp)
jne 0x11089a
leaq 0x858e9(%rip), %rax     # 0x19617d
movq %rax, -0x10(%rbp)
jmp 0x1108c0
leaq 0xbf5b7(%rip), %rax     # 0x1cfe58
cmpl $0x0, (%rax)
je 0x1108b3
leaq 0x858db(%rip), %rax     # 0x196188
movq %rax, -0x10(%rbp)
jmp 0x1108be
leaq 0x858ce(%rip), %rax     # 0x196188
movq %rax, -0x10(%rbp)
jmp 0x1108c0
jmp 0x1108c2
jmp 0x1108c4
jmp 0x1108c6
jmp 0x1108c8
leaq 0x18ce91(%rip), %rax    # 0x29d760
movsd (%rax), %xmm0
movq -0x10(%rbp), %rdx
leaq 0x28ab22(%rip), %rdi    # 0x39b400
leaq 0x858ad(%rip), %rsi     # 0x196192
movb $0x1, %al
callq 0x9060
movq -0x8(%rbp), %rdi
leaq 0x28ab09(%rip), %rsi    # 0x39b400
leaq 0x858c6(%rip), %rdx     # 0x1961c4
callq 0x10d750
leaq 0x25be06(%rip), %rax    # 0x36c710
movsd (%rax), %xmm0
movl $0x1, %edi
callq 0x11dd00
leaq 0x18ce41(%rip), %rax    # 0x29d760
movsd (%rax), %xmm0
movsd 0x5e8b5(%rip), %xmm1    # 0x16f1e0
ucomisd %xmm1, %xmm0
jb 0x110996
leaq 0x25bf4c(%rip), %rax    # 0x36c884
movl (%rax), %ecx
leaq 0x25bf3b(%rip), %rax    # 0x36c87c
movl (%rax), %r8d
leaq 0x25bf35(%rip), %rax    # 0x36c880
movl (%rax), %r9d
leaq 0x25bf33(%rip), %rax    # 0x36c888
movl (%rax), %r11d
leaq 0x25bf2d(%rip), %rax    # 0x36c88c
movl (%rax), %r10d
leaq 0x25bf27(%rip), %rax    # 0x36c890
movl (%rax), %eax
leaq 0x28aa8e(%rip), %rdi    # 0x39b400
leaq 0x85860(%rip), %rsi     # 0x1961d9
leaq 0x61b2a(%rip), %rdx     # 0x1724aa
movl %r11d, (%rsp)
movl %r10d, 0x8(%rsp)
movl %eax, 0x10(%rsp)
movb $0x0, %al
callq 0x9060
jmp 0x1109f9
leaq 0x25bee7(%rip), %rax    # 0x36c884
movl (%rax), %ecx
leaq 0x25bed6(%rip), %rax    # 0x36c87c
movl (%rax), %r8d
leaq 0x25bed0(%rip), %rax    # 0x36c880
movl (%rax), %r9d
leaq 0x25bece(%rip), %rax    # 0x36c888
movl (%rax), %r11d
leaq 0x25bec8(%rip), %rax    # 0x36c88c
movl (%rax), %r10d
leaq 0x25bec2(%rip), %rax    # 0x36c890
movl (%rax), %eax
leaq 0x28aa29(%rip), %rdi    # 0x39b400
leaq 0x8583e(%rip), %rsi     # 0x19621c
leaq 0x61ac5(%rip), %rdx     # 0x1724aa
movl %r11d, (%rsp)
movl %r10d, 0x8(%rsp)
movl %eax, 0x10(%rsp)
movb $0x0, %al
callq 0x9060
movq -0x8(%rbp), %rdi
leaq 0x28a9fc(%rip), %rsi    # 0x39b400
leaq 0x85855(%rip), %rdx     # 0x196260
callq 0x10d750
leaq 0x18cc19(%rip), %rax    # 0x29d630
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x110a3c
leaq 0x18cc0a(%rip), %rdi    # 0x29d630
leaq 0x603a8(%rip), %rsi     # 0x170dd5
callq 0x9090
cmpq $0x0, %rax
je 0x110b58
leaq -0x110(%rbp), %rdi
leaq 0xbf41e(%rip), %rax     # 0x1cfe68
movq (%rax), %rdx
leaq 0x7ab36(%rip), %rsi     # 0x18b58a
movb $0x0, %al
callq 0x9060
movl -0x214(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x110a7c
leaq -0x110(%rbp), %rdi
leaq 0x857fd(%rip), %rsi     # 0x196274
callq 0x96a0
movl -0x214(%rbp), %eax
andl $0x8000, %eax           # imm = 0x8000
cmpl $0x0, %eax
je 0x110a9f
leaq -0x110(%rbp), %rdi
leaq 0x857dd(%rip), %rsi     # 0x196277
callq 0x96a0
movl -0x214(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x110ac0
leaq -0x110(%rbp), %rdi
leaq 0x857bf(%rip), %rsi     # 0x19627a
callq 0x96a0
movl -0x214(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x110ae1
leaq -0x110(%rbp), %rdi
leaq 0x857a1(%rip), %rsi     # 0x19627d
callq 0x96a0
movl -0x214(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x110b02
leaq -0x110(%rbp), %rdi
leaq 0x85783(%rip), %rsi     # 0x196280
callq 0x96a0
leaq -0x110(%rbp), %rdi
callq 0x9120
movl %eax, -0x218(%rbp)
cmpl $0x0, -0x218(%rbp)
je 0x110b4a
movl -0x218(%rbp), %eax
subl $0x1, %eax
cltq
movsbl -0x110(%rbp,%rax), %eax
cmpl $0x2b, %eax
jne 0x110b48
movl -0x218(%rbp), %eax
subl $0x1, %eax
cltq
movb $0x20, -0x110(%rbp,%rax)
jmp 0x110b4a
leaq -0x110(%rbp), %rdi
callq 0x9890
jmp 0x110b6b
leaq -0x110(%rbp), %rdi
leaq 0x18caca(%rip), %rsi    # 0x29d630
callq 0x9350
leaq -0x110(%rbp), %rdx
leaq 0x28a887(%rip), %rdi    # 0x39b400
leaq 0x8563b(%rip), %rsi     # 0x1961bb
movb $0x0, %al
callq 0x9060
movq -0x8(%rbp), %rdi
leaq 0x28a86e(%rip), %rsi    # 0x39b400
leaq 0x856ea(%rip), %rdx     # 0x196283
callq 0x10d750
leaq 0x28a85b(%rip), %rdi    # 0x39b400
leaq 0x8560f(%rip), %rsi     # 0x1961bb
leaq 0x18caad(%rip), %rdx    # 0x29d660
movb $0x0, %al
callq 0x9060
movq -0x8(%rbp), %rdi
leaq 0x28a83b(%rip), %rsi    # 0x39b400
leaq 0x856c3(%rip), %rdx     # 0x19628f
callq 0x10d750
leaq 0x28a828(%rip), %rdi    # 0x39b400
leaq 0x855dc(%rip), %rsi     # 0x1961bb
leaq 0x18caaa(%rip), %rdx    # 0x29d690
movb $0x0, %al
callq 0x9060
leaq 0x18cb6c(%rip), %rax    # 0x29d760
movsd (%rax), %xmm0
movsd 0x5e5e0(%rip), %xmm1    # 0x16f1e0
ucomisd %xmm1, %xmm0
jb 0x110c1d
movq -0x8(%rbp), %rdi
leaq 0x28a7ef(%rip), %rsi    # 0x39b400
leaq 0x85685(%rip), %rdx     # 0x19629d
callq 0x10d750
movq -0x8(%rbp), %rdi
leaq 0x8396a(%rip), %rsi     # 0x194592
leaq 0x8567a(%rip), %rdx     # 0x1962a9
callq 0x10d750
leaq -0x110(%rbp), %rdi
leaq 0xbf226(%rip), %rax     # 0x1cfe68
movq (%rax), %rsi
callq 0x9350
leaq -0x110(%rbp), %rdi
callq 0x9890
movl $0x80000000, %ecx       # imm = 0x80000000
leaq 0x166e4e(%rip), %rax    # 0x277ab0
cmpq %rcx, (%rax)
jne 0x110c96
leaq -0x110(%rbp), %rcx
leaq 0x28a78b(%rip), %rdi    # 0x39b400
leaq 0x8563f(%rip), %rsi     # 0x1962bb
leaq 0x28b89d(%rip), %rdx    # 0x39c520
leaq 0x28b836(%rip), %r8     # 0x39c4c0
movb $0x0, %al
callq 0x9060
jmp 0x110ea8
leaq 0x166e13(%rip), %rax    # 0x277ab0
cmpq $0x800, (%rax)          # imm = 0x800
jne 0x110cd5
leaq -0x110(%rbp), %rcx
leaq 0x28a74c(%rip), %rdi    # 0x39b400
leaq 0x8561e(%rip), %rsi     # 0x1962d9
leaq 0x16948e(%rip), %rdx    # 0x27a150
leaq 0x169457(%rip), %r8     # 0x27a120
movb $0x0, %al
callq 0x9060
jmp 0x110ea6
leaq 0x166dd4(%rip), %rax    # 0x277ab0
cmpq $0x1, (%rax)
jne 0x110dac
leaq -0x210(%rbp), %rdi
leaq 0x25be96(%rip), %rax    # 0x36cb8a
movzbl (%rax), %edx
leaq 0x25be8d(%rip), %rax    # 0x36cb8b
movzbl (%rax), %ecx
leaq 0x25be85(%rip), %rax    # 0x36cb8d
movzbl (%rax), %r8d
leaq 0x25be79(%rip), %rax    # 0x36cb8c
movzbl (%rax), %eax
movl %eax, %esi
leaq 0xb8a21(%rip), %rax     # 0x1c9740
movq (%rax,%rsi,8), %r9
leaq 0x25be64(%rip), %rax    # 0x36cb8e
movzwl (%rax), %eax
leaq 0x855c4(%rip), %rsi     # 0x1962f8
movl %eax, (%rsp)
movb $0x0, %al
callq 0x9060
movb $0x0, -0x1fc(%rbp)
leaq 0x28aad4(%rip), %rax    # 0x39b820
cmpb $0x0, (%rax)
je 0x110d7d
leaq -0x210(%rbp), %rdx
leaq -0x110(%rbp), %rcx
leaq 0x28a69a(%rip), %rdi    # 0x39b400
leaq 0x855a4(%rip), %rsi     # 0x196311
leaq 0x28aaac(%rip), %r8     # 0x39b820
movb $0x0, %al
callq 0x9060
jmp 0x110da7
leaq -0x210(%rbp), %rdx
leaq -0x110(%rbp), %rcx
leaq 0x28a66e(%rip), %rdi    # 0x39b400
leaq 0x85578(%rip), %rsi     # 0x196311
leaq 0x8558a(%rip), %r8      # 0x19632a
movb $0x0, %al
callq 0x9060
jmp 0x110ea4
leaq 0x166cfd(%rip), %rax    # 0x277ab0
cmpq $0x4, (%rax)
jne 0x110de8
leaq -0x110(%rbp), %rcx
leaq 0x28a639(%rip), %rdi    # 0x39b400
leaq 0x85569(%rip), %rsi     # 0x196337
leaq 0x28bae9(%rip), %rdx    # 0x39c8be
leaq 0x28bac4(%rip), %r8     # 0x39c8a0
movb $0x0, %al
callq 0x9060
jmp 0x110ea2
leaq 0x166cc1(%rip), %rax    # 0x277ab0
cmpq $0x80, (%rax)
jne 0x110e24
leaq -0x110(%rbp), %rcx
leaq 0x28a5fa(%rip), %rdi    # 0x39b400
leaq 0x85504(%rip), %rsi     # 0x196311
leaq 0x28c17c(%rip), %rdx    # 0x39cf90
leaq 0x28c195(%rip), %r8     # 0x39cfb0
movb $0x0, %al
callq 0x9060
jmp 0x110ea0
movabsq $0x100000000, %rcx      # imm = 0x100000000
leaq 0x166c7b(%rip), %rax    # 0x277ab0
cmpq %rcx, (%rax)
jne 0x110e78
leaq -0x110(%rbp), %rcx
leaq 0x28a5b8(%rip), %rdi    # 0x39b400
leaq 0x85507(%rip), %rsi     # 0x196356
leaq 0x28bf1a(%rip), %rdx    # 0x39cd70
leaq 0x28bf43(%rip), %r8     # 0x39cda0
leaq 0x28bf6c(%rip), %r9     # 0x39cdd0
leaq 0x28bfc5(%rip), %rax    # 0x39ce30
movq %rax, (%rsp)
movb $0x0, %al
callq 0x9060
jmp 0x110e9e
leaq -0x110(%rbp), %rcx
leaq 0x28a57a(%rip), %rdi    # 0x39b400
leaq 0x85484(%rip), %rsi     # 0x196311
leaq 0x836fe(%rip), %r8      # 0x194592
movq %r8, %rdx
movb $0x0, %al
callq 0x9060
jmp 0x110ea0
jmp 0x110ea2
jmp 0x110ea4
jmp 0x110ea6
jmp 0x110ea8
movq -0x8(%rbp), %rdi
leaq 0x28a54d(%rip), %rsi    # 0x39b400
leaq 0x854ca(%rip), %rdx     # 0x196384
callq 0x10d750
leaq 0x28a53a(%rip), %rdi    # 0x39b400
leaq 0x8544c(%rip), %rsi     # 0x196319
leaq 0x18c81c(%rip), %rdx    # 0x29d6f0
leaq 0x18c7e5(%rip), %rcx    # 0x29d6c0
movb $0x0, %al
callq 0x9060
movq -0x8(%rbp), %rdi
leaq 0x28a513(%rip), %rsi    # 0x39b400
leaq 0x854a4(%rip), %rdx     # 0x196398
callq 0x10d750
movsd 0x5e177(%rip), %xmm0    # 0x16f078
leaq 0x25b2a8(%rip), %rax    # 0x36c1b0
mulsd (%rax), %xmm0
movsd 0x606b4(%rip), %xmm1    # 0x1715c8
divsd %xmm1, %xmm0
movsd 0x5e158(%rip), %xmm1    # 0x16f078
leaq 0x25b291(%rip), %rax    # 0x36c1b8
mulsd (%rax), %xmm1
movsd 0x60695(%rip), %xmm2    # 0x1715c8
divsd %xmm2, %xmm1
leaq 0x25b282(%rip), %rax    # 0x36c1c0
movsd (%rax), %xmm2
leaq 0x28a4b7(%rip), %rdi    # 0x39b400
leaq 0x85455(%rip), %rsi     # 0x1963a5
movb $0x3, %al
callq 0x9060
movq -0x8(%rbp), %rdi
leaq 0x28a49e(%rip), %rsi    # 0x39b400
leaq 0x7f343(%rip), %rdx     # 0x1902ac
callq 0x10d750
leaq 0x25b23b(%rip), %rax    # 0x36c1b0
movsd (%rax), %xmm0
leaq 0x25b238(%rip), %rax    # 0x36c1b8
movsd (%rax), %xmm1
leaq 0x25b235(%rip), %rax    # 0x36c1c0
movsd (%rax), %xmm2
callq 0x7fcf0
leaq 0x25b22d(%rip), %rax    # 0x36c1c8
movsd (%rax), %xmm0
leaq 0x25b22a(%rip), %rax    # 0x36c1d0
movsd (%rax), %xmm1
leaq 0x25b227(%rip), %rax    # 0x36c1d8
movsd (%rax), %xmm2
leaq 0x28a444(%rip), %rdi    # 0x39b400
leaq 0x85407(%rip), %rsi     # 0x1963ca
movb $0x3, %al
callq 0x9060
movq -0x8(%rbp), %rdi
leaq 0x28a42b(%rip), %rsi    # 0x39b400
leaq 0x85401(%rip), %rdx     # 0x1963dd
callq 0x10d750
leaq 0x18c760(%rip), %rax    # 0x29d748
movsd (%rax), %xmm0
leaq 0x18c765(%rip), %rax    # 0x29d758
movsd (%rax), %xmm1
leaq 0x18c752(%rip), %rax    # 0x29d750
movsd (%rax), %xmm2
leaq 0x28a3f7(%rip), %rdi    # 0x39b400
leaq 0x853ba(%rip), %rsi     # 0x1963ca
movb $0x3, %al
callq 0x9060
leaq 0x18c742(%rip), %rax    # 0x29d760
movsd (%rax), %xmm0
movsd 0x5e1b6(%rip), %xmm1    # 0x16f1e0
ucomisd %xmm1, %xmm0
jb 0x111049
movq -0x8(%rbp), %rdi
leaq 0x28a3c5(%rip), %rsi    # 0x39b400
leaq 0x853af(%rip), %rdx     # 0x1963f1
callq 0x10d750
jmp 0x111060
movq -0x8(%rbp), %rdi
leaq 0x28a3ac(%rip), %rsi    # 0x39b400
leaq 0x853aa(%rip), %rdx     # 0x196405
callq 0x10d750
movq -0x8(%rbp), %rdi
leaq 0x853af(%rip), %rsi     # 0x19641a
leaq 0x853b5(%rip), %rdx     # 0x196427
callq 0x10d750
leaq 0x18c6e2(%rip), %rax    # 0x29d760
movsd (%rax), %xmm0
movsd 0x5e156(%rip), %xmm1    # 0x16f1e0
ucomisd %xmm1, %xmm0
jb 0x111140
movq -0x8(%rbp), %rdi
leaq 0x18c7d1(%rip), %rsi    # 0x29d870
movl $0x1, %edx
leaq 0x2c8915(%rip), %rcx    # 0x3d99c0
callq 0x12d790
movl %eax, 0x2c897a(%rip)    # 0x3d9a30
movq -0x8(%rbp), %rdi
leaq 0x18c8af(%rip), %rsi    # 0x29d970
movl $0x8000, %edx           # imm = 0x8000
leaq 0x2c8973(%rip), %rcx    # 0x3d9a40
callq 0x12d790
movl %eax, 0x2c89d8(%rip)    # 0x3d9ab0
movq -0x8(%rbp), %rdi
leaq 0x18c98d(%rip), %rsi    # 0x29da70
movl $0x2, %edx
leaq 0x2c89d1(%rip), %rcx    # 0x3d9ac0
callq 0x12d790
movl %eax, 0x2c8a36(%rip)    # 0x3d9b30
movq -0x8(%rbp), %rdi
leaq 0x18ca6b(%rip), %rsi    # 0x29db70
movl $0x4, %edx
leaq 0x2c8a2f(%rip), %rcx    # 0x3d9b40
callq 0x12d790
movl %eax, 0x2c8a94(%rip)    # 0x3d9bb0
movq -0x8(%rbp), %rdi
leaq 0x18cb49(%rip), %rsi    # 0x29dc70
movl $0x8, %edx
leaq 0x2c8a8d(%rip), %rcx    # 0x3d9bc0
callq 0x12d790
movl %eax, 0x2c8af2(%rip)    # 0x3d9c30
jmp 0x111162
movq -0x8(%rbp), %rdi
leaq 0x18c625(%rip), %rsi    # 0x29d770
movl $0xc00f, %edx           # imm = 0xC00F
leaq 0x2c87e9(%rip), %rcx    # 0x3d9940
callq 0x12d790
movl %eax, 0x2c884e(%rip)    # 0x3d99b0
leaq 0x25b5e7(%rip), %rax    # 0x36c750
movsd (%rax), %xmm0
leaq 0x25b5e4(%rip), %rax    # 0x36c758
movsd (%rax), %xmm1
callq 0x12f2d0
leaq 0x25b700(%rip), %rax    # 0x36c884
movl (%rax), %edx
leaq 0x25b6ef(%rip), %rax    # 0x36c87c
movl (%rax), %ecx
leaq 0x25b6ea(%rip), %rax    # 0x36c880
movl (%rax), %r8d
leaq 0x25b6e8(%rip), %rax    # 0x36c888
movl (%rax), %r9d
leaq 0x25b6e2(%rip), %rax    # 0x36c88c
movl (%rax), %r10d
leaq 0x25b6dc(%rip), %rax    # 0x36c890
cvtsi2sdl (%rax), %xmm0
leaq 0x25b6d9(%rip), %rax    # 0x36c898
addsd (%rax), %xmm0
leaq 0x28a236(%rip), %rdi    # 0x39b400
leaq 0x8526b(%rip), %rsi     # 0x19643c
leaq 0x8527c(%rip), %rax     # 0x196454
movl %r10d, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x1, %al
callq 0x9060
movq -0x8(%rbp), %rdi
leaq 0x28a20d(%rip), %rsi    # 0x39b400
leaq 0x85263(%rip), %rdx     # 0x19645d
callq 0x10d750
leaq 0x18c55a(%rip), %rax    # 0x29d760
movsd (%rax), %xmm0
movsd 0x7d08e(%rip), %xmm1    # 0x18e2a0
ucomisd %xmm1, %xmm0
jb 0x1112f3
cmpl $0x0, 0x2c890d(%rip)    # 0x3d9b30
je 0x1112f3
movb $0x0, -0x110(%rbp)
leaq -0x110(%rbp), %rdi
leaq 0x85231(%rip), %rsi     # 0x19646f
xorps %xmm0, %xmm0
movb $0x1, %al
callq 0x9060
leaq -0x110(%rbp), %rsi
leaq 0x28a1aa(%rip), %rdi    # 0x39b400
callq 0x96a0
leaq -0x110(%rbp), %rdi
leaq 0x85211(%rip), %rsi     # 0x19647a
xorps %xmm0, %xmm0
movb $0x1, %al
callq 0x9060
leaq -0x110(%rbp), %rsi
leaq 0x28a17f(%rip), %rdi    # 0x39b400
callq 0x96a0
leaq -0x110(%rbp), %rdi
leaq 0x851f1(%rip), %rsi     # 0x196485
xorps %xmm0, %xmm0
movb $0x1, %al
callq 0x9060
leaq -0x110(%rbp), %rsi
leaq 0x28a154(%rip), %rdi    # 0x39b400
callq 0x96a0
leaq -0x110(%rbp), %rdi
leaq 0x851d1(%rip), %rsi     # 0x196490
xorps %xmm0, %xmm0
movb $0x1, %al
callq 0x9060
leaq -0x110(%rbp), %rsi
leaq 0x28a129(%rip), %rdi    # 0x39b400
callq 0x96a0
movq -0x8(%rbp), %rdi
leaq 0x28a119(%rip), %rsi    # 0x39b400
leaq 0x851ad(%rip), %rdx     # 0x19649b
callq 0x10d750
movq -0x8(%rbp), %rdi
leaq 0x74ae6(%rip), %rsi     # 0x185de4
leaq 0x7efa7(%rip), %rdx     # 0x1902ac
callq 0x10d750
leaq 0x25af83(%rip), %rax    # 0x36c294
movss (%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x111336
jp 0x111336
leaq 0x25af72(%rip), %rax    # 0x36c298
movss (%rax), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x111336
jp 0x111336
jmp 0x111380
leaq 0x25af57(%rip), %rax    # 0x36c294
movss (%rax), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x25af4c(%rip), %rax    # 0x36c298
movss (%rax), %xmm1
cvtss2sd %xmm1, %xmm1
leaq 0x28a0a5(%rip), %rdi    # 0x39b400
leaq 0x8514d(%rip), %rsi     # 0x1964af
movb $0x2, %al
callq 0x9060
movq -0x8(%rbp), %rdi
leaq 0x28a08c(%rip), %rsi    # 0x39b400
leaq 0x7ef31(%rip), %rdx     # 0x1902ac
callq 0x10d750
leaq 0x25b149(%rip), %rax    # 0x36c4d0
cmpl $0x0, (%rax)
je 0x1113c3
leaq 0x25af3d(%rip), %rax    # 0x36c2d0
movsd (%rax), %xmm0
leaq 0x28a062(%rip), %rdi    # 0x39b400
leaq 0x85137(%rip), %rsi     # 0x1964dc
movb $0x1, %al
callq 0x9060
movq -0x8(%rbp), %rdi
leaq 0x28a049(%rip), %rsi    # 0x39b400
leaq 0x7eeee(%rip), %rdx     # 0x1902ac
callq 0x10d750
leaq 0x25b10a(%rip), %rax    # 0x36c4d4
cmpl $0x0, (%rax)
je 0x111406
leaq 0x25af0a(%rip), %rax    # 0x36c2e0
movsd (%rax), %xmm0
leaq 0x28a01f(%rip), %rdi    # 0x39b400
leaq 0x85112(%rip), %rsi     # 0x1964fa
movb $0x1, %al
callq 0x9060
movq -0x8(%rbp), %rdi
leaq 0x28a006(%rip), %rsi    # 0x39b400
leaq 0x7eeab(%rip), %rdx     # 0x1902ac
callq 0x10d750
leaq 0x25b0cb(%rip), %rax    # 0x36c4d8
cmpl $0x0, (%rax)
je 0x111449
leaq 0x25aecf(%rip), %rax    # 0x36c2e8
movsd (%rax), %xmm0
leaq 0x289fdc(%rip), %rdi    # 0x39b400
leaq 0x850df(%rip), %rsi     # 0x19650a
movb $0x1, %al
callq 0x9060
movq -0x8(%rbp), %rdi
leaq 0x289fc3(%rip), %rsi    # 0x39b400
leaq 0x7ee68(%rip), %rdx     # 0x1902ac
callq 0x10d750
leaq 0x25b090(%rip), %rax    # 0x36c4e0
cmpl $0x0, (%rax)
je 0x11148c
leaq 0x25aed4(%rip), %rax    # 0x36c330
movsd (%rax), %xmm0
leaq 0x289f99(%rip), %rdi    # 0x39b400
leaq 0x850b6(%rip), %rsi     # 0x196524
movb $0x1, %al
callq 0x9060
movq -0x8(%rbp), %rdi
leaq 0x289f80(%rip), %rsi    # 0x39b400
leaq 0x7ee25(%rip), %rdx     # 0x1902ac
callq 0x10d750
leaq 0x18c2d9(%rip), %rax    # 0x29d76c
cmpl $0x0, (%rax)
je 0x1114c4
leaq 0x289f61(%rip), %rdi    # 0x39b400
leaq 0x8509d(%rip), %rsi     # 0x196543
movb $0x0, %al
callq 0x9060
movq -0x8(%rbp), %rdi
leaq 0x289f48(%rip), %rsi    # 0x39b400
leaq 0x7eded(%rip), %rdx     # 0x1902ac
callq 0x10d750
leaq 0x18c101(%rip), %rax    # 0x29d5cc
movl $0x1, (%rax)
leaq 0x18c0fc(%rip), %rax    # 0x29d5d4
movl $0x0, (%rax)
leaq 0x18c063(%rip), %rax    # 0x29d548
cmpq $0x0, (%rax)
je 0x111551
leaq 0x18c04e(%rip), %rax    # 0x29d540
movq (%rax), %rax
movq %rax, -0x220(%rbp)
leaq 0x18c125(%rip), %rax    # 0x29d628
movl (%rax), %eax
movl %eax, -0x224(%rbp)
leaq 0x18c036(%rip), %rax    # 0x29d548
movq (%rax), %rcx
leaq 0x18c024(%rip), %rax    # 0x29d540
movq %rcx, (%rax)
leaq 0x18c102(%rip), %rax    # 0x29d628
movl $0x12e, (%rax)          # imm = 0x12E
callq 0x10e360
movq -0x220(%rbp), %rcx
leaq 0x18c001(%rip), %rax    # 0x29d540
movq %rcx, (%rax)
movl -0x224(%rbp), %ecx
leaq 0x18c0d9(%rip), %rax    # 0x29d628
movl %ecx, (%rax)
movq -0x8(%rbp), %rdi
leaq 0x83036(%rip), %rsi     # 0x194592
leaq 0x85022(%rip), %rdx     # 0x196585
callq 0x10d750
leaq 0x18bfd9(%rip), %rax    # 0x29d548
cmpq $0x0, (%rax)
je 0x11159a
movq -0x8(%rbp), %rax
leaq 0x18bfc8(%rip), %rcx    # 0x29d548
cmpq (%rcx), %rax
jne 0x11159a
leaq 0x18c078(%rip), %rax    # 0x29d604
cmpl $0x0, (%rax)
je 0x11159a
movq -0x8(%rbp), %rdi
callq 0x9430
addq $0x240, %rsp            # imm = 0x240
popq %rbp
retq
nopw %cs:(%rax,%rax)