// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: adjust_tz(int)
int adjust_tz(int why)
{
double st;
double jd;
int round_time;
static int last_why;

   // This routine adjusts the receiver time for the time zone and
   // various astronomical time scales. It sets the pri_xxxx variables to
   // the desired local time / astronomical time.
   //
//jd_utc = jdate(1873,12,29) + 0.50;
//jd_gps = jd_utc + jtime(0,0,utc_offset,0.0);


// dst_ofs = 0;
   jd = 0.0;
   round_time = 0;
   have_local_time = 0;

   jd_astro = jd_display = jd_local;
   if(use_gmst || use_lmst || use_merc || use_msd || use_pluto || use_ven || use_bessel) {
      if(use_msd) {
         st = jd_astro = mars_date(jd_tt);
         st = st - (int) st;
         st *= 24.0;
      }
      else if(use_ven || use_merc || use_pluto) {
         st = jd_astro = planet_date(jd_gps+jtime(0,0,0,TSX_TWEAK));
         st = st - (int) st;
         st *= 24.0;
      }
      else if(use_bessel) {
         st = bessel_date(jd_utc);  // bessel_date returns bessel date offset by year 1900
         jd_astro = 1900.0 + st;    // true bessel date

         st = st - (int) st;
         gregorian(0, jd_utc);
         st = jdate(g_year, 1, 1) + (st * 365.242198781);

         st = st - (int) st;
         st *= 24.0;
      }
      else if(use_gmst) st = gmst(jd_utc+jtime(0,0,0,TSX_TWEAK), use_gmst-1);
      else              st = lmst(jd_utc+jtime(0,0,0,TSX_TWEAK), use_lmst-1);

      pri_hours = (int) st;
      st = (st - pri_hours);       // decimal hour
      st *= 60.0;

      pri_minutes = (int) st;
      st = (st - pri_minutes);     // decimal minutes
      st *= 60.0;

      pri_seconds = (int) st;
      st = (st - pri_seconds);     // decimal seconds
      st_secs = st;                // remainder seconds

      pri_frac = st_secs;

      strcpy(tz_string, std_string);
      round_time = 1;
   }
   else {
//pri_year = 2006;  // Astronomical time scale test data from SOFA
//pri_month= 1;
//pri_day= 15;
//pri_hours = 21;
//pri_minutes = 24;
//pri_seconds = 37+14;
//pri_frac = 0.50;
      if(use_tai) {
         jd = tai_time(jd_gps);
         strcpy(tz_string, std_string);
      }
      else if(use_tt) {
         jd = jd_tt;  // TT is 51.184 seconds ahead of GPS
         strcpy(tz_string, std_string);
         round_time = 1;
      }
      else if(use_ut1) {
         delta_ut1 = (jtime(0, 0, 51+utc_offset, 0.184) - utc_delta_t());
//sprintf(debug_text3, "delta_ut1:%f", delta_ut1*24.0*3600.0);
         jd = jd_utc + delta_ut1;
         strcpy(tz_string, std_string);
         round_time = 1;
      }
      else if(use_tcg) {
         jd = tcg_time(jd_tt);
         strcpy(tz_string, std_string);
         round_time = 1;
      }
      else if(use_tdb) {  // accurate to < 50 uS
         jd = tdb_time(jd_tt);
         strcpy(tz_string, std_string);
         round_time = 1;
      }
      else if(use_tcb) {
         jd = tcb_time(jd_tt);

//jd = jd + (1.550519768e-8*(now - 2443144.5003725)*86400.0 + (-6.55e-5)); // calc TCB
         strcpy(tz_string, std_string);
         round_time = 1;
      }
      else if(use_hjd) {
         jd = jd_astro = get_hjd(jd_utc+jtime(0,0,0,TSX_TWEAK));
         strcpy(tz_string, std_string);
         round_time = 1;
      }
      else if(use_loran) {
         jd = loran_time(jd_gps);
         strcpy(tz_string, std_string);
         have_local_time = 1;
      }
      else if(use_gps) {
         jd = jd_gps;
         strcpy(tz_string, std_string);
         have_local_time = 2;
      }
      else if(use_utc) {
         jd = jd_utc;
         strcpy(tz_string, std_string);
         have_local_time = 3;
      }
      else if(solar_time) {
         jd = jd_utc + jtime(0,0,0,TSX_TWEAK);  // adjust time for receiver message delays
         jd += (eot(jd_utc) / (24.0*60.0));
         round_time = 1;
      }
      else {
         if(time_flags & TFLAGS_UTC) jd = jd_utc;  // we want UTC based times
         else                        jd = jd_gps;  // displaying GPS based times

         if((leap_time || leap_sixty) && (TSX_TWEAK < 0.0)) ;  // negative TSX_TWEAK would mess up leap second display
         else jd += jtime(0,0,0,TSX_TWEAK);    // adjust time for receiver message delays

         if(!solar_time) jd += time_zone();    // adjust time for the time zone

         have_local_time = 4;
      }


      if(leap_sixty) {  // receiver sent a time of xx:59:60
         gregorian(0, jd - jtime(0,0,1,0.0));   // convert adjusted Julian back to Gregorian
         g_seconds = 60;  // display leapsecond time to xx:59:60
      }
      else {
         gregorian(0, jd);
      }

round_time = 0;  // we no longer do time rounding
      if(round_time) {       // round time up to nearest second;
         jd += jtime(0,0,0, 0.5);
      }

      jd_display = jd;
      pri_day = g_day;         // set local time values to the adjusted time
      pri_month = g_month;
      pri_year = g_year;
      pri_hours = g_hours;        
      pri_minutes = g_minutes;
      pri_seconds = g_seconds;
      pri_frac = g_frac;       // note: usually 1msec fast due to rounding compensation in gregorian(0, )
      if(round_time) {
         pri_frac = g_frac = 0;
      }
   }

   last_why = why;
   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
leaq 0x22afa6(%rip), %r14    # 0x30d64c
movl $0x0, (%r14)
leaq 0x22ae94(%rip), %rax    # 0x30d548
movsd (%rax), %xmm0
leaq 0x22ae91(%rip), %rbx    # 0x30d550
movsd %xmm0, (%rbx)
leaq 0x22ae8e(%rip), %r15    # 0x30d558
movsd %xmm0, (%r15)
leaq 0x22b22a(%rip), %rax    # 0x30d900
movzbl (%rax), %edi
leaq 0x22b221(%rip), %rax    # 0x30d901
movb (%rax), %al
movl %edi, %edx
orb %al, %dl
leaq 0x22b220(%rip), %rcx    # 0x30d90d
movb (%rcx), %cl
leaq 0x22b216(%rip), %rsi    # 0x30d90c
movb (%rsi), %sil
movl %ecx, %r8d
orb %sil, %r8b
orb %dl, %r8b
leaq 0x22b206(%rip), %rdx    # 0x30d90f
movb (%rdx), %dl
leaq 0x22b1fc(%rip), %r9     # 0x30d90e
movb (%r9), %r9b
movl %edx, %r10d
orb %r9b, %r10b
orb %r8b, %r10b
leaq 0x22b1eb(%rip), %r8     # 0x30d910
movb (%r8), %r8b
orb %r8b, %r10b
je 0xe277f
testb %sil, %sil
je 0xe27d7
leaq 0x22ae03(%rip), %rax    # 0x30d540
movsd (%rax), %xmm2
addsd 0x493c7(%rip), %xmm2    # 0x12bb10
divsd 0x493c7(%rip), %xmm2    # 0x12bb18
addsd 0x493c7(%rip), %xmm2    # 0x12bb20
addsd 0x493c7(%rip), %xmm2    # 0x12bb28
cvttpd2dq %xmm2, %xmm0
cvtdq2pd %xmm0, %xmm0
movsd %xmm2, (%r15)
subsd %xmm0, %xmm2
mulsd 0x268c6(%rip), %xmm2    # 0x109040
jmp 0xe2b50
leaq 0x22b17d(%rip), %rax    # 0x30d903
cmpb $0x0, (%rax)
je 0xe2843
leaq 0x22ada2(%rip), %rax    # 0x30d538
leaq 0x22b72b(%rip), %rcx    # 0x30dec8
movsd (%rcx), %xmm0
divsd 0x2688f(%rip), %xmm0    # 0x109038
addsd 0x493f7(%rip), %xmm0    # 0x12bba8
divsd 0x26857(%rip), %xmm0    # 0x109010
xorpd %xmm1, %xmm1
addsd %xmm0, %xmm1
divsd 0x26877(%rip), %xmm1    # 0x109040
addsd (%rax), %xmm1
movsd %xmm1, -0x30(%rbp)
jmp 0xe2863
orb %cl, %r9b
orb %dl, %r9b
je 0xe2946
leaq 0x22b6de(%rip), %rax    # 0x30dec8
movsd (%rax), %xmm2
divsd 0x26842(%rip), %xmm2    # 0x109038
xorpd %xmm0, %xmm0
addsd %xmm0, %xmm2
divsd 0x2680a(%rip), %xmm2    # 0x109010
leaq 0x22ad2b(%rip), %rax    # 0x30d538
addsd %xmm0, %xmm2
movsd 0x26827(%rip), %xmm0    # 0x109040
divsd %xmm0, %xmm2
addsd (%rax), %xmm2
addsd 0x49307(%rip), %xmm2    # 0x12bb30
movsd %xmm2, (%r15)
cvttpd2dq %xmm2, %xmm1
cvtdq2pd %xmm1, %xmm1
subsd %xmm1, %xmm2
mulsd %xmm0, %xmm2
jmp 0xe2b50
leaq 0x22b0ba(%rip), %rax    # 0x30d904
cmpb $0x0, (%rax)
je 0xe2a51
leaq 0x22ace6(%rip), %rax    # 0x30d540
movsd (%rax), %xmm0
movsd %xmm0, -0x30(%rbp)
leaq 0x22b0c6(%rip), %rdi    # 0x30d930
leaq 0x22b0af(%rip), %rsi    # 0x30d920
callq 0x9340
leaq 0x22a9ab(%rip), %rax    # 0x30d228
cmpl $0x0, (%rax)
je 0xe28aa
movsd 0x49366(%rip), %xmm0    # 0x12bbf0
addsd -0x30(%rbp), %xmm0
xorl %edi, %edi
callq 0xd12da
leaq 0x22ae13(%rip), %rax    # 0x30d6b0
movl $0x3c, (%rax)
movl $0x3c, %eax
jmp 0xe28bf
xorl %edi, %edi
movsd -0x30(%rbp), %xmm0
callq 0xd12da
leaq 0x22adf3(%rip), %rax    # 0x30d6b0
movl (%rax), %eax
movsd -0x30(%rbp), %xmm0
movsd %xmm0, (%rbx)
leaq 0x22add1(%rip), %rcx    # 0x30d6a0
movl (%rcx), %ecx
leaq 0x22ac34(%rip), %rdx    # 0x30d50c
movl %ecx, (%rdx)
leaq 0x22adbb(%rip), %rcx    # 0x30d69c
movl (%rcx), %ecx
leaq 0x22ac26(%rip), %rdx    # 0x30d510
movl %ecx, (%rdx)
leaq 0x22adb1(%rip), %rcx    # 0x30d6a4
movl (%rcx), %ecx
leaq 0x22ac18(%rip), %rdx    # 0x30d514
movl %ecx, (%rdx)
leaq 0x22ada3(%rip), %rcx    # 0x30d6a8
movl (%rcx), %ecx
leaq 0x22abfa(%rip), %rdx    # 0x30d508
movl %ecx, (%rdx)
leaq 0x22ad95(%rip), %rcx    # 0x30d6ac
movl (%rcx), %ecx
leaq 0x22abe4(%rip), %rdx    # 0x30d504
movl %ecx, (%rdx)
leaq 0x22abd7(%rip), %rcx    # 0x30d500
movl %eax, (%rcx)
leaq 0x22ad86(%rip), %rax    # 0x30d6b8
movsd (%rax), %xmm0
leaq 0x22abdb(%rip), %rax    # 0x30d518
movsd %xmm0, (%rax)
jmp 0xe2bd4
leaq 0x22abe3(%rip), %rcx    # 0x30d530
movsd (%rcx), %xmm0
testb %r8b, %r8b
je 0xe2aca
movsd 0x491d6(%rip), %xmm3    # 0x12bb38
addsd %xmm0, %xmm3
divsd 0x491d2(%rip), %xmm3    # 0x12bb40
movsd 0x49282(%rip), %xmm1    # 0x12bbf8
addsd %xmm3, %xmm1
cvttpd2dq %xmm3, %xmm2
movsd %xmm1, (%r15)
cvtdq2pd %xmm2, %xmm1
subsd %xmm1, %xmm3
movapd %xmm3, -0x30(%rbp)
xorl %edi, %edi
callq 0xd12da
movapd -0x30(%rbp), %xmm2
leaq 0x22ad01(%rip), %rax    # 0x30d6a4
movslq (%rax), %rax
leaq -0x1(%rax), %rcx
movslq %ecx, %rcx
imulq $0x51eb851f, %rcx, %rcx # imm = 0x51EB851F
movq %rcx, %rdx
shrq $0x3f, %rdx
sarq $0x25, %rcx
addl %edx, %ecx
movslq %ecx, %rcx
imulq $-0x64, %rcx, %rdx
addq %rdx, %rax
decq %rax
imulq $0x23ab1, %rcx, %rcx    # imm = 0x23AB1
leaq 0x3(%rcx), %rsi
testq %rcx, %rcx
cmovnsq %rcx, %rsi
sarq $0x2, %rsi
imulq $0x8ead, %rax, %rcx     # imm = 0x8EAD
movabsq $-0x5c28f5c28f5c28f5, %rdx # imm = 0xA3D70A3D70A3D70B
movq %rcx, %rax
imulq %rdx
addq %rcx, %rdx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x6, %rdx
addq %rax, %rdx
xorps %xmm0, %xmm0
cvtsi2sd %rsi, %xmm0
addsd 0x48dcc(%rip), %xmm0    # 0x12b7e8
xorps %xmm1, %xmm1
cvtsi2sd %rdx, %xmm1
addsd %xmm0, %xmm1
addsd 0x48fc8(%rip), %xmm1    # 0x12b9f8
addsd 0x26638(%rip), %xmm1    # 0x109070
mulsd 0x49100(%rip), %xmm2    # 0x12bb40
addsd %xmm1, %xmm2
cvttpd2dq %xmm2, %xmm0
cvtdq2pd %xmm0, %xmm0
jmp 0xe276e
leaq 0x22aeaa(%rip), %rax    # 0x30d902
cmpb $0x0, (%rax)
je 0xe2b0a
leaq 0x22acc0(%rip), %rax    # 0x30d728
movl (%rax), %eax
addl $0x33, %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
addsd 0x48cec(%rip), %xmm0    # 0x12b768
divsd 0x2658c(%rip), %xmm0    # 0x109010
xorpd %xmm1, %xmm1
addsd %xmm0, %xmm1
divsd 0x265ac(%rip), %xmm1    # 0x109040
leaq 0x22aa4d(%rip), %rax    # 0x30d4e8
cmpl $0x0, (%rax)
movapd %xmm1, %xmm0
je 0xe2aaf
leaq 0x22aa45(%rip), %rax    # 0x30d4f0
movsd (%rax), %xmm0
subsd %xmm0, %xmm1
leaq 0x22aa3e(%rip), %rax    # 0x30d4f8
movsd %xmm1, (%rax)
leaq 0x22aa6b(%rip), %rax    # 0x30d530
jmp 0xe27c9
leaq 0x22b3f7(%rip), %rcx    # 0x30dec8
movsd (%rcx), %xmm1
divsd 0x2655b(%rip), %xmm1    # 0x109038
xorpd %xmm2, %xmm2
addsd %xmm2, %xmm1
divsd 0x26523(%rip), %xmm1    # 0x109010
addsd %xmm2, %xmm1
divsd 0x26547(%rip), %xmm1    # 0x109040
addsd %xmm1, %xmm0
testl %edi, %edi
je 0xe2b42
decl %edi
callq 0xe22ce
jmp 0xe2b4c
leaq 0x22adf4(%rip), %rax    # 0x30d905
cmpb $0x0, (%rax)
je 0xe2be4
leaq 0x22aa1f(%rip), %rax    # 0x30d540
movsd (%rax), %xmm0
movsd 0x49083(%rip), %xmm1    # 0x12bbb0
addsd %xmm0, %xmm1
mulsd 0x4907f(%rip), %xmm1    # 0x12bbb8
addsd %xmm0, %xmm1
jmp 0xe27cd
movzbl %al, %edi
decl %edi
callq 0xe243d
movapd %xmm0, %xmm2
cvttsd2si %xmm2, %eax
leaq 0x22a9ad(%rip), %rcx    # 0x30d508
movl %eax, (%rcx)
cvttpd2dq %xmm2, %xmm0
cvtdq2pd %xmm0, %xmm0
subsd %xmm0, %xmm2
movsd 0x26497(%rip), %xmm0    # 0x109008
mulsd %xmm0, %xmm2
cvttsd2si %xmm2, %eax
leaq 0x22a984(%rip), %rcx    # 0x30d504
cvttpd2dq %xmm2, %xmm1
cvtdq2pd %xmm1, %xmm1
subsd %xmm1, %xmm2
mulsd %xmm0, %xmm2
cvttsd2si %xmm2, %edx
movl %eax, (%rcx)
leaq 0x22a963(%rip), %rax    # 0x30d500
cvttpd2dq %xmm2, %xmm0
movl %edx, (%rax)
cvtdq2pd %xmm0, %xmm0
subsd %xmm0, %xmm2
leaq 0x22ad66(%rip), %rax    # 0x30d918
movsd %xmm2, (%rax)
leaq 0x22a95b(%rip), %rax    # 0x30d518
movsd %xmm2, (%rax)
leaq 0x22ad68(%rip), %rdi    # 0x30d930
leaq 0x22ad51(%rip), %rsi    # 0x30d920
callq 0x9340
movl $0x1, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x22ad1b(%rip), %rax    # 0x30d906
cmpb $0x0, (%rax)
je 0xe2c78
leaq 0x22a945(%rip), %rax    # 0x30d540
movsd (%rax), %xmm1
movsd %xmm1, -0x40(%rbp)
movsd 0x48c24(%rip), %xmm0    # 0x12b830
addsd %xmm1, %xmm0
mulsd 0x48fa8(%rip), %xmm0    # 0x12bbc0
addsd 0x48fa8(%rip), %xmm0    # 0x12bbc8
mulsd 0x28c00(%rip), %xmm0    # 0x10b828
divsd 0x28c00(%rip), %xmm0    # 0x10b830
movsd %xmm0, -0x38(%rbp)
callq 0x9080
movsd %xmm0, -0x30(%rbp)
movsd -0x38(%rbp), %xmm0
addsd %xmm0, %xmm0
callq 0x9080
mulsd 0x48f7b(%rip), %xmm0    # 0x12bbd0
movsd -0x30(%rbp), %xmm1
mulsd 0x48f76(%rip), %xmm1    # 0x12bbd8
addsd %xmm0, %xmm1
divsd 0x263aa(%rip), %xmm1    # 0x109018
addsd -0x40(%rbp), %xmm1
jmp 0xe27cd
leaq 0x22ac88(%rip), %rax    # 0x30d907
cmpb $0x0, (%rax)
je 0xe2d24
leaq 0x22a8b1(%rip), %rax    # 0x30d540
movsd (%rax), %xmm1
movsd %xmm1, -0x40(%rbp)
movsd 0x48b90(%rip), %xmm0    # 0x12b830
addsd %xmm1, %xmm0
mulsd 0x48f14(%rip), %xmm0    # 0x12bbc0
addsd 0x48f14(%rip), %xmm0    # 0x12bbc8
mulsd 0x28b6c(%rip), %xmm0    # 0x10b828
divsd 0x28b6c(%rip), %xmm0    # 0x10b830
movsd %xmm0, -0x38(%rbp)
callq 0x9080
movsd %xmm0, -0x30(%rbp)
movsd -0x38(%rbp), %xmm0
addsd %xmm0, %xmm0
callq 0x9080
mulsd 0x48ee7(%rip), %xmm0    # 0x12bbd0
movsd -0x30(%rbp), %xmm1
mulsd 0x48ee2(%rip), %xmm1    # 0x12bbd8
addsd %xmm0, %xmm1
divsd 0x26316(%rip), %xmm1    # 0x109018
addsd -0x40(%rbp), %xmm1
addsd 0x48ea1(%rip), %xmm1    # 0x12bbb0
divsd 0x48ec9(%rip), %xmm1    # 0x12bbe0
addsd 0x48ec9(%rip), %xmm1    # 0x12bbe8
jmp 0xe27cd
leaq 0x22abdd(%rip), %rax    # 0x30d908
cmpb $0x0, (%rax)
je 0xe2d7e
leaq 0x22a7f9(%rip), %rax    # 0x30d530
leaq 0x22b18a(%rip), %rcx    # 0x30dec8
movsd (%rcx), %xmm0
divsd 0x262ee(%rip), %xmm0    # 0x109038
xorpd %xmm1, %xmm1
addsd %xmm1, %xmm0
divsd 0x262b6(%rip), %xmm0    # 0x109010
addsd %xmm1, %xmm0
divsd 0x262da(%rip), %xmm0    # 0x109040
addsd (%rax), %xmm0
callq 0xe21cd
movsd %xmm0, -0x30(%rbp)
movsd %xmm0, (%r15)
jmp 0xe2863
leaq 0x22ab84(%rip), %rax    # 0x30d909
cmpb $0x0, (%rax)
je 0xe2dec
leaq 0x22a7a7(%rip), %rax    # 0x30d538
leaq 0x22b130(%rip), %rcx    # 0x30dec8
movsd (%rcx), %xmm0
divsd 0x26294(%rip), %xmm0    # 0x109038
addsd 0x3ba5c(%rip), %xmm0    # 0x11e808
divsd 0x2625c(%rip), %xmm0    # 0x109010
xorpd %xmm1, %xmm1
addsd %xmm0, %xmm1
divsd 0x2627c(%rip), %xmm1    # 0x109040
addsd (%rax), %xmm1
movsd %xmm1, -0x30(%rbp)
leaq 0x22ab5c(%rip), %rdi    # 0x30d930
leaq 0x22ab45(%rip), %rsi    # 0x30d920
callq 0x9340
movl $0x1, (%r14)
jmp 0xe2876
leaq 0x22ab17(%rip), %rax    # 0x30d90a
cmpb $0x0, (%rax)
je 0xe2e27
leaq 0x22a739(%rip), %rax    # 0x30d538
movsd (%rax), %xmm0
movsd %xmm0, -0x30(%rbp)
leaq 0x22ab21(%rip), %rdi    # 0x30d930
leaq 0x22ab0a(%rip), %rsi    # 0x30d920
callq 0x9340
movl $0x2, (%r14)
jmp 0xe2876
leaq 0x22aadd(%rip), %rax    # 0x30d90b
cmpb $0x0, (%rax)
je 0xe2e62
leaq 0x22a6f6(%rip), %rax    # 0x30d530
movsd (%rax), %xmm0
movsd %xmm0, -0x30(%rbp)
leaq 0x22aae6(%rip), %rdi    # 0x30d930
leaq 0x22aacf(%rip), %rsi    # 0x30d920
callq 0x9340
movl $0x3, (%r14)
jmp 0xe2876
leaq 0x22aaa8(%rip), %rax    # 0x30d911
cmpb $0x0, (%rax)
je 0xe2ecd
leaq 0x22a6bb(%rip), %rax    # 0x30d530
movsd (%rax), %xmm0
leaq 0x22b048(%rip), %rax    # 0x30dec8
movsd (%rax), %xmm2
divsd 0x261ac(%rip), %xmm2    # 0x109038
xorpd %xmm1, %xmm1
addsd %xmm1, %xmm2
divsd 0x26174(%rip), %xmm2    # 0x109010
addsd %xmm1, %xmm2
divsd 0x26198(%rip), %xmm2    # 0x109040
addsd %xmm0, %xmm2
movsd %xmm2, -0x30(%rbp)
callq 0xe1b1b
divsd 0x262ba(%rip), %xmm0    # 0x109178
addsd -0x30(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
jmp 0xe2876
leaq 0x22a5d0(%rip), %rax    # 0x30d4a4
testb $0x1, (%rax)
jne 0xe2ee2
leaq 0x22a658(%rip), %rax    # 0x30d538
jmp 0xe2ee9
leaq 0x22a647(%rip), %rax    # 0x30d530
leaq 0x22a560(%rip), %rcx    # 0x30d450
cmpb $0x0, (%rcx)
setne %cl
leaq 0x22a32b(%rip), %rdx    # 0x30d228
cmpl $0x0, (%rdx)
movsd (%rax), %xmm0
setne %al
orb %cl, %al
leaq 0x22afb8(%rip), %rcx    # 0x30dec8
movsd (%rcx), %xmm1
divsd 0x2611c(%rip), %xmm1    # 0x109038
cmpb $0x1, %al
jne 0xe2f2a
xorpd %xmm2, %xmm2
ucomisd %xmm1, %xmm2
ja 0xe2f4a
xorpd %xmm2, %xmm2
addsd %xmm2, %xmm1
divsd 0x260d6(%rip), %xmm1    # 0x109010
addsd %xmm2, %xmm1
divsd 0x260fa(%rip), %xmm1    # 0x109040
addsd %xmm1, %xmm0
leaq 0x22a92f(%rip), %rax    # 0x30d880
leaq 0x22a948(%rip), %rcx    # 0x30d8a0
xorps %xmm1, %xmm1
cvtsi2sdl (%rcx), %xmm1
divsd 0x260d9(%rip), %xmm1    # 0x109040
addsd (%rax), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, -0x30(%rbp)
movl $0x4, (%r14)
jmp 0xe2876