// File: /workspace/github_cpp_makefile_star2_O1/eryxcc[P]lois/src/formula.cpp
// Function: lois::operator&&(lois::rbool, lois::rbool)
rbool operator && (rbool a, rbool b) {
  if(a.isTrue()) return b;
  if(b.isTrue()) return a;
  if(a.isFalse() || b.isFalse()) return ffalse;
  if(a.p == b.p) return a;

  auto ae = std::dynamic_pointer_cast<FormulaEq>(a.p);
  auto be = std::dynamic_pointer_cast<FormulaEq>(b.p);
  if(ae) if(be) {
    if(eqterm(ae->t1, be->t1) && eqterm(ae->t2, be->t2))
      return ae->type == be->type ? a : ffalse;
    if(eqterm(ae->t1, be->t2) && eqterm(ae->t2, be->t1))
      return ae->type == be->type ? a : ffalse;
    }

  // if(a->formulasize() > b->formulasize()) swap(a, b);
  
  return rbool(std::make_shared<FormulaBi> (true, a, b));
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r12
movq %rdi, %rbx
movq (%rsi), %rdi
movq 0x286a5(%rip), %rcx     # 0x537b0
movq (%rdx), %rax
cmpq %rcx, %rdi
je 0x2b158
movq %rsi, %r15
cmpq %rcx, %rax
je 0x2b199
movq 0x2869e(%rip), %rcx     # 0x537c0
cmpq %rcx, %rdi
setne %dl
cmpq %rcx, %rax
setne %sil
testb %sil, %dl
jne 0x2b175
movq %rcx, (%rbx)
movq 0x2868a(%rip), %rax     # 0x537c8
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x2b1b1
movq 0x27e7a(%rip), %rcx     # 0x52fc8
cmpb $0x0, (%rcx)
je 0x2b1c3
incl 0x8(%rax)
jmp 0x2b1b1
movq %rax, (%rbx)
xorl %eax, %eax
movq %rax, 0x8(%rbx)
movq 0x8(%r12), %rcx
movq %rax, 0x8(%r12)
movq %rcx, 0x8(%rbx)
movq %rax, (%r12)
jmp 0x2b1b1
cmpq %rax, %rdi
je 0x2b199
testq %rdi, %rdi
je 0x2b1c9
leaq 0x26a32(%rip), %rsi     # 0x51bb8
leaq 0x26b53(%rip), %rdx     # 0x51ce0
xorl %ecx, %ecx
callq 0x72b0
movq %rax, %rbp
jmp 0x2b1cb
movq %rdi, (%rbx)
xorl %eax, %eax
movq %rax, 0x8(%rbx)
movq 0x8(%r15), %rcx
movq %rax, 0x8(%r15)
movq %rcx, 0x8(%rbx)
movq %rax, (%r15)
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
lock
incl 0x8(%rax)
jmp 0x2b1b1
xorl %ebp, %ebp
testq %rbp, %rbp
je 0x2b1eb
movq 0x8(%r15), %r13
testq %r13, %r13
je 0x2b1f7
movq 0x27de8(%rip), %rax     # 0x52fc8
cmpb $0x0, (%rax)
je 0x2b1f2
incl 0x8(%r13)
jmp 0x2b1f7
xorl %r13d, %r13d
xorl %ebp, %ebp
jmp 0x2b1f7
lock
incl 0x8(%r13)
movq (%r12), %rdi
testq %rdi, %rdi
je 0x2b21a
leaq 0x269b1(%rip), %rsi     # 0x51bb8
leaq 0x26ad2(%rip), %rdx     # 0x51ce0
xorl %ecx, %ecx
callq 0x72b0
movq %rax, %r14
jmp 0x2b21d
xorl %r14d, %r14d
testq %r14, %r14
je 0x2b242
movq 0x8(%r12), %rcx
testq %rcx, %rcx
movq %rcx, 0x8(%rsp)
je 0x2b254
movq 0x27d90(%rip), %rax     # 0x52fc8
cmpb $0x0, (%rax)
je 0x2b250
incl 0x8(%rcx)
jmp 0x2b254
xorl %r14d, %r14d
movq $0x0, 0x8(%rsp)
jmp 0x2b254
lock
incl 0x8(%rcx)
testq %rbp, %rbp
sete %al
testq %r14, %r14
sete %cl
orb %al, %cl
jne 0x2b32b
movq %r13, 0x28(%rsp)
leaq 0x18(%rbp), %r13
leaq 0x18(%r14), %rsi
movq %r13, %rdi
movq %rsi, 0x30(%rsp)
callq 0x2d28d
testb %al, %al
je 0x2b2c1
leaq 0x28(%rbp), %rdi
leaq 0x28(%r14), %rsi
callq 0x2d28d
testb %al, %al
je 0x2b2c1
movb 0x10(%rbp), %al
cmpb 0x10(%r14), %al
leaq 0x2851b(%rip), %rax     # 0x537c0
cmoveq %r15, %rax
movq (%rax), %rcx
movq %rcx, (%rbx)
movq 0x8(%rax), %rax
movq %rax, 0x8(%rbx)
testq %rax, %rax
movq 0x28(%rsp), %r13
jmp 0x2b30b
leaq 0x28(%r14), %rsi
movq %r13, %rdi
callq 0x2d28d
testb %al, %al
movq 0x28(%rsp), %r13
je 0x2b32b
leaq 0x28(%rbp), %rdi
movq 0x30(%rsp), %rsi
callq 0x2d28d
testb %al, %al
je 0x2b32b
movb 0x10(%rbp), %al
cmpb 0x10(%r14), %al
leaq 0x284ca(%rip), %rax     # 0x537c0
cmoveq %r15, %rax
movq (%rax), %rcx
movq %rcx, (%rbx)
movq 0x8(%rax), %rax
movq %rax, 0x8(%rbx)
testq %rax, %rax
movq 0x8(%rsp), %rdi
je 0x2b3a6
movq 0x27cab(%rip), %rcx     # 0x52fc8
cmpb $0x0, (%rcx)
je 0x2b3c6
incl 0x8(%rax)
jmp 0x2b3a6
leaq 0x6(%rsp), %rcx
movb $0x1, (%rcx)
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x10(%rsp), %rsi
leaq 0x7(%rsp), %rdx
movq %r15, %r8
movq %r12, %r9
callq 0x2e594
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq %rax, (%rbx)
movq %rdi, 0x8(%rbx)
testq %rdi, %rdi
je 0x2b392
movq 0x27c4e(%rip), %rax     # 0x52fc8
cmpb $0x0, (%rax)
je 0x2b384
incl 0x8(%rdi)
jmp 0x2b388
lock
incl 0x8(%rdi)
testq %rdi, %rdi
je 0x2b392
callq 0x13308
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x2b3a1
callq 0x13308
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x2b3b0
callq 0x13308
testq %r13, %r13
je 0x2b1b1
movq %r13, %rdi
callq 0x13308
jmp 0x2b1b1
lock
incl 0x8(%rax)
jmp 0x2b3a6
movq %rax, %rbx
cmpq $0x0, 0x8(%rsp)
je 0x2b3e1
movq 0x8(%rsp), %rdi
callq 0x13308
testq %r13, %r13
je 0x2b3ee
movq %r13, %rdi
callq 0x13308
movq %rbx, %rdi
callq 0x7430