// File: /workspace/github_c_makefile_star2_O1/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 0xf071
cmpl $0x3b, %r15d
jg 0xf094
leal -0x20(%r15), %eax
cmpl $0x7, %eax
ja 0xf0ba
leaq 0x10573(%rip), %rcx     # 0x1f5cc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x10(%r14), %rax
movl $0x25, (%rax)
jmp 0xf172
cmpl $0x8, %r15d
jle 0xf0fe
leal -0x9(%r15), %eax
cmpl $0x2, %eax
jb 0xf1f8
cmpl $0xc, %r15d
je 0xf1f8
jmp 0xf0ba
leal -0x3c(%r15), %eax
cmpl $0x2, %eax
jb 0xf0ad
cmpl $0x3e, %r15d
je 0xf1d1
cmpl $0x60, %r15d
jne 0xf0ba
movq %r14, %rdi
movl $0x15, %esi
callq 0x11412
movq 0x10(%r14), %rsi
movl $0x27, (%rsi)
cmpq $0x0, 0x70(%rsi)
jne 0xf0f5
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 0xf15e
cmpl $-0x1, %r15d
je 0xf1aa
testl %r15d, %r15d
jne 0xf0ba
movq %r14, %rdi
movl $0x2, %esi
callq 0x11412
movq 0x10(%r14), %rsi
movl $0x27, (%rsi)
cmpq $0x0, 0x70(%rsi)
jne 0xf155
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 0xf1f8
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 0xf1f8
movq 0x10(%r14), %rax
movl $0x27, (%rax)
jmp 0xf1c9
movq %r14, %rdi
movl $0x13, %esi
callq 0x11412
movq 0x10(%r14), %rax
movl $0x0, (%rax)
movq %r14, %rdi
callq 0x11914
movb $0x1, 0x4(%r12)
jmp 0xf1f8
movq %rcx, %r13
movq %r14, %rdi
movl $0x14, %esi
callq 0x11412
movq 0x10(%r14), %rax
movl $0x0, (%rax)
movq %r14, %rdi
movq %r13, %rsi
callq 0x117b0
xorl %ebx, %ebx
movl %ebx, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq