// File: eryxcc[P]lois/src/formula.cpp
// Function: lois::FormulaQ::valueKnown(std::shared_ptr<lois::Variable>, bool)
term FormulaQ::valueKnown(vptr v, bool negated) {
  term v1 = right->valueKnown(v, negated);
  if(!v1.p) return v1;
  for(auto qx: var) if(qx == v1.asVar()) {
    // should not happen if simplified!
    std::cout << "should not happen: v= " <<v << " rbool= ";
    display(std::cout); std::cout << std::endl;
    term vk = right->valueKnown(qx, type);
    if(!vk.p) std::cout << "value unknown!" << std::endl;
    else std::cout << "valueKnown is " << vk <<std::endl;
    return nullterm;
    }
  return v1;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdx, -0xd0(%rbp)
movq %rdi, -0xe8(%rbp)
movb %cl, %al
movq %rdi, %rcx
movq %rcx, -0xe0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
andb $0x1, %al
movb %al, -0x19(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0xd8(%rbp)
addq $0x18, %rdi
callq 0x3ece0
movq -0xd0(%rbp), %rsi
movq %rax, -0xc8(%rbp)
leaq -0x40(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
callq 0x1b100
movq -0xc8(%rbp), %rsi
movq -0xc0(%rbp), %rdx
movq (%rsi), %rax
movq 0x30(%rax), %rax
movzbl -0x19(%rbp), %ecx
andl $0x1, %ecx
leaq -0x30(%rbp), %rdi
callq *%rax
jmp 0x42dec
leaq -0x40(%rbp), %rdi
callq 0x10f20
leaq -0x30(%rbp), %rdi
callq 0x14bb0
testb $0x1, %al
jne 0x42e38
movq -0xe8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x215e0
movl $0x1, -0x50(%rbp)
jmp 0x43156
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x10f20
jmp 0x4316f
movq -0xd8(%rbp), %rax
addq $0x28, %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
callq 0x1b040
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rdi
callq 0x1b070
movq %rax, -0x68(%rbp)
leaq -0x60(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x1b0a0
testb $0x1, %al
jne 0x42e77
jmp 0x4313f
leaq -0x60(%rbp), %rdi
callq 0x1b0e0
movq %rax, %rsi
leaq -0x78(%rbp), %rdi
callq 0x1b100
leaq -0x88(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x42060
jmp 0x42e9e
leaq -0x78(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x45090
movb %al, -0xe9(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x10f20
movb -0xe9(%rbp), %al
testb $0x1, %al
jne 0x42ecf
jmp 0x43102
movq 0x62102(%rip), %rdi     # 0xa4fd8
leaq 0x300b3(%rip), %rsi     # 0x72f90
callq 0x82b0
movq %rax, -0xf8(%rbp)
jmp 0x42eeb
movq -0xd0(%rbp), %rsi
leaq -0x98(%rbp), %rdi
movq %rdi, -0x108(%rbp)
callq 0x1b100
movq -0xf8(%rbp), %rdi
movq -0x108(%rbp), %rsi
callq 0x410b0
movq %rax, -0x100(%rbp)
jmp 0x42f21
movq -0x100(%rbp), %rdi
leaq 0x30078(%rip), %rsi     # 0x72fa7
callq 0x82b0
jmp 0x42f36
leaq -0x98(%rbp), %rdi
callq 0x10f20
movq -0xd8(%rbp), %rdi
movq (%rdi), %rax
movq (%rax), %rax
movq 0x62082(%rip), %rsi     # 0xa4fd8
callq *%rax
jmp 0x42f5a
movq 0x62077(%rip), %rdi     # 0xa4fd8
movq 0x62048(%rip), %rsi     # 0xa4fb0
callq 0x8300
jmp 0x42f6f
movq -0xd8(%rbp), %rdi
addq $0x18, %rdi
callq 0x3ece0
movq %rax, -0x110(%rbp)
jmp 0x42f88
leaq -0xb8(%rbp), %rdi
movq %rdi, -0x118(%rbp)
leaq -0x78(%rbp), %rsi
callq 0x1b100
movq -0xd8(%rbp), %rcx
movq -0x110(%rbp), %rsi
movq -0x118(%rbp), %rdx
movq (%rsi), %rax
movq 0x30(%rax), %rax
movzbl 0x10(%rcx), %ecx
andl $0x1, %ecx
leaq -0xa8(%rbp), %rdi
callq *%rax
jmp 0x42fcd
leaq -0xb8(%rbp), %rdi
callq 0x10f20
leaq -0xa8(%rbp), %rdi
callq 0x14bb0
testb $0x1, %al
jne 0x4308b
movq 0x61fe4(%rip), %rdi     # 0xa4fd8
leaq 0x2ffb5(%rip), %rsi     # 0x72fb0
callq 0x82b0
movq %rax, -0x120(%rbp)
jmp 0x43009
movq -0x120(%rbp), %rdi
movq 0x61f99(%rip), %rsi     # 0xa4fb0
callq 0x8300
jmp 0x4301e
jmp 0x430da
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x4312b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x10f20
jmp 0x4312b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x10f20
jmp 0x4312b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x11360
jmp 0x4312b
movq 0x61f46(%rip), %rdi     # 0xa4fd8
leaq 0x2ff26(%rip), %rsi     # 0x72fbf
callq 0x82b0
movq %rax, -0x128(%rbp)
jmp 0x430a7
movq -0x128(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x11140
movq %rax, -0x130(%rbp)
jmp 0x430c3
movq -0x130(%rbp), %rdi
movq 0x61edf(%rip), %rsi     # 0xa4fb0
callq 0x8300
jmp 0x430d8
jmp 0x430da
movq -0xe8(%rbp), %rdi
leaq 0x62768(%rip), %rsi     # 0xa5850
callq 0x11800
movl $0x1, -0x50(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x11360
jmp 0x43109
movl $0x0, -0x50(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x10f20
movl -0x50(%rbp), %eax
testl %eax, %eax
jne 0x43156
jmp 0x4311b
jmp 0x4311d
leaq -0x60(%rbp), %rdi
callq 0x1b390
jmp 0x42e61
leaq -0x78(%rbp), %rdi
callq 0x10f20
leaq -0x30(%rbp), %rdi
callq 0x11360
jmp 0x4316f
movq -0xe8(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x215e0
movl $0x1, -0x50(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x11360
movq -0xe0(%rbp), %rax
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x84d0
nopl (%rax,%rax)