// File: /workspace/github_cpp_makefile_star2_O1/vsklad[P]cgen/./bal/cnf/cnf/cnfclauses.hpp
// Function: bal::print_clause(std::ostream&, unsigned int const*, char const*)
inline void print_clause(std::ostream& stream, const uint32_t* const p_clause, const char* final_token = nullptr) {
        uint16_t clauses_bitmap = _clause_flags(p_clause);
        const clause_size_t clause_size = _clause_size(p_clause);
        
        if (clause_size <= 4 && clauses_bitmap != 0) {
            uint16_t clause_bitmap = 0;
            while (clauses_bitmap > 0) {
                if (clauses_bitmap & 1) {
                    for (auto i = 0; i < clause_size; i++) {
                        literal_t literal(literal_t__negated_onlyif(_clause_literal(p_clause, i), (clause_bitmap & (1 << i)) == 0));
                        stream << ((i > 0) ? " " : "") << literal;
                    };
                    
                    if (final_token != nullptr) {
                        stream << final_token;
                    };
                };
                clause_bitmap++;
                clauses_bitmap >>= 1;
            };
        } else {
            for (auto i = 0; i < clause_size; i++) {
                stream << ((i > 0) ? " " : "") << literal_t(*(p_clause + i + 1));
            };
            
            if (final_token != nullptr) {
                stream << final_token;
            };
        };
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, -0x30(%rbp)
movq %rsi, %r15
movq %rdi, %r14
movl (%rsi), %edx
movl %edx, %r13d
andl $0x7fff, %r13d          # imm = 0x7FFF
cmpl $0x5, %r13d
setb %al
cmpl $0x10000, %edx          # imm = 0x10000
setae %cl
testb %al, %cl
je 0x1069a
movq %r15, -0x50(%rbp)
shrl $0x10, %edx
movl %r13d, %eax
movq %rax, -0x60(%rbp)
xorl %ecx, %ecx
leaq 0x37e76(%rip), %rdi     # 0x4844b
leaq -0x40(%rbp), %r15
movq %r13, -0x58(%rbp)
movq -0x50(%rbp), %rbx
testb $0x1, %dl
je 0x10687
movq %rcx, -0x38(%rbp)
movq %rdx, -0x48(%rbp)
testl %r13d, %r13d
je 0x1064b
movq -0x38(%rbp), %rax
movl %eax, %r13d
notl %r13d
xorl %r12d, %r12d
xorl %eax, %eax
btl %r12d, %r13d
setb %al
xorl 0x4(%rbx,%r12,4), %eax
movl %eax, -0x40(%rbp)
xorl %edx, %edx
testq %r12, %r12
setne %dl
leaq 0x3d7b0(%rip), %rsi     # 0x4ddd4
cmovneq %rdi, %rsi
movq %r14, %rdi
callq 0xc320
movq %r14, %rdi
movq %r15, %rsi
callq 0x10712
leaq 0x37e09(%rip), %rdi     # 0x4844b
incq %r12
cmpq %r12, -0x60(%rbp)
jne 0x10604
cmpq $0x0, -0x30(%rbp)
movq -0x58(%rbp), %r13
movq -0x48(%rbp), %rdx
movq -0x38(%rbp), %rcx
je 0x10687
movq -0x30(%rbp), %r12
movq %r12, %rdi
callq 0xc110
movq %r14, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0xc320
leaq 0x37dcc(%rip), %rdi     # 0x4844b
movq -0x38(%rbp), %rcx
movq -0x48(%rbp), %rdx
incl %ecx
movl %edx, %eax
shrl %eax
cmpl $0x2, %edx
movl %eax, %edx
jae 0x105e1
jmp 0x10703
testl %r13d, %r13d
je 0x106e2
xorl %ebx, %ebx
leaq -0x3c(%rbp), %r12
xorl %edx, %edx
testq %rbx, %rbx
setne %dl
leaq 0x3d720(%rip), %rsi     # 0x4ddd4
leaq 0x37d90(%rip), %rax     # 0x4844b
cmovneq %rax, %rsi
movq %r14, %rdi
callq 0xc320
movl 0x4(%r15,%rbx,4), %eax
movl %eax, -0x3c(%rbp)
movq %r14, %rdi
movq %r12, %rsi
callq 0x10712
incq %rbx
cmpq %rbx, %r13
jne 0x106a5
cmpq $0x0, -0x30(%rbp)
je 0x10703
movq -0x30(%rbp), %rbx
movq %rbx, %rdi
callq 0xc110
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0xc320
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq