// File: /workspace/github_c_makefile_star2_O1/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 0x7621
movl %esi, %ecx
movabsq $0x100003600, %rdx      # imm = 0x100003600
btq %rcx, %rdx
jae 0x7621
retq
addl $-0x14, %edi
cmpl $0xb, %edi
ja 0x775c
leaq 0x19c20(%rip), %rcx     # 0x21254
movslq (%rcx,%rdi,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
movsbl %sil, %eax
cmpl $0x40, %eax
je 0x784d
cmpl $0x3f, %eax
je 0x7841
cmpl $0x2f, %eax
jne 0x76bc
jmp 0x7847
movzbl %sil, %ecx
movl %ecx, %eax
shrl $0x3, %eax
leaq 0x1ae93(%rip), %rdx     # 0x22500
movzbl (%rax,%rdx), %edx
andl $0x7, %ecx
movl $0x1d, %eax
btl %ecx, %edx
jb 0x7620
cmpb $0x23, %sil
movl $0x1e, %eax
movl $0x1, %ecx
cmovel %eax, %ecx
cmpb $0x3f, %sil
movl $0x1d, %eax
jmp 0x783d
movsbl %sil, %ecx
cmpl $0x2f, %ecx
je 0x7847
cmpl $0x3f, %ecx
je 0x7841
cmpl $0x40, %ecx
je 0x7620
leal -0x30(%rsi), %ecx
movl $0x19, %eax
cmpb $0xa, %cl
jb 0x7620
movl %esi, %ecx
orb $0x20, %cl
addb $-0x61, %cl
cmpb $0x1a, %cl
jb 0x7620
movsbl %sil, %ecx
leal -0x21(%rcx), %edx
cmpl $0x3e, %edx
ja 0x76fe
movabsq $0x5400000016003ff9, %rsi # imm = 0x5400000016003FF9
btq %rdx, %rsi
jb 0x7620
cmpl $0x7e, %ecx
jne 0x775c
jmp 0x7620
movzbl %sil, %ecx
movl %ecx, %eax
shrl $0x3, %eax
leaq 0x1ade8(%rip), %rdx     # 0x22500
movzbl (%rax,%rdx), %edx
andl $0x7, %ecx
movl $0x1f, %eax
btl %ecx, %edx
jb 0x7620
cmpb $0x23, %sil
movl $0x1f, %ecx
movl $0x1, %eax
cmovel %ecx, %eax
cmpb $0x3f, %sil
cmovel %ecx, %eax
retq
movl $0x17, %eax
jmp 0x7752
movl $0x18, %eax
cmpb $0x2f, %sil
je 0x7620
movl $0x1, %eax
retq
movsbl %sil, %ecx
movl $0x1b, %eax
cmpl $0x2a, %ecx
je 0x7620
cmpl $0x2f, %ecx
je 0x7620
orb $0x20, %sil
addb $-0x61, %sil
movl $0x15, %eax
cmpb $0x1a, %sil
jb 0x7620
jmp 0x775c
movl %esi, %ecx
orb $0x20, %cl
addb $-0x61, %cl
movl $0x15, %eax
cmpb $0x1a, %cl
jb 0x7620
movl $0x16, %eax
cmpb $0x3a, %sil
je 0x7620
jmp 0x775c
movzbl %sil, %ecx
movl %ecx, %eax
shrl $0x3, %eax
leaq 0x1ad33(%rip), %rdx     # 0x22500
movzbl (%rax,%rdx), %edx
andl $0x7, %ecx
movl $0x1b, %eax
btl %ecx, %edx
jb 0x7620
cmpb $0x23, %sil
movl $0x1e, %eax
movl $0x1, %ecx
cmovel %eax, %ecx
cmpb $0x3f, %sil
movl $0x1c, %eax
jmp 0x783d
movzbl %sil, %ecx
movl %ecx, %eax
shrl $0x3, %eax
leaq 0x1acf2(%rip), %rdx     # 0x22500
movzbl (%rax,%rdx), %edx
andl $0x7, %ecx
movl $0x1f, %eax
btl %ecx, %edx
jb 0x7620
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