// File: /workspace/github_c_makefile_star2_O0/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: adoption_agency_algorithm
static bool adoption_agency_algorithm (
  GumboParser* parser,
  GumboToken* token,
  GumboTag subject
) {
  GumboParserState* state = parser->_parser_state;
  gumbo_debug("Entering adoption agency algorithm.\n");
  // Step 1.
  GumboNode* current_node = get_current_node(parser);
  if (
    current_node->v.element.tag_namespace == GUMBO_NAMESPACE_HTML
    && current_node->v.element.tag == subject
    && -1 == gumbo_vector_index_of (
      &state->_active_formatting_elements,
      current_node
    )
  ) {
    pop_current_node(parser);
    return false;
  }
  // Steps 2-4 & 20:
  for (unsigned int i = 0; i < 8; ++i) {
    // Step 5.
    GumboNode* formatting_node = NULL;
    int formatting_node_in_open_elements = -1;
    for (int j = state->_active_formatting_elements.length; --j >= 0;) {
      GumboNode* current_node = state->_active_formatting_elements.data[j];
      if (current_node == &kActiveFormattingScopeMarker) {
        gumbo_debug("Broke on scope marker; aborting.\n");
        // Last scope marker; abort the algorithm.
        return false;
      }
      if (node_html_tag_is(current_node, subject)) {
        // Found it.
        formatting_node = current_node;
        formatting_node_in_open_elements = gumbo_vector_index_of (
          &state->_open_elements,
          formatting_node
        );
        gumbo_debug (
          "Formatting element of tag %s at %d.\n",
          gumbo_normalized_tagname(subject),
          formatting_node_in_open_elements
        );
        break;
      }
    }
    if (!formatting_node) {
      // No matching tag; not a parse error outright, but fall through to the
      // "any other end tag" clause (which may potentially add a parse error,
      // but not always).
      gumbo_debug("No active formatting elements; aborting.\n");
      return false;
    }

    // Step 6
    if (formatting_node_in_open_elements == -1) {
      gumbo_debug("Formatting node not on stack of open elements.\n");
      parser_add_parse_error(parser, token);
      gumbo_vector_remove (
        formatting_node,
        &state->_active_formatting_elements
      );
      return false;
    }

    // Step 7
    if (!has_an_element_in_scope(parser, formatting_node->v.element.tag)) {
      parser_add_parse_error(parser, token);
      gumbo_debug("Element not in scope.\n");
      return false;
    }

    // Step 8
    if (formatting_node != get_current_node(parser)) {
      parser_add_parse_error(parser, token);  // But continue onwards.
    }
    assert(formatting_node);
    assert(!node_html_tag_is(formatting_node, GUMBO_TAG_HTML));
    assert(!node_html_tag_is(formatting_node, GUMBO_TAG_BODY));

    // Step 9 & 10
    GumboNode* furthest_block = NULL;
    for (
      unsigned int j = formatting_node_in_open_elements;
      j < state->_open_elements.length;
      ++j
    ) {
      assert(j > 0);
      GumboNode* current = state->_open_elements.data[j];
      if (is_special_node(current)) {
        // Step 9.
        furthest_block = current;
        break;
      }
    }
    if (!furthest_block) {
      // Step 10.
      while (get_current_node(parser) != formatting_node) {
        pop_current_node(parser);
      }
      // And the formatting element itself.
      pop_current_node(parser);
      gumbo_vector_remove (
        formatting_node,
        &state->_active_formatting_elements
      );
      return false;
    }
    assert(!node_html_tag_is(furthest_block, GUMBO_TAG_HTML));
    assert(furthest_block);

    // Step 11.
    // Elements may be moved and reparented by this algorithm, so
    // common_ancestor is not necessarily the same as formatting_node->parent.
    GumboNode* common_ancestor = state->_open_elements.data [
      gumbo_vector_index_of(&state->_open_elements, formatting_node) - 1
    ];
    gumbo_debug (
      "Common ancestor tag = %s, furthest block tag = %s.\n",
      gumbo_normalized_tagname(common_ancestor->v.element.tag),
      gumbo_normalized_tagname(furthest_block->v.element.tag)
    );

    // Step 12.
    int bookmark = 1 + gumbo_vector_index_of (
      &state->_active_formatting_elements,
      formatting_node
    );
    gumbo_debug("Bookmark at %d.\n", bookmark);
    // Step 13.
    GumboNode* node = furthest_block;
    GumboNode* last_node = furthest_block;
    // Must be stored explicitly, in case node is removed from the stack of open
    // elements, to handle step 9.4.
    int saved_node_index = gumbo_vector_index_of(&state->_open_elements, node);
    assert(saved_node_index > 0);
    // Step 13.1.
    for (int j = 0;;) {
      // Step 13.2.
      ++j;
      // Step 13.3.
      int node_index = gumbo_vector_index_of(&state->_open_elements, node);
      gumbo_debug (
        "Current index: %d, last index: %d.\n",
        node_index,
        saved_node_index
      );
      if (node_index == -1) {
        node_index = saved_node_index;
      }
      saved_node_index = --node_index;
      assert(node_index > 0);
      assert((unsigned int) node_index < state->_open_elements.capacity);
      node = state->_open_elements.data[node_index];
      assert(node->parent);
      if (node == formatting_node) {
        // Step 13.4.
        break;
      }
      int formatting_index = gumbo_vector_index_of (
        &state->_active_formatting_elements,
        node
      );
      if (j > 3 && formatting_index != -1) {
        // Step 13.5.
        gumbo_debug("Removing formatting element at %d.\n", formatting_index);
        gumbo_vector_remove_at (
          formatting_index,
          &state->_active_formatting_elements
        );
        // Removing the element shifts all indices over by one, so we may need
        // to move the bookmark.
        if (formatting_index < bookmark) {
          --bookmark;
          gumbo_debug("Moving bookmark to %d.\n", bookmark);
        }
        continue;
      }
      if (formatting_index == -1) {
        // Step 13.6.
        gumbo_vector_remove_at(node_index, &state->_open_elements);
        continue;
      }
      // Step 13.7.
      // "common ancestor as the intended parent" doesn't actually mean insert
      // it into the common ancestor; that happens below.
      node = clone_node(node, GUMBO_INSERTION_ADOPTION_AGENCY_CLONED);
      assert(formatting_index >= 0);
      state->_active_formatting_elements.data[formatting_index] = node;
      assert(node_index >= 0);
      state->_open_elements.data[node_index] = node;
      // Step 13.8.
      if (last_node == furthest_block) {
        bookmark = formatting_index + 1;
        gumbo_debug("Bookmark moved to %d.\n", bookmark);
        assert((unsigned int) bookmark <= state->_active_formatting_elements.length);
      }
      // Step 13.9.
      last_node->parse_flags |= GUMBO_INSERTION_ADOPTION_AGENCY_MOVED;
      remove_from_parent(last_node);
      append_node(node, last_node);
      // Step 13.10.
      last_node = node;
    }  // Step 13.11.

    // Step 14.
    gumbo_debug (
      "Removing %s node from parent ",
      gumbo_normalized_tagname(last_node->v.element.tag)
    );
    remove_from_parent(last_node);
    last_node->parse_flags |= GUMBO_INSERTION_ADOPTION_AGENCY_MOVED;
    InsertionLocation location = get_appropriate_insertion_location (
      parser,
      common_ancestor
    );
    gumbo_debug (
      "and inserting it into %s.\n",
      gumbo_normalized_tagname(location.target->v.element.tag)
    );
    insert_node(last_node, location);

    // Step 15.
    GumboNode* new_formatting_node = clone_node (
      formatting_node,
      GUMBO_INSERTION_ADOPTION_AGENCY_CLONED
    );
    formatting_node->parse_flags |= GUMBO_INSERTION_IMPLICIT_END_TAG;

    // Step 16. Instead of appending nodes one-by-one, we swap the children
    // vector of furthest_block with the empty children of new_formatting_node,
    // reducing memory traffic and allocations. We still have to reset their
    // parent pointers, though.
    GumboVector temp = new_formatting_node->v.element.children;
    new_formatting_node->v.element.children = furthest_block->v.element.children;
    furthest_block->v.element.children = temp;

    temp = new_formatting_node->v.element.children;
    for (unsigned int i = 0; i < temp.length; ++i) {
      GumboNode* child = temp.data[i];
      child->parent = new_formatting_node;
    }

    // Step 17.
    append_node(furthest_block, new_formatting_node);

    // Step 18.
    // If the formatting node was before the bookmark, it may shift over all
    // indices after it, so we need to explicitly find the index and possibly
    // adjust the bookmark.
    int formatting_node_index = gumbo_vector_index_of (
      &state->_active_formatting_elements,
      formatting_node
    );
    assert(formatting_node_index != -1);
    if (formatting_node_index < bookmark) {
      gumbo_debug (
        "Formatting node at %d is before bookmark at %d; decrementing.\n",
        formatting_node_index, bookmark
      );
      --bookmark;
    }
    gumbo_vector_remove_at (
      formatting_node_index,
      &state->_active_formatting_elements
    );
    assert(bookmark >= 0);
    assert((unsigned int) bookmark <= state->_active_formatting_elements.length);
    gumbo_vector_insert_at (
      new_formatting_node,
      bookmark,
      &state->_active_formatting_elements
    );

    // Step 19.
    gumbo_vector_remove(formatting_node, &state->_open_elements);
    int insert_at = 1 + gumbo_vector_index_of (
      &state->_open_elements,
      furthest_block
    );
    assert(insert_at >= 0);
    assert((unsigned int) insert_at <= state->_open_elements.length);
    gumbo_vector_insert_at (
      new_formatting_node,
      insert_at,
      &state->_open_elements
    );
  }  // Step 20.
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
leaq 0x246e5(%rip), %rdi     # 0x3484e
movb $0x0, %al
callq 0x7540
movq -0x10(%rbp), %rdi
callq 0x7550
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x0, 0x2c(%rax)
jne 0x101c1
movq -0x30(%rbp), %rax
movl 0x28(%rax), %eax
cmpl -0x1c(%rbp), %eax
jne 0x101c1
movq -0x28(%rbp), %rdi
addq $0x18, %rdi
movq -0x30(%rbp), %rsi
callq 0x6bf0
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpl %ecx, %eax
jne 0x101c1
movq -0x10(%rbp), %rdi
callq 0xf060
movb $0x0, -0x1(%rbp)
jmp 0x10bdc
movl $0x0, -0x34(%rbp)
cmpl $0x8, -0x34(%rbp)
jae 0x10bd8
movq $0x0, -0x40(%rbp)
movl $0xffffffff, -0x44(%rbp) # imm = 0xFFFFFFFF
movq -0x28(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x48(%rbp)
movl -0x48(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x48(%rbp)
cmpl $0x0, %eax
jl 0x10286
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x48(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x50(%rbp)
leaq 0x20a98(%rip), %rax     # 0x30cb0
cmpq %rax, -0x50(%rbp)
jne 0x10235
leaq 0x2464e(%rip), %rdi     # 0x34873
movb $0x0, %al
callq 0x7540
movb $0x0, -0x1(%rbp)
jmp 0x10bdc
movq -0x50(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x8700
testb $0x1, %al
jne 0x10247
jmp 0x10281
movq -0x50(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rdi
addq $0x8, %rdi
movq -0x40(%rbp), %rsi
callq 0x6bf0
movl %eax, -0x44(%rbp)
movl -0x1c(%rbp), %edi
callq 0x5f80
movq %rax, %rsi
movl -0x44(%rbp), %edx
leaq 0x2461d(%rip), %rdi     # 0x34895
movb $0x0, %al
callq 0x7540
jmp 0x10286
jmp 0x101eb
cmpq $0x0, -0x40(%rbp)
jne 0x102a4
leaq 0x24626(%rip), %rdi     # 0x348ba
movb $0x0, %al
callq 0x7540
movb $0x0, -0x1(%rbp)
jmp 0x10bdc
cmpl $-0x1, -0x44(%rbp)
jne 0x102df
leaq 0x24633(%rip), %rdi     # 0x348e4
movb $0x0, %al
callq 0x7540
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x78a0
movq -0x40(%rbp), %rdi
movq -0x28(%rbp), %rsi
addq $0x18, %rsi
callq 0x6d00
movb $0x0, -0x1(%rbp)
jmp 0x10bdc
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rax
movl 0x28(%rax), %esi
callq 0xfc00
testb $0x1, %al
jne 0x10317
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x78a0
leaq 0x2460d(%rip), %rdi     # 0x34914
movb $0x0, %al
callq 0x7540
movb $0x0, -0x1(%rbp)
jmp 0x10bdc
movq -0x40(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0x10(%rbp), %rdi
callq 0x7550
movq %rax, %rcx
movq -0xe0(%rbp), %rax
cmpq %rcx, %rax
je 0x10347
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x78a0
cmpq $0x0, -0x40(%rbp)
je 0x10350
jmp 0x1036f
leaq 0x245d4(%rip), %rdi     # 0x3492b
leaq 0x22b16(%rip), %rsi     # 0x32e74
movl $0x817, %edx            # imm = 0x817
leaq 0x245d1(%rip), %rcx     # 0x3493b
callq 0x4100
movq -0x40(%rbp), %rdi
xorl %esi, %esi
callq 0x8700
testb $0x1, %al
jne 0x10380
jmp 0x1039f
leaq 0x245fb(%rip), %rdi     # 0x34982
leaq 0x22ae6(%rip), %rsi     # 0x32e74
movl $0x818, %edx            # imm = 0x818
leaq 0x245a1(%rip), %rcx     # 0x3493b
callq 0x4100
movq -0x40(%rbp), %rdi
movl $0xa, %esi
callq 0x8700
testb $0x1, %al
jne 0x103b3
jmp 0x103d2
leaq 0x245fb(%rip), %rdi     # 0x349b5
leaq 0x22ab3(%rip), %rsi     # 0x32e74
movl $0x819, %edx            # imm = 0x819
leaq 0x2456e(%rip), %rcx     # 0x3493b
callq 0x4100
movq $0x0, -0x58(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jae 0x1044c
cmpl $0x0, -0x5c(%rbp)
jbe 0x103f4
jmp 0x10413
leaq 0x245ed(%rip), %rdi     # 0x349e8
leaq 0x22a72(%rip), %rsi     # 0x32e74
movl $0x822, %edx            # imm = 0x822
leaq 0x2452d(%rip), %rcx     # 0x3493b
callq 0x4100
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x5c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rdi
callq 0x10f80
testb $0x1, %al
jne 0x10435
jmp 0x1043f
movq -0x68(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x1044c
jmp 0x10441
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x103e0
cmpq $0x0, -0x58(%rbp)
jne 0x10492
jmp 0x10455
movq -0x10(%rbp), %rdi
callq 0x7550
cmpq -0x40(%rbp), %rax
je 0x1046f
movq -0x10(%rbp), %rdi
callq 0xf060
jmp 0x10455
movq -0x10(%rbp), %rdi
callq 0xf060
movq -0x40(%rbp), %rdi
movq -0x28(%rbp), %rsi
addq $0x18, %rsi
callq 0x6d00
movb $0x0, -0x1(%rbp)
jmp 0x10bdc
movq -0x58(%rbp), %rdi
xorl %esi, %esi
callq 0x8700
testb $0x1, %al
jne 0x104a3
jmp 0x104c2
leaq 0x24544(%rip), %rdi     # 0x349ee
leaq 0x229c3(%rip), %rsi     # 0x32e74
movl $0x837, %edx            # imm = 0x837
leaq 0x2447e(%rip), %rcx     # 0x3493b
callq 0x4100
cmpq $0x0, -0x58(%rbp)
je 0x104cb
jmp 0x104ea
leaq 0x2454e(%rip), %rdi     # 0x34a20
leaq 0x2299b(%rip), %rsi     # 0x32e74
movl $0x838, %edx            # imm = 0x838
leaq 0x24456(%rip), %rcx     # 0x3493b
callq 0x4100
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0xf0(%rbp)
movq -0x28(%rbp), %rdi
addq $0x8, %rdi
movq -0x40(%rbp), %rsi
callq 0x6bf0
movl %eax, %ecx
movq -0xf0(%rbp), %rax
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movl 0x28(%rax), %edi
callq 0x5f80
movq %rax, -0xe8(%rbp)
movq -0x58(%rbp), %rax
movl 0x28(%rax), %edi
callq 0x5f80
movq -0xe8(%rbp), %rsi
movq %rax, %rdx
leaq 0x244de(%rip), %rdi     # 0x34a2f
movb $0x0, %al
callq 0x7540
movq -0x28(%rbp), %rdi
addq $0x18, %rdi
movq -0x40(%rbp), %rsi
callq 0x6bf0
addl $0x1, %eax
movl %eax, -0x74(%rbp)
movl -0x74(%rbp), %esi
leaq 0x244ea(%rip), %rdi     # 0x34a63
movb $0x0, %al
callq 0x7540
movq -0x58(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x28(%rbp), %rdi
addq $0x8, %rdi
movq -0x80(%rbp), %rsi
callq 0x6bf0
movl %eax, -0x8c(%rbp)
cmpl $0x0, -0x8c(%rbp)
jle 0x105b5
jmp 0x105d4
leaq 0x244b8(%rip), %rdi     # 0x34a74
leaq 0x228b1(%rip), %rsi     # 0x32e74
movl $0x852, %edx            # imm = 0x852
leaq 0x2436c(%rip), %rcx     # 0x3493b
callq 0x4100
movl $0x0, -0x90(%rbp)
movl -0x90(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x90(%rbp)
movq -0x28(%rbp), %rdi
addq $0x8, %rdi
movq -0x80(%rbp), %rsi
callq 0x6bf0
movl %eax, -0x94(%rbp)
movl -0x94(%rbp), %esi
movl -0x8c(%rbp), %edx
leaq 0x24472(%rip), %rdi     # 0x34a89
movb $0x0, %al
callq 0x7540
cmpl $-0x1, -0x94(%rbp)
jne 0x10633
movl -0x8c(%rbp), %eax
movl %eax, -0x94(%rbp)
movl -0x94(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x94(%rbp)
movl %eax, -0x8c(%rbp)
cmpl $0x0, -0x94(%rbp)
jle 0x10653
jmp 0x10672
leaq 0x24420(%rip), %rdi     # 0x34a7a
leaq 0x22813(%rip), %rsi     # 0x32e74
movl $0x862, %edx            # imm = 0x862
leaq 0x242ce(%rip), %rcx     # 0x3493b
callq 0x4100
movl -0x94(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jae 0x10683
jmp 0x106a2
leaq 0x24423(%rip), %rdi     # 0x34aad
leaq 0x227e3(%rip), %rsi     # 0x32e74
movl $0x863, %edx            # imm = 0x863
leaq 0x2429e(%rip), %rcx     # 0x3493b
callq 0x4100
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x94(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x106c6
jmp 0x106e5
leaq 0x2441b(%rip), %rdi     # 0x34ae8
leaq 0x227a0(%rip), %rsi     # 0x32e74
movl $0x865, %edx            # imm = 0x865
leaq 0x2425b(%rip), %rcx     # 0x3493b
callq 0x4100
movq -0x80(%rbp), %rax
cmpq -0x40(%rbp), %rax
jne 0x106f4
jmp 0x108bb
movq -0x28(%rbp), %rdi
addq $0x18, %rdi
movq -0x80(%rbp), %rsi
callq 0x6bf0
movl %eax, -0x98(%rbp)
cmpl $0x3, -0x90(%rbp)
jle 0x1076e
cmpl $-0x1, -0x98(%rbp)
je 0x1076e
movl -0x98(%rbp), %esi
leaq 0x243cb(%rip), %rdi     # 0x34af5
movb $0x0, %al
callq 0x7540
movl -0x98(%rbp), %edi
movq -0x28(%rbp), %rsi
addq $0x18, %rsi
callq 0x6d40
movl -0x98(%rbp), %eax
cmpl -0x74(%rbp), %eax
jge 0x10769
movl -0x74(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x74(%rbp)
movl -0x74(%rbp), %esi
leaq 0x243b7(%rip), %rdi     # 0x34b19
movb $0x0, %al
callq 0x7540
jmp 0x105de
cmpl $-0x1, -0x98(%rbp)
jne 0x1078f
movl -0x94(%rbp), %edi
movq -0x28(%rbp), %rsi
addq $0x8, %rsi
callq 0x6d40
jmp 0x105de
movq -0x80(%rbp), %rdi
movl $0x100, %esi            # imm = 0x100
callq 0x11080
movq %rax, -0x80(%rbp)
cmpl $0x0, -0x98(%rbp)
jl 0x107ac
jmp 0x107cb
leaq 0x2437e(%rip), %rdi     # 0x34b31
leaq 0x226ba(%rip), %rsi     # 0x32e74
movl $0x886, %edx            # imm = 0x886
leaq 0x24175(%rip), %rcx     # 0x3493b
callq 0x4100
movq -0x80(%rbp), %rdx
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x98(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
cmpl $0x0, -0x94(%rbp)
jl 0x107ed
jmp 0x1080c
leaq 0x24353(%rip), %rdi     # 0x34b47
leaq 0x22679(%rip), %rsi     # 0x32e74
movl $0x888, %edx            # imm = 0x888
leaq 0x24134(%rip), %rcx     # 0x3493b
callq 0x4100
movq -0x80(%rbp), %rdx
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x94(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x88(%rbp), %rax
cmpq -0x58(%rbp), %rax
jne 0x1087c
movl -0x98(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
movl -0x74(%rbp), %esi
leaq 0x24311(%rip), %rdi     # 0x34b57
movb $0x0, %al
callq 0x7540
movl -0x74(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl 0x20(%rcx), %eax
ja 0x1085b
jmp 0x1087a
leaq 0x2430c(%rip), %rdi     # 0x34b6e
leaq 0x2260b(%rip), %rsi     # 0x32e74
movl $0x88e, %edx            # imm = 0x88E
leaq 0x240c6(%rip), %rcx     # 0x3493b
callq 0x4100
jmp 0x1087c
movq -0x88(%rbp), %rax
movl 0x14(%rax), %ecx
orl $0x200, %ecx            # imm = 0x200
movl %ecx, 0x14(%rax)
movq -0x88(%rbp), %rdi
callq 0x11200
movq -0x80(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0x87f0
movq -0x80(%rbp), %rax
movq %rax, -0x88(%rbp)
jmp 0x105de
movq -0x88(%rbp), %rax
movl 0x28(%rax), %edi
callq 0x5f80
movq %rax, %rsi
leaq 0x242df(%rip), %rdi     # 0x34bb3
movb $0x0, %al
callq 0x7540
movq -0x88(%rbp), %rdi
callq 0x11200
movq -0x88(%rbp), %rax
movl 0x14(%rax), %ecx
orl $0x200, %ecx            # imm = 0x200
movl %ecx, 0x14(%rax)
movq -0x10(%rbp), %rdi
movq -0x70(%rbp), %rsi
callq 0x81d0
movq %rax, -0xa8(%rbp)
movl %edx, -0xa0(%rbp)
movq -0xa8(%rbp), %rax
movl 0x28(%rax), %edi
callq 0x5f80
movq %rax, %rsi
leaq 0x242a4(%rip), %rdi     # 0x34bd1
movb $0x0, %al
callq 0x7540
movq -0x88(%rbp), %rdi
movq -0xa8(%rbp), %rsi
movl -0xa0(%rbp), %edx
callq 0x8420
movq -0x40(%rbp), %rdi
movl $0x100, %esi            # imm = 0x100
callq 0x11080
movq %rax, -0xb0(%rbp)
movq -0x40(%rbp), %rax
movl 0x14(%rax), %ecx
orl $0x2, %ecx
movl %ecx, 0x14(%rax)
movq -0xb0(%rbp), %rax
movq 0x18(%rax), %rcx
movq %rcx, -0xc0(%rbp)
movq 0x20(%rax), %rax
movq %rax, -0xb8(%rbp)
movq -0xb0(%rbp), %rax
movq -0x58(%rbp), %rcx
movq 0x18(%rcx), %rdx
movq %rdx, 0x18(%rax)
movq 0x20(%rcx), %rcx
movq %rcx, 0x20(%rax)
movq -0x58(%rbp), %rax
movq -0xc0(%rbp), %rcx
movq %rcx, 0x18(%rax)
movq -0xb8(%rbp), %rcx
movq %rcx, 0x20(%rax)
movq -0xb0(%rbp), %rax
movq 0x18(%rax), %rcx
movq %rcx, -0xc0(%rbp)
movq 0x20(%rax), %rax
movq %rax, -0xb8(%rbp)
movl $0x0, -0xc4(%rbp)
movl -0xc4(%rbp), %eax
cmpl -0xb8(%rbp), %eax
jae 0x10a31
movq -0xc0(%rbp), %rax
movl -0xc4(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0xd0(%rbp)
movq -0xb0(%rbp), %rcx
movq -0xd0(%rbp), %rax
movq %rcx, 0x8(%rax)
movl -0xc4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc4(%rbp)
jmp 0x109e8
movq -0x58(%rbp), %rdi
movq -0xb0(%rbp), %rsi
callq 0x87f0
movq -0x28(%rbp), %rdi
addq $0x18, %rdi
movq -0x40(%rbp), %rsi
callq 0x6bf0
movl %eax, -0xd4(%rbp)
cmpl $-0x1, -0xd4(%rbp)
je 0x10a63
jmp 0x10a82
leaq 0x24182(%rip), %rdi     # 0x34bec
leaq 0x22403(%rip), %rsi     # 0x32e74
movl $0x8c9, %edx            # imm = 0x8C9
leaq 0x23ebe(%rip), %rcx     # 0x3493b
callq 0x4100
movl -0xd4(%rbp), %eax
cmpl -0x74(%rbp), %eax
jge 0x10aad
movl -0xd4(%rbp), %esi
movl -0x74(%rbp), %edx
leaq 0x2416b(%rip), %rdi     # 0x34c08
movb $0x0, %al
callq 0x7540
movl -0x74(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x74(%rbp)
movl -0xd4(%rbp), %edi
movq -0x28(%rbp), %rsi
addq $0x18, %rsi
callq 0x6d40
cmpl $0x0, -0x74(%rbp)
jl 0x10ac8
jmp 0x10ae7
leaq 0x24178(%rip), %rdi     # 0x34c47
leaq 0x2239e(%rip), %rsi     # 0x32e74
movl $0x8d5, %edx            # imm = 0x8D5
leaq 0x23e59(%rip), %rcx     # 0x3493b
callq 0x4100
movl -0x74(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl 0x20(%rcx), %eax
ja 0x10af5
jmp 0x10b14
leaq 0x24072(%rip), %rdi     # 0x34b6e
leaq 0x22371(%rip), %rsi     # 0x32e74
movl $0x8d6, %edx            # imm = 0x8D6
leaq 0x23e2c(%rip), %rcx     # 0x3493b
callq 0x4100
movq -0xb0(%rbp), %rdi
movl -0x74(%rbp), %esi
movq -0x28(%rbp), %rdx
addq $0x18, %rdx
callq 0x6c50
movq -0x40(%rbp), %rdi
movq -0x28(%rbp), %rsi
addq $0x8, %rsi
callq 0x6d00
movq -0x28(%rbp), %rdi
addq $0x8, %rdi
movq -0x58(%rbp), %rsi
callq 0x6bf0
addl $0x1, %eax
movl %eax, -0xd8(%rbp)
cmpl $0x0, -0xd8(%rbp)
jl 0x10b61
jmp 0x10b80
leaq 0x240ed(%rip), %rdi     # 0x34c55
leaq 0x22305(%rip), %rsi     # 0x32e74
movl $0x8e3, %edx            # imm = 0x8E3
leaq 0x23dc0(%rip), %rcx     # 0x3493b
callq 0x4100
movl -0xd8(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl 0x10(%rcx), %eax
ja 0x10b91
jmp 0x10bb0
leaq 0x240cc(%rip), %rdi     # 0x34c64
leaq 0x222d5(%rip), %rsi     # 0x32e74
movl $0x8e4, %edx            # imm = 0x8E4
leaq 0x23d90(%rip), %rcx     # 0x3493b
callq 0x4100
movq -0xb0(%rbp), %rdi
movl -0xd8(%rbp), %esi
movq -0x28(%rbp), %rdx
addq $0x8, %rdx
callq 0x6c50
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x101c8
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xf0, %rsp
popq %rbp
retq
nopw (%rax,%rax)