// File: /workspace/github_cpp_makefile_star2_O3/jstaursky[P]hutch/src/Sleigh/slghpattern.cc
// Function: OrPattern::doOr(Pattern const*, int) const
Pattern *OrPattern::doOr(const Pattern *b,int4 sa) const

{
  const OrPattern *b2 = dynamic_cast<const OrPattern *>(b);
  vector<DisjointPattern *> newlist;
  vector<DisjointPattern *>::const_iterator iter;

  for(iter=orlist.begin();iter!=orlist.end();++iter)
    newlist.push_back((DisjointPattern *)(*iter)->simplifyClone());
  if (sa < 0)
    for(iter=orlist.begin();iter!=orlist.end();++iter)
      (*iter)->shiftInstruction(-sa);

  if (b2 == (const OrPattern *)0)
    newlist.push_back((DisjointPattern *)b->simplifyClone());
  else {
    for(iter=b2->orlist.begin();iter!=b2->orlist.end();++iter)
      newlist.push_back((DisjointPattern *)(*iter)->simplifyClone());
  }
  if (sa > 0)
    for(int4 i=0;i<newlist.size();++i)
      newlist[i]->shiftInstruction(sa);

  OrPattern *tmpor = new OrPattern(newlist);
  return tmpor;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, %ebx
movq %rdi, %r12
testq %rsi, %rsi
movq %rsi, 0x30(%rsp)
je 0x63a8b
movq %rsi, %rax
movq 0x3f283(%rip), %rsi     # 0xa2cf8
movq 0x3f314(%rip), %rdx     # 0xa2d90
movq %rax, %rdi
xorl %ecx, %ecx
callq 0x40b60
movq %rax, %r14
jmp 0x63a8e
xorl %r14d, %r14d
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movq 0x8(%r12), %r15
cmpq 0x10(%r12), %r15
je 0x63ad9
leaq 0x10(%rsp), %r13
leaq 0x8(%rsp), %rbp
movq (%r15), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq %rax, 0x8(%rsp)
movq %r13, %rdi
movq %rbp, %rsi
callq 0x41610
addq $0x8, %r15
cmpq 0x10(%r12), %r15
jne 0x63ab5
testl %ebx, %ebx
jns 0x63b02
movq 0x8(%r12), %r13
cmpq %r15, %r13
je 0x63b02
movl %ebx, %ebp
negl %ebp
movq (%r13), %rdi
movq (%rdi), %rax
movl %ebp, %esi
callq *0x18(%rax)
addq $0x8, %r13
cmpq 0x10(%r12), %r13
jne 0x63aeb
testq %r14, %r14
je 0x63b41
movq 0x8(%r14), %r13
cmpq 0x10(%r14), %r13
je 0x63b5e
leaq 0x10(%rsp), %r15
leaq 0x8(%rsp), %r12
movq (%r13), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq %rax, 0x8(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x41610
addq $0x8, %r13
cmpq 0x10(%r14), %r13
jne 0x63b1b
jmp 0x63b5e
movq 0x30(%rsp), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0x41610
testl %ebx, %ebx
jle 0x63b96
movq 0x10(%rsp), %rax
cmpq %rax, 0x18(%rsp)
je 0x63b96
xorl %r14d, %r14d
movq (%rax,%r14,8), %rdi
movq (%rdi), %rax
movl %ebx, %esi
callq *0x18(%rax)
incq %r14
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r14, %rcx
ja 0x63b71
movl $0x20, %edi
callq 0x40810
movq %rax, %r14
leaq 0x10(%rsp), %rsi
movq %rax, %rdi
callq 0x41f70
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x63bc7
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x40880
movq %r14, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x63bf5
movq %rax, %rbx
movl $0x20, %esi
movq %r14, %rdi
callq 0x40880
jmp 0x63bf8
jmp 0x63bf5
jmp 0x63bf5
jmp 0x63bf5
jmp 0x63bf5
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x63c0f
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x40880
movq %rbx, %rdi
callq 0x41f10
nop