// File: /workspace/github_c_makefile_star2_O2/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: pop_current_node
static GumboNode* pop_current_node(GumboParser* parser) {
  GumboParserState* state = parser->_parser_state;
  maybe_flush_text_node_buffer(parser);
  if (state->_open_elements.length > 0) {
    assert(node_html_tag_is(state->_open_elements.data[0], GUMBO_TAG_HTML));
    gumbo_debug (
      "Popping %s node.\n",
      gumbo_normalized_tagname(get_current_node(parser)->v.element.tag)
    );
  }
  GumboNode* current_node = gumbo_vector_pop(&state->_open_elements);
  if (!current_node) {
    assert(state->_open_elements.length == 0);
    return NULL;
  }
  assert (
    current_node->type == GUMBO_NODE_ELEMENT
    || current_node->type == GUMBO_NODE_TEMPLATE
  );
  bool is_closed_body_or_html_tag =
    (
      node_html_tag_is(current_node, GUMBO_TAG_BODY)
      && state->_closed_body_tag
    ) || (
      node_html_tag_is(current_node, GUMBO_TAG_HTML)
      && state->_closed_html_tag
    )
  ;
  if (
    (
      state->_current_token->type != GUMBO_TOKEN_END_TAG
      || !node_html_tag_is(current_node, state->_current_token->v.end_tag)
    )
    && !is_closed_body_or_html_tag
  ) {
    current_node->parse_flags |= GUMBO_INSERTION_IMPLICIT_END_TAG;
  }
  if (!is_closed_body_or_html_tag) {
    record_end_of_element(state->_current_token, &current_node->v.element);
  }
  return current_node;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq 0x18(%rdi), %r15
callq 0x7ec1
leaq 0x8(%r15), %rbx
cmpl $0x0, 0x10(%r15)
je 0xa663
movq (%rbx), %rax
movq (%rax), %rdi
xorl %esi, %esi
callq 0x82b7
testb %al, %al
je 0xa77b
movq %r14, %rdi
callq 0x7913
movl 0x28(%rax), %edi
callq 0x730c
movq %rbx, %rdi
callq 0x77ca
movq %rax, %rbx
testq %rax, %rax
je 0xa6ea
movl (%rbx), %eax
cmpl $0x1, %eax
je 0xa683
cmpl $0x6, %eax
jne 0xa79a
pushq $0xa
popq %rsi
movq %rbx, %rdi
callq 0x82b7
testb %al, %al
je 0xa6b8
cmpb $0x0, 0xa0(%r15)
je 0xa6b8
movq 0x98(%r15), %rax
cmpl $0x2, (%rax)
jne 0xa76d
addq $0x98, %r15
movb $0x1, %bpl
jmp 0xa725
movq %rbx, %rdi
xorl %esi, %esi
callq 0x82b7
testb %al, %al
je 0xa710
movb 0xa1(%r15), %bpl
movq 0x98(%r15), %rax
addq $0x98, %r15
cmpl $0x2, (%rax)
je 0xa725
testb %bpl, %bpl
je 0xa73e
jmp 0xa76d
cmpl $0x0, 0x10(%r15)
je 0xa76d
leaq 0x103e5(%rip), %rdi     # 0x1aadd
leaq 0xf1a1(%rip), %rsi      # 0x198a0
leaq 0x103ac(%rip), %rcx     # 0x1aab2
movl $0x3c7, %edx            # imm = 0x3C7
callq 0x4100
movq 0x98(%r15), %rax
addq $0x98, %r15
cmpl $0x2, (%rax)
jne 0xa73e
xorl %ebp, %ebp
movl 0x30(%rax), %esi
movq %rbx, %rdi
callq 0x82b7
orb %bpl, %al
testb $0x1, %al
je 0xa73e
testb %bpl, %bpl
je 0xa742
jmp 0xa76d
orb $0x2, 0x14(%rbx)
movq (%r15), %rax
movq 0x18(%rax), %rcx
movq %rcx, 0x78(%rbx)
movups 0x8(%rax), %xmm0
movups %xmm0, 0x68(%rbx)
movq %rbx, %rcx
addq $0x40, %rcx
cmpl $0x2, (%rax)
jne 0xa767
movups 0x20(%rax), %xmm0
jmp 0xa76a
xorps %xmm0, %xmm0
movups %xmm0, (%rcx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x102f0(%rip), %rdi     # 0x1aa72
leaq 0xf117(%rip), %rsi      # 0x198a0
leaq 0x10322(%rip), %rcx     # 0x1aab2
movl $0x3bf, %edx            # imm = 0x3BF
callq 0x4100
leaq 0xf5b4(%rip), %rdi      # 0x19d55
leaq 0xf0f8(%rip), %rsi      # 0x198a0
leaq 0x10303(%rip), %rcx     # 0x1aab2
movl $0x3cd, %edx            # imm = 0x3CD
callq 0x4100