// File: /workspace/github_cpp_makefile_star2_O3/vsklad[P]cgen/./bal/cnf/processor/cnfoptimizer.cpp
// Function: bal::__reduce_clause_flags(unsigned short&, unsigned short, unsigned int)
inline void __reduce_clause_flags(uint16_t& flags, const clause_size_t index, const literalid_t value) {
        switch ((index << 1) + value) {
            case 0: // variable 0, value 0
                flags =
                (flags & 0x0002) >> 1 | (flags & 0x0008) >> 2 |
                (flags & 0x0020) >> 3 | (flags & 0x0080) >> 4 |
                (flags & 0x0200) >> 5 | (flags & 0x0800) >> 6 |
                (flags & 0x2000) >> 7 | (flags & 0x8000) >> 8;
                break;
            case 1: // variable 0, value 1
                flags =
                (flags & 0x0001)      | (flags & 0x0004) >> 1 |
                (flags & 0x0010) >> 2 | (flags & 0x0040) >> 3 |
                (flags & 0x0100) >> 4 | (flags & 0x0400) >> 5 |
                (flags & 0x1000) >> 6 | (flags & 0x4000) >> 7;
                break;
            case 2: // variable 1, value 0
                flags =
                (flags & 0x000C) >> 2 | (flags & 0x00C0) >> 4 |
                (flags & 0x0C00) >> 6 | (flags & 0xC000) >> 8;
                break;
            case 3: // variable 1, value 1
                flags =
                (flags & 0x0003)      | (flags & 0x0030) >> 2 |
                (flags & 0x0300) >> 4 | (flags & 0x3000) >> 6;
                break;
            case 4: // variable 2, value 0
                flags = (flags & 0x00F0) >> 4 | (flags & 0xF000) >> 8;
                break;
            case 5: // variable 2, value 1
                flags = (flags & 0x000F)      | (flags & 0x0F00) >> 4;
                break;
            case 6: // variable 3, value 0
                flags = (flags & 0xFFFF) >> 8;
                break;
            case 7: // variable 3, value 1
                flags = (flags & 0x00FF);
                break;
        };
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
leal (%rdx,%rsi,2), %eax
cmpl $0x7, %eax
ja 0x136d0
leaq 0x2e7d3(%rip), %rcx     # 0x41d7c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movzwl (%rdi), %eax
movl %eax, %ecx
shrl %ecx
andl $0x1, %ecx
movl %eax, %edx
shrl $0x2, %edx
andl $0x2, %edx
orl %ecx, %edx
movl %eax, %ecx
shrl $0x3, %ecx
andl $0x4, %ecx
orl %edx, %ecx
movl %eax, %edx
shrl $0x4, %edx
andl $0x8, %edx
orl %ecx, %edx
movl %eax, %ecx
shrl $0x5, %ecx
andl $0x10, %ecx
orl %edx, %ecx
movl %eax, %edx
shrl $0x6, %edx
andl $0x20, %edx
orl %ecx, %edx
movl %eax, %ecx
shrl $0x7, %ecx
andl $0x40, %ecx
orl %edx, %ecx
shrl $0x8, %eax
andl $-0x80, %eax
jmp 0x136cb
movzwl (%rdi), %eax
movl %eax, %ecx
shrl $0x4, %ecx
andl $0xf, %ecx
shrl $0x8, %eax
andl $-0x10, %eax
jmp 0x136cb
movzwl (%rdi), %eax
movl %eax, %ecx
shrl $0x2, %ecx
andl $0x3, %ecx
movl %eax, %edx
shrl $0x4, %edx
andl $0xc, %edx
orl %ecx, %edx
movl %eax, %ecx
shrl $0x6, %ecx
andl $0x30, %ecx
orl %edx, %ecx
shrl $0x8, %eax
andl $-0x40, %eax
jmp 0x136cb
movzwl (%rdi), %eax
movl %eax, %ecx
andl $0x3, %ecx
movl %eax, %edx
shrl $0x2, %edx
andl $0xc, %edx
orl %ecx, %edx
movl %eax, %ecx
shrl $0x4, %ecx
andl $0x30, %ecx
orl %edx, %ecx
shrl $0x6, %eax
andl $0xc0, %eax
jmp 0x136cb
movzbl (%rdi), %eax
jmp 0x136cd
movzwl (%rdi), %eax
movl %eax, %ecx
andl $0x1, %ecx
movl %eax, %edx
shrl %edx
andl $0x2, %edx
orl %ecx, %edx
movl %eax, %ecx
shrl $0x2, %ecx
andl $0x4, %ecx
orl %edx, %ecx
movl %eax, %edx
shrl $0x3, %edx
andl $0x8, %edx
orl %ecx, %edx
movl %eax, %ecx
shrl $0x4, %ecx
andl $0x10, %ecx
orl %edx, %ecx
movl %eax, %edx
shrl $0x5, %edx
andl $0x20, %edx
orl %ecx, %edx
movl %eax, %ecx
shrl $0x6, %ecx
andl $0x40, %ecx
orl %edx, %ecx
shrl $0x7, %eax
andl $0x80, %eax
jmp 0x136cb
movzwl (%rdi), %eax
movl %eax, %ecx
andl $0xf, %ecx
shrl $0x4, %eax
andl $0xf0, %eax
orl %ecx, %eax
movw %ax, (%rdi)
popq %rbp
retq
movzbl 0x1(%rdi), %eax
jmp 0x136cd