// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/annotationsketch/gt_sketch_page.c
// Function: gt_sketch_page_runner
static int gt_sketch_page_runner(GT_UNUSED int argc,
                                 const char **argv,
                                 int parsed_args,
                                 void *tool_arguments,
                                 GtError *err)
{
  SketchPageArguments *arguments = tool_arguments;
  int had_err = 0;
  GtFeatureIndex *features = NULL;
  GtRange qry_range, sequence_region_range;
  GtStyle *sty = NULL;
  GtStr *prog, *gt_style_file;
  GtDiagram *d = NULL;
  GtLayout *l = NULL;
  GtBioseq *bioseq = NULL;
  GtCanvas *canvas = NULL;
  char *seqid = NULL;
  const char *outfile = NULL;
  GtUword start, height, num_pages = 0;
  double offsetpos, usable_height;
  cairo_surface_t *surf = NULL;
  cairo_t *cr = NULL;
  bool has_seqid;
  GtTextWidthCalculator *twc;
  gt_error_check(err);

  features = gt_feature_index_memory_new();

  if (cairo_version() < CAIRO_VERSION_ENCODE(1, 8, 6))
    gt_warning("Your cairo library (version %s) is older than version 1.8.6! "
               "These versions contain a bug which may result in "
               "corrupted PDF output!", cairo_version_string());

  /* get style */
  sty = gt_style_new(err);
  if (gt_str_length(arguments->stylefile) == 0)
  {
    prog = gt_str_new();
    gt_str_append_cstr_nt(prog, argv[0],
                          gt_cstr_length_up_to_char(argv[0], ' '));
    gt_style_file = gt_get_gtdata_path(gt_str_get(prog), err);
    gt_str_delete(prog);
    gt_str_append_cstr(gt_style_file, "/sketch/default.style");
  }
  else
  {
    gt_style_file = gt_str_ref(arguments->stylefile);
  }
  had_err = gt_style_load_file(sty, gt_str_get(gt_style_file), err);
  if (!had_err) {
    had_err = gt_feature_index_has_seqid(features, &has_seqid,
                                         gt_str_get(arguments->seqid), err);
  }

  outfile = argv[parsed_args];
  if (!had_err)
  {
    /* get features */
    had_err = gt_feature_index_add_gff3file(features, argv[parsed_args+1], err);
     if (!had_err && gt_str_length(arguments->seqid) == 0) {
      seqid = gt_feature_index_get_first_seqid(features, err);
      if (seqid == NULL)
      {
        gt_error_set(err, "GFF input file must contain a sequence region!");
        had_err = -1;
      }
    }
    else if (!had_err && !has_seqid)
    {
      gt_error_set(err, "sequence region '%s' does not exist in GFF input file",
                   gt_str_get(arguments->seqid));
      had_err = -1;
    }
    else if (!had_err)
      seqid = gt_str_get(arguments->seqid);
  }

  /* set text */
  if (gt_str_length(arguments->text) == 0)
  {
    gt_str_delete(arguments->text);
    arguments->text = gt_str_new_cstr(argv[parsed_args+1]);
  }

  if (!had_err)
  {
    /* set display range */
    had_err = gt_feature_index_get_range_for_seqid(features,
                                                   &sequence_region_range,
                                                   seqid, err);
  }
  if (!had_err)
  {
    qry_range.start = (arguments->range.start == GT_UNDEF_UWORD ?
                         sequence_region_range.start :
                         arguments->range.start);
    qry_range.end   = (arguments->range.end == GT_UNDEF_UWORD ?
                         sequence_region_range.end :
                         arguments->range.end);

    /* set output format */
    if (strcmp(gt_str_get(arguments->format), "pdf") == 0)
    {
      surf = cairo_pdf_surface_create(outfile,
                                      mm_to_pt(arguments->pwidth),
                                      mm_to_pt(arguments->pheight));
    }
    else if (strcmp(gt_str_get(arguments->format), "ps") == 0)
    {
      surf =  cairo_ps_surface_create(outfile,
                                      mm_to_pt(arguments->pwidth),
                                      mm_to_pt(arguments->pheight));
    }
    gt_log_log("created page with %.2f:%.2f dimensions\n",
                                                  mm_to_pt(arguments->pwidth),
                                                  mm_to_pt(arguments->pheight));

    offsetpos = TEXT_SPACER + arguments->theight + TEXT_SPACER;
    usable_height = mm_to_pt(arguments->pheight)
                              - arguments->theight
                              - arguments->theight
                              - 4*TEXT_SPACER;

    if (gt_str_length(arguments->seqfile) > 0) {
      bioseq = gt_bioseq_new(gt_str_get(arguments->seqfile), err);
    }

    cr = cairo_create(surf);
    cairo_set_font_size(cr, 8);
    twc = gt_text_width_calculator_cairo_new(cr, sty, err);
    for (start = qry_range.start; start <= qry_range.end;
         start += arguments->width)
    {
      GtRange single_range;
      GtCustomTrack *ct = NULL;
      const char *seq;
      single_range.start = start;
      single_range.end = start + arguments->width;

      if (had_err)
        break;

      d = gt_diagram_new(features, seqid, &single_range, sty, err);
      if (!d) {
        had_err = -1;
        break;
      }
      if (bioseq) {
        seq = gt_bioseq_get_sequence(bioseq, 0);
        ct = gt_custom_track_gc_content_new(seq,
                                      gt_bioseq_get_sequence_length(bioseq, 0),
                                      800, 70, 0.4, true);
        gt_diagram_add_custom_track(d, ct);
      }

      l = gt_layout_new_with_twc(d, mm_to_pt(arguments->width), sty, twc, err);
      had_err = gt_layout_get_height(l, &height, err);
      if (!had_err) {
        if (gt_double_smaller_double(usable_height - 10 - 2*TEXT_SPACER
              - arguments->theight, offsetpos + height))
        {
            draw_header(cr, gt_str_get(arguments->text), argv[parsed_args+1],
                        seqid, num_pages, mm_to_pt(arguments->pwidth),
                        mm_to_pt(arguments->pheight),
                        arguments->theight);
          cairo_show_page(cr);
          offsetpos = TEXT_SPACER + arguments->theight + TEXT_SPACER;
          num_pages++;
        }
        canvas = gt_canvas_cairo_context_new(sty,
                                             cr,
                                             offsetpos,
                                             mm_to_pt(arguments->pwidth),
                                             height,
                                             NULL,
                                             err);
        if (!canvas)
          had_err = -1;
        offsetpos += height;
        if (!had_err)
          had_err = gt_layout_sketch(l, canvas, err);
      }
      gt_canvas_delete(canvas);
      gt_layout_delete(l);
      gt_diagram_delete(d);
      if (ct)
        gt_custom_track_delete(ct);
    }
    draw_header(cr, gt_str_get(arguments->text), argv[parsed_args+1], seqid,
                num_pages, mm_to_pt(arguments->pwidth),
                mm_to_pt(arguments->pheight),
                arguments->theight);
    cairo_show_page(cr);
    num_pages++;
    gt_log_log("finished, should be "GT_WU" pages\n", num_pages);
    gt_text_width_calculator_delete(twc);
    cairo_destroy(cr);
    cairo_surface_flush(surf);
    cairo_surface_finish(surf);
    cairo_surface_destroy(surf);
    cairo_debug_reset_static_data();
    if (bioseq)
      gt_bioseq_delete(bioseq);
    gt_style_delete(sty);
    gt_free(seqid);
    gt_str_delete(gt_style_file);
    gt_feature_index_delete(features);
  }
  return had_err;
}

