// File: /workspace/github_c_makefile_star2_O2/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), %r10d
xorl %r15d, %r15d
cmpl $0xfa, %r10d
ja 0x69a7
movq %rdi, %r14
movzbl 0x72(%rdi), %r11d
movl %r11d, %eax
andl $0x5, %eax
cmpl $0x4, %eax
je 0x69a7
movzbl 0x71(%r14), %eax
movl %r11d, %ecx
andl $0x1, %ecx
addl %eax, %ecx
cmpl %r10d, %ecx
ja 0x69a7
movl %edx, %r8d
movzbl 0x70(%r14), %edx
cmpl %edx, 0x48(%r14)
jle 0x69b9
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 0x69a7
orb %al, %cl
je 0x69a7
movl %edx, 0x4c(%rsp)
movq 0x18(%r14), %rax
movq %rax, 0x20(%rsp)
movl -0x4(%rax,%r9,4), %eax
andl $0x3f, %eax
cmpl $0x1e, %eax
jne 0x69a7
leal -0x1(%r9), %ecx
andb $0x6, %r11b
movq 0x20(%rsp), %rax
addq $0x4, %rax
movq %rax, 0x50(%rsp)
movl %ecx, 0x38(%rsp)
movl %ecx, 0x1c(%rsp)
xorl %edi, %edi
movq %r9, 0x30(%rsp)
movl %r8d, 0x48(%rsp)
movl %esi, 0x44(%rsp)
movl %r10d, 0x40(%rsp)
movl %r11d, 0x3c(%rsp)
cmpl %esi, %edi
jge 0x6f38
movslq %edi, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x28(%rsp)
movl (%rax,%rcx,4), %r13d
movl %r13d, %ebx
andl $0x3f, %ebx
xorl %r15d, %r15d
cmpl $0x25, %ebx
ja 0x69a7
movl %r13d, %eax
shrl $0x6, %eax
movzbl %al, %ecx
movq %rcx, 0x10(%rsp)
cmpl %r10d, %ecx
jae 0x69a7
leaq 0x12e00(%rip), %rax     # 0x19870
movzbl (%rbx,%rax), %ebp
movl %ebp, %eax
andl $0x3, %eax
xorl %ecx, %ecx
leaq 0x128ee(%rip), %rdx     # 0x19370
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
movq %rdi, 0x8(%rsp)
jmpq *%rax
movl %r13d, %r12d
shrl $0x17, %r12d
movl %ebp, %edx
shrl $0x4, %edx
andl $0x3, %edx
movq %r14, %rdi
movl %r12d, %esi
callq 0x742a
xorl %r15d, %r15d
testl %eax, %eax
je 0x69a7
shrl $0xe, %r13d
andl $0x1ff, %r13d           # imm = 0x1FF
movl %ebp, %edx
shrl $0x2, %edx
andl $0x3, %edx
movq %r14, %rdi
movl %r13d, %esi
callq 0x742a
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 0x8(%rsp), %rdi
jne 0x6bb1
jmp 0x69a7
shrl $0xe, %r13d
movl %r13d, %r12d
addl $0xfffe0001, %r12d      # imm = 0xFFFE0001
movl %ebp, %eax
andl $0x30, %eax
cmpl $0x20, %eax
jne 0x6bb1
leal (%rdi,%r12), %eax
xorl %r15d, %r15d
movl %eax, %ecx
incl %ecx
js 0x69a7
cmpl %r9d, %ecx
jge 0x69a7
testl %ecx, %ecx
je 0x6b95
movl %ecx, %r9d
pushq $-0x1
popq %rdx
subq $0x1, %r9
jb 0x6b99
cltq
movq 0x20(%rsp), %rdi
movl (%rdi,%rax,4), %edi
movl $0x7fc03f, %r15d        # imm = 0x7FC03F
andl %r15d, %edi
decl %eax
incl %edx
cmpl $0x22, %edi
movq 0x8(%rsp), %rdi
je 0x6b40
jmp 0x6b9b
xorl %r12d, %r12d
jmp 0x6bb1
shrl $0xe, %r13d
movl %ebp, %eax
notl %eax
testb $0x30, %al
jne 0x6b90
xorl %ecx, %ecx
movl %r13d, %r12d
movl $0x0, %r15d
cmpl 0x4c(%r14), %r13d
jl 0x6bb1
jmp 0x69a7
movl %r13d, %r12d
jmp 0x6bb1
xorl %ecx, %ecx
jmp 0x6bb1
movl %ecx, %edx
xorl %ecx, %ecx
movl $0x0, %r15d
testb $0x1, %dl
movq 0x30(%rsp), %r9
jne 0x69a7
testb $0x40, %bpl
movl 0x1c(%rsp), %edx
movl %edx, %eax
cmovnel %edi, %eax
cmpl %r8d, 0x10(%rsp)
cmovnel %edx, %eax
testb %bpl, %bpl
jns 0x6bf5
leal 0x2(%rdi), %edx
xorl %r15d, %r15d
cmpl %r9d, %edx
jge 0x69a7
movq 0x20(%rsp), %rdx
movq 0x28(%rsp), %r13
movl 0x4(%rdx,%r13,4), %edx
andl $0x3f, %edx
cmpl $0x16, %edx
jne 0x69a7
leal -0x2(%rbx), %edx
cmpl $0x23, %edx
ja 0x6ef2
leaq 0x12778(%rip), %rbx     # 0x19380
movslq (%rbx,%rdx,4), %rdi
addq %rbx, %rdi
movslq %r12d, %rdx
jmpq *%rdi
cmpl 0x4c(%rsp), %r12d
jmp 0x6d73
movq 0x10(%r14), %rcx
shlq $0x4, %rdx
cmpl $0x4, 0x8(%rcx,%rdx)
movq 0x8(%rsp), %rdi
je 0x6ef2
jmp 0x6f4b
testl %r12d, %r12d
setne %al
movq 0x10(%rsp), %rdi
addl %edi, %r12d
cmpl %r10d, %r12d
setg %dl
xorl %r15d, %r15d
testb %dl, %al
jne 0x69a7
testl %ecx, %ecx
je 0x6ea6
movl %ecx, %eax
decl %eax
setne %al
addl %edi, %ecx
decl %ecx
cmpl %r10d, %ecx
setg %cl
testb %cl, %al
movq 0x8(%rsp), %rdi
je 0x6ee6
jmp 0x69a7
movq 0x10(%rsp), %rcx
addl $0x3, %ecx
cmpl %r10d, %ecx
jae 0x6f4b
movq 0x8(%rsp), %rdi
leal (%rdi,%r12), %ecx
incl %ecx
cmpl %ecx, %edi
setge %dl
cmpl %esi, %ecx
setg %cl
orb %dl, %cl
testb $0x1, %cl
movl $0x0, %ecx
cmovnel %ecx, %r12d
cmpl $0xff, %r8d
cmovel %ecx, %r12d
addl %edi, %r12d
movl %r12d, %edi
jmp 0x6ef2
cmpl $0x2, %r12d
jl 0x6de3
movq 0x10(%rsp), %rcx
addl %r12d, %ecx
decl %ecx
cmpl %r10d, %ecx
movq 0x8(%rsp), %rdi
jle 0x6ef2
jmp 0x6f4b
cmpl %r8d, %r12d
movq 0x8(%rsp), %rdi
movl %edi, %ecx
cmovll %eax, %ecx
cmpl %r8d, 0x10(%rsp)
cmovlel %ecx, %eax
jmp 0x6ef2
cmpl $0x1, %ecx
jne 0x6de3
movq 0x8(%rsp), %rdi
leal 0x2(%rdi), %ecx
xorl %r15d, %r15d
cmpl %r9d, %ecx
jge 0x69a7
movq 0x20(%rsp), %rcx
movq 0x28(%rsp), %rdx
movl 0x4(%rcx,%rdx,4), %ecx
movl $0x7fc03f, %edx         # imm = 0x7FC03F
andl %edx, %ecx
cmpl $0x22, %ecx
jne 0x6ef2
jmp 0x69a7
movq 0x10(%rsp), %rcx
incl %ecx
cmpl %r10d, %ecx
jae 0x6f4b
cmpl %r8d, %ecx
movq 0x8(%rsp), %rdi
cmovel %edi, %eax
jmp 0x6ef2
cmpl %ecx, %r12d
movq 0x8(%rsp), %rdi
jl 0x6ef2
jmp 0x6f4b
xorl %r15d, %r15d
testl %ecx, %ecx
je 0x69a7
movq 0x10(%rsp), %rdx
addl %edx, %ecx
addl $0x2, %ecx
cmpl %r10d, %ecx
movq 0x8(%rsp), %rdi
jae 0x69a7
movq 0x10(%rsp), %rcx
addl $0x2, %ecx
cmpl %r8d, %ecx
jmp 0x6eef
testl %r12d, %r12d
setle %dl
movq 0x10(%rsp), %rdi
addl %r12d, %edi
cmpl %r10d, %edi
setl %dil
orb %dl, %dil
xorl %r15d, %r15d
cmpb $0x1, %dil
jne 0x69a7
testl %ecx, %ecx
je 0x6f26
movq 0x8(%rsp), %rdi
jmp 0x6ef2
xorl %r15d, %r15d
cmpb $0x2, %r11b
jne 0x69a7
subl $0x1, %r12d
jae 0x6efd
movq 0x20(%rsp), %rcx
movq 0x28(%rsp), %rdx
movl 0x4(%rcx,%rdx,4), %ecx
movl %ecx, %edx
andl $0x3f, %edx
cmpl $0x22, %edx
ja 0x69a7
movabsq $0x470000000, %rdi      # imm = 0x470000000
btq %rdx, %rdi
jae 0x69a7
cmpl $0x7fffff, %ecx         # imm = 0x7FFFFF
movq 0x8(%rsp), %rdi
ja 0x69a7
addl 0x10(%rsp), %r12d
cmpl %r10d, %r12d
jle 0x6ef2
jmp 0x69a7
xorl %r15d, %r15d
cmpl 0x58(%r14), %r12d
jge 0x69a7
movq 0x20(%r14), %rcx
movq (%rcx,%rdx,8), %rcx
movzbl 0x70(%rcx), %edx
movq 0x8(%rsp), %rcx
addl %edx, %ecx
cmpl %r9d, %ecx
jge 0x69a7
movq 0x50(%rsp), %rdi
movq 0x28(%rsp), %r9
leaq (%rdi,%r9,4), %r9
xorl %edi, %edi
cmpq %rdi, %rdx
je 0x6f11
testb $0x3b, (%r9,%rdi,4)
leaq 0x1(%rdi), %rdi
je 0x6e91
jmp 0x69a7
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
movl 0x4(%rax,%rcx,4), %eax
movl %eax, %ecx
andl $0x3f, %ecx
cmpl $0x22, %ecx
movq 0x8(%rsp), %rdi
ja 0x69a7
movabsq $0x470000000, %rdx      # imm = 0x470000000
btq %rcx, %rdx
jae 0x69a7
cmpl $0x7fffff, %eax         # imm = 0x7FFFFF
ja 0x69a7
cmpl %r8d, 0x10(%rsp)
movl 0x1c(%rsp), %eax
cmovlel %edi, %eax
incl %edi
movl %eax, 0x1c(%rsp)
jmp 0x6a27
addl 0x10(%rsp), %r12d
cmpl %r10d, %r12d
movq 0x8(%rsp), %rdi
jle 0x6ef2
jmp 0x69a7
cmpl $0xff, %r8d
cmovel 0x8(%rsp), %ecx
movl %ecx, %edi
movq 0x30(%rsp), %r9
jmp 0x6ef2
movq 0x8(%rsp), %rdi
incl %edi
cmpl 0x38(%rsp), %edi
jl 0x6ef2
jmp 0x69a7
movslq 0x1c(%rsp), %rax
movq 0x20(%rsp), %rcx
movl (%rcx,%rax,4), %r15d
jmp 0x69a7
xorl %r15d, %r15d
jmp 0x69a7