// File: /workspace/github_c_makefile_star2_O3/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, %rbp
movq %r8, 0x8(%rsp)
movl %ecx, %r12d
movl %edx, %r13d
movq %rsi, %r14
movq %rdi, %r15
movzbl (%rsi), %eax
movl $0xfdfff8, %ecx         # imm = 0xFDFFF8
btq %rax, %rcx
jb 0x23e5f5
movswl 0x2(%r14), %ebx
testl %ebx, %ebx
je 0x23e5f5
movslq %ebx, %rdx
movzbl -0x8(%r14,%rdx,8), %ecx
cmpl $0xb, %ecx
je 0x23e5dc
cmpl $0x8, %ecx
jne 0x23e6ef
movswl -0x6(%r14,%rdx,8), %ecx
decq %rdx
addl %ecx, %edx
movw $0x1, %cx
cmpl %r13d, %edx
je 0x23e62a
jmp 0x23e6ef
cmpl $0x7, %eax
jne 0x23e6ef
movzwl 0x2(%r14), %ecx
movswq %cx, %rdx
cmpb $0xb, -0x8(%r14,%rdx,8)
jne 0x23e6ef
movswl -0x6(%r14,%rdx,8), %esi
decq %rdx
addl %esi, %edx
cmpl %r13d, %edx
jne 0x23e6ef
movswl %cx, %ebx
testl %ebx, %ebx
je 0x23e6ef
movslq %ebx, %r11
leaq (%r14,%r11,8), %rsi
jle 0x23e68a
cmpb $0xb, -0x8(%r14,%r11,8)
je 0x23e68a
xorl %edx, %edx
movl $0x83fef7, %edi         # imm = 0x83FEF7
movl %edx, %edx
movzbl (%r14,%rdx,8), %r9d
btq %r9, %rdi
jb 0x23e8c4
movl $0x5, %r8d
leal -0x2(%r9), %r10d
cmpl $0x2, %r10d
jb 0x23e683
cmpl $0x11, %r9d
jne 0x23e67d
movzbl 0x1(%r14,%rdx,8), %r8d
addl $0x2, %r8d
jmp 0x23e683
movl $0x1, %r8d
addl %r8d, %edx
cmpl %ebx, %edx
jl 0x23e64a
movq 0x8(%rsp), %r8
movslq (%r8), %rax
movq %rax, 0x20(%rsp)
addq %r11, %rax
movq %rax, 0x10(%rsp)
movl %eax, (%r8)
subl %ebx, %r13d
movq %r15, %rdi
movl %r13d, %edx
movl %r12d, %ecx
movq %r8, %r12
movq %rbp, %r9
movq %r11, %rbx
callq 0x23e58c
movq %rax, %r15
movq 0x20(%rsp), %rax
leaq (%r15,%rax,8), %rdi
shlq $0x3, %rbx
movq %r14, %rsi
movq %rbx, %rdx
callq 0x17660
movl (%r12), %eax
movq 0x10(%rsp), %rcx
subl %ecx, %eax
incl %eax
movw %ax, -0x6(%r15,%rcx,8)
jmp 0x23e881
leaq 0x34(%rsp), %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x23e4cd
movl (%rbx), %eax
testl %eax, %eax
je 0x23e784
cmpl $0x1, %eax
jne 0x23e770
movl (%rbp), %eax
cmpl $0x1, %eax
jne 0x23e773
movq 0x8(%rsp), %r14
movslq (%r14), %rsi
addq $0x5, %rsi
movq %r15, %rdi
callq 0x23d5e1
movq %rax, %rbx
movq %rax, 0x28(%rsp)
movq %r15, %rdi
movl $0x1, %esi
callq 0x23edd1
movslq (%r14), %rax
leaq 0x5(%rax), %rcx
movl %ecx, (%r14)
leaq (%rbx,%rax,8), %rax
addq $0x28, %rax
movl $0x2, -0x28(%rax)
xorl %ecx, %ecx
movb 0x4(%rbp,%rcx), %dl
orb 0x38(%rsp,%rcx), %dl
movb %dl, -0x20(%rax,%rcx)
incq %rcx
cmpq $0x20, %rcx
jne 0x23e756
jmp 0x23e87c
movl (%rbp), %eax
testl %eax, %eax
je 0x23e784
movb 0x4(%rbp), %al
testb %al, 0x38(%rsp)
je 0x23e893
movq %r14, %rdi
callq 0x23f3f6
testl %eax, %eax
je 0x23e7fa
leal 0x1(%r13), %ebx
leal (%r12,%r13), %ecx
incl %ecx
leaq 0x28(%rsp), %rsi
movq %r15, %rdi
movq 0x8(%rsp), %rdx
callq 0x23f3a5
movq %rax, %rbp
movslq %r13d, %r13
leaq (,%r13,8), %rdx
movq %rax, %rdi
movq %r14, %rsi
callq 0x17660
movq %rbp, %rdi
movl %ebx, %esi
callq 0x23f482
leaq 0x8(,%r13,8), %rsi
addq %rbp, %rsi
movw $0x8, -0x8(%rsi)
incl %r12d
movw %r12w, -0x6(%rsi)
movq %r15, %rdi
movl $0x2, %edx
callq 0x23ebf1
jmp 0x23e87c
leal 0x2(%r13), %ebp
leal (%r12,%r13), %ecx
addl $0x2, %ecx
leaq 0x28(%rsp), %rsi
movq %r15, %rdi
movq 0x8(%rsp), %rdx
callq 0x23f3a5
movq %rax, %rbx
leaq 0x8(%rax), %rdi
movw $0x7, (%rax)
movw %bp, 0x2(%rax)
movslq %r13d, %rbp
leaq (,%rbp,8), %rdx
movq %r14, %rsi
callq 0x17660
leaq (%rbx,%rbp,8), %r14
addq $0x8, %r14
leaq (%rbx,%rbp,8), %rsi
addq $0x10, %rsi
movw $0xb, -0x8(%rsi)
incl %r12d
movw %r12w, -0x6(%rsi)
movq %r15, %rdi
movl $0x2, %edx
callq 0x23ebf1
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
subl %r13d, %eax
cltq
leaq (%r14,%rax,8), %rdi
addq $0x8, %rdi
callq 0x23f4bf
movq 0x28(%rsp), %r15
movq %r15, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq $-0x1, %rax
cmpq $0x1e, %rax
je 0x23e790
movb 0x6(%rbp,%rax), %dl
leaq 0x1(%rax), %rcx
testb %dl, 0x3a(%rsp,%rax)
movq %rcx, %rax
je 0x23e89a
cmpq $0x1e, %rcx
jbe 0x23e784
jmp 0x23e790
cmpl $0x0, (%rbp)
je 0x23e950
testw %cx, %cx
je 0x23ea2d
cmpl $0x2, %eax
je 0x23e912
cmpl $0x1, %eax
je 0x23e8f5
testl %eax, %eax
movq 0x8(%rsp), %rdx
jne 0x23ea4c
movl (%rdx), %edi
jmp 0x23e975
movzbl 0x1(%r14), %ecx
movl %ecx, %edx
shrl $0x3, %edx
movzbl 0x4(%rbp,%rdx), %edi
andb $0x7, %cl
movl $0x1, %edx
shll %cl, %edx
andl %edi, %edx
jmp 0x23e948
movb 0x8(%r14), %cl
testb %cl, 0x4(%rbp)
movq 0x8(%rsp), %rdx
je 0x23e924
movl (%rdx), %edi
jmp 0x23e95f
xorl %edx, %edx
movq %rdx, %rcx
cmpq $0x1f, %rdx
je 0x23e93f
movb 0x9(%r14,%rcx), %dil
leaq 0x1(%rcx), %rdx
testb %dil, 0x5(%rbp,%rcx)
je 0x23e926
xorl %edx, %edx
cmpq $0x1f, %rcx
setb %dl
testl %edx, %edx
je 0x23e68a
movq 0x8(%rsp), %rdx
movl (%rdx), %edi
leal -0x2(%rax), %ecx
cmpl $0x2, %ecx
jae 0x23e966
movl $0x5, %eax
jmp 0x23e97a
cmpl $0x11, %eax
jne 0x23e975
movzbl 0x1(%r14), %eax
addl $0x2, %eax
jmp 0x23e97a
movl $0x1, %eax
movq %rax, 0x10(%rsp)
movq %rdi, 0x18(%rsp)
leal (%rdi,%rbx), %eax
movl %eax, 0x20(%rsp)
leal (%rdi,%rbx), %eax
incl %eax
movl %eax, (%rdx)
subl %ebx, %r13d
movq %r15, %rdi
movq %rdx, %r8
movl %r13d, %edx
movl %r12d, %ecx
movq %rbp, %r9
callq 0x23e58c
movq %rax, %r15
movslq 0x18(%rsp), %rbp
leaq (%rax,%rbp,8), %r13
movq 0x10(%rsp), %r12
leal (,%r12,8), %edx
movq %rdx, 0x18(%rsp)
movq %r13, %rdi
movq %r14, %rsi
callq 0x17660
incw 0x2(%r13)
addl %r12d, %ebp
movslq %ebp, %rax
subl %r12d, %ebx
leaq (%r15,%rax,8), %rdi
addq $0x8, %rdi
movw $0x107, -0x8(%rdi)      # imm = 0x107
leal 0x1(%rbx), %eax
movw %ax, -0x6(%rdi)
addq 0x18(%rsp), %r14
movslq %ebx, %rax
leaq -0x8(,%rax,8), %rdx
movq %r14, %rsi
callq 0x17660
movslq 0x20(%rsp), %rax
movq 0x8(%rsp), %rcx
movl (%rcx), %ecx
subl %eax, %ecx
movw $0xb, (%r15,%rax,8)
movw %cx, 0x2(%r15,%rax,8)
jmp 0x23e881
leaq 0x18b03b(%rip), %rdi    # 0x3c9a6f
leaq 0x18aca7(%rip), %rsi    # 0x3c96e2
leaq 0x18b03f(%rip), %rcx    # 0x3c9a81
movl $0x5da, %edx            # imm = 0x5DA
callq 0x174d0
leaq 0x18b05e(%rip), %rdi    # 0x3c9ab1
leaq 0x18ac88(%rip), %rsi    # 0x3c96e2
leaq 0x18b020(%rip), %rcx    # 0x3c9a81
movl $0x5de, %edx            # imm = 0x5DE
callq 0x174d0