// Assembly:
subq $0x1f8, %rsp            # imm = 0x1F8
movl %edi, 0x1f4(%rsp)
movq %rsi, 0x1e8(%rsp)
movl %edx, 0x1e4(%rsp)
movq %rcx, 0x1d8(%rsp)
movq %r8, 0x1d0(%rsp)
movq 0x1d8(%rsp), %rax
movq %rax, 0x1c8(%rsp)
movl $0x0, 0x1c4(%rsp)
movq $0x0, 0x1b8(%rsp)
movq $0x0, 0x190(%rsp)
movq $0x0, 0x178(%rsp)
movq $0x0, 0x170(%rsp)
movq $0x0, 0x168(%rsp)
movq $0x0, 0x160(%rsp)
movq $0x0, 0x158(%rsp)
movq $0x0, 0x150(%rsp)
movq $0x0, 0x138(%rsp)
movq $0x0, 0x120(%rsp)
movq $0x0, 0x118(%rsp)
cmpq $0x0, 0x1d0(%rsp)
je 0x327b52
movq 0x1d0(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x327b1a
jmp 0x327b52
movq 0x31447f(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x1ee4e8(%rip), %rsi    # 0x516013
leaq 0x1ee68d(%rip), %rdx    # 0x5161bf
leaq 0x270e3b(%rip), %rcx    # 0x598974
leaq 0x270bf8(%rip), %r8     # 0x598738
movl $0xf5, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x327b54
callq 0x16bc30
movq %rax, 0x1b8(%rsp)
callq 0x19c00
cmpl $0x2a36, %eax           # imm = 0x2A36
jge 0x327b83
callq 0x199c0
movq %rax, %rsi
leaq 0x270e0e(%rip), %rdi    # 0x59898a
movb $0x0, %al
callq 0x1267d0
movq 0x1d0(%rsp), %rdi
callq 0x32c620
movq %rax, 0x190(%rsp)
movq 0x1c8(%rsp), %rax
movq 0x40(%rax), %rdi
callq 0x11dfa0
cmpq $0x0, %rax
jne 0x327c58
callq 0x11d4a0
movq %rax, 0x188(%rsp)
movq 0x188(%rsp), %rax
movq %rax, 0xd8(%rsp)
movq 0x1e8(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xe0(%rsp)
movq 0x1e8(%rsp), %rax
movq (%rax), %rdi
movl $0x20, %esi
callq 0xa3030
movq 0xd8(%rsp), %rdi
movq 0xe0(%rsp), %rsi
movq %rax, %rdx
callq 0x11d830
movq 0x188(%rsp), %rdi
callq 0x11dee0
movq %rax, %rdi
movq 0x1d0(%rsp), %rsi
callq 0xe0950
movq %rax, 0x180(%rsp)
movq 0x188(%rsp), %rdi
callq 0x11f560
movq 0x180(%rsp), %rdi
leaq 0x270ceb(%rip), %rsi    # 0x59893c
callq 0x11d550
jmp 0x327c71
movq 0x1c8(%rsp), %rax
movq 0x40(%rax), %rdi
callq 0x11e360
movq %rax, 0x180(%rsp)
movq 0x190(%rsp), %rax
movq %rax, 0xd0(%rsp)
movq 0x180(%rsp), %rdi
callq 0x11dee0
movq 0xd0(%rsp), %rdi
movq %rax, %rsi
movq 0x1d0(%rsp), %rdx
callq 0x32cea0
movl %eax, 0x1c4(%rsp)
cmpl $0x0, 0x1c4(%rsp)
jne 0x327cff
movq 0x1b8(%rsp), %rax
movq %rax, 0xc8(%rsp)
movq 0x1c8(%rsp), %rax
movq 0x30(%rax), %rdi
callq 0x11dee0
movq 0xc8(%rsp), %rdi
movq %rax, %rdx
movq 0x1d0(%rsp), %rcx
leaq 0x117(%rsp), %rsi
callq 0x16a010
movl %eax, 0x1c4(%rsp)
movq 0x1e8(%rsp), %rax
movslq 0x1e4(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x150(%rsp)
cmpl $0x0, 0x1c4(%rsp)
jne 0x327e51
movq 0x1b8(%rsp), %rdi
movq 0x1e8(%rsp), %rax
movl 0x1e4(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rsi
movq 0x1d0(%rsp), %rdx
callq 0x1697b0
movl %eax, 0x1c4(%rsp)
cmpl $0x0, 0x1c4(%rsp)
jne 0x327dcd
movq 0x1c8(%rsp), %rax
movq 0x30(%rax), %rdi
callq 0x11dfa0
cmpq $0x0, %rax
jne 0x327dcd
movq 0x1b8(%rsp), %rdi
movq 0x1d0(%rsp), %rsi
callq 0x169c20
movq %rax, 0x158(%rsp)
cmpq $0x0, 0x158(%rsp)
jne 0x327dc8
movq 0x1d0(%rsp), %rdi
leaq 0x270886(%rip), %rsi    # 0x59863c
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x1c4(%rsp) # imm = 0xFFFFFFFF
jmp 0x327e4f
cmpl $0x0, 0x1c4(%rsp)
jne 0x327e28
testb $0x1, 0x117(%rsp)
jne 0x327e28
movq 0x1d0(%rsp), %rax
movq %rax, 0xc0(%rsp)
movq 0x1c8(%rsp), %rax
movq 0x30(%rax), %rdi
callq 0x11dee0
movq 0xc0(%rsp), %rdi
movq %rax, %rdx
leaq 0x270857(%rip), %rsi    # 0x59866b
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x1c4(%rsp) # imm = 0xFFFFFFFF
jmp 0x327e4d
cmpl $0x0, 0x1c4(%rsp)
jne 0x327e4b
movq 0x1c8(%rsp), %rax
movq 0x30(%rax), %rdi
callq 0x11dee0
movq %rax, 0x158(%rsp)
jmp 0x327e4d
jmp 0x327e4f
jmp 0x327e51
movq 0x1c8(%rsp), %rax
movq 0x48(%rax), %rdi
callq 0x11dfa0
cmpq $0x0, %rax
jne 0x327ea6
movq 0x1c8(%rsp), %rax
movq 0x48(%rax), %rdi
callq 0x11f560
movq 0x1e8(%rsp), %rax
movl 0x1e4(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x11d510
movq %rax, %rcx
movq 0x1c8(%rsp), %rax
movq %rcx, 0x48(%rax)
cmpl $0x0, 0x1c4(%rsp)
jne 0x327edc
movq 0x1b8(%rsp), %rdi
movq 0x158(%rsp), %rdx
movq 0x1d0(%rsp), %rcx
leaq 0x198(%rsp), %rsi
callq 0x169e70
movl %eax, 0x1c4(%rsp)
cmpl $0x0, 0x1c4(%rsp)
jne 0x32882d
movq 0x1c8(%rsp), %rax
cmpq $-0x1, 0x20(%rax)
jne 0x327f0b
movq 0x198(%rsp), %rax
movq %rax, 0xb8(%rsp)
jmp 0x327f1f
movq 0x1c8(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0xb8(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x1a8(%rsp)
movq 0x1c8(%rsp), %rax
cmpq $-0x1, 0x28(%rax)
jne 0x327f50
movq 0x1a0(%rsp), %rax
movq %rax, 0xb0(%rsp)
jmp 0x327f64
movq 0x1c8(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, 0xb0(%rsp)
movq 0xb0(%rsp), %rax
movq %rax, 0x1b0(%rsp)
movq 0x1c8(%rsp), %rax
movq 0x38(%rax), %rdi
callq 0x11dee0
movq %rax, %rdi
leaq 0x28cbf3(%rip), %rsi    # 0x5b4b82
callq 0x19980
cmpl $0x0, %eax
jne 0x327ffc
movq 0x150(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0x1c8(%rsp), %rax
movsd 0x8(%rax), %xmm0
callq 0x328840
movsd %xmm0, 0xa8(%rsp)
movq 0x1c8(%rsp), %rax
movsd 0x10(%rax), %xmm0
callq 0x328840
movq 0xa0(%rsp), %rdi
movaps %xmm0, %xmm1
movsd 0xa8(%rsp), %xmm0
callq 0x19b80
movq %rax, 0x120(%rsp)
jmp 0x328081
movq 0x1c8(%rsp), %rax
movq 0x38(%rax), %rdi
callq 0x11dee0
movq %rax, %rdi
leaq 0x28cb85(%rip), %rsi    # 0x5b4b9c
callq 0x19980
cmpl $0x0, %eax
jne 0x32807f
movq 0x150(%rsp), %rax
movq %rax, 0x90(%rsp)
movq 0x1c8(%rsp), %rax
movsd 0x8(%rax), %xmm0
callq 0x328840
movsd %xmm0, 0x98(%rsp)
movq 0x1c8(%rsp), %rax
movsd 0x10(%rax), %xmm0
callq 0x328840
movq 0x90(%rsp), %rdi
movaps %xmm0, %xmm1
movsd 0x98(%rsp), %xmm0
callq 0x19160
movq %rax, 0x120(%rsp)
jmp 0x328081
movq 0x1c8(%rsp), %rax
movsd 0x8(%rax), %xmm0
callq 0x328840
movsd %xmm0, 0x88(%rsp)
movq 0x1c8(%rsp), %rax
movsd 0x10(%rax), %xmm0
callq 0x328840
movaps %xmm0, %xmm1
movsd 0x88(%rsp), %xmm0
leaq 0x27094d(%rip), %rdi    # 0x598a0e
movb $0x2, %al
callq 0xe7740
movq 0x1c8(%rsp), %rax
movsd 0x226188(%rip), %xmm0   # 0x54e260
addsd 0x18(%rax), %xmm0
movsd 0x22617b(%rip), %xmm1   # 0x54e260
addsd %xmm1, %xmm0
movsd %xmm0, 0x130(%rsp)
movq 0x1c8(%rsp), %rax
movsd 0x10(%rax), %xmm0
callq 0x328840
movq 0x1c8(%rsp), %rax
subsd 0x18(%rax), %xmm0
movq 0x1c8(%rsp), %rax
subsd 0x18(%rax), %xmm0
movsd 0x2705ea(%rip), %xmm1   # 0x598710
subsd %xmm1, %xmm0
movsd %xmm0, 0x128(%rsp)
movq 0x1c8(%rsp), %rax
movq 0x50(%rax), %rdi
callq 0x11dfa0
cmpq $0x0, %rax
jbe 0x328173
movq 0x1c8(%rsp), %rax
movq 0x50(%rax), %rdi
callq 0x11dee0
movq %rax, %rdi
movq 0x1d0(%rsp), %rsi
callq 0x84600
movq %rax, 0x168(%rsp)
movq 0x120(%rsp), %rdi
callq 0x19210
movq %rax, 0x118(%rsp)
movq 0x118(%rsp), %rdi
movsd 0x2260c8(%rip), %xmm0   # 0x54e260
callq 0x199e0
movq 0x118(%rsp), %rdi
movq 0x190(%rsp), %rsi
movq 0x1d0(%rsp), %rdx
callq 0x331460
movq %rax, 0x108(%rsp)
movq 0x1a8(%rsp), %rax
movq %rax, 0x148(%rsp)
movq 0x148(%rsp), %rax
cmpq 0x1b0(%rsp), %rax
ja 0x3286a1
movq $0x0, 0xf0(%rsp)
movq 0x148(%rsp), %rax
movq %rax, 0xf8(%rsp)
movq 0x148(%rsp), %rax
movq 0x1c8(%rsp), %rcx
addq (%rcx), %rax
movq %rax, 0x100(%rsp)
cmpl $0x0, 0x1c4(%rsp)
je 0x32822e
jmp 0x3286a1
movq 0x1b8(%rsp), %rdi
movq 0x158(%rsp), %rsi
movq 0x190(%rsp), %rcx
movq 0x1d0(%rsp), %r8
leaq 0xf8(%rsp), %rdx
callq 0x31ffb0
movq %rax, 0x178(%rsp)
cmpq $0x0, 0x178(%rsp)
jne 0x32827e
movl $0xffffffff, 0x1c4(%rsp) # imm = 0xFFFFFFFF
jmp 0x3286a1
cmpq $0x0, 0x168(%rsp)
je 0x328308
movq 0x168(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x84cc0
movq %rax, 0xe8(%rsp)
movq 0xe8(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x168(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x84e30
movq 0x80(%rsp), %rdi
movq %rax, %rsi
movl $0x320, %edx            # imm = 0x320
movl $0x46, %ecx
movsd 0x270438(%rip), %xmm0   # 0x598718
movl $0x1, %r8d
callq 0x4f0940
movq %rax, 0xf0(%rsp)
movq 0x178(%rsp), %rdi
movq 0xf0(%rsp), %rsi
callq 0x320870
movq 0x178(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x1c8(%rsp), %rax
movq (%rax), %xmm0
movaps 0x1f0608(%rip), %xmm1   # 0x518930
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x1f060c(%rip), %xmm1   # 0x518940
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
callq 0x328840
movq 0x78(%rsp), %rdi
cvttsd2si %xmm0, %rax
movl %eax, %esi
movq 0x190(%rsp), %rdx
movq 0x108(%rsp), %rcx
movq 0x1d0(%rsp), %r8
callq 0x3293f0
movq %rax, 0x170(%rsp)
movq 0x170(%rsp), %rdi
movq 0x1d0(%rsp), %rdx
leaq 0x140(%rsp), %rsi
callq 0x329f60
movl %eax, 0x1c4(%rsp)
cmpl $0x0, 0x1c4(%rsp)
jne 0x328640
movsd 0x128(%rsp), %xmm0
movsd 0x26c9d4(%rip), %xmm1   # 0x594d90
addsd %xmm1, %xmm0
movsd 0x270358(%rip), %xmm1   # 0x598720
addsd %xmm1, %xmm0
movq 0x1c8(%rsp), %rax
movsd 0x18(%rax), %xmm1
subsd %xmm1, %xmm0
movsd 0x130(%rsp), %xmm1
movaps 0x1f0543(%rip), %xmm3   # 0x518930
movq 0x140(%rsp), %xmm2
punpckldq %xmm3, %xmm2    # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
movapd 0x1f053e(%rip), %xmm3   # 0x518940
subpd %xmm3, %xmm2
movaps %xmm2, %xmm3
unpckhpd %xmm2, %xmm2            # xmm2 = xmm2[1,1]
addsd %xmm3, %xmm2
addsd %xmm2, %xmm1
callq 0xec2f0
testb $0x1, %al
jne 0x328423
jmp 0x328527
movq 0x118(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x1c8(%rsp), %rax
movq 0x48(%rax), %rdi
callq 0x11dee0
movq %rax, 0x50(%rsp)
movq 0x1e8(%rsp), %rax
movl 0x1e4(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x58(%rsp)
movq 0x158(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x138(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x1c8(%rsp), %rax
movsd 0x8(%rax), %xmm0
callq 0x328840
movsd %xmm0, 0x70(%rsp)
movq 0x1c8(%rsp), %rax
movsd 0x10(%rax), %xmm0
callq 0x328840
movq 0x48(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
movq 0x60(%rsp), %rcx
movq 0x68(%rsp), %r8
movaps %xmm0, %xmm1
movsd 0x70(%rsp), %xmm0
movq 0x1c8(%rsp), %rax
movsd 0x18(%rax), %xmm2
callq 0x328860
movq 0x118(%rsp), %rdi
callq 0x19570
movq 0x1c8(%rsp), %rax
movsd 0x225d67(%rip), %xmm0   # 0x54e260
addsd 0x18(%rax), %xmm0
movsd 0x225d5a(%rip), %xmm1   # 0x54e260
addsd %xmm1, %xmm0
movsd %xmm0, 0x130(%rsp)
movq 0x138(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x138(%rsp)
movq 0x190(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x118(%rsp), %rax
movq %rax, 0x38(%rsp)
movsd 0x130(%rsp), %xmm0
movsd %xmm0, 0x40(%rsp)
movq 0x1c8(%rsp), %rax
movsd 0x8(%rax), %xmm0
callq 0x328840
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
movaps %xmm0, %xmm1
movsd 0x40(%rsp), %xmm0
movsd 0x1f07f3(%rip), %xmm3   # 0x518d70
movaps %xmm1, %xmm2
subsd %xmm3, %xmm2
cvttsd2si %xmm2, %rax
cvttsd2si %xmm1, %rdx
movq %rdx, %rcx
sarq $0x3f, %rcx
andq %rcx, %rax
orq %rax, %rdx
movq 0x140(%rsp), %rcx
movq 0x1d0(%rsp), %r9
xorl %eax, %eax
movl %eax, %r8d
callq 0x4eec10
movq %rax, 0x160(%rsp)
cmpq $0x0, 0x160(%rsp)
jne 0x3285d3
movl $0xffffffff, 0x1c4(%rsp) # imm = 0xFFFFFFFF
movaps 0x1f0356(%rip), %xmm1   # 0x518930
movq 0x140(%rsp), %xmm0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x1f0351(%rip), %xmm1   # 0x518940
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
addsd 0x130(%rsp), %xmm0
movsd %xmm0, 0x130(%rsp)
cmpl $0x0, 0x1c4(%rsp)
jne 0x32863e
movq 0x170(%rsp), %rdi
movq 0x160(%rsp), %rsi
movq 0x1d0(%rsp), %rdx
callq 0x3297b0
movl %eax, 0x1c4(%rsp)
jmp 0x328640
movq 0x160(%rsp), %rdi
callq 0x31f730
movq 0x170(%rsp), %rdi
callq 0x329700
movq 0x178(%rsp), %rdi
callq 0x320bc0
cmpq $0x0, 0xf0(%rsp)
je 0x32867f
movq 0xf0(%rsp), %rdi
callq 0x4ef910
jmp 0x328681
movq 0x1c8(%rsp), %rax
movq (%rax), %rax
addq 0x148(%rsp), %rax
movq %rax, 0x148(%rsp)
jmp 0x3281d2
movq 0x118(%rsp), %rax
movq %rax, (%rsp)
movq 0x1c8(%rsp), %rax
movq 0x48(%rax), %rdi
callq 0x11dee0
movq %rax, 0x8(%rsp)
movq 0x1e8(%rsp), %rax
movl 0x1e4(%rsp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, 0x10(%rsp)
movq 0x158(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x138(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x1c8(%rsp), %rax
movsd 0x8(%rax), %xmm0
callq 0x328840
movsd %xmm0, 0x28(%rsp)
movq 0x1c8(%rsp), %rax
movsd 0x10(%rax), %xmm0
callq 0x328840
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq 0x18(%rsp), %rcx
movq 0x20(%rsp), %r8
movaps %xmm0, %xmm1
movsd 0x28(%rsp), %xmm0
movq 0x1c8(%rsp), %rax
movsd 0x18(%rax), %xmm2
callq 0x328860
movq 0x118(%rsp), %rdi
callq 0x19570
movq 0x138(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x138(%rsp)
movq 0x138(%rsp), %rsi
leaq 0x2702ae(%rip), %rdi    # 0x598a36
movb $0x0, %al
callq 0xe7740
movq 0x108(%rsp), %rdi
callq 0x330f60
movq 0x118(%rsp), %rdi
callq 0x199d0
movq 0x120(%rsp), %rdi
callq 0x19c90
movq 0x120(%rsp), %rdi
callq 0x19260
movq 0x120(%rsp), %rdi
callq 0x19870
callq 0x19e50
cmpq $0x0, 0x168(%rsp)
je 0x3287ed
movq 0x168(%rsp), %rdi
callq 0x84960
movq 0x190(%rsp), %rdi
callq 0x32f620
movq 0x158(%rsp), %rdi
leaq 0x26ff2f(%rip), %rsi    # 0x598738
movl $0x1a9, %edx            # imm = 0x1A9
callq 0xe88c0
movq 0x180(%rsp), %rdi
callq 0x11f560
movq 0x1b8(%rsp), %rdi
callq 0x169460
movl 0x1c4(%rsp), %eax
addq $0x1f8, %rsp            # imm = 0x1F8
retq
nopl (%rax)