// File: /workspace/github_c_makefile_star2_O0/kieselsteini[P]PiXL-old/lua53.c
// Function: funcnamefromcode
static const char *funcnamefromcode (lua_State *L, CallInfo *ci,
                                     const char **name) {
  TMS tm = (TMS)0;  /* (initial value avoids warnings) */
  Proto *p = ci_func(ci)->p;  /* calling function */
  int pc = currentpc(ci);  /* calling instruction index */
  Instruction i = p->code[pc];  /* calling instruction */
  if (ci->callstatus & CIST_HOOKED) {  /* was it called inside a hook? */
    *name = "?";
    return "hook";
  }
  switch (GET_OPCODE(i)) {
    case OP_CALL:
    case OP_TAILCALL:
      return getobjname(p, pc, GETARG_A(i), name);  /* get function name */
    case OP_TFORCALL: {  /* for iterator */
      *name = "for iterator";
       return "for iterator";
    }
    /* other instructions can do calls through metamethods */
    case OP_SELF: case OP_GETTABUP: case OP_GETTABLE:
      tm = TM_INDEX;
      break;
    case OP_SETTABUP: case OP_SETTABLE:
      tm = TM_NEWINDEX;
      break;
    case OP_ADD: case OP_SUB: case OP_MUL: case OP_MOD:
    case OP_POW: case OP_DIV: case OP_IDIV: case OP_BAND:
    case OP_BOR: case OP_BXOR: case OP_SHL: case OP_SHR: {
      int offset = cast_int(GET_OPCODE(i)) - cast_int(OP_ADD);  /* ORDER OP */
      tm = cast(TMS, offset + cast_int(TM_ADD));  /* ORDER TM */
      break;
    }
    case OP_UNM: tm = TM_UNM; break;
    case OP_BNOT: tm = TM_BNOT; break;
    case OP_LEN: tm = TM_LEN; break;
    case OP_CONCAT: tm = TM_CONCAT; break;
    case OP_EQ: tm = TM_EQ; break;
    case OP_LT: tm = TM_LT; break;
    case OP_LE: tm = TM_LE; break;
    default:
      return NULL;  /* cannot find a reasonable name */
  }
  *name = getstr(G(L)->tmname[tm]);
  return "metamethod";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
callq 0x240a0
movl %eax, -0x34(%rbp)
movq -0x30(%rbp), %rax
movq 0x38(%rax), %rax
movslq -0x34(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movzwl 0x42(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x242f9
movq -0x20(%rbp), %rax
leaq 0x3229b(%rip), %rcx     # 0x56581
movq %rcx, (%rax)
leaq 0x3219b(%rip), %rax     # 0x5648b
movq %rax, -0x8(%rbp)
jmp 0x24406
movl -0x38(%rbp), %eax
andl $0x3f, %eax
addl $-0x6, %eax
movl %eax, %ecx
movq %rcx, -0x48(%rbp)
subl $0x23, %eax
ja 0x243d3
movq -0x48(%rbp), %rax
leaq 0x30690(%rip), %rcx     # 0x549ac
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x30(%rbp), %rdi
movl -0x34(%rbp), %esi
movl -0x38(%rbp), %edx
shrl $0x6, %edx
andl $0xff, %edx
movq -0x20(%rbp), %rcx
callq 0x24410
movq %rax, -0x8(%rbp)
jmp 0x24406
movq -0x20(%rbp), %rax
leaq 0x3223e(%rip), %rcx     # 0x56593
movq %rcx, (%rax)
leaq 0x32234(%rip), %rax     # 0x56593
movq %rax, -0x8(%rbp)
jmp 0x24406
movl $0x0, -0x24(%rbp)
jmp 0x243dd
movl $0x1, -0x24(%rbp)
jmp 0x243dd
movl -0x38(%rbp), %eax
shrl $0x0, %eax
andl $0x3f, %eax
subl $0xd, %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
addl $0x6, %eax
movl %eax, -0x24(%rbp)
jmp 0x243dd
movl $0x12, -0x24(%rbp)
jmp 0x243dd
movl $0x13, -0x24(%rbp)
jmp 0x243dd
movl $0x4, -0x24(%rbp)
jmp 0x243dd
movl $0x16, -0x24(%rbp)
jmp 0x243dd
movl $0x5, -0x24(%rbp)
jmp 0x243dd
movl $0x14, -0x24(%rbp)
jmp 0x243dd
movl $0x15, -0x24(%rbp)
jmp 0x243dd
movq $0x0, -0x8(%rbp)
jmp 0x24406
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movl -0x24(%rbp), %ecx
movq 0xe0(%rax,%rcx,8), %rcx
addq $0x18, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
leaq 0x32186(%rip), %rax     # 0x56588
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq