// File: /workspace/github_c_makefile_star2_O3/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, %r12
movq %rdi, %r14
movl $0x2, %ebx
cmpl $0x1f, %edx
jle 0xe6ae
cmpl $0x3b, %r15d
jg 0xe6d1
leal -0x20(%r15), %eax
cmpl $0x7, %eax
ja 0xe6f7
leaq 0xf056(%rip), %rcx      # 0x1d6ec
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x10(%r14), %rax
movl $0x25, (%rax)
jmp 0xe7af
cmpl $0x8, %r15d
jle 0xe73b
leal -0x9(%r15), %eax
cmpl $0x2, %eax
jb 0xe832
cmpl $0xc, %r15d
je 0xe832
jmp 0xe6f7
leal -0x3c(%r15), %eax
cmpl $0x2, %eax
jb 0xe6ea
cmpl $0x3e, %r15d
je 0xe80b
cmpl $0x60, %r15d
jne 0xe6f7
movq %r14, %rdi
movl $0x15, %esi
callq 0x10a60
movq 0x10(%r14), %rsi
movl $0x27, (%rsi)
cmpq $0x0, 0x70(%rsi)
jne 0xe732
movq 0x120(%rsi), %rax
movq %rax, 0xa0(%rsi)
movups 0x110(%rsi), %xmm0
movups %xmm0, 0x90(%rsi)
movq 0xe8(%rsi), %rax
movq %rax, 0x80(%rsi)
addq $0x68, %rsi
movl %r15d, %edi
jmp 0xe79b
cmpl $-0x1, %r15d
je 0xe7e7
testl %r15d, %r15d
jne 0xe6f7
movq %r14, %rdi
movl $0x2, %esi
callq 0x10a60
movq 0x10(%r14), %rsi
movl $0x27, (%rsi)
cmpq $0x0, 0x70(%rsi)
jne 0xe792
movq 0x120(%rsi), %rax
movq %rax, 0xa0(%rsi)
movups 0x110(%rsi), %xmm0
movups %xmm0, 0x90(%rsi)
movq 0xe8(%rsi), %rax
movq %rax, 0x80(%rsi)
addq $0x68, %rsi
movl $0xfffd, %edi           # imm = 0xFFFD
callq 0x4322
jmp 0xe832
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 0xe832
movq 0x10(%r14), %rax
movl $0x27, (%rax)
jmp 0xe803
movq %r14, %rdi
movl $0x13, %esi
callq 0x10a60
movq 0x10(%r14), %rdi
movl $0x0, (%rdi)
callq 0x10eb9
movb $0x1, 0x4(%r12)
jmp 0xe832
movq %rcx, %r13
movq %r14, %rdi
movl $0x14, %esi
callq 0x10a60
movq 0x10(%r14), %rax
movl $0x0, (%rax)
movq %r14, %rdi
movq %r13, %rsi
callq 0x10d4a
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq