// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/external/lpeg-0.10.2/lpeg.c
// Function: separateparts
static Instruction *separateparts (lua_State *L, Instruction *p1, int l1,
                                   int l2, int *size, CharsetTag *st2) {
  int sp = firstpart(p1, l1);
  if (sp == 0)  /* first part is entire p1? */
    return basicUnion(L, p1, l1, l2, size, st2);
  else if ((p1 + sp - 1)->i.code == ICommit || !interfere(p1, sp, st2)) {
    Instruction *p;
    int init = *size;
    int end = init + sp;
    *size = end;
    p = separateparts(L, p1 + sp, l1 - sp, l2, size, st2);
    copypatt(p + init, p1, sp);
    (p + end - 1)->i.offset = *size - (end - 1);
    return p;
  }
  else {  /* must change back to non-optimized choice */
    Instruction *p;
    int init = *size;
    int end = init + sp + 1;  /* needs one extra instruction (choice) */
    int sizefirst = sizei(p1);  /* size of p1's first instruction (the test) */
    *size = end;
    p = separateparts(L, p1 + sp, l1 - sp, l2, size, st2);
    copypatt(p + init, p1, sizefirst);  /* copy the test */
    (p + init)->i.offset++;  /* correct jump (because of new instruction) */
    init += sizefirst;
    setinstaux(p + init, IChoice, sp - sizefirst + 1, 1); init++;
    copypatt(p + init, p1 + sizefirst, sp - sizefirst - 1);
    init += sp - sizefirst - 1;
    setinst(p + init, ICommit, *size - (end - 1));
    return p;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r9, %r12
movq %r8, %r13
movl %ecx, %r11d
movl %edx, %ebp
movq %rsi, %r15
movzbl (%rsi), %eax
movl $0xfdfff8, %ecx         # imm = 0xFDFFF8
btq %rax, %rcx
jb 0x246fc2
movswl 0x2(%r15), %ebx
testl %ebx, %ebx
je 0x246fc2
movslq %ebx, %rcx
movzbl -0x8(%r15,%rcx,8), %edx
cmpl $0xb, %edx
je 0x246fd9
cmpl $0x8, %edx
je 0x246fd9
jmp 0x246fe8
xorl %ebx, %ebx
cmpl $0x7, %eax
jne 0x246fea
movswl 0x2(%r15), %ebx
movslq %ebx, %rcx
cmpb $0xb, -0x8(%r15,%rcx,8)
jne 0x246fe8
movswl -0x6(%r15,%rcx,8), %edx
decq %rcx
addl %edx, %ecx
cmpl %ebp, %ecx
je 0x246fea
xorl %ebx, %ebx
testl %ebx, %ebx
je 0x2470e5
movslq %ebx, %r14
leaq (%r15,%r14,8), %rsi
cmpb $0xb, -0x8(%rsi)
je 0x247095
testl %ebx, %ebx
jle 0x24704e
xorl %ecx, %ecx
movl $0x83fef7, %edx         # imm = 0x83FEF7
movl %ecx, %ecx
movzbl (%r15,%rcx,8), %r8d
btq %r8, %rdx
jb 0x247188
movl $0x5, %r10d
leal -0x2(%r8), %r9d
cmpl $0x2, %r9d
jb 0x247047
cmpl $0x11, %r8d
jne 0x247041
movzbl 0x1(%r15,%rcx,8), %r10d
addl $0x2, %r10d
jmp 0x247047
movl $0x1, %r10d
addl %r10d, %ecx
cmpl %ebx, %ecx
jl 0x24700e
xorl %edx, %edx
testl %edx, %edx
je 0x247095
movq %r13, %r8
movslq (%r13), %rdx
leal (%rdx,%rbx), %ecx
movl %ecx, 0x8(%rsp)
movq %rdx, 0x28(%rsp)
leal (%rdx,%rbx), %ecx
incl %ecx
movl $0x5, %r13d
leal -0x2(%rax), %edx
cmpl $0x2, %edx
jb 0x247230
cmpl $0x11, %eax
jne 0x24722a
movzbl 0x1(%r15), %r13d
addl $0x2, %r13d
jmp 0x247230
movq %rbp, %rdx
movslq (%r13), %rbp
movq %r15, 0x8(%rsp)
leaq (%r14,%rbp), %r15
movl %r15d, (%r13)
subl %ebx, %edx
movl %r11d, %ecx
movq %r13, %r8
movq %r12, %r9
callq 0x246f7a
movq %rax, %r12
leaq (%rax,%rbp,8), %rdi
shlq $0x3, %r14
movq 0x8(%rsp), %rsi
movq %r14, %rdx
callq 0x17660
movl (%r13), %eax
subl %r15d, %eax
incl %eax
movw %ax, -0x6(%r12,%r15,8)
jmp 0x24740f
movq %r13, 0x10(%rsp)
movq %r11, %r13
movq %rdi, 0x8(%rsp)
movq %r15, %rdi
leaq 0x34(%rsp), %r15
movq %rdi, %r14
movq %r15, %rsi
callq 0x246ec3
movl (%r15), %eax
testl %eax, %eax
je 0x24730d
cmpl $0x1, %eax
jne 0x2471e8
cmpl $0x1, (%r12)
jne 0x2471e0
movq 0x10(%rsp), %r15
movslq (%r15), %rsi
addq $0x5, %rsi
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x245fcd
movq %rax, %r14
movq %rax, 0x18(%rsp)
movq %rbx, %rdi
movl $0x1, %esi
callq 0x2477d6
movslq (%r15), %rax
leaq 0x5(%rax), %rcx
movl %ecx, (%r15)
leaq (%r14,%rax,8), %rax
addq $0x28, %rax
movl $0x2, -0x28(%rax)
xorl %ecx, %ecx
movb 0x4(%r12,%rcx), %dl
orb 0x38(%rsp,%rcx), %dl
movb %dl, -0x20(%rax,%rcx)
incq %rcx
cmpq $0x20, %rcx
jne 0x24716d
jmp 0x24740a
movl $0x1, %edx
cmpl $0x0, (%r12)
je 0x247050
cmpw $0x0, 0x2(%r15)
je 0x247435
testl %eax, %eax
je 0x247050
cmpl $0x2, %eax
je 0x2472ca
cmpl $0x1, %eax
jne 0x247454
movzbl 0x1(%r15), %ecx
movl %ecx, %edx
shrl $0x3, %edx
movzbl 0x4(%r12,%rdx), %r8d
andb $0x7, %cl
movl $0x1, %edx
shll %cl, %edx
andl %r8d, %edx
jmp 0x247050
testl %eax, %eax
je 0x24730d
cmpl $0x0, (%r12)
je 0x24730d
movb 0x4(%r12), %al
testb %al, 0x38(%rsp)
jne 0x24730d
movq $-0x1, %rax
cmpq $0x1e, %rax
je 0x247302
movb 0x6(%r12,%rax), %dl
leaq 0x1(%rax), %rcx
testb %dl, 0x3a(%rsp,%rax)
movq %rcx, %rax
je 0x247209
jmp 0x247307
movl $0x1, %r13d
movq %r8, 0x10(%rsp)
movl %ecx, (%r8)
subl %ebx, %ebp
movl %ebp, %edx
movl %r11d, %ecx
movq %r12, %r9
callq 0x246f7a
movq %rax, %r12
movq %r15, %r14
movq 0x28(%rsp), %rbp
leaq (%rax,%rbp,8), %r15
leal (,%r13,8), %edx
movq %rdx, 0x20(%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x17660
incw 0x2(%r15)
leal (%rbp,%r13), %eax
cltq
subl %r13d, %ebx
leaq (%r12,%rax,8), %rdi
addq $0x8, %rdi
movw $0x107, -0x8(%rdi)      # imm = 0x107
leal 0x1(%rbx), %eax
movw %ax, -0x6(%rdi)
addq 0x20(%rsp), %r14
movslq %ebx, %rax
leaq -0x8(,%rax,8), %rdx
movq %r14, %rsi
callq 0x17660
movslq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
movl (%rcx), %ecx
subl %eax, %ecx
movw $0xb, (%r12,%rax,8)
movw %cx, 0x2(%r12,%rax,8)
jmp 0x24740f
movb 0x8(%r15), %cl
testb %cl, 0x4(%r12)
jne 0x247050
movq $-0x1, %rcx
cmpq $0x1e, %rcx
je 0x247421
movb 0xa(%r15,%rcx), %dl
leaq 0x1(%rcx), %r8
testb %dl, 0x6(%r12,%rcx)
movq %r8, %rcx
je 0x2472e0
jmp 0x247427
movl $0x1f, %ecx
cmpq $0x1e, %rcx
ja 0x247319
movq %r14, %rdi
callq 0x247ec7
testl %eax, %eax
je 0x247385
movq %rbp, %r15
incl %ebp
leal 0x1(%r15,%r13), %ecx
leaq 0x18(%rsp), %rsi
movq 0x8(%rsp), %r12
movq %r12, %rdi
movq 0x10(%rsp), %rdx
callq 0x247e76
movq %rax, %rbx
movslq %r15d, %r15
leaq (,%r15,8), %rdx
movq %rax, %rdi
movq %r14, %rsi
callq 0x17660
movq %rbx, %rdi
movl %ebp, %esi
callq 0x247f53
leaq (%rbx,%r15,8), %rsi
addq $0x8, %rsi
movw $0x8, -0x8(%rsi)
incl %r13d
movw %r13w, -0x6(%rsi)
movq %r12, %rdi
movl $0x2, %edx
callq 0x2475f9
jmp 0x24740a
leal 0x2(%rbp), %r15d
leal 0x2(%rbp,%r13), %ecx
leaq 0x18(%rsp), %rsi
movq 0x8(%rsp), %r12
movq %r12, %rdi
movq 0x10(%rsp), %rdx
callq 0x247e76
movq %rax, %rbx
leaq 0x8(%rax), %rdi
movw $0x7, (%rax)
movw %r15w, 0x2(%rax)
movslq %ebp, %r15
leaq (,%r15,8), %rdx
movq %r14, %rsi
callq 0x17660
leaq (%rbx,%r15,8), %r14
addq $0x8, %r14
leaq (%rbx,%r15,8), %rsi
addq $0x10, %rsi
movw $0xb, -0x8(%rsi)
incl %r13d
movw %r13w, -0x6(%rsi)
movq %r12, %rdi
movl $0x2, %edx
callq 0x2475f9
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
subl %ebp, %eax
cltq
leaq (%r14,%rax,8), %rdi
addq $0x8, %rdi
callq 0x247f90
movq 0x18(%rsp), %r12
movq %r12, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1f, %r8d
xorl %edx, %edx
cmpq $0x1f, %r8
setb %dl
jmp 0x247050
leaq 0x18bd53(%rip), %rdi    # 0x3d318f
leaq 0x18b9bf(%rip), %rsi    # 0x3d2e02
leaq 0x18bd57(%rip), %rcx    # 0x3d31a1
movl $0x5da, %edx            # imm = 0x5DA
callq 0x174d0
leaq 0x18bd76(%rip), %rdi    # 0x3d31d1
leaq 0x18b9a0(%rip), %rsi    # 0x3d2e02
leaq 0x18bd38(%rip), %rcx    # 0x3d31a1
movl $0x5de, %edx            # imm = 0x5DE
callq 0x174d0