// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/image.c
// Function: add_object
Objectptr add_object(OBJECT_TYPE type, Point p1, Point p2, Point p3, char* st)
{
 /*!Last Changed 04.02.2008 added namedpoint type*/
 /*!Last Changed 27.12.2007 added error_histogram_plot type*/
 /*!Last Changed 20.09.2006 added dashedtype*/
 /*!Last Changed 11.07.2005 added boxplot and mean variance plot objects*/
 /*!Last Changed 23.01.2005*/
 int i, count = img.objectcount;
 img.objects = alloc(img.objects, (count + 1) * sizeof(Object), count + 1);
 img.objects[count].type = type;
 switch (type)
  {
   case OBJECT_LINE      :initialize_font(&(img.objects[count].fnt), (int) (p3.x), 0, 1.0);
                          if (between(st[0], '0', '9'))
                            img.objects[count].fnt.dashedtype = atoi(st) % MAX_LINE_TYPE;
                          img.objects[count].obje.li.upleft = p1;
                          img.objects[count].obje.li.downright = p2;
                          break;
   case OBJECT_CIRCLE    :initialize_font(&(img.objects[count].fnt), (int) (p3.x), 0, 1.0);
                          img.objects[count].obje.ci.center = p1;
                          img.objects[count].obje.ci.radius = p2.x;
                          break;
   case OBJECT_POINT     :initialize_font(&(img.objects[count].fnt), (int) (p3.x), TIMES, 14.0);
                          img.objects[count].obje.st.p = p1;
                          img.objects[count].obje.st.st = strcopy(img.objects[count].obje.st.st, st);
                          break;
   case OBJECT_STRING    :initialize_font(&(img.objects[count].fnt), (int) (p3.x), TIMES, (int) (p3.y));
                          img.objects[count].obje.st.p = p1;
                          img.objects[count].obje.st.st = strcopy(img.objects[count].obje.st.st, st);
                          break;
   case OBJECT_NAMEDPOINT:initialize_font(&(img.objects[count].fnt), 0, TIMES, 10.0);
                          img.objects[count].obje.st.p = p1;
                          img.objects[count].obje.st.st = strcopy(img.objects[count].obje.st.st, st);
                          break;
   case OBJECT_RECTANGLE :initialize_font(&(img.objects[count].fnt), 0, 0, 1.0);
                          img.objects[count].obje.re.upleft = p1;
                          img.objects[count].obje.re.downright = p2;
                          img.objects[count].groupindex = (int) p1.x;
                          img.objects[count].index = (int) p2.x;
                          break;
   case OBJECT_MVBOX     :initialize_font(&(img.objects[count].fnt), 0, 0, 1.0);
                          img.objects[count].obje.mv.mean = p1.x;
                          img.objects[count].obje.mv.variance = p1.y;
                          img.objects[count].groupindex = (int) p2.x;
                          img.objects[count].index = (int) p2.y;
                          break;
   case OBJECT_BOXPLOT   :initialize_font(&(img.objects[count].fnt), 0, 0, 1.0);
                          img.objects[count].obje.box.median = p1.x;
                          img.objects[count].obje.box.p25 = p1.y;
                          img.objects[count].obje.box.p75 = p2.x;
                          img.objects[count].obje.box.swhisker = p3.x;
                          img.objects[count].obje.box.lwhisker = p3.y;
                          img.objects[count].groupindex = atoi(st);
                          img.objects[count].index = (int) p2.y;
                          break;
   case OBJECT_ERRORHISTOGRAM:initialize_font(&(img.objects[count].fnt), 0, 0, 1.0);
                              img.objects[count].obje.errorhist.min = p1.x;
                              img.objects[count].obje.errorhist.max = p1.y;
                              for (i = 0; i < 10; i++)
                                img.objects[count].obje.errorhist.counts[i] = st[i] - '0';
                              img.objects[count].groupindex = (int) p2.x;
                              img.objects[count].index = (int) p2.y;
                              break;
   default               :printf(m1233, type);
                          break;
  } 
 img.objectcount++;
 return &(img.objects[count]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movsd %xmm0, -0x10(%rbp)
movsd %xmm1, -0x8(%rbp)
movsd %xmm2, -0x20(%rbp)
movsd %xmm3, -0x18(%rbp)
movsd %xmm4, -0x30(%rbp)
movsd %xmm5, -0x28(%rbp)
movl %edi, -0x34(%rbp)
movq %rsi, -0x40(%rbp)
leaq 0x3a2f54(%rip), %rax    # 0x3e2088
movq %rax, -0x58(%rbp)
movl 0x124(%rax), %ecx
movl %ecx, -0x48(%rbp)
movq 0x128(%rax), %rdi
movl -0x48(%rbp), %edx
incl %edx
movslq %edx, %rax
shlq $0x5, %rax
leaq (%rax,%rax,2), %rsi
callq 0x52d10
movq %rax, %rcx
movq -0x58(%rbp), %rax
movq %rcx, 0x128(%rax)
movl -0x34(%rbp), %edx
movq 0x128(%rax), %rax
movslq -0x48(%rbp), %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x5, %rcx
movl %edx, (%rax,%rcx)
movl -0x34(%rbp), %eax
movq %rax, -0x50(%rbp)
subq $0x8, %rax
ja 0x3f89d
movq -0x50(%rbp), %rax
leaq 0xa6210(%rip), %rcx     # 0xe53b0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x3a2ed8(%rip), %rax    # 0x3e2088
movq 0x128(%rax), %rdi
movslq -0x48(%rbp), %rax
imulq $0x60, %rax, %rax
addq %rax, %rdi
addq $0x8, %rdi
cvttsd2si -0x30(%rbp), %esi
xorl %edx, %edx
movsd 0xa2e43(%rip), %xmm0    # 0xe2018
callq 0x3f8f0
movq -0x40(%rbp), %rax
movsbl (%rax), %edi
movl $0x30, %esi
movl $0x39, %edx
callq 0x52600
cmpl $0x0, %eax
je 0x3f222
movq -0x40(%rbp), %rdi
callq 0x41c0
movl $0x5, %ecx
cltd
idivl %ecx
leaq 0x3a2e7b(%rip), %rax    # 0x3e2088
movq 0x128(%rax), %rax
movslq -0x48(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movl %edx, 0x1c(%rax)
leaq 0x3a2e5f(%rip), %rax    # 0x3e2088
movq 0x128(%rax), %rax
movslq -0x48(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq -0x10(%rbp), %rcx
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rcx
movq %rcx, 0x30(%rax)
leaq 0x3a2e36(%rip), %rax    # 0x3e2088
movq 0x128(%rax), %rax
movslq -0x48(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq -0x20(%rbp), %rcx
movq %rcx, 0x38(%rax)
movq -0x18(%rbp), %rcx
movq %rcx, 0x40(%rax)
jmp 0x3f8ae
leaq 0x3a2e08(%rip), %rax    # 0x3e2088
movq 0x128(%rax), %rdi
movslq -0x48(%rbp), %rax
imulq $0x60, %rax, %rax
addq %rax, %rdi
addq $0x8, %rdi
cvttsd2si -0x30(%rbp), %esi
xorl %edx, %edx
movsd 0xa2d73(%rip), %xmm0    # 0xe2018
callq 0x3f8f0
leaq 0x3a2dd7(%rip), %rax    # 0x3e2088
movq 0x128(%rax), %rax
movslq -0x48(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq -0x10(%rbp), %rcx
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rcx
movq %rcx, 0x30(%rax)
movsd -0x20(%rbp), %xmm0
leaq 0x3a2da9(%rip), %rax    # 0x3e2088
movq 0x128(%rax), %rax
movslq -0x48(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x38(%rax)
jmp 0x3f8ae
leaq 0x3a2d86(%rip), %rax    # 0x3e2088
movq 0x128(%rax), %rdi
movslq -0x48(%rbp), %rax
imulq $0x60, %rax, %rax
addq %rax, %rdi
addq $0x8, %rdi
cvttsd2si -0x30(%rbp), %esi
movl $0x2, %edx
movsd 0xa607e(%rip), %xmm0    # 0xe53a8
callq 0x3f8f0
leaq 0x3a2d52(%rip), %rax    # 0x3e2088
movq 0x128(%rax), %rax
movslq -0x48(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq -0x10(%rbp), %rcx
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rcx
movq %rcx, 0x30(%rax)
leaq 0x3a2d29(%rip), %rax    # 0x3e2088
movq 0x128(%rax), %rax
movslq -0x48(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq 0x38(%rax), %rdi
movq -0x40(%rbp), %rsi
callq 0x54ba0
movq %rax, %rcx
leaq 0x3a2d00(%rip), %rax    # 0x3e2088
movq 0x128(%rax), %rax
movslq -0x48(%rbp), %rdx
imulq $0x60, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x38(%rax)
jmp 0x3f8ae
leaq 0x3a2cde(%rip), %rax    # 0x3e2088
movq 0x128(%rax), %rdi
movslq -0x48(%rbp), %rax
imulq $0x60, %rax, %rax
addq %rax, %rdi
addq $0x8, %rdi
cvttsd2si -0x30(%rbp), %esi
cvttsd2si -0x28(%rbp), %eax
cvtsi2sd %eax, %xmm0
movl $0x2, %edx
callq 0x3f8f0
leaq 0x3a2ca9(%rip), %rax    # 0x3e2088
movq 0x128(%rax), %rax
movslq -0x48(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq -0x10(%rbp), %rcx
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rcx
movq %rcx, 0x30(%rax)
leaq 0x3a2c80(%rip), %rax    # 0x3e2088
movq 0x128(%rax), %rax
movslq -0x48(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq 0x38(%rax), %rdi
movq -0x40(%rbp), %rsi
callq 0x54ba0
movq %rax, %rcx
leaq 0x3a2c57(%rip), %rax    # 0x3e2088
movq 0x128(%rax), %rax
movslq -0x48(%rbp), %rdx
imulq $0x60, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x38(%rax)
jmp 0x3f8ae
leaq 0x3a2c35(%rip), %rax    # 0x3e2088
movq 0x128(%rax), %rdi
movslq -0x48(%rbp), %rax
imulq $0x60, %rax, %rax
addq %rax, %rdi
addq $0x8, %rdi
xorl %esi, %esi
movl $0x2, %edx
movsd 0xa54d0(%rip), %xmm0    # 0xe4948
callq 0x3f8f0
leaq 0x3a2c04(%rip), %rax    # 0x3e2088
movq 0x128(%rax), %rax
movslq -0x48(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq -0x10(%rbp), %rcx
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rcx
movq %rcx, 0x30(%rax)
leaq 0x3a2bdb(%rip), %rax    # 0x3e2088
movq 0x128(%rax), %rax
movslq -0x48(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq 0x38(%rax), %rdi
movq -0x40(%rbp), %rsi
callq 0x54ba0
movq %rax, %rcx
leaq 0x3a2bb2(%rip), %rax    # 0x3e2088
movq 0x128(%rax), %rax
movslq -0x48(%rbp), %rdx
imulq $0x60, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x38(%rax)
jmp 0x3f8ae
leaq 0x3a2b90(%rip), %rax    # 0x3e2088
movq 0x128(%rax), %rdi
movslq -0x48(%rbp), %rax
imulq $0x60, %rax, %rax
addq %rax, %rdi
addq $0x8, %rdi
xorl %edx, %edx
movsd 0xa2b00(%rip), %xmm0    # 0xe2018
movl %edx, %esi
callq 0x3f8f0
leaq 0x3a2b62(%rip), %rax    # 0x3e2088
movq 0x128(%rax), %rax
movslq -0x48(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq -0x10(%rbp), %rcx
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rcx
movq %rcx, 0x30(%rax)
leaq 0x3a2b39(%rip), %rax    # 0x3e2088
movq 0x128(%rax), %rax
movslq -0x48(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movq -0x20(%rbp), %rcx
movq %rcx, 0x38(%rax)
movq -0x18(%rbp), %rcx
movq %rcx, 0x40(%rax)
cvttsd2si -0x10(%rbp), %ecx
leaq 0x3a2b0b(%rip), %rax    # 0x3e2088
movq 0x128(%rax), %rax
movslq -0x48(%rbp), %rdx
imulq $0x60, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x20(%rax)
cvttsd2si -0x20(%rbp), %ecx
leaq 0x3a2aea(%rip), %rax    # 0x3e2088
movq 0x128(%rax), %rax
movslq -0x48(%rbp), %rdx
imulq $0x60, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x24(%rax)
jmp 0x3f8ae
leaq 0x3a2ac9(%rip), %rax    # 0x3e2088
movq 0x128(%rax), %rdi
movslq -0x48(%rbp), %rax
imulq $0x60, %rax, %rax
addq %rax, %rdi
addq $0x8, %rdi
xorl %edx, %edx
movsd 0xa2a39(%rip), %xmm0    # 0xe2018
movl %edx, %esi
callq 0x3f8f0
movsd -0x10(%rbp), %xmm0
leaq 0x3a2a96(%rip), %rax    # 0x3e2088
movq 0x128(%rax), %rax
movslq -0x48(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x28(%rax)
movsd -0x8(%rbp), %xmm0
leaq 0x3a2a73(%rip), %rax    # 0x3e2088
movq 0x128(%rax), %rax
movslq -0x48(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x30(%rax)
cvttsd2si -0x20(%rbp), %ecx
leaq 0x3a2a50(%rip), %rax    # 0x3e2088
movq 0x128(%rax), %rax
movslq -0x48(%rbp), %rdx
imulq $0x60, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x20(%rax)
cvttsd2si -0x18(%rbp), %ecx
leaq 0x3a2a2f(%rip), %rax    # 0x3e2088
movq 0x128(%rax), %rax
movslq -0x48(%rbp), %rdx
imulq $0x60, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x24(%rax)
jmp 0x3f8ae
leaq 0x3a2a0e(%rip), %rax    # 0x3e2088
movq 0x128(%rax), %rdi
movslq -0x48(%rbp), %rax
imulq $0x60, %rax, %rax
addq %rax, %rdi
addq $0x8, %rdi
xorl %edx, %edx
movsd 0xa297e(%rip), %xmm0    # 0xe2018
movl %edx, %esi
callq 0x3f8f0
movsd -0x10(%rbp), %xmm0
leaq 0x3a29db(%rip), %rax    # 0x3e2088
movq 0x128(%rax), %rax
movslq -0x48(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x28(%rax)
movsd -0x8(%rbp), %xmm0
leaq 0x3a29b8(%rip), %rax    # 0x3e2088
movq 0x128(%rax), %rax
movslq -0x48(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x30(%rax)
movsd -0x20(%rbp), %xmm0
leaq 0x3a2995(%rip), %rax    # 0x3e2088
movq 0x128(%rax), %rax
movslq -0x48(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x38(%rax)
movsd -0x30(%rbp), %xmm0
leaq 0x3a2972(%rip), %rax    # 0x3e2088
movq 0x128(%rax), %rax
movslq -0x48(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x40(%rax)
movsd -0x28(%rbp), %xmm0
leaq 0x3a294f(%rip), %rax    # 0x3e2088
movq 0x128(%rax), %rax
movslq -0x48(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x48(%rax)
movq -0x40(%rbp), %rdi
callq 0x41c0
movl %eax, %ecx
leaq 0x3a2926(%rip), %rax    # 0x3e2088
movq 0x128(%rax), %rax
movslq -0x48(%rbp), %rdx
imulq $0x60, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x20(%rax)
cvttsd2si -0x18(%rbp), %ecx
leaq 0x3a2905(%rip), %rax    # 0x3e2088
movq 0x128(%rax), %rax
movslq -0x48(%rbp), %rdx
imulq $0x60, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x24(%rax)
jmp 0x3f8ae
leaq 0x3a28e4(%rip), %rax    # 0x3e2088
movq 0x128(%rax), %rdi
movslq -0x48(%rbp), %rax
imulq $0x60, %rax, %rax
addq %rax, %rdi
addq $0x8, %rdi
xorl %edx, %edx
movsd 0xa2854(%rip), %xmm0    # 0xe2018
movl %edx, %esi
callq 0x3f8f0
movsd -0x10(%rbp), %xmm0
leaq 0x3a28b1(%rip), %rax    # 0x3e2088
movq 0x128(%rax), %rax
movslq -0x48(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x28(%rax)
movsd -0x8(%rbp), %xmm0
leaq 0x3a288e(%rip), %rax    # 0x3e2088
movq 0x128(%rax), %rax
movslq -0x48(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movsd %xmm0, 0x30(%rax)
movl $0x0, -0x44(%rbp)
cmpl $0xa, -0x44(%rbp)
jge 0x3f859
movq -0x40(%rbp), %rax
movslq -0x44(%rbp), %rcx
movsbl (%rax,%rcx), %edx
subl $0x30, %edx
leaq 0x3a2854(%rip), %rax    # 0x3e2088
movq 0x128(%rax), %rax
movslq -0x48(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
movslq -0x44(%rbp), %rcx
movl %edx, 0x38(%rax,%rcx,4)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x3f818
cvttsd2si -0x20(%rbp), %ecx
leaq 0x3a2823(%rip), %rax    # 0x3e2088
movq 0x128(%rax), %rax
movslq -0x48(%rbp), %rdx
imulq $0x60, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x20(%rax)
cvttsd2si -0x18(%rbp), %ecx
leaq 0x3a2802(%rip), %rax    # 0x3e2088
movq 0x128(%rax), %rax
movslq -0x48(%rbp), %rdx
imulq $0x60, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x24(%rax)
jmp 0x3f8ae
movl -0x34(%rbp), %esi
leaq 0xa5187(%rip), %rdi     # 0xe4a2e
movb $0x0, %al
callq 0x4030
leaq 0x3a27d3(%rip), %rax    # 0x3e2088
movl 0x124(%rax), %ecx
addl $0x1, %ecx
leaq 0x3a27c3(%rip), %rax    # 0x3e2088
movl %ecx, 0x124(%rax)
leaq 0x3a27b6(%rip), %rax    # 0x3e2088
movq 0x128(%rax), %rax
movslq -0x48(%rbp), %rcx
imulq $0x60, %rcx, %rcx
addq %rcx, %rax
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)