// File: /workspace/github_c_makefile_star2_O2/olcaytaner[P]Isell/pstricks.c
// Function: export_image_as_pstricks
void export_image_as_pstricks(char* fname)
{
 char st[100];
 FILE* myfile;
 int i, j, posy, xgroupcount, xgroupwidth, ygroupcount, ygroupwidth, diff, groupindex, index, elementcount;
 double posx, posy2, barwidth, barheight, epsilonx, epsilony;
 int* groupdone;
 Line l;
 String s;
 Rectangle r;
 Circle ci;
 if (!img.xaxis.limitsset || !img.yaxis.limitsset)
   check_axis_ranges();
 myfile = fopen(fname, "w");
 if (!myfile)
   return;
 write_image_header_pstricks(myfile, img.xaxis.lim.min - 1, img.yaxis.lim.min - 1, img.xaxis.lim.max + 1, img.yaxis.lim.max + 1);
 epsilonx = (img.xaxis.lim.max - img.xaxis.lim.min) / 200;
 epsilony = (img.yaxis.lim.max - img.yaxis.lim.min) / 200;
 set_color_pstricks(myfile, BLACK);
 save_axes_pstricks(myfile);
 set_color_pstricks(myfile, BLACK);
 qsort(img.objects, img.objectcount, sizeof(Object), sort_function_image_object_ascending);
 xgroupcount = img.xaxis.namesavailable;
 ygroupcount = img.yaxis.namesavailable;
 groupdone = safecalloc(ygroupcount, sizeof(int), "export_image_as_eps", 18);
 for (i = 0; i < img.objectcount; i++)
  {
   groupindex = img.objects[i].groupindex;
   index = img.objects[i].index;
   elementcount = object_count(img.objects[i].type, groupindex);
   switch (img.objects[i].type)
    {
         case OBJECT_LINE      :if (i == 0 || img.objects[i].fnt.fontcolor != img.objects[i - 1].fnt.fontcolor || img.objects[i].fnt.fontsize != img.objects[i - 1].fnt.fontsize)
                                 {
                                  set_color_pstricks(myfile, img.objects[i].fnt.fontcolor);
                                  set_line_width_pstricks(myfile, img.objects[i].fnt.fontsize);
                                 }
                                l = img.objects[i].obje.li;
                                if (img.objects[i].fnt.dashedtype == SOLID_LINE)
                                  write_line_pstricks(myfile, l.upleft.x, l.upleft.y, l.downright.x, l.downright.y);
                                else
                                  write_dashed_line_pstricks(myfile, l.upleft.x, l.upleft.y, l.downright.x, l.downright.y, img.objects[i].fnt.dashedtype);
                                break;
         case OBJECT_CIRCLE    :ci = img.objects[i].obje.ci;
                                write_circle_pstricks(myfile, ci.center.x, ci.center.y, ci.radius);
                                break;
         case OBJECT_POINT     :
         case OBJECT_STRING    :if (i == 0 || img.objects[i].fnt.fontcolor != img.objects[i - 1].fnt.fontcolor || img.objects[i].fnt.fontsize != img.objects[i - 1].fnt.fontsize)
                                 {
                                  set_color_pstricks(myfile, img.objects[i].fnt.fontcolor);
                                  set_line_width_pstricks(myfile, img.objects[i].fnt.fontsize);
                                 }
                                s = img.objects[i].obje.st;
                                write_string_pstricks(myfile, s.p.x, s.p.y, s.st, ALIGN_CENTER);
                                break;
         case OBJECT_NAMEDPOINT:if (i == 0 || img.objects[i].fnt.fontcolor != img.objects[i - 1].fnt.fontcolor || img.objects[i].fnt.fontsize != img.objects[i - 1].fnt.fontsize)
                                 {
                                  set_color_pstricks(myfile, img.objects[i].fnt.fontcolor);
                                  set_line_width_pstricks(myfile, img.objects[i].fnt.fontsize);
                                 }
                                s = img.objects[i].obje.st;
                                write_line_pstricks(myfile, s.p.x - epsilonx, s.p.y - epsilony, s.p.x + epsilonx, s.p.y + epsilony);
                                write_line_pstricks(myfile, s.p.x - epsilonx, s.p.y + epsilony, s.p.x + epsilonx, s.p.y - epsilony);
                                write_string_pstricks(myfile, s.p.x, s.p.y - 4 * epsilony, s.st, ALIGN_CENTER);
                                break;
         case OBJECT_RECTANGLE :if (i == 0 || img.objects[i].fnt.fontsize != img.objects[i - 1].fnt.fontsize)
                                  set_line_width_pstricks(myfile, img.objects[i].fnt.fontsize);
                                r = img.objects[i].obje.re;
                                posx = position_in_multi_plot_pstricks(groupindex, index, xgroupcount, elementcount, &barwidth);
                                write_rectangle_pstricks(myfile, posx, r.upleft.y, posx + barwidth, r.downright.y, index % MAX_FILL_TYPE, BLACK);
                                break;
         case OBJECT_MVBOX     :switch (img.groupcoloring)
                                 {
                                  case        ALL_SAME:set_color_pstricks(myfile, BLACK);
                                                       break;
                                  case      GROUP_SAME:set_color_pstricks(myfile, img.objects[i].groupindex % COLORCOUNT);
                                                       break;
                                  case INDIVIDUAL_SAME:set_color_pstricks(myfile, img.objects[i].index % COLORCOUNT);
                                                       break;
                                 }
                                posx = position_in_multi_plot_pstricks(groupindex, index, xgroupcount, elementcount, &barwidth) + barwidth / 2;
                                write_line_pstricks(myfile, posx, img.objects[i].obje.mv.mean - 4 * epsilony, posx, img.objects[i].obje.mv.mean - img.objects[i].obje.mv.variance);
                                write_line_pstricks(myfile, posx, img.objects[i].obje.mv.mean + 4 * epsilony, posx, img.objects[i].obje.mv.mean + img.objects[i].obje.mv.variance);
                                write_line_pstricks(myfile, posx - 5 * epsilonx, img.objects[i].obje.mv.mean - img.objects[i].obje.mv.variance, posx + 5 * epsilonx, img.objects[i].obje.mv.mean - img.objects[i].obje.mv.variance);
                                write_line_pstricks(myfile, posx - 5 * epsilonx, img.objects[i].obje.mv.mean + img.objects[i].obje.mv.variance, posx + 5 * epsilonx, img.objects[i].obje.mv.mean + img.objects[i].obje.mv.variance);
                                write_circle_pstricks(myfile, posx, img.objects[i].obje.mv.mean, 4);
                                break;
         case OBJECT_BOXPLOT   :posx = position_in_multi_plot_pstricks(groupindex, index, xgroupcount, elementcount, &barwidth);
                                diff = barwidth / 8;
                                posx = posx + diff;
                                barwidth -= 2 * diff;
                                write_rectangle_pstricks(myfile, posx, img.objects[i].obje.box.p75, posx + barwidth, img.objects[i].obje.box.p25, FILL_COLOR, index + 1);
                                write_line_pstricks(myfile, posx, img.objects[i].obje.box.median, posx + barwidth, img.objects[i].obje.box.median);
                                if (img.objects[i].obje.box.swhisker < img.objects[i].obje.box.p25)
                                 {
                                  write_dashed_line_pstricks(myfile, posx + barwidth / 2, img.objects[i].obje.box.p25, posx + barwidth / 2, img.objects[i].obje.box.swhisker, 4);
                                  write_line_pstricks(myfile, posx, img.objects[i].obje.box.swhisker, posx + barwidth, img.objects[i].obje.box.swhisker);
                                 }
                                if (img.objects[i].obje.box.lwhisker > img.objects[i].obje.box.p75)
                                 {
                                  write_dashed_line_pstricks(myfile, posx + barwidth / 2, img.objects[i].obje.box.p75, posx + barwidth / 2, img.objects[i].obje.box.lwhisker, 4);
                                  write_line_pstricks(myfile, posx, img.objects[i].obje.box.lwhisker, posx + barwidth, img.objects[i].obje.box.lwhisker);
                                 }
                                break;
     case OBJECT_ERRORHISTOGRAM:xgroupwidth = 1;
                                ygroupwidth = ygroupcount * 10;
                                barheight = 1.0;
                                barwidth = xgroupwidth / 30.0;
                                posx = index * xgroupwidth;
                                posy = groupindex * 10;
                                posy2 = (groupindex + 1) * 10;
                                write_line_pstricks(myfile, posx, posy, posx, posy2);
                                if (!groupdone[groupindex])
                                 {
                                  for (j = 0; j <= 10; j++)
                                   {
                                    if (img.yaxis.lim.precision == 0)
                                      sprintf(st, "%.0f", img.objects[i].obje.errorhist.min + ((img.objects[i].obje.errorhist.max - img.objects[i].obje.errorhist.min) / 10) * j);
                                    else
                                      switch (img.yaxis.lim.precision)
                                       {
                                        case  1:sprintf(st, "%.1f", img.objects[i].obje.errorhist.min + ((img.objects[i].obje.errorhist.max - img.objects[i].obje.errorhist.min) / 10) * j);
                                                break;
                                        case  2:sprintf(st, "%.2f", img.objects[i].obje.errorhist.min + ((img.objects[i].obje.errorhist.max - img.objects[i].obje.errorhist.min) / 10) * j);
                                                break;
                                        case  3:sprintf(st, "%.3f", img.objects[i].obje.errorhist.min + ((img.objects[i].obje.errorhist.max - img.objects[i].obje.errorhist.min) / 10) * j);
                                                break;
                                        default:sprintf(st, "%.1f", img.objects[i].obje.errorhist.min + ((img.objects[i].obje.errorhist.max - img.objects[i].obje.errorhist.min) / 10) * j);
                                                break;
                                       }
                                     write_string_pstricks(myfile, 0, posy + barheight * j, st, ALIGN_RIGHT);
                                   }
                                  groupdone[groupindex] = YES;
                                 }
                                for (j = 0; j < 10; j++)
                                  if (img.objects[i].obje.errorhist.counts[j] > 0)
                                    write_rectangle_pstricks(myfile, posx, posy + barheight * j + 1, posx + barwidth * img.objects[i].obje.errorhist.counts[j], posy + barheight * (j + 1) - 1, FILL_COLOR, index % COLORCOUNT);
                                break;
         default               :printf(m1233, img.objects[i].type);
                                break;
    }
  }
 safe_free(groupdone);
 write_image_footer_pstricks(myfile);
 fclose(myfile);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
leaq 0x344a5b(%rip), %rbp    # 0x3aa0b8
cmpl $0x0, 0x28(%rbp)
je 0x6566c
cmpl $0x0, 0x98(%rbp)
jne 0x65673
xorl %eax, %eax
callq 0x29f54
leaq 0x36217(%rip), %rsi     # 0x9b891
movq %rbx, %rdi
callq 0x40f0
testq %rax, %rax
je 0x65fd7
movq %rax, %rbx
movsd 0x3071a(%rip), %xmm2    # 0x95db0
movsd 0x10(%rbp), %xmm0
addsd %xmm2, %xmm0
movsd 0x80(%rbp), %xmm1
addsd %xmm2, %xmm1
movsd 0x2fe6d(%rip), %xmm4    # 0x95520
movsd 0x18(%rbp), %xmm2
addsd %xmm4, %xmm2
movsd 0x88(%rbp), %xmm3
addsd %xmm4, %xmm3
movq %rax, %rdi
callq 0x6512f
movsd 0x18(%rbp), %xmm1
movsd 0x88(%rbp), %xmm2
subsd 0x10(%rbp), %xmm1
movsd 0x3235e(%rip), %xmm0    # 0x97a48
divsd %xmm0, %xmm1
movsd %xmm1, 0x58(%rsp)
subsd 0x80(%rbp), %xmm2
divsd %xmm0, %xmm2
movsd %xmm2, 0x40(%rsp)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x65160
movq %rbx, %rdi
callq 0x6517c
movq %rbx, %rdi
xorl %esi, %esi
callq 0x65160
movq 0x128(%rbp), %rdi
movslq 0x124(%rbp), %rsi
leaq -0x302f1(%rip), %rcx    # 0x35446
pushq $0x60
popq %rdx
callq 0x4240
movslq 0xa8(%rbp), %rdi
leaq 0x326f1(%rip), %rdx     # 0x97e3e
pushq $0x4
popq %rsi
pushq $0x12
popq %rcx
callq 0x35067
movq %rax, 0x50(%rsp)
xorl %ecx, %ecx
movslq 0x124(%rbp), %rax
cmpq %rax, %rcx
jge 0x65fbd
movq 0x128(%rbp), %rax
movq %rcx, 0x28(%rsp)
imulq $0x60, %rcx, %r15
movl (%rax,%r15), %edi
movl 0x20(%rax,%r15), %r14d
movl 0x24(%rax,%r15), %r12d
movl %r14d, %esi
callq 0x2a770
movl %eax, %r13d
movq 0x128(%rbp), %rax
movl (%rax,%r15), %esi
cmpq $0x8, %rsi
ja 0x65b5c
leaq (%rax,%r15), %rcx
leaq 0x39528(%rip), %rdi     # 0x9ece0
movslq (%rdi,%rsi,4), %rdx
addq %rdi, %rdx
cvtsi2sd %r12d, %xmm5
movsd %xmm5, 0x8(%rsp)
jmpq *%rdx
cmpq $0x0, 0x28(%rsp)
je 0x65b6f
movl 0x18(%rax,%r15), %esi
cmpl -0x48(%rcx), %esi
jne 0x65b72
leaq (%rax,%r15), %rdx
addq $0x8, %rdx
movsd 0x8(%rdx), %xmm0
ucomisd -0x50(%rcx), %xmm0
jne 0x65b72
jp 0x65b72
jmp 0x65b97
movl 0x120(%rbp), %esi
testl %esi, %esi
je 0x65e31
cmpl $0x2, %esi
je 0x65e26
cmpl $0x1, %esi
jne 0x65e3f
movl 0x20(%rcx), %eax
jmp 0x65e29
cmpq $0x0, 0x28(%rsp)
je 0x65bb9
movl 0x18(%rcx), %esi
cmpl -0x48(%rcx), %esi
jne 0x65bbc
movsd 0x10(%rcx), %xmm0
ucomisd -0x50(%rcx), %xmm0
jne 0x65bbc
jp 0x65bbc
jmp 0x65be1
cmpq $0x0, 0x28(%rsp)
je 0x65c1d
movsd 0x10(%rcx), %xmm0
ucomisd -0x50(%rcx), %xmm0
jne 0x65c22
jp 0x65c22
jmp 0x65c37
cmpq $0x0, 0x28(%rsp)
je 0x65cad
movl 0x18(%rcx), %esi
cmpl -0x48(%rcx), %esi
jne 0x65cb0
movsd 0x10(%rcx), %xmm0
ucomisd -0x50(%rcx), %xmm0
jne 0x65cb0
jp 0x65cb0
jmp 0x65cd5
leal 0x2(%r13), %ecx
cvtsi2sd %ecx, %xmm0
addl $-0x2, %r13d
cvtsi2sd %r13d, %xmm1
mulsd 0x32f81(%rip), %xmm0    # 0x98858
addsd %xmm1, %xmm0
movsd 0x32f7d(%rip), %xmm1    # 0x98860
divsd %xmm0, %xmm1
movsd 0x39451(%rip), %xmm4    # 0x9ed40
divsd %xmm0, %xmm4
cvtsi2sd %r14d, %xmm0
addsd %xmm1, %xmm0
mulsd %xmm4, %xmm5
addsd %xmm0, %xmm5
movapd %xmm4, %xmm0
mulsd 0x32438(%rip), %xmm0    # 0x97d48
cvttsd2si %xmm0, %ecx
cvttpd2dq %xmm0, %xmm0
cvtdq2pd %xmm0, %xmm0
addsd %xmm5, %xmm0
movapd %xmm0, 0x10(%rsp)
addl %ecx, %ecx
cvtsi2sd %ecx, %xmm1
subsd %xmm1, %xmm4
movsd 0x30(%rax,%r15), %xmm3
movsd 0x38(%rax,%r15), %xmm1
movapd %xmm0, %xmm2
movsd %xmm4, 0x8(%rsp)
addsd %xmm4, %xmm2
movapd %xmm2, 0x30(%rsp)
incl %r12d
movq %rbx, %rdi
pushq $0x4
popq %rsi
movl %r12d, %edx
callq 0x65087
movq 0x128(%rbp), %rax
movsd 0x28(%rax,%r15), %xmm1
movq %rbx, %rdi
movapd 0x10(%rsp), %xmm0
movapd 0x30(%rsp), %xmm2
movaps %xmm1, %xmm3
callq 0x650f6
movq 0x128(%rbp), %rax
movsd 0x30(%rax,%r15), %xmm1
movsd 0x40(%rax,%r15), %xmm3
ucomisd %xmm3, %xmm1
jbe 0x659f9
movsd 0x8(%rsp), %xmm0
mulsd 0x3036f(%rip), %xmm0    # 0x95d20
addsd 0x10(%rsp), %xmm0
movq %rbx, %rdi
leaq 0x39675(%rip), %rsi     # 0x9f036
movapd %xmm0, %xmm2
movb $0x4, %al
callq 0x42e0
movq 0x128(%rbp), %rax
movsd 0x40(%rax,%r15), %xmm1
movq %rbx, %rdi
movapd 0x10(%rsp), %xmm0
movapd 0x30(%rsp), %xmm2
movapd %xmm1, %xmm3
callq 0x650f6
movq 0x128(%rbp), %rax
movsd 0x38(%rax,%r15), %xmm1
movsd 0x48(%rax,%r15), %xmm3
ucomisd %xmm1, %xmm3
jbe 0x65fb0
movsd 0x8(%rsp), %xmm0
mulsd 0x30301(%rip), %xmm0    # 0x95d20
addsd 0x10(%rsp), %xmm0
movq %rbx, %rdi
leaq 0x39607(%rip), %rsi     # 0x9f036
movapd %xmm0, %xmm2
movb $0x4, %al
callq 0x42e0
movq 0x128(%rbp), %rax
movsd 0x48(%rax,%r15), %xmm1
movq %rbx, %rdi
movapd 0x10(%rsp), %xmm0
movapd 0x30(%rsp), %xmm2
movapd %xmm1, %xmm3
jmp 0x65c13
movslq %r14d, %r13
imull $0xa, %r14d, %eax
leal 0xa(%rax), %ecx
cvtsi2sd %ecx, %xmm3
cvtsi2sd %eax, %xmm1
movq %rbx, %rdi
movapd %xmm5, %xmm0
movsd %xmm1, 0x30(%rsp)
movapd %xmm5, %xmm2
callq 0x650f6
movq 0x50(%rsp), %rax
cmpl $0x0, (%rax,%r13,4)
jne 0x65da0
movq %r13, 0x48(%rsp)
xorpd %xmm2, %xmm2
pushq $0xb
popq %r14
subl $0x1, %r14d
jb 0x65d8f
movl 0x94(%rbp), %eax
movq 0x128(%rbp), %rcx
movsd 0x28(%rcx,%r15), %xmm1
movsd 0x30(%rcx,%r15), %xmm0
subsd %xmm1, %xmm0
divsd 0x32262(%rip), %xmm0    # 0x97d38
leaq 0x3237a(%rip), %rsi     # 0x97e57
cmpq $0x3, %rax
ja 0x65af1
leaq 0x39246(%rip), %rcx     # 0x9ed30
movslq (%rcx,%rax,4), %rsi
addq %rcx, %rsi
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
leaq 0x70(%rsp), %r13
movq %r13, %rdi
movb $0x1, %al
movsd %xmm2, 0x10(%rsp)
callq 0x41b0
movsd 0x10(%rsp), %xmm1
addsd 0x30(%rsp), %xmm1
xorpd %xmm0, %xmm0
movq %rbx, %rdi
leaq 0x392b6(%rip), %rsi     # 0x9edde
movq %r13, %rdx
movb $0x2, %al
callq 0x42e0
movsd 0x10(%rsp), %xmm2
addsd 0x2f9e0(%rip), %xmm2    # 0x95520
jmp 0x65aa5
movsd 0x28(%rcx), %xmm0
movsd 0x30(%rcx), %xmm1
movsd 0x38(%rcx), %xmm2
movq %rbx, %rdi
jmp 0x65fab
leaq 0x32303(%rip), %rdi     # 0x97e66
xorl %eax, %eax
callq 0x4030
jmp 0x65fb0
movl 0x18(%rax), %esi
movq %rbx, %rdi
callq 0x65160
movq 0x128(%rbp), %rax
movsd 0x10(%rax,%r15), %xmm0
movq %rbx, %rdi
callq 0x65152
movq 0x128(%rbp), %rax
movsd 0x28(%rax,%r15), %xmm0
movsd 0x30(%rax,%r15), %xmm1
movq 0x38(%rax,%r15), %rdx
movq %rbx, %rdi
leaq 0x391fc(%rip), %rsi     # 0x9edb0
jmp 0x65d83
movl 0x18(%rax), %esi
movq %rbx, %rdi
callq 0x65160
movq 0x128(%rbp), %rax
movsd 0x10(%rax,%r15), %xmm0
movq %rbx, %rdi
callq 0x65152
movq 0x128(%rbp), %rax
movsd 0x28(%rax,%r15), %xmm0
movsd 0x30(%rax,%r15), %xmm1
movsd 0x38(%rax,%r15), %xmm2
movsd 0x40(%rax,%r15), %xmm3
movl 0x1c(%rax,%r15), %esi
movq %rbx, %rdi
testl %esi, %esi
je 0x65c13
callq 0x65104
jmp 0x65fb0
callq 0x650f6
jmp 0x65fb0
movsd 0x10(%rax), %xmm0
movq %rbx, %rdi
callq 0x65152
movsd 0x8(%rsp), %xmm5
movq 0x128(%rbp), %rax
leal 0x2(%r13), %ecx
cvtsi2sd %ecx, %xmm0
movsd 0x30(%rax,%r15), %xmm1
movsd 0x40(%rax,%r15), %xmm3
addl $-0x2, %r13d
cvtsi2sd %r13d, %xmm2
mulsd 0x32bfa(%rip), %xmm0    # 0x98858
addsd %xmm2, %xmm0
movsd 0x32bf6(%rip), %xmm4    # 0x98860
divsd %xmm0, %xmm4
movsd 0x390ca(%rip), %xmm2    # 0x9ed40
divsd %xmm0, %xmm2
cvtsi2sd %r14d, %xmm0
addsd %xmm4, %xmm0
mulsd %xmm2, %xmm5
addsd %xmm0, %xmm5
addsd %xmm5, %xmm2
movl %r12d, %eax
cltd
pushq $0x7
popq %rcx
idivl %ecx
movq %rbx, %rdi
movapd %xmm5, %xmm0
movl %edx, %esi
xorl %edx, %edx
callq 0x65087
jmp 0x65fb0
movl 0x18(%rax), %esi
movq %rbx, %rdi
callq 0x65160
movq 0x128(%rbp), %rax
movsd 0x10(%rax,%r15), %xmm0
movq %rbx, %rdi
callq 0x65152
movq 0x128(%rbp), %rax
movsd 0x28(%rax,%r15), %xmm4
movsd %xmm4, 0x10(%rsp)
movsd 0x30(%rax,%r15), %xmm2
movsd %xmm2, 0x30(%rsp)
movq 0x38(%rax,%r15), %r14
movapd %xmm4, %xmm0
movsd 0x58(%rsp), %xmm5
subsd %xmm5, %xmm0
movsd %xmm0, 0x48(%rsp)
movapd %xmm2, %xmm1
movsd 0x40(%rsp), %xmm3
subsd %xmm3, %xmm1
movsd %xmm1, 0x8(%rsp)
addsd %xmm4, %xmm5
movsd %xmm5, 0x68(%rsp)
addsd %xmm2, %xmm3
movsd %xmm3, 0x60(%rsp)
movq %rbx, %rdi
movapd %xmm5, %xmm2
callq 0x650f6
movq %rbx, %rdi
movsd 0x48(%rsp), %xmm0
movsd 0x60(%rsp), %xmm1
movsd 0x68(%rsp), %xmm2
movsd 0x8(%rsp), %xmm3
callq 0x650f6
movsd 0x40(%rsp), %xmm1
mulsd 0x38fe6(%rip), %xmm1    # 0x9ed50
addsd 0x30(%rsp), %xmm1
movq %rbx, %rdi
leaq 0x39036(%rip), %rsi     # 0x9edb0
movsd 0x10(%rsp), %xmm0
movq %r14, %rdx
movb $0x2, %al
callq 0x42e0
jmp 0x65fb0
movq 0x50(%rsp), %rax
movq 0x48(%rsp), %rcx
movl $0x1, (%rax,%rcx,4)
movl %r12d, %eax
cltd
pushq $0xc
popq %rcx
idivl %ecx
movl %edx, %r14d
xorl %r12d, %r12d
pushq $0x4
popq %r13
cmpq $0xa, %r12
je 0x65fb0
movq 0x128(%rbp), %rax
addq %r15, %rax
movl 0x38(%rax,%r12,4), %eax
testl %eax, %eax
jle 0x65e21
cvtsi2sd %r12d, %xmm1
movsd 0x30(%rsp), %xmm4
addsd %xmm4, %xmm1
cvtsi2sd %eax, %xmm2
addsd 0x2f735(%rip), %xmm1    # 0x95520
mulsd 0x38f55(%rip), %xmm2    # 0x9ed48
movsd 0x8(%rsp), %xmm0
addsd %xmm0, %xmm2
incq %r12
cvtsi2sd %r12d, %xmm3
addsd %xmm4, %xmm3
addsd 0x2ff9f(%rip), %xmm3    # 0x95db0
movq %rbx, %rdi
movl %r13d, %esi
movl %r14d, %edx
callq 0x65087
jmp 0x65db3
incq %r12
jmp 0x65db3
movl 0x24(%rcx), %eax
cltd
pushq $0xc
popq %rcx
idivl %ecx
movl %edx, %esi
movq %rbx, %rdi
callq 0x65160
movsd 0x8(%rsp), %xmm5
leal 0x2(%r13), %eax
cvtsi2sd %eax, %xmm0
addl $-0x2, %r13d
cvtsi2sd %r13d, %xmm1
mulsd 0x32a00(%rip), %xmm0    # 0x98858
addsd %xmm1, %xmm0
movsd 0x329fc(%rip), %xmm1    # 0x98860
divsd %xmm0, %xmm1
movsd 0x38ed0(%rip), %xmm2    # 0x9ed40
divsd %xmm0, %xmm2
cvtsi2sd %r14d, %xmm0
addsd %xmm1, %xmm0
mulsd %xmm2, %xmm5
addsd %xmm0, %xmm5
mulsd 0x2fe93(%rip), %xmm2    # 0x95d20
addsd %xmm5, %xmm2
movsd %xmm2, 0x10(%rsp)
movq 0x128(%rbp), %rax
movsd 0x28(%rax,%r15), %xmm3
movsd 0x40(%rsp), %xmm1
mulsd 0x38e9d(%rip), %xmm1    # 0x9ed50
addsd %xmm3, %xmm1
subsd 0x30(%rax,%r15), %xmm3
movq %rbx, %rdi
movapd %xmm2, %xmm0
callq 0x650f6
movq 0x128(%rbp), %rax
movsd 0x28(%rax,%r15), %xmm3
movsd 0x40(%rsp), %xmm1
movsd 0x2ff0a(%rip), %xmm0    # 0x95df0
mulsd %xmm0, %xmm1
addsd %xmm3, %xmm1
addsd 0x30(%rax,%r15), %xmm3
movq %rbx, %rdi
movsd 0x10(%rsp), %xmm0
movaps %xmm0, %xmm2
callq 0x650f6
movsd 0x58(%rsp), %xmm3
movapd %xmm3, %xmm0
mulsd 0x31e88(%rip), %xmm0    # 0x97da0
movq 0x128(%rbp), %rax
movsd 0x28(%rax,%r15), %xmm1
subsd 0x30(%rax,%r15), %xmm1
movsd 0x10(%rsp), %xmm2
addsd %xmm2, %xmm0
movsd %xmm0, 0x30(%rsp)
mulsd 0x31e63(%rip), %xmm3    # 0x97da8
addsd %xmm2, %xmm3
movsd %xmm3, 0x8(%rsp)
movq %rbx, %rdi
movapd %xmm3, %xmm2
movapd %xmm1, %xmm3
callq 0x650f6
movq 0x128(%rbp), %rax
movsd 0x28(%rax,%r15), %xmm1
addsd 0x30(%rax,%r15), %xmm1
movq %rbx, %rdi
movsd 0x30(%rsp), %xmm0
movsd 0x8(%rsp), %xmm2
movapd %xmm1, %xmm3
callq 0x650f6
movq 0x128(%rbp), %rax
movsd 0x28(%rax,%r15), %xmm1
movq %rbx, %rdi
movsd 0x10(%rsp), %xmm0
movsd 0x2fe45(%rip), %xmm2    # 0x95df0
callq 0x65121
movq 0x28(%rsp), %rcx
incq %rcx
jmp 0x6575f
movq 0x50(%rsp), %rdi
callq 0x34ff7
movq %rbx, %rdi
callq 0x6513d
movq %rbx, %rdi
callq 0x42a0
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq