// File: /workspace/github_c_makefile_star2_O3/GangZhuo[P]dohclient/http-parser/http_parser.c
// Function: parse_url_char
static enum state
parse_url_char(enum state s, const char ch)
{
  if (ch == ' ' || ch == '\r' || ch == '\n') {
    return s_dead;
  }

#if HTTP_PARSER_STRICT
  if (ch == '\t' || ch == '\f') {
    return s_dead;
  }
#endif

  switch (s) {
    case s_req_spaces_before_url:
      /* Proxied requests are followed by scheme of an absolute URI (alpha).
       * All methods except CONNECT are followed by '/' or '*'.
       */

      if (ch == '/' || ch == '*') {
        return s_req_path;
      }

      if (IS_ALPHA(ch)) {
        return s_req_schema;
      }

      break;

    case s_req_schema:
      if (IS_ALPHA(ch)) {
        return s;
      }

      if (ch == ':') {
        return s_req_schema_slash;
      }

      break;

    case s_req_schema_slash:
      if (ch == '/') {
        return s_req_schema_slash_slash;
      }

      break;

    case s_req_schema_slash_slash:
      if (ch == '/') {
        return s_req_server_start;
      }

      break;

    case s_req_server_with_at:
      if (ch == '@') {
        return s_dead;
      }

    /* fall through */
    case s_req_server_start:
    case s_req_server:
      if (ch == '/') {
        return s_req_path;
      }

      if (ch == '?') {
        return s_req_query_string_start;
      }

      if (ch == '@') {
        return s_req_server_with_at;
      }

      if (IS_USERINFO_CHAR(ch) || ch == '[' || ch == ']') {
        return s_req_server;
      }

      break;

    case s_req_path:
      if (IS_URL_CHAR(ch)) {
        return s;
      }

      switch (ch) {
        case '?':
          return s_req_query_string_start;

        case '#':
          return s_req_fragment_start;
      }

      break;

    case s_req_query_string_start:
    case s_req_query_string:
      if (IS_URL_CHAR(ch)) {
        return s_req_query_string;
      }

      switch (ch) {
        case '?':
          /* allow extra '?' in query string */
          return s_req_query_string;

        case '#':
          return s_req_fragment_start;
      }

      break;

    case s_req_fragment_start:
      if (IS_URL_CHAR(ch)) {
        return s_req_fragment;
      }

      switch (ch) {
        case '?':
          return s_req_fragment;

        case '#':
          return s;
      }

      break;

    case s_req_fragment:
      if (IS_URL_CHAR(ch)) {
        return s;
      }

      switch (ch) {
        case '?':
        case '#':
          return s;
      }

      break;

    default:
      break;
  }

  /* We should never fall out of the switch above unless there's an error */
  return s_dead;
}

// Assembly:
movl $0x1, %eax
cmpl $0x20, %esi
ja 0x7375
movl %esi, %ecx
movabsq $0x100003600, %rdx      # imm = 0x100003600
btq %rcx, %rdx
jae 0x7375
retq
addl $-0x14, %edi
cmpl $0xb, %edi
ja 0x74b0
leaq 0x19ecc(%rip), %rcx     # 0x21254
movslq (%rcx,%rdi,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
movsbl %sil, %eax
cmpl $0x40, %eax
je 0x75a1
cmpl $0x3f, %eax
je 0x7595
cmpl $0x2f, %eax
jne 0x7410
jmp 0x759b
movzbl %sil, %ecx
movl %ecx, %eax
shrl $0x3, %eax
leaq 0x1b11f(%rip), %rdx     # 0x224e0
movzbl (%rax,%rdx), %edx
andl $0x7, %ecx
movl $0x1d, %eax
btl %ecx, %edx
jb 0x7374
cmpb $0x23, %sil
movl $0x1e, %eax
movl $0x1, %ecx
cmovel %eax, %ecx
cmpb $0x3f, %sil
movl $0x1d, %eax
jmp 0x7591
movsbl %sil, %ecx
cmpl $0x2f, %ecx
je 0x759b
cmpl $0x3f, %ecx
je 0x7595
cmpl $0x40, %ecx
je 0x7374
leal -0x30(%rsi), %ecx
movl $0x19, %eax
cmpb $0xa, %cl
jb 0x7374
movl %esi, %ecx
orb $0x20, %cl
addb $-0x61, %cl
cmpb $0x1a, %cl
jb 0x7374
movsbl %sil, %ecx
leal -0x21(%rcx), %edx
cmpl $0x3e, %edx
ja 0x7452
movabsq $0x5400000016003ff9, %rsi # imm = 0x5400000016003FF9
btq %rdx, %rsi
jb 0x7374
cmpl $0x7e, %ecx
jne 0x74b0
jmp 0x7374
movzbl %sil, %ecx
movl %ecx, %eax
shrl $0x3, %eax
leaq 0x1b074(%rip), %rdx     # 0x224e0
movzbl (%rax,%rdx), %edx
andl $0x7, %ecx
movl $0x1f, %eax
btl %ecx, %edx
jb 0x7374
cmpb $0x23, %sil
movl $0x1f, %ecx
movl $0x1, %eax
cmovel %ecx, %eax
cmpb $0x3f, %sil
cmovel %ecx, %eax
retq
movl $0x17, %eax
jmp 0x74a6
movl $0x18, %eax
cmpb $0x2f, %sil
je 0x7374
movl $0x1, %eax
retq
movsbl %sil, %ecx
movl $0x1b, %eax
cmpl $0x2a, %ecx
je 0x7374
cmpl $0x2f, %ecx
je 0x7374
orb $0x20, %sil
addb $-0x61, %sil
movl $0x15, %eax
cmpb $0x1a, %sil
jb 0x7374
jmp 0x74b0
movl %esi, %ecx
orb $0x20, %cl
addb $-0x61, %cl
movl $0x15, %eax
cmpb $0x1a, %cl
jb 0x7374
movl $0x16, %eax
cmpb $0x3a, %sil
je 0x7374
jmp 0x74b0
movzbl %sil, %ecx
movl %ecx, %eax
shrl $0x3, %eax
leaq 0x1afbf(%rip), %rdx     # 0x224e0
movzbl (%rax,%rdx), %edx
andl $0x7, %ecx
movl $0x1b, %eax
btl %ecx, %edx
jb 0x7374
cmpb $0x23, %sil
movl $0x1e, %eax
movl $0x1, %ecx
cmovel %eax, %ecx
cmpb $0x3f, %sil
movl $0x1c, %eax
jmp 0x7591
movzbl %sil, %ecx
movl %ecx, %eax
shrl $0x3, %eax
leaq 0x1af7e(%rip), %rdx     # 0x224e0
movzbl (%rax,%rdx), %edx
andl $0x7, %ecx
movl $0x1f, %eax
btl %ecx, %edx
jb 0x7374
cmpb $0x23, %sil
movl $0x1e, %eax
movl $0x1, %ecx
cmovel %eax, %ecx
cmpb $0x3f, %sil
movl $0x1f, %eax
cmovnel %ecx, %eax
retq
movl $0x1c, %eax
retq
movl $0x1b, %eax
retq
movl $0x1a, %eax
retq