// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %edx, %r15d
movq %rsi, %r13
movq %rdi, %r14
pushq $0x2
popq %rbx
leal -0x20(%r15), %eax
cmpl $0x7, %eax
jbe 0xd494
leal -0x9(%r15), %eax
cmpl $0x2, %eax
jb 0xd559
leal -0x3c(%r15), %eax
cmpl $0x2, %eax
jb 0xd46c
cmpl $-0x1, %r15d
je 0xd53a
testl %r15d, %r15d
je 0xd4f2
cmpl $0xc, %r15d
je 0xd559
cmpl $0x3e, %r15d
je 0xd516
cmpl $0x60, %r15d
jne 0xd477
pushq $0x15
popq %rsi
movq %r14, %rdi
callq 0xed94
movq 0x10(%r14), %rax
movl $0x27, (%rax)
pushq $0x1
popq %rdx
movq %r14, %rdi
movl %r15d, %esi
callq 0xf1ea
jmp 0xd559
leaq 0xe1c1(%rip), %rcx      # 0x1b65c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x10(%r14), %rax
movl $0x25, (%rax)
jmp 0xd4ba
movq 0x10(%r14), %rax
movl $0x26, (%rax)
movups 0x110(%rax), %xmm0
movups %xmm0, 0x90(%rax)
movq 0x120(%rax), %rcx
movq %rcx, 0xa0(%rax)
movq 0xe8(%rax), %rcx
movq %rcx, 0x80(%rax)
jmp 0xd559
movq 0x10(%r14), %rax
movl $0x27, (%rax)
jmp 0xd554
movq %r14, %rdi
movl %ebx, %esi
callq 0xed94
movq 0x10(%r14), %rax
movl $0x27, (%rax)
pushq $0x1
popq %rdx
movq %r14, %rdi
movl $0xfffd, %esi           # imm = 0xFFFD
jmp 0xd48a
movq %rcx, %r12
pushq $0x14
popq %rsi
movq %r14, %rdi
callq 0xed94
movq 0x10(%r14), %rax
andl $0x0, (%rax)
movq %r14, %rdi
movq %r12, %rsi
callq 0xf08d
xorl %ebx, %ebx
jmp 0xd559
pushq $0x13
popq %rsi
movq %r14, %rdi
callq 0xed94
movq 0x10(%r14), %rax
andl $0x0, (%rax)
movq %r14, %rdi
callq 0xf234
movb $0x1, 0x4(%r13)
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq