// File: /workspace/github_c_makefile_star2_O0/craigbarnes[P]lua-gumbo/lib/parser.c
// Function: parser_add_parse_error
static GumboError* parser_add_parse_error (
  GumboParser* parser,
  const GumboToken* token
) {
  gumbo_debug("Adding parse error.\n");
  GumboError* error = gumbo_add_error(parser);
  if (!error) {
    return NULL;
  }
  error->type = GUMBO_ERR_PARSER;
  error->position = token->position;
  error->original_text = token->original_text.data;
  GumboParserError* extra_data = &error->v.parser;
  extra_data->input_type = token->type;
  extra_data->input_tag = GUMBO_TAG_UNKNOWN;
  if (token->type == GUMBO_TOKEN_START_TAG) {
    extra_data->input_tag = token->v.start_tag.tag;
  } else if (token->type == GUMBO_TOKEN_END_TAG) {
    extra_data->input_tag = token->v.end_tag;
  }
  const GumboParserState* state = parser->_parser_state;
  extra_data->parser_state = state->_insertion_mode;
  gumbo_vector_init(state->_open_elements.length, &extra_data->tag_stack);
  for (unsigned int i = 0; i < state->_open_elements.length; ++i) {
    const GumboNode* node = state->_open_elements.data[i];
    assert (
      node->type == GUMBO_NODE_ELEMENT
      || node->type == GUMBO_NODE_TEMPLATE
    );
    gumbo_vector_add (
      (void*) node->v.element.tag,
      &extra_data->tag_stack
    );
  }
  return error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
leaq 0x2d8c4(%rip), %rdi     # 0x3517b
movb $0x0, %al
callq 0x7540
movq -0x10(%rbp), %rdi
callq 0x5210
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x78df
movq $0x0, -0x8(%rbp)
jmp 0x7a1d
movq -0x20(%rbp), %rax
movl $0x28, (%rax)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rax)
movq 0x18(%rcx), %rcx
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x20(%rbp), %rax
addq $0x28, %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
movl $0x96, 0x4(%rax)
movq -0x18(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x7955
movq -0x18(%rbp), %rax
movl 0x30(%rax), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x4(%rax)
jmp 0x796e
movq -0x18(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x796c
movq -0x18(%rbp), %rax
movl 0x30(%rax), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x4(%rax)
jmp 0x796e
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl (%rax), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x30(%rbp), %rax
movl 0x10(%rax), %edi
movq -0x28(%rbp), %rsi
addq $0x10, %rsi
callq 0x69f0
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movq -0x30(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jae 0x7a15
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movl -0x34(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpl $0x1, (%rax)
je 0x79d3
movq -0x40(%rbp), %rax
cmpl $0x6, (%rax)
jne 0x79d5
jmp 0x79f4
leaq 0x2b947(%rip), %rdi     # 0x33323
leaq 0x2b491(%rip), %rsi     # 0x32e74
movl $0x2dc, %edx            # imm = 0x2DC
leaq 0x2d7a1(%rip), %rcx     # 0x35190
callq 0x4100
movq -0x40(%rbp), %rax
movl 0x28(%rax), %eax
movl %eax, %edi
movq -0x28(%rbp), %rsi
addq $0x10, %rsi
callq 0x6a80
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x79a2
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)