// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]dohclient/http-parser/http_parser.c
// Function: http_parse_host_char
static enum http_host_state
http_parse_host_char(enum http_host_state s, const char ch) {
  switch(s) {
    case s_http_userinfo:
    case s_http_userinfo_start:
      if (ch == '@') {
        return s_http_host_start;
      }

      if (IS_USERINFO_CHAR(ch)) {
        return s_http_userinfo;
      }
      break;

    case s_http_host_start:
      if (ch == '[') {
        return s_http_host_v6_start;
      }

      if (IS_HOST_CHAR(ch)) {
        return s_http_host;
      }

      break;

    case s_http_host:
      if (IS_HOST_CHAR(ch)) {
        return s_http_host;
      }

    /* fall through */
    case s_http_host_v6_end:
      if (ch == ':') {
        return s_http_host_port_start;
      }

      break;

    case s_http_host_v6:
      if (ch == ']') {
        return s_http_host_v6_end;
      }

    /* fall through */
    case s_http_host_v6_start:
      if (IS_HEX(ch) || ch == ':' || ch == '.') {
        return s_http_host_v6;
      }

      if (s == s_http_host_v6 && ch == '%') {
        return s_http_host_v6_zone_start;
      }
      break;

    case s_http_host_v6_zone:
      if (ch == ']') {
        return s_http_host_v6_end;
      }

    /* fall through */
    case s_http_host_v6_zone_start:
      /* RFC 6874 Zone ID consists of 1*( unreserved / pct-encoded) */
      if (IS_ALPHANUM(ch) || ch == '%' || ch == '.' || ch == '-' || ch == '_' ||
          ch == '~') {
        return s_http_host_v6_zone;
      }
      break;

    case s_http_host_port:
    case s_http_host_port_start:
      if (IS_NUM(ch)) {
        return s_http_host_port;
      }

      break;

    default:
      break;
  }
  return s_http_host_dead;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %sil, %al
movl %edi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movl -0x8(%rbp), %eax
addl $-0x2, %eax
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0xa, %eax
ja 0xb848
movq -0x18(%rbp), %rax
leaq 0x294cb(%rip), %rcx     # 0x34a18
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movsbl -0x9(%rbp), %eax
cmpl $0x40, %eax
jne 0xb56b
movl $0x4, -0x4(%rbp)
jmp 0xb851
movsbl -0x9(%rbp), %eax
orl $0x20, %eax
movzbl %al, %eax
cmpl $0x61, %eax
jl 0xb58d
movsbl -0x9(%rbp), %eax
orl $0x20, %eax
movzbl %al, %eax
cmpl $0x7a, %eax
jle 0xb644
movsbl -0x9(%rbp), %eax
cmpl $0x30, %eax
jl 0xb5a3
movsbl -0x9(%rbp), %eax
cmpl $0x39, %eax
jle 0xb644
movsbl -0x9(%rbp), %eax
cmpl $0x2d, %eax
je 0xb644
movsbl -0x9(%rbp), %eax
cmpl $0x5f, %eax
je 0xb644
movsbl -0x9(%rbp), %eax
cmpl $0x2e, %eax
je 0xb644
movsbl -0x9(%rbp), %eax
cmpl $0x21, %eax
je 0xb644
movsbl -0x9(%rbp), %eax
cmpl $0x7e, %eax
je 0xb644
movsbl -0x9(%rbp), %eax
cmpl $0x2a, %eax
je 0xb644
movsbl -0x9(%rbp), %eax
cmpl $0x27, %eax
je 0xb644
movsbl -0x9(%rbp), %eax
cmpl $0x28, %eax
je 0xb644
movsbl -0x9(%rbp), %eax
cmpl $0x29, %eax
je 0xb644
movsbl -0x9(%rbp), %eax
cmpl $0x25, %eax
je 0xb644
movsbl -0x9(%rbp), %eax
cmpl $0x3b, %eax
je 0xb644
movsbl -0x9(%rbp), %eax
cmpl $0x3a, %eax
je 0xb644
movsbl -0x9(%rbp), %eax
cmpl $0x26, %eax
je 0xb644
movsbl -0x9(%rbp), %eax
cmpl $0x3d, %eax
je 0xb644
movsbl -0x9(%rbp), %eax
cmpl $0x2b, %eax
je 0xb644
movsbl -0x9(%rbp), %eax
cmpl $0x24, %eax
je 0xb644
movsbl -0x9(%rbp), %eax
cmpl $0x2c, %eax
jne 0xb650
movl $0x3, -0x4(%rbp)
jmp 0xb851
jmp 0xb84a
movsbl -0x9(%rbp), %eax
cmpl $0x5b, %eax
jne 0xb66a
movl $0x5, -0x4(%rbp)
jmp 0xb851
movsbl -0x9(%rbp), %eax
orl $0x20, %eax
movzbl %al, %eax
cmpl $0x61, %eax
jl 0xb688
movsbl -0x9(%rbp), %eax
orl $0x20, %eax
movzbl %al, %eax
cmpl $0x7a, %eax
jle 0xb6ac
movsbl -0x9(%rbp), %eax
cmpl $0x30, %eax
jl 0xb69a
movsbl -0x9(%rbp), %eax
cmpl $0x39, %eax
jle 0xb6ac
movsbl -0x9(%rbp), %eax
cmpl $0x2e, %eax
je 0xb6ac
movsbl -0x9(%rbp), %eax
cmpl $0x2d, %eax
jne 0xb6b8
movl $0x6, -0x4(%rbp)
jmp 0xb851
jmp 0xb84a
movsbl -0x9(%rbp), %eax
orl $0x20, %eax
movzbl %al, %eax
cmpl $0x61, %eax
jl 0xb6db
movsbl -0x9(%rbp), %eax
orl $0x20, %eax
movzbl %al, %eax
cmpl $0x7a, %eax
jle 0xb6ff
movsbl -0x9(%rbp), %eax
cmpl $0x30, %eax
jl 0xb6ed
movsbl -0x9(%rbp), %eax
cmpl $0x39, %eax
jle 0xb6ff
movsbl -0x9(%rbp), %eax
cmpl $0x2e, %eax
je 0xb6ff
movsbl -0x9(%rbp), %eax
cmpl $0x2d, %eax
jne 0xb70b
movl $0x6, -0x4(%rbp)
jmp 0xb851
jmp 0xb70d
movsbl -0x9(%rbp), %eax
cmpl $0x3a, %eax
jne 0xb722
movl $0xb, -0x4(%rbp)
jmp 0xb851
jmp 0xb84a
movsbl -0x9(%rbp), %eax
cmpl $0x5d, %eax
jne 0xb73c
movl $0x8, -0x4(%rbp)
jmp 0xb851
jmp 0xb73e
movsbl -0x9(%rbp), %eax
cmpl $0x30, %eax
jl 0xb750
movsbl -0x9(%rbp), %eax
cmpl $0x39, %eax
jle 0xb780
movsbl -0x9(%rbp), %eax
orl $0x20, %eax
movzbl %al, %eax
cmpl $0x61, %eax
jl 0xb76e
movsbl -0x9(%rbp), %eax
orl $0x20, %eax
movzbl %al, %eax
cmpl $0x66, %eax
jle 0xb780
movsbl -0x9(%rbp), %eax
cmpl $0x3a, %eax
je 0xb780
movsbl -0x9(%rbp), %eax
cmpl $0x2e, %eax
jne 0xb78c
movl $0x7, -0x4(%rbp)
jmp 0xb851
cmpl $0x7, -0x8(%rbp)
jne 0xb7a7
movsbl -0x9(%rbp), %eax
cmpl $0x25, %eax
jne 0xb7a7
movl $0x9, -0x4(%rbp)
jmp 0xb851
jmp 0xb84a
movsbl -0x9(%rbp), %eax
cmpl $0x5d, %eax
jne 0xb7c1
movl $0x8, -0x4(%rbp)
jmp 0xb851
jmp 0xb7c3
movsbl -0x9(%rbp), %eax
orl $0x20, %eax
movzbl %al, %eax
cmpl $0x61, %eax
jl 0xb7e1
movsbl -0x9(%rbp), %eax
orl $0x20, %eax
movzbl %al, %eax
cmpl $0x7a, %eax
jle 0xb820
movsbl -0x9(%rbp), %eax
cmpl $0x30, %eax
jl 0xb7f3
movsbl -0x9(%rbp), %eax
cmpl $0x39, %eax
jle 0xb820
movsbl -0x9(%rbp), %eax
cmpl $0x25, %eax
je 0xb820
movsbl -0x9(%rbp), %eax
cmpl $0x2e, %eax
je 0xb820
movsbl -0x9(%rbp), %eax
cmpl $0x2d, %eax
je 0xb820
movsbl -0x9(%rbp), %eax
cmpl $0x5f, %eax
je 0xb820
movsbl -0x9(%rbp), %eax
cmpl $0x7e, %eax
jne 0xb829
movl $0xa, -0x4(%rbp)
jmp 0xb851
jmp 0xb84a
movsbl -0x9(%rbp), %eax
cmpl $0x30, %eax
jl 0xb846
movsbl -0x9(%rbp), %eax
cmpl $0x39, %eax
jg 0xb846
movl $0xc, -0x4(%rbp)
jmp 0xb851
jmp 0xb84a
jmp 0xb84a
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)