// File: /workspace/github_c_makefile_star2_O0/craigbarnes[P]lua-gumbo/lib/tokenizer.c
// Function: handle_before_attr_value_state
static StateResult handle_before_attr_value_state (
  GumboParser* parser,
  GumboTokenizerState* tokenizer,
  int c,
  GumboToken* output
) {
  switch (c) {
    case '\t':
    case '\n':
    case '\f':
    case ' ':
      return NEXT_CHAR;
    case '"':
      gumbo_tokenizer_set_state(parser, GUMBO_LEX_ATTR_VALUE_DOUBLE_QUOTED);
      reset_tag_buffer_start_point(parser);
      return NEXT_CHAR;
    case '&':
      gumbo_tokenizer_set_state(parser, GUMBO_LEX_ATTR_VALUE_UNQUOTED);
      tokenizer->_reconsume_current_input = true;
      return NEXT_CHAR;
    case '\'':
      gumbo_tokenizer_set_state(parser, GUMBO_LEX_ATTR_VALUE_SINGLE_QUOTED);
      reset_tag_buffer_start_point(parser);
      return NEXT_CHAR;
    case '\0':
      tokenizer_add_parse_error(parser, GUMBO_ERR_UTF8_NULL);
      gumbo_tokenizer_set_state(parser, GUMBO_LEX_ATTR_VALUE_UNQUOTED);
      append_char_to_tag_buffer(parser, UNICODE_REPLACEMENT_CHAR, true);
      return NEXT_CHAR;
    case -1:
      tokenizer_add_parse_error(parser, GUMBO_ERR_ATTR_UNQUOTED_EOF);
      gumbo_tokenizer_set_state(parser, GUMBO_LEX_DATA);
      abandon_current_tag(parser);
      tokenizer->_reconsume_current_input = true;
      return NEXT_CHAR;
    case '>':
      tokenizer_add_parse_error(parser, GUMBO_ERR_ATTR_UNQUOTED_RIGHT_BRACKET);
      gumbo_tokenizer_set_state(parser, GUMBO_LEX_DATA);
      emit_current_tag(parser, output);
      return RETURN_ERROR;
    case '<':
    case '=':
    case '`':
      tokenizer_add_parse_error(parser, GUMBO_ERR_ATTR_UNQUOTED_EQUALS);
    // Fall through.
    default:
      gumbo_tokenizer_set_state(parser, GUMBO_LEX_ATTR_VALUE_UNQUOTED);
      append_char_to_tag_buffer(parser, c, true);
      return NEXT_CHAR;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq %rcx, -0x28(%rbp)
movl -0x1c(%rbp), %eax
incl %eax
movl %eax, %ecx
movq %rcx, -0x30(%rbp)
subl $0x61, %eax
ja 0x145ae
movq -0x30(%rbp), %rax
leaq 0x211c2(%rip), %rcx     # 0x35648
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x2, -0x4(%rbp)
jmp 0x145d4
movq -0x10(%rbp), %rdi
movl $0x25, %esi
callq 0x11a10
movq -0x10(%rbp), %rdi
callq 0x17200
movl $0x2, -0x4(%rbp)
jmp 0x145d4
movq -0x10(%rbp), %rdi
movl $0x27, %esi
callq 0x11a10
movq -0x18(%rbp), %rax
movb $0x1, 0x4(%rax)
movl $0x2, -0x4(%rbp)
jmp 0x145d4
movq -0x10(%rbp), %rdi
movl $0x26, %esi
callq 0x11a10
movq -0x10(%rbp), %rdi
callq 0x17200
movl $0x2, -0x4(%rbp)
jmp 0x145d4
movq -0x10(%rbp), %rdi
movl $0x2, %esi
callq 0x16c60
movq -0x10(%rbp), %rdi
movl $0x27, %esi
callq 0x11a10
movq -0x10(%rbp), %rdi
movl $0xfffd, %esi           # imm = 0xFFFD
movl $0x1, %edx
callq 0x174b0
movl $0x2, -0x4(%rbp)
jmp 0x145d4
movq -0x10(%rbp), %rdi
movl $0x13, %esi
callq 0x16c60
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x11a10
movq -0x10(%rbp), %rdi
callq 0x17510
movq -0x18(%rbp), %rax
movb $0x1, 0x4(%rax)
movl $0x2, -0x4(%rbp)
jmp 0x145d4
movq -0x10(%rbp), %rdi
movl $0x14, %esi
callq 0x16c60
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x11a10
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x172b0
movl $0x0, -0x4(%rbp)
jmp 0x145d4
movq -0x10(%rbp), %rdi
movl $0x15, %esi
callq 0x16c60
movq -0x10(%rbp), %rdi
movl $0x27, %esi
callq 0x11a10
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl $0x1, %edx
callq 0x174b0
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)