// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: format_lla(double, double, double, int, int, int)
void format_lla(double lat,double lon,double alt,  int row,int col, int disp_tide)
{
u08 color;
char s[4];
double x;
int deg, min;
double sec;
char c1;
char *lat_s, *lon_s, *alt_s;

// test data for UPS projection
//lat = DMS_TO_DEC(84.0, 17.0, 14.024);
//lon = 0.0-DMS_TO_DEC(132.0, 14.0, 52.761);

//lat = DMS_TO_DEC(73.0, 0.0, 0.0);
//lon = DMS_TO_DEC(44.0, 0.0, 0.0);

//lat = -DMS_TO_DEC(87.0, 17.0, 14.400);
//lon = DMS_TO_DEC(132.0, 14.0, 52.303);
// lon *= (-1.0);

   if(luxor) return;
   if(text_mode && first_key) return;
   if(zoom_screen == 'I') ;
   else if(zoom_screen == 'L') ;
   else if(zoom_screen) return;
   else if(0 && disp_tide && show_tides) {
      goto show_tide_info;
   }

   if((SCREEN_WIDTH <= NARROW_SCREEN) && (col > (TEXT_COLS/2))) {
      if(user_set_ref_lla) {
         lat_s = "LAT:";
         lon_s = "LON:";
         alt_s = "ALT:";
      }
      else {
         lat_s = "Lat:";
         lon_s = "Lon:";
         alt_s = "Alt:";
      }
   }
   else {
      if(user_set_ref_lla) {
         lat_s = "LAT: ";
         lon_s = "LON: ";
         alt_s = "ALT: ";
      }
      else {
         lat_s = "Lat: ";
         lon_s = "Lon: ";
         alt_s = "Alt: ";
      }
   }

   color = WHITE;
   if(minor_alarms & MINOR_BAD_POSN) color = YELLOW;
   else if(minor_alarms & MINOR_SURVEY) {  // self-survey in progress
      color = YELLOW;
   }

   if(lat < 0.0) s[0] = s[2] = 'S';
   else          s[0] = s[2] = 'N';

   if(dms == DMS_FMT) s[1] = 0;
   else if((dms == UTM_FMT) || (dms == NATO_FMT)) {
      lla_to_utm(lat, lon);
   }
   else if(dms == GRAD_FMT) {
      s[0] = 'g';
      s[1] = ' ';
      s[3] = 0;
   }
   else if(dms == MIL_FMT) {
      s[0] = 'i';
      s[1] = ' ';
      s[3] = 0;
   }
   else if(dms == RADIAN_FMT) {
      s[0] = 'r';
      s[1] = ' ';
      s[3] = 0;
   }
   else {
      s[0] = DEGREES;
      s[1] = ' ';
      s[3] = 0;
   }

   if(dms == ECEF_FMT) {
      lla_to_ecef(lat, lon, alt);
      lat_s = "X:";
      lon_s = "Y:";
      alt_s = "Z:";
   }


   if(dms == RADIAN_FMT) x = DABS(lat);
   else if(dms == GRAD_FMT) x = DABS(lat*200.0 / PI);
   else if(dms == MIL_FMT) x = DABS(lat*3200.0 / PI);
   else if(dms == ECEF_FMT) x = ecef_x;
   else x = DABS(lat*RAD_TO_DEG);

   if(plot_loc == 0) sprintf(out, "%s (private)    ", lat_s); // (double) (int) x;
   else if(dms == GRIDSQ_FMT) {
      sprintf(out, "MLS: %s", maidenhead_square(lat, lon));
   }
   else if(dms == UTM_FMT) {
      sprintf(out, "%s:%13.4lf E", utm_zone_string, UTMEasting);
   }
   else if(dms == NATO_FMT) {
      sprintf(out, "%s %s      %05d E", utm_zone_string, mgrs_square, (int) UTMEasting);
   }
   else if(dms == DMS_FMT) {
      deg = (int) x;
      min = (int) (60.0 * ((double) x - (double) deg));
      sec = ((x - (double) deg) - ((double) min / 60.0)) * 3600.0;
      sprintf(out, "%s%2d%c%02d'%06.3f\"%s", lat_s, deg, DEGREES, min, sec, s);
   }
   else if(dms == ECEF_FMT) {
      if(x >= 0.0) sprintf(out, "%s %15.6lf  ", lat_s, x);
      else         sprintf(out, "%s%16.6lf  ", lat_s, x);
   }
   else if(dms == MIL_FMT) {
      sprintf(out, "%s%11.6lf%s", lat_s, x, s);
   }
   else sprintf(out, "%s%11.7lf%s", lat_s, x, s);
   vidstr(row+0, col, color, out);

   if(dms == DMS_FMT) {
      if(lon < 0.0) s[0] = 'W';
      else          s[0] = 'E';
   }
   else {
      if(lon < 0.0) s[2] = 'W';
      else          s[2] = 'E';
   }

   if(dms == RADIAN_FMT) x = DABS(lon);
   else if(dms == GRAD_FMT) x = DABS(lon*200.0 / PI);
   else if(dms == MIL_FMT) x = DABS(lon*3200.0 / PI);
   else if(dms == ECEF_FMT) x = ecef_y;
   else x = DABS(lon*RAD_TO_DEG);

   if(plot_loc == 0) sprintf(out, "%s (private)    ", lon_s); // (double) (int) x;
   else if(dms == GRIDSQ_FMT) {
      out[0] = 0;
   }
   else if(dms == UTM_FMT) {
      if((lat >= (84.0*PI/180)) || (lat <= (-80.0*PI/180.0))) {
         sprintf(out, "%s %13.4lf N", "UPS", UTMNorthing);
      }
      else {
         sprintf(out, "%s %13.4lf N", "UTM", UTMNorthing);
      }
   }
   else if(dms == NATO_FMT) {
      sprintf(out, "%s        %05d N", "MGRS", (int) UTMNorthing);
   }
   else if(dms == DMS_FMT) {
      deg = (int) x;
      min = (int) (60.0 * ((double) x - (double) deg));
      sec = ((x - (double) deg) - ((double) min / 60.0)) * 3600.0;
      if(deg >= 100) {
         lon_s = "Lon:";
         sprintf(out, "%s%3d%c%02d'%06.3f\"%s", lon_s, deg, DEGREES, min, sec, s);
      }
      else {
         sprintf(out, "%s%2d%c%02d'%06.3f\"%s", lon_s, deg, DEGREES, min, sec, s);
      }
   }
   else if(dms == ECEF_FMT) {
      if(x >= 0.0) sprintf(out, "%s %15.6lf  ", lon_s, x);
      else         sprintf(out, "%s%16.6lf  ", lon_s, x);
   }
   else if(dms == MIL_FMT) {
      sprintf(out, "%s%11.6lf%s", lon_s, x, s);
   }
   else sprintf(out, "%s%11.7lf%s", lon_s, x, s);
   vidstr(row+1, col, color, out);

   x = alt;
   if(alt_scale[0] == 'f') x *= (100.0/2.54/12.0); // convert meters to feet
   else if(alt_scale[0] == 'l') x *= LG_PER_METER; // convert meters to linguini

   if(0 && (plot_loc == 0)) sprintf(out, "%s (private)      ", alt_s);  // (double) (int) x;
   else if(dms == UTM_FMT) {
      if(x >= 1000.0) {
         if(alt_scale[0] == 'f')      sprintf(out, "%s%12.4lf'   ", alt_s, x);
         else if(alt_scale[0] == 'l') sprintf(out, "%s%11.4lf lg ", alt_s, x);
         else                         sprintf(out, "%s%12.4lf m ",  alt_s, x);
      }
      else {
         if(alt_scale[0] == 'f')      sprintf(out, "%s%12.4lf'   ", alt_s, x);
         else if(alt_scale[0] == 'l') sprintf(out, "%s%11.4lf lg ", alt_s, x);
         else                         sprintf(out, "%s%12.4lf m ",  alt_s, x);
      }
   }
   else if(dms == ECEF_FMT) {
      if(x >= 0.0) sprintf(out, "%s %15.6lf  ", alt_s, ecef_z);
      else         sprintf(out, "%s%16.6lf  ", alt_s, ecef_z);
   }
   else {
      if(x >= 1000.0) {
         if(alt_scale[0] == 'f')      sprintf(out, "%s%11.4lf'   ", alt_s, x);
         else if(alt_scale[0] == 'l') sprintf(out, "%s%11.4lf lg ", alt_s, x);
         else                         sprintf(out, "%s%12.5lf m ",  alt_s, x);
      }
      else {
         if(alt_scale[0] == 'f')      sprintf(out, "%s%11.7lf'   ", alt_s, x);
         else if(alt_scale[0] == 'l') sprintf(out, "%s%11.4lf lg ", alt_s, x);
         else                         sprintf(out, "%s%12.8lf m ",  alt_s, x);
      }
   }
   if(dms == GRIDSQ_FMT) --row;

   vidstr(row+2, col, color, out);
   vidstr(row+3, col, color, "                   ");

   if(disp_tide && show_tides) { // 
      if(zoom_screen == 'I') row += 3;
      goto show_tide_info;
   }

   if(((lat == 0.0) && (lon == 0.0)) || (ugals == 0.0)) ;  // no tide/gravity data available
   else if(zoom_screen == 'I') {
      row += 3;

      show_tide_info:
      color = WHITE;
      if(zoom_screen == 'I') ++row;
      if(lat_tide > last_lat_tide) c1 = UP_ARROW;
      else if(lat_tide < last_lat_tide) c1 = DOWN_ARROW;
      else c1 = '=';
      sprintf(out, "Lat tide:%7.2lfmm%c", lat_tide, c1);
      vidstr(row++, col, color, out);

      if(lon_tide > last_lon_tide) c1 = RIGHT_ARROW;
      else if(lon_tide < last_lon_tide) c1 = LEFT_ARROW;
      else c1 = '=';
      sprintf(out, "Lon tide:%7.2lfmm%c", lon_tide, c1);
      vidstr(row++, col, color, out);

      if(alt_tide > last_alt_tide) c1 = UP_ARROW;
      else if(alt_tide < last_alt_tide) c1 = DOWN_ARROW;
      else c1 = '=';
      sprintf(out, "Alt tide:%7.2lfmm%c", alt_tide, c1);
      vidstr(row++, col, color, out);

      if(zoom_screen == 'I') ++row;
      if(ugals > last_ugals) c1 = UP_ARROW;
      else if(ugals < last_ugals) c1 = DOWN_ARROW;
      else c1 = '=';
      sprintf(out, "Gravity:%8.2lfuG%c", ugals,c1);
      vidstr(row++, col, color, out);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
leaq 0x186ab0(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
jne 0xa2f37
movl %edx, %r15d
movl %edi, %r14d
movapd %xmm0, %xmm4
leaq 0x160330(%rip), %rax    # 0x2027d8
cmpl $0x0, (%rax)
je 0xa24bd
leaq 0x186aa4(%rip), %rax    # 0x228f58
cmpl $0x0, (%rax)
jne 0xa2f37
leaq 0x2542e4(%rip), %rax    # 0x2f67a8
movzbl (%rax), %eax
testl %eax, %eax
je 0xa24d9
cmpl $0x4c, %eax
je 0xa24d9
cmpl $0x49, %eax
jne 0xa2f37
leaq 0x160320(%rip), %rax    # 0x202800
movl (%rax), %ecx
leaq 0x16b05b(%rip), %rax    # 0x20d544
imull $0x31a, (%rax), %eax    # imm = 0x31A
pushq $0x64
popq %rdi
cltd
idivl %edi
cmpl %eax, %ecx
jg 0xa254e
leaq 0x160308(%rip), %rax    # 0x202808
movl (%rax), %eax
pushq $0x2
popq %rcx
cltd
idivl %ecx
cmpl %esi, %eax
jge 0xa254e
leaq 0x282e2d(%rip), %rax    # 0x325340
cmpl $0x0, (%rax)
leaq 0x6ecf9(%rip), %rax     # 0x111216
leaq 0x6bbcc(%rip), %r12     # 0x10e0f0
cmoveq %rax, %r12
leaq 0x6ecec(%rip), %rax     # 0x11121b
leaq 0x6bbc9(%rip), %rcx     # 0x10e0ff
cmoveq %rax, %rcx
movq %rcx, -0x48(%rbp)
leaq 0x6ecdb(%rip), %rax     # 0x111220
leaq 0x6ecc5(%rip), %rbx     # 0x111211
jmp 0xa258e
leaq 0x282deb(%rip), %rax    # 0x325340
cmpl $0x0, (%rax)
leaq 0x6ecd8(%rip), %rax     # 0x111237
leaq 0x6ecbf(%rip), %r12     # 0x111225
cmoveq %rax, %r12
leaq 0x6eccc(%rip), %rax     # 0x11123d
leaq 0x6ecb3(%rip), %rcx     # 0x11122b
cmoveq %rax, %rcx
movq %rcx, -0x48(%rbp)
leaq 0x6ecbc(%rip), %rax     # 0x111243
leaq 0x6eca3(%rip), %rbx     # 0x111231
cmoveq %rax, %rbx
leaq 0x254c3f(%rip), %rax    # 0x2f71d8
testw $0x220, (%rax)          # imm = 0x220
sete %r13b
xorpd %xmm0, %xmm0
xorl %eax, %eax
ucomisd %xmm4, %xmm0
seta %al
leal (%rax,%rax,4), %eax
addl $0x4e, %eax
movb %al, -0x2a(%rbp)
movb %al, -0x2c(%rbp)
leaq 0x2549ee(%rip), %rax    # 0x2f6fb0
movzbl (%rax), %eax
cmpl $0x1, %eax
movl %esi, -0x3c(%rbp)
movapd %xmm1, -0x70(%rbp)
movapd %xmm4, -0x60(%rbp)
movsd %xmm2, -0x50(%rbp)
jne 0xa26ab
movb $0x0, -0x2b(%rbp)
movb $0x1, %al
movq %rbx, -0x38(%rbp)
movsd 0x50b6e(%rip), %xmm3    # 0xf3160
mulsd %xmm4, %xmm3
xorpd %xmm2, %xmm2
movapd %xmm3, %xmm0
cmpltsd %xmm2, %xmm0
subsd %xmm3, %xmm2
andpd %xmm0, %xmm2
andnpd %xmm3, %xmm0
orpd %xmm2, %xmm0
orb $0xe, %r13b
leaq 0x162dc4(%rip), %rbx    # 0x2053e2
cmpb $0x0, (%rbx)
je 0xa2742
movzbl %al, %eax
decl %eax
cmpl $0x7, %eax
ja 0xa2803
leaq 0x67650(%rip), %rcx     # 0x109c8c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cvttsd2si %xmm0, %ecx
cvttpd2dq %xmm0, %xmm1
cvtdq2pd %xmm1, %xmm1
subsd %xmm1, %xmm0
movsd 0x509ab(%rip), %xmm1    # 0xf3008
movapd %xmm0, %xmm2
mulsd %xmm1, %xmm2
cvttsd2si %xmm2, %r9d
cvttpd2dq %xmm2, %xmm2
cvtdq2pd %xmm2, %xmm2
divsd %xmm1, %xmm2
subsd %xmm2, %xmm0
mulsd 0x5098e(%rip), %xmm0    # 0xf3010
leaq -0x2c(%rbp), %rax
movq %rax, (%rsp)
leaq 0x283b8f(%rip), %rdi    # 0x326220
leaq 0x6ebef(%rip), %rsi     # 0x111287
pushq $0x1
popq %r8
movq %r12, %rdx
movb $0x1, %al
callq 0x9060
jmp 0xa2920
leal -0x3(%rax), %ecx
cmpb $0x1, %cl
ja 0xa275f
movapd %xmm4, %xmm0
callq 0xa37dd
leaq 0x2548e9(%rip), %rax    # 0x2f6fb0
movb (%rax), %al
cmpb $0x8, %al
jne 0xa2703
movapd -0x60(%rbp), %xmm0
movapd -0x70(%rbp), %xmm1
movsd -0x50(%rbp), %xmm2
callq 0x55535
leaq 0x2548c8(%rip), %rax    # 0x2f6fb0
movb (%rax), %al
leaq 0x6eb5b(%rip), %rbx     # 0x11124c
leaq 0x6b964(%rip), %rcx     # 0x10e05c
movq %rcx, -0x48(%rbp)
leaq 0x6eb46(%rip), %r12     # 0x111249
movzbl %al, %ecx
addl $-0x5, %ecx
cmpl $0x3, %ecx
movapd -0x70(%rbp), %xmm1
movapd -0x60(%rbp), %xmm4
ja 0xa25e6
leaq 0x67559(%rip), %rax     # 0x109c7c
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq %rbx, -0x38(%rbp)
leaq 0x2548b1(%rip), %rax    # 0x2f6fe8
movsd (%rax), %xmm0
movb $0x8, %al
jmp 0xa2613
leaq 0x283ad7(%rip), %rdi    # 0x326220
leaq 0x6eaff(%rip), %rsi     # 0x11124f
movq %r12, %rdx
xorl %eax, %eax
callq 0x9060
jmp 0xa2920
cmpl $0x7, %eax
je 0xa28ba
cmpl $0x6, %eax
je 0xa2888
cmpl $0x5, %eax
jne 0xa2900
movw $0x2067, -0x2c(%rbp)    # imm = 0x2067
movb $0x0, -0x29(%rbp)
movq %rbx, -0x38(%rbp)
movsd 0x533e8(%rip), %xmm3    # 0xf5b78
mulsd %xmm4, %xmm3
divsd 0x53104(%rip), %xmm3    # 0xf58a0
xorpd %xmm2, %xmm2
movapd %xmm3, %xmm0
cmpltsd %xmm2, %xmm0
subsd %xmm3, %xmm2
andpd %xmm0, %xmm2
andnpd %xmm3, %xmm0
orpd %xmm2, %xmm0
movb $0x5, %al
jmp 0xa2613
movsd 0x2bdd70(%rip), %xmm0   # 0x360538
leaq 0x283a51(%rip), %rdi    # 0x326220
leaq 0x6ea92(%rip), %rsi     # 0x111268
leaq 0x2bdd73(%rip), %rdx    # 0x360550
jmp 0xa2919
xorpd %xmm1, %xmm1
leaq 0x283a33(%rip), %rdi    # 0x326220
ucomisd %xmm1, %xmm0
jae 0xa290f
leaq 0x6eaac(%rip), %rsi     # 0x1112aa
jmp 0xa2916
leaq 0x283a16(%rip), %rdi    # 0x326220
leaq 0x6eab1(%rip), %rsi     # 0x1112c2
jmp 0xa2875
movapd %xmm4, %xmm0
callq 0xa2f46
leaq 0x2839fd(%rip), %rdi    # 0x326220
leaq 0x6ea36(%rip), %rsi     # 0x111260
leaq 0x2bdcef(%rip), %rdx    # 0x360520
jmp 0xa2753
cvttsd2si 0x2bdcf9(%rip), %r8d # 0x360538
leaq 0x2839da(%rip), %rdi    # 0x326220
leaq 0x6ea28(%rip), %rsi     # 0x111275
leaq 0x2bdcfc(%rip), %rdx    # 0x360550
leaq 0x2bdd15(%rip), %rcx    # 0x360570
xorl %eax, %eax
callq 0x9060
jmp 0xa2920
leaq 0x2839b2(%rip), %rdi    # 0x326220
leaq 0x6ea41(%rip), %rsi     # 0x1112b6
leaq -0x2c(%rbp), %rcx
movq %r12, %rdx
movb $0x1, %al
callq 0x9060
jmp 0xa2920
movw $0x2072, -0x2c(%rbp)    # imm = 0x2072
movb $0x0, -0x29(%rbp)
movq %rbx, -0x38(%rbp)
xorpd %xmm2, %xmm2
movapd %xmm4, %xmm0
cmpltsd %xmm2, %xmm0
subsd %xmm4, %xmm2
andpd %xmm0, %xmm2
andnpd %xmm4, %xmm0
orpd %xmm2, %xmm0
movb $0x6, %al
jmp 0xa2613
movw $0x2069, -0x2c(%rbp)    # imm = 0x2069
movb $0x0, -0x29(%rbp)
movq %rbx, -0x38(%rbp)
movsd 0x65ef0(%rip), %xmm3    # 0x1087c0
mulsd %xmm4, %xmm3
divsd 0x52fc4(%rip), %xmm3    # 0xf58a0
xorpd %xmm2, %xmm2
movapd %xmm3, %xmm0
cmpltsd %xmm2, %xmm0
subsd %xmm3, %xmm2
andpd %xmm0, %xmm2
andnpd %xmm3, %xmm0
orpd %xmm2, %xmm0
movb $0x7, %al
jmp 0xa2613
movw $0x2001, -0x2c(%rbp)    # imm = 0x2001
movb $0x0, -0x29(%rbp)
jmp 0xa26c9
leaq 0x6e987(%rip), %rsi     # 0x11129d
movq %r12, %rdx
movb $0x1, %al
callq 0x9060
movzbl %r13b, %r12d
leaq 0x2838f5(%rip), %r13    # 0x326220
movl %r14d, %edi
movl -0x3c(%rbp), %esi
movl %r12d, %edx
movq %r13, %rcx
callq 0xe2d2
leaq 0x25466d(%rip), %rax    # 0x2f6fb0
movzbl (%rax), %eax
xorpd %xmm0, %xmm0
cmpl $0x1, %eax
jne 0xa2965
movapd -0x70(%rbp), %xmm2
ucomisd %xmm2, %xmm0
movapd -0x60(%rbp), %xmm3
jbe 0xa29a1
movb $0x57, -0x2c(%rbp)
jmp 0xa29a5
movapd -0x70(%rbp), %xmm2
ucomisd %xmm2, %xmm0
pushq $0x57
popq %rcx
pushq $0x45
popq %rdx
cmoval %ecx, %edx
movb %dl, -0x2a(%rbp)
leal -0x5(%rax), %ecx
cmpl $0x3, %ecx
movapd -0x60(%rbp), %xmm3
ja 0xa29a5
leaq 0x6731e(%rip), %rdx     # 0x109cac
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movsd 0x531d9(%rip), %xmm1    # 0xf5b78
jmp 0xa29bb
movb $0x45, -0x2c(%rbp)
movsd 0x507b3(%rip), %xmm1    # 0xf3160
mulsd %xmm2, %xmm1
jmp 0xa29c7
movsd 0x65e05(%rip), %xmm1    # 0x1087c0
mulsd %xmm2, %xmm1
divsd 0x52ed9(%rip), %xmm1    # 0xf58a0
xorpd %xmm2, %xmm2
movapd %xmm1, %xmm0
cmpltsd %xmm2, %xmm0
subsd %xmm1, %xmm2
andpd %xmm0, %xmm2
andnpd %xmm1, %xmm0
orpd %xmm2, %xmm0
cmpb $0x0, (%rbx)
je 0xa2a77
decl %eax
cmpl $0x7, %eax
movl -0x3c(%rbp), %ebx
ja 0xa2b26
leaq 0x672ba(%rip), %rcx     # 0x109cbc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cvttsd2si %xmm0, %ecx
cvttpd2dq %xmm0, %xmm1
cvtdq2pd %xmm1, %xmm1
subsd %xmm1, %xmm0
movsd 0x505e5(%rip), %xmm1    # 0xf3008
movapd %xmm0, %xmm2
mulsd %xmm1, %xmm2
cvttsd2si %xmm2, %r9d
cvttpd2dq %xmm2, %xmm2
cvtdq2pd %xmm2, %xmm2
divsd %xmm1, %xmm2
subsd %xmm2, %xmm0
mulsd 0x505c8(%rip), %xmm0    # 0xf3010
leaq -0x2c(%rbp), %rax
cmpl $0x64, %ecx
jl 0xa2bb0
movq %rax, (%rsp)
leaq 0x2837c0(%rip), %rdi    # 0x326220
leaq 0x6e892(%rip), %rsi     # 0x1112f9
leaq 0x6e7ad(%rip), %rdx     # 0x11121b
pushq $0x1
popq %r8
jmp 0xa2bca
leaq 0x2837a2(%rip), %rdi    # 0x326220
leaq 0x6e7ca(%rip), %rsi     # 0x11124f
movq -0x48(%rbp), %rdx
xorl %eax, %eax
callq 0x9060
movl -0x3c(%rbp), %ebx
jmp 0xa2bd1
leaq 0x254551(%rip), %rcx    # 0x2f6ff0
movsd (%rcx), %xmm0
jmp 0xa29e4
xorpd %xmm1, %xmm1
movapd %xmm2, %xmm0
cmpltsd %xmm1, %xmm0
subsd %xmm2, %xmm1
andpd %xmm0, %xmm1
andnpd %xmm2, %xmm0
orpd %xmm1, %xmm0
jmp 0xa29e4
ucomisd 0x65cf6(%rip), %xmm3    # 0x1087c8
movsd 0x2bda56(%rip), %xmm0   # 0x360530
jae 0xa2b85
movsd 0x65ce8(%rip), %xmm1    # 0x1087d0
ucomisd %xmm3, %xmm1
jae 0xa2b85
leaq 0x283727(%rip), %rdi    # 0x326220
leaq 0x6e7ce(%rip), %rsi     # 0x1112ce
leaq 0x6e7d8(%rip), %rdx     # 0x1112df
jmp 0xa2ba7
xorpd %xmm1, %xmm1
leaq 0x283709(%rip), %rdi    # 0x326220
ucomisd %xmm1, %xmm0
jae 0xa2b9c
leaq 0x6e786(%rip), %rsi     # 0x1112aa
jmp 0xa2ba3
leaq 0x2836f3(%rip), %rdi    # 0x326220
leaq 0x6e78e(%rip), %rsi     # 0x1112c2
jmp 0xa2b74
movb $0x0, (%r13)
jmp 0xa2bd1
cvttsd2si 0x2bd9e8(%rip), %ecx # 0x360530
leaq 0x2836d1(%rip), %rdi    # 0x326220
leaq 0x6e78d(%rip), %rsi     # 0x1112e3
leaq 0x6e797(%rip), %rdx     # 0x1112f4
xorl %eax, %eax
callq 0x9060
jmp 0xa2bd1
leaq 0x2836b3(%rip), %rdi    # 0x326220
leaq 0x6e742(%rip), %rsi     # 0x1112b6
leaq -0x2c(%rbp), %rcx
movq -0x48(%rbp), %rdx
movb $0x1, %al
callq 0x9060
jmp 0xa2bd1
leaq 0x283694(%rip), %rdi    # 0x326220
leaq 0x6e73b(%rip), %rsi     # 0x1112ce
leaq 0x6e741(%rip), %rdx     # 0x1112db
jmp 0xa2ba7
leaq 0x6e6fa(%rip), %rsi     # 0x11129d
movq -0x48(%rbp), %rdx
movb $0x1, %al
callq 0x9060
jmp 0xa2bd1
movq %rax, (%rsp)
leaq 0x283665(%rip), %rdi    # 0x326220
leaq 0x6e6c5(%rip), %rsi     # 0x111287
pushq $0x1
popq %r8
movq -0x48(%rbp), %rdx
movb $0x1, %al
callq 0x9060
leal 0x1(%r14), %edi
leaq 0x283644(%rip), %rcx    # 0x326220
movl %ebx, %esi
movl %r12d, %edx
callq 0xe2d2
leaq 0x2543bb(%rip), %rax    # 0x2f6fa8
movq (%rax), %rax
movzbl (%rax), %eax
cmpl $0x6c, %eax
je 0xa2c0c
cmpl $0x66, %eax
movsd -0x50(%rbp), %xmm0
jne 0xa2c19
mulsd 0x65bd6(%rip), %xmm0    # 0x1087e0
jmp 0xa2c19
movsd -0x50(%rbp), %xmm0
mulsd 0x65bbf(%rip), %xmm0    # 0x1087d8
leaq 0x254390(%rip), %rcx    # 0x2f6fb0
movzbl (%rcx), %ecx
cmpl $0x8, %ecx
je 0xa2c5a
cmpl $0x3, %ecx
jne 0xa2c7f
ucomisd 0x50403(%rip), %xmm0    # 0xf3038
cmpl $0x6c, %eax
je 0xa2cc6
leaq 0x2835db(%rip), %rdi    # 0x326220
cmpl $0x66, %eax
jne 0xa2cd6
leaq 0x6e6ba(%rip), %rsi     # 0x11130f
jmp 0xa2cef
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
leaq 0x25438f(%rip), %rax    # 0x2f6ff8
movsd (%rax), %xmm0
leaq 0x2835ac(%rip), %rdi    # 0x326220
jae 0xa2ca3
leaq 0x6e62d(%rip), %rsi     # 0x1112aa
jmp 0xa2cef
ucomisd 0x503b1(%rip), %xmm0    # 0xf3038
jae 0xa2cac
cmpl $0x6c, %eax
je 0xa2cc6
leaq 0x28358b(%rip), %rdi    # 0x326220
cmpl $0x66, %eax
jne 0xa2cdf
leaq 0x6e6b2(%rip), %rsi     # 0x111353
jmp 0xa2cef
leaq 0x6e5f3(%rip), %rsi     # 0x11129d
jmp 0xa2cef
cmpl $0x6c, %eax
je 0xa2cc6
leaq 0x283568(%rip), %rdi    # 0x326220
cmpl $0x66, %eax
jne 0xa2ce8
leaq 0x6e674(%rip), %rsi     # 0x111338
jmp 0xa2cef
leaq 0x283553(%rip), %rdi    # 0x326220
leaq 0x6e649(%rip), %rsi     # 0x11131d
jmp 0xa2cef
leaq 0x6e64e(%rip), %rsi     # 0x11132b
jmp 0xa2cef
leaq 0x6e67b(%rip), %rsi     # 0x111361
jmp 0xa2cef
leaq 0x6e657(%rip), %rsi     # 0x111346
movq -0x38(%rbp), %rdx
movb $0x1, %al
callq 0x9060
xorl %eax, %eax
leaq 0x2542ad(%rip), %rcx    # 0x2f6fb0
cmpb $0x2, (%rcx)
sete %al
subl %eax, %r14d
leal 0x2(%r14), %edi
leaq 0x283509(%rip), %rcx    # 0x326220
movl %ebx, %esi
movl %r12d, %edx
callq 0xe2d2
leal 0x3(%r14), %r13d
leaq 0x7ad46(%rip), %rcx     # 0x11da72
movl %r13d, %edi
movl %ebx, %esi
movl %r12d, %edx
callq 0xe2d2
testl %r15d, %r15d
je 0xa2d64
leaq 0x25433b(%rip), %rax    # 0x2f7080
cmpl $0x0, (%rax)
je 0xa2d64
xorl %r12d, %r12d
leaq 0x253a54(%rip), %rax    # 0x2f67a8
cmpb $0x49, (%rax)
sete %r12b
cmovel %r13d, %r14d
movl %r14d, %r13d
jmp 0xa2db7
xorpd %xmm0, %xmm0
movapd -0x70(%rbp), %xmm1
cmpeqpd %xmm0, %xmm1
movapd -0x60(%rbp), %xmm2
cmpeqpd %xmm0, %xmm2
andpd %xmm1, %xmm2
movd %xmm2, %eax
testb $0x1, %al
leaq 0x253a1b(%rip), %rcx    # 0x2f67a8
jne 0xa2f37
leaq 0x254296(%rip), %rax    # 0x2f7030
movsd (%rax), %xmm1
ucomisd %xmm0, %xmm1
jne 0xa2daa
jnp 0xa2f37
cmpb $0x49, (%rcx)
jne 0xa2f37
pushq $0x1
popq %r12
leaq 0x25428a(%rip), %rax    # 0x2f7048
movsd (%rax), %xmm0
leaq 0x254297(%rip), %rax    # 0x2f7060
movsd (%rax), %xmm1
ucomisd %xmm0, %xmm1
pushq $0x19
popq %rax
pushq $0x3d
popq %r14
movl %r14d, %edx
cmoval %eax, %edx
leal (%r12,%r13), %r15d
movq %r15, -0x70(%rbp)
ucomisd %xmm1, %xmm0
pushq $0x18
popq %rax
cmoval %eax, %edx
leaq 0x283429(%rip), %rbx    # 0x326220
leaq 0x6e570(%rip), %rsi     # 0x11136e
movq %rbx, %rdi
movb $0x1, %al
callq 0x9060
leal (%r12,%r13), %eax
incl %eax
movl %eax, -0x60(%rbp)
pushq $0xf
popq %rdx
movl %r15d, %edi
movl -0x3c(%rbp), %r15d
movl %r15d, %esi
movq %rbx, %rcx
callq 0xe2d2
leaq 0x254223(%rip), %rax    # 0x2f7050
movsd (%rax), %xmm0
leaq 0x254230(%rip), %rax    # 0x2f7068
movsd (%rax), %xmm1
ucomisd %xmm0, %xmm1
pushq $0x1b
popq %rax
cmovbel %r14d, %eax
ucomisd %xmm1, %xmm0
pushq $0x1a
popq %rdx
cmovbel %eax, %edx
leaq 0x6e52a(%rip), %rsi     # 0x111382
movq %rbx, %rdi
movb $0x1, %al
callq 0x9060
leal (%r12,%r13), %eax
addl $0x2, %eax
movl %eax, -0x50(%rbp)
movl -0x60(%rbp), %edi
movl %r15d, %esi
pushq $0xf
popq %r13
movl %r13d, %edx
movq %rbx, %rcx
movq %rbx, %r12
callq 0xe2d2
leaq 0x2541cd(%rip), %rax    # 0x2f7058
movsd (%rax), %xmm0
leaq 0x2541da(%rip), %rax    # 0x2f7070
movsd (%rax), %xmm1
ucomisd %xmm0, %xmm1
movl %r14d, %edx
pushq $0x19
popq %rbx
cmoval %ebx, %edx
ucomisd %xmm1, %xmm0
pushq $0x18
popq %rax
cmoval %eax, %edx
leaq 0x6e4de(%rip), %rsi     # 0x111396
movq %r12, %rdi
movb $0x1, %al
callq 0x9060
movl -0x50(%rbp), %edi
movl %r15d, %esi
movl %r13d, %edx
movq %r12, %rcx
callq 0xe2d2
xorl %eax, %eax
leaq 0x2538cc(%rip), %rcx    # 0x2f67a8
cmpb $0x49, (%rcx)
sete %al
leaq 0x254147(%rip), %rcx    # 0x2f7030
movsd (%rcx), %xmm0
leaq 0x254144(%rip), %rcx    # 0x2f7038
movsd (%rcx), %xmm1
ucomisd %xmm0, %xmm1
cmoval %ebx, %r14d
ucomisd %xmm1, %xmm0
movq -0x70(%rbp), %rcx
leal 0x3(%rax,%rcx), %ebx
pushq $0x18
popq %rax
cmoval %eax, %r14d
leaq 0x6e490(%rip), %rsi     # 0x1113aa
movq %r12, %rdi
movl %r14d, %edx
movb $0x1, %al
callq 0x9060
movl %ebx, %edi
movl %r15d, %esi
movl %r13d, %edx
movq %r12, %rcx
callq 0xe2d2
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq