// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/lpeg-0.10.2/lpeg.c
// Function: pushcapture
static int pushcapture (CapState *cs) {
  luaL_checkstack(cs->L, 4, "too many captures");
  switch (captype(cs->cap)) {
    case Cposition: {
      lua_pushinteger(cs->L, cs->cap->s - cs->s + 1);
      cs->cap++;
      return 1;
    }
    case Cconst: {
      pushluaval(cs);
      cs->cap++;
      return 1;
    }
    case Carg: {
      int arg = (cs->cap++)->idx;
      if (arg + FIXEDARGS > cs->ptop)
        return luaL_error(cs->L, "reference to absent argument #%d", arg);
      lua_pushvalue(cs->L, arg + FIXEDARGS);
      return 1;
    }
    case Csimple: {
      int k = pushallvalues(cs, 1);
      if (k > 1)
        lua_insert(cs->L, -k);  /* whole match is first result */
      return k;
    }
    case Cruntime: {
      int n = 0;
      while (!isclosecap(cs->cap++)) {
        luaL_checkstack(cs->L, 4, "too many captures");
        lua_pushvalue(cs->L, (cs->cap - 1)->idx);
        n++;
      }
      return n;
    }
    case Cstring: {
      luaL_Buffer b;
      luaL_buffinit(cs->L, &b);
      stringcap(&b, cs);
      luaL_pushresult(&b);
      return 1;
    }
    case Csubst: {
      luaL_Buffer b;
      luaL_buffinit(cs->L, &b);
      substcap(&b, cs);
      luaL_pushresult(&b);
      return 1;
    }
    case Cgroup: {
      if (cs->cap->idx == 0)  /* anonymous group? */
        return pushallvalues(cs, 0);  /* add all nested values */
      else {  /* named group: add no values */
        cs->cap = nextcap(cs->cap);  /* skip capture */
        return 0;
      }
    }
    case Cbackref: return backrefcap(cs);
    case Ctable: return tablecap(cs);
    case Cfunction: return functioncap(cs);
    case Cquery: return querycap(cs);
    case Cfold: return foldcap(cs);
    default: assert(0); return 0;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2028, %rsp           # imm = 0x2028
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
leaq 0x18791a(%rip), %rdx    # 0x3c8cc6
movl $0x4, %esi
callq 0x2271b2
movq (%rbx), %r13
movzbl 0xa(%r13), %eax
decl %eax
cmpl $0xc, %eax
ja 0x241910
leaq 0x1881e0(%rip), %rcx    # 0x3c95b0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x10(%rbx), %rdi
movq (%r13), %rsi
subq 0x20(%rbx), %rsi
incq %rsi
callq 0x2241dd
jmp 0x24167f
addq $0x10, %r13
movq %r13, (%rbx)
xorl %ebp, %ebp
leaq 0x1878c4(%rip), %r14    # 0x3c8cc6
movq 0x10(%rbx), %rdi
movl $0x4, %esi
movq %r14, %rdx
callq 0x2271b2
movq (%rbx), %rax
movq 0x10(%rbx), %rdi
movswl -0x8(%rax), %esi
callq 0x223a2b
incl %ebp
movq (%rbx), %rax
leaq 0x10(%rax), %rcx
movq %rcx, (%rbx)
cmpb $0x0, 0xa(%rax)
jne 0x241402
jmp 0x24176b
movq %rbx, %rdi
movl $0x1, %esi
callq 0x2412fa
movl %eax, %ebp
cmpl $0x2, %eax
jl 0x24176b
movq 0x10(%rbx), %rdi
movl %ebp, %esi
negl %esi
callq 0x2237fd
jmp 0x24176b
cmpw $0x0, 0x8(%r13)
je 0x241843
cmpb $0x0, 0xb(%r13)
je 0x2418e2
addq $0x10, %r13
movq %r13, (%rbx)
jmp 0x241664
movq 0x10(%rbx), %rdi
leaq 0x10(%rsp), %r14
movq %r14, %rsi
callq 0x227963
movq %r14, %rdi
movq %rbx, %rsi
callq 0x241a87
jmp 0x24175e
movq 0x10(%rbx), %rdi
movl 0x18(%rbx), %esi
addl $0x3, %esi
movswl 0x8(%r13), %edx
callq 0x224b36
movq 0x10(%rbx), %r14
leaq 0x188977(%rip), %r15    # 0x3c9e3e
leaq 0x188977(%rip), %r12    # 0x3c9e45
movq %r13, %rbp
cmpq 0x8(%rbx), %rbp
jne 0x241522
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x223ea8
testq %rax, %rax
jne 0x241512
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x223a4b
movq %r14, %rdi
movl %eax, %esi
callq 0x223a66
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x224708
movq %r14, %rdi
movq %r12, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x226e43
leaq -0x10(%rbp), %rcx
cmpb $0x0, -0x6(%rbp)
je 0x241576
cmpb $0x0, -0x5(%rbp)
movq %rcx, %rbp
je 0x2414d1
cmpb $0xd, 0xa(%rbp)
jne 0x2414d1
movq 0x10(%rbx), %rdi
movl 0x18(%rbx), %esi
addl $0x3, %esi
movswl 0x8(%rbp), %edx
callq 0x224b36
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x223bf0
testl %eax, %eax
jne 0x24159c
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x2235b9
jmp 0x2414d1
xorl %eax, %eax
movq %rcx, %rbp
movq %rbp, %rcx
leaq -0x10(%rcx), %rbp
cmpb $0x0, -0x6(%rcx)
je 0x241598
cmpb $0x0, -0x5(%rcx)
movq %rbp, %rcx
jne 0x24157e
subl $0x1, %eax
jae 0x24157b
jmp 0x241535
incl %eax
jmp 0x24157b
movq %r14, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x2235b9
movq %rbp, (%rbx)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2412fa
addq $0x10, %r13
movq %r13, (%rbx)
jmp 0x24176d
leaq 0x10(%r13), %rax
movq %rax, (%rbx)
movswl 0x8(%r13), %edx
leal 0x3(%rdx), %esi
movq 0x10(%rbx), %rdi
cmpl 0x18(%rbx), %esi
jle 0x241839
leaq 0x1887d2(%rip), %rsi    # 0x3c9db7
xorl %eax, %eax
addq $0x2028, %rsp           # imm = 0x2028
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x226e43
movswl 0x8(%r13), %ebp
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2412fa
cmpl $0x2, %eax
jl 0x24161e
movq 0x10(%rbx), %rdi
negl %eax
movl %eax, %esi
callq 0x2235b9
cmpl %ebp, 0x28(%rbx)
je 0x24162d
movq %rbx, %rdi
movl %ebp, %esi
callq 0x241b23
movq 0x10(%rbx), %rdi
movl 0x18(%rbx), %esi
incl %esi
callq 0x2248f5
movq 0x10(%rbx), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x223a4b
movl $0x1, %ebp
testl %eax, %eax
jne 0x24176b
movq 0x10(%rbx), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x2235b9
xorl %ebp, %ebp
jmp 0x24176b
movq 0x10(%rbx), %rdi
movl 0x18(%rbx), %esi
addl $0x3, %esi
movswl 0x8(%r13), %edx
callq 0x224b36
addq $0x10, (%rbx)
jmp 0x241766
movq 0x10(%rbx), %r14
xorl %r13d, %r13d
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x224be0
movq (%rbx), %rax
leaq 0x10(%rax), %rcx
movq %rcx, (%rbx)
movl $0x1, %ebp
cmpb $0x0, 0xb(%rax)
jne 0x24176b
jmp 0x2417e5
movq 0x10(%rbx), %rdi
callq 0x2235ac
movl %eax, %r14d
movq (%rbx), %rax
movq 0x10(%rbx), %rdi
movl 0x18(%rbx), %esi
addl $0x3, %esi
movswl 0x8(%rax), %edx
callq 0x224b36
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2412fa
movq 0x10(%rbx), %rdi
movl %eax, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x2252cf
movq 0x10(%rbx), %rdi
callq 0x2235ac
movl %eax, %ebp
subl %r14d, %ebp
jmp 0x24176b
movq 0x10(%rbx), %r14
movswl 0x8(%r13), %ebp
leaq 0x10(%r13), %rax
movq %rax, (%rbx)
cmpb $0x0, 0xb(%r13)
je 0x24185e
leaq 0x18873c(%rip), %rsi    # 0x3c9e63
movq %r14, %rdi
xorl %eax, %eax
addq $0x2028, %rsp           # imm = 0x2028
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x226e43
movq 0x10(%rbx), %rdi
leaq 0x10(%rsp), %r14
movq %r14, %rsi
callq 0x227963
movq %r14, %rdi
movq %rbx, %rsi
callq 0x24192f
movq %r14, %rdi
callq 0x2279f9
movl $0x1, %ebp
movl %ebp, %eax
addq $0x2028, %rsp           # imm = 0x2028
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x24138d
movl %eax, 0xc(%rsp)
testl %eax, %eax
jle 0x2417bb
movl 0xc(%rsp), %eax
movl %eax, %r12d
notl %r12d
movl %eax, %r15d
leal (%r15,%r13), %edx
movq %r14, %rdi
movl %r12d, %esi
callq 0x2250be
leal -0x1(%r15), %eax
incl %r12d
cmpl $0x1, %r15d
movl %eax, %r15d
ja 0x24179c
movl 0xc(%rsp), %eax
addl %r13d, %eax
movl %eax, %r13d
jmp 0x2417e5
cmpl $0x2, %eax
jl 0x2417d8
negl %eax
movq %r14, %rdi
movl %eax, %esi
callq 0x2235b9
movq %r14, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x224d62
movq (%rbx), %rax
movzbl 0xa(%rax), %ecx
cmpl $0xd, %ecx
jne 0x241825
movswl 0x8(%rax), %edx
testl %edx, %edx
je 0x24177f
movq 0x10(%rbx), %rdi
movl 0x18(%rbx), %esi
addl $0x3, %esi
callq 0x224b36
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2412fa
testl %eax, %eax
jne 0x2417c7
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x2235b9
jmp 0x2417e5
testl %ecx, %ecx
jne 0x24177f
addq $0x10, %rax
movq %rax, (%rbx)
jmp 0x24176b
callq 0x223a2b
jmp 0x241766
movq %rbx, %rdi
xorl %esi, %esi
addq $0x2028, %rsp           # imm = 0x2028
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2412fa
cmpb $0x0, 0x1a(%r13)
je 0x241720
movq %rbx, %rdi
callq 0x24138d
testl %eax, %eax
je 0x241720
cmpl $0x2, %eax
jl 0x2418cd
negl %eax
movq %r14, %rdi
movl %eax, %esi
callq 0x2235b9
jmp 0x2418cd
cmpl %ebp, 0x28(%rbx)
je 0x24189b
movq %rbx, %rdi
movl %ebp, %esi
callq 0x241b23
movl 0x18(%rbx), %esi
incl %esi
movq %r14, %rdi
callq 0x223a2b
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x2237fd
movq %rbx, %rdi
callq 0x24138d
leal 0x1(%rax), %esi
movq %r14, %rdi
movl $0x1, %edx
callq 0x2252cf
movq (%rbx), %rax
cmpb $0x0, 0xa(%rax)
jne 0x24188c
addq $0x10, %rax
movq %rax, (%rbx)
jmp 0x241766
addq $0x20, %r13
xorl %eax, %eax
cmpb $0x0, -0x6(%r13)
je 0x2418fb
xorl %ecx, %ecx
cmpb $0x0, -0x5(%r13)
sete %cl
jmp 0x241908
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testl %eax, %eax
je 0x24147f
addl %ecx, %eax
addq $0x10, %r13
jmp 0x2418e8
leaq 0x12d0c6(%rip), %rdi    # 0x36e9dd
leaq 0x187dc4(%rip), %rsi    # 0x3c96e2
leaq 0x1884b3(%rip), %rcx    # 0x3c9dd8
movl $0x8b3, %edx            # imm = 0x8B3
callq 0x174d0