// File: /workspace/github_c_makefile_star2_O0/zhou-yuxin[P]redis-aof-no-cow/deps/lua/src/print.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 bx=GETARG_Bx(i);
  int sbx=GETARG_sBx(i);
  int line=getline(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) ? (-1-INDEXK(b)) : b);
    if (getCMode(o)!=OpArgN) printf(" %d",ISK(c) ? (-1-INDEXK(c)) : c);
    break;
   case iABx:
    if (getBMode(o)==OpArgK) printf("%d %d",a,-1-bx); else printf("%d %d",a,bx);
    break;
   case iAsBx:
    if (o==OP_JMP) printf("%d",sbx); else printf("%d %d",a,sbx);
    break;
  }
  switch (o)
  {
   case OP_LOADK:
    printf("\t; "); PrintConstant(f,bx);
    break;
   case OP_GETUPVAL:
   case OP_SETUPVAL:
    printf("\t; %s", (f->sizeupvalues>0) ? getstr(f->upvalues[b]) : "-");
    break;
   case OP_GETGLOBAL:
   case OP_SETGLOBAL:
    printf("\t; %s",svalue(&f->k[bx]));
    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:
    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;
   default:
    break;
  }
  printf("\n");
 }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x50(%rax), %eax
movl %eax, -0x18(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x3405
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
shrl $0x0, %eax
andl $0x3f, %eax
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %eax
shrl $0x6, %eax
andl $0xff, %eax
movl %eax, -0x24(%rbp)
movl -0x1c(%rbp), %eax
shrl $0x17, %eax
andl $0x1ff, %eax            # imm = 0x1FF
movl %eax, -0x28(%rbp)
movl -0x1c(%rbp), %eax
shrl $0xe, %eax
andl $0x1ff, %eax            # imm = 0x1FF
movl %eax, -0x2c(%rbp)
movl -0x1c(%rbp), %eax
shrl $0xe, %eax
andl $0x3ffff, %eax          # imm = 0x3FFFF
movl %eax, -0x30(%rbp)
movl -0x1c(%rbp), %eax
shrl $0xe, %eax
andl $0x3ffff, %eax          # imm = 0x3FFFF
subl $0x1ffff, %eax          # imm = 0x1FFFF
movl %eax, -0x34(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x3019
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0x14(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x3c(%rbp)
jmp 0x3020
xorl %eax, %eax
movl %eax, -0x3c(%rbp)
jmp 0x3020
movl -0x3c(%rbp), %eax
movl %eax, -0x38(%rbp)
movl -0x14(%rbp), %esi
addl $0x1, %esi
leaq 0x1b47d(%rip), %rdi     # 0x1e4b0
movb $0x0, %al
callq 0x2100
cmpl $0x0, -0x38(%rbp)
jle 0x3053
movl -0x38(%rbp), %esi
leaq 0x1b46b(%rip), %rdi     # 0x1e4b5
movb $0x0, %al
callq 0x2100
jmp 0x3061
leaq 0x1b461(%rip), %rdi     # 0x1e4bb
movb $0x0, %al
callq 0x2100
movl -0x20(%rbp), %eax
movl %eax, %ecx
leaq 0x22a33(%rip), %rax     # 0x25aa0
movq (%rax,%rcx,8), %rsi
leaq 0x1b448(%rip), %rdi     # 0x1e4c0
xorl %eax, %eax
callq 0x2100
movl -0x20(%rbp), %eax
leaq 0x1bbe7(%rip), %rcx     # 0x1ec70
movzbl (%rax,%rcx), %eax
andl $0x3, %eax
movl %eax, -0x40(%rbp)
je 0x30b6
jmp 0x3097
movl -0x40(%rbp), %eax
subl $0x1, %eax
je 0x3171
jmp 0x30a5
movl -0x40(%rbp), %eax
subl $0x2, %eax
je 0x31bd
jmp 0x31ec
movl -0x24(%rbp), %esi
leaq 0x1b428(%rip), %rdi     # 0x1e4e8
movb $0x0, %al
callq 0x2100
movl -0x20(%rbp), %eax
movl %eax, %ecx
leaq 0x1bb9d(%rip), %rax     # 0x1ec70
movzbl (%rax,%rcx), %eax
sarl $0x4, %eax
andl $0x3, %eax
cmpl $0x0, %eax
je 0x311b
movl -0x28(%rbp), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x3104
movl -0x28(%rbp), %ecx
andl $0xfffffeff, %ecx       # imm = 0xFFFFFEFF
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
subl %ecx, %eax
movl %eax, -0x44(%rbp)
jmp 0x310a
movl -0x28(%rbp), %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %esi
leaq 0x1b3d3(%rip), %rdi     # 0x1e4e7
movb $0x0, %al
callq 0x2100
movl -0x20(%rbp), %eax
movl %eax, %ecx
leaq 0x1bb49(%rip), %rax     # 0x1ec70
movzbl (%rax,%rcx), %eax
sarl $0x2, %eax
andl $0x3, %eax
cmpl $0x0, %eax
je 0x316f
movl -0x2c(%rbp), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x3158
movl -0x2c(%rbp), %ecx
andl $0xfffffeff, %ecx       # imm = 0xFFFFFEFF
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
subl %ecx, %eax
movl %eax, -0x48(%rbp)
jmp 0x315e
movl -0x2c(%rbp), %eax
movl %eax, -0x48(%rbp)
movl -0x48(%rbp), %esi
leaq 0x1b37f(%rip), %rdi     # 0x1e4e7
movb $0x0, %al
callq 0x2100
jmp 0x31ec
movl -0x20(%rbp), %eax
movl %eax, %ecx
leaq 0x1baf3(%rip), %rax     # 0x1ec70
movzbl (%rax,%rcx), %eax
sarl $0x4, %eax
andl $0x3, %eax
cmpl $0x3, %eax
jne 0x31a7
movl -0x24(%rbp), %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
subl -0x30(%rbp), %edx
leaq 0x1b328(%rip), %rdi     # 0x1e4c6
movb $0x0, %al
callq 0x2100
jmp 0x31bb
movl -0x24(%rbp), %esi
movl -0x30(%rbp), %edx
leaq 0x1b312(%rip), %rdi     # 0x1e4c6
movb $0x0, %al
callq 0x2100
jmp 0x31ec
cmpl $0x16, -0x20(%rbp)
jne 0x31d6
movl -0x34(%rbp), %esi
leaq 0x1b31b(%rip), %rdi     # 0x1e4e8
movb $0x0, %al
callq 0x2100
jmp 0x31ea
movl -0x24(%rbp), %esi
movl -0x34(%rbp), %edx
leaq 0x1b2e3(%rip), %rdi     # 0x1e4c6
movb $0x0, %al
callq 0x2100
jmp 0x31ec
movl -0x20(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x50(%rbp)
subl $0x23, %eax
ja 0x33e7
movq -0x50(%rbp), %rax
leaq 0x1b005(%rip), %rcx     # 0x1e210
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x1b2b1(%rip), %rdi     # 0x1e4cc
movb $0x0, %al
callq 0x2100
movq -0x8(%rbp), %rdi
movl -0x30(%rbp), %esi
callq 0x35c0
jmp 0x33e9
movq -0x8(%rbp), %rax
cmpl $0x0, 0x48(%rax)
jle 0x3257
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movslq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
addq $0x18, %rax
movq %rax, -0x58(%rbp)
jmp 0x3264
leaq 0x1c3f5(%rip), %rax     # 0x1f653
movq %rax, -0x58(%rbp)
jmp 0x3264
movq -0x58(%rbp), %rsi
leaq 0x1b261(%rip), %rdi     # 0x1e4d0
movb $0x0, %al
callq 0x2100
jmp 0x33e9
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x30(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rsi
addq $0x18, %rsi
leaq 0x1b234(%rip), %rdi     # 0x1e4d0
movb $0x0, %al
callq 0x2100
jmp 0x33e9
movl -0x2c(%rbp), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x32d5
leaq 0x1b210(%rip), %rdi     # 0x1e4cc
movb $0x0, %al
callq 0x2100
movq -0x8(%rbp), %rdi
movl -0x2c(%rbp), %esi
andl $0xfffffeff, %esi       # imm = 0xFFFFFEFF
callq 0x35c0
jmp 0x33e9
movl -0x28(%rbp), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
jne 0x32f4
movl -0x2c(%rbp), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x3370
leaq 0x1b1d1(%rip), %rdi     # 0x1e4cc
movb $0x0, %al
callq 0x2100
movl -0x28(%rbp), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x3323
movq -0x8(%rbp), %rdi
movl -0x28(%rbp), %esi
andl $0xfffffeff, %esi       # imm = 0xFFFFFEFF
callq 0x35c0
jmp 0x3331
leaq 0x1c329(%rip), %rdi     # 0x1f653
movb $0x0, %al
callq 0x2100
leaq 0x1b14a(%rip), %rdi     # 0x1e482
movb $0x0, %al
callq 0x2100
movl -0x2c(%rbp), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x3360
movq -0x8(%rbp), %rdi
movl -0x2c(%rbp), %esi
andl $0xfffffeff, %esi       # imm = 0xFFFFFEFF
callq 0x35c0
jmp 0x336e
leaq 0x1c2ec(%rip), %rdi     # 0x1f653
movb $0x0, %al
callq 0x2100
jmp 0x3370
jmp 0x33e9
movl -0x34(%rbp), %esi
addl -0x14(%rbp), %esi
addl $0x2, %esi
leaq 0x1b154(%rip), %rdi     # 0x1e4d6
movb $0x0, %al
callq 0x2100
jmp 0x33e9
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x30(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x1b13d(%rip), %rdi     # 0x1e4df
movb $0x0, %al
callq 0x2100
jmp 0x33e9
cmpl $0x0, -0x2c(%rbp)
jne 0x33d4
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, -0x14(%rbp)
movslq %ecx, %rcx
movl (%rax,%rcx,4), %esi
leaq 0x1b11a(%rip), %rdi     # 0x1e4e5
movb $0x0, %al
callq 0x2100
jmp 0x33e5
movl -0x2c(%rbp), %esi
leaq 0x1b107(%rip), %rdi     # 0x1e4e5
movb $0x0, %al
callq 0x2100
jmp 0x33e9
jmp 0x33e9
leaq 0x1acc7(%rip), %rdi     # 0x1e0b7
movb $0x0, %al
callq 0x2100
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x2f89
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)