// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathmsc.cpp
// Function: plot_adev_curve(ADEV_INFO*, unsigned char, int)
void plot_adev_curve(struct ADEV_INFO *bins, u08 color, int mask)
{
int i;
int x1, x2;
float y1, y2;
float max_scale;
float min_scale;
float adev_range;
int vert_scale;
int vert_ofs;

double n;
float m;
float eb1,eb2;


   if(text_mode) return;  // no room on screen to do this
   if(rcvr_type == NO_RCVR) return;  // no room on screen to do this
   if(rcvr_type == TIDE_RCVR) return;  // ckckck has no adevs to show

   if(first_key) return;
   if(plot_adev_data == 0) return;
   if(bins == 0) return;

   if(zoom_screen == 'P') ;
   else if(zoom_screen) return;

   if(bins->adev_bins[0] == 0.0) return;

if((mask & adev_display_mask) == 0) return;

   max_scale = scale_adev(bins->adev_max);
   if(bottom_adev_decade) min_scale = scale_adev(bottom_adev_decade);
   else                   min_scale = scale_adev(bins->adev_min);
if(ATYPE == A_MTIE) {  // offset plots a little from the top and bottom of the plot area
   min_scale = scale_adev(bins->adev_min);
max_scale = (float) (global_adev_max*MTIE_SCALE);
min_scale = (float) (global_adev_min/MTIE_SCALE);
}

   adev_range = max_scale - min_scale;
   adev_range = (float) ABS(adev_range);
//sprintf(debug_text2, "ascale min:%g  max:%g  range:%g", min_scale, max_scale, adev_range);
   if(adev_range == 0.0) return;


   // adev plots are scaled to major vertical divisions
   vert_scale = (PLOT_HEIGHT / (VERT_MAJOR*2)) * (VERT_MAJOR*2);  // two major divisions per decade
   vert_ofs = (PLOT_HEIGHT - vert_scale) / 2;
   if(((PLOT_HEIGHT / (VERT_MAJOR*2)) & 0x01) == 0x00) {  // align adevs to cyan dotted lines
      vert_ofs += VERT_MAJOR;
   }
//sprintf(plot_title, "bot:%g  max(%g):%g min(%g):%g range:%g", bottom_adev_decade, bins->adev_max,max_scale, bins->adev_min,min_scale, adev_range);

   for(i=first_show_bin; i<bins->bin_count; i++) {
      x1 = (i-first_show_bin-1) * HORIZ_MAJOR;   // make sure line fits in the plot
      x2 = (i-first_show_bin) * HORIZ_MAJOR;
if(x1 > PLOT_WIDTH) continue; // aaaahhhh 
if(x2 > PLOT_WIDTH) continue;
if(x1 < 0) continue;
if(x2 < 0) continue;
      if(x1 < 0) x1 = 0;
      if(x2 > PLOT_WIDTH) x2 = PLOT_WIDTH;

      y1 = (0.0F - scale_adev(bins->adev_bins[i-1]));
      y1 += max_scale;
      y1 /= adev_range;
      y1 *= (float) vert_scale;
      y1 += (float) (PLOT_ROW + vert_ofs);
      if(y1 <= PLOT_ROW) y1 = (float) (PLOT_ROW+2);
      if(y1 >= (PLOT_ROW+PLOT_HEIGHT-1)) y1 = (float) (PLOT_ROW+PLOT_HEIGHT-2);

      y2 = eb1 = eb2 = bins->adev_bins[i];
      y2 = (0.0F - scale_adev(y2));
      y2 += max_scale;
      y2 /= adev_range;
      y2 *= (float) vert_scale;
      y2 += (float) (PLOT_ROW+vert_ofs);
      if(y2 <= PLOT_ROW) y2 = (float) (PLOT_ROW+2);
      if(y2 >= (PLOT_ROW+PLOT_HEIGHT-1)) y2 = (float) (PLOT_ROW+PLOT_HEIGHT-2);

      if(x1 < PLOT_WIDTH) {
         line(PLOT_COL+x1, (int) y1, PLOT_COL+x2, (int) y2, color);
      }
   }

   // draw error bars from last bin to first bin
   if(show_error_bars == 0) return;  // bars disabled
if(ATYPE == A_MTIE) return;

   for(i=bins->bin_count-1; i>=first_show_bin; i--) {
      eb1 = eb2 = bins->adev_bins[i];

      x1 = (i-first_show_bin-1) * HORIZ_MAJOR;   // make sure line fits in the plot
      x2 = (i-first_show_bin) * HORIZ_MAJOR;
if(x1 > PLOT_WIDTH) continue;
if(x2 > PLOT_WIDTH) continue;
if(x1 < 0) continue;
if(x2 < 0) continue;
      if(x1 < 0) x1 = 0;
      if(x2 > PLOT_WIDTH) x2 = PLOT_WIDTH;

      if(1 || (x1 < PLOT_WIDTH)) {
         m = (float) bins->adev_taus[i];
         if(m == 0) continue;

         n = (double) bins->adev_on[i];
         n = sqrt(n/(double) m);
         if(n == 0) continue;

         eb1 -= (eb1 / (float) n);
         eb1 = (0.0F - scale_adev(eb1));
         eb1 += max_scale;
         eb1 /= adev_range;
         eb1 *= vert_scale;
         eb1 += (PLOT_ROW+vert_ofs);
         if(eb1< PLOT_ROW) eb1 = (float) PLOT_ROW;
         if(eb1 >= (PLOT_ROW+PLOT_HEIGHT)) eb1 = (float) (PLOT_ROW+PLOT_HEIGHT);

         eb2 += (eb2 / (float) n);
         eb2 = (0.0F - scale_adev(eb2));
         eb2 += max_scale;
         eb2 /= adev_range;
         eb2 *= vert_scale;
         eb2 += (PLOT_ROW+vert_ofs);
         if(eb2< PLOT_ROW) eb2 = (float) PLOT_ROW;
         if(eb2 >= (PLOT_ROW+PLOT_HEIGHT)) eb2 = (float) (PLOT_ROW+PLOT_HEIGHT);


         if(n < 1.0) {  // error bars are too large to be meaningful - limit size and use arrow endcaps
            eb1 = y2 - (float) (adev_decade_height / 2.0);
            eb2 = y2 + (float) ( adev_decade_height / 2.0);

            if(eb1< PLOT_ROW) eb1 = (float) PLOT_ROW;
            if(eb1 >= (PLOT_ROW+PLOT_HEIGHT)) eb1 = (float) (PLOT_ROW+PLOT_HEIGHT);

            if(eb2< PLOT_ROW) eb2 = (float) PLOT_ROW;
            if(eb2 >= (PLOT_ROW+PLOT_HEIGHT)) eb2 = (float) (PLOT_ROW+PLOT_HEIGHT);

            line(PLOT_COL+x2,(int) eb1, PLOT_COL+x2,(int)eb2, color);

            line(PLOT_COL+x2-HORIZ_MINOR/3,(int) eb1+VERT_MINOR, PLOT_COL+x2,(int)eb1, color);
            line(PLOT_COL+x2+HORIZ_MINOR/3,(int) eb1+VERT_MINOR, PLOT_COL+x2,(int)eb1, color);

            line(PLOT_COL+x2-HORIZ_MINOR/3,(int) eb2-VERT_MINOR, PLOT_COL+x2,(int)eb2, color);
            line(PLOT_COL+x2+HORIZ_MINOR/3,(int) eb2-VERT_MINOR, PLOT_COL+x2,(int)eb2, color);
         }
         else if(0 || (fabs(eb2-eb1) >= (double) (VERT_MINOR*1))) { // good bars, use flat end caps
            if(0) {  // center error bars on the adev line
               y2 = bins->adev_bins[i];
               y2 = (0.0F - scale_adev(y2));
               y2 += max_scale;
               y2 /= adev_range;
               y2 *= (float) vert_scale;
               y2 += (float) (PLOT_ROW+vert_ofs);
               if(y2 < PLOT_ROW) y2 = (float) PLOT_ROW;
               if(y2 >= (PLOT_ROW+PLOT_HEIGHT)) y2 = (float) (PLOT_ROW+PLOT_HEIGHT);

               m = (float) (fabs(eb1-eb2) / 2.0);
               eb1 = y2 - m;
               eb2 = y2 + m;
            }

            line(PLOT_COL+x2,(int) eb1, PLOT_COL+x2,(int)eb2, color);

            line(PLOT_COL+x2-HORIZ_MINOR/3,(int) eb1, PLOT_COL+x2+HORIZ_MINOR/3,(int)eb1, color);
            line(PLOT_COL+x2-HORIZ_MINOR/3,(int) eb2, PLOT_COL+x2+HORIZ_MINOR/3,(int)eb2, color);
         }
         else {  // stop on last non-short error bar
            break;
         }
      }
   }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
leaq 0x115c5f(%rip), %rax    # 0x2187d8
cmpl $0x0, (%rax)
je 0x102b90
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x115d39(%rip), %rax    # 0x2188d0
movq (%rax), %rax
cmpq $0x400, %rax            # imm = 0x400
je 0x102b7e
cmpq $0x800000, %rax         # imm = 0x800000
je 0x102b7e
movq %rdi, %rbx
testq %rdi, %rdi
je 0x102b7e
leaq 0x13c39f(%rip), %rax    # 0x23ef58
cmpl $0x0, (%rax)
jne 0x102b7e
leaq 0x118814(%rip), %rax    # 0x21b3d9
cmpb $0x0, (%rax)
je 0x102b7e
movl %esi, %r14d
leaq 0x209bd4(%rip), %rax    # 0x30c7a8
movzbl (%rax), %eax
cmpl $0x50, %eax
je 0x102be0
testl %eax, %eax
jne 0x102b7e
movss 0x194(%rbx), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x102bf2
jnp 0x102b7e
leaq 0x120a1f(%rip), %rax    # 0x223618
testl %edx, (%rax)
je 0x102b7e
movss 0x650(%rbx), %xmm0
callq 0xfee01
movss %xmm0, -0x30(%rbp)
movss 0x2779a1(%rip), %xmm0   # 0x37a5b8
xorps %xmm1, %xmm1
ucomiss %xmm1, %xmm0
jne 0x102c29
jp 0x102c29
movss 0x64c(%rbx), %xmm0
callq 0xfee01
leaq 0x1209db(%rip), %rax    # 0x223610
movl (%rax), %ecx
cmpl $0x9, %ecx
jne 0x102c6f
leaq 0x139ea5(%rip), %rax    # 0x23cae8
movsd 0x29b35(%rip), %xmm0    # 0x12c780
movsd (%rax), %xmm1
mulsd %xmm0, %xmm1
cvtsd2ss %xmm1, %xmm2
leaq 0x139e92(%rip), %rax    # 0x23caf0
movsd (%rax), %xmm1
divsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
jmp 0x102c74
movss -0x30(%rbp), %xmm2
movss %xmm2, -0x30(%rbp)
movaps %xmm2, %xmm1
subss %xmm0, %xmm1
xorps %xmm0, %xmm0
xorps %xmm2, %xmm2
subss %xmm1, %xmm2
movaps %xmm1, %xmm3
cmpltss %xmm0, %xmm3
andps %xmm3, %xmm2
andnps %xmm1, %xmm3
orps %xmm2, %xmm3
ucomiss %xmm0, %xmm3
jne 0x102ca6
jnp 0x102b7e
leaq 0x115bdb(%rip), %rax    # 0x218888
movl (%rax), %eax
leaq 0x115bb6(%rip), %rdx    # 0x21886c
movl (%rdx), %esi
leal (%rsi,%rsi), %r8d
cltd
idivl %r8d
imull %eax, %r8d
movl %edx, %edi
shrl $0x1f, %edi
addl %edx, %edi
sarl %edi
xorl %edx, %edx
testb $0x1, %al
cmovel %esi, %edx
addl %edi, %edx
movq %rdx, -0x98(%rbp)
leaq 0x139f9c(%rip), %rsi    # 0x23cc80
movl (%rsi), %r13d
movl 0x648(%rbx), %edi
movzbl %r14b, %eax
movl %eax, -0x2c(%rbp)
cmpl %edi, %r13d
movaps %xmm3, -0xb0(%rbp)
jge 0x102ef6
movl %r8d, -0x74(%rbp)
cvtsi2ss %r8d, %xmm4
movslq %r13d, %r14
leaq 0x115b5d(%rip), %rax    # 0x218874
movl (%rax), %ecx
leaq 0x115b64(%rip), %rax    # 0x218884
movl (%rax), %edx
movss %xmm4, -0x34(%rbp)
movl %r14d, %r15d
subl %r13d, %r15d
leal -0x1(%r15), %r12d
imull %ecx, %r12d
cmpl %edx, %r12d
jle 0x102d4a
incq %r14
movslq %edi, %rax
cmpq %rax, %r14
jl 0x102d27
jmp 0x102ef8
imull %ecx, %r15d
cmpl %edx, %r15d
jg 0x102d3a
movl %r12d, %eax
orl %r15d, %eax
js 0x102d3a
movl %ecx, -0x78(%rbp)
movl %edi, -0x38(%rbp)
leaq 0x115b14(%rip), %rax    # 0x21887c
movl (%rax), %eax
movq -0x98(%rbp), %rcx
addl %eax, %ecx
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
movss %xmm0, -0x3c(%rbp)
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x58(%rbp)
leal 0x2(%rax), %ecx
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
movaps %xmm0, -0x90(%rbp)
leaq 0x115ae5(%rip), %rcx    # 0x218888
movl (%rcx), %ecx
movl %edx, -0x40(%rbp)
leal -0x1(%rcx,%rax), %edx
xorps %xmm0, %xmm0
cvtsi2ss %edx, %xmm0
movaps %xmm0, -0x50(%rbp)
leal -0x2(%rcx,%rax), %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movaps %xmm0, -0x70(%rbp)
movss 0x194(%rbx,%r14,4), %xmm0
callq 0xfee01
movl -0x40(%rbp), %edx
movss -0x34(%rbp), %xmm4
xorps %xmm1, %xmm1
subss %xmm0, %xmm1
movss -0x30(%rbp), %xmm2
addss %xmm2, %xmm1
divss -0xb0(%rbp), %xmm1
mulss %xmm4, %xmm1
addss -0x3c(%rbp), %xmm1
movaps %xmm1, %xmm0
cmpnless -0x58(%rbp), %xmm0
andps %xmm0, %xmm1
andnps -0x90(%rbp), %xmm0
orps %xmm1, %xmm0
movaps -0x50(%rbp), %xmm3
cmpnless %xmm0, %xmm3
movaps %xmm3, %xmm1
andps %xmm0, %xmm1
andnps -0x70(%rbp), %xmm3
orps %xmm1, %xmm3
cmpl %edx, %r12d
movaps %xmm3, -0xc0(%rbp)
jge 0x102ee4
movss 0x190(%rbx,%r14,4), %xmm0
callq 0xfee01
xorps %xmm1, %xmm1
subss %xmm0, %xmm1
addss -0x30(%rbp), %xmm1
divss -0xb0(%rbp), %xmm1
mulss -0x34(%rbp), %xmm1
addss -0x3c(%rbp), %xmm1
movaps %xmm1, %xmm0
cmpnless -0x58(%rbp), %xmm0
andps %xmm0, %xmm1
andnps -0x90(%rbp), %xmm0
orps %xmm1, %xmm0
movaps -0x50(%rbp), %xmm2
cmpnless %xmm0, %xmm2
movaps %xmm2, %xmm1
andps %xmm0, %xmm1
andnps -0x70(%rbp), %xmm2
orps %xmm1, %xmm2
leaq 0x1159e6(%rip), %rax    # 0x218880
movl (%rax), %eax
cvttss2si %xmm2, %esi
addl %eax, %r12d
addl %eax, %r15d
cvttss2si -0xc0(%rbp), %ecx
movl %r12d, %edi
movl %r15d, %edx
movl -0x2c(%rbp), %r8d
callq 0xe38a
leaq 0x139dbc(%rip), %rsi    # 0x23cc80
movl (%rsi), %r13d
leaq 0x1159a6(%rip), %rax    # 0x218874
movl (%rax), %ecx
leaq 0x1159ad(%rip), %rax    # 0x218884
movl (%rax), %edx
movl 0x648(%rbx), %edi
jmp 0x102d3a
leaq 0x139d95(%rip), %rsi    # 0x23cc80
movl -0x38(%rbp), %edi
movl -0x78(%rbp), %ecx
jmp 0x102d3a
jmp 0x102f05
leaq 0x120711(%rip), %rax    # 0x223610
movl (%rax), %ecx
movl -0x74(%rbp), %r8d
leaq 0x139de0(%rip), %rax    # 0x23ccec
cmpl $0x0, (%rax)
je 0x102b7e
cmpl $0x9, %ecx
je 0x102b7e
cmpl %r13d, %edi
jle 0x102b7e
xorps %xmm0, %xmm0
cvtsi2ss %r8d, %xmm0
movss %xmm0, -0x34(%rbp)
movslq %edi, %r12
addl $-0x2, %edi
leaq 0x115933(%rip), %r8     # 0x218874
leaq 0x11593c(%rip), %r14    # 0x218884
xorps %xmm2, %xmm2
xorps %xmm3, %xmm3
movl %edi, %ecx
subl %r13d, %ecx
movl (%r8), %r15d
movl %r15d, %eax
imull %ecx, %eax
movl (%r14), %edx
cmpl %edx, %eax
jg 0x1033aa
incl %ecx
imull %ecx, %r15d
cmpl %edx, %r15d
jg 0x1033aa
orl %r15d, %eax
js 0x1033aa
movss (%rbx,%r12,4), %xmm1
ucomiss %xmm2, %xmm1
jne 0x102f90
jnp 0x1033aa
movss 0x190(%rbx,%r12,4), %xmm0
movss %xmm0, -0x50(%rbp)
xorps %xmm0, %xmm0
cvtsi2sdq 0x320(%rbx,%r12,8), %xmm0
cvtss2sd %xmm1, %xmm1
divsd %xmm1, %xmm0
ucomisd %xmm3, %xmm0
jb 0x102fc0
sqrtsd %xmm0, %xmm0
jmp 0x102fdf
movl %edi, %r13d
callq 0x9270
xorps %xmm3, %xmm3
xorps %xmm2, %xmm2
leaq 0x11589f(%rip), %r8     # 0x218874
movl %r13d, %edi
leaq 0x139ca1(%rip), %rsi    # 0x23cc80
ucomisd %xmm3, %xmm0
jne 0x102feb
jnp 0x1033aa
movl %edi, -0x38(%rbp)
movsd %xmm0, -0x58(%rbp)
cvtsd2ss %xmm0, %xmm0
movss -0x50(%rbp), %xmm2
movaps %xmm2, %xmm1
divss %xmm0, %xmm1
movss %xmm1, -0x3c(%rbp)
movaps %xmm2, %xmm0
subss %xmm1, %xmm0
callq 0xfee01
leaq 0x115861(%rip), %rax    # 0x21887c
movl (%rax), %r13d
xorps %xmm1, %xmm1
cvtsi2ss %r13d, %xmm1
movaps %xmm1, -0x70(%rbp)
movss %xmm0, -0x40(%rbp)
leaq 0x115852(%rip), %rax    # 0x218888
movl (%rax), %eax
addl %r13d, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movaps %xmm0, -0x90(%rbp)
movss -0x3c(%rbp), %xmm0
addss -0x50(%rbp), %xmm0
callq 0xfee01
movsd 0x6010(%rip), %xmm1     # 0x109070
ucomisd -0x58(%rbp), %xmm1
jbe 0x10322e
leaq 0x139c7e(%rip), %rax    # 0x23ccf0
movsd (%rax), %xmm0
mulsd 0x5fea(%rip), %xmm0     # 0x109068
cvtsd2ss %xmm0, %xmm0
movaps -0xc0(%rbp), %xmm2
movaps %xmm2, %xmm1
subss %xmm0, %xmm1
addss %xmm2, %xmm0
movaps -0x70(%rbp), %xmm4
movaps %xmm4, %xmm2
maxss %xmm1, %xmm2
movaps -0x90(%rbp), %xmm5
movaps %xmm5, %xmm1
cmpless %xmm2, %xmm1
movaps %xmm1, %xmm3
andnps %xmm2, %xmm3
andps %xmm5, %xmm1
orps %xmm3, %xmm1
maxss %xmm0, %xmm4
movaps %xmm5, %xmm0
cmpless %xmm4, %xmm0
movaps %xmm0, %xmm2
andnps %xmm4, %xmm2
andps %xmm5, %xmm0
orps %xmm2, %xmm0
leaq 0x1157a7(%rip), %rax    # 0x218880
movl (%rax), %edi
addl %r15d, %edi
cvttss2si %xmm1, %r13d
cvttss2si %xmm0, %ecx
movl %ecx, -0x50(%rbp)
movl %r13d, %esi
movl %edi, %edx
movl -0x2c(%rbp), %r8d
callq 0xe38a
leaq 0x115781(%rip), %rax    # 0x218880
movl (%rax), %edx
addl %r15d, %edx
leaq 0x11576d(%rip), %rax    # 0x218878
movslq (%rax), %rax
imulq $0x55555555, %rax, %rdi # imm = 0x55555555
shrq $0x20, %rdi
subl %eax, %edi
movl %edi, %eax
shrl $0x1f, %eax
sarl %edi
addl %eax, %edi
addl %edx, %edi
leaq 0x115743(%rip), %rax    # 0x218870
movl (%rax), %esi
addl %r13d, %esi
movl %r13d, %ecx
movl -0x2c(%rbp), %r8d
callq 0xe38a
leaq 0x11573b(%rip), %rax    # 0x218880
movl (%rax), %edx
addl %r15d, %edx
leaq 0x115727(%rip), %rax    # 0x218878
movslq (%rax), %rax
imulq $0x55555556, %rax, %rdi # imm = 0x55555556
movq %rdi, %rax
shrq $0x3f, %rax
shrq $0x20, %rdi
addl %eax, %edi
addl %edx, %edi
leaq 0x1156ff(%rip), %rax    # 0x218870
movl (%rax), %esi
addl %r13d, %esi
movl %r13d, %ecx
movl -0x2c(%rbp), %r8d
callq 0xe38a
leaq 0x1156f7(%rip), %rax    # 0x218880
movl (%rax), %edx
addl %r15d, %edx
leaq 0x1156e3(%rip), %rax    # 0x218878
movslq (%rax), %rax
imulq $0x55555555, %rax, %rdi # imm = 0x55555555
shrq $0x20, %rdi
subl %eax, %edi
movl %edi, %eax
shrl $0x1f, %eax
sarl %edi
addl %eax, %edi
addl %edx, %edi
movl -0x50(%rbp), %r13d
movl %r13d, %esi
leaq 0x1156b2(%rip), %rax    # 0x218870
subl (%rax), %esi
movl %r13d, %ecx
movl -0x2c(%rbp), %r8d
callq 0xe38a
leaq 0x1156ad(%rip), %rax    # 0x218880
addl (%rax), %r15d
leaq 0x11569b(%rip), %rax    # 0x218878
movslq (%rax), %rax
imulq $0x55555556, %rax, %rdi # imm = 0x55555556
movq %rdi, %rax
shrq $0x3f, %rax
shrq $0x20, %rdi
addl %eax, %edi
addl %r15d, %edi
movl %r13d, %esi
leaq 0x11566f(%rip), %rax    # 0x218870
subl (%rax), %esi
movl %r15d, %edx
movl %r13d, %ecx
movl -0x2c(%rbp), %r8d
callq 0xe38a
leaq 0x139a67(%rip), %rsi    # 0x23cc80
movl -0x38(%rbp), %edi
leaq 0x115651(%rip), %r8     # 0x218874
xorps %xmm2, %xmm2
xorps %xmm3, %xmm3
jmp 0x1033aa
xorpd %xmm1, %xmm1
subss -0x40(%rbp), %xmm1
movss -0x30(%rbp), %xmm5
addss %xmm5, %xmm1
addl -0x98(%rbp), %r13d
xorps %xmm2, %xmm2
cvtsi2ss %r13d, %xmm2
movaps -0xb0(%rbp), %xmm6
divss %xmm6, %xmm1
movss -0x34(%rbp), %xmm7
mulss %xmm7, %xmm1
addss %xmm2, %xmm1
movaps -0x70(%rbp), %xmm8
movaps %xmm8, %xmm3
maxss %xmm1, %xmm3
movaps -0x90(%rbp), %xmm9
movaps %xmm9, %xmm1
cmpless %xmm3, %xmm1
movaps %xmm1, %xmm4
andnps %xmm3, %xmm4
andps %xmm9, %xmm1
orps %xmm4, %xmm1
xorps %xmm3, %xmm3
subss %xmm0, %xmm3
addss %xmm5, %xmm3
divss %xmm6, %xmm3
mulss %xmm7, %xmm3
addss %xmm2, %xmm3
maxss %xmm3, %xmm8
movaps %xmm9, %xmm0
cmpless %xmm8, %xmm0
movaps %xmm0, %xmm2
andnps %xmm8, %xmm2
andps %xmm9, %xmm0
orps %xmm2, %xmm0
movaps %xmm0, %xmm2
subss %xmm1, %xmm2
andps 0x2968c(%rip), %xmm2    # 0x12c960
cvtss2sd %xmm2, %xmm2
leaq 0x115591(%rip), %rax    # 0x218870
xorps %xmm3, %xmm3
cvtsi2sdl (%rax), %xmm3
ucomisd %xmm3, %xmm2
jb 0x102b7e
leaq 0x115589(%rip), %rax    # 0x218880
movl (%rax), %edi
addl %r15d, %edi
cvttss2si %xmm1, %esi
movl %esi, -0x70(%rbp)
cvttss2si %xmm0, %ecx
movl %ecx, -0x50(%rbp)
movl %edi, %edx
movl -0x2c(%rbp), %r13d
movl %r13d, %r8d
callq 0xe38a
leaq 0x115561(%rip), %rax    # 0x218880
movl (%rax), %eax
addl %r15d, %eax
leaq 0x11554d(%rip), %rcx    # 0x218878
movslq (%rcx), %rcx
imulq $0x55555556, %rcx, %rdx # imm = 0x55555556
movq %rdx, %rcx
shrq $0x3f, %rcx
shrq $0x20, %rdx
addl %ecx, %edx
movl %eax, %edi
subl %edx, %edi
addl %eax, %edx
movl -0x70(%rbp), %ecx
movl %ecx, %esi
movl %r13d, %r8d
callq 0xe38a
leaq 0x115524(%rip), %rax    # 0x218880
addl (%rax), %r15d
leaq 0x115512(%rip), %rax    # 0x218878
movslq (%rax), %rax
imulq $0x55555556, %rax, %rdx # imm = 0x55555556
movq %rdx, %rax
shrq $0x3f, %rax
shrq $0x20, %rdx
addl %eax, %edx
movl %r15d, %edi
subl %edx, %edi
addl %r15d, %edx
movl -0x50(%rbp), %ecx
movl %ecx, %esi
movl %r13d, %r8d
callq 0xe38a
xorpd %xmm3, %xmm3
xorps %xmm2, %xmm2
leaq 0x1154d4(%rip), %r8     # 0x218874
movl -0x38(%rbp), %edi
leaq 0x1398d6(%rip), %rsi    # 0x23cc80
decq %r12
movslq (%rsi), %r13
decl %edi
cmpq %r13, %r12
jg 0x102f4e
jmp 0x102b7e