// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/bed_parser.c
// Function: bed_rest
static int bed_rest(GtBEDParser *bed_parser, GtIO *bed_file, GtError *err)
{
  GtUword block_count = 0;
  GtGenomeNode *gn = NULL;
  GtRange range;
  GtStr *seqid;
  int had_err;
  gt_error_check(err);
  /* column 1.: chrom */
  seqid = get_seqid(bed_parser);
  had_err = skip_blanks(bed_file, err);
  /* column 2.: chromStart */
  if (!had_err) {
    word(bed_parser->word, bed_file);
    had_err = skip_blanks(bed_file, err);
  }
  /* column 3.: chromEnd */
  if (!had_err) {
    word(bed_parser->another_word, bed_file);
    had_err = parse_bed_range(&range, bed_parser->word,
                              bed_parser->another_word, bed_parser->offset,
                              bed_file, false, err);
  }
  if (!had_err) {
    /* add region */
    gt_region_node_builder_add_region(bed_parser->region_node_builder,
                                      gt_str_get(seqid), range);
    /* create feature */
    gn = gt_feature_node_new(seqid,
                             bed_parser->feature_type
                             ? bed_parser->feature_type
                             : BED_FEATURE_TYPE,
                             range.start, range.end, GT_STRAND_BOTH);
    gt_queue_add(bed_parser->feature_nodes, gn);
    if (bed_separator(bed_file))
      had_err = skip_blanks(bed_file, err);
  }
  /* optional column 4.: name */
  if (!had_err) {
    word(bed_parser->word, bed_file);
    if (gt_str_length(bed_parser->word)) {
      gt_feature_node_add_attribute((GtFeatureNode*) gn, GT_GFF_NAME,
                                    gt_str_get(bed_parser->word));
    }
    if (bed_separator(bed_file))
      had_err = skip_blanks(bed_file, err);
  }
  /* optional column 5.: score */
  if (!had_err) {
    word(bed_parser->word, bed_file);
    if (gt_str_length(bed_parser->word)) {
      bool score_is_defined;
      float score_value;
      had_err = gt_parse_score(&score_is_defined, &score_value,
                               gt_str_get(bed_parser->word),
                               gt_io_get_line_number(bed_file),
                               gt_io_get_filename(bed_file), err);
      if (!had_err && score_is_defined)
        gt_feature_node_set_score((GtFeatureNode*) gn, score_value);
    }
  }
  if (!had_err && bed_separator(bed_file))
    had_err = skip_blanks(bed_file, err);
  /* optional column 6.: strand */
  if (!had_err) {
    word(bed_parser->word, bed_file);
    if (gt_str_length(bed_parser->word)) {
      GtStrand strand;
      had_err = gt_parse_strand(&strand, gt_str_get(bed_parser->word),
                                gt_io_get_line_number(bed_file),
                                gt_io_get_filename(bed_file), err);
      if (!had_err)
        gt_feature_node_set_strand((GtFeatureNode*) gn, strand);
    }
  }
  if (!had_err && bed_separator(bed_file))
    had_err = skip_blanks(bed_file, err);
  /* optional column 7.: thickStart */
  if (!had_err) {
    word(bed_parser->word, bed_file);
    if (bed_separator(bed_file))
      had_err = skip_blanks(bed_file, err);
  }
  /* optional column 8.: thickEnd */
  if (!had_err) {
    word(bed_parser->another_word, bed_file);
    if (gt_str_length(bed_parser->another_word)) {
      gt_assert(gt_str_length(bed_parser->word));
      /* got a thickStart and a thickEnd -> construct corresponding feature */
      had_err = parse_bed_range(&range, bed_parser->word,
                                bed_parser->another_word, bed_parser->offset,
                                bed_file, true, err);
      if (!had_err && range.start <= range.end)
        construct_thick_feature(bed_parser, (GtFeatureNode*) gn, range);
    }
  }
  if (!had_err && bed_separator(bed_file))
    had_err = skip_blanks(bed_file, err);
  /* optional column 9.: itemRgb */
  if (!had_err) {
    word(bed_parser->word, bed_file);
    /* we do not use the RGB values */
    if (bed_separator(bed_file))
      had_err = skip_blanks(bed_file, err);
  }
  /* optional column 10.: blockCount */
  if (!had_err) {
    word(bed_parser->word, bed_file);
    if (gt_str_length(bed_parser->word)) {
      if (gt_parse_uword(&block_count, gt_str_get(bed_parser->word))) {
        gt_error_set(err,
                     "file \"%s\": line "GT_WU": could not parse blockCount",
                     gt_io_get_filename(bed_file),
                     gt_io_get_line_number(bed_file));
        had_err = -1;
      }
      else {
        /* reset to parse/process blockSizes and blockStarts properly */
        gt_str_reset(bed_parser->word);
        gt_str_reset(bed_parser->another_word);
      }
    }
  }
  if (!had_err && bed_separator(bed_file))
    had_err = skip_blanks(bed_file, err);
  /* optional column 11.: blockSizes */
  if (!had_err) {
    word(bed_parser->word, bed_file);
    if (bed_separator(bed_file))
      had_err = skip_blanks(bed_file, err);
  }
  /* optional column 12.: blockStarts */
  if (!had_err) {
    word(bed_parser->another_word, bed_file);
    if (bed_separator(bed_file))
      had_err = skip_blanks(bed_file, err);
  }
  /* process blocks if necessary */
  if (!had_err && block_count) {
    had_err = process_blocks(bed_parser, (GtFeatureNode*) gn, block_count,
                             bed_parser->word, bed_parser->another_word,
                             bed_file, err);
  }
  /* the end of the line should now be reached */
  if (!had_err)
    had_err = gt_io_expect(bed_file, GT_END_OF_LINE, err);
  return had_err;
}

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0xa0(%rsp)
movq %rsi, 0x98(%rsp)
movq %rdx, 0x90(%rsp)
movq $0x0, 0x88(%rsp)
movq $0x0, 0x80(%rsp)
cmpq $0x0, 0x90(%rsp)
je 0x13563d
movq 0x90(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x135605
jmp 0x13563d
movq 0x506994(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3e09fd(%rip), %rsi    # 0x516013
leaq 0x3e0ba2(%rip), %rdx    # 0x5161bf
leaq 0x4144e0(%rip), %rcx    # 0x549b04
leaq 0x414339(%rip), %r8     # 0x549964
movl $0x1b9, %r9d            # imm = 0x1B9
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x13563f
movq 0xa0(%rsp), %rdi
callq 0x136100
movq %rax, 0x68(%rsp)
movq 0x98(%rsp), %rdi
movq 0x90(%rsp), %rsi
callq 0x135ed0
movl %eax, 0x64(%rsp)
cmpl $0x0, 0x64(%rsp)
jne 0x1356a3
movq 0xa0(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x98(%rsp), %rsi
callq 0x1352b0
movq 0x98(%rsp), %rdi
movq 0x90(%rsp), %rsi
callq 0x135ed0
movl %eax, 0x64(%rsp)
cmpl $0x0, 0x64(%rsp)
jne 0x13570c
movq 0xa0(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x98(%rsp), %rsi
callq 0x1352b0
movq 0xa0(%rsp), %rax
movq 0x18(%rax), %rsi
movq 0xa0(%rsp), %rax
movq 0x20(%rax), %rdx
movq 0xa0(%rsp), %rax
movq 0x40(%rax), %rcx
movq 0x98(%rsp), %r8
movq 0x90(%rsp), %rax
leaq 0x70(%rsp), %rdi
xorl %r9d, %r9d
movq %rax, (%rsp)
callq 0x1361e0
movl %eax, 0x64(%rsp)
cmpl $0x0, 0x64(%rsp)
jne 0x1357f0
movq 0xa0(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x48(%rsp)
movq 0x68(%rsp), %rdi
callq 0x11dee0
movq 0x48(%rsp), %rdi
movq %rax, %rsi
movq 0x70(%rsp), %rdx
movq 0x78(%rsp), %rcx
callq 0x1ca960
movq 0x68(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0xa0(%rsp), %rax
cmpq $0x0, 0x28(%rax)
je 0x135774
movq 0xa0(%rsp), %rax
movq 0x28(%rax), %rax
movq %rax, 0x40(%rsp)
jmp 0x135782
leaq 0x3e186b(%rip), %rax    # 0x516fe6
movq %rax, 0x40(%rsp)
jmp 0x135782
movq 0x50(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x70(%rsp), %rdx
movq 0x78(%rsp), %rcx
movl $0x2, %r8d
callq 0x16c7e0
movq %rax, 0x80(%rsp)
movq 0xa0(%rsp), %rax
movq 0x8(%rax), %rdi
movq 0x80(%rsp), %rsi
callq 0xfd170
movq 0x98(%rsp), %rdi
callq 0x135e80
testb $0x1, %al
jne 0x1357d5
jmp 0x1357ee
movq 0x98(%rsp), %rdi
movq 0x90(%rsp), %rsi
callq 0x135ed0
movl %eax, 0x64(%rsp)
jmp 0x1357f0
cmpl $0x0, 0x64(%rsp)
jne 0x13588b
movq 0xa0(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x98(%rsp), %rsi
callq 0x1352b0
movq 0xa0(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x11dfa0
cmpq $0x0, %rax
je 0x13585d
movq 0x80(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0xa0(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x11dee0
movq 0x38(%rsp), %rdi
movq %rax, %rdx
leaq 0x43ee56(%rip), %rsi    # 0x5746ae
callq 0x16edb0
movq 0x98(%rsp), %rdi
callq 0x135e80
testb $0x1, %al
jne 0x135870
jmp 0x135889
movq 0x98(%rsp), %rdi
movq 0x90(%rsp), %rsi
callq 0x135ed0
movl %eax, 0x64(%rsp)
jmp 0x13588b
cmpl $0x0, 0x64(%rsp)
jne 0x135946
movq 0xa0(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x98(%rsp), %rsi
callq 0x1352b0
movq 0xa0(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x11dfa0
cmpq $0x0, %rax
je 0x135944
movq 0xa0(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x11dee0
movq %rax, 0x28(%rsp)
movq 0x98(%rsp), %rdi
callq 0xe73f0
movl %eax, 0x34(%rsp)
movq 0x98(%rsp), %rdi
callq 0xe7440
movq 0x28(%rsp), %rdx
movl 0x34(%rsp), %ecx
movq %rax, %r8
movq 0x90(%rsp), %r9
leaq 0x63(%rsp), %rdi
leaq 0x5c(%rsp), %rsi
callq 0xf8ea0
movl %eax, 0x64(%rsp)
cmpl $0x0, 0x64(%rsp)
jne 0x135942
testb $0x1, 0x63(%rsp)
je 0x135942
movq 0x80(%rsp), %rdi
movss 0x5c(%rsp), %xmm0
callq 0x16d590
jmp 0x135944
jmp 0x135946
cmpl $0x0, 0x64(%rsp)
jne 0x135979
movq 0x98(%rsp), %rdi
callq 0x135e80
testb $0x1, %al
jne 0x135960
jmp 0x135979
movq 0x98(%rsp), %rdi
movq 0x90(%rsp), %rsi
callq 0x135ed0
movl %eax, 0x64(%rsp)
cmpl $0x0, 0x64(%rsp)
jne 0x135a26
movq 0xa0(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x98(%rsp), %rsi
callq 0x1352b0
movq 0xa0(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x11dfa0
cmpq $0x0, %rax
je 0x135a24
movq 0xa0(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x11dee0
movq %rax, 0x18(%rsp)
movq 0x98(%rsp), %rdi
callq 0xe73f0
movl %eax, 0x24(%rsp)
movq 0x98(%rsp), %rdi
callq 0xe7440
movq 0x18(%rsp), %rsi
movl 0x24(%rsp), %edx
movq %rax, %rcx
movq 0x90(%rsp), %r8
leaq 0x58(%rsp), %rdi
callq 0xf8ff0
movl %eax, 0x64(%rsp)
cmpl $0x0, 0x64(%rsp)
jne 0x135a22
movq 0x80(%rsp), %rdi
movl 0x58(%rsp), %esi
callq 0x16e0f0
jmp 0x135a24
jmp 0x135a26
cmpl $0x0, 0x64(%rsp)
jne 0x135a59
movq 0x98(%rsp), %rdi
callq 0x135e80
testb $0x1, %al
jne 0x135a40
jmp 0x135a59
movq 0x98(%rsp), %rdi
movq 0x90(%rsp), %rsi
callq 0x135ed0
movl %eax, 0x64(%rsp)
cmpl $0x0, 0x64(%rsp)
jne 0x135aa7
movq 0xa0(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x98(%rsp), %rsi
callq 0x1352b0
movq 0x98(%rsp), %rdi
callq 0x135e80
testb $0x1, %al
jne 0x135a8c
jmp 0x135aa5
movq 0x98(%rsp), %rdi
movq 0x90(%rsp), %rsi
callq 0x135ed0
movl %eax, 0x64(%rsp)
jmp 0x135aa7
cmpl $0x0, 0x64(%rsp)
jne 0x135bbb
movq 0xa0(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x98(%rsp), %rsi
callq 0x1352b0
movq 0xa0(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x11dfa0
cmpq $0x0, %rax
je 0x135bb9
jmp 0x135ae8
movq 0xa0(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x11dfa0
cmpq $0x0, %rax
jne 0x135b37
movq 0x50649a(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3e0503(%rip), %rsi    # 0x516013
leaq 0x413ff6(%rip), %rdx    # 0x549b0d
leaq 0x413fe6(%rip), %rcx    # 0x549b04
leaq 0x413e3f(%rip), %r8     # 0x549964
movl $0x209, %r9d            # imm = 0x209
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x135b39
movq 0xa0(%rsp), %rax
movq 0x18(%rax), %rsi
movq 0xa0(%rsp), %rax
movq 0x20(%rax), %rdx
movq 0xa0(%rsp), %rax
movq 0x40(%rax), %rcx
movq 0x98(%rsp), %r8
movq 0x90(%rsp), %rax
leaq 0x70(%rsp), %rdi
movl $0x1, %r9d
movq %rax, (%rsp)
callq 0x1361e0
movl %eax, 0x64(%rsp)
cmpl $0x0, 0x64(%rsp)
jne 0x135bb7
movq 0x70(%rsp), %rax
cmpq 0x78(%rsp), %rax
ja 0x135bb7
movq 0xa0(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq 0x70(%rsp), %rdx
movq 0x78(%rsp), %rcx
callq 0x1363a0
jmp 0x135bb9
jmp 0x135bbb
cmpl $0x0, 0x64(%rsp)
jne 0x135bee
movq 0x98(%rsp), %rdi
callq 0x135e80
testb $0x1, %al
jne 0x135bd5
jmp 0x135bee
movq 0x98(%rsp), %rdi
movq 0x90(%rsp), %rsi
callq 0x135ed0
movl %eax, 0x64(%rsp)
cmpl $0x0, 0x64(%rsp)
jne 0x135c3c
movq 0xa0(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x98(%rsp), %rsi
callq 0x1352b0
movq 0x98(%rsp), %rdi
callq 0x135e80
testb $0x1, %al
jne 0x135c21
jmp 0x135c3a
movq 0x98(%rsp), %rdi
movq 0x90(%rsp), %rsi
callq 0x135ed0
movl %eax, 0x64(%rsp)
jmp 0x135c3c
cmpl $0x0, 0x64(%rsp)
jne 0x135d18
movq 0xa0(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x98(%rsp), %rsi
callq 0x1352b0
movq 0xa0(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x11dfa0
cmpq $0x0, %rax
je 0x135d16
movq 0xa0(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x11dee0
movq %rax, %rsi
leaq 0x88(%rsp), %rdi
callq 0xf86d0
cmpl $0x0, %eax
je 0x135cf2
movq 0x90(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x98(%rsp), %rdi
callq 0xe7440
movq %rax, 0x10(%rsp)
movq 0x98(%rsp), %rdi
callq 0xe73f0
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rdx
movq %rax, %rcx
leaq 0x413e4c(%rip), %rsi    # 0x549b2d
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x135d14
movq 0xa0(%rsp), %rax
movq 0x18(%rax), %rdi
callq 0x11e110
movq 0xa0(%rsp), %rax
movq 0x20(%rax), %rdi
callq 0x11e110
jmp 0x135d16
jmp 0x135d18
cmpl $0x0, 0x64(%rsp)
jne 0x135d4b
movq 0x98(%rsp), %rdi
callq 0x135e80
testb $0x1, %al
jne 0x135d32
jmp 0x135d4b
movq 0x98(%rsp), %rdi
movq 0x90(%rsp), %rsi
callq 0x135ed0
movl %eax, 0x64(%rsp)
cmpl $0x0, 0x64(%rsp)
jne 0x135d99
movq 0xa0(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x98(%rsp), %rsi
callq 0x1352b0
movq 0x98(%rsp), %rdi
callq 0x135e80
testb $0x1, %al
jne 0x135d7e
jmp 0x135d97
movq 0x98(%rsp), %rdi
movq 0x90(%rsp), %rsi
callq 0x135ed0
movl %eax, 0x64(%rsp)
jmp 0x135d99
cmpl $0x0, 0x64(%rsp)
jne 0x135de7
movq 0xa0(%rsp), %rax
movq 0x20(%rax), %rdi
movq 0x98(%rsp), %rsi
callq 0x1352b0
movq 0x98(%rsp), %rdi
callq 0x135e80
testb $0x1, %al
jne 0x135dcc
jmp 0x135de5
movq 0x98(%rsp), %rdi
movq 0x90(%rsp), %rsi
callq 0x135ed0
movl %eax, 0x64(%rsp)
jmp 0x135de7
cmpl $0x0, 0x64(%rsp)
jne 0x135e46
cmpq $0x0, 0x88(%rsp)
je 0x135e46
movq 0xa0(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq 0x88(%rsp), %rdx
movq 0xa0(%rsp), %rax
movq 0x18(%rax), %rcx
movq 0xa0(%rsp), %rax
movq 0x20(%rax), %r8
movq 0x98(%rsp), %r9
movq 0x90(%rsp), %rax
movq %rax, (%rsp)
callq 0x136500
movl %eax, 0x64(%rsp)
cmpl $0x0, 0x64(%rsp)
jne 0x135e6b
movq 0x98(%rsp), %rdi
movq 0x90(%rsp), %rdx
movl $0xa, %esi
callq 0xe7500
movl %eax, 0x64(%rsp)
movl 0x64(%rsp), %eax
addq $0xa8, %rsp
retq
nopw (%rax,%rax)