// File: /workspace/github_c_makefile_star2_O1/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 0x1883a4(%rip), %rdx    # 0x3d23f1
movl $0x4, %esi
callq 0x230e39
movq (%rbx), %r13
movzbl 0xa(%r13), %eax
decl %eax
cmpl $0xc, %eax
ja 0x24a5c6
leaq 0x188c5f(%rip), %rcx    # 0x3d2cd0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x10(%rbx), %rdi
movq (%r13), %rsi
subq 0x20(%rbx), %rsi
incq %rsi
callq 0x22ded3
jmp 0x24a32d
movq (%rbx), %rax
leaq 0x10(%rax), %rcx
movq %rcx, (%rbx)
cmpb $0x0, 0xa(%rax)
je 0x24a312
xorl %ebp, %ebp
leaq 0x188341(%rip), %r14    # 0x3d23f1
movq 0x10(%rbx), %rdi
movl $0x4, %esi
movq %r14, %rdx
callq 0x230e39
movq (%rbx), %rax
movq 0x10(%rbx), %rdi
movswl -0x8(%rax), %esi
callq 0x22d798
incl %ebp
movq (%rbx), %rax
leaq 0x10(%rax), %rcx
movq %rcx, (%rbx)
cmpb $0x0, 0xa(%rax)
jne 0x24a0b0
jmp 0x24a419
movq %rbx, %rdi
movl $0x1, %esi
callq 0x249f9f
movl %eax, %ebp
cmpl $0x2, %eax
jl 0x24a419
movq 0x10(%rbx), %rdi
movl %ebp, %esi
negl %esi
callq 0x22d562
jmp 0x24a419
cmpw $0x0, 0x8(%r13)
je 0x24a4f9
cmpb $0x0, 0xb(%r13)
je 0x24a598
addq $0x10, %r13
movq %r13, (%rbx)
jmp 0x24a312
movq 0x10(%rbx), %rdi
leaq 0x10(%rsp), %r14
movq %r14, %rsi
callq 0x2314e8
movq %r14, %rdi
movq %rbx, %rsi
callq 0x24a739
jmp 0x24a40c
movq 0x10(%rbx), %rdi
movl 0x18(%rbx), %esi
addl $0x3, %esi
movswl 0x8(%r13), %edx
callq 0x22e852
movq 0x10(%rbx), %r14
leaq 0x1893e9(%rip), %r15    # 0x3d355e
leaq 0x1893e9(%rip), %r12    # 0x3d3565
movq %r13, %rbp
cmpq 0x8(%rbx), %rbp
jne 0x24a1d0
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %edx, %edx
callq 0x22db9e
testq %rax, %rax
jne 0x24a1c0
movq %r14, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x22d7b8
movq %r14, %rdi
movl %eax, %esi
callq 0x22d7d3
movq %r14, %rdi
movq %r15, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x22e3dc
movq %r14, %rdi
movq %r12, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x230abd
leaq -0x10(%rbp), %rcx
cmpb $0x0, -0x6(%rbp)
je 0x24a224
cmpb $0x0, -0x5(%rbp)
movq %rcx, %rbp
je 0x24a17f
cmpb $0xd, 0xa(%rbp)
jne 0x24a17f
movq 0x10(%rbx), %rdi
movl 0x18(%rbx), %esi
addl $0x3, %esi
movswl 0x8(%rbp), %edx
callq 0x22e852
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x22d95d
testl %eax, %eax
jne 0x24a24a
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x22d42e
jmp 0x24a17f
xorl %eax, %eax
movq %rcx, %rbp
movq %rbp, %rcx
leaq -0x10(%rcx), %rbp
cmpb $0x0, -0x6(%rcx)
je 0x24a246
cmpb $0x0, -0x5(%rcx)
movq %rbp, %rcx
jne 0x24a22c
subl $0x1, %eax
jae 0x24a229
jmp 0x24a1e3
incl %eax
jmp 0x24a229
movq %r14, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x22d42e
movq %rbp, (%rbx)
movq %rbx, %rdi
xorl %esi, %esi
callq 0x249f9f
addq $0x10, %r13
movq %r13, (%rbx)
jmp 0x24a41b
leaq 0x10(%r13), %rax
movq %rax, (%rbx)
movswl 0x8(%r13), %edx
leal 0x3(%rdx), %esi
movq 0x10(%rbx), %rdi
cmpl 0x18(%rbx), %esi
jle 0x24a4ef
leaq 0x189244(%rip), %rsi    # 0x3d34d7
xorl %eax, %eax
addq $0x2028, %rsp           # imm = 0x2028
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x230abd
movswl 0x8(%r13), %ebp
movq %rbx, %rdi
xorl %esi, %esi
callq 0x249f9f
cmpl $0x2, %eax
jl 0x24a2cc
movq 0x10(%rbx), %rdi
negl %eax
movl %eax, %esi
callq 0x22d42e
cmpl %ebp, 0x28(%rbx)
je 0x24a2db
movq %rbx, %rdi
movl %ebp, %esi
callq 0x24a7d8
movq 0x10(%rbx), %rdi
movl 0x18(%rbx), %esi
incl %esi
callq 0x22e5c2
movq 0x10(%rbx), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x22d7b8
movl $0x1, %ebp
testl %eax, %eax
jne 0x24a419
movq 0x10(%rbx), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x22d42e
xorl %ebp, %ebp
jmp 0x24a419
movq 0x10(%rbx), %rdi
movl 0x18(%rbx), %esi
addl $0x3, %esi
movswl 0x8(%r13), %edx
callq 0x22e852
addq $0x10, (%rbx)
jmp 0x24a414
movq 0x10(%rbx), %r14
xorl %r13d, %r13d
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x22e8fc
movq (%rbx), %rax
leaq 0x10(%rax), %rcx
movq %rcx, (%rbx)
movl $0x1, %ebp
cmpb $0x0, 0xb(%rax)
jne 0x24a419
jmp 0x24a473
movq 0x10(%rbx), %rdi
callq 0x22d421
movl %eax, %r14d
movq (%rbx), %rax
movq 0x10(%rbx), %rdi
movl 0x18(%rbx), %esi
addl $0x3, %esi
movswl 0x8(%rax), %edx
callq 0x22e852
movq %rbx, %rdi
xorl %esi, %esi
callq 0x249f9f
movq 0x10(%rbx), %rdi
movl %eax, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x22efe6
movq 0x10(%rbx), %rdi
callq 0x22d421
movl %eax, %ebp
subl %r14d, %ebp
jmp 0x24a419
movq 0x10(%rbx), %r14
movswl 0x8(%r13), %ebp
leaq 0x10(%r13), %rax
movq %rax, (%rbx)
cmpb $0x0, 0xb(%r13)
je 0x24a514
leaq 0x1891ae(%rip), %rsi    # 0x3d3583
movq %r14, %rdi
xorl %eax, %eax
addq $0x2028, %rsp           # imm = 0x2028
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x230abd
movq 0x10(%rbx), %rdi
leaq 0x10(%rsp), %r14
movq %r14, %rsi
callq 0x2314e8
movq %r14, %rdi
movq %rbx, %rsi
callq 0x24a5e5
movq %r14, %rdi
callq 0x23157e
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 0x24a02e
movl %eax, 0xc(%rsp)
testl %eax, %eax
jle 0x24a469
movl 0xc(%rsp), %eax
movl %eax, %r12d
notl %r12d
movl %eax, %r15d
leal (%r15,%r13), %edx
movq %r14, %rdi
movl %r12d, %esi
callq 0x22edd2
leal -0x1(%r15), %eax
incl %r12d
cmpl $0x1, %r15d
movl %eax, %r15d
jg 0x24a44a
movl 0xc(%rsp), %eax
addl %r13d, %eax
movl %eax, %r13d
movq (%rbx), %rax
movzbl 0xa(%rax), %ecx
cmpl $0xd, %ecx
jne 0x24a4db
movswl 0x8(%rax), %edx
testl %edx, %edx
je 0x24a42d
movq 0x10(%rbx), %rdi
movl 0x18(%rbx), %esi
addl $0x3, %esi
callq 0x22e852
movq %rbx, %rdi
xorl %esi, %esi
callq 0x249f9f
movl %eax, %r15d
testl %eax, %eax
je 0x24a4c9
cmpl $0x2, %r15d
jl 0x24a4ba
movl %r15d, %esi
negl %esi
movq %r14, %rdi
callq 0x22d42e
movq %r14, %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0x22ea7e
jmp 0x24a4d6
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x22d42e
testl %r15d, %r15d
jmp 0x24a473
testl %ecx, %ecx
jne 0x24a42d
addq $0x10, %rax
movq %rax, (%rbx)
jmp 0x24a419
callq 0x22d798
jmp 0x24a414
movq %rbx, %rdi
xorl %esi, %esi
addq $0x2028, %rsp           # imm = 0x2028
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x249f9f
cmpb $0x0, 0x1a(%r13)
je 0x24a3ce
movq %rbx, %rdi
callq 0x24a02e
testl %eax, %eax
je 0x24a3ce
cmpl $0x2, %eax
jl 0x24a583
negl %eax
movq %r14, %rdi
movl %eax, %esi
callq 0x22d42e
jmp 0x24a583
cmpl %ebp, 0x28(%rbx)
je 0x24a551
movq %rbx, %rdi
movl %ebp, %esi
callq 0x24a7d8
movl 0x18(%rbx), %esi
incl %esi
movq %r14, %rdi
callq 0x22d798
movq %r14, %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0x22d562
movq %rbx, %rdi
callq 0x24a02e
leal 0x1(%rax), %esi
movq %r14, %rdi
movl $0x1, %edx
callq 0x22efe6
movq (%rbx), %rax
cmpb $0x0, 0xa(%rax)
jne 0x24a542
addq $0x10, %rax
movq %rax, (%rbx)
jmp 0x24a414
addq $0x20, %r13
xorl %eax, %eax
cmpb $0x0, -0x6(%r13)
je 0x24a5b1
xorl %ecx, %ecx
cmpb $0x0, -0x5(%r13)
sete %cl
jmp 0x24a5be
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testl %eax, %eax
je 0x24a12d
addl %ecx, %eax
addq $0x10, %r13
jmp 0x24a59e
leaq 0x12d680(%rip), %rdi    # 0x377c4d
leaq 0x18882e(%rip), %rsi    # 0x3d2e02
leaq 0x188f1d(%rip), %rcx    # 0x3d34f8
movl $0x8b3, %edx            # imm = 0x8B3
callq 0x174d0