// File: /workspace/github_c_makefile_star2_O1/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 0x8740
leaq 0x8(%r15), %rbx
cmpl $0x0, 0x10(%r15)
je 0xb8fa
movq (%rbx), %rax
movq (%rax), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x8b69
testb %al, %al
je 0xb9cb
movq %r14, %rdi
callq 0x8107
movl 0x28(%rax), %edi
callq 0x7a30
movq %rbx, %rdi
callq 0x7fa7
testq %rax, %rax
je 0xb975
movq %rax, %rbx
movl (%rax), %eax
cmpl $0x1, %eax
je 0xb91a
cmpl $0x6, %eax
jne 0xba09
movq %rbx, %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x8b69
testb %al, %al
je 0xb93a
movb $0x1, %bpl
cmpb $0x0, 0xa0(%r15)
jne 0xb953
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x8b69
testb %al, %al
je 0xb953
movb 0xa1(%r15), %bpl
movq 0x98(%r15), %rax
cmpl $0x2, (%rax)
jne 0xb980
movl 0x30(%rax), %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x8b69
orb %bpl, %al
testb $0x1, %al
je 0xb985
jmp 0xb989
cmpl $0x0, 0x10(%r15)
jne 0xb9ea
xorl %ebx, %ebx
jmp 0xb9bd
testb %bpl, %bpl
jne 0xb9bd
orb $0x2, 0x14(%rbx)
testb %bpl, %bpl
jne 0xb9bd
movq 0x98(%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 0xb9b7
movups 0x20(%rax), %xmm0
jmp 0xb9ba
xorps %xmm0, %xmm0
movups %xmm0, (%rcx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x13010(%rip), %rdi     # 0x1e9e2
leaq 0x11e37(%rip), %rsi     # 0x1d810
leaq 0x13042(%rip), %rcx     # 0x1ea22
movl $0x3bf, %edx            # imm = 0x3BF
callq 0x4100
leaq 0x1305c(%rip), %rdi     # 0x1ea4d
leaq 0x11e18(%rip), %rsi     # 0x1d810
leaq 0x13023(%rip), %rcx     # 0x1ea22
movl $0x3c7, %edx            # imm = 0x3C7
callq 0x4100
leaq 0x122b5(%rip), %rdi     # 0x1dcc5
leaq 0x11df9(%rip), %rsi     # 0x1d810
leaq 0x13004(%rip), %rcx     # 0x1ea22
movl $0x3cd, %edx            # imm = 0x3CD
callq 0x4100