// File: /workspace/github_cpp_makefile_star2_O3/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, %r13
movq %rdi, %rbx
movq (%rsi), %rdi
movq 0x2757f(%rip), %rcx     # 0x527b0
movq (%rdx), %rax
cmpq %rcx, %rdi
je 0x2b28a
movq %rsi, %r15
cmpq %rcx, %rax
je 0x2b2ea
movq 0x27574(%rip), %rcx     # 0x527c0
cmpq %rcx, %rdi
setne %dl
cmpq %rcx, %rax
setne %sil
testb %sil, %dl
jne 0x2b2a1
movq %rcx, (%rbx)
movq 0x27560(%rip), %rax     # 0x527c8
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x2b2fe
movq 0x26d4c(%rip), %rcx     # 0x51fc8
cmpb $0x0, (%rcx)
je 0x2b310
incl 0x8(%rax)
jmp 0x2b2fe
movq %rax, (%rbx)
movq 0x8(%r13), %rax
xorl %ecx, %ecx
movq %rcx, 0x8(%r13)
movq %rax, 0x8(%rbx)
movq %rcx, (%r13)
jmp 0x2b2fe
cmpq %rax, %rdi
je 0x2b2ea
testq %rdi, %rdi
je 0x2b316
leaq 0x2592e(%rip), %rsi     # 0x50be0
leaq 0x25a4f(%rip), %rdx     # 0x50d08
xorl %r12d, %r12d
xorl %ecx, %ecx
callq 0x72b0
movl $0x0, %r14d
testq %rax, %rax
je 0x2b32c
movq 0x8(%r15), %r12
testq %r12, %r12
je 0x2b31e
movq 0x26cea(%rip), %rcx     # 0x51fc8
cmpb $0x0, (%rcx)
je 0x2b323
incl 0x8(%r12)
jmp 0x2b329
movq %rdi, (%rbx)
movq 0x8(%r15), %rax
xorl %ecx, %ecx
movq %rcx, 0x8(%r15)
movq %rax, 0x8(%rbx)
movq %rcx, (%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 0x2b2fe
xorl %r12d, %r12d
xorl %r14d, %r14d
jmp 0x2b32c
xorl %r12d, %r12d
jmp 0x2b329
lock
incl 0x8(%r12)
movq %rax, %r14
movq %r12, 0x8(%rsp)
movq (%r13), %rdi
testq %rdi, %rdi
je 0x2b37a
leaq 0x2589f(%rip), %rsi     # 0x50be0
leaq 0x259c0(%rip), %rdx     # 0x50d08
xorl %r12d, %r12d
xorl %ecx, %ecx
callq 0x72b0
testq %rax, %rax
je 0x2b422
movq %rax, %rbp
movq 0x8(%r13), %r12
testq %r12, %r12
je 0x2b388
movq 0x26c5a(%rip), %rax     # 0x51fc8
cmpb $0x0, (%rax)
je 0x2b382
incl 0x8(%r12)
jmp 0x2b388
xorl %r12d, %r12d
jmp 0x2b422
lock
incl 0x8(%r12)
testq %r14, %r14
je 0x2b422
leaq 0x18(%r14), %rdi
leaq 0x18(%rbp), %rsi
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
callq 0x2d325
testb %al, %al
je 0x2b3bd
leaq 0x28(%r14), %rdi
leaq 0x28(%rbp), %rsi
callq 0x2d325
testb %al, %al
jne 0x2b3e4
movq %rbp, %rsi
addq $0x28, %rsi
movq 0x30(%rsp), %rdi
callq 0x2d325
testb %al, %al
je 0x2b422
leaq 0x28(%r14), %rdi
movq 0x28(%rsp), %rsi
callq 0x2d325
testb %al, %al
je 0x2b422
movb 0x10(%r14), %al
cmpb 0x10(%rbp), %al
leaq 0x273ce(%rip), %rax     # 0x527c0
cmoveq %r15, %rax
movq (%rax), %rcx
movq %rcx, (%rbx)
movq 0x8(%rax), %rax
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0x2b493
movq 0x26bb4(%rip), %rcx     # 0x51fc8
cmpb $0x0, (%rcx)
je 0x2b4b8
incl 0x8(%rax)
jmp 0x2b493
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 %r13, %r9
callq 0x2e596
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 0x2b493
movq 0x26b57(%rip), %rax     # 0x51fc8
cmpb $0x0, (%rax)
je 0x2b47b
incl 0x8(%rdi)
jmp 0x2b47f
lock
incl 0x8(%rdi)
callq 0x133fc
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x2b493
callq 0x133fc
testq %r12, %r12
je 0x2b4a0
movq %r12, %rdi
callq 0x133fc
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x2b2fe
callq 0x133fc
jmp 0x2b2fe
lock
incl 0x8(%rax)
jmp 0x2b493
movq %rax, %rbx
testq %r12, %r12
je 0x2b4ce
movq %r12, %rdi
callq 0x133fc
cmpq $0x0, 0x8(%rsp)
je 0x2b4e0
movq 0x8(%rsp), %rdi
callq 0x133fc
movq %rbx, %rdi
callq 0x7430