// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/deps/lua/src/ldebug.c
// Function: symbexec
static Instruction symbexec (const Proto *pt, int lastpc, int reg) {
  int pc;
  int last;  /* stores position of last instruction that changed `reg' */
  last = pt->sizecode-1;  /* points to final return (a `neutral' instruction) */
  check(precheck(pt));
  for (pc = 0; pc < lastpc; pc++) {
    Instruction i = pt->code[pc];
    OpCode op = GET_OPCODE(i);
    int a = GETARG_A(i);
    int b = 0;
    int c = 0;
    check(op < NUM_OPCODES);
    checkreg(pt, a);
    switch (getOpMode(op)) {
      case iABC: {
        b = GETARG_B(i);
        c = GETARG_C(i);
        check(checkArgMode(pt, b, getBMode(op)));
        check(checkArgMode(pt, c, getCMode(op)));
        break;
      }
      case iABx: {
        b = GETARG_Bx(i);
        if (getBMode(op) == OpArgK) check(b < pt->sizek);
        break;
      }
      case iAsBx: {
        b = GETARG_sBx(i);
        if (getBMode(op) == OpArgR) {
          int dest = pc+1+b;
          check(0 <= dest && dest < pt->sizecode);
          if (dest > 0) {
            int j;
            /* check that it does not jump to a setlist count; this
               is tricky, because the count from a previous setlist may
               have the same value of an invalid setlist; so, we must
               go all the way back to the first of them (if any) */
            for (j = 0; j < dest; j++) {
              Instruction d = pt->code[dest-1-j];
              if (!(GET_OPCODE(d) == OP_SETLIST && GETARG_C(d) == 0)) break;
            }
            /* if 'j' is even, previous value is not a setlist (even if
               it looks like one) */
            check((j&1) == 0);
          }
        }
        break;
      }
    }
    if (testAMode(op)) {
      if (a == reg) last = pc;  /* change register `a' */
    }
    if (testTMode(op)) {
      check(pc+2 < pt->sizecode);  /* check skip */
      check(GET_OPCODE(pt->code[pc+1]) == OP_JMP);
    }
    switch (op) {
      case OP_LOADBOOL: {
        if (c == 1) {  /* does it jump? */
          check(pc+2 < pt->sizecode);  /* check its jump */
          check(GET_OPCODE(pt->code[pc+1]) != OP_SETLIST ||
                GETARG_C(pt->code[pc+1]) != 0);
        }
        break;
      }
      case OP_LOADNIL: {
        if (a <= reg && reg <= b)
          last = pc;  /* set registers from `a' to `b' */
        break;
      }
      case OP_GETUPVAL:
      case OP_SETUPVAL: {
        check(b < pt->nups);
        break;
      }
      case OP_GETGLOBAL:
      case OP_SETGLOBAL: {
        check(ttisstring(&pt->k[b]));
        break;
      }
      case OP_SELF: {
        checkreg(pt, a+1);
        if (reg == a+1) last = pc;
        break;
      }
      case OP_CONCAT: {
        check(b < c);  /* at least two operands */
        break;
      }
      case OP_TFORLOOP: {
        check(c >= 1);  /* at least one result (control variable) */
        checkreg(pt, a+2+c);  /* space for results */
        if (reg >= a+2) last = pc;  /* affect all regs above its base */
        break;
      }
      case OP_FORLOOP:
      case OP_FORPREP:
        checkreg(pt, a+3);
        /* go through */
      case OP_JMP: {
        int dest = pc+1+b;
        /* not full check and jump is forward and do not skip `lastpc'? */
        if (reg != NO_REG && pc < dest && dest <= lastpc)
          pc += b;  /* do the jump */
        break;
      }
      case OP_CALL:
      case OP_TAILCALL: {
        if (b != 0) {
          checkreg(pt, a+b-1);
        }
        c--;  /* c = num. returns */
        if (c == LUA_MULTRET) {
          check(checkopenop(pt, pc));
        }
        else if (c != 0)
          checkreg(pt, a+c-1);
        if (reg >= a) last = pc;  /* affect all registers above base */
        break;
      }
      case OP_RETURN: {
        b--;  /* b = num. returns */
        if (b > 0) checkreg(pt, a+b-1);
        break;
      }
      case OP_SETLIST: {
        if (b > 0) checkreg(pt, a + b);
        if (c == 0) {
          pc++;
          check(pc < pt->sizecode - 1);
        }
        break;
      }
      case OP_CLOSURE: {
        int nup, j;
        check(b < pt->sizep);
        nup = pt->p[b]->nups;
        check(pc + nup < pt->sizecode);
        for (j = 1; j <= nup; j++) {
          OpCode op1 = GET_OPCODE(pt->code[pc + j]);
          check(op1 == OP_GETUPVAL || op1 == OP_MOVE);
        }
        if (reg != NO_REG)  /* tracing? */
          pc += nup;  /* do not 'execute' these pseudo-instructions */
        break;
      }
      case OP_VARARG: {
        check((pt->is_vararg & VARARG_ISVARARG) &&
             !(pt->is_vararg & VARARG_NEEDSARG));
        b--;
        if (b == LUA_MULTRET) check(checkopenop(pt, pc));
        checkreg(pt, a+b-1);
        break;
      }
      default: break;
    }
  }
  return pt->code[last];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movzbl 0x73(%rdi), %ebp
xorl %r15d, %r15d
cmpl $0xfa, %ebp
ja 0x6e91
movq %rdi, %r14
movzbl 0x72(%rdi), %r10d
movl %r10d, %eax
andl $0x5, %eax
cmpl $0x4, %eax
je 0x6e91
movzbl 0x71(%r14), %eax
movl %r10d, %ecx
andl $0x1, %ecx
addl %eax, %ecx
cmpl %ebp, %ecx
ja 0x6e91
movzbl 0x70(%r14), %r11d
cmpl %r11d, 0x48(%r14)
jle 0x6ea3
movl %r15d, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x50(%r14), %r9d
movl 0x54(%r14), %ecx
cmpl %r9d, %ecx
sete %al
testl %ecx, %ecx
sete %cl
testl %r9d, %r9d
jle 0x6e91
orb %al, %cl
je 0x6e91
movq 0x18(%r14), %r13
movl -0x4(%r13,%r9,4), %eax
andl $0x3f, %eax
cmpl $0x1e, %eax
jne 0x6e91
leal -0x1(%r9), %eax
testl %esi, %esi
jle 0x743c
movl %edx, %r8d
andb $0x6, %r10b
leaq 0x4(%r13), %rcx
movq %rcx, 0x50(%rsp)
leaq 0x1499d(%rip), %rdi     # 0x1b890
xorl %r12d, %r12d
movl %eax, 0x38(%rsp)
movl %eax, 0x24(%rsp)
movq %r9, 0x30(%rsp)
movl %edx, 0x48(%rsp)
movl %esi, 0x44(%rsp)
movl %r10d, 0x40(%rsp)
movl %r11d, 0x3c(%rsp)
movq %r12, 0x18(%rsp)
movslq %r12d, %rax
movq %r13, %r12
movq %rax, 0x28(%rsp)
movl (%r13,%rax,4), %r13d
movl %r13d, %ebx
andl $0x3f, %ebx
cmpl $0x25, %ebx
ja 0x7448
movl %r13d, %eax
shrl $0x6, %eax
movzbl %al, %ecx
movq %rcx, 0x10(%rsp)
cmpl %ebp, %ecx
jae 0x7448
movzbl (%rbx,%rdi), %r15d
movl %r15d, %eax
andl $0x3, %eax
xorl %ecx, %ecx
leaq 0x1443d(%rip), %rdx     # 0x1b3a0
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
movl %r15d, 0x4c(%rsp)
jmpq *%rax
movl %r13d, %esi
shrl $0x17, %esi
movl %r15d, %edx
shrl $0x4, %edx
andl $0x3, %edx
movq %r14, %rdi
movq %rsi, 0x8(%rsp)
callq 0x7915
movl %r15d, %edx
xorl %r15d, %r15d
testl %eax, %eax
je 0x6e91
shrl $0xe, %r13d
andl $0x1ff, %r13d           # imm = 0x1FF
shrl $0x2, %edx
andl $0x3, %edx
movq %r14, %rdi
movl %r13d, %esi
callq 0x7915
movl %r13d, %ecx
testl %eax, %eax
movl 0x48(%rsp), %r8d
movl 0x44(%rsp), %esi
movl 0x40(%rsp), %r10d
movl 0x3c(%rsp), %r11d
movq 0x30(%rsp), %r9
movq %r12, %r13
leaq 0x148b2(%rip), %rdi     # 0x1b890
movq 0x18(%rsp), %r12
jne 0x70b2
jmp 0x6e91
shrl $0xe, %r13d
addl $0xfffe0001, %r13d      # imm = 0xFFFE0001
movl %r15d, %eax
andl $0x30, %eax
cmpl $0x20, %eax
movq %r13, 0x8(%rsp)
jne 0x70aa
movq 0x18(%rsp), %rax
leal (%rax,%r13), %ecx
xorl %r15d, %r15d
movl %ecx, %eax
incl %eax
js 0x6e91
movq %r12, %r13
cmpl %r9d, %eax
movq 0x18(%rsp), %r12
jge 0x6e91
testl %eax, %eax
je 0x73bb
movl %eax, %edx
xorl %r9d, %r9d
movslq %ecx, %rdi
movl (%r13,%rdi,4), %edi
movl $0x7fc03f, %r15d        # imm = 0x7FC03F
andl %r15d, %edi
cmpl $0x22, %edi
jne 0x73c2
incq %r9
decl %ecx
cmpq %r9, %rdx
jne 0x7041
jmp 0x73c5
movq $0x0, 0x8(%rsp)
jmp 0x70aa
shrl $0xe, %r13d
movl %r15d, %eax
notl %eax
testb $0x30, %al
jne 0x70a5
xorl %ecx, %ecx
movl %r13d, %eax
movq %rax, 0x8(%rsp)
movl $0x0, %r15d
cmpl 0x4c(%r14), %r13d
movq %r12, %r13
movq 0x18(%rsp), %r12
jl 0x70b2
jmp 0x6e91
movq %r13, 0x8(%rsp)
movq %r12, %r13
movq 0x18(%rsp), %r12
movl 0x4c(%rsp), %r15d
testb $0x40, %r15b
movl 0x24(%rsp), %edx
movl %edx, %eax
cmovnel %r12d, %eax
cmpl %r8d, 0x10(%rsp)
cmovnel %edx, %eax
testb %r15b, %r15b
jns 0x70f9
leal 0x2(%r12), %edx
xorl %r15d, %r15d
cmpl %r9d, %edx
jge 0x6e91
movq 0x28(%rsp), %rdx
movl 0x4(%r13,%rdx,4), %edx
andl $0x3f, %edx
cmpl $0x16, %edx
jne 0x6e91
leal -0x2(%rbx), %edx
cmpl $0x23, %edx
ja 0x742c
leaq 0x142a4(%rip), %rbx     # 0x1b3b0
movslq (%rbx,%rdx,4), %rdx
addq %rbx, %rdx
jmpq *%rdx
cmpl %r11d, 0x8(%rsp)
jl 0x742c
jmp 0x7448
movq 0x10(%r14), %rcx
movslq 0x8(%rsp), %rdx
shlq $0x4, %rdx
cmpl $0x4, 0x8(%rcx,%rdx)
je 0x742c
jmp 0x7448
movq 0x8(%rsp), %rdx
testl %edx, %edx
setne %al
movq 0x10(%rsp), %rbx
addl %ebx, %edx
cmpl %ebp, %edx
setg %dl
xorl %r15d, %r15d
testb %dl, %al
jne 0x6e91
testl %ecx, %ecx
je 0x73e6
movl %ecx, %eax
decl %eax
setne %al
addl %ebx, %ecx
decl %ecx
cmpl %ebp, %ecx
setg %cl
testb %cl, %al
je 0x7411
jmp 0x6e91
movq 0x10(%rsp), %rcx
addl $0x3, %ecx
cmpl %ebp, %ecx
jae 0x7448
movq 0x8(%rsp), %rbx
leal (%r12,%rbx), %ecx
incl %ecx
cmpl %ecx, %r12d
setge %dl
cmpl %esi, %ecx
setg %cl
orb %dl, %cl
testb $0x1, %cl
movl $0x0, %ecx
cmovnel %ecx, %ebx
cmpl $0xff, %r8d
cmovel %ecx, %ebx
addl %r12d, %ebx
movl %ebx, %r12d
jmp 0x742c
movq 0x8(%rsp), %rdx
cmpl $0x2, %edx
jl 0x742c
movq 0x10(%rsp), %rcx
addl %edx, %ecx
decl %ecx
cmpl %ebp, %ecx
jle 0x742c
jmp 0x7448
cmpl %r8d, 0x8(%rsp)
movl %r12d, %ecx
cmovll %eax, %ecx
cmpl %r8d, 0x10(%rsp)
cmovlel %ecx, %eax
jmp 0x742c
cmpl $0x1, %ecx
jne 0x742c
leal 0x2(%r12), %ecx
xorl %r15d, %r15d
cmpl %r9d, %ecx
jge 0x6e91
movq 0x28(%rsp), %rcx
movl 0x4(%r13,%rcx,4), %ecx
movl $0x7fc03f, %edx         # imm = 0x7FC03F
andl %edx, %ecx
cmpl $0x22, %ecx
jne 0x742c
jmp 0x6e91
movq 0x10(%rsp), %rcx
incl %ecx
cmpl %ebp, %ecx
jae 0x7448
cmpl %r8d, %ecx
cmovel %r12d, %eax
jmp 0x742c
cmpl %ecx, 0x8(%rsp)
jl 0x742c
jmp 0x7448
xorl %r15d, %r15d
testl %ecx, %ecx
je 0x6e91
movq 0x10(%rsp), %rdx
addl %edx, %ecx
addl $0x2, %ecx
cmpl %ebp, %ecx
jae 0x6e91
movq 0x10(%rsp), %rcx
addl $0x2, %ecx
cmpl %r8d, %ecx
jmp 0x741a
movq 0x8(%rsp), %rbx
testl %ebx, %ebx
setle %dl
movq 0x10(%rsp), %rdi
addl %ebx, %edi
cmpl %ebp, %edi
setl %dil
orb %dl, %dil
xorl %r15d, %r15d
cmpb $0x1, %dil
jne 0x6e91
testl %ecx, %ecx
leaq 0x145c4(%rip), %rdi     # 0x1b890
jne 0x742c
incl %r12d
cmpl 0x38(%rsp), %r12d
jl 0x742c
jmp 0x6e91
xorl %r15d, %r15d
cmpb $0x2, %r10b
jne 0x6e91
movq 0x8(%rsp), %rcx
subl $0x1, %ecx
jae 0x7420
movq %rcx, 0x8(%rsp)
movq 0x28(%rsp), %rcx
movl 0x4(%r13,%rcx,4), %ecx
movl %ecx, %edx
andl $0x3f, %edx
leal -0x1c(%rdx), %edi
cmpl $0x3, %edi
movq 0x10(%rsp), %rbx
jb 0x732a
cmpl $0x22, %edx
jne 0x6e91
cmpl $0x7fffff, %ecx         # imm = 0x7FFFFF
leaq 0x14559(%rip), %rdi     # 0x1b890
ja 0x6e91
movq 0x8(%rsp), %rcx
addl %ebx, %ecx
jmp 0x7424
xorl %r15d, %r15d
movq 0x8(%rsp), %rdx
cmpl 0x58(%r14), %edx
jge 0x6e91
movq 0x20(%r14), %rcx
movslq %edx, %rdx
movq (%rcx,%rdx,8), %rcx
movzbl 0x70(%rcx), %edx
leal (%r12,%rdx), %ecx
cmpl %r9d, %ecx
jge 0x6e91
testq %rdx, %rdx
je 0x739f
movq 0x50(%rsp), %rdi
movq 0x28(%rsp), %r9
leaq (%rdi,%r9,4), %r9
xorl %edi, %edi
testb $0x3b, (%r9,%rdi,4)
jne 0x6e91
incq %rdi
cmpq %rdi, %rdx
jne 0x738c
cmpl $0xff, %r8d
cmovel %r12d, %ecx
movl %ecx, %r12d
movq 0x30(%rsp), %r9
leaq 0x144d7(%rip), %rdi     # 0x1b890
jmp 0x742c
xorl %ecx, %ecx
jmp 0x70b2
movl %r9d, %eax
xorl %ecx, %ecx
movl $0x0, %r15d
testb $0x1, %al
movq 0x30(%rsp), %r9
leaq 0x144b5(%rip), %rdi     # 0x1b890
je 0x70b2
jmp 0x6e91
movq 0x28(%rsp), %rax
movl 0x4(%r13,%rax,4), %eax
movl %eax, %ecx
andl $0x3f, %ecx
leal -0x1c(%rcx), %edx
cmpl $0x3, %edx
jb 0x7406
cmpl $0x22, %ecx
jne 0x6e91
cmpl $0x7fffff, %eax         # imm = 0x7FFFFF
ja 0x6e91
cmpl %r8d, 0x10(%rsp)
movl 0x24(%rsp), %eax
cmovlel %r12d, %eax
jmp 0x742c
addl 0x10(%rsp), %ecx
cmpl %ebp, %ecx
jg 0x6e91
incl %r12d
movl %eax, 0x24(%rsp)
cmpl %esi, %r12d
jl 0x6f15
cltq
movl (%r13,%rax,4), %r15d
jmp 0x6e91
xorl %r15d, %r15d
jmp 0x6e91