// File: /workspace/github_c_makefile_star2_O3/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 0x8313
leaq 0x8(%r15), %rbx
cmpl $0x0, 0x10(%r15)
je 0xb040
movq (%rbx), %rax
movq (%rax), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x8739
testb %al, %al
je 0xb177
movq %r14, %rdi
callq 0x7d33
movl 0x28(%rax), %edi
callq 0x7694
movq %rbx, %rdi
callq 0x7bd3
movq %rax, %rbx
testq %rax, %rax
je 0xb0eb
movq %rax, %r14
movl (%rbx), %eax
cmpl $0x1, %eax
je 0xb067
cmpl $0x6, %eax
jne 0xb196
movq %rbx, %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x8739
testb %al, %al
je 0xb0a6
cmpb $0x0, 0xa0(%r15)
je 0xb0a6
movq 0x98(%r15), %rax
cmpl $0x2, (%rax)
jne 0xb169
movl 0x30(%rax), %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x8739
jmp 0xb169
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x8739
testb %al, %al
je 0xb111
movb 0xa1(%r15), %bpl
movq 0x98(%r15), %rax
addq $0x98, %r15
cmpl $0x2, (%rax)
jne 0xb137
movl 0x30(%rax), %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x8739
orb %bpl, %al
testb $0x1, %al
je 0xb13c
testb %bpl, %bpl
je 0xb140
jmp 0xb169
cmpl $0x0, 0x10(%r15)
je 0xb169
leaq 0x11a74(%rip), %rdi     # 0x1cb6d
leaq 0x10830(%rip), %rsi     # 0x1b930
leaq 0x11a3b(%rip), %rcx     # 0x1cb42
movl $0x3c7, %edx            # imm = 0x3C7
callq 0x4100
movq 0x98(%r15), %rax
addq $0x98, %r15
cmpl $0x2, (%rax)
jne 0xb13c
movl 0x30(%rax), %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x8739
testb %al, %al
je 0xb13c
jmp 0xb140
testb %bpl, %bpl
jne 0xb169
orb $0x2, 0x14(%rbx)
movq (%r15), %rax
movq 0x18(%rax), %rcx
movq %rcx, 0x78(%rbx)
movups 0x8(%rax), %xmm0
movups %xmm0, 0x68(%rbx)
addq $0x40, %r14
cmpl $0x2, (%rax)
jne 0xb162
movups 0x20(%rax), %xmm0
jmp 0xb165
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x11984(%rip), %rdi     # 0x1cb02
leaq 0x107ab(%rip), %rsi     # 0x1b930
leaq 0x119b6(%rip), %rcx     # 0x1cb42
movl $0x3bf, %edx            # imm = 0x3BF
callq 0x4100
leaq 0x10c48(%rip), %rdi     # 0x1bde5
leaq 0x1078c(%rip), %rsi     # 0x1b930
leaq 0x11997(%rip), %rcx     # 0x1cb42
movl $0x3cd, %edx            # imm = 0x3CD
callq 0x4100