// File: jkingan[P]ladyheather/heather.cpp
// Function: plot_entry(long)
void plot_entry(long i)
{
DATA_SIZE x;
DATA_SIZE y;
DATA_SIZE val;
DATA_SIZE data;
double t;
struct PLOT_Q q;
struct PLOT_Q q2;
int col;
int py;
int k;
u16 sat_flags;

   // draw all data points for the next column in the plot

   if(first_key) return;    // plot area is in use for help/warning message
   if(text_mode) return;    // no graphics available in text mode
   if(rcvr_type == NO_RCVR) return;
   if(no_plots) return;
   if(zoom_screen == 'P');
   else if(zoom_screen) return;
   if(queue_interval <= 0) return;  // no queue data to plot

   if(filter_count) {
      q = filter_plot_q(i);   // plot filtered data
      sat_flags = filter_flags; // q.sat_flags;
   }
   else {
      q = get_plot_q(i);      // plot raw data
      sat_flags = q.sat_flags;
   }


   batt_mah += q.data[BATTI] * (DATA_SIZE) (queue_interval*view_interval/(DATA_SIZE) 3600.0);
   batt_mwh += q.data[BATTI] * (DATA_SIZE) q.data[BATTV] * (queue_interval*view_interval/(DATA_SIZE) 3600.0);
   load_mah += q.data[LEDI] * (DATA_SIZE) (queue_interval*view_interval/(DATA_SIZE) 3600.0);
   load_mwh += q.data[LEDI] * (DATA_SIZE) q.data[LEDV] * (queue_interval*view_interval/(DATA_SIZE) 3600.0);

   if(show_mah) {
      sprintf(debug_text, " Battery: Ah=%.3f  Wh=%.3f     LED: Ah=%.3f  Wh=%.3f", batt_mah,batt_mwh, load_mah,load_mwh);
   }


   for(k=0; k<NUM_PLOTS+DERIVED_PLOTS; k++) {     // compensate for linear trend line slope (drift rate)
      t = (double) plot_column*view_interval;
      q.data[k] = remove_trend(k, 0, t, q.data[k]);
   }

   col = PLOT_COL + plot_column;    // where we will be plotting
   if(plot_column <= 0) {           // no data or only one point to plot
      last_plot_col = 0;
      plot_dot = 1;
   }
   else {  // with more than one point available, connect the dots with lines
      last_plot_col = plot_column-plot_mag;
      if(last_plot_col < 0) last_plot_col = 0;
      plot_dot = 0;
   }

   if(sat_flags & TIME_SKIP) {  // flag skips and stutters in the time stamps
      if(plot_skip_data) {        // use small skip markers
         line(col,PLOT_ROW, col,PLOT_ROW+8, SKIP_COLOR);
      }
   }


   if(plot_holdover_data && (sat_flags & HOLDOVER)) {  // flag holdover events
      if(plot_dot) {
         dot(col,PLOT_ROW+0, HOLDOVER_COLOR);
         dot(col,PLOT_ROW+1, HOLDOVER_COLOR);
      }
      else {
         line(PLOT_COL+last_plot_col,PLOT_ROW+0, col,PLOT_ROW+0, HOLDOVER_COLOR);
         line(PLOT_COL+last_plot_col,PLOT_ROW+1, col,PLOT_ROW+1, HOLDOVER_COLOR);
      }
   }

   show_last_mouse_x(GREEN);

   // flag satellite constellation changes
   if(plot_const_changes && (sat_flags & CONST_CHANGE)) {
      line(col,PLOT_ROW+PLOT_HEIGHT, col,PLOT_ROW+PLOT_HEIGHT-8, CONST_COLOR);
//    plot_dot = 1;  // highlights satellite change discontinuites
   }

   if(plot[SAT_PLOT].show_plot) {  // show_sat_plot
      py = (q.sat_flags & SAT_COUNT_MASK) * COUNT_SCALE;
      if(py > PLOT_HEIGHT) py = PLOT_HEIGHT;
      py = (PLOT_ROW+PLOT_HEIGHT) - py;
      if(plot_dot) dot(col,py, COUNT_COLOR);
      else         line(PLOT_COL+last_plot_col,last_count_y, col,py, plot[SAT_PLOT].plot_color);
      last_count_y = py;
   }

   // draw each of the data plots
   for(k=0; k<NUM_PLOTS+DERIVED_PLOTS; k++) {
      if(plot[k].show_plot) {
         data = q.data[k];

         if(plot[k].show_deriv) {  // showing plot derivative
            if(filter_count) q2 = filter_plot_q(i-1);   // plot filtered data
            else             q2 = get_plot_q(i-1);      // plot raw data
            data -= q2.data[k];
         }
         else if(tie_plot(k) && plot[k].show_freq) {
            data = (DATA_SIZE) tie_to_freq(k, data);
         }

         if(k == TEMP) y = (DATA_SIZE) ((scale_temp((double) data / (double) queue_interval) - plot[k].plot_center) * plot[k].ref_scale);  // y = ppt
else if(enviro_mode() && (k == PRESSURE)) y = (DATA_SIZE) ((scale_pressure((double) data / (double) queue_interval) - plot[k].plot_center) * plot[k].ref_scale);
         else if(luxor && (k == TC2)) y = (DATA_SIZE) (((double) scale_temp(data / (double) queue_interval) - plot[k].plot_center) * plot[k].ref_scale);  // y = ppt
         else if(luxor && (k == LUX1)) y = (DATA_SIZE) (((data / queue_interval * lux_scale) - plot[k].plot_center) * plot[k].ref_scale);
         else if(luxor && (k == LUX2)) y = (DATA_SIZE) (((data / queue_interval * lum_scale) - plot[k].plot_center) * plot[k].ref_scale);
         else if(k >= NUM_PLOTS) {  // derived data DERIVED_PLOTS !!!!!
            if(luxor && (k == BATTW)) {        // battery watts
               y = (DATA_SIZE) (((q.data[BATTI]*q.data[BATTV] / queue_interval) - plot[k].plot_center) * plot[k].ref_scale);
            }
            else if(luxor && (k == LEDW)) {   // LED watts
               y = (DATA_SIZE) (((q.data[LEDI]*q.data[LEDV] / queue_interval) - plot[k].plot_center) * plot[k].ref_scale);
            }
            else if(luxor && (k == EFF)) { // driver efficency
               val = q.data[BATTI]*q.data[BATTV];
               if(val) val = q.data[LEDI]*q.data[LEDV] / val;
               val *= (DATA_SIZE) 100.0;
               y = (DATA_SIZE) ((val - plot[k].plot_center) * plot[k].ref_scale);
            }
            else if(luxor && (k == CCT)) { // color temo
               val = (DATA_SIZE) calc_cct(cct_type, 1, (double)q.data[REDHZ]/(double)queue_interval, (double)q.data[GREENHZ]/(double)queue_interval, (double)q.data[BLUEHZ]/(double)queue_interval);
               y = (DATA_SIZE) ((val - plot[k].plot_center) * plot[k].ref_scale);
            }
            else {
//             y = (DATA_SIZE) 0.0;
               y = (DATA_SIZE) (((data / queue_interval) - plot[k].plot_center) * plot[k].ref_scale);  // y = ppt
            }
         }
         else {
            y = (DATA_SIZE) (((data / queue_interval) - plot[k].plot_center) * plot[k].ref_scale);  // y = ppt
         }

         y /= (DATA_SIZE) (plot[k].scale_factor*plot[k].invert_plot);
         if(k != SAT_PLOT) {
            plot[k].last_y = plot_y(y, plot[k].last_y, plot[k].plot_color);
         }
      }

      if(plot[k].show_freq) ;        // can't plot trend line of freq plots
      else if(plot[k].show_deriv) ;  // can't plot trend line of derivative plots
      else if(plot[k].show_trend) {  // draw the trend line plot
         x = view_interval * queue_interval * (DATA_SIZE) plot_column;
         if(plot_mag) x /= (DATA_SIZE) plot_mag;
         y = (DATA_SIZE) (((plot[k].a0 + (plot[k].a1*x)) - plot[k].plot_center) * plot[k].ref_scale);  // y = ppt
         y /= (DATA_SIZE) (plot[k].scale_factor*plot[k].invert_plot);
         plot[k].last_trend_y = plot_y(y, plot[k].last_trend_y, plot[k].plot_color);
      }
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x460, %rsp            # imm = 0x460
movq %rdi, -0x8(%rbp)
cmpl $0x0, 0x27b4f2(%rip)    # 0x29e138
je 0x22c4d
jmp 0x23aad
cmpl $0x0, 0x254d64(%rip)    # 0x2779b8
je 0x22c5b
jmp 0x23aad
cmpq $0x400, 0x254e4a(%rip) # imm = 0x400
jne 0x22c6d
jmp 0x23aad
cmpl $0x0, 0x37c2d4(%rip)    # 0x39ef48
je 0x22c7b
jmp 0x23aad
movzbl 0x348d06(%rip), %eax    # 0x36b988
cmpl $0x50, %eax
jne 0x22c89
jmp 0x22c99
cmpb $0x0, 0x348cf8(%rip)    # 0x36b988
je 0x22c97
jmp 0x23aad
jmp 0x22c99
cmpq $0x0, 0x2578d7(%rip)    # 0x27a578
jg 0x22ca8
jmp 0x23aad
cmpq $0x0, 0x2579a0(%rip)    # 0x27a650
je 0x22cea
movq -0x8(%rbp), %rsi
leaq -0x250(%rbp), %rdi
callq 0x16160
leaq -0xe0(%rbp), %rdi
leaq -0x250(%rbp), %rsi
movl $0xb0, %edx
callq 0x92c0
movw 0x37c757(%rip), %ax     # 0x39f438
movw %ax, -0x19e(%rbp)
jmp 0x22d20
movq -0x8(%rbp), %rsi
leaq -0x300(%rbp), %rdi
callq 0x133f0
leaq -0xe0(%rbp), %rdi
leaq -0x300(%rbp), %rsi
movl $0xb0, %edx
callq 0x92c0
movw -0xe0(%rbp), %ax
movw %ax, -0x19e(%rbp)
movsd -0xc8(%rbp), %xmm0
movq 0x257849(%rip), %rax    # 0x27a578
imulq 0x257849(%rip), %rax    # 0x27a580
cvtsi2sd %rax, %xmm2
movsd 0x14c2cc(%rip), %xmm1   # 0x16f010
divsd %xmm1, %xmm2
movsd 0x3492f8(%rip), %xmm1   # 0x36c048
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x3492e8(%rip)   # 0x36c048
movsd -0xc8(%rbp), %xmm0
mulsd -0xc0(%rbp), %xmm0
movq 0x257801(%rip), %rax    # 0x27a578
imulq 0x257801(%rip), %rax    # 0x27a580
cvtsi2sd %rax, %xmm2
movsd 0x14c284(%rip), %xmm1   # 0x16f010
divsd %xmm1, %xmm2
movsd 0x3492b8(%rip), %xmm1   # 0x36c050
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x3492a8(%rip)   # 0x36c050
movsd -0xa0(%rbp), %xmm0
movq 0x2577c1(%rip), %rax    # 0x27a578
imulq 0x2577c1(%rip), %rax    # 0x27a580
cvtsi2sd %rax, %xmm2
movsd 0x14c244(%rip), %xmm1   # 0x16f010
divsd %xmm1, %xmm2
movsd 0x349280(%rip), %xmm1   # 0x36c058
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x349270(%rip)   # 0x36c058
movsd -0xa0(%rbp), %xmm0
mulsd -0xa8(%rbp), %xmm0
movq 0x257779(%rip), %rax    # 0x27a578
imulq 0x257779(%rip), %rax    # 0x27a580
cvtsi2sd %rax, %xmm2
movsd 0x14c1fc(%rip), %xmm1   # 0x16f010
divsd %xmm1, %xmm2
movsd 0x349240(%rip), %xmm1   # 0x36c060
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x349230(%rip)   # 0x36c060
cmpb $0x0, 0x34920d(%rip)    # 0x36c044
je 0x22e6e
movsd 0x349207(%rip), %xmm0   # 0x36c048
movsd 0x349207(%rip), %xmm1   # 0x36c050
movsd 0x349207(%rip), %xmm2   # 0x36c058
movsd 0x349207(%rip), %xmm3   # 0x36c060
leaq 0x37ad20(%rip), %rdi    # 0x39db80
leaq 0x14dd0e(%rip), %rsi    # 0x170b75
movb $0x4, %al
callq 0x9060
movl $0x0, -0x19c(%rbp)
cmpl $0x14, -0x19c(%rbp)
jge 0x22ede
cvtsi2sdl 0x257723(%rip), %xmm0 # 0x27a5ac
cvtsi2sdq 0x2576ee(%rip), %xmm1 # 0x27a580
mulsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
movl -0x19c(%rbp), %edi
movsd -0x30(%rbp), %xmm0
movslq -0x19c(%rbp), %rax
movsd -0xd0(%rbp,%rax,8), %xmm1
xorl %esi, %esi
callq 0x19850
movslq -0x19c(%rbp), %rax
movsd %xmm0, -0xd0(%rbp,%rax,8)
movl -0x19c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x19c(%rbp)
jmp 0x22e78
movl 0x254b7c(%rip), %eax    # 0x277a60
addl 0x2576c2(%rip), %eax    # 0x27a5ac
movl %eax, -0x194(%rbp)
cmpl $0x0, 0x2576b5(%rip)    # 0x27a5ac
jg 0x22f0c
movl $0x0, 0x37c83d(%rip)    # 0x39f740
movb $0x1, 0x37c83a(%rip)    # 0x39f744
jmp 0x22f38
movl 0x25769a(%rip), %eax    # 0x27a5ac
subl 0x257698(%rip), %eax    # 0x27a5b0
movl %eax, 0x37c822(%rip)    # 0x39f740
cmpl $0x0, 0x37c81b(%rip)    # 0x39f740
jge 0x22f31
movl $0x0, 0x37c80f(%rip)    # 0x39f740
movb $0x0, 0x37c80c(%rip)    # 0x39f744
movzwl -0x19e(%rbp), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0x22f7a
cmpb $0x0, 0x25766e(%rip)    # 0x27a5be
je 0x22f78
movl -0x194(%rbp), %edi
movl 0x254afe(%rip), %esi    # 0x277a5c
movl -0x194(%rbp), %edx
movl 0x254af2(%rip), %ecx    # 0x277a5c
addl $0x8, %ecx
movl $0xc, %r8d
callq 0x109c0
jmp 0x22f7a
cmpb $0x0, 0x25763e(%rip)    # 0x27a5bf
je 0x23039
movzwl -0x19e(%rbp), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x23039
cmpb $0x0, 0x37c7a1(%rip)    # 0x39f744
je 0x22fd9
movl -0x194(%rbp), %edi
movl 0x254aab(%rip), %esi    # 0x277a5c
addl $0x0, %esi
movl $0xc, %edx
callq 0x10d70
movl -0x194(%rbp), %edi
movl 0x254a92(%rip), %esi    # 0x277a5c
addl $0x1, %esi
movl $0xc, %edx
callq 0x10d70
jmp 0x23037
movl 0x254a81(%rip), %edi    # 0x277a60
addl 0x37c75b(%rip), %edi    # 0x39f740
movl 0x254a71(%rip), %esi    # 0x277a5c
addl $0x0, %esi
movl -0x194(%rbp), %edx
movl 0x254a62(%rip), %ecx    # 0x277a5c
addl $0x0, %ecx
movl $0xc, %r8d
callq 0x109c0
movl 0x254a52(%rip), %edi    # 0x277a60
addl 0x37c72c(%rip), %edi    # 0x39f740
movl 0x254a42(%rip), %esi    # 0x277a5c
addl $0x1, %esi
movl -0x194(%rbp), %edx
movl 0x254a33(%rip), %ecx    # 0x277a5c
addl $0x1, %ecx
movl $0xc, %r8d
callq 0x109c0
jmp 0x23039
movl $0xa, %edi
callq 0x11b90
cmpb $0x0, 0x257573(%rip)    # 0x27a5bd
je 0x2308f
movzwl -0x19e(%rbp), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x2308f
movl -0x194(%rbp), %edi
movl 0x2549f3(%rip), %esi    # 0x277a5c
addl 0x2549f9(%rip), %esi    # 0x277a68
movl -0x194(%rbp), %edx
movl 0x2549e1(%rip), %ecx    # 0x277a5c
addl 0x2549e7(%rip), %ecx    # 0x277a68
subl $0x8, %ecx
movl $0xb, %r8d
callq 0x109c0
cmpl $0x0, 0x19adda(%rip)    # 0x1bde70
je 0x23141
movzwl -0xe0(%rbp), %eax
andl $0xff, %eax
imull 0x2549d9(%rip), %eax    # 0x277a88
movl %eax, -0x198(%rbp)
movl -0x198(%rbp), %eax
cmpl 0x2549a7(%rip), %eax    # 0x277a68
jle 0x230cf
movl 0x25499f(%rip), %eax    # 0x277a68
movl %eax, -0x198(%rbp)
movl 0x254987(%rip), %eax    # 0x277a5c
addl 0x25498d(%rip), %eax    # 0x277a68
subl -0x198(%rbp), %eax
movl %eax, -0x198(%rbp)
cmpb $0x0, 0x37c656(%rip)    # 0x39f744
je 0x23108
movl -0x194(%rbp), %edi
movl -0x198(%rbp), %esi
movl $0xb, %edx
callq 0x10d70
jmp 0x23135
movl 0x254952(%rip), %edi    # 0x277a60
addl 0x37c62c(%rip), %edi    # 0x39f740
movl 0x25496a(%rip), %esi    # 0x277a84
movl -0x194(%rbp), %edx
movl -0x198(%rbp), %ecx
movl 0x19ad4c(%rip), %eax    # 0x1bde78
movzbl %al, %r8d
callq 0x109c0
movl -0x198(%rbp), %eax
movl %eax, 0x254943(%rip)    # 0x277a84
movl $0x0, -0x19c(%rbp)
cmpl $0x14, -0x19c(%rbp)
jge 0x23aad
movslq -0x19c(%rbp), %rcx
leaq 0x199bba(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x18(%rax)
je 0x238a7
movslq -0x19c(%rbp), %rax
movsd -0xd0(%rbp,%rax,8), %xmm0
movsd %xmm0, -0x28(%rbp)
movslq -0x19c(%rbp), %rcx
leaq 0x199b83(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0xcc(%rax)
je 0x23238
cmpq $0x0, 0x257494(%rip)    # 0x27a650
je 0x231ec
movq -0x8(%rbp), %rsi
subq $0x1, %rsi
leaq -0x3b0(%rbp), %rdi
callq 0x16160
leaq -0x190(%rbp), %rdi
leaq -0x3b0(%rbp), %rsi
movl $0xb0, %edx
callq 0x92c0
jmp 0x23218
movq -0x8(%rbp), %rsi
subq $0x1, %rsi
leaq -0x460(%rbp), %rdi
callq 0x133f0
leaq -0x190(%rbp), %rdi
leaq -0x460(%rbp), %rsi
movl $0xb0, %edx
callq 0x92c0
movslq -0x19c(%rbp), %rax
movsd -0x180(%rbp,%rax,8), %xmm1
movsd -0x28(%rbp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, -0x28(%rbp)
jmp 0x23280
movl -0x19c(%rbp), %edi
callq 0x19760
cmpl $0x0, %eax
je 0x2327e
movslq -0x19c(%rbp), %rcx
leaq 0x199aca(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0xd0(%rax)
je 0x2327e
movl -0x19c(%rbp), %edi
movsd -0x28(%rbp), %xmm0
callq 0xebbe0
movsd %xmm0, -0x28(%rbp)
jmp 0x23280
cmpl $0x3, -0x19c(%rbp)
jne 0x232e4
movsd -0x28(%rbp), %xmm0
cvtsi2sdq 0x2572e1(%rip), %xmm1 # 0x27a578
divsd %xmm1, %xmm0
callq 0x18060
movslq -0x19c(%rbp), %rcx
leaq 0x199a72(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rcx, %rcx
addq %rcx, %rax
subsd 0x28(%rax), %xmm0
movslq -0x19c(%rbp), %rcx
leaq 0x199a55(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rcx, %rcx
addq %rcx, %rax
mulsd 0x10(%rax), %xmm0
movsd %xmm0, -0x18(%rbp)
jmp 0x237f1
callq 0x83ad0
cmpl $0x0, %eax
je 0x23352
cmpl $0x10, -0x19c(%rbp)
jne 0x23352
movsd -0x28(%rbp), %xmm0
cvtsi2sdq 0x257273(%rip), %xmm1 # 0x27a578
divsd %xmm1, %xmm0
callq 0x183b0
movslq -0x19c(%rbp), %rcx
leaq 0x199a04(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rcx, %rcx
addq %rcx, %rax
subsd 0x28(%rax), %xmm0
movslq -0x19c(%rbp), %rcx
leaq 0x1999e7(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rcx, %rcx
addq %rcx, %rax
mulsd 0x10(%rax), %xmm0
movsd %xmm0, -0x18(%rbp)
jmp 0x237ef
cmpb $0x0, 0x27adc5(%rip)    # 0x29e11e
je 0x233bf
cmpl $0x8, -0x19c(%rbp)
jne 0x233bf
movsd -0x28(%rbp), %xmm0
cvtsi2sdq 0x257206(%rip), %xmm1 # 0x27a578
divsd %xmm1, %xmm0
callq 0x18060
movslq -0x19c(%rbp), %rcx
leaq 0x199997(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rcx, %rcx
addq %rcx, %rax
subsd 0x28(%rax), %xmm0
movslq -0x19c(%rbp), %rcx
leaq 0x19997a(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rcx, %rcx
addq %rcx, %rax
mulsd 0x10(%rax), %xmm0
movsd %xmm0, -0x18(%rbp)
jmp 0x237ed
cmpb $0x0, 0x27ad58(%rip)    # 0x29e11e
je 0x23452
cmpl $0x0, -0x19c(%rbp)
jne 0x23452
movsd -0x28(%rbp), %xmm0
cvtsi2sdq 0x257195(%rip), %xmm1 # 0x27a578
divsd %xmm1, %xmm0
movsd 0x2546a1(%rip), %xmm2   # 0x277a90
movslq -0x19c(%rbp), %rcx
leaq 0x199923(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rcx, %rcx
addq %rcx, %rax
movsd 0x28(%rax), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movslq -0x19c(%rbp), %rcx
leaq 0x1998e7(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rcx, %rcx
addq %rcx, %rax
mulsd 0x10(%rax), %xmm0
movsd %xmm0, -0x18(%rbp)
jmp 0x237eb
cmpb $0x0, 0x27acc5(%rip)    # 0x29e11e
je 0x234e5
cmpl $0x4, -0x19c(%rbp)
jne 0x234e5
movsd -0x28(%rbp), %xmm0
cvtsi2sdq 0x257102(%rip), %xmm1 # 0x27a578
divsd %xmm1, %xmm0
movsd 0x254616(%rip), %xmm2   # 0x277a98
movslq -0x19c(%rbp), %rcx
leaq 0x199890(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rcx, %rcx
addq %rcx, %rax
movsd 0x28(%rax), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movslq -0x19c(%rbp), %rcx
leaq 0x199854(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rcx, %rcx
addq %rcx, %rax
mulsd 0x10(%rax), %xmm0
movsd %xmm0, -0x18(%rbp)
jmp 0x237e9
cmpl $0x10, -0x19c(%rbp)
jl 0x23796
cmpb $0x0, 0x27ac25(%rip)    # 0x29e11e
je 0x23565
cmpl $0xf, -0x19c(%rbp)
jne 0x23565
movsd -0xc8(%rbp), %xmm0
mulsd -0xc0(%rbp), %xmm0
cvtsi2sdq 0x25705b(%rip), %xmm1 # 0x27a578
divsd %xmm1, %xmm0
movslq -0x19c(%rbp), %rcx
leaq 0x1997f1(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rcx, %rcx
addq %rcx, %rax
subsd 0x28(%rax), %xmm0
movslq -0x19c(%rbp), %rcx
leaq 0x1997d4(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rcx, %rcx
addq %rcx, %rax
mulsd 0x10(%rax), %xmm0
movsd %xmm0, -0x18(%rbp)
jmp 0x23794
cmpb $0x0, 0x27abb2(%rip)    # 0x29e11e
je 0x235d8
cmpl $0x10, -0x19c(%rbp)
jne 0x235d8
movsd -0xa0(%rbp), %xmm0
mulsd -0xa8(%rbp), %xmm0
cvtsi2sdq 0x256fe8(%rip), %xmm1 # 0x27a578
divsd %xmm1, %xmm0
movslq -0x19c(%rbp), %rcx
leaq 0x19977e(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rcx, %rcx
addq %rcx, %rax
subsd 0x28(%rax), %xmm0
movslq -0x19c(%rbp), %rcx
leaq 0x199761(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rcx, %rcx
addq %rcx, %rax
mulsd 0x10(%rax), %xmm0
movsd %xmm0, -0x18(%rbp)
jmp 0x23792
cmpb $0x0, 0x27ab3f(%rip)    # 0x29e11e
je 0x2368e
cmpl $0x11, -0x19c(%rbp)
jne 0x2368e
movsd -0xc8(%rbp), %xmm0
mulsd -0xc0(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
movsd -0x20(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x23619
jp 0x23619
jmp 0x23633
movsd -0xa0(%rbp), %xmm0
mulsd -0xa8(%rbp), %xmm0
divsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
movsd 0x14ba15(%rip), %xmm0   # 0x16f050
mulsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
movsd -0x20(%rbp), %xmm0
movslq -0x19c(%rbp), %rcx
leaq 0x1996c8(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rcx, %rcx
addq %rcx, %rax
subsd 0x28(%rax), %xmm0
movslq -0x19c(%rbp), %rcx
leaq 0x1996ab(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rcx, %rcx
addq %rcx, %rax
mulsd 0x10(%rax), %xmm0
movsd %xmm0, -0x18(%rbp)
jmp 0x23790
cmpb $0x0, 0x27aa89(%rip)    # 0x29e11e
je 0x2373d
cmpl $0x12, -0x19c(%rbp)
jne 0x2373d
movzbl 0x348a99(%rip), %edi    # 0x36c148
movsd -0x78(%rbp), %xmm0
cvtsi2sdq 0x256ebb(%rip), %xmm1 # 0x27a578
divsd %xmm1, %xmm0
movsd -0x80(%rbp), %xmm1
cvtsi2sdq 0x256ea9(%rip), %xmm2 # 0x27a578
divsd %xmm2, %xmm1
movsd -0x88(%rbp), %xmm2
cvtsi2sdq 0x256e94(%rip), %xmm3 # 0x27a578
divsd %xmm3, %xmm2
movl $0x1, %esi
callq 0xa8d40
movsd %xmm0, -0x20(%rbp)
movsd -0x20(%rbp), %xmm0
movslq -0x19c(%rbp), %rcx
leaq 0x199616(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rcx, %rcx
addq %rcx, %rax
subsd 0x28(%rax), %xmm0
movslq -0x19c(%rbp), %rcx
leaq 0x1995f9(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rcx, %rcx
addq %rcx, %rax
mulsd 0x10(%rax), %xmm0
movsd %xmm0, -0x18(%rbp)
jmp 0x2378e
movsd -0x28(%rbp), %xmm0
cvtsi2sdq 0x256e2d(%rip), %xmm1 # 0x27a578
divsd %xmm1, %xmm0
movslq -0x19c(%rbp), %rcx
leaq 0x1995c3(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rcx, %rcx
addq %rcx, %rax
subsd 0x28(%rax), %xmm0
movslq -0x19c(%rbp), %rcx
leaq 0x1995a6(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rcx, %rcx
addq %rcx, %rax
mulsd 0x10(%rax), %xmm0
movsd %xmm0, -0x18(%rbp)
jmp 0x23790
jmp 0x23792
jmp 0x23794
jmp 0x237e7
movsd -0x28(%rbp), %xmm0
cvtsi2sdq 0x256dd4(%rip), %xmm1 # 0x27a578
divsd %xmm1, %xmm0
movslq -0x19c(%rbp), %rcx
leaq 0x19956a(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rcx, %rcx
addq %rcx, %rax
subsd 0x28(%rax), %xmm0
movslq -0x19c(%rbp), %rcx
leaq 0x19954d(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rcx, %rcx
addq %rcx, %rax
mulsd 0x10(%rax), %xmm0
movsd %xmm0, -0x18(%rbp)
jmp 0x237e9
jmp 0x237eb
jmp 0x237ed
jmp 0x237ef
jmp 0x237f1
movslq -0x19c(%rbp), %rcx
leaq 0x199521(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rcx, %rcx
addq %rcx, %rax
movsd 0x38(%rax), %xmm1
movslq -0x19c(%rbp), %rcx
leaq 0x199504(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rcx, %rcx
addq %rcx, %rax
mulsd 0x48(%rax), %xmm1
movsd -0x18(%rbp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rbp)
cmpl $0x13, -0x19c(%rbp)
je 0x238a5
movsd -0x18(%rbp), %xmm0
movslq -0x19c(%rbp), %rcx
leaq 0x1994cb(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rcx, %rcx
addq %rcx, %rax
movl 0xc0(%rax), %edi
movslq -0x19c(%rbp), %rcx
leaq 0x1994ad(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rcx, %rcx
addq %rcx, %rax
movl 0x20(%rax), %esi
callq 0x22b30
movl %eax, %ecx
movslq -0x19c(%rbp), %rdx
leaq 0x19948b(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0xc0(%rax)
jmp 0x238a7
movslq -0x19c(%rbp), %rcx
leaq 0x19946b(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0xd0(%rax)
je 0x238cd
jmp 0x23a97
movslq -0x19c(%rbp), %rcx
leaq 0x199445(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0xcc(%rax)
je 0x238f3
jmp 0x23a95
movslq -0x19c(%rbp), %rcx
leaq 0x19941f(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0xc8(%rax)
je 0x23a93
movq 0x256c61(%rip), %rax    # 0x27a580
imulq 0x256c51(%rip), %rax    # 0x27a578
cvtsi2sd %rax, %xmm0
cvtsi2sdl 0x256c78(%rip), %xmm1 # 0x27a5ac
mulsd %xmm1, %xmm0
movsd %xmm0, -0x10(%rbp)
cmpl $0x0, 0x256c6c(%rip)    # 0x27a5b0
je 0x2395c
cvtsi2sdl 0x256c62(%rip), %xmm1 # 0x27a5b0
movsd -0x10(%rbp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x10(%rbp)
movslq -0x19c(%rbp), %rcx
leaq 0x1993b6(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rcx, %rcx
addq %rcx, %rax
movsd 0x90(%rax), %xmm1
movslq -0x19c(%rbp), %rcx
leaq 0x199396(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rcx, %rcx
addq %rcx, %rax
movsd 0x98(%rax), %xmm0
movsd -0x10(%rbp), %xmm2
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movslq -0x19c(%rbp), %rcx
leaq 0x199369(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rcx, %rcx
addq %rcx, %rax
subsd 0x28(%rax), %xmm0
movslq -0x19c(%rbp), %rcx
leaq 0x19934c(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rcx, %rcx
addq %rcx, %rax
mulsd 0x10(%rax), %xmm0
movsd %xmm0, -0x18(%rbp)
movslq -0x19c(%rbp), %rcx
leaq 0x19932a(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rcx, %rcx
addq %rcx, %rax
movsd 0x38(%rax), %xmm1
movslq -0x19c(%rbp), %rcx
leaq 0x19930d(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rcx, %rcx
addq %rcx, %rax
mulsd 0x48(%rax), %xmm1
movsd -0x18(%rbp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rbp)
movsd -0x18(%rbp), %xmm0
movslq -0x19c(%rbp), %rcx
leaq 0x1992dd(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rcx, %rcx
addq %rcx, %rax
movl 0xd8(%rax), %edi
movslq -0x19c(%rbp), %rcx
leaq 0x1992bf(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rcx, %rcx
addq %rcx, %rax
movl 0x20(%rax), %esi
callq 0x22b30
movl %eax, %ecx
movslq -0x19c(%rbp), %rdx
leaq 0x19929d(%rip), %rax    # 0x1bcd20
imulq $0xe8, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0xd8(%rax)
jmp 0x23a95
jmp 0x23a97
jmp 0x23a99
movl -0x19c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x19c(%rbp)
jmp 0x2314b
addq $0x460, %rsp            # imm = 0x460
popq %rbp
retq
nopw %cs:(%rax,%rax)