// File: /workspace/github_cpp_makefile_star2_O1/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 0x177f97(%rip), %rax    # 0x23e3ec
cmpl $0x0, (%rax)
je 0xc646c
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x177f81(%rip), %rax    # 0x23e3f4
movl $0x0, (%rax)
leaq 0x247024(%rip), %rax    # 0x30d4a4
testb $0xc, (%rax)
jne 0xc645a
leaq 0x2470e4(%rip), %rax    # 0x30d570
movsd (%rax), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xc649c
jnp 0xc645a
leaq 0x2470dd(%rip), %rax    # 0x30d580
cmpl $0x0, (%rax)
je 0xc64b0
movl $0x0, (%rax)
jmp 0xc645a
movq %rdi, %rbx
leaq 0x152416(%rip), %rcx    # 0x2188d0
movl $0x80000000, %eax       # imm = 0x80000000
movl $0x1, %r15d
cmpq %rax, (%rcx)
je 0xc64d4
leaq 0xaa7a3(%rip), %rax     # 0x170c74
movl (%rax), %r15d
leal -0x1(%r15), %eax
cmpl $0x7, %eax
ja 0xc64f6
leaq 0x64970(%rip), %rcx     # 0x12ae54
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x6d008(%rip), %rdx     # 0x1334fc
jmp 0xc652a
cmpl $0x8000, %r15d          # imm = 0x8000
jne 0xc6508
leaq 0x6d00a(%rip), %rdx     # 0x133510
jmp 0xc652a
leaq 0x6d021(%rip), %rdx     # 0x133530
jmp 0xc652a
leaq 0x6d001(%rip), %rdx     # 0x133519
jmp 0xc652a
leaq 0x6d004(%rip), %rdx     # 0x133525
jmp 0xc652a
leaq 0x6cfda(%rip), %rdx     # 0x133504
leaq 0x17804f(%rip), %r12    # 0x23e580
movsd (%r12), %xmm0
leaq 0x275ce2(%rip), %r14    # 0x33c220
leaq 0x6cff5(%rip), %rsi     # 0x13353a
movq %r14, %rdi
movb $0x1, %al
callq 0x9060
leaq 0x6d016(%rip), %rdx     # 0x13356c
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc3936
leaq 0x246fc8(%rip), %rax    # 0x30d530
movsd (%rax), %xmm0
movl $0x1, %edi
callq 0xd0c46
movsd (%r12), %xmm0
ucomisd 0x45484(%rip), %xmm0    # 0x10ba08
leaq 0x247119(%rip), %rax    # 0x30d6a4
movl (%rax), %ecx
leaq 0x247108(%rip), %rax    # 0x30d69c
movl (%rax), %r8d
leaq 0x247102(%rip), %rax    # 0x30d6a0
movl (%rax), %r9d
leaq 0x247100(%rip), %rax    # 0x30d6a8
movl (%rax), %r10d
leaq 0x2470fa(%rip), %rax    # 0x30d6ac
movl (%rax), %r11d
leaq 0x2470f4(%rip), %rdx    # 0x30d6b0
leaq 0x6d001(%rip), %rax     # 0x1335c4
leaq 0x6cfb7(%rip), %rsi     # 0x133581
cmovbq %rax, %rsi
movl (%rdx), %r13d
subq $0x8, %rsp
leaq 0x474dd(%rip), %rdx     # 0x10dab9
movq %r14, %rdi
xorl %eax, %eax
pushq %r13
pushq %r11
pushq %r10
callq 0x9060
addq $0x20, %rsp
leaq 0x6d011(%rip), %rdx     # 0x133608
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc3936
leaq 0x177e47(%rip), %rax    # 0x23e450
cmpb $0x0, (%rax)
je 0xc662a
leaq 0x177e3b(%rip), %rdi    # 0x23e450
leaq 0x447bc(%rip), %rsi     # 0x10add8
callq 0x9090
testq %rax, %rax
je 0xc6731
leaq 0xaa657(%rip), %rax     # 0x170c88
movq (%rax), %rdx
leaq 0x61ac0(%rip), %rsi     # 0x1280fb
leaq -0x130(%rbp), %rdi
xorl %eax, %eax
callq 0x9060
testb $0x1, %r15b
je 0xc666d
leaq -0x130(%rbp), %rdi
callq 0x9120
movw $0x2b47, -0x130(%rbp,%rax) # imm = 0x2B47
movb $0x0, -0x12e(%rbp,%rax)
testw %r15w, %r15w
jns 0xc6691
leaq -0x130(%rbp), %rdi
callq 0x9120
movw $0x2b53, -0x130(%rbp,%rax) # imm = 0x2B53
movb $0x0, -0x12e(%rbp,%rax)
testb $0x2, %r15b
je 0xc66b5
leaq -0x130(%rbp), %rdi
callq 0x9120
movw $0x2b52, -0x130(%rbp,%rax) # imm = 0x2B52
movb $0x0, -0x12e(%rbp,%rax)
testb $0x4, %r15b
je 0xc66d9
leaq -0x130(%rbp), %rdi
callq 0x9120
movw $0x2b45, -0x130(%rbp,%rax) # imm = 0x2B45
movb $0x0, -0x12e(%rbp,%rax)
testb $0x8, %r15b
je 0xc66fd
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 0xc6723
decl %eax
cltq
cmpb $0x2b, -0x130(%rbp,%rax)
jne 0xc6723
movb $0x20, -0x130(%rbp,%rax)
leaq -0x130(%rbp), %rdi
callq 0x9899
jmp 0xc6744
leaq 0x177d18(%rip), %rsi    # 0x23e450
leaq -0x130(%rbp), %rdi
callq 0x9340
leaq 0x275ad5(%rip), %r14    # 0x33c220
leaq 0x6ce11(%rip), %r15     # 0x133563
leaq -0x130(%rbp), %rdx
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x9060
leaq 0x6cebe(%rip), %rdx     # 0x13362b
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc3936
leaq 0x177d01(%rip), %rdx    # 0x23e480
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x9060
leaq 0x6cea4(%rip), %rdx     # 0x133637
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc3936
leaq 0x177d0b(%rip), %rdx    # 0x23e4b0
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x9060
movsd (%r12), %xmm0
ucomisd 0x45248(%rip), %xmm0    # 0x10ba08
jb 0xc67d8
leaq 0x275a57(%rip), %rsi    # 0x33c220
leaq 0x6ce75(%rip), %rdx     # 0x133645
movq %rbx, %rdi
callq 0xc3936
leaq 0x6b1c7(%rip), %rsi     # 0x1319a6
leaq 0x6ce6b(%rip), %rdx     # 0x133651
movq %rbx, %rdi
callq 0xc3936
leaq 0xaa493(%rip), %rax     # 0x170c88
movq (%rax), %rsi
leaq -0x130(%rbp), %r14
movq %r14, %rdi
callq 0x9340
movq %r14, %rdi
callq 0x9899
leaq 0x1520ba(%rip), %rax    # 0x2188d0
movq (%rax), %rax
cmpq $0x7ff, %rax            # imm = 0x7FF
jg 0xc6862
cmpq $0x1, %rax
je 0xc68b0
cmpq $0x4, %rax
je 0xc6985
cmpq $0x80, %rax
jne 0xc6961
leaq 0x2759d8(%rip), %rdi    # 0x33c220
leaq 0x6ce6a(%rip), %rsi     # 0x1336b9
leaq 0x27755a(%rip), %rdx    # 0x33ddb0
leaq 0x277573(%rip), %r8     # 0x33ddd0
jmp 0xc6a03
cmpq $0x800, %rax            # imm = 0x800
je 0xc6940
movabsq $0x100000000, %rcx      # imm = 0x100000000
cmpq %rcx, %rax
je 0xc69a3
movl $0x80000000, %ecx       # imm = 0x80000000
cmpq %rcx, %rax
jne 0xc6961
leaq 0x27598a(%rip), %rdi    # 0x33c220
leaq 0x6cdc6(%rip), %rsi     # 0x133663
leaq 0x276a9c(%rip), %rdx    # 0x33d340
leaq 0x276a35(%rip), %r8     # 0x33d2e0
jmp 0xc6a03
leaq 0x2470f3(%rip), %rax    # 0x30d9aa
movzbl (%rax), %edx
leaq 0x2470ea(%rip), %rax    # 0x30d9ab
movzbl (%rax), %ecx
leaq 0x2470e2(%rip), %rax    # 0x30d9ad
movzbl (%rax), %r8d
leaq 0x2470d6(%rip), %rax    # 0x30d9ac
movzbl (%rax), %eax
leaq 0xa3e60(%rip), %rsi     # 0x16a740
movq (%rsi,%rax,8), %r9
leaq 0x2470c3(%rip), %rax    # 0x30d9ae
movzwl (%rax), %r10d
subq $0x8, %rsp
leaq 0x6cda6(%rip), %rsi     # 0x1336a0
leaq -0x230(%rbp), %r14
movq %r14, %rdi
xorl %eax, %eax
pushq %r10
callq 0x9060
addq $0x10, %rsp
movb $0x0, 0x14(%r14)
leaq 0x275d23(%rip), %rax    # 0x33c640
cmpb $0x0, (%rax)
je 0xc69e7
leaq 0x2758f3(%rip), %rdi    # 0x33c220
leaq 0x6cd85(%rip), %rsi     # 0x1336b9
leaq 0x275d05(%rip), %r8     # 0x33c640
jmp 0xc69fc
leaq 0x2758d9(%rip), %rdi    # 0x33c220
leaq 0x6cd33(%rip), %rsi     # 0x133681
leaq 0x15461b(%rip), %rdx    # 0x21af70
leaq 0x1545e4(%rip), %r8     # 0x21af40
jmp 0xc6a03
leaq 0x2758b8(%rip), %rdi    # 0x33c220
leaq 0x6cd4a(%rip), %rsi     # 0x1336b9
leaq 0x6b030(%rip), %rdx     # 0x1319a6
leaq -0x130(%rbp), %rcx
movq %rdx, %r8
jmp 0xc6a0a
leaq 0x275894(%rip), %rdi    # 0x33c220
leaq 0x6cd4c(%rip), %rsi     # 0x1336df
leaq 0x276d44(%rip), %rdx    # 0x33d6de
leaq 0x276d1f(%rip), %r8     # 0x33d6c0
jmp 0xc6a03
subq $0x8, %rsp
leaq 0x2772a2(%rip), %r10    # 0x33dc50
leaq 0x27586b(%rip), %rdi    # 0x33c220
leaq 0x6cd42(%rip), %rsi     # 0x1336fe
leaq 0x2771cd(%rip), %rdx    # 0x33db90
leaq 0x2771f6(%rip), %r8     # 0x33dbc0
leaq 0x27721f(%rip), %r9     # 0x33dbf0
leaq -0x130(%rbp), %rcx
xorl %eax, %eax
pushq %r10
callq 0x9060
addq $0x10, %rsp
jmp 0xc6a11
leaq 0x275832(%rip), %rdi    # 0x33c220
leaq 0x6ccc4(%rip), %rsi     # 0x1336b9
leaq 0x6ccd6(%rip), %r8      # 0x1336d2
leaq -0x230(%rbp), %rdx
leaq -0x130(%rbp), %rcx
xorl %eax, %eax
callq 0x9060
leaq 0x275808(%rip), %r14    # 0x33c220
leaq 0x6cd0d(%rip), %rdx     # 0x13372c
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc3936
leaq 0x6cc90(%rip), %rsi     # 0x1336c1
leaq 0x177ad8(%rip), %rdx    # 0x23e510
leaq 0x177aa1(%rip), %rcx    # 0x23e4e0
movq %r14, %rdi
xorl %eax, %eax
callq 0x9060
leaq 0x6ccf0(%rip), %rdx     # 0x133740
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc3936
leaq 0x24656e(%rip), %r15    # 0x30cfd0
movsd 0x44db6(%rip), %xmm1    # 0x10b820
movsd (%r15), %xmm0
mulsd %xmm1, %xmm0
movsd 0x44d9d(%rip), %xmm2    # 0x10b818
leaq 0x246556(%rip), %r13    # 0x30cfd8
mulsd (%r13), %xmm1
divsd %xmm2, %xmm0
divsd %xmm2, %xmm1
leaq 0x246549(%rip), %r12    # 0x30cfe0
movsd (%r12), %xmm2
leaq 0x6cca9(%rip), %rsi     # 0x13374d
movq %r14, %rdi
movb $0x3, %al
callq 0x9060
leaq 0x66c0b(%rip), %rdx     # 0x12d6c0
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc3936
movsd (%r15), %xmm0
movsd (%r13), %xmm1
movsd (%r12), %xmm2
callq 0x5c9da
leaq 0x24650b(%rip), %rax    # 0x30cfe8
movsd (%rax), %xmm0
leaq 0x246508(%rip), %rax    # 0x30cff0
movsd (%rax), %xmm1
leaq 0x246505(%rip), %rax    # 0x30cff8
movsd (%rax), %xmm2
leaq 0x6cc74(%rip), %r15     # 0x133772
movq %r14, %rdi
movq %r15, %rsi
movb $0x3, %al
callq 0x9060
leaq 0x6cc73(%rip), %rdx     # 0x133785
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc3936
leaq 0x177a44(%rip), %rax    # 0x23e568
movsd (%rax), %xmm0
leaq 0x177a49(%rip), %rax    # 0x23e578
movsd (%rax), %xmm1
leaq 0x177a36(%rip), %rax    # 0x23e570
movsd (%rax), %xmm2
movq %r14, %rdi
movq %r15, %rsi
movb $0x3, %al
callq 0x9060
leaq 0x177a2e(%rip), %r15    # 0x23e580
movsd (%r15), %xmm0
ucomisd 0x44ea9(%rip), %xmm0    # 0x10ba08
leaq 0x6cc47(%rip), %rax     # 0x1337ad
leaq 0x6cc2c(%rip), %rdx     # 0x133799
cmovbq %rax, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc3936
leaq 0x6cc3f(%rip), %rsi     # 0x1337c2
leaq 0x6cc45(%rip), %rdx     # 0x1337cf
movq %rbx, %rdi
callq 0xc3936
movsd (%r15), %xmm0
ucomisd 0x44e69(%rip), %xmm0    # 0x10ba08
jae 0xc6bc7
leaq 0x1779e8(%rip), %rsi    # 0x23e590
leaq 0x2b3b41(%rip), %rcx    # 0x37a6f0
movq %rbx, %rdi
movl $0xc00f, %edx           # imm = 0xC00F
callq 0xdbe4d
movl %eax, 0x2b3b9e(%rip)    # 0x37a760
jmp 0xc6c6c
leaq 0x177ac2(%rip), %rsi    # 0x23e690
leaq 0x2b3b9b(%rip), %rcx    # 0x37a770
movq %rbx, %rdi
movl $0x1, %edx
callq 0xdbe4d
movl %eax, 0x2b3bf8(%rip)    # 0x37a7e0
leaq 0x177ba1(%rip), %rsi    # 0x23e790
leaq 0x2b3bfa(%rip), %rcx    # 0x37a7f0
movq %rbx, %rdi
movl $0x8000, %edx           # imm = 0x8000
callq 0xdbe4d
movl %eax, 0x2b3c57(%rip)    # 0x37a860
leaq 0x177c80(%rip), %rsi    # 0x23e890
leaq 0x2b3c59(%rip), %rcx    # 0x37a870
movq %rbx, %rdi
movl $0x2, %edx
callq 0xdbe4d
movl %eax, 0x2b3cb6(%rip)    # 0x37a8e0
leaq 0x177d5f(%rip), %rsi    # 0x23e990
leaq 0x2b3cb8(%rip), %rcx    # 0x37a8f0
movq %rbx, %rdi
movl $0x4, %edx
callq 0xdbe4d
movl %eax, 0x2b3d15(%rip)    # 0x37a960
leaq 0x177e3e(%rip), %rsi    # 0x23ea90
leaq 0x2b3d17(%rip), %rcx    # 0x37a970
movq %rbx, %rdi
movl $0x8, %edx
callq 0xdbe4d
movl %eax, 0x2b3d74(%rip)    # 0x37a9e0
leaq 0x2468fd(%rip), %rax    # 0x30d570
movsd (%rax), %xmm0
leaq 0x2468fa(%rip), %rax    # 0x30d578
movsd (%rax), %xmm1
callq 0xddabb
leaq 0x246a16(%rip), %rax    # 0x30d6a4
movl (%rax), %edx
leaq 0x246a05(%rip), %rax    # 0x30d69c
movl (%rax), %ecx
leaq 0x246a00(%rip), %rax    # 0x30d6a0
movl (%rax), %r8d
leaq 0x2469fe(%rip), %rax    # 0x30d6a8
movl (%rax), %r9d
leaq 0x2469fc(%rip), %rax    # 0x30d6b0
xorps %xmm0, %xmm0
cvtsi2sdl (%rax), %xmm0
leaq 0x2469ea(%rip), %rax    # 0x30d6ac
movl (%rax), %r10d
leaq 0x2469ec(%rip), %rax    # 0x30d6b8
addsd (%rax), %xmm0
leaq 0x6cb25(%rip), %r11     # 0x1337fc
leaq 0x275542(%rip), %r14    # 0x33c220
leaq 0x6caff(%rip), %rsi     # 0x1337e4
movq %r14, %rdi
movb $0x1, %al
pushq %r11
pushq %r10
callq 0x9060
addq $0x10, %rsp
leaq 0x6cb07(%rip), %rdx     # 0x133805
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc3936
movsd (%r15), %xmm0
ucomisd 0x6496a(%rip), %xmm0    # 0x12b680
jb 0xc6dcd
cmpl $0x0, 0x2b3bbd(%rip)    # 0x37a8e0
je 0xc6dcd
leaq -0x130(%rbp), %r14
movb $0x0, (%r14)
leaq 0x6cadc(%rip), %rsi     # 0x133817
xorpd %xmm0, %xmm0
movq %r14, %rdi
movb $0x1, %al
callq 0x9060
leaq 0x2754d0(%rip), %r15    # 0x33c220
movq %r15, %rdi
movq %r14, %rsi
callq 0x96c0
leaq 0x6cac0(%rip), %rsi     # 0x133822
xorpd %xmm0, %xmm0
movq %r14, %rdi
movb $0x1, %al
callq 0x9060
movq %r15, %rdi
movq %r14, %rsi
callq 0x96c0
leaq 0x6caab(%rip), %rsi     # 0x13382d
xorpd %xmm0, %xmm0
movq %r14, %rdi
movb $0x1, %al
callq 0x9060
movq %r15, %rdi
movq %r14, %rsi
callq 0x96c0
leaq 0x6ca96(%rip), %rsi     # 0x133838
xorpd %xmm0, %xmm0
movq %r14, %rdi
movb $0x1, %al
callq 0x9060
movq %r15, %rdi
movq %r14, %rsi
callq 0x96c0
leaq 0x6ca81(%rip), %rdx     # 0x133843
movq %rbx, %rdi
movq %r15, %rsi
callq 0xc3936
leaq 0x5bca0(%rip), %rsi     # 0x122a74
leaq 0x668e5(%rip), %rdx     # 0x12d6c0
movq %rbx, %rdi
callq 0xc3936
leaq 0x2462ca(%rip), %rax    # 0x30d0b4
movss (%rax), %xmm0
xorps %xmm2, %xmm2
ucomiss %xmm2, %xmm0
leaq 0x2462bd(%rip), %rax    # 0x30d0b8
movss (%rax), %xmm1
jne 0xc6e0a
jp 0xc6e0a
ucomiss %xmm2, %xmm1
jne 0xc6e0a
jnp 0xc6e3c
cvtss2sd %xmm0, %xmm0
cvtss2sd %xmm1, %xmm1
leaq 0x275407(%rip), %r14    # 0x33c220
leaq 0x6ca37(%rip), %rsi     # 0x133857
movq %r14, %rdi
movb $0x2, %al
callq 0x9060
leaq 0x6688f(%rip), %rdx     # 0x12d6c0
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc3936
leaq 0x2464ad(%rip), %rax    # 0x30d2f0
cmpl $0x0, (%rax)
je 0xc6e7d
leaq 0x2462a1(%rip), %rax    # 0x30d0f0
movsd (%rax), %xmm0
leaq 0x2753c6(%rip), %r14    # 0x33c220
leaq 0x6ca23(%rip), %rsi     # 0x133884
movq %r14, %rdi
movb $0x1, %al
callq 0x9060
leaq 0x6684e(%rip), %rdx     # 0x12d6c0
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc3936
leaq 0x246470(%rip), %rax    # 0x30d2f4
cmpl $0x0, (%rax)
je 0xc6ebe
leaq 0x246270(%rip), %rax    # 0x30d100
movsd (%rax), %xmm0
leaq 0x275385(%rip), %r14    # 0x33c220
leaq 0x6ca00(%rip), %rsi     # 0x1338a2
movq %r14, %rdi
movb $0x1, %al
callq 0x9060
leaq 0x6680d(%rip), %rdx     # 0x12d6c0
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc3936
leaq 0x246433(%rip), %rax    # 0x30d2f8
cmpl $0x0, (%rax)
je 0xc6eff
leaq 0x246237(%rip), %rax    # 0x30d108
movsd (%rax), %xmm0
leaq 0x275344(%rip), %r14    # 0x33c220
leaq 0x6c9cf(%rip), %rsi     # 0x1338b2
movq %r14, %rdi
movb $0x1, %al
callq 0x9060
leaq 0x667cc(%rip), %rdx     # 0x12d6c0
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc3936
leaq 0x2463fa(%rip), %rax    # 0x30d300
cmpl $0x0, (%rax)
je 0xc6f40
leaq 0x24623e(%rip), %rax    # 0x30d150
movsd (%rax), %xmm0
leaq 0x275303(%rip), %r14    # 0x33c220
leaq 0x6c9a8(%rip), %rsi     # 0x1338cc
movq %r14, %rdi
movb $0x1, %al
callq 0x9060
leaq 0x6678b(%rip), %rdx     # 0x12d6c0
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc3936
leaq 0x177645(%rip), %rax    # 0x23e58c
cmpl $0x0, (%rax)
je 0xc6f79
leaq 0x2752cd(%rip), %r14    # 0x33c220
leaq 0x6c991(%rip), %rsi     # 0x1338eb
movl $0x42, %edx
movq %r14, %rdi
callq 0x92b0
leaq 0x66752(%rip), %rdx     # 0x12d6c0
movq %rbx, %rdi
movq %r14, %rsi
callq 0xc3936
leaq 0x17746c(%rip), %rax    # 0x23e3ec
movl $0x1, (%rax)
leaq 0x177467(%rip), %rax    # 0x23e3f4
movl $0x0, (%rax)
leaq 0x1773ce(%rip), %r14    # 0x23e368
movq (%r14), %rax
testq %rax, %rax
je 0xc6fd5
leaq 0x1773b7(%rip), %r15    # 0x23e360
movq (%r15), %r12
leaq 0x177495(%rip), %r13    # 0x23e448
movl (%r13), %r14d
movq %rax, (%r15)
movl $0x12e, (%r13)          # imm = 0x12E
callq 0xc438a
movq %r12, (%r15)
movl %r14d, (%r13)
leaq 0x177393(%rip), %r14    # 0x23e368
leaq 0x6a9ca(%rip), %rsi     # 0x1319a6
leaq 0x6c94a(%rip), %rdx     # 0x13392d
movq %rbx, %rdi
callq 0xc3936
movq (%r14), %rax
testq %rax, %rax
je 0xc645a
cmpq %rbx, %rax
jne 0xc645a
leaq 0x17741d(%rip), %rax    # 0x23e424
cmpl $0x0, (%rax)
je 0xc645a
movq %rbx, %rdi
callq 0x9420
jmp 0xc645a