// File: /workspace/github_c_makefile_star2_O0/bhk[P]tooltree/lua/../opensource/lua-5.2.3/src/luac.c
// Function: PrintCode
static void PrintCode(const Proto* f)
{
 const Instruction* code=f->code;
 int pc,n=f->sizecode;
 for (pc=0; pc<n; pc++)
 {
  Instruction i=code[pc];
  OpCode o=GET_OPCODE(i);
  int a=GETARG_A(i);
  int b=GETARG_B(i);
  int c=GETARG_C(i);
  int ax=GETARG_Ax(i);
  int bx=GETARG_Bx(i);
  int sbx=GETARG_sBx(i);
  int line=getfuncline(f,pc);
  printf("\t%d\t",pc+1);
  if (line>0) printf("[%d]\t",line); else printf("[-]\t");
  printf("%-9s\t",luaP_opnames[o]);
  switch (getOpMode(o))
  {
   case iABC:
    printf("%d",a);
    if (getBMode(o)!=OpArgN) printf(" %d",ISK(b) ? (MYK(INDEXK(b))) : b);
    if (getCMode(o)!=OpArgN) printf(" %d",ISK(c) ? (MYK(INDEXK(c))) : c);
    break;
   case iABx:
    printf("%d",a);
    if (getBMode(o)==OpArgK) printf(" %d",MYK(bx));
    if (getBMode(o)==OpArgU) printf(" %d",bx);
    break;
   case iAsBx:
    printf("%d %d",a,sbx);
    break;
   case iAx:
    printf("%d",MYK(ax));
    break;
  }
  switch (o)
  {
   case OP_LOADK:
    printf("\t; "); PrintConstant(f,bx);
    break;
   case OP_GETUPVAL:
   case OP_SETUPVAL:
    printf("\t; %s",UPVALNAME(b));
    break;
   case OP_GETTABUP:
    printf("\t; %s",UPVALNAME(b));
    if (ISK(c)) { printf(" "); PrintConstant(f,INDEXK(c)); }
    break;
   case OP_SETTABUP:
    printf("\t; %s",UPVALNAME(a));
    if (ISK(b)) { printf(" "); PrintConstant(f,INDEXK(b)); }
    if (ISK(c)) { printf(" "); PrintConstant(f,INDEXK(c)); }
    break;
   case OP_GETTABLE:
   case OP_SELF:
    if (ISK(c)) { printf("\t; "); PrintConstant(f,INDEXK(c)); }
    break;
   case OP_SETTABLE:
   case OP_ADD:
   case OP_SUB:
   case OP_MUL:
   case OP_DIV:
   case OP_POW:
   case OP_EQ:
   case OP_LT:
   case OP_LE:
    if (ISK(b) || ISK(c))
    {
     printf("\t; ");
     if (ISK(b)) PrintConstant(f,INDEXK(b)); else printf("-");
     printf(" ");
     if (ISK(c)) PrintConstant(f,INDEXK(c)); else printf("-");
    }
    break;
   case OP_JMP:
   case OP_FORLOOP:
   case OP_FORPREP:
   case OP_TFORLOOP:
    printf("\t; to %d",sbx+pc+2);
    break;
   case OP_CLOSURE:
    printf("\t; %p",VOID(f->p[bx]));
    break;
   case OP_SETLIST:
    if (c==0) printf("\t; %d",(int)code[++pc]); else printf("\t; %d",c);
    break;
   case OP_EXTRAARG:
    printf("\t; "); PrintConstant(f,ax);
    break;
   default:
    break;
  }
  printf("\n");
 }
}

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movq 0x70(%rsp), %rax
movq 0x18(%rax), %rax
movq %rax, 0x68(%rsp)
movq 0x70(%rsp), %rax
movl 0x58(%rax), %eax
movl %eax, 0x60(%rsp)
movl $0x0, 0x64(%rsp)
movl 0x64(%rsp), %eax
cmpl 0x60(%rsp), %eax
jge 0x55f8
movq 0x68(%rsp), %rax
movslq 0x64(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0x5c(%rsp)
movl 0x5c(%rsp), %eax
shrl $0x0, %eax
andl $0x3f, %eax
movl %eax, 0x58(%rsp)
movl 0x5c(%rsp), %eax
shrl $0x6, %eax
andl $0xff, %eax
movl %eax, 0x54(%rsp)
movl 0x5c(%rsp), %eax
shrl $0x17, %eax
andl $0x1ff, %eax            # imm = 0x1FF
movl %eax, 0x50(%rsp)
movl 0x5c(%rsp), %eax
shrl $0xe, %eax
andl $0x1ff, %eax            # imm = 0x1FF
movl %eax, 0x4c(%rsp)
movl 0x5c(%rsp), %eax
shrl $0x6, %eax
andl $0x3ffffff, %eax        # imm = 0x3FFFFFF
movl %eax, 0x48(%rsp)
movl 0x5c(%rsp), %eax
shrl $0xe, %eax
andl $0x3ffff, %eax          # imm = 0x3FFFF
movl %eax, 0x44(%rsp)
movl 0x5c(%rsp), %eax
shrl $0xe, %eax
andl $0x3ffff, %eax          # imm = 0x3FFFF
subl $0x1ffff, %eax          # imm = 0x1FFFF
movl %eax, 0x40(%rsp)
movq 0x70(%rsp), %rax
cmpq $0x0, 0x28(%rax)
je 0x5040
movq 0x70(%rsp), %rax
movq 0x28(%rax), %rax
movslq 0x64(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, 0x38(%rsp)
jmp 0x5048
xorl %eax, %eax
movl %eax, 0x38(%rsp)
jmp 0x5048
movl 0x38(%rsp), %eax
movl %eax, 0x3c(%rsp)
movl 0x64(%rsp), %esi
addl $0x1, %esi
leaq 0x2149c(%rip), %rdi     # 0x264fa
movb $0x0, %al
callq 0x40f0
cmpl $0x0, 0x3c(%rsp)
jle 0x5080
movl 0x3c(%rsp), %esi
leaq 0x21488(%rip), %rdi     # 0x264ff
movb $0x0, %al
callq 0x40f0
jmp 0x508e
leaq 0x2147e(%rip), %rdi     # 0x26505
movb $0x0, %al
callq 0x40f0
movl 0x58(%rsp), %eax
movl %eax, %ecx
leaq 0x289e5(%rip), %rax     # 0x2da80
movq (%rax,%rcx,8), %rsi
leaq 0x21464(%rip), %rdi     # 0x2650a
xorl %eax, %eax
callq 0x40f0
movl 0x58(%rsp), %eax
leaq 0x22198(%rip), %rcx     # 0x27250
movzbl (%rax,%rcx), %eax
andl $0x3, %eax
movl %eax, %ecx
movq %rcx, 0x30(%rsp)
subl $0x3, %eax
ja 0x5255
movq 0x30(%rsp), %rax
leaq 0x20f29(%rip), %rcx     # 0x26004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x54(%rsp), %esi
leaq 0x21443(%rip), %rdi     # 0x26532
movb $0x0, %al
callq 0x40f0
movl 0x58(%rsp), %eax
movl %eax, %ecx
leaq 0x2214d(%rip), %rax     # 0x27250
movzbl (%rax,%rcx), %eax
sarl $0x4, %eax
andl $0x3, %eax
cmpl $0x0, %eax
je 0x5151
movl 0x50(%rsp), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x5137
movl 0x50(%rsp), %ecx
andl $0xfffffeff, %ecx       # imm = 0xFFFFFEFF
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
subl %ecx, %eax
movl %eax, 0x2c(%rsp)
jmp 0x513f
movl 0x50(%rsp), %eax
movl %eax, 0x2c(%rsp)
movl 0x2c(%rsp), %esi
leaq 0x213e7(%rip), %rdi     # 0x26531
movb $0x0, %al
callq 0x40f0
movl 0x58(%rsp), %eax
movl %eax, %ecx
leaq 0x220f2(%rip), %rax     # 0x27250
movzbl (%rax,%rcx), %eax
sarl $0x2, %eax
andl $0x3, %eax
cmpl $0x0, %eax
je 0x51ac
movl 0x4c(%rsp), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x5192
movl 0x4c(%rsp), %ecx
andl $0xfffffeff, %ecx       # imm = 0xFFFFFEFF
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
subl %ecx, %eax
movl %eax, 0x28(%rsp)
jmp 0x519a
movl 0x4c(%rsp), %eax
movl %eax, 0x28(%rsp)
movl 0x28(%rsp), %esi
leaq 0x2138c(%rip), %rdi     # 0x26531
movb $0x0, %al
callq 0x40f0
jmp 0x5255
movl 0x54(%rsp), %esi
leaq 0x21376(%rip), %rdi     # 0x26532
movb $0x0, %al
callq 0x40f0
movl 0x58(%rsp), %eax
movl %eax, %ecx
leaq 0x22080(%rip), %rax     # 0x27250
movzbl (%rax,%rcx), %eax
sarl $0x4, %eax
andl $0x3, %eax
cmpl $0x3, %eax
jne 0x51f6
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
subl 0x44(%rsp), %esi
leaq 0x21342(%rip), %rdi     # 0x26531
movb $0x0, %al
callq 0x40f0
movl 0x58(%rsp), %eax
movl %eax, %ecx
leaq 0x2204d(%rip), %rax     # 0x27250
movzbl (%rax,%rcx), %eax
sarl $0x4, %eax
andl $0x3, %eax
cmpl $0x1, %eax
jne 0x5224
movl 0x44(%rsp), %esi
leaq 0x21314(%rip), %rdi     # 0x26531
movb $0x0, %al
callq 0x40f0
jmp 0x5255
movl 0x54(%rsp), %esi
movl 0x40(%rsp), %edx
leaq 0x212db(%rip), %rdi     # 0x26510
movb $0x0, %al
callq 0x40f0
jmp 0x5255
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
subl 0x48(%rsp), %esi
leaq 0x212e4(%rip), %rdi     # 0x26532
movb $0x0, %al
callq 0x40f0
movl 0x58(%rsp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, 0x20(%rsp)
subl $0x26, %eax
ja 0x55d8
movq 0x20(%rsp), %rax
leaq 0x20d9d(%rip), %rcx     # 0x26014
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x2128f(%rip), %rdi     # 0x26516
movb $0x0, %al
callq 0x40f0
movq 0x70(%rsp), %rdi
movl 0x44(%rsp), %esi
callq 0x5810
jmp 0x55da
movq 0x70(%rsp), %rax
movq 0x38(%rax), %rax
movslq 0x50(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
je 0x52df
movq 0x70(%rsp), %rax
movq 0x38(%rax), %rax
movslq 0x50(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
addq $0x18, %rax
movq %rax, 0x18(%rsp)
jmp 0x52ed
leaq 0x22dff(%rip), %rax     # 0x280e5
movq %rax, 0x18(%rsp)
jmp 0x52ed
movq 0x18(%rsp), %rsi
leaq 0x21221(%rip), %rdi     # 0x2651a
movb $0x0, %al
callq 0x40f0
jmp 0x55da
movq 0x70(%rsp), %rax
movq 0x38(%rax), %rax
movslq 0x50(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
je 0x5343
movq 0x70(%rsp), %rax
movq 0x38(%rax), %rax
movslq 0x50(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
addq $0x18, %rax
movq %rax, 0x10(%rsp)
jmp 0x5351
leaq 0x22d9b(%rip), %rax     # 0x280e5
movq %rax, 0x10(%rsp)
jmp 0x5351
movq 0x10(%rsp), %rsi
leaq 0x211bd(%rip), %rdi     # 0x2651a
movb $0x0, %al
callq 0x40f0
movl 0x4c(%rsp), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x5394
leaq 0x21153(%rip), %rdi     # 0x264cc
movb $0x0, %al
callq 0x40f0
movq 0x70(%rsp), %rdi
movl 0x4c(%rsp), %esi
andl $0xfffffeff, %esi       # imm = 0xFFFFFEFF
callq 0x5810
jmp 0x55da
movq 0x70(%rsp), %rax
movq 0x38(%rax), %rax
movslq 0x54(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
cmpq $0x0, (%rax)
je 0x53d7
movq 0x70(%rsp), %rax
movq 0x38(%rax), %rax
movslq 0x54(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
addq $0x18, %rax
movq %rax, 0x8(%rsp)
jmp 0x53e5
leaq 0x22d07(%rip), %rax     # 0x280e5
movq %rax, 0x8(%rsp)
jmp 0x53e5
movq 0x8(%rsp), %rsi
leaq 0x21129(%rip), %rdi     # 0x2651a
movb $0x0, %al
callq 0x40f0
movl 0x50(%rsp), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x5428
leaq 0x210bf(%rip), %rdi     # 0x264cc
movb $0x0, %al
callq 0x40f0
movq 0x70(%rsp), %rdi
movl 0x50(%rsp), %esi
andl $0xfffffeff, %esi       # imm = 0xFFFFFEFF
callq 0x5810
movl 0x4c(%rsp), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x5458
leaq 0x2108f(%rip), %rdi     # 0x264cc
movb $0x0, %al
callq 0x40f0
movq 0x70(%rsp), %rdi
movl 0x4c(%rsp), %esi
andl $0xfffffeff, %esi       # imm = 0xFFFFFEFF
callq 0x5810
jmp 0x55da
movl 0x4c(%rsp), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x548d
leaq 0x210a4(%rip), %rdi     # 0x26516
movb $0x0, %al
callq 0x40f0
movq 0x70(%rsp), %rdi
movl 0x4c(%rsp), %esi
andl $0xfffffeff, %esi       # imm = 0xFFFFFEFF
callq 0x5810
jmp 0x55da
movl 0x50(%rsp), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
jne 0x54b2
movl 0x4c(%rsp), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x5534
leaq 0x2105d(%rip), %rdi     # 0x26516
movb $0x0, %al
callq 0x40f0
movl 0x50(%rsp), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x54e4
movq 0x70(%rsp), %rdi
movl 0x50(%rsp), %esi
andl $0xfffffeff, %esi       # imm = 0xFFFFFEFF
callq 0x5810
jmp 0x54f2
leaq 0x22bfa(%rip), %rdi     # 0x280e5
movb $0x0, %al
callq 0x40f0
leaq 0x20fd3(%rip), %rdi     # 0x264cc
movb $0x0, %al
callq 0x40f0
movl 0x4c(%rsp), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x5524
movq 0x70(%rsp), %rdi
movl 0x4c(%rsp), %esi
andl $0xfffffeff, %esi       # imm = 0xFFFFFEFF
callq 0x5810
jmp 0x5532
leaq 0x22bba(%rip), %rdi     # 0x280e5
movb $0x0, %al
callq 0x40f0
jmp 0x5534
jmp 0x55da
movl 0x40(%rsp), %esi
addl 0x64(%rsp), %esi
addl $0x2, %esi
leaq 0x20fd5(%rip), %rdi     # 0x26520
movb $0x0, %al
callq 0x40f0
jmp 0x55da
movq 0x70(%rsp), %rax
movq 0x20(%rax), %rax
movslq 0x44(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x20fb9(%rip), %rdi     # 0x26529
movb $0x0, %al
callq 0x40f0
jmp 0x55da
cmpl $0x0, 0x4c(%rsp)
jne 0x55a6
movq 0x68(%rsp), %rax
movl 0x64(%rsp), %ecx
addl $0x1, %ecx
movl %ecx, 0x64(%rsp)
movslq %ecx, %rcx
movl (%rax,%rcx,4), %esi
leaq 0x20f92(%rip), %rdi     # 0x2652f
movb $0x0, %al
callq 0x40f0
jmp 0x55b8
movl 0x4c(%rsp), %esi
leaq 0x20f7e(%rip), %rdi     # 0x2652f
movb $0x0, %al
callq 0x40f0
jmp 0x55da
leaq 0x20f55(%rip), %rdi     # 0x26516
movb $0x0, %al
callq 0x40f0
movq 0x70(%rsp), %rdi
movl 0x48(%rsp), %esi
callq 0x5810
jmp 0x55da
jmp 0x55da
leaq 0x220b2(%rip), %rdi     # 0x27693
movb $0x0, %al
callq 0x40f0
movl 0x64(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x64(%rsp)
jmp 0x4f8b
addq $0x78, %rsp
retq
nopl (%rax)