// File: /workspace/github_c_makefile_star2_O3/tylerneylon[P]APIsWithLua/lua/lstrlib.c
// Function: getoption
static KOption getoption (Header *h, const char **fmt, int *size) {
  int opt = *((*fmt)++);
  *size = 0;  /* default */
  switch (opt) {
    case 'b': *size = sizeof(char); return Kint;
    case 'B': *size = sizeof(char); return Kuint;
    case 'h': *size = sizeof(short); return Kint;
    case 'H': *size = sizeof(short); return Kuint;
    case 'l': *size = sizeof(long); return Kint;
    case 'L': *size = sizeof(long); return Kuint;
    case 'j': *size = sizeof(lua_Integer); return Kint;
    case 'J': *size = sizeof(lua_Integer); return Kuint;
    case 'T': *size = sizeof(size_t); return Kuint;
    case 'f': *size = sizeof(float); return Kfloat;
    case 'd': *size = sizeof(double); return Kfloat;
    case 'n': *size = sizeof(lua_Number); return Kfloat;
    case 'i': *size = getnumlimit(h, fmt, sizeof(int)); return Kint;
    case 'I': *size = getnumlimit(h, fmt, sizeof(int)); return Kuint;
    case 's': *size = getnumlimit(h, fmt, sizeof(size_t)); return Kstring;
    case 'c':
      *size = getnum(fmt, -1);
      if (*size == -1)
        luaL_error(h->L, "missing size for format option 'c'");
      return Kchar;
    case 'z': return Kzstr;
    case 'x': *size = 1; return Kpadding;
    case 'X': return Kpaddalign;
    case ' ': break;
    case '<': h->islittle = 1; break;
    case '>': h->islittle = 0; break;
    case '=': h->islittle = nativeendian.little; break;
    case '!': h->maxalign = getnumlimit(h, fmt, MAXALIGN); break;
    default: luaL_error(h->L, "invalid format option '%c'", opt);
  }
  return Knop;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
movq (%rsi), %rax
leaq 0x1(%rax), %rdx
movq %rdx, (%rsi)
movzbl (%rax), %ecx
movl $0x0, (%r14)
cmpl $0x53, %ecx
jg 0x1f564
leal -0x3c(%rcx), %eax
cmpl $0x10, %eax
ja 0x1f588
leaq 0x4ec9(%rip), %rdx      # 0x24418
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
jmpq *%rax
movl $0x1, 0x8(%rbx)
jmp 0x1f61a
leal -0x62(%rcx), %edi
cmpl $0x18, %edi
ja 0x1f5a8
leaq 0x4ee9(%rip), %r8       # 0x2445c
movslq (%r8,%rdi,4), %rdi
addq %r8, %rdi
jmpq *%rdi
movl $0x8, (%r14)
jmp 0x1f683
cmpl $0x20, %ecx
je 0x1f61a
cmpl $0x21, %ecx
jne 0x1f606
movq %rbx, %rdi
movl $0x8, %edx
callq 0x1f6ec
movl %eax, 0xc(%rbx)
jmp 0x1f61a
cmpl $0x54, %ecx
je 0x1f5bc
cmpl $0x58, %ecx
jne 0x1f606
movl $0x7, %eax
jmp 0x1f693
movl $0x8, (%r14)
jmp 0x1f5fc
movl $0x8, (%r14)
jmp 0x1f68e
movl $0x0, 0x8(%rbx)
jmp 0x1f61a
movq %rbx, %rdi
movl $0x4, %edx
callq 0x1f6ec
movl %eax, (%r14)
jmp 0x1f5fc
movl $0x1, (%r14)
jmp 0x1f5fc
movl $0x2, (%r14)
movl $0x1, %eax
jmp 0x1f693
movsbl %cl, %edx
movq (%rbx), %rdi
leaq 0x5293(%rip), %rsi      # 0x248a6
xorl %eax, %eax
callq 0x14a62
movl $0x8, %eax
jmp 0x1f693
movl $0x5, %eax
jmp 0x1f693
movq %rbx, %rdi
movl $0x8, %edx
callq 0x1f6ec
movl %eax, (%r14)
movl $0x4, %eax
jmp 0x1f693
movl $0x2, (%r14)
jmp 0x1f683
movl $0x1, (%r14)
movl $0x6, %eax
jmp 0x1f693
movsbl (%rdx), %ecx
addl $-0x3a, %ecx
cmpl $-0xa, %ecx
jae 0x1f69b
movl $0xffffffff, (%r14)     # imm = 0xFFFFFFFF
jmp 0x1f6d4
movl $0x1, (%r14)
jmp 0x1f683
movq %rbx, %rdi
movl $0x4, %edx
callq 0x1f6ec
movl %eax, (%r14)
xorl %eax, %eax
jmp 0x1f693
movl $0x4, (%r14)
movl $0x2, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
addq $0x2, %rax
xorl %ecx, %ecx
leal (%rcx,%rcx,4), %ecx
movq %rax, (%rsi)
movsbl -0x1(%rax), %edx
leal (%rdx,%rcx,2), %ecx
addl $-0x30, %ecx
movsbl (%rax), %edx
addl $-0x30, %edx
cmpl $0x9, %edx
ja 0x1f6c7
incq %rax
cmpl $0xccccccc, %ecx        # imm = 0xCCCCCCC
jl 0x1f6a1
movl %ecx, (%r14)
movl $0x3, %eax
cmpl $-0x1, %ecx
jne 0x1f693
movq (%rbx), %rdi
leaq 0x51a5(%rip), %rsi      # 0x24883
xorl %eax, %eax
callq 0x14a62
movl $0x3, %eax
jmp 0x1f693