// File: /workspace/github_c_makefile_star2_O3/olcaytaner[P]Isell/eps.c
// Function: export_image_as_eps
void export_image_as_eps(char* fname)
{
 /*!Last Changed 04.02.2008 added namedpoint*/
 /*!Last Changed 27.12.2007 added error_histogram_plot*/
 /*!Last Changed 20.09.2006 added save_legend and save_axes*/
 /*!Last Changed 14.09.2006*/
 /*!Last Changed 11.07.2005 added mean variance plot and boxplot*/
 /*!Last Changed 23.01.2005*/
 char st[100];
 FILE* myfile;
 int i, j, posx, posx2, posy, posy2, posy3, posy4, posy5, xgroupcount, xgroupwidth, ygroupcount, ygroupwidth, diff, groupindex, index, elementcount, radius;
 double barwidth, barheight;
 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(myfile, img.width, img.height);
 setcolor(myfile, BLACK);
 save_axes(myfile);
 setcolor(myfile, BLACK);
 save_legend(myfile);
 fprintf(myfile, "stroke\n");
 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)
                             {
                              setcolor(myfile, img.objects[i].fnt.fontcolor);
                              setlinewidth(myfile, img.objects[i].fnt.fontsize);
                             }
                            l = img.objects[i].obje.li;
                            posx = return_pos(l.upleft.x, MARGIN, epsaxis + MARGIN, img.xaxis.lim.min, img.xaxis.lim.max);
                            posy = return_pos(l.upleft.y, MARGIN, epsaxis + MARGIN, img.yaxis.lim.min, img.yaxis.lim.max);
                            posx2 = return_pos(l.downright.x, MARGIN, epsaxis + MARGIN, img.xaxis.lim.min, img.xaxis.lim.max);
                            posy2 = return_pos(l.downright.y, MARGIN, epsaxis + MARGIN, img.yaxis.lim.min, img.yaxis.lim.max);
                            if (img.objects[i].fnt.dashedtype == SOLID_LINE)
                              write_line(myfile, posx, posy, posx2, posy2);
                            else
                              write_dashed_line(myfile, posx, posy, posx2, posy2, img.objects[i].fnt.dashedtype);
                            break;
     case OBJECT_CIRCLE    :ci = img.objects[i].obje.ci;
                            posx = return_pos(ci.center.x, MARGIN, epsaxis + MARGIN, img.xaxis.lim.min, img.xaxis.lim.max);
                            posy = return_pos(ci.center.y, MARGIN, epsaxis + MARGIN, img.yaxis.lim.min, img.yaxis.lim.max);
                            radius = ci.radius;
                            write_circle(myfile, posx, posy, 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)
                              setfont(myfile, img.objects[i].fnt);
                            s = img.objects[i].obje.st;
                            posx = return_pos(s.p.x, MARGIN, epsaxis + MARGIN, img.xaxis.lim.min, img.xaxis.lim.max);
                            if (img.yaxis.available)
                              posy = return_pos(s.p.y, MARGIN, epsaxis + MARGIN, img.yaxis.lim.min, img.yaxis.lim.max);
                            else
                              posy = MARGIN;
                            write_string(myfile, posx, posy, 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)
                              setfont(myfile, img.objects[i].fnt);
                            s = img.objects[i].obje.st;
                            posx = return_pos(s.p.x, MARGIN, epsaxis + MARGIN, img.xaxis.lim.min, img.xaxis.lim.max);
                            posy = return_pos(s.p.y, MARGIN, epsaxis + MARGIN, img.yaxis.lim.min, img.yaxis.lim.max);
                            write_line(myfile, posx - 2, posy - 2, posx + 2, posy + 2);
                            write_line(myfile, posx - 2, posy + 2, posx + 2, posy - 2);
                            write_string(myfile, posx, posy - 2 * SMALLMARGIN, s.st, ALIGN_CENTER);
                            break;
     case OBJECT_RECTANGLE :if (i == 0 || img.objects[i].fnt.fontsize != img.objects[i - 1].fnt.fontsize)
                              setlinewidth(myfile, img.objects[i].fnt.fontsize);
                            r = img.objects[i].obje.re;
                            posx = position_in_multi_plot(groupindex, index, xgroupcount, elementcount, &barwidth);
                            posy = return_pos(r.downright.y, MARGIN, epsaxis + MARGIN, img.yaxis.lim.min, img.yaxis.lim.max);
                            write_rectangle(myfile, posx, (int) r.upleft.y, (int)(posx + barwidth), posy, index % MAX_FILL_TYPE, BLACK);
                            break;
     case OBJECT_MVBOX     :switch (img.groupcoloring)
                             {
                              case        ALL_SAME:setcolor(myfile, BLACK);
                                                   break;
                              case      GROUP_SAME:setcolor(myfile, img.objects[i].groupindex % COLORCOUNT);
                                                   break;
                              case INDIVIDUAL_SAME:setcolor(myfile, img.objects[i].index % COLORCOUNT);
                                                   break;
                             }
                            posy = return_pos(img.objects[i].obje.mv.mean, MARGIN, epsaxis + MARGIN, img.yaxis.lim.min, img.yaxis.lim.max);
                            posy2 = return_pos(img.objects[i].obje.mv.mean - img.objects[i].obje.mv.variance, MARGIN, epsaxis + MARGIN, img.yaxis.lim.min, img.yaxis.lim.max);
                            posy3 = return_pos(img.objects[i].obje.mv.mean + img.objects[i].obje.mv.variance, MARGIN, epsaxis + MARGIN, img.yaxis.lim.min, img.yaxis.lim.max);
                            posx = position_in_multi_plot(groupindex, index, xgroupcount, elementcount, &barwidth);
                            posx = (int) (posx + barwidth / 2);
                            write_line(myfile, posx, posy - 4, posx, posy2);
                            write_line(myfile, posx, posy + 4, posx, posy3);
                            write_line(myfile, posx - 5, posy2, posx + 5, posy2);
                            write_line(myfile, posx - 5, posy3, posx + 5, posy3);
                            write_circle(myfile, posx, posy, 4);
                            break;
     case OBJECT_BOXPLOT   :posy = return_pos(img.objects[i].obje.box.median, MARGIN, epsaxis + MARGIN, img.yaxis.lim.min, img.yaxis.lim.max);
                            posy2 = return_pos(img.objects[i].obje.box.p25, MARGIN, epsaxis + MARGIN, img.yaxis.lim.min, img.yaxis.lim.max);
                            posy3 = return_pos(img.objects[i].obje.box.p75, MARGIN, epsaxis + MARGIN, img.yaxis.lim.min, img.yaxis.lim.max);
                            posy4 = return_pos(img.objects[i].obje.box.swhisker, MARGIN, epsaxis + MARGIN, img.yaxis.lim.min, img.yaxis.lim.max);
                            posy5 = return_pos(img.objects[i].obje.box.lwhisker, MARGIN, epsaxis + MARGIN, img.yaxis.lim.min, img.yaxis.lim.max);
                            posx = position_in_multi_plot(groupindex, index, xgroupcount, elementcount, &barwidth);
                            diff = (int)(barwidth / 8);
                            posx = posx + diff;
                            barwidth -= 2 * diff;                           
                            write_rectangle(myfile, posx, posy3, (int) (posx + barwidth), posy2, FILL_COLOR, index + 1);
                            write_line(myfile, posx, posy, (int) (posx + barwidth), posy);
                            if (posy4 < posy2)
                             {
                              write_dashed_line(myfile, (int) (posx + barwidth / 2), posy2, (int) (posx + barwidth / 2), posy4, 4);
                              write_line(myfile, posx, posy4, (int) (posx + barwidth), posy4);
                             }
                            if (posy5 > posy3)
                             {
                              write_dashed_line(myfile, (int) (posx + barwidth / 2), posy3, (int) (posx + barwidth / 2), posy5, 4);
                              write_line(myfile, posx, posy5, (int) (posx + barwidth), posy5);
                             }
                            break;
     case OBJECT_ERRORHISTOGRAM:xgroupwidth = (epsaxis / elementcount);
                                ygroupwidth = (epsaxis / ygroupcount);
                                barheight = (ygroupwidth - 2 * SMALLMARGIN) / 10.0;
                                barwidth = (xgroupwidth - 2 * SMALLMARGIN) / 30.0;
                                posx = MARGIN + index * xgroupwidth + SMALLMARGIN;
                                posy = MARGIN + groupindex * ygroupwidth + SMALLMARGIN;
                                posy2 = MARGIN + (groupindex + 1) * ygroupwidth - SMALLMARGIN;
                                write_line(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(myfile, MARGIN - 5, 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(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(myfile);
 fclose(myfile);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
leaq 0x390575(%rip), %r15    # 0x3b20b8
cmpl $0x0, 0x28(%r15)
je 0x21b54
cmpl $0x0, 0x98(%r15)
jne 0x21b5b
xorl %eax, %eax
callq 0x2dd71
leaq 0x89e0b(%rip), %rsi     # 0xab96d
movq %rbx, %rdi
callq 0x40f0
testq %rax, %rax
je 0x22a4a
movq %rax, %r12
movl (%r15), %edx
movl 0x4(%r15), %esi
movq %rax, %rdi
callq 0x22a5c
movsd 0xb3033(%rip), %xmm0    # 0xd4bc0
movsd 0xb3033(%rip), %xmm1    # 0xd4bc8
movsd 0xb3033(%rip), %xmm2    # 0xd4bd0
leaq 0x86371(%rip), %r14     # 0xa7f15
movq %r12, %rdi
movq %r14, %rsi
movb $0x3, %al
callq 0x42e0
movq %r12, %rdi
callq 0x22b08
movsd 0xb2fff(%rip), %xmm0    # 0xd4bc0
movsd 0xb2fff(%rip), %xmm1    # 0xd4bc8
movsd 0xb2fff(%rip), %xmm2    # 0xd4bd0
movq %r12, %rdi
movq %r14, %rsi
movb $0x3, %al
callq 0x42e0
movq %r12, %rdi
callq 0x22ffb
leaq 0x862c9(%rip), %rdi     # 0xa7eb6
movl $0x7, %esi
movl $0x1, %edx
movq %r12, %rcx
callq 0x42c0
movq 0x128(%r15), %rdi
movslq 0x124(%r15), %rsi
leaq 0x18a6e(%rip), %rcx     # 0x3a682
movl $0x60, %edx
callq 0x4240
movl 0x38(%r15), %eax
movl %eax, 0x54(%rsp)
movl 0xa8(%r15), %eax
movl %eax, 0x68(%rsp)
movslq %eax, %rdi
leaq 0x86283(%rip), %rdx     # 0xa7ebe
movl $0x4, %esi
movl $0x12, %ecx
callq 0x3a1fc
movq %rax, 0x60(%rsp)
cmpl $0x0, 0x124(%r15)
jle 0x22a06
xorl %r13d, %r13d
movq %r12, 0x28(%rsp)
movq 0x128(%r15), %rax
movq %r13, %rcx
shlq $0x5, %rcx
leaq (%rcx,%rcx,2), %rbx
movl (%rax,%rbx), %edi
movq %r15, %r14
movl 0x20(%rax,%rbx), %ebp
movslq 0x24(%rax,%rbx), %rax
movq %rax, 0x48(%rsp)
movl %ebp, %esi
callq 0x2e5df
movl %eax, %r15d
movq 0x128(%r14), %rax
movl (%rax,%rbx), %esi
cmpq $0x8, %rsi
ja 0x2256c
leaq (%rax,%rbx), %rcx
leaq 0x8617c(%rip), %rdi     # 0xa7e30
movslq (%rdi,%rsi,4), %rdx
addq %rdi, %rdx
jmpq *%rdx
testq %r13, %r13
je 0x21cf3
leaq (,%r13,2), %rdx
addq %r13, %rdx
shlq $0x5, %rdx
movl 0x18(%rax,%rdx), %esi
cmpl -0x48(%rcx), %esi
jne 0x21cf3
addq %rax, %rdx
addq $0x8, %rdx
movsd 0x8(%rdx), %xmm0
ucomisd -0x50(%rcx), %xmm0
jne 0x21cf3
jnp 0x229ee
leaq (,%r13,2), %rcx
addq %r13, %rcx
shlq $0x5, %rcx
movq 0x18(%rax,%rcx), %rdx
movq %rdx, 0x10(%rsp)
movupd 0x8(%rax,%rcx), %xmm0
movupd %xmm0, (%rsp)
movq %r12, %rdi
callq 0x234a7
leaq 0x390392(%rip), %rbx    # 0x3b20b8
movq 0x128(%rbx), %rax
leaq (,%r13,2), %rcx
addq %r13, %rcx
shlq $0x5, %rcx
movsd 0x28(%rax,%rcx), %xmm0
movsd 0x30(%rax,%rcx), %xmm1
movsd %xmm1, 0x20(%rsp)
movq 0x38(%rax,%rcx), %r14
movsd 0x10(%rbx), %xmm1
movsd 0x18(%rbx), %xmm2
movl $0x50, %r15d
movl $0x50, %edi
movl $0x244, %esi            # imm = 0x244
callq 0x2e6b3
movl %eax, %ebp
cmpl $0x0, 0x78(%rbx)
je 0x21da2
movsd 0x80(%rbx), %xmm1
movsd 0x88(%rbx), %xmm2
movsd 0x20(%rsp), %xmm0
movl $0x50, %edi
movl $0x244, %esi            # imm = 0x244
callq 0x2e6b3
movl %eax, %r15d
movq %r12, %rdi
movl %ebp, %esi
movl %r15d, %edx
movq %r14, %rcx
movl $0x2, %r8d
callq 0x23500
jmp 0x229d2
leaq 0x3902f4(%rip), %rax    # 0x3b20b8
movl 0x120(%rax), %eax
cmpl $0x2, %eax
je 0x227de
cmpl $0x1, %eax
je 0x227d8
testl %eax, %eax
jne 0x2282b
movsd 0xb2dd4(%rip), %xmm0    # 0xd4bc0
movsd 0xb2dd4(%rip), %xmm1    # 0xd4bc8
movsd 0xb2dd4(%rip), %xmm2    # 0xd4bd0
jmp 0x2281a
testq %r13, %r13
je 0x2257f
movl 0x18(%rcx), %edx
cmpl -0x48(%rcx), %edx
leaq 0x3902a1(%rip), %r14    # 0x3b20b8
jne 0x22589
movsd 0x10(%rcx), %xmm0
ucomisd -0x50(%rcx), %xmm0
jne 0x22589
jp 0x22589
jmp 0x225ec
testq %r13, %r13
je 0x226f3
movsd 0x10(%rcx), %xmm0
ucomisd -0x50(%rcx), %xmm0
leaq 0x390266(%rip), %rbx    # 0x3b20b8
movq 0x48(%rsp), %r14
jne 0x22704
jp 0x22704
jmp 0x2271c
testq %r13, %r13
je 0x21e87
movl 0x18(%rcx), %edx
cmpl -0x48(%rcx), %edx
jne 0x21e87
movsd 0x10(%rcx), %xmm0
ucomisd -0x50(%rcx), %xmm0
jne 0x21e87
jnp 0x229fa
leaq (,%r13,2), %rcx
addq %r13, %rcx
shlq $0x5, %rcx
movq 0x18(%rax,%rcx), %rdx
movq %rdx, 0x10(%rsp)
movupd 0x8(%rax,%rcx), %xmm0
movupd %xmm0, (%rsp)
movq %r12, %rdi
callq 0x234a7
leaq 0x3901fe(%rip), %rbx    # 0x3b20b8
movq 0x128(%rbx), %rax
leaq (,%r13,2), %rcx
addq %r13, %rcx
shlq $0x5, %rcx
movsd 0x28(%rax,%rcx), %xmm0
movsd 0x30(%rax,%rcx), %xmm1
movsd %xmm1, 0x38(%rsp)
movq 0x38(%rax,%rcx), %rax
movq %rax, 0x20(%rsp)
movsd 0x10(%rbx), %xmm1
movsd 0x18(%rbx), %xmm2
movl $0x50, %edi
movl $0x244, %esi            # imm = 0x244
callq 0x2e6b3
movl %eax, %r14d
movsd 0x80(%rbx), %xmm1
movsd 0x88(%rbx), %xmm2
movsd 0x38(%rsp), %xmm0
movl $0x50, %edi
movl $0x244, %esi            # imm = 0x244
callq 0x2e6b3
movl %eax, %r12d
movq %r14, 0x40(%rsp)
leal -0x2(%r14), %ebp
leal -0x2(%r12), %ecx
movl %ecx, 0x38(%rsp)
addl $0x2, %r14d
leal 0x2(%r12), %ebx
movq 0x28(%rsp), %r15
movq %r15, %rdi
leaq 0x86100(%rip), %rsi     # 0xa805a
movl %ebp, %edx
movl %r14d, %r8d
movl %ebx, %r9d
xorl %eax, %eax
callq 0x42e0
movq %r15, %rdi
leaq 0x860e7(%rip), %rsi     # 0xa805a
movl %ebp, %edx
movl %ebx, %ecx
movl %r14d, %r8d
movl 0x38(%rsp), %r9d
xorl %eax, %eax
callq 0x42e0
addl $-0xa, %r12d
movq %r15, %rdi
movq 0x40(%rsp), %rsi
movl %r12d, %edx
movq 0x20(%rsp), %rcx
movl $0x2, %r8d
callq 0x23500
movq %r15, %r12
jmp 0x229d2
movsd 0x28(%rcx), %xmm0
leaq 0x3900ff(%rip), %r14    # 0x3b20b8
movsd 0x80(%r14), %xmm1
movsd 0x88(%r14), %xmm2
movl $0x50, %edi
movl $0x244, %esi            # imm = 0x244
callq 0x2e6b3
movl %eax, 0x38(%rsp)
movq 0x128(%r14), %rax
movsd 0x30(%rax,%rbx), %xmm0
movsd 0x80(%r14), %xmm1
movsd 0x88(%r14), %xmm2
movl $0x50, %edi
movl $0x244, %esi            # imm = 0x244
callq 0x2e6b3
movl %eax, 0x58(%rsp)
movq 0x128(%r14), %rax
movsd 0x38(%rax,%rbx), %xmm0
movsd 0x80(%r14), %xmm1
movsd 0x88(%r14), %xmm2
movl $0x50, %edi
movl $0x244, %esi            # imm = 0x244
callq 0x2e6b3
movl %eax, 0x6c(%rsp)
movq 0x128(%r14), %rax
movsd 0x40(%rax,%rbx), %xmm0
movsd 0x80(%r14), %xmm1
movsd 0x88(%r14), %xmm2
movl $0x50, %edi
movl $0x244, %esi            # imm = 0x244
callq 0x2e6b3
movl %eax, %r12d
movq 0x128(%r14), %rax
movsd 0x48(%rax,%rbx), %xmm0
movsd 0x80(%r14), %xmm1
movsd 0x88(%r14), %xmm2
movl 0x6c(%rsp), %r14d
movl $0x50, %edi
movl $0x244, %esi            # imm = 0x244
callq 0x2e6b3
movl %eax, 0x40(%rsp)
movl %ebp, %edi
movq 0x48(%rsp), %rbx
movl %ebx, %esi
movl 0x54(%rsp), %edx
movl %r15d, %ecx
movl %r12d, %r15d
leaq 0x30(%rsp), %r8
callq 0x2e641
movl %eax, %ebp
movsd 0x30(%rsp), %xmm0
movapd %xmm0, %xmm1
mulsd 0x85ced(%rip), %xmm1    # 0xa7dc8
cvttsd2si %xmm1, %eax
addl %eax, %ebp
addl %eax, %eax
xorps %xmm1, %xmm1
cvtsi2sd %eax, %xmm1
subsd %xmm1, %xmm0
xorps %xmm1, %xmm1
cvtsi2sd %ebp, %xmm1
movsd %xmm1, 0x20(%rsp)
movsd %xmm0, 0x30(%rsp)
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %r8d
leaq (%rbx,%rbx,2), %rax
leaq 0xb2aab(%rip), %rcx     # 0xd4bc0
movsd 0x18(%rcx,%rax,8), %xmm0
movsd 0x20(%rcx,%rax,8), %xmm1
movsd 0x28(%rcx,%rax,8), %xmm2
movq 0x28(%rsp), %r12
movq %r12, %rdi
leaq 0x8600e(%rip), %rsi     # 0xa8144
movl %ebp, %edx
movl %r14d, %ecx
movl 0x58(%rsp), %ebx
movl %ebx, %r9d
movb $0x3, %al
callq 0x42e0
movsd 0x30(%rsp), %xmm0
addsd 0x20(%rsp), %xmm0
cvttsd2si %xmm0, %r8d
movq %r12, %rdi
leaq 0x85ef6(%rip), %rsi     # 0xa805a
movl %ebp, %edx
movl 0x38(%rsp), %ecx
movl %ecx, %r9d
xorl %eax, %eax
callq 0x42e0
cmpl %ebx, %r15d
jge 0x221e0
movl %ebx, %r8d
movsd 0x30(%rsp), %xmm0
mulsd 0x83b8e(%rip), %xmm0    # 0xa5d18
addsd 0x20(%rsp), %xmm0
cvttsd2si %xmm0, %ecx
movl %r15d, (%rsp)
movq 0x28(%rsp), %rbx
movq %rbx, %rdi
leaq 0x85e79(%rip), %rsi     # 0xa8020
movl $0x4, %edx
movl %ecx, %r9d
xorl %eax, %eax
callq 0x42e0
movsd 0x30(%rsp), %xmm0
addsd 0x20(%rsp), %xmm0
cvttsd2si %xmm0, %r8d
movq %rbx, %rdi
leaq 0x85e89(%rip), %rsi     # 0xa805a
movl %ebp, %edx
movl %r15d, %ecx
movl %r15d, %r9d
xorl %eax, %eax
callq 0x42e0
movl 0x40(%rsp), %ebx
cmpl %r14d, %ebx
movq 0x28(%rsp), %r12
jle 0x229d2
movsd 0x30(%rsp), %xmm0
mulsd 0x83b18(%rip), %xmm0    # 0xa5d18
addsd 0x20(%rsp), %xmm0
cvttsd2si %xmm0, %ecx
movl %ebx, (%rsp)
movq %r12, %rdi
leaq 0x85e09(%rip), %rsi     # 0xa8020
movl $0x4, %edx
movl %r14d, %r8d
movl %ecx, %r9d
xorl %eax, %eax
callq 0x42e0
movsd 0x20(%rsp), %xmm0
addsd 0x30(%rsp), %xmm0
cvttsd2si %xmm0, %r8d
movq %r12, %rdi
leaq 0x85e16(%rip), %rsi     # 0xa805a
movl %ebp, %edx
movl %ebx, %ecx
movl %ebx, %r9d
jmp 0x226e7
movl $0x1f4, %eax            # imm = 0x1F4
xorl %edx, %edx
idivl %r15d
movl %eax, %ecx
movl $0x1f4, %eax            # imm = 0x1F4
xorl %edx, %edx
idivl 0x68(%rsp)
leal -0xa(%rax), %edx
xorps %xmm1, %xmm1
cvtsi2sd %edx, %xmm1
movq %r12, %rdi
movslq %ebp, %r12
leal -0xa(%rcx), %edx
xorps %xmm0, %xmm0
cvtsi2sd %edx, %xmm0
divsd 0x85b2f(%rip), %xmm1    # 0xa7db8
movsd %xmm1, 0x40(%rsp)
divsd 0x85b29(%rip), %xmm0    # 0xa7dc0
movsd %xmm0, 0x30(%rsp)
movq 0x48(%rsp), %r14
movl %r14d, %r15d
imull %ecx, %r15d
addl $0x55, %r15d
movl %eax, %ebx
imull %ebp, %ebx
addl $0x55, %ebx
incl %ebp
imull %eax, %ebp
addl $0x4b, %ebp
leaq 0x85d96(%rip), %rsi     # 0xa805a
movl %r15d, %edx
movl %ebx, %ecx
movl %r15d, %r8d
movl %ebp, %r9d
xorl %eax, %eax
callq 0x42e0
movq 0x60(%rsp), %rax
cmpl $0x0, (%rax,%r12,4)
xorps %xmm0, %xmm0
cvtsi2sd %ebx, %xmm0
movsd %xmm0, 0x38(%rsp)
leaq 0x38fdc4(%rip), %rbp    # 0x3b20b8
jne 0x223ce
movq %r12, 0x58(%rsp)
xorpd %xmm2, %xmm2
movl $0xb, %ebx
leaq 0x85bc8(%rip), %r14     # 0xa7ed7
movl 0x94(%rbp), %eax
leaq (,%r13,2), %rcx
addq %r13, %rcx
shlq $0x5, %rcx
movq 0x128(%rbp), %rdx
movsd 0x28(%rdx,%rcx), %xmm1
movsd 0x30(%rdx,%rcx), %xmm0
subsd %xmm1, %xmm0
divsd 0x85a75(%rip), %xmm0    # 0xa7db8
movq %r14, %rsi
cmpq $0x3, %rax
ja 0x22357
leaq 0xb18d5(%rip), %rcx     # 0xd3c28
movq (%rcx,%rax,8), %rsi
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
leaq 0x70(%rsp), %r12
movq %r12, %rdi
movb $0x1, %al
movsd %xmm2, 0x20(%rsp)
callq 0x41b0
movsd 0x40(%rsp), %xmm0
mulsd 0x20(%rsp), %xmm0
addsd 0x38(%rsp), %xmm0
cvttsd2si %xmm0, %edx
movq 0x28(%rsp), %rdi
movl $0x4b, %esi
movq %r12, %rcx
movl $0x1, %r8d
callq 0x23500
movsd 0x20(%rsp), %xmm2
addsd 0x83170(%rip), %xmm2    # 0xa5520
decl %ebx
jne 0x2230f
movq 0x60(%rsp), %rax
movq 0x58(%rsp), %rcx
movl $0x1, (%rax,%rcx,4)
movq 0x48(%rsp), %r14
xorps %xmm0, %xmm0
cvtsi2sd %r15d, %xmm0
movsd %xmm0, 0x20(%rsp)
imulq $0x2aaaaaab, %r14, %rax # imm = 0x2AAAAAAB
movq %rax, %rcx
shrq $0x3f, %rcx
shrq $0x21, %rax
addl %ecx, %eax
shll $0x2, %eax
leal (%rax,%rax,2), %eax
subl %eax, %r14d
movslq %r14d, %rax
leaq (%rax,%rax,2), %rax
leaq 0xb27b9(%rip), %rcx     # 0xd4bc0
leaq (%rcx,%rax,8), %rbx
movq 0x128(%rbp), %rax
xorl %r14d, %r14d
movq 0x28(%rsp), %r12
leaq (,%r13,2), %rcx
addq %r13, %rcx
shlq $0x5, %rcx
addq %rax, %rcx
movl 0x38(%rcx,%r14,4), %edx
testl %edx, %edx
jle 0x224cb
xorps %xmm0, %xmm0
cvtsi2sd %r14d, %xmm0
movsd 0x40(%rsp), %xmm1
mulsd %xmm1, %xmm0
movsd 0x38(%rsp), %xmm2
addsd %xmm2, %xmm0
addsd 0x830c3(%rip), %xmm0    # 0xa5520
cvttsd2si %xmm0, %ecx
xorps %xmm0, %xmm0
cvtsi2sd %edx, %xmm0
mulsd 0x30(%rsp), %xmm0
addsd 0x20(%rsp), %xmm0
cvttsd2si %xmm0, %r8d
incq %r14
xorps %xmm0, %xmm0
cvtsi2sd %r14d, %xmm0
mulsd %xmm1, %xmm0
addsd %xmm2, %xmm0
addsd 0x83914(%rip), %xmm0    # 0xa5da8
cvttsd2si %xmm0, %r9d
movsd (%rbx), %xmm0
movsd 0x8(%rbx), %xmm1
movsd 0x10(%rbx), %xmm2
movq %r12, %rdi
leaq 0x85c93(%rip), %rsi     # 0xa8144
movl %r15d, %edx
movb $0x3, %al
callq 0x42e0
leaq 0x38fbf6(%rip), %rax    # 0x3b20b8
movq 0x128(%rax), %rax
jmp 0x224ce
incq %r14
cmpq $0xa, %r14
jne 0x2241a
jmp 0x229d2
movsd 0x28(%rcx), %xmm0
movsd 0x30(%rcx), %xmm1
movsd %xmm1, 0x20(%rsp)
leaq 0x38fbc4(%rip), %rbx    # 0x3b20b8
movsd 0x10(%rbx), %xmm1
movsd 0x18(%rbx), %xmm2
cvttsd2si 0x38(%rcx), %r14d
movl $0x50, %edi
movl $0x244, %esi            # imm = 0x244
callq 0x2e6b3
movl %eax, %r15d
movsd 0x80(%rbx), %xmm1
movsd 0x88(%rbx), %xmm2
movsd 0x20(%rsp), %xmm0
movl $0x50, %edi
movl $0x244, %esi            # imm = 0x244
callq 0x2e6b3
movl %eax, %ebp
leal (%r15,%r14), %edx
movq %r12, %rdi
leaq 0x85af0(%rip), %rsi     # 0xa803b
movl %eax, %ecx
xorl %eax, %eax
callq 0x42e0
movq %r12, %rdi
leaq 0x85aeb(%rip), %rsi     # 0xa8049
movl %r14d, %edx
movl %r15d, %ecx
movl %ebp, %r8d
jmp 0x229cb
leaq 0x85973(%rip), %rdi     # 0xa7ee6
xorl %eax, %eax
callq 0x4030
jmp 0x229d2
movl 0x18(%rax), %edx
leaq 0x38fb2f(%rip), %r14    # 0x3b20b8
movl %edx, %eax
leaq (%rax,%rax,2), %rax
leaq 0xb262a(%rip), %rcx     # 0xd4bc0
movsd (%rcx,%rax,8), %xmm0
movsd 0x8(%rcx,%rax,8), %xmm1
movsd 0x10(%rcx,%rax,8), %xmm2
movq %r12, %rdi
leaq 0x85964(%rip), %rsi     # 0xa7f15
movb $0x3, %al
callq 0x42e0
movq 0x128(%r14), %rax
leaq (,%r13,2), %rcx
addq %r13, %rcx
shlq $0x5, %rcx
movsd 0x10(%rax,%rcx), %xmm0
movq %r12, %rdi
leaq 0x85975(%rip), %rsi     # 0xa7f53
movb $0x1, %al
callq 0x42e0
movq 0x128(%r14), %rax
movsd 0x28(%rax,%rbx), %xmm0
movsd 0x30(%rax,%rbx), %xmm1
movsd %xmm1, 0x48(%rsp)
movsd 0x38(%rax,%rbx), %xmm1
movsd %xmm1, 0x38(%rsp)
movsd 0x40(%rax,%rbx), %xmm1
movsd %xmm1, 0x40(%rsp)
movsd 0x10(%r14), %xmm1
movsd 0x18(%r14), %xmm2
movl $0x50, %edi
movl $0x244, %esi            # imm = 0x244
callq 0x2e6b3
movl %eax, 0x20(%rsp)
movsd 0x80(%r14), %xmm1
movsd 0x88(%r14), %xmm2
movsd 0x48(%rsp), %xmm0
movl $0x50, %edi
movl $0x244, %esi            # imm = 0x244
callq 0x2e6b3
movl %eax, %ebp
movsd 0x10(%r14), %xmm1
movsd 0x18(%r14), %xmm2
movsd 0x38(%rsp), %xmm0
movl $0x50, %edi
movl $0x244, %esi            # imm = 0x244
callq 0x2e6b3
movl %eax, %r15d
movsd 0x80(%r14), %xmm1
movsd 0x88(%r14), %xmm2
movsd 0x40(%rsp), %xmm0
movl $0x50, %edi
movl $0x244, %esi            # imm = 0x244
callq 0x2e6b3
movq 0x128(%r14), %rcx
movl 0x1c(%rcx,%rbx), %edx
testl %edx, %edx
je 0x226d1
movl %eax, (%rsp)
movq %r12, %rdi
leaq 0x8595b(%rip), %rsi     # 0xa8020
movl 0x20(%rsp), %ecx
movl %ebp, %r8d
movl %r15d, %r9d
jmp 0x226e7
movq %r12, %rdi
leaq 0x8597f(%rip), %rsi     # 0xa805a
movl 0x20(%rsp), %edx
movl %ebp, %ecx
movl %r15d, %r8d
movl %eax, %r9d
xorl %eax, %eax
callq 0x42e0
jmp 0x229d2
movsd 0x10(%rax), %xmm0
leaq 0x38f9b9(%rip), %rbx    # 0x3b20b8
movq 0x48(%rsp), %r14
movq %r12, %rdi
leaq 0x85845(%rip), %rsi     # 0xa7f53
movb $0x1, %al
callq 0x42e0
movq 0x128(%rbx), %rax
leaq (,%r13,2), %rcx
addq %r13, %rcx
shlq $0x5, %rcx
movsd 0x40(%rax,%rcx), %xmm0
movsd %xmm0, 0x20(%rsp)
cvttsd2si 0x30(%rax,%rcx), %r12d
movl %ebp, %edi
movl %r14d, %esi
movl 0x54(%rsp), %edx
movl %r15d, %ecx
leaq 0x30(%rsp), %r8
callq 0x2e641
movl %eax, %ebp
movsd 0x80(%rbx), %xmm1
movsd 0x88(%rbx), %xmm2
movsd 0x20(%rsp), %xmm0
movl $0x50, %edi
movl $0x244, %esi            # imm = 0x244
callq 0x2e6b3
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
addsd 0x30(%rsp), %xmm0
cvttsd2si %xmm0, %ecx
imulq $-0x6db6db6d, %r14, %r9 # imm = 0x92492493
shrq $0x20, %r9
addl %r14d, %r9d
movl %r9d, %edx
shrl $0x1f, %edx
sarl $0x2, %r9d
addl %edx, %r9d
leal (,%r9,8), %edx
subl %edx, %r9d
addl %r14d, %r9d
movl $0x0, (%rsp)
movq 0x28(%rsp), %rdi
movl %ebp, %esi
movl %r12d, %edx
movq 0x28(%rsp), %r12
movl %eax, %r8d
callq 0x235c0
jmp 0x229d2
movslq 0x20(%rcx), %rax
jmp 0x227e2
movslq 0x24(%rcx), %rax
imulq $0x2aaaaaab, %rax, %rcx # imm = 0x2AAAAAAB
movq %rcx, %rdx
shrq $0x3f, %rdx
shrq $0x21, %rcx
addl %edx, %ecx
shll $0x2, %ecx
leal (%rcx,%rcx,2), %ecx
subl %ecx, %eax
leaq (%rax,%rax,2), %rax
leaq 0xb23b7(%rip), %rcx     # 0xd4bc0
movsd (%rcx,%rax,8), %xmm0
movsd 0x8(%rcx,%rax,8), %xmm1
movsd 0x10(%rcx,%rax,8), %xmm2
movq %r12, %rdi
leaq 0x856f1(%rip), %rsi     # 0xa7f15
movb $0x3, %al
callq 0x42e0
leaq 0x38f886(%rip), %r14    # 0x3b20b8
movq 0x128(%r14), %rax
movsd 0x28(%rax,%rbx), %xmm0
movsd 0x80(%r14), %xmm1
movsd 0x88(%r14), %xmm2
movl $0x50, %edi
movl $0x244, %esi            # imm = 0x244
callq 0x2e6b3
movq %rax, 0x20(%rsp)
movq 0x128(%r14), %rax
movsd 0x28(%rax,%rbx), %xmm0
subsd 0x30(%rax,%rbx), %xmm0
movsd 0x80(%r14), %xmm1
movsd 0x88(%r14), %xmm2
movl $0x50, %edi
movl $0x244, %esi            # imm = 0x244
callq 0x2e6b3
movl %eax, 0x40(%rsp)
movq 0x128(%r14), %rax
movsd 0x28(%rax,%rbx), %xmm0
addsd 0x30(%rax,%rbx), %xmm0
movsd 0x80(%r14), %xmm1
movsd 0x88(%r14), %xmm2
movl $0x50, %edi
movl $0x244, %esi            # imm = 0x244
callq 0x2e6b3
movl %eax, %r12d
movl %ebp, %edi
movq 0x48(%rsp), %rsi
movl 0x54(%rsp), %edx
movl %r15d, %ecx
leaq 0x30(%rsp), %r8
callq 0x2e641
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd 0x30(%rsp), %xmm1
mulsd 0x83417(%rip), %xmm1    # 0xa5d18
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %r14d
movq 0x20(%rsp), %rbx
leal -0x4(%rbx), %ecx
movq 0x28(%rsp), %rdi
leaq 0x8573c(%rip), %rbp     # 0xa805a
movq %rbp, %rsi
movl %r14d, %edx
movl %r14d, %r8d
movl 0x40(%rsp), %r15d
movl %r15d, %r9d
xorl %eax, %eax
callq 0x42e0
leal 0x4(%rbx), %ecx
movq 0x28(%rsp), %rdi
movq %rbp, %rsi
movl %r14d, %edx
movl %r14d, %r8d
movl %r12d, %r9d
xorl %eax, %eax
callq 0x42e0
leal -0x5(%r14), %ebx
leal 0x5(%r14), %ebp
movq 0x28(%rsp), %rdi
leaq 0x856f5(%rip), %rsi     # 0xa805a
movl %ebx, %edx
movl %r15d, %ecx
movl %ebp, %r8d
movl %r15d, %r9d
xorl %eax, %eax
callq 0x42e0
movq 0x28(%rsp), %rdi
leaq 0x856d7(%rip), %rsi     # 0xa805a
movl %ebx, %edx
movl %r12d, %ecx
movl %ebp, %r8d
movl %r12d, %r9d
movq 0x28(%rsp), %r12
xorl %eax, %eax
callq 0x42e0
leal 0x4(%r14), %edx
movq %r12, %rdi
leaq 0x85693(%rip), %rsi     # 0xa803b
movq 0x20(%rsp), %rbx
movl %ebx, %ecx
xorl %eax, %eax
callq 0x42e0
movq %r12, %rdi
leaq 0x85689(%rip), %rsi     # 0xa8049
movl $0x4, %edx
movl %r14d, %ecx
movl %ebx, %r8d
xorl %eax, %eax
callq 0x42e0
incq %r13
leaq 0x38f6dc(%rip), %r15    # 0x3b20b8
movslq 0x124(%r15), %rax
cmpq %rax, %r13
jl 0x21c65
jmp 0x22a06
leaq 0x38f6c3(%rip), %rbx    # 0x3b20b8
jmp 0x21d2d
leaq 0x38f6b7(%rip), %rbx    # 0x3b20b8
jmp 0x21ec1
movq 0x60(%rsp), %rdi
callq 0x3a180
leaq 0x8549f(%rip), %rdi     # 0xa7eb6
movl $0x7, %esi
movl $0x1, %edx
movq %r12, %rcx
callq 0x42c0
leaq 0x855e6(%rip), %rdi     # 0xa8016
movl $0x9, %esi
movl $0x1, %edx
movq %r12, %rcx
callq 0x42c0
movq %r12, %rdi
callq 0x42a0
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq