// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/external/lua-5.1.5/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 $0x48, %rsp
movzbl 0x73(%rdi), %ebp
xorl %r10d, %r10d
cmpl $0xfa, %ebp
ja 0x5cbab
movq %rdi, %rbx
movzbl 0x72(%rdi), %eax
movl %eax, %ecx
andl $0x5, %ecx
cmpl $0x4, %ecx
je 0x5cbab
movzbl 0x71(%rbx), %ecx
andl $0x1, %eax
addl %ecx, %eax
cmpl %ebp, %eax
ja 0x5cbab
movzbl 0x70(%rbx), %eax
cmpl %eax, 0x48(%rbx)
jle 0x5cbbd
movl %r10d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x50(%rbx), %r11d
movl 0x54(%rbx), %ecx
cmpl %r11d, %ecx
sete %al
testl %ecx, %ecx
sete %cl
testl %r11d, %r11d
jle 0x5cbab
orb %al, %cl
je 0x5cbab
movq 0x18(%rbx), %rax
movl -0x4(%rax,%r11,4), %eax
andl $0x3f, %eax
cmpl $0x1e, %eax
jne 0x5cbab
leal -0x1(%r11), %eax
testl %esi, %esi
jle 0x5d124
movl %edx, %r8d
movq 0x18(%rbx), %r9
leaq 0x4(%r9), %rcx
movq %rcx, 0x38(%rsp)
leaq 0x90b14(%rip), %rdi     # 0xed720
xorl %r12d, %r12d
movl %eax, 0x2c(%rsp)
movl %eax, 0x4(%rsp)
movq %r9, 0x10(%rsp)
movl %edx, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movq %r11, 0x30(%rsp)
movslq %r12d, %rcx
movl (%r9,%rcx,4), %r13d
movl %r13d, %r14d
andl $0x3f, %r14d
xorl %r10d, %r10d
cmpl $0x25, %r14d
ja 0x5ccf7
movl %r13d, %eax
shrl $0x6, %eax
movzbl %al, %eax
cmpl %ebp, %eax
jae 0x5ccf7
movq %rcx, 0x18(%rsp)
movq %rax, 0x8(%rsp)
movzbl (%rdi,%r14), %r15d
movl %r15d, %eax
andl $0x3, %eax
xorl %ecx, %ecx
leaq 0x9055d(%rip), %rdx     # 0xed1d0
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
jmpq *%rax
movl %r13d, %esi
shrl $0x17, %esi
movl %r15d, %edx
shrl $0x4, %edx
andl $0x3, %edx
movq %rbx, %rdi
movq %rsi, 0x40(%rsp)
callq 0x5d13a
testl %eax, %eax
je 0x5ce27
shrl $0xe, %r13d
andl $0x1ff, %r13d           # imm = 0x1FF
shrb $0x2, %r15b
andb $0x3, %r15b
movzbl %r15b, %edx
movq %rbx, %rdi
movl %r13d, %esi
callq 0x5d13a
movl %r13d, %ecx
testl %eax, %eax
movl 0x28(%rsp), %r8d
movl 0x24(%rsp), %esi
movl $0x0, %r10d
movq 0x30(%rsp), %r11
movq 0x10(%rsp), %r9
leaq 0x90a39(%rip), %rdi     # 0xed720
movq 0x8(%rsp), %r15
movq 0x40(%rsp), %r13
jne 0x5cda6
xorl %ecx, %ecx
jmp 0x5d10e
shrl $0xe, %r13d
addl $0xfffe0001, %r13d      # imm = 0xFFFE0001
andl $0x30, %r15d
cmpl $0x20, %r15d
jne 0x5cda1
leal (%r12,%r13), %edx
movl %edx, %eax
incl %eax
setns %cl
cmpl %r11d, %eax
setl %dil
andb %cl, %dil
xorl %ecx, %ecx
cmpb $0x1, %dil
jne 0x5ce3f
testl %eax, %eax
je 0x5cedd
movl %eax, %ecx
negq %rcx
xorl %r9d, %r9d
leal (%rdx,%r9), %edi
movslq %edi, %rdi
movq 0x10(%rsp), %r15
movl (%r15,%rdi,4), %edi
movl $0x7fc03f, %r15d        # imm = 0x7FC03F
andl %r15d, %edi
cmpl $0x22, %edi
jne 0x5d08a
decq %r9
cmpq %r9, %rcx
jne 0x5cd48
jmp 0x5d090
xorl %r13d, %r13d
jmp 0x5cda1
shrl $0xe, %r13d
notl %r15d
testb $0x30, %r15b
jne 0x5cda1
xorl %ecx, %ecx
movl %r13d, %eax
cmpl 0x4c(%rbx), %r13d
movq %rax, %r13
movq 0x8(%rsp), %r15
jl 0x5cda6
jmp 0x5d10e
movq 0x8(%rsp), %r15
movabsq $0xe43c00380, %rax      # imm = 0xE43C00380
btq %r14, %rax
movl 0x4(%rsp), %edx
movl %edx, %eax
cmovael %r12d, %eax
cmpl %r8d, %r15d
cmovnel %edx, %eax
movabsq $0x3df07fffff, %rdx     # imm = 0x3DF07FFFFF
btq %r14, %rdx
jb 0x5cdf8
leal 0x2(%r12), %edx
cmpl %r11d, %edx
jge 0x5d108
movq 0x18(%rsp), %rdx
movl 0x4(%r9,%rdx,4), %edx
andl $0x3f, %edx
cmpl $0x16, %edx
jne 0x5d108
leal -0x2(%r14), %edx
cmpl $0x23, %edx
ja 0x5d0f2
leaq 0x903d4(%rip), %r14     # 0xed1e0
movslq (%r14,%rdx,4), %rdx
addq %r14, %rdx
jmpq *%rdx
movzbl 0x70(%rbx), %ecx
cmpl %ecx, %r13d
jl 0x5d0f2
jmp 0x5d108
xorl %ecx, %ecx
movl 0x28(%rsp), %r8d
movl 0x24(%rsp), %esi
xorl %r10d, %r10d
movq 0x30(%rsp), %r11
movq 0x10(%rsp), %r9
leaq 0x908da(%rip), %rdi     # 0xed720
jmp 0x5d10e
movq 0x10(%rbx), %rcx
movslq %r13d, %rdx
shlq $0x4, %rdx
cmpl $0x4, 0x8(%rcx,%rdx)
je 0x5d0f2
jmp 0x5d108
testl %r13d, %r13d
je 0x5ce77
addl %r15d, %r13d
cmpl %ebp, %r13d
jg 0x5d108
testl %ecx, %ecx
je 0x5d0b1
movl %ecx, %edx
decl %edx
je 0x5d0dd
addl %r15d, %ecx
decl %ecx
cmpl %ebp, %ecx
jg 0x5d108
jmp 0x5d0dd
addl $0x3, %r15d
cmpl %ebp, %r15d
jae 0x5d108
leal (%r12,%r13), %ecx
incl %ecx
cmpl %ecx, %r12d
setge %dl
cmpl %esi, %ecx
setg %cl
orb %dl, %cl
testb $0x1, %cl
movl $0x0, %ecx
cmovnel %ecx, %r13d
cmpl $0xff, %r8d
cmovel %ecx, %r13d
addl %r12d, %r13d
movl %r13d, %r12d
jmp 0x5d0f2
leaq 0x9083c(%rip), %rdi     # 0xed720
jmp 0x5cda1
cmpl $0x2, %r13d
jl 0x5d0f2
leal (%r15,%r13), %ecx
decl %ecx
cmpl %ebp, %ecx
jle 0x5d0f2
jmp 0x5d108
cmpl %r8d, %r13d
movl %r12d, %ecx
cmovll %eax, %ecx
cmpl %r8d, %r15d
cmovlel %ecx, %eax
jmp 0x5d0f2
cmpl $0x1, %ecx
jne 0x5d0f2
leal 0x2(%r12), %ecx
cmpl %r11d, %ecx
jge 0x5d108
movq 0x18(%rsp), %rcx
movl 0x4(%r9,%rcx,4), %ecx
movl $0x7fc03f, %edx         # imm = 0x7FC03F
andl %edx, %ecx
cmpl $0x22, %ecx
jne 0x5d0f2
jmp 0x5d108
incl %r15d
cmpl %ebp, %r15d
jae 0x5d108
cmpl %r8d, %r15d
cmovel %r12d, %eax
jmp 0x5d0f2
cmpl %ecx, %r13d
jl 0x5d0f2
jmp 0x5d108
testl %ecx, %ecx
je 0x5d108
addl %r15d, %ecx
addl $0x2, %ecx
cmpl %ebp, %ecx
jae 0x5d108
addl $0x2, %r15d
cmpl %r8d, %r15d
jmp 0x5d0e4
testl %r13d, %r13d
jle 0x5cfa9
addl %r15d, %r13d
cmpl %ebp, %r13d
jge 0x5d108
testl %ecx, %ecx
jne 0x5d0f2
incl %r12d
cmpl 0x2c(%rsp), %r12d
jl 0x5d0f2
jmp 0x5d108
movb 0x72(%rbx), %cl
andb $0x6, %cl
cmpb $0x2, %cl
jne 0x5d108
subl $0x1, %r13d
jae 0x5d0ea
movq 0x18(%rsp), %rcx
movl 0x4(%r9,%rcx,4), %ecx
movl %ecx, %edi
andl $0x3f, %edi
movb $0x1, %dl
cmpl $0x22, %edi
ja 0x5d00c
movabsq $0x470000000, %r14      # imm = 0x470000000
btq %rdi, %r14
jae 0x5d00c
cmpl $0x800000, %ecx         # imm = 0x800000
setae %dl
xorl %ecx, %ecx
testb %dl, %dl
leaq 0x90709(%rip), %rdi     # 0xed720
jne 0x5d10a
addl %r15d, %r13d
movl %eax, 0x4(%rsp)
cmpl %ebp, %r13d
jle 0x5d0f2
jmp 0x5d10e
cmpl 0x58(%rbx), %r13d
jge 0x5d0ad
movq 0x20(%rbx), %rcx
movslq %r13d, %rdx
movq (%rcx,%rdx,8), %rcx
movzbl 0x70(%rcx), %edx
leal (%r12,%rdx), %ecx
cmpl %r11d, %ecx
jge 0x5d0ad
testq %rdx, %rdx
je 0x5d078
movq 0x38(%rsp), %rdi
movq 0x18(%rsp), %r9
leaq (%rdi,%r9,4), %r9
xorl %edi, %edi
testb $0x3b, (%r9,%rdi,4)
jne 0x5d0f6
incq %rdi
cmpq %rdi, %rdx
jne 0x5d065
cmpl $0xff, %r8d
cmovel %r12d, %ecx
movb $0x1, %dl
movl %ecx, %r12d
jmp 0x5d0f8
negl %r9d
movl %r9d, %eax
xorl %ecx, %ecx
testb $0x1, %al
movq 0x10(%rsp), %r9
leaq 0x90680(%rip), %rdi     # 0xed720
movq 0x8(%rsp), %r15
je 0x5cda6
jmp 0x5d10e
xorl %edx, %edx
jmp 0x5d104
movq 0x18(%rsp), %rcx
movl 0x4(%r9,%rcx,4), %ecx
movl %ecx, %edx
andl $0x3f, %edx
cmpl $0x22, %edx
ja 0x5d108
movabsq $0x470000000, %r14      # imm = 0x470000000
btq %rdx, %r14
jae 0x5d108
cmpl $0x7fffff, %ecx         # imm = 0x7FFFFF
ja 0x5d108
cmpl %r8d, %r15d
movl 0x4(%rsp), %eax
cmovlel %r12d, %eax
jmp 0x5d0f2
addl %r15d, %r13d
cmpl %ebp, %r13d
jg 0x5d108
movb $0x1, %cl
jmp 0x5d10a
xorl %edx, %edx
movq 0x10(%rsp), %r9
leaq 0x9061c(%rip), %rdi     # 0xed720
testb %dl, %dl
jne 0x5d0f2
xorl %ecx, %ecx
movl %eax, 0x4(%rsp)
testb %cl, %cl
je 0x5cbab
incl %r12d
cmpl %esi, %r12d
jl 0x5cc29
jmp 0x5d128
movl %eax, 0x4(%rsp)
movq 0x18(%rbx), %rax
movslq 0x4(%rsp), %rcx
movl (%rax,%rcx,4), %r10d
jmp 0x5cbab