// File: /workspace/github_cpp_makefile_star2_O2/shisharka[P]interactive_deduction/naturaldeduction.cpp
// Function: applyDisjE(std::pair<std::vector<std::shared_ptr<BaseFormula>, std::allocator<std::shared_ptr<BaseFormula>>>, std::shared_ptr<BaseFormula>> const&, std::vector<std::pair<std::vector<std::shared_ptr<BaseFormula>, std::allocator<std::shared_ptr<BaseFormula>>>, std::shared_ptr<BaseFormula>>, std::allocator<std::pair<std::vector<std::shared_ptr<BaseFormula>, std::allocator<std::shared_ptr<BaseFormula>>>, std::shared_ptr<BaseFormula>>>>&)
void applyDisjE(const Goal & g, vector<Goal> & subgoals) {
  Formula a, b;
  vector<Formula> ass1, ass2;
  bool applied = false;

  for(vector<Formula>::const_iterator i = g.first.begin(); i != g.first.end(); i++) {
    if((*i)->getType() == T_OR && !applied) {
      a = ((Or *)(*i).get())->getOperand1();
      b = ((Or *)(*i).get())->getOperand2();
      applied = true;
    }
    else {
      ass1.push_back(*i);
      ass2.push_back(*i);
    };
  };

  if(applied) {
    addAssumption(ass1, a);
    addAssumption(ass2, b);
    subgoals.push_back(make_pair(ass1, g.second));
    subgoals.push_back(make_pair(ass2, g.second));
  }
  else
    cerr << "Failed to apply DisjE" << endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, 0x28(%rsp)
movq %rdi, %r14
xorps %xmm0, %xmm0
movq %rsp, %rax
movaps %xmm0, (%rax)
leaq 0x10(%rsp), %r12
movaps %xmm0, (%r12)
leaq 0x50(%rsp), %r13
andq $0x0, 0x10(%r13)
leaq 0x30(%rsp), %rbp
andq $0x0, 0x10(%rbp)
movaps %xmm0, (%r13)
movaps %xmm0, (%rbp)
movq (%rdi), %rbx
xorl %r15d, %r15d
cmpq 0x8(%r14), %rbx
je 0x80b2
movq (%rbx), %rdi
movq (%rdi), %rax
callq *(%rax)
cmpl $0x5, %eax
jne 0x806b
testb $0x1, %r15b
je 0x8083
movq %r13, %rdi
movq %rbx, %rsi
callq 0x879c
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x879c
jmp 0x80ac
movq (%rbx), %rdi
callq 0x721a
movq %rsp, %rdi
movq %rax, %rsi
callq 0x4950
movq (%rbx), %rdi
callq 0x7220
movq %r12, %rdi
movq %rax, %rsi
callq 0x4950
movb $0x1, %r15b
addq $0x10, %rbx
jmp 0x8052
testb $0x1, %r15b
je 0x8131
leaq 0x50(%rsp), %rdi
movq %rsp, %rsi
callq 0x7930
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x7930
addq $0x18, %r14
leaq 0x70(%rsp), %rdi
leaq 0x50(%rsp), %rsi
movq %r14, %rdx
callq 0x88c4
movq 0x28(%rsp), %rbx
leaq 0x70(%rsp), %rsi
movq %rbx, %rdi
callq 0x8e4e
leaq 0x70(%rsp), %rdi
callq 0x4892
leaq 0x70(%rsp), %rdi
leaq 0x30(%rsp), %rsi
movq %r14, %rdx
callq 0x88c4
leaq 0x70(%rsp), %rsi
movq %rbx, %rdi
callq 0x8e4e
leaq 0x70(%rsp), %rdi
callq 0x4892
jmp 0x814c
movq 0x7ea8(%rip), %rdi      # 0xffe0
leaq 0x1fed(%rip), %rsi      # 0xa12c
callq 0x3160
movq %rax, %rdi
callq 0x30c0
leaq 0x30(%rsp), %rdi
callq 0x48a8
leaq 0x50(%rsp), %rdi
callq 0x48a8
leaq 0x18(%rsp), %rdi
callq 0x4a2e
leaq 0x8(%rsp), %rdi
callq 0x4a2e
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x818a
jmp 0x819d
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x4892
jmp 0x81a0
jmp 0x819d
jmp 0x819d
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x48a8
leaq 0x50(%rsp), %rdi
callq 0x48a8
leaq 0x18(%rsp), %rdi
callq 0x4a2e
leaq 0x8(%rsp), %rdi
callq 0x4a2e
movq %rbx, %rdi
callq 0x32a0