// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rcx
movq (%rcx), %rax
movq %rax, %rdx
incq %rdx
movq %rdx, (%rcx)
movsbl (%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
movl -0x24(%rbp), %eax
addl $-0x20, %eax
movl %eax, %ecx
movq %rcx, -0x30(%rbp)
subl $0x5a, %eax
ja 0x303b8
movq -0x30(%rbp), %rax
leaq 0x6b14(%rip), %rcx      # 0x36c98
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x20(%rbp), %rax
movl $0x1, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x303d7
movq -0x20(%rbp), %rax
movl $0x1, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x303d7
movq -0x20(%rbp), %rax
movl $0x2, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x303d7
movq -0x20(%rbp), %rax
movl $0x2, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x303d7
movq -0x20(%rbp), %rax
movl $0x8, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x303d7
movq -0x20(%rbp), %rax
movl $0x8, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x303d7
movq -0x20(%rbp), %rax
movl $0x8, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x303d7
movq -0x20(%rbp), %rax
movl $0x8, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x303d7
movq -0x20(%rbp), %rax
movl $0x8, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x303d7
movq -0x20(%rbp), %rax
movl $0x4, (%rax)
movl $0x2, -0x4(%rbp)
jmp 0x303d7
movq -0x20(%rbp), %rax
movl $0x8, (%rax)
movl $0x2, -0x4(%rbp)
jmp 0x303d7
movq -0x20(%rbp), %rax
movl $0x8, (%rax)
movl $0x2, -0x4(%rbp)
jmp 0x303d7
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x4, %edx
callq 0x303e0
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x303d7
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x4, %edx
callq 0x303e0
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movl $0x1, -0x4(%rbp)
jmp 0x303d7
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x8, %edx
callq 0x303e0
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movl $0x4, -0x4(%rbp)
jmp 0x303d7
movq -0x18(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x30440
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x20(%rbp), %rax
cmpl $-0x1, (%rax)
jne 0x3033b
movq -0x10(%rbp), %rax
movq (%rax), %rdi
leaq 0x6e57(%rip), %rsi      # 0x3718b
movb $0x0, %al
callq 0x1fbf0
movl $0x3, -0x4(%rbp)
jmp 0x303d7
movl $0x5, -0x4(%rbp)
jmp 0x303d7
movq -0x20(%rbp), %rax
movl $0x1, (%rax)
movl $0x6, -0x4(%rbp)
jmp 0x303d7
movl $0x7, -0x4(%rbp)
jmp 0x303d7
jmp 0x303d0
movq -0x10(%rbp), %rax
movl $0x1, 0x8(%rax)
jmp 0x303d0
movq -0x10(%rbp), %rax
movl $0x0, 0x8(%rax)
jmp 0x303d0
movsbl 0x6a72(%rip), %ecx      # 0x36e04
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
jmp 0x303d0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x8, %edx
callq 0x303e0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc(%rax)
jmp 0x303d0
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl -0x24(%rbp), %edx
leaq 0x6de5(%rip), %rsi      # 0x371ae
movb $0x0, %al
callq 0x1fbf0
movl $0x8, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq