// File: vsklad[P]cgen/./bal/anf/anf.cpp
// Function: bal::Anf::print_equation(std::ostream&, unsigned long) const
void Anf::print_equation(std::ostream& stream, const size_t equation_index) const {
        const size_t terms_size = terms_size_(equation_index);
        
        for (auto j = equations_[equation_index]; j < equations_[equation_index] + terms_size; j++) {
            if (j > equations_[equation_index]) {
                stream << " + ";
            };
            
            const size_t symbols_size = symbols_size_(j);
            for (auto k = terms_[j]; k < terms_[j] + symbols_size; k++) {
                if (k > terms_[j]) {
                    stream << " * ";
                };
                
                assert(literal_t__is_variable(symbols_[k]));
                // only the only variable in the first term can be negated
                assert(k == terms_[j] || !literal_t__is_negation(symbols_[k]));
                stream << "x" << std::dec << literal_t__variable_id(symbols_[k]) + 1;
            };
        };
        
        // check the first constant term and output it last
        assert(terms_size >= 1);
        assert(symbols_size_(equations_[equation_index]) == 1);
        if (literal_t__is_negation(symbols_[terms_[equations_[equation_index]]])) {
            stream << " + 1";
        };
        
        stream << std::endl;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x40(%rbp)
movq -0x18(%rbp), %rsi
callq 0xfc30
movq -0x40(%rbp), %rdi
movq %rax, -0x20(%rbp)
addq $0xa8, %rdi
movq -0x18(%rbp), %rsi
callq 0x102a0
movl (%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x40(%rbp), %rdi
movl -0x24(%rbp), %eax
movq %rax, -0x48(%rbp)
addq $0xa8, %rdi
movq -0x18(%rbp), %rsi
callq 0x102a0
movq %rax, %rcx
movq -0x48(%rbp), %rax
movl (%rcx), %ecx
addq -0x20(%rbp), %rcx
cmpq %rcx, %rax
jae 0xef9d
movq -0x40(%rbp), %rdi
movl -0x24(%rbp), %eax
movl %eax, -0x4c(%rbp)
addq $0xa8, %rdi
movq -0x18(%rbp), %rsi
callq 0x102a0
movq %rax, %rcx
movl -0x4c(%rbp), %eax
cmpl (%rcx), %eax
jbe 0xedca
movq -0x10(%rbp), %rdi
leaq 0x4c488(%rip), %rsi     # 0x5b24d
callq 0xd320
movq -0x40(%rbp), %rdi
movl -0x24(%rbp), %eax
movl %eax, %esi
callq 0xfd70
movq -0x40(%rbp), %rdi
movq %rax, -0x30(%rbp)
addq $0x90, %rdi
movl -0x24(%rbp), %eax
movl %eax, %esi
callq 0x102a0
movl (%rax), %eax
movl %eax, -0x34(%rbp)
movq -0x40(%rbp), %rdi
movl -0x34(%rbp), %eax
movq %rax, -0x58(%rbp)
addq $0x90, %rdi
movl -0x24(%rbp), %eax
movl %eax, %esi
callq 0x102a0
movq %rax, %rcx
movq -0x58(%rbp), %rax
movl (%rcx), %ecx
addq -0x30(%rbp), %rcx
cmpq %rcx, %rax
jae 0xef8d
movq -0x40(%rbp), %rdi
movl -0x34(%rbp), %eax
movl %eax, -0x5c(%rbp)
addq $0x90, %rdi
movl -0x24(%rbp), %eax
movl %eax, %esi
callq 0x102a0
movq %rax, %rcx
movl -0x5c(%rbp), %eax
cmpl (%rcx), %eax
jbe 0xee5d
movq -0x10(%rbp), %rdi
leaq 0x4c3f9(%rip), %rsi     # 0x5b251
callq 0xd320
movq -0x40(%rbp), %rdi
addq $0x78, %rdi
movl -0x34(%rbp), %eax
movl %eax, %esi
callq 0x102a0
movq %rax, %rcx
xorl %eax, %eax
cmpl $0x1, (%rcx)
movb %al, -0x5d(%rbp)
jbe 0xee97
movq -0x40(%rbp), %rdi
addq $0x78, %rdi
movl -0x34(%rbp), %eax
movl %eax, %esi
callq 0x102a0
cmpl $-0x2, (%rax)
setbe %al
movb %al, -0x5d(%rbp)
movb -0x5d(%rbp), %al
testb $0x1, %al
jne 0xeea0
jmp 0xeea2
jmp 0xeec1
leaq 0x4c3ac(%rip), %rdi     # 0x5b255
leaq 0x4c16f(%rip), %rsi     # 0x5b01f
movl $0x117, %edx            # imm = 0x117
leaq 0x4c3bd(%rip), %rcx     # 0x5b279
callq 0xd1c0
movq -0x40(%rbp), %rdi
movl -0x34(%rbp), %eax
movl %eax, -0x64(%rbp)
addq $0x90, %rdi
movl -0x24(%rbp), %eax
movl %eax, %esi
callq 0x102a0
movl -0x64(%rbp), %ecx
movq %rax, %rdx
movb $0x1, %al
cmpl (%rdx), %ecx
movb %al, -0x5e(%rbp)
je 0xef0d
movq -0x40(%rbp), %rdi
addq $0x78, %rdi
movl -0x34(%rbp), %eax
movl %eax, %esi
callq 0x102a0
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
sete %al
xorb $-0x1, %al
movb %al, -0x5e(%rbp)
movb -0x5e(%rbp), %al
testb $0x1, %al
jne 0xef16
jmp 0xef18
jmp 0xef37
leaq 0x4c39c(%rip), %rdi     # 0x5b2bb
leaq 0x4c0f9(%rip), %rsi     # 0x5b01f
movl $0x119, %edx            # imm = 0x119
leaq 0x4c347(%rip), %rcx     # 0x5b279
callq 0xd1c0
movq -0x10(%rbp), %rdi
leaq 0x59696(%rip), %rsi     # 0x685d8
callq 0xd320
movq %rax, %rdi
leaq 0x136f(%rip), %rsi      # 0x102c0
callq 0xd0f0
movq -0x40(%rbp), %rdi
movq %rax, -0x70(%rbp)
addq $0x78, %rdi
movl -0x34(%rbp), %eax
movl %eax, %esi
callq 0x102a0
movq -0x70(%rbp), %rdi
movl (%rax), %esi
shrl %esi
subl $0x1, %esi
addl $0x1, %esi
callq 0xd420
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xedf6
jmp 0xef8f
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xed65
cmpq $0x1, -0x20(%rbp)
jb 0xefa6
jmp 0xefc5
leaq 0x4c345(%rip), %rdi     # 0x5b2f2
leaq 0x4c06b(%rip), %rsi     # 0x5b01f
movl $0x11f, %edx            # imm = 0x11F
leaq 0x4c2b9(%rip), %rcx     # 0x5b279
callq 0xd1c0
movq -0x40(%rbp), %rdi
addq $0xa8, %rdi
movq -0x18(%rbp), %rsi
callq 0x102a0
movq -0x40(%rbp), %rdi
movl (%rax), %eax
movl %eax, %esi
callq 0xfd70
cmpq $0x1, %rax
jne 0xefee
jmp 0xf00d
leaq 0x4c30d(%rip), %rdi     # 0x5b302
leaq 0x4c023(%rip), %rsi     # 0x5b01f
movl $0x120, %edx            # imm = 0x120
leaq 0x4c271(%rip), %rcx     # 0x5b279
callq 0xd1c0
movq -0x40(%rbp), %rdi
movq %rdi, %rax
addq $0x78, %rax
movq %rax, -0x78(%rbp)
movq %rdi, %rax
addq $0x90, %rax
movq %rax, -0x80(%rbp)
addq $0xa8, %rdi
movq -0x18(%rbp), %rsi
callq 0x102a0
movq -0x80(%rbp), %rdi
movl (%rax), %eax
movl %eax, %esi
callq 0x102a0
movq -0x78(%rbp), %rdi
movl (%rax), %eax
movl %eax, %esi
callq 0x102a0
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0xf06d
movq -0x10(%rbp), %rdi
leaq 0x4c2c9(%rip), %rsi     # 0x5b331
callq 0xd320
movq -0x10(%rbp), %rdi
movq 0x73f08(%rip), %rsi     # 0x82f80
callq 0xd360
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)