// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/annotationsketch/canvas_cairo.c
// Function: gt_canvas_cairo_draw_ruler
int gt_canvas_cairo_draw_ruler(GtCanvas *canvas, GtRange viewrange,
                                GtError *err)
{
  double step, minorstep, vmajor, vminor, offset,
         theight = gt_graphics_get_text_height(canvas->pvt->g);
  GtWord base_length, tick;
  GtColor rulercol, gridcol;
  GtStr *left_str = NULL, *right_str = NULL, *unit = NULL, *fontfam = NULL;
  char str[BUFSIZ];
  GtStyleQueryStatus rval;
  bool showgrid = true, nozeropos = false;
  gt_assert(canvas);

  if (gt_style_get_bool(canvas->pvt->sty, "format", "show_grid", &showgrid,
                        NULL, err) == GT_STYLE_QUERY_ERROR) {
    return -1;
  }
  if (gt_style_get_num(canvas->pvt->sty, "format", "ruler_font_size",
                       &theight, NULL, err) == GT_STYLE_QUERY_ERROR) {
    return -1;
  }

  /* get offset value from style, default: 0 */
  offset = 0;
  if (gt_style_get_num(canvas->pvt->sty, "format", "ruler_offset",
                       &offset, NULL, err) == GT_STYLE_QUERY_ERROR) {
    return -1;
  }

  nozeropos = false;
  if (gt_style_get_bool(canvas->pvt->sty, "format", "ruler_nozeropos",
                        &nozeropos, NULL, err) == GT_STYLE_QUERY_ERROR) {
    return -1;
  }

  /* get unit value from style, default: empty */
  unit = gt_str_new();
  if (gt_style_get_str(canvas->pvt->sty,
                       "format", "unit",
                       unit, NULL, err) == GT_STYLE_QUERY_ERROR) {
    gt_str_delete(unit);
    return -1;
  }

  /* get additional description texts from style */
  left_str = gt_str_new();
  rval = gt_style_get_str(canvas->pvt->sty, "format",
                          "ruler_left_text", left_str, NULL, err);
  switch (rval) {
    case GT_STYLE_QUERY_NOT_SET:
      gt_str_append_cstr(left_str, FIVE_PRIME_STRING);
      break;
    case GT_STYLE_QUERY_ERROR:
      gt_str_delete(unit);
      gt_str_delete(left_str);
      return -1;
      break;  /* shouldn't reach this */
    default:
      break;
  }

  right_str = gt_str_new();
  rval = gt_style_get_str(canvas->pvt->sty, "format",
                        "ruler_right_text", right_str, NULL, err);
  switch (rval) {
    case GT_STYLE_QUERY_NOT_SET:
      gt_str_append_cstr(right_str, THREE_PRIME_STRING);
      break;
    case GT_STYLE_QUERY_ERROR:
      gt_str_delete(unit);
      gt_str_delete(left_str);
      gt_str_delete(right_str);
      return -1;
      break;  /* shouldn't reach this */
    default:
      break;
  }

  fontfam = gt_str_new_cstr("Sans");
  if (gt_style_get_str(canvas->pvt->sty,
                       "format", "ruler_font_family",
                       fontfam, NULL, err ) == GT_STYLE_QUERY_ERROR) {
    gt_str_delete(fontfam);
    gt_str_delete(unit);
    gt_str_delete(left_str);
    gt_str_delete(right_str);
    return -1;
  }

  /* reset font to default */
  gt_graphics_set_font(canvas->pvt->g,
                       gt_str_get(fontfam),
                       SLANT_NORMAL,
                       WEIGHT_NORMAL,
                       theight);

  rulercol.red = rulercol.green = rulercol.blue = RULER_GREY;
  rulercol.alpha = 1.0;
  gridcol.red = gridcol.green = gridcol.blue = GRID_GREY;
  gridcol.alpha = 1.0;

  /* determine range and step of the scale */
  base_length = gt_range_length(&viewrange);

  /* determine tick steps */
  step = pow(10,ceil(log10(base_length))-1);
  minorstep = step/10.0;

  /* calculate starting positions */
  vminor = (double) (floor(viewrange.start / minorstep))*minorstep;
  vmajor = (double) (floor(viewrange.start / step))*step;

  /* draw major ticks */
  for (tick = vmajor; tick <= viewrange.end; tick += step)
  {
    double drawtick = (gt_coords_convert_point(viewrange, tick)
                       * (canvas->pvt->width-2*canvas->pvt->margins))
                       + canvas->pvt->margins;
    GtWord pos = tick + (GtWord)offset;
    if (pos <= 0 && nozeropos)
      pos--;
    if (tick < viewrange.start) continue;
    gt_graphics_draw_vertical_line(canvas->pvt->g,
                                   drawtick,
                                   canvas->pvt->y + 30,
                                   rulercol,
                                   10,
                                   1.0);
    gt_format_ruler_label(str, pos, gt_str_get(unit), BUFSIZ);
    gt_graphics_draw_text_centered(canvas->pvt->g,
                                   drawtick,
                                   canvas->pvt->y + 20,
                                   str);
  }
  /* draw minor ticks */
  if (minorstep >= 1)
  {
    for (tick = vminor; tick <= viewrange.end; tick += minorstep)
    {
      double drawtick;
      if (tick < viewrange.start)
        continue;
      drawtick = (gt_coords_convert_point(viewrange, tick)
                    * (canvas->pvt->width-2*canvas->pvt->margins))
                  + canvas->pvt->margins;
      if (showgrid)
      {
        gt_graphics_draw_vertical_line(canvas->pvt->g,
                                       drawtick,
                                       canvas->pvt->y + 40,
                                       gridcol,
                                       canvas->pvt->height - 40 - 15,
                                       1.0);
      }
      gt_graphics_draw_vertical_line(canvas->pvt->g,
                                     drawtick,
                                     canvas->pvt->y + 35,
                                     rulercol,
                                     5,
                                     1.0);
    }
  }
  /* draw ruler line */
  gt_graphics_draw_horizontal_line(canvas->pvt->g,
                                   canvas->pvt->margins,
                                   canvas->pvt->y + 40,
                                   rulercol,
                                   canvas->pvt->width - 2
                                     * canvas->pvt->margins,
                                   1.25);

  gt_graphics_draw_text_right(canvas->pvt->g,
                              canvas->pvt->margins - 10,
                              canvas->pvt->y + 39 + (theight/2),
                              gt_str_get(left_str));
  gt_graphics_draw_text(canvas->pvt->g,
                        canvas->pvt->width - canvas->pvt->margins + 10,
                        canvas->pvt->y + 39 + (theight/2),
                        gt_str_get(right_str));

  gt_str_delete(unit);
  gt_str_delete(left_str);
  gt_str_delete(right_str);
  gt_str_delete(fontfam);

  return 0;
}

