// File: /workspace/github_c_makefile_star2_O1/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 0x38dd39(%rip), %r15    # 0x3af0b8
cmpl $0x0, 0x28(%r15)
je 0x21390
cmpl $0x0, 0x98(%r15)
jne 0x21397
xorl %eax, %eax
callq 0x2d4df
leaq 0x87503(%rip), %rsi     # 0xa88a1
movq %rbx, %rdi
callq 0x40f0
testq %rax, %rax
je 0x22224
movq %rax, %r12
movl (%r15), %edx
movl 0x4(%r15), %esi
movq %rax, %rdi
callq 0x22236
movsd 0xb07f7(%rip), %xmm0    # 0xd1bc0
movsd 0xb07f7(%rip), %xmm1    # 0xd1bc8
movsd 0xb07f7(%rip), %xmm2    # 0xd1bd0
leaq 0x83add(%rip), %r14     # 0xa4ebd
movq %r12, %rdi
movq %r14, %rsi
movb $0x3, %al
callq 0x42e0
movq %r12, %rdi
callq 0x222e2
movsd 0xb07c3(%rip), %xmm0    # 0xd1bc0
movsd 0xb07c3(%rip), %xmm1    # 0xd1bc8
movsd 0xb07c3(%rip), %xmm2    # 0xd1bd0
movq %r12, %rdi
movq %r14, %rsi
movb $0x3, %al
callq 0x42e0
movq %r12, %rdi
callq 0x2280b
leaq 0x83a35(%rip), %rdi     # 0xa4e5e
movl $0x7, %esi
movl $0x1, %edx
movq %r12, %rcx
callq 0x42c0
movq 0x128(%r15), %rdi
movslq 0x124(%r15), %rsi
leaq 0x18226(%rip), %rcx     # 0x39676
movl $0x60, %edx
callq 0x4240
movl 0x38(%r15), %eax
movl %eax, 0x4c(%rsp)
movl 0xa8(%r15), %eax
movl %eax, 0x60(%rsp)
movslq %eax, %rdi
leaq 0x839ef(%rip), %rdx     # 0xa4e66
movl $0x4, %esi
movl $0x12, %ecx
callq 0x39210
movq %rax, 0x58(%rsp)
cmpl $0x0, 0x124(%r15)
jle 0x221e0
movl $0x38, %eax
movq %rax, 0x68(%rsp)
xorl %r13d, %r13d
movq %r12, 0x20(%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, 0x40(%rsp)
movl %ebp, %esi
callq 0x2dd45
movl %eax, %r15d
movq 0x128(%r14), %rax
movl (%rax,%rbx), %esi
cmpq $0x8, %rsi
ja 0x21f91
leaq (%rax,%rbx), %rcx
leaq 0x838ae(%rip), %rdi     # 0xa4da8
movslq (%rdi,%rsi,4), %rdx
addq %rdi, %rdx
jmpq *%rdx
testq %r13, %r13
je 0x21535
leaq (,%r13,2), %rdx
addq %r13, %rdx
shlq $0x5, %rdx
movl 0x18(%rax,%rdx), %esi
cmpl -0x48(%rcx), %esi
jne 0x21535
addq %rax, %rdx
addq $0x8, %rdx
movsd 0x8(%rdx), %xmm0
ucomisd -0x50(%rcx), %xmm0
jne 0x21535
jnp 0x21561
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 0x22cba
leaq 0x38db50(%rip), %rbx    # 0x3af0b8
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, 0x18(%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 0x2de2d
movl %eax, %ebp
cmpl $0x0, 0x78(%rbx)
je 0x215e4
movsd 0x80(%rbx), %xmm1
movsd 0x88(%rbx), %xmm2
movsd 0x18(%rsp), %xmm0
movl $0x50, %edi
movl $0x244, %esi            # imm = 0x244
callq 0x2de2d
movl %eax, %r15d
movq %r12, %rdi
movl %ebp, %esi
movl %r15d, %edx
movq %r14, %rcx
jmp 0x219d5
leaq 0x38dabd(%rip), %rax    # 0x3af0b8
movl 0x120(%rax), %eax
cmpl $0x2, %eax
je 0x21fcc
cmpl $0x1, %eax
je 0x21fc6
testl %eax, %eax
jne 0x22019
movsd 0xb059d(%rip), %xmm0    # 0xd1bc0
movsd 0xb059d(%rip), %xmm1    # 0xd1bc8
movsd 0xb059d(%rip), %xmm2    # 0xd1bd0
jmp 0x22008
testq %r13, %r13
leaq 0x38da76(%rip), %r14    # 0x3af0b8
je 0x2165a
movl 0x18(%rcx), %edx
cmpl -0x48(%rcx), %edx
jne 0x2165a
movsd 0x10(%rcx), %xmm0
ucomisd -0x50(%rcx), %xmm0
jne 0x2165a
jnp 0x216a9
movl 0x18(%rax,%rbx), %eax
leaq (%rax,%rax,2), %rax
leaq 0xb0557(%rip), %rcx     # 0xd1bc0
movsd (%rcx,%rax,8), %xmm0
movsd 0x8(%rcx,%rax,8), %xmm1
movsd 0x10(%rcx,%rax,8), %xmm2
movq %r12, %rdi
leaq 0x83839(%rip), %rsi     # 0xa4ebd
movb $0x3, %al
callq 0x42e0
movq 0x128(%r14), %rax
movsd 0x10(%rax,%rbx), %xmm0
movq %r12, %rdi
leaq 0x83859(%rip), %rsi     # 0xa4efb
movb $0x1, %al
callq 0x42e0
movq 0x128(%r14), %rax
movsd 0x28(%rax,%rbx), %xmm0
movsd 0x30(%rax,%rbx), %xmm1
movsd %xmm1, 0x40(%rsp)
movsd 0x38(%rax,%rbx), %xmm1
movsd %xmm1, 0x38(%rsp)
movsd 0x40(%rax,%rbx), %xmm1
movsd %xmm1, 0x30(%rsp)
movsd 0x10(%r14), %xmm1
movsd 0x18(%r14), %xmm2
movl $0x50, %edi
movl $0x244, %esi            # imm = 0x244
callq 0x2de2d
movl %eax, 0x18(%rsp)
movsd 0x80(%r14), %xmm1
movsd 0x88(%r14), %xmm2
movsd 0x40(%rsp), %xmm0
movl $0x50, %edi
movl $0x244, %esi            # imm = 0x244
callq 0x2de2d
movl %eax, %ebp
movsd 0x10(%r14), %xmm1
movsd 0x18(%r14), %xmm2
movsd 0x38(%rsp), %xmm0
movl $0x50, %edi
movl $0x244, %esi            # imm = 0x244
callq 0x2de2d
movl %eax, %r15d
movsd 0x80(%r14), %xmm1
movsd 0x88(%r14), %xmm2
movsd 0x30(%rsp), %xmm0
movl $0x50, %edi
movl $0x244, %esi            # imm = 0x244
callq 0x2de2d
movq 0x128(%r14), %rcx
movl 0x1c(%rcx,%rbx), %edx
testl %edx, %edx
je 0x21fa4
movl %eax, (%rsp)
movq %r12, %rdi
leaq 0x8383b(%rip), %rsi     # 0xa4fc8
movl 0x18(%rsp), %ecx
movl %ebp, %r8d
movl %r15d, %r9d
jmp 0x21fba
testq %r13, %r13
je 0x217af
movsd 0x10(%rcx), %xmm0
ucomisd -0x50(%rcx), %xmm0
jne 0x217af
jnp 0x217d5
leaq (,%r13,2), %rcx
addq %r13, %rcx
shlq $0x5, %rcx
movsd 0x10(%rax,%rcx), %xmm0
movq %r12, %rdi
leaq 0x8372d(%rip), %rsi     # 0xa4efb
movb $0x1, %al
callq 0x42e0
leaq 0x38d8dc(%rip), %rbx    # 0x3af0b8
movq 0x128(%rbx), %rax
leaq (,%r13,2), %rcx
addq %r13, %rcx
shlq $0x5, %rcx
movsd 0x40(%rax,%rcx), %xmm0
movsd %xmm0, 0x18(%rsp)
cvttsd2si 0x30(%rax,%rcx), %r12d
movl %ebp, %edi
movq 0x40(%rsp), %r14
movl %r14d, %esi
movl 0x4c(%rsp), %edx
movl %r15d, %ecx
leaq 0x28(%rsp), %r8
callq 0x2ddb5
movl %eax, %ebp
movsd 0x80(%rbx), %xmm1
movsd 0x88(%rbx), %xmm2
movsd 0x18(%rsp), %xmm0
movl $0x50, %edi
movl $0x244, %esi            # imm = 0x244
callq 0x2de2d
xorps %xmm0, %xmm0
cvtsi2sd %ebp, %xmm0
addsd 0x28(%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 0x20(%rsp), %rdi
movl %ebp, %esi
movl %r12d, %edx
movq 0x20(%rsp), %r12
movl %eax, %r8d
callq 0x22dd3
jmp 0x221c0
testq %r13, %r13
je 0x218bf
movl 0x18(%rcx), %edx
cmpl -0x48(%rcx), %edx
jne 0x218bf
movsd 0x10(%rcx), %xmm0
ucomisd -0x50(%rcx), %xmm0
jne 0x218bf
jnp 0x218eb
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 0x22cba
leaq 0x38d7c6(%rip), %rbx    # 0x3af0b8
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, 0x18(%rsp)
movsd 0x10(%rbx), %xmm1
movsd 0x18(%rbx), %xmm2
movl $0x50, %edi
movl $0x244, %esi            # imm = 0x244
callq 0x2de2d
movl %eax, %r14d
movsd 0x80(%rbx), %xmm1
movsd 0x88(%rbx), %xmm2
movsd 0x38(%rsp), %xmm0
movl $0x50, %edi
movl $0x244, %esi            # imm = 0x244
callq 0x2de2d
movl %eax, %r12d
movq %r14, 0x30(%rsp)
leal -0x2(%r14), %ebp
leal -0x2(%r12), %r15d
addl $0x2, %r14d
leal 0x2(%r12), %ebx
movq 0x20(%rsp), %rdi
leaq 0x83677(%rip), %rsi     # 0xa5002
movl %ebp, %edx
movl %r15d, %ecx
movl %r14d, %r8d
movl %ebx, %r9d
xorl %eax, %eax
callq 0x42e0
movq 0x20(%rsp), %rdi
leaq 0x83659(%rip), %rsi     # 0xa5002
movl %ebp, %edx
movl %ebx, %ecx
movl %r14d, %r8d
movl %r15d, %r9d
xorl %eax, %eax
callq 0x42e0
addl $-0xa, %r12d
movq 0x20(%rsp), %rdi
movq 0x30(%rsp), %rsi
movl %r12d, %edx
movq 0x20(%rsp), %r12
movq 0x18(%rsp), %rcx
movl $0x2, %r8d
callq 0x22d13
jmp 0x221c0
movsd 0x28(%rcx), %xmm0
leaq 0x38d6c7(%rip), %r14    # 0x3af0b8
movsd 0x80(%r14), %xmm1
movsd 0x88(%r14), %xmm2
movl $0x50, %edi
movl $0x244, %esi            # imm = 0x244
callq 0x2de2d
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 0x2de2d
movl %eax, 0x50(%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 0x2de2d
movl %eax, 0x64(%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 0x2de2d
movl %eax, %r12d
movq 0x128(%r14), %rax
movsd 0x48(%rax,%rbx), %xmm0
movsd 0x80(%r14), %xmm1
movsd 0x88(%r14), %xmm2
movl 0x64(%rsp), %r14d
movl $0x50, %edi
movl $0x244, %esi            # imm = 0x244
callq 0x2de2d
movl %eax, 0x30(%rsp)
movl %ebp, %edi
movq 0x40(%rsp), %rbx
movl %ebx, %esi
movl 0x4c(%rsp), %edx
movl %r15d, %ecx
movl %r12d, %r15d
leaq 0x28(%rsp), %r8
callq 0x2ddb5
movl %eax, %ebp
movsd 0x28(%rsp), %xmm0
movapd %xmm0, %xmm1
mulsd 0x8322d(%rip), %xmm1    # 0xa4d40
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, 0x18(%rsp)
movsd %xmm0, 0x28(%rsp)
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %r8d
leaq (%rbx,%rbx,2), %rax
leaq 0xb0073(%rip), %rcx     # 0xd1bc0
movsd 0x18(%rcx,%rax,8), %xmm0
movsd 0x20(%rcx,%rax,8), %xmm1
movsd 0x28(%rcx,%rax,8), %xmm2
movq 0x20(%rsp), %r12
movq %r12, %rdi
leaq 0x8357e(%rip), %rsi     # 0xa50ec
movl %ebp, %edx
movl %r14d, %ecx
movl 0x50(%rsp), %ebx
movl %ebx, %r9d
movb $0x3, %al
callq 0x42e0
movsd 0x28(%rsp), %xmm0
addsd 0x18(%rsp), %xmm0
cvttsd2si %xmm0, %r8d
movq %r12, %rdi
leaq 0x83466(%rip), %rsi     # 0xa5002
movl %ebp, %edx
movl 0x38(%rsp), %ecx
movl %ecx, %r9d
xorl %eax, %eax
callq 0x42e0
cmpl %ebx, %r15d
jge 0x21c18
movl %ebx, %r8d
movsd 0x28(%rsp), %xmm0
mulsd 0x81156(%rip), %xmm0    # 0xa2d18
addsd 0x18(%rsp), %xmm0
cvttsd2si %xmm0, %ecx
movl %r15d, (%rsp)
movq 0x20(%rsp), %rbx
movq %rbx, %rdi
leaq 0x833e9(%rip), %rsi     # 0xa4fc8
movl $0x4, %edx
movl %ecx, %r9d
xorl %eax, %eax
callq 0x42e0
movsd 0x28(%rsp), %xmm0
addsd 0x18(%rsp), %xmm0
cvttsd2si %xmm0, %r8d
movq %rbx, %rdi
leaq 0x833f9(%rip), %rsi     # 0xa5002
movl %ebp, %edx
movl %r15d, %ecx
movl %r15d, %r9d
xorl %eax, %eax
callq 0x42e0
movl 0x30(%rsp), %ebx
cmpl %r14d, %ebx
movq 0x20(%rsp), %r12
jle 0x221c0
movsd 0x28(%rsp), %xmm0
mulsd 0x810e0(%rip), %xmm0    # 0xa2d18
addsd 0x18(%rsp), %xmm0
cvttsd2si %xmm0, %ecx
movl %ebx, (%rsp)
movq %r12, %rdi
leaq 0x83379(%rip), %rsi     # 0xa4fc8
movl $0x4, %edx
movl %r14d, %r8d
movl %ecx, %r9d
xorl %eax, %eax
callq 0x42e0
movsd 0x18(%rsp), %xmm0
addsd 0x28(%rsp), %xmm0
cvttsd2si %xmm0, %r8d
movq %r12, %rdi
leaq 0x83386(%rip), %rsi     # 0xa5002
movl %ebp, %edx
movl %ebx, %ecx
movl %ebx, %r9d
jmp 0x21fba
movl $0x1f4, %eax            # imm = 0x1F4
xorl %edx, %edx
idivl %r15d
movl %eax, %ecx
movl $0x1f4, %eax            # imm = 0x1F4
xorl %edx, %edx
idivl 0x60(%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 0x8306f(%rip), %xmm1    # 0xa4d30
movsd %xmm1, 0x18(%rsp)
divsd 0x83069(%rip), %xmm0    # 0xa4d38
movsd %xmm0, 0x28(%rsp)
movq 0x40(%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 0x83306(%rip), %rsi     # 0xa5002
movl %r15d, %edx
movl %ebx, %ecx
movl %r15d, %r8d
movl %ebp, %r9d
xorl %eax, %eax
callq 0x42e0
movq 0x58(%rsp), %rax
cmpl $0x0, (%rax,%r12,4)
xorps %xmm0, %xmm0
cvtsi2sd %ebx, %xmm0
movsd %xmm0, 0x30(%rsp)
jne 0x21e0a
movq %r12, 0x50(%rsp)
xorl %ebx, %ebx
xorpd %xmm2, %xmm2
leaq 0x38d37b(%rip), %rbp    # 0x3af0b8
leaq 0x8313b(%rip), %r14     # 0xa4e7f
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 0x82fb8(%rip), %xmm0    # 0xa4d30
movq %r14, %rsi
cmpq $0x3, %rax
ja 0x21d8f
leaq 0x83090(%rip), %rcx     # 0xa4e18
movslq (%rcx,%rax,4), %rsi
addq %rcx, %rsi
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
leaq 0x70(%rsp), %r12
movq %r12, %rdi
movb $0x1, %al
movsd %xmm2, 0x38(%rsp)
callq 0x41b0
xorps %xmm0, %xmm0
cvtsi2sd %ebx, %xmm0
mulsd 0x18(%rsp), %xmm0
addsd 0x30(%rsp), %xmm0
cvttsd2si %xmm0, %edx
movq 0x20(%rsp), %rdi
movl $0x4b, %esi
movq %r12, %rcx
movl $0x1, %r8d
callq 0x22d13
movsd 0x38(%rsp), %xmm2
addsd 0x80737(%rip), %xmm2    # 0xa2520
incl %ebx
cmpl $0xb, %ebx
jne 0x21d44
movq 0x58(%rsp), %rax
movq 0x50(%rsp), %rcx
movl $0x1, (%rax,%rcx,4)
movq 0x40(%rsp), %r14
xorps %xmm0, %xmm0
cvtsi2sd %r15d, %xmm0
movsd %xmm0, 0x38(%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 0xafd7d(%rip), %rcx     # 0xd1bc0
leaq (%rcx,%rax,8), %rbx
xorl %r14d, %r14d
movq 0x20(%rsp), %r12
leaq 0x38d262(%rip), %rax    # 0x3af0b8
movq 0x128(%rax), %rax
addq 0x68(%rsp), %rax
movl (%rax,%r14,4), %eax
testl %eax, %eax
jle 0x21ef0
xorps %xmm0, %xmm0
cvtsi2sd %r14d, %xmm0
movsd 0x18(%rsp), %xmm1
mulsd %xmm1, %xmm0
movsd 0x30(%rsp), %xmm2
addsd %xmm2, %xmm0
addsd 0x8068e(%rip), %xmm0    # 0xa2520
cvttsd2si %xmm0, %ecx
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd 0x28(%rsp), %xmm0
addsd 0x38(%rsp), %xmm0
cvttsd2si %xmm0, %r8d
leal 0x1(%r14), %eax
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
mulsd %xmm1, %xmm0
addsd %xmm2, %xmm0
addsd 0x80edf(%rip), %xmm0    # 0xa2da8
cvttsd2si %xmm0, %r9d
movsd (%rbx), %xmm0
movsd 0x8(%rbx), %xmm1
movsd 0x10(%rbx), %xmm2
movq %r12, %rdi
leaq 0x83206(%rip), %rsi     # 0xa50ec
movl %r15d, %edx
movb $0x3, %al
callq 0x42e0
incq %r14
cmpq $0xa, %r14
jne 0x21e4f
jmp 0x221c0
movsd 0x28(%rcx), %xmm0
movsd 0x30(%rcx), %xmm1
movsd %xmm1, 0x18(%rsp)
leaq 0x38d19f(%rip), %rbx    # 0x3af0b8
movsd 0x10(%rbx), %xmm1
movsd 0x18(%rbx), %xmm2
cvttsd2si 0x38(%rcx), %r14d
movl $0x50, %edi
movl $0x244, %esi            # imm = 0x244
callq 0x2de2d
movl %eax, %r15d
movsd 0x80(%rbx), %xmm1
movsd 0x88(%rbx), %xmm2
movsd 0x18(%rsp), %xmm0
movl $0x50, %edi
movl $0x244, %esi            # imm = 0x244
callq 0x2de2d
movl %eax, %ebp
leal (%r15,%r14), %edx
movq %r12, %rdi
leaq 0x83073(%rip), %rsi     # 0xa4fe3
movl %eax, %ecx
xorl %eax, %eax
callq 0x42e0
movq %r12, %rdi
leaq 0x8306e(%rip), %rsi     # 0xa4ff1
movl %r14d, %edx
movl %r15d, %ecx
movl %ebp, %r8d
jmp 0x221b9
leaq 0x82ef6(%rip), %rdi     # 0xa4e8e
xorl %eax, %eax
callq 0x4030
jmp 0x221c0
movq %r12, %rdi
leaq 0x83054(%rip), %rsi     # 0xa5002
movl 0x18(%rsp), %edx
movl %ebp, %ecx
movl %r15d, %r8d
movl %eax, %r9d
xorl %eax, %eax
callq 0x42e0
jmp 0x221c0
movslq 0x20(%rcx), %rax
jmp 0x21fd0
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 0xafbc9(%rip), %rcx     # 0xd1bc0
movsd (%rcx,%rax,8), %xmm0
movsd 0x8(%rcx,%rax,8), %xmm1
movsd 0x10(%rcx,%rax,8), %xmm2
movq %r12, %rdi
leaq 0x82eab(%rip), %rsi     # 0xa4ebd
movb $0x3, %al
callq 0x42e0
leaq 0x38d098(%rip), %r14    # 0x3af0b8
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 0x2de2d
movq %rax, 0x18(%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 0x2de2d
movl %eax, 0x30(%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 0x2de2d
movl %eax, %r12d
movl %ebp, %edi
movq 0x40(%rsp), %rsi
movl 0x4c(%rsp), %edx
movl %r15d, %ecx
leaq 0x28(%rsp), %r8
callq 0x2ddb5
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
movsd 0x28(%rsp), %xmm1
mulsd 0x80c29(%rip), %xmm1    # 0xa2d18
addsd %xmm0, %xmm1
cvttsd2si %xmm1, %r14d
movq 0x18(%rsp), %rbx
leal -0x4(%rbx), %ecx
movq 0x20(%rsp), %rdi
leaq 0x82ef6(%rip), %rbp     # 0xa5002
movq %rbp, %rsi
movl %r14d, %edx
movl %r14d, %r8d
movl 0x30(%rsp), %r15d
movl %r15d, %r9d
xorl %eax, %eax
callq 0x42e0
leal 0x4(%rbx), %ecx
movq 0x20(%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 0x20(%rsp), %rdi
leaq 0x82eaf(%rip), %rsi     # 0xa5002
movl %ebx, %edx
movl %r15d, %ecx
movl %ebp, %r8d
movl %r15d, %r9d
xorl %eax, %eax
callq 0x42e0
movq 0x20(%rsp), %rdi
leaq 0x82e91(%rip), %rsi     # 0xa5002
movl %ebx, %edx
movl %r12d, %ecx
movl %ebp, %r8d
movl %r12d, %r9d
movq 0x20(%rsp), %r12
xorl %eax, %eax
callq 0x42e0
leal 0x4(%r14), %edx
movq %r12, %rdi
leaq 0x82e4d(%rip), %rsi     # 0xa4fe3
movq 0x18(%rsp), %rbx
movl %ebx, %ecx
xorl %eax, %eax
callq 0x42e0
movq %r12, %rdi
leaq 0x82e43(%rip), %rsi     # 0xa4ff1
movl $0x4, %edx
movl %r14d, %ecx
movl %ebx, %r8d
xorl %eax, %eax
callq 0x42e0
incq %r13
leaq 0x38ceee(%rip), %r15    # 0x3af0b8
movslq 0x124(%r15), %rax
addq $0x60, 0x68(%rsp)
cmpq %rax, %r13
jl 0x214ab
movq 0x58(%rsp), %rdi
callq 0x39194
leaq 0x82c6d(%rip), %rdi     # 0xa4e5e
movl $0x7, %esi
movl $0x1, %edx
movq %r12, %rcx
callq 0x42c0
leaq 0x82db4(%rip), %rdi     # 0xa4fbe
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