// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/lpeg-0.10.2/lpeg.c
// Function: verify
static int verify (lua_State *L, Instruction *op, const Instruction *p,
                   Instruction *e, int postable, int rule) {
  static const char dummy[] = "";
  Stack back[MAXBACKVER];
  int backtop = 0;  /* point to first empty slot in back */
  while (p != e) {
    switch ((Opcode)p->i.code) {
      case IRet: {
        p = back[--backtop].p;
        continue;
      }
      case IChoice: {
        if (backtop >= MAXBACKVER)
          return luaL_error(L, "too many pending calls/choices");
        back[backtop].p = dest(0, p);
        back[backtop++].s = dummy;
        p++;
        continue;
      }
      case ICall: {
        assert((p + 1)->i.code != IRet);  /* no tail call */
        if (backtop >= MAXBACKVER)
          return luaL_error(L, "too many pending calls/choices");
        back[backtop].s = NULL;
        back[backtop++].p = p + 1;
        goto dojmp;
      }
      case IOpenCall: {
        int i;
        if (postable == 0)  /* grammar still not fixed? */
          goto fail;  /* to be verified later */
        for (i = 0; i < backtop; i++) {
          if (back[i].s == NULL && back[i].p == p + 1)
            return luaL_error(L, "%s is left recursive", val2str(L, rule));
        }
        if (backtop >= MAXBACKVER)
          return luaL_error(L, "too many pending calls/choices");
        back[backtop].s = NULL;
        back[backtop++].p = p + 1;
        p = op + getposition(L, postable, p->i.offset);
        continue;
      }
      case IBackCommit:
      case ICommit: {
        assert(backtop > 0 && p->i.offset > 0);
        backtop--;
        goto dojmp;
      }
      case IPartialCommit: {
        assert(backtop > 0);
        if (p->i.offset > 0) goto dojmp;  /* forward jump */
        else {  /* loop will be detected when checking corresponding rule */
          assert(postable != 0);
          backtop--;
          p++;  /* just go on now */
          continue;
        }
      }
      case IBack: {
        if (p->i.aux == 1 && isfixcheck(p + 1)) {  /* char test? */
          p++;  /* skip back instruction */
          p += sizei(p);  /* skip char test */
        }
        else {  /* standard lookbehind code */
          assert((Opcode)(p - 1)->i.code == IChoice);  /* look behind */
          backtop--;
          p += (p - 1)->i.offset;
          assert((Opcode)(p - 1)->i.code == IFail);  /* look behind */
        }
        continue;
      }
      case IAny:
      case IChar:
      case ISet: {
        const Instruction *next = p + sizei(p);
        if ((Opcode)next->i.code == IBack)
          p = next + 1;  /* continue after the back instruction */
        else if (p->i.offset == 0) goto fail;
        else  /* jump */
          p += p->i.offset;
        continue;
      }
      case IJmp:
      dojmp: {
        p += p->i.offset;
        continue;
      }
      case IFailTwice:  /* 'not' predicate */
        goto fail;  /* body could have failed; try to backtrack it */
      case IFail: {
        if (p > op && (p - 1)->i.code == IBackCommit) {  /* 'and' predicate? */
          p++;  /* pretend it succeeded and go ahead */
          continue;
        }
        /* else failed: go through */
      }
      fail: { /* pattern failed: try to backtrack */
        do {
          if (backtop-- == 0)
            return 1;  /* no more backtracking */
        } while (back[backtop].s == NULL);
        p = back[backtop].p;
        continue;
      }
      case ISpan:
      case IOpenCapture: case ICloseCapture:
      case IEmptyCapture: case IEmptyCaptureIdx:
      case IFullCapture: {
        p += sizei(p);
        continue;
      }
      case ICloseRunTime: {
        goto fail;  /* be liberal in this case */
      }
      case IFunc: {
        const char *r = (p+1)->f(dummy, dummy, dummy, (p+2)->buff);
        if (r != NULL) { p += funcinstsize(p); }
        else condfailed(p);
        continue;
      }
      case IEnd:  /* cannot happen (should stop before it) */
      default: assert(0); return 0;
    }
  }
  assert(backtop == 0);
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x12d8, %rsp           # imm = 0x12D8
movl %r9d, 0x4(%rsp)
movl %r8d, (%rsp)
cmpq %rcx, %rdx
je 0x23f249
movq %rcx, %r15
movq %rdx, %r13
movq %rsi, %r12
xorl %ebp, %ebp
leaq 0x18(%rsp), %r9
leaq 0x18a519(%rip), %rbx    # 0x3c9490
leaq 0x18a666(%rip), %r10    # 0x3c95e4
movzbl (%r13), %ecx
cmpq $0x17, %rcx
ja 0x23f30a
movl $0x5, %eax
movslq (%rbx,%rcx,4), %rcx
addq %rbx, %rcx
jmpq *%rcx
movl $0x1, %eax
jmp 0x23f13c
testl %ebp, %ebp
jle 0x23f2ad
cmpw $0x0, 0x2(%r13)
jle 0x23f2ad
decl %ebp
jmp 0x23f137
movl $0x1, %eax
cmpb $0x4, (%r13,%rax,8)
jne 0x23efd7
leaq (%r13,%rax,8), %r13
jmp 0x23f201
movswq 0x2(%r13), %rax
testq %rax, %rax
jne 0x23f13c
jmp 0x23f1c8
cmpl $0x0, (%rsp)
je 0x23f1c8
testl %ebp, %ebp
jle 0x23f030
leaq 0x8(%r13), %rax
movl %ebp, %ecx
shlq $0x3, %rcx
leaq (%rcx,%rcx,2), %rcx
xorl %edx, %edx
cmpq $0x0, 0x10(%rsp,%rdx)
jne 0x23f01b
cmpq %rax, 0x18(%rsp,%rdx)
je 0x23f25d
addq $0x18, %rdx
cmpq %rdx, %rcx
jne 0x23f008
cmpl $0xc8, %ebp
jge 0x23f28e
movslq %ebp, %rax
leaq (%rax,%rax,2), %rax
movq $0x0, 0x10(%rsp,%rax,8)
leaq 0x8(%r13), %rcx
incl %ebp
movq %rcx, 0x18(%rsp,%rax,8)
movswl 0x2(%r13), %edx
movq %rdi, %r13
movl (%rsp), %esi
movq %r9, %r14
callq 0x23ecae
leaq 0x18a57f(%rip), %r10    # 0x3c95e4
movq %r14, %r9
movq %r13, %rdi
cltq
leaq (%r12,%rax,8), %r13
jmp 0x23f141
cmpb $0x5, 0x8(%r13)
je 0x23f2eb
cmpl $0xc8, %ebp
jge 0x23f28e
leaq 0x8(%r13), %rax
movslq %ebp, %rcx
leaq (%rcx,%rcx,2), %rcx
movq $0x0, 0x10(%rsp,%rcx,8)
incl %ebp
movq %rax, 0x18(%rsp,%rcx,8)
jmp 0x23f137
cmpb $0x1, 0x1(%r13)
jne 0x23f0cf
movzbl 0x8(%r13), %eax
leaq -0x3(%rax), %rcx
cmpq $0x15, %rcx
jb 0x23f0cf
cmpw $0x0, 0xa(%r13)
je 0x23f20a
cmpb $0x7, -0x8(%r13)
jne 0x23f329
movswq -0x6(%r13), %rax
cmpb $0xf, -0x8(%r13,%rax,8)
jne 0x23f348
decl %ebp
jmp 0x23f13c
cmpl $0xc8, %ebp
jge 0x23f28e
movswq 0x2(%r13), %rax
leaq (,%rax,8), %rax
addq %r13, %rax
movslq %ebp, %rcx
leaq (%rcx,%rcx,2), %rcx
movq %rax, 0x18(%rsp,%rcx,8)
incl %ebp
movq %r10, 0x10(%rsp,%rcx,8)
jmp 0x23f201
testl %ebp, %ebp
jle 0x23f2cc
cmpw $0x0, 0x2(%r13)
jle 0x23f1f5
movswq 0x2(%r13), %rax
leaq (%r13,%rax,8), %r13
cmpq %r15, %r13
jne 0x23ef7e
jmp 0x23f241
movq %r12, 0x8(%rsp)
movq %rdi, %r12
leaq 0x10(%r13), %rcx
movq %r10, %rdi
movq %r10, %rsi
movq %r10, %r14
movq %r10, %rdx
callq *0x8(%r13)
testq %rax, %rax
je 0x23f1aa
movzbl 0x1(%r13), %eax
leaq 0x10(%r13,%rax,8), %r13
movq %r12, %rdi
movq 0x8(%rsp), %r12
leaq 0x18(%rsp), %r9
movq %r14, %r10
jmp 0x23f141
cmpq %r12, %r13
jbe 0x23f1c8
cmpb $0xd, -0x8(%r13)
jne 0x23f1c8
jmp 0x23f201
decl %ebp
movslq %ebp, %rax
leaq (%rax,%rax,2), %rax
movq 0x18(%rsp,%rax,8), %r13
jmp 0x23f141
movswq 0x2(%r13), %rax
testq %rax, %rax
movq %r12, %rdi
movq 0x8(%rsp), %r12
leaq 0x18(%rsp), %r9
movq %r14, %r10
jne 0x23f13c
movslq %ebp, %rax
leaq (%rax,%rax,2), %rcx
leaq (%r9,%rcx,8), %rdx
xorl %ecx, %ecx
cmpq %rcx, %rax
je 0x23f23a
incq %rcx
leaq -0x18(%rdx), %rsi
cmpq $0x0, -0x20(%rdx)
movq %rsi, %rdx
je 0x23f1d5
subl %ecx, %ebp
movq (%rsi), %r13
jmp 0x23f141
cmpl $0x0, (%rsp)
je 0x23f386
decl %ebp
addq $0x8, %r13
jmp 0x23f141
movl $0x5, %ecx
leal -0x2(%rax), %edx
cmpl $0x2, %edx
jb 0x23f22c
cmpl $0x11, %eax
jne 0x23f227
movzbl 0x9(%r13), %ecx
addq $0x2, %rcx
jmp 0x23f22c
movl $0x1, %ecx
addq $0x8, %r13
leaq (%r13,%rcx,8), %r13
jmp 0x23f141
movl $0x1, %eax
jmp 0x23f24b
testl %ebp, %ebp
jne 0x23f367
xorl %eax, %eax
addq $0x12d8, %rsp           # imm = 0x12D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdi, %rbx
movl 0x4(%rsp), %esi
callq 0x23eba6
leaq 0x18a69f(%rip), %rsi    # 0x3c990f
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
addq $0x12d8, %rsp           # imm = 0x12D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x226e43
leaq 0x18a5ee(%rip), %rsi    # 0x3c9883
xorl %eax, %eax
addq $0x12d8, %rsp           # imm = 0x12D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x226e43
leaq 0x18a670(%rip), %rdi    # 0x3c9924
leaq 0x18a427(%rip), %rsi    # 0x3c96e2
leaq 0x18a5f8(%rip), %rcx    # 0x3c98ba
movl $0x2bc, %edx            # imm = 0x2BC
callq 0x174d0
leaq 0x18a670(%rip), %rdi    # 0x3c9943
leaq 0x18a408(%rip), %rsi    # 0x3c96e2
leaq 0x18a5d9(%rip), %rcx    # 0x3c98ba
movl $0x2c1, %edx            # imm = 0x2C1
callq 0x174d0
leaq 0x18a5b0(%rip), %rdi    # 0x3c98a2
leaq 0x18a3e9(%rip), %rsi    # 0x3c96e2
leaq 0x18a5ba(%rip), %rcx    # 0x3c98ba
movl $0x2a4, %edx            # imm = 0x2A4
callq 0x174d0
leaq 0x12f6cc(%rip), %rdi    # 0x36e9dd
leaq 0x18a3ca(%rip), %rsi    # 0x3c96e2
leaq 0x18a59b(%rip), %rcx    # 0x3c98ba
movl $0x309, %edx            # imm = 0x309
callq 0x174d0
leaq 0x18a62d(%rip), %rdi    # 0x3c995d
leaq 0x18a3ab(%rip), %rsi    # 0x3c96e2
leaq 0x18a57c(%rip), %rcx    # 0x3c98ba
movl $0x2d0, %edx            # imm = 0x2D0
callq 0x174d0
leaq 0x18a631(%rip), %rdi    # 0x3c9980
leaq 0x18a38c(%rip), %rsi    # 0x3c96e2
leaq 0x18a55d(%rip), %rcx    # 0x3c98ba
movl $0x2d3, %edx            # imm = 0x2D3
callq 0x174d0
leaq 0x18a633(%rip), %rdi    # 0x3c99a1
leaq 0x18a36d(%rip), %rsi    # 0x3c96e2
leaq 0x18a53e(%rip), %rcx    # 0x3c98ba
movl $0x30c, %edx            # imm = 0x30C
callq 0x174d0
leaq 0x18a5c2(%rip), %rdi    # 0x3c994f
leaq 0x18a34e(%rip), %rsi    # 0x3c96e2
leaq 0x18a51f(%rip), %rcx    # 0x3c98ba
movl $0x2c4, %edx            # imm = 0x2C4
callq 0x174d0