// File: /workspace/github_c_makefile_star2_O2/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, %rbx
movq (%rsi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, (%rsi)
movzbl (%rax), %eax
andl $0x0, (%rdx)
movq %rdi, %r14
leal -0x62(%rax), %ecx
cmpl $0x18, %ecx
ja 0x1c9d9
leaq 0x4b3f(%rip), %rdx      # 0x21504
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movl $0x8, (%rbx)
jmp 0x1caa1
leal -0x3c(%rax), %ecx
cmpl $0x10, %ecx
ja 0x1c9fe
leaq 0x4ad8(%rip), %rdx      # 0x214c0
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movl $0x1, 0x8(%r14)
jmp 0x1cafb
cmpl $0x20, %eax
je 0x1cafb
cmpl $0x21, %eax
je 0x1caec
cmpl $0x54, %eax
je 0x1ca21
cmpl $0x58, %eax
jne 0x1ca34
pushq $0x7
jmp 0x1cafd
movl $0x8, (%rbx)
jmp 0x1cae8
movl $0x8, (%rbx)
jmp 0x1ca53
movsbl %al, %edx
movq (%r14), %rdi
leaq 0x4ecd(%rip), %rsi      # 0x2190e
xorl %eax, %eax
callq 0x12bd6
jmp 0x1cafb
movl $0x4, (%rbx)
pushq $0x2
jmp 0x1cafd
movl $0x1, (%rbx)
jmp 0x1caa1
pushq $0x4
popq %rdx
movq %r14, %rdi
callq 0x1cb08
movl %eax, (%rbx)
jmp 0x1caa1
pushq $-0x1
popq %rax
movq %rsi, %rdi
movl %eax, %esi
callq 0x1cb43
movl %eax, (%rbx)
pushq $0x3
popq %rbx
cmpl $-0x1, %eax
jne 0x1cafe
movq (%r14), %rdi
leaq 0x4e59(%rip), %rsi      # 0x218eb
xorl %eax, %eax
callq 0x12bd6
jmp 0x1cafe
movl $0x2, (%rbx)
xorl %ebx, %ebx
jmp 0x1cafe
movl $0x1, (%rbx)
pushq $0x6
jmp 0x1cafd
pushq $0x8
popq %rdx
movq %r14, %rdi
callq 0x1cb08
movl %eax, (%rbx)
pushq $0x4
jmp 0x1cafd
pushq $0x5
jmp 0x1cafd
movl $0x1, (%rbx)
jmp 0x1cae8
andl $0x0, 0x8(%r14)
jmp 0x1cafb
movl $0x2, (%rbx)
jmp 0x1cae8
pushq $0x4
popq %rdx
movq %r14, %rdi
callq 0x1cb08
movl %eax, (%rbx)
pushq $0x1
jmp 0x1cafd
pushq $0x8
popq %rdx
movq %r14, %rdi
callq 0x1cb08
movl %eax, 0xc(%r14)
pushq $0x8
popq %rbx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq