// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/lpeg-0.10.2/lpeg.c
// Function: basicUnion
static Instruction *basicUnion (lua_State *L, Instruction *p1, int l1,
                                int l2, int *size, CharsetTag *st2) {
  Instruction *op;
  CharsetTag st1;
  tocharset(p1, &st1);
  if (st1.tag == ISCHARSET && st2->tag == ISCHARSET) {
    Instruction *p = auxnew(L, &op, size, CHARSETINSTSIZE);
    setinst(p, ISet, 0);
    loopset(i, p[1].buff[i] = st1.cs[i] | st2->cs[i]);
  }
  else if (exclusive(&st1, st2) || isheadfail(p1)) {
    Instruction *p = auxnew(L, &op, size, l1 + 1 + l2);
    copypatt(p, p1, l1);
    check2test(p, l1 + 1);
    p += l1;
    setinst(p++, IJmp, l2 + 1);
    addpatt(L, p, 2);
  }
  else {
    /* choice L1; e1; commit L2; L1: e2; L2: ... */
    Instruction *p = auxnew(L, &op, size, 1 + l1 + 1 + l2);
    setinst(p++, IChoice, 1 + l1 + 1);
    copypatt(p, p1, l1); p += l1;
    setinst(p++, ICommit, 1 + l2);
    addpatt(L, p, 2);
    optimizechoice(p - (1 + l1 + 1));
  }
  return op;
}

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movl %edx, 0x64(%rsp)
movl %ecx, 0x60(%rsp)
movq %r8, 0x58(%rsp)
movq %r9, 0x50(%rsp)
movq 0x68(%rsp), %rdi
leaq 0x24(%rsp), %rsi
callq 0x35e840
cmpl $0x1, 0x24(%rsp)
jne 0x360551
movq 0x50(%rsp), %rax
cmpl $0x1, (%rax)
jne 0x360551
movq 0x70(%rsp), %rdi
movq 0x58(%rsp), %rdx
leaq 0x48(%rsp), %rsi
movl $0x5, %ecx
callq 0x360840
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movl $0x2, %esi
xorl %ecx, %ecx
movl %ecx, %edx
callq 0x35dbc0
movl $0x0, 0x14(%rsp)
cmpl $0x20, 0x14(%rsp)
jge 0x36054c
movslq 0x14(%rsp), %rax
movzbl 0x28(%rsp,%rax), %eax
movq 0x50(%rsp), %rcx
movslq 0x14(%rsp), %rdx
movzbl 0x4(%rcx,%rdx), %ecx
orl %ecx, %eax
movb %al, %dl
movq 0x18(%rsp), %rax
movslq 0x14(%rsp), %rcx
movb %dl, 0x8(%rax,%rcx)
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x36050d
jmp 0x3606eb
movq 0x50(%rsp), %rsi
leaq 0x24(%rsp), %rdi
callq 0x3608d0
cmpl $0x0, %eax
jne 0x360578
movq 0x68(%rsp), %rdi
callq 0x360920
cmpl $0x0, %eax
je 0x36061a
movq 0x70(%rsp), %rdi
movq 0x58(%rsp), %rdx
movl 0x64(%rsp), %ecx
addl $0x1, %ecx
addl 0x60(%rsp), %ecx
leaq 0x48(%rsp), %rsi
callq 0x360840
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
movq 0x68(%rsp), %rsi
movslq 0x64(%rsp), %rdx
shlq $0x3, %rdx
callq 0x19610
movq 0x8(%rsp), %rdi
movl 0x64(%rsp), %esi
addl $0x1, %esi
callq 0x3609f0
movl 0x64(%rsp), %ecx
movq 0x8(%rsp), %rax
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
movq %rdi, %rax
addq $0x8, %rax
movq %rax, 0x8(%rsp)
movl 0x60(%rsp), %edx
addl $0x1, %edx
movl $0x8, %esi
xorl %ecx, %ecx
callq 0x35dbc0
movq 0x70(%rsp), %rdi
movq 0x8(%rsp), %rsi
movl $0x2, %edx
callq 0x35f350
jmp 0x3606e9
movq 0x70(%rsp), %rdi
movq 0x58(%rsp), %rdx
movl 0x64(%rsp), %ecx
addl $0x1, %ecx
addl $0x1, %ecx
addl 0x60(%rsp), %ecx
leaq 0x48(%rsp), %rsi
callq 0x360840
movq %rax, (%rsp)
movq (%rsp), %rdi
movq %rdi, %rax
addq $0x8, %rax
movq %rax, (%rsp)
movl 0x64(%rsp), %edx
addl $0x1, %edx
addl $0x1, %edx
movl $0x7, %esi
xorl %ecx, %ecx
callq 0x35dbc0
movq (%rsp), %rdi
movq 0x68(%rsp), %rsi
movslq 0x64(%rsp), %rdx
shlq $0x3, %rdx
callq 0x19610
movl 0x64(%rsp), %ecx
movq (%rsp), %rax
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, (%rsp)
movq (%rsp), %rdi
movq %rdi, %rax
addq $0x8, %rax
movq %rax, (%rsp)
movl 0x60(%rsp), %edx
addl $0x1, %edx
movl $0xb, %esi
xorl %ecx, %ecx
callq 0x35dbc0
movq 0x70(%rsp), %rdi
movq (%rsp), %rsi
movl $0x2, %edx
callq 0x35f350
movq (%rsp), %rdi
movl 0x64(%rsp), %eax
addl $0x1, %eax
addl $0x1, %eax
movslq %eax, %rcx
xorl %eax, %eax
subq %rcx, %rax
shlq $0x3, %rax
addq %rax, %rdi
callq 0x360a70
jmp 0x3606eb
movq 0x48(%rsp), %rax
addq $0x78, %rsp
retq
nopw %cs:(%rax,%rax)