// Assembly:
subq $0x21b8, %rsp           # imm = 0x21B8
movq %rsi, 0x21a0(%rsp)
movq %rdx, 0x21a8(%rsp)
movq %rdi, 0x2198(%rsp)
movq %rcx, 0x2190(%rsp)
movq 0x2198(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x58(%rax), %rdi
callq 0x3ebd0
movsd %xmm0, 0x2160(%rsp)
movq $0x0, 0x2108(%rsp)
movq $0x0, 0x2100(%rsp)
movq $0x0, 0x20f8(%rsp)
movq $0x0, 0x20f0(%rsp)
movb $0x1, 0xeb(%rsp)
movb $0x0, 0xea(%rsp)
cmpq $0x0, 0x2198(%rsp)
jne 0xb5468
movq 0xfeba1(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0xa8c25(%rip), %rsi     # 0x15e066
leaq 0xbf80a(%rip), %rdx     # 0x174c52
leaq 0xbf2ef(%rip), %rcx     # 0x17473e
leaq 0xbf062(%rip), %r8      # 0x1744b8
movl $0x30e, %r9d            # imm = 0x30E
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0xb546a
movq 0x2198(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x38(%rax), %rdi
movq 0x2190(%rsp), %r9
leaq 0xa8d0d(%rip), %rsi     # 0x15e196
leaq 0xbf2c9(%rip), %rdx     # 0x174759
leaq 0xeb(%rsp), %rcx
xorl %eax, %eax
movl %eax, %r8d
callq 0x4a140
cmpl $0x2, %eax
jne 0xb54b7
movl $0xffffffff, 0x21b4(%rsp) # imm = 0xFFFFFFFF
jmp 0xb6039
movq 0x2198(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x38(%rax), %rdi
movq 0x2190(%rsp), %r9
leaq 0xa8cc0(%rip), %rsi     # 0x15e196
leaq 0xbf286(%rip), %rdx     # 0x174763
leaq 0x2160(%rsp), %rcx
xorl %eax, %eax
movl %eax, %r8d
callq 0x49af0
cmpl $0x2, %eax
jne 0xb5504
movl $0xffffffff, 0x21b4(%rsp) # imm = 0xFFFFFFFF
jmp 0xb6039
xorps %xmm0, %xmm0
movsd %xmm0, 0x2168(%rsp)
movq 0x2198(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x38(%rax), %rdi
movq 0x2190(%rsp), %r9
leaq 0xa8c67(%rip), %rsi     # 0x15e196
leaq 0xbf23d(%rip), %rdx     # 0x174773
leaq 0x2168(%rsp), %rcx
xorl %eax, %eax
movl %eax, %r8d
callq 0x49af0
cmpl $0x2, %eax
jne 0xb555d
movl $0xffffffff, 0x21b4(%rsp) # imm = 0xFFFFFFFF
jmp 0xb6039
movb $0x0, 0xea(%rsp)
movq 0x2198(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x38(%rax), %rdi
movq 0x2190(%rsp), %r9
leaq 0xa8c12(%rip), %rsi     # 0x15e196
leaq 0xbf1f5(%rip), %rdx     # 0x174780
leaq 0xea(%rsp), %rcx
xorl %eax, %eax
movl %eax, %r8d
callq 0x4a140
cmpl $0x2, %eax
jne 0xb55b2
movl $0xffffffff, 0x21b4(%rsp) # imm = 0xFFFFFFFF
jmp 0xb6039
callq 0x18f00
movq %rax, 0x20f8(%rsp)
movq 0x2198(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x38(%rax), %rdi
movq 0x20f8(%rsp), %rcx
movq 0x2190(%rsp), %r9
leaq 0xa8bb0(%rip), %rsi     # 0x15e196
leaq 0xbf1a3(%rip), %rdx     # 0x174790
xorl %eax, %eax
movl %eax, %r8d
callq 0x494c0
cmpl $0x2, %eax
jne 0xb5619
movq 0x20f8(%rsp), %rdi
callq 0x1afc0
movl $0xffffffff, 0x21b4(%rsp) # imm = 0xFFFFFFFF
jmp 0xb6039
callq 0x18f00
movq %rax, 0x2108(%rsp)
movq 0x2198(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x38(%rax), %rdi
movq 0x2108(%rsp), %rcx
movq 0x2190(%rsp), %r9
leaq 0xa8b49(%rip), %rsi     # 0x15e196
leaq 0xbf141(%rip), %rdx     # 0x174795
xorl %eax, %eax
movl %eax, %r8d
callq 0x494c0
movl %eax, 0xec(%rsp)
movl 0xec(%rsp), %eax
movl %eax, 0xcc(%rsp)
subl $0x1, %eax
je 0xb5688
jmp 0xb567a
movl 0xcc(%rsp), %eax
subl $0x2, %eax
je 0xb569e
jmp 0xb56c8
movq 0x2108(%rsp), %rdi
leaq 0xbf10e(%rip), %rsi     # 0x1747a5
callq 0x18fb0
jmp 0xb56ca
movq 0x20f8(%rsp), %rdi
callq 0x1afc0
movq 0x2108(%rsp), %rdi
callq 0x1afc0
movl $0xffffffff, 0x21b4(%rsp) # imm = 0xFFFFFFFF
jmp 0xb6039
jmp 0xb56ca
callq 0x18f00
movq %rax, 0x2100(%rsp)
movq 0x2198(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x38(%rax), %rdi
movq 0x2100(%rsp), %rcx
movq 0x2190(%rsp), %r9
leaq 0xa8a98(%rip), %rsi     # 0x15e196
leaq 0xbf0a3(%rip), %rdx     # 0x1747a8
xorl %eax, %eax
movl %eax, %r8d
callq 0x494c0
movl %eax, 0xec(%rsp)
movl 0xec(%rsp), %eax
movl %eax, 0xc8(%rsp)
subl $0x1, %eax
je 0xb5739
jmp 0xb572b
movl 0xc8(%rsp), %eax
subl $0x2, %eax
je 0xb574f
jmp 0xb5786
movq 0x2100(%rsp), %rdi
leaq 0xbf071(%rip), %rsi     # 0x1747b9
callq 0x18fb0
jmp 0xb5788
movq 0x20f8(%rsp), %rdi
callq 0x1afc0
movq 0x2108(%rsp), %rdi
callq 0x1afc0
movq 0x2100(%rsp), %rdi
callq 0x1afc0
movl $0xffffffff, 0x21b4(%rsp) # imm = 0xFFFFFFFF
jmp 0xb6039
jmp 0xb5788
leaq 0xb4735(%rip), %rdi     # 0x169ec4
callq 0x18f70
movq %rax, 0x20f0(%rsp)
movq 0x2198(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x38(%rax), %rdi
movq 0x20f0(%rsp), %rcx
movq 0x2190(%rsp), %r9
leaq 0xa89d3(%rip), %rsi     # 0x15e196
leaq 0xbeff2(%rip), %rdx     # 0x1747bc
xorl %eax, %eax
movl %eax, %r8d
callq 0x494c0
cmpl $0x2, %eax
jne 0xb581d
movq 0x20f0(%rsp), %rdi
callq 0x1afc0
movq 0x20f8(%rsp), %rdi
callq 0x1afc0
movq 0x2108(%rsp), %rdi
callq 0x1afc0
movq 0x2100(%rsp), %rdi
callq 0x1afc0
movl $0xffffffff, 0x21b4(%rsp) # imm = 0xFFFFFFFF
jmp 0xb6039
movq 0x2198(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x58(%rax), %rax
movq %rax, 0x88(%rsp)
movq 0x20f0(%rsp), %rdi
callq 0x19940
movq 0x88(%rsp), %rdi
movq %rax, %rsi
movsd 0x2160(%rsp), %xmm0
xorl %ecx, %ecx
movl %ecx, %edx
callq 0x3edf0
movabsq $0x3fb999999999999a, %rax # imm = 0x3FB999999999999A
movq %rax, 0x2140(%rsp)
movq %rax, 0x2138(%rsp)
movq %rax, 0x2130(%rsp)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x2148(%rsp)
movabsq $0x3fee147ae147ae14, %rcx # imm = 0x3FEE147AE147AE14
movq %rcx, 0x2120(%rsp)
movq %rcx, 0x2118(%rsp)
movq %rcx, 0x2110(%rsp)
movq %rax, 0x2128(%rsp)
leaq 0x21a0(%rsp), %rdi
callq 0x93bd0
movq %rax, 0x2158(%rsp)
cvtsi2sdq 0x2158(%rsp), %xmm0
callq 0xb290
callq 0xb0d0
movaps %xmm0, %xmm1
movsd 0xa8f17(%rip), %xmm0    # 0x15e808
subsd %xmm0, %xmm1
movsd 0xb1f13(%rip), %xmm0    # 0x167810
movsd %xmm0, 0x90(%rsp)
callq 0xbac0
movsd 0x90(%rsp), %xmm1
movsd %xmm0, 0x2188(%rsp)
movsd 0x2188(%rsp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x2180(%rsp)
movq 0x21a0(%rsp), %xmm0
movaps 0xa8b3d(%rip), %xmm1    # 0x15e480
movaps %xmm1, 0xa0(%rsp)
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0xa8b39(%rip), %xmm1    # 0x15e490
movaps %xmm1, 0xb0(%rsp)
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0x2180(%rsp), %xmm1
movsd %xmm1, 0x98(%rsp)
divsd %xmm1, %xmm0
callq 0xba80
movsd 0x98(%rsp), %xmm3
movaps 0xa0(%rsp), %xmm2
movaps 0xb0(%rsp), %xmm1
mulsd %xmm3, %xmm0
movsd %xmm0, 0x2170(%rsp)
movq 0x21a0(%rsp), %xmm0
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
divsd 0x2188(%rsp), %xmm0
callq 0xba80
mulsd 0x2188(%rsp), %xmm0
movsd %xmm0, 0x2178(%rsp)
cvttsd2si 0x2178(%rsp), %rax
movq %rax, 0x2150(%rsp)
movq 0x2150(%rsp), %rax
cmpq 0x21a8(%rsp), %rax
ja 0xb5c18
movq 0x2150(%rsp), %rdx
movq 0x21a0(%rsp), %rdi
movq 0x21a8(%rsp), %rsi
callq 0xb6290
movq 0x2198(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x28(%rax), %xmm2
movaps 0xa8a38(%rip), %xmm1    # 0x15e480
punpckldq %xmm1, %xmm2    # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
movapd 0xa8a3c(%rip), %xmm1    # 0x15e490
subpd %xmm1, %xmm2
movaps %xmm2, %xmm1
unpckhpd %xmm2, %xmm2            # xmm2 = xmm2[1,1]
addsd %xmm1, %xmm2
movq 0x2198(%rsp), %rax
movq 0x8(%rax), %rax
movsd 0x20(%rax), %xmm1
addsd %xmm1, %xmm1
subsd %xmm1, %xmm2
movq 0x2198(%rsp), %rax
movq 0x8(%rax), %rax
movsd 0x20(%rax), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0xe0(%rsp)
movq 0x2150(%rsp), %rax
cvttsd2si 0x2168(%rsp), %rcx
addq %rcx, %rax
movq %rax, 0xd8(%rsp)
cmpq $0x0, 0xd8(%rsp)
jg 0xb5ae4
testb $0x1, 0xea(%rsp)
je 0xb5ae4
movq 0xd8(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0xd8(%rsp)
movq 0x2150(%rsp), %rax
cmpq 0x21a0(%rsp), %rax
jae 0xb5afb
jmp 0xb5bef
movq 0x2198(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x58(%rax), %rdi
movsd 0xe0(%rsp), %xmm0
movq 0x2198(%rsp), %rax
movq 0x8(%rax), %rax
movsd 0xb2fe8(%rip), %xmm1    # 0x168b10
addsd 0x18(%rax), %xmm1
leaq 0x2130(%rsp), %rax
movsd 0xb1cd3(%rip), %xmm2    # 0x167810
movsd 0xa8cc3(%rip), %xmm3    # 0x15e808
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
callq 0x3f3f0
leaq 0xf0(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0xd8(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x20f8(%rsp), %rdi
callq 0x19940
movq 0x78(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq %rax, %rdx
movl $0x2000, %ecx           # imm = 0x2000
callq 0x3a1a0
movq 0x2198(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x58(%rax), %rdi
movsd 0xe0(%rsp), %xmm0
movq 0x2198(%rsp), %rax
movq 0x8(%rax), %rax
movsd 0xb2743(%rip), %xmm1    # 0x168320
addsd 0x18(%rax), %xmm1
leaq 0xf0(%rsp), %rsi
callq 0x3e960
movsd 0x2188(%rsp), %xmm1
cvtsi2sdq 0x2150(%rsp), %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movq %rax, 0x2150(%rsp)
jmp 0xb59fd
movsd 0x2180(%rsp), %xmm0
movsd 0xa8bdf(%rip), %xmm1    # 0x15e808
ucomisd %xmm1, %xmm0
jb 0xb5e37
cvttsd2si 0x2170(%rsp), %rax
movq %rax, 0x2150(%rsp)
movq 0x2150(%rsp), %rax
cmpq 0x21a8(%rsp), %rax
ja 0xb5e35
movq 0x2150(%rsp), %rax
cmpq 0x21a0(%rsp), %rax
jae 0xb5c72
jmp 0xb5e0c
movq 0x2150(%rsp), %rdx
movq 0x21a0(%rsp), %rdi
movq 0x21a8(%rsp), %rsi
callq 0xb6290
movq 0x2198(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x28(%rax), %xmm2
movaps 0xa87d9(%rip), %xmm1    # 0x15e480
punpckldq %xmm1, %xmm2    # xmm2 = xmm2[0],xmm1[0],xmm2[1],xmm1[1]
movapd 0xa87dd(%rip), %xmm1    # 0x15e490
subpd %xmm1, %xmm2
movaps %xmm2, %xmm1
unpckhpd %xmm2, %xmm2            # xmm2 = xmm2[1,1]
addsd %xmm1, %xmm2
movq 0x2198(%rsp), %rax
movq 0x8(%rax), %rax
movsd 0x20(%rax), %xmm1
addsd %xmm1, %xmm1
subsd %xmm1, %xmm2
movq 0x2198(%rsp), %rax
movq 0x8(%rax), %rax
movsd 0x20(%rax), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0xd0(%rsp)
testb $0x1, 0xeb(%rsp)
je 0xb5d9b
movq 0x2198(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x58(%rax), %rdi
movsd 0xd0(%rsp), %xmm0
movsd 0x18(%rax), %xmm1
movsd 0xb2df7(%rip), %xmm2    # 0x168b28
addsd %xmm2, %xmm1
movq 0x30(%rax), %rax
addq $-0x37, %rax
movq %rax, %xmm2
movaps 0xa8737(%rip), %xmm3    # 0x15e480
punpckldq %xmm3, %xmm2    # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
movapd 0xa873b(%rip), %xmm3    # 0x15e490
subpd %xmm3, %xmm2
movaps %xmm2, %xmm3
unpckhpd %xmm2, %xmm2            # xmm2 = xmm2[1,1]
addsd %xmm3, %xmm2
leaq 0x2110(%rsp), %rax
movsd 0xa8a94(%rip), %xmm3    # 0x15e808
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
callq 0x3f3f0
movq 0x2198(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x58(%rax), %rdi
movsd 0xd0(%rsp), %xmm0
movq 0x2198(%rsp), %rax
movq 0x8(%rax), %rax
movsd 0xbe6c8(%rip), %xmm1    # 0x174490
addsd 0x18(%rax), %xmm1
leaq 0x2130(%rsp), %rax
movsd 0xb2553(%rip), %xmm2    # 0x168330
movsd 0xa8a23(%rip), %xmm3    # 0x15e808
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
callq 0x3f3f0
movsd 0x2180(%rsp), %xmm1
cvtsi2sdq 0x2150(%rsp), %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movq %rax, 0x2150(%rsp)
jmp 0xb5c45
jmp 0xb5e37
movq 0x2198(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x58(%rax), %rdi
movsd 0x18(%rax), %xmm1
movsd 0x20(%rax), %xmm0
movsd 0xb2ccf(%rip), %xmm2    # 0x168b28
addsd %xmm2, %xmm1
movq 0x28(%rax), %xmm2
movaps 0xa8617(%rip), %xmm3    # 0x15e480
movaps %xmm3, 0x40(%rsp)
punpckldq %xmm3, %xmm2    # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
movapd 0xa8616(%rip), %xmm3    # 0x15e490
movaps %xmm3, 0x50(%rsp)
subpd %xmm3, %xmm2
movaps %xmm2, %xmm3
unpckhpd %xmm2, %xmm2            # xmm2 = xmm2[1,1]
addsd %xmm3, %xmm2
movaps %xmm0, %xmm3
addsd %xmm3, %xmm3
subsd %xmm3, %xmm2
movups 0x2130(%rsp), %xmm3
movups 0x2140(%rsp), %xmm4
movq %rsp, %rax
movups %xmm4, 0x10(%rax)
movups %xmm3, (%rax)
movsd 0xbe5c5(%rip), %xmm3    # 0x174480
callq 0x3f2f0
movq 0x2198(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x58(%rax), %rcx
movq %rcx, 0x28(%rsp)
movsd 0x18(%rax), %xmm0
movsd 0x20(%rax), %xmm1
movsd 0xbe5a1(%rip), %xmm2    # 0x174488
addsd %xmm2, %xmm1
movsd %xmm1, 0x30(%rsp)
movsd 0xbe57f(%rip), %xmm1    # 0x174478
addsd %xmm1, %xmm0
movsd 0x2160(%rsp), %xmm1
movsd 0xb190a(%rip), %xmm2    # 0x167818
mulsd %xmm2, %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, 0x38(%rsp)
movq 0x2108(%rsp), %rdi
callq 0x19940
movq 0x28(%rsp), %rdi
movsd 0x30(%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
movq %rax, %rsi
callq 0x3ea20
movaps 0x40(%rsp), %xmm2
movaps 0x50(%rsp), %xmm1
movq 0x2198(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x58(%rax), %rcx
movq %rcx, 0x60(%rsp)
movq 0x28(%rax), %xmm0
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movq 0x2198(%rsp), %rax
movq 0x8(%rax), %rax
subsd 0x20(%rax), %xmm0
movsd 0xb187e(%rip), %xmm1    # 0x167810
addsd %xmm1, %xmm0
movsd %xmm0, 0x68(%rsp)
movq 0x2198(%rsp), %rax
movq 0x8(%rax), %rax
movsd 0xbe4c8(%rip), %xmm0    # 0x174478
addsd 0x18(%rax), %xmm0
movsd 0x2160(%rsp), %xmm1
movsd 0xb2362(%rip), %xmm2    # 0x168328
divsd %xmm2, %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, 0x70(%rsp)
movq 0x2100(%rsp), %rdi
callq 0x19940
movq 0x60(%rsp), %rdi
movsd 0x68(%rsp), %xmm0
movsd 0x70(%rsp), %xmm1
movq %rax, %rsi
callq 0x3e7e0
movq 0x20f8(%rsp), %rdi
callq 0x1afc0
movq 0x2108(%rsp), %rdi
callq 0x1afc0
movq 0x2100(%rsp), %rdi
callq 0x1afc0
movq 0x20f0(%rsp), %rdi
callq 0x1afc0
movl $0x0, 0x21b4(%rsp)
movl 0x21b4(%rsp), %eax
addq $0x21b8, %rsp           # imm = 0x21B8
retq
nopl (%rax,%rax)