// File: vsklad[P]cgen/./bal/cnf/processor/cnfoptimizer.cpp
// Function: bal::CnfOptimizer::evaluate_clause_a(unsigned int*, unsigned int, unsigned int)
inline processor_result_t CnfOptimizer::evaluate_clause_a(uint32_t* const p_clause,
                                                               container_offset_t offset,
                                                               const container_offset_t original_offset) {
        // the clause which originated the current one after normalization
        _assert_level_2(original_offset <= processed_offset_ || original_offset == CONTAINER_END);
        
        // offset that the resulting clause can be stored to
        const container_offset_t update_offset = clauses_.transaction_offset_is_immutable(original_offset) ? CONTAINER_END : original_offset;
        
        // the clause may be updated several times
        // the processing stops when the last iteration results in erUndetermined
        // however, the returned value reflects preceding change
        processor_result_t result = erUndetermined;
        
        // repeat processing for as long as the clause is changed, at least once
        while(true) {
            evaluations_aggregated_++;
            
            const clause_size_t clause_size = _clause_size(p_clause);
            if (clause_size > 1) {
                // "processed" clause flags from offset clause
                // 0 for first time processing, actual for processed clauses
                // referring to the baseline for already generated subsuming clauses;
                // it is used for merging and deriving of reduced clauses to only process the changes
                clause_flags_t processed_flags = offset < processed_offset_ ? _clauses_offset_flags(clauses_data_, offset) : 0;
                
                // insertion point stores index position when a clause is searched for
                // it will be used if thenew clause is appended
                Cnf::clauses_container_t::insertion_point_t insertion_point;
                __insertion_point_t_init(insertion_point);
                
                if (offset == CONTAINER_END) {
                    // find existing matching clause before evaluation
                    // note that the result may be beyond processed_offset_ and that
                    // it can be equal to processed_offset_ while evaluating recursively
                    clauses_.find(p_clause, insertion_point);
                    offset = insertion_point.container_offset;
                    if (offset < processed_offset_) {
                        processed_flags = _clauses_offset_flags(clauses_data_, offset);
                    };
                };
                
                // there is offset but not the current clause
                if (offset != CONTAINER_END && (original_offset != processed_offset_ || offset != original_offset)) {
                    const clause_flags_t offset_flags = _clauses_offset_flags(clauses_data_, offset);
                    _assert_level_1(offset_flags);
                    _clause_flags_include(p_clause, offset_flags);
                    if (_clause_flags(p_clause) != offset_flags) {
                        TRACE_CLAUSE_MERGE(p_clause, offset);
                        if (clauses_.transaction_offset_is_immutable(offset)) {
                            // once changed, an immutable clause will be appended afresh
                            // the original clause must be excluded
                            exclude_clause(offset);
                            clauses_.insertion_point_from_container_offset(insertion_point, offset);
                            offset = CONTAINER_END;
                            TRACE_CLAUSE_UPDATE(p_clause, offset);
                        } else if (!is_clause_included(offset)) {
                            _assert_level_1(offset != processed_offset_); // unelaborated and untested
                            if (offset < processed_offset_) {
                                // if the clause is processed, treat is as immutable
                                clauses_.insertion_point_from_container_offset(insertion_point, offset);
                                offset = CONTAINER_END;
                                TRACE_CLAUSE_UPDATE(p_clause, offset);
                            } else if (offset > processed_offset_) {
                                // this essentially re-includes the clause
                                // which is fine assuming the clause is not included into variable clauses index yet
                                _assert_level_1(_clause_is_included(p_clause));
                                _clauses_offset_header(clauses_data_, offset) = _clause_header(p_clause);
                                TRACE_CLAUSE_UPDATE(p_clause, offset);
                                TRACE_CLAUSE_APPEND(p_clause);
                            };
                        } else if (offset > processed_offset_ && update_offset != CONTAINER_END) {
                            // merge the unprocessed clause into the current one
                            exclude_clause(offset);
                            clauses_.insertion_point_from_container_offset(insertion_point, offset);
                            offset = CONTAINER_END;
                            TRACE_CLAUSE_UPDATE(p_clause, offset);
                        } else {
                            // must be updated immediately for cascade updates
                            // and even if excluded, in case it is included again
                            _clauses_offset_flags_include(clauses_data_, offset, _clause_flags(p_clause));
                            TRACE_CLAUSE_UPDATE(p_clause, offset);
                        };
                    } else {
                        // p_clause is fully merged into an existing one
                        break;
                    };
                };
                
                processor_result_t iteration_result = erUndetermined;
                const clause_flags_t flags = _clause_flags(p_clause);
                // there is something to process
                _assert_level_1((flags & ~processed_flags) != 0);
                // ensure processed flags is a subset (merged)
                _assert_level_1((~flags & processed_flags) == 0);
                
                if (clause_size == 2) {
                    
                    if (_c2_is_single_clause_flags(flags)) {
                        // a single clause cannot be reprocessed again since it cannot change
                        // this also means an immutable clause will not be re-insserted
                        // clause is ignored if offset is unprocessed
                        _assert_level_1(offset >= processed_offset_);
                        if ((original_offset == processed_offset_ && offset == original_offset) ||
                            (update_offset == processed_offset_ && offset == CONTAINER_END)) {
                            processor_result_t resolve_result = resolve_c2(p_clause);
                            _assert_level_3(resolve_result == erSatisfied || resolve_result == erConflict || normalize_ca(p_clause, p_clause) == erUndetermined);
                            iteration_result = (resolve_result == erUndetermined) ? iteration_result : resolve_result;
                        };
                    } else {
                        // the result is always resolved fully
                        if (offset != CONTAINER_END) {
                            exclude_clause(offset);
                            offset = CONTAINER_END;
                        };
                        
                        const literalid_t* const variables = variables_.data();
                        const literalid_t* const literals = _clause_literals(p_clause);
                        
                        if (flags == 0b0110 || flags == 0b1001) {
                            // found full equivalence
                            const literalid_t lhs = variables[literal_t__variable_id(literals[1])];
                            const literalid_t rhs = literal_t__negated_onlyif(literals[0], flags == 0b1001);
                            if (literal_t__is_constant(lhs) && literal_t__is_variable(rhs)) {
                                // TODO: why is this possible????
                                iteration_result = assign_literal_value(rhs, lhs);
                            } else if (lhs != rhs) {
                                iteration_result = assign_literal_value(literals[1], rhs);
                            } else {
                                iteration_result = erSatisfied;
                            };
                        } else if (flags == 0b0101 || flags == 0b1010) {
                            // first variable value is inferred
                            iteration_result = assign_literal_value(literals[0], literal_t__constant(flags == 0b1010));
                        } else if (flags == 0b0011 || flags == 0b1100) {
                            // second variable value is inferred
                            iteration_result = assign_literal_value(literals[1], literal_t__constant(flags == 0b1100));
                        } else if (flags == 0b0111 || flags == 0b1011 || flags == 0b1101 || flags == 0b1110) {
                            // both variable values are inferred
                            // note that the second variable may be resolved while assigning the first one
                            // see notes within assign_literal_value()
                            iteration_result = assign_literal_value(literals[0],
                                                                    literal_t__constant((flags & 0b1010) == 0b1010));
                            if (iteration_result != erConflict) {
                                iteration_result = assign_literal_value(literals[1],
                                                                        literal_t__constant((_clause_flags(p_clause) & 0b1100) == 0b1100));
                            };
                        } else {
                            iteration_result = erConflict;
                        };
                    };
                    
                } else if (clause_size == 3) {
                } else if (clause_size == 4) {
                    _assert_level_3(offset == CONTAINER_END || is_clause_included(offset));
                } else {
                    _assert_level_0(false);
                };
                
                // POST-PROCESSING
                result = (iteration_result == erUndetermined) ? result : iteration_result;
                
                if (iteration_result == erUndetermined && offset == CONTAINER_END) {
                    _assert_level_1(_clause_is_included(p_clause));
                    _assert_level_1(update_offset == CONTAINER_END ||
                                    !_clauses_offset_is_included(clauses_data_, update_offset));
                    // something happened while processing recursively
                    if (!clauses_.insertion_point_is_valid(insertion_point)) {
                        clauses_.find(p_clause, insertion_point);
                        offset = insertion_point.container_offset;
                        if (offset != CONTAINER_END) {
                            _assert_level_1(offset != update_offset);
                            uint32_t* const p_found_clause = _clauses_offset_clause(clauses_data_, offset);
                            const clause_flags_t found_flags = _clause_flags(p_found_clause);
                            
                            if (update_offset < offset) {
                                // use update_offset in any case
                                if (found_flags & ~_clause_flags(p_clause)) {
                                    // reprocess the current clause to merge it
                                    continue;
                                } else {
                                    // offset is replaced by p_clause
                                    exclude_clause(offset);
                                };
                            } else if (offset <= processed_offset_) {
                                if ((~found_flags & _clause_flags(p_clause)) == 0) {
                                    // found processed offset includes p_clause
                                    // simply ignore p_clause and keep offset
                                    break;
                                } else {
                                    // offset clause has something p_clause doesn't
                                    // or p_clause has something offset doesn't
                                    // reprocess; immutable and excluded offset will be handled properly
                                    _assert_level_1(offset != processed_offset_);
                                    continue;
                                };
                            } else {
                                if (_clause_flags(p_clause) & ~found_flags) {
                                    // an unprocessed clause and there are new flags to add
                                    if (clauses_.transaction_offset_is_immutable(offset) ||
                                        !_clause_is_included(p_found_clause)) {
                                        _clause_flags_include(p_clause, found_flags);
                                        exclude_clause(offset);
                                    } else {
                                        _clause_flags_include(p_found_clause, _clause_flags(p_clause));
                                        TRACE_CLAUSE_MERGE(p_clause, offset);
                                        break;
                                    };
                                } else {
                                    // an unprocessed clause, no new flags
                                    // ignore the current clause
                                    // if the found clause is excluded that is for a reason
                                    break;
                                };
                            };
                        };
                        _assert_level_2(offset == insertion_point.container_offset);
                    } else {
                        offset = insertion_point.container_offset;
                        if (offset != CONTAINER_END) {
                            if (_clauses_offset_is_included(clauses_data_, offset)) {
                                if ((_clauses_offset_flags(clauses_data_, offset) & ~_clause_flags(p_clause)) != 0) {
                                    // additional clauses were resolved recursively; reprocess
                                    _assert_level_1(offset != processed_offset_);
                                    continue;
                                };
                            };
                        };
                    };
                    
                    if (update_offset != CONTAINER_END) {
                        if (offset != CONTAINER_END) {
                            if (_clauses_offset_is_included(clauses_data_, offset)) {
                                // additional clauses derived while processing recursively
                                _assert_level_2(offset > processed_offset_);
                                _assert_level_3((_clauses_offset_flags(clauses_data_, offset) & ~_clause_flags(p_clause)) == 0);
                                exclude_clause(offset);
                                offset = CONTAINER_END;
                            };
                        };
                        // copying must occur afterwards to indentify the old clause
                        clauses_.update(update_offset, insertion_point);
                        _assert_level_1(_clause_is_included(p_clause));
                        _clause_copy(p_clause, _clauses_offset_clause(clauses_data_, update_offset));
                        // see note 1
                    } else {
                        clauses_.append<true>(p_clause, insertion_point);
                    };
                    
                    TRACE_CLAUSE_APPEND(p_clause);
                    break;
                } else if (iteration_result == erChangedC || iteration_result == erChangedV) {
                    if (offset != CONTAINER_END) {
                        exclude_clause(offset);
                        offset = CONTAINER_END;
                    };
                    TRACE_CLAUSE_RESOLVENT(p_clause);
                    continue;
                } else if (iteration_result == erSatisfied) {
                    if (offset != CONTAINER_END) {
                        exclude_clause(offset);
                    };
                    break;
                } else {
                    break;
                };
                
            } else if (clause_size == 1) {
                const clause_flags_t flags = _clause_flags(p_clause);
                if (flags == 0b11) {
                    result = erConflict;
                } else {
                    result = assign_literal_value(_clause_literal(p_clause, 0), literal_t__constant(flags == 0b10));
                };
                break;
            } else { // clause_size == 0
                result = erConflict;
                break;
            };
        };
        
        return result;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movq -0x8(%rbp), %rdx
movq %rdx, -0x78(%rbp)
movl -0x18(%rbp), %ecx
movb $0x1, %al
cmpl 0xb0(%rdx), %ecx
movb %al, -0x6d(%rbp)
jbe 0x1b22b
cmpl $-0x1, -0x18(%rbp)
sete %al
movb %al, -0x6d(%rbp)
movb -0x6d(%rbp), %al
testb $0x1, %al
jne 0x1b234
jmp 0x1b236
jmp 0x1b255
leaq 0x4389b(%rip), %rdi     # 0x5ead8
leaq 0x42cd0(%rip), %rsi     # 0x5df14
movl $0x18b, %edx            # imm = 0x18B
leaq 0x438d1(%rip), %rcx     # 0x5eb21
callq 0xd1c0
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rdi
movl -0x18(%rbp), %esi
callq 0x151f0
testb $0x1, %al
jne 0x1b26b
jmp 0x1b275
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0x7c(%rbp)
jmp 0x1b27b
movl -0x18(%rbp), %eax
movl %eax, -0x7c(%rbp)
movl -0x7c(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movq -0x78(%rbp), %rax
movq 0xc8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0xc8(%rax)
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x7fff, %eax           # imm = 0x7FFF
movw %ax, -0x22(%rbp)
movzwl -0x22(%rbp), %eax
cmpl $0x1, %eax
jle 0x1c071
movq -0x78(%rbp), %rcx
movl -0x14(%rbp), %eax
cmpl 0xb0(%rcx), %eax
jae 0x1b2e6
movq -0x78(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
movl -0x14(%rbp), %ecx
movl 0xc(%rax,%rcx,4), %eax
shrl $0x10, %eax
movzwl %ax, %eax
movl %eax, -0x80(%rbp)
jmp 0x1b2ed
xorl %eax, %eax
movl %eax, -0x80(%rbp)
jmp 0x1b2ed
movl -0x80(%rbp), %eax
movw %ax, -0x24(%rbp)
movl $0xffffffff, -0x30(%rbp) # imm = 0xFFFFFFFF
cmpl $-0x1, -0x14(%rbp)
jne 0x1b346
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rsi
leaq -0x34(%rbp), %rdx
callq 0x15190
movq -0x78(%rbp), %rcx
movl -0x34(%rbp), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0xb0(%rcx), %eax
jae 0x1b344
movq -0x78(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
movl -0x14(%rbp), %ecx
movl 0xc(%rax,%rcx,4), %eax
shrl $0x10, %eax
movw %ax, -0x24(%rbp)
jmp 0x1b346
cmpl $-0x1, -0x14(%rbp)
je 0x1b6bd
movq -0x78(%rbp), %rcx
movl -0x18(%rbp), %eax
cmpl 0xb0(%rcx), %eax
jne 0x1b36b
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
je 0x1b6bd
movq -0x78(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
movl -0x14(%rbp), %ecx
movl 0xc(%rax,%rcx,4), %eax
shrl $0x10, %eax
movw %ax, -0x36(%rbp)
cmpw $0x0, -0x36(%rbp)
je 0x1b38d
jmp 0x1b3ac
leaq 0x43804(%rip), %rdi     # 0x5eb98
leaq 0x42b79(%rip), %rsi     # 0x5df14
movl $0x1b4, %edx            # imm = 0x1B4
leaq 0x4377a(%rip), %rcx     # 0x5eb21
callq 0xd1c0
movzwl -0x36(%rbp), %ecx
shll $0x10, %ecx
orl $0x0, %ecx
movq -0x10(%rbp), %rax
orl (%rax), %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movl (%rax), %eax
shrl $0x10, %eax
movzwl %ax, %eax
movzwl -0x36(%rbp), %ecx
cmpl %ecx, %eax
je 0x1b6b6
leaq 0x67fb3(%rip), %rdi     # 0x83390
callq 0x16210
cmpq $0x0, %rax
je 0x1b404
leaq 0x67fa1(%rip), %rdi     # 0x83390
callq 0x178d0
movq %rax, %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
movq (%rdi), %rax
callq *0x58(%rax)
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rdi
movl -0x14(%rbp), %esi
callq 0x151f0
testb $0x1, %al
jne 0x1b41a
jmp 0x1b479
movq -0x78(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x1c0e0
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rdi
movl -0x14(%rbp), %edx
leaq -0x34(%rbp), %rsi
callq 0x1c4d0
movl $0xffffffff, -0x14(%rbp) # imm = 0xFFFFFFFF
leaq 0x67f48(%rip), %rdi     # 0x83390
callq 0x16210
cmpq $0x0, %rax
je 0x1b474
leaq 0x67f36(%rip), %rdi     # 0x83390
callq 0x178d0
movq %rax, %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
movq (%rdi), %rax
movl $0x1, %ecx
callq *0x40(%rax)
jmp 0x1b6b4
movq -0x78(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x1c640
testb $0x1, %al
jne 0x1b5e2
movq -0x78(%rbp), %rcx
movl -0x14(%rbp), %eax
cmpl 0xb0(%rcx), %eax
je 0x1b49e
jmp 0x1b4bd
leaq 0x43700(%rip), %rdi     # 0x5eba5
leaq 0x42a68(%rip), %rsi     # 0x5df14
movl $0x1c0, %edx            # imm = 0x1C0
leaq 0x43669(%rip), %rcx     # 0x5eb21
callq 0xd1c0
movq -0x78(%rbp), %rcx
movl -0x14(%rbp), %eax
cmpl 0xb0(%rcx), %eax
jae 0x1b51f
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rdi
movl -0x14(%rbp), %edx
leaq -0x34(%rbp), %rsi
callq 0x1c4d0
movl $0xffffffff, -0x14(%rbp) # imm = 0xFFFFFFFF
leaq 0x67ea2(%rip), %rdi     # 0x83390
callq 0x16210
cmpq $0x0, %rax
je 0x1b51a
leaq 0x67e90(%rip), %rdi     # 0x83390
callq 0x178d0
movq %rax, %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
movq (%rdi), %rax
movl $0x1, %ecx
callq *0x40(%rax)
jmp 0x1b5dd
movq -0x78(%rbp), %rcx
movl -0x14(%rbp), %eax
cmpl 0xb0(%rcx), %eax
jbe 0x1b5db
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x8000, %eax           # imm = 0x8000
cmpl $0x0, %eax
jne 0x1b544
jmp 0x1b563
leaq 0x41e5a(%rip), %rdi     # 0x5d3a5
leaq 0x429c2(%rip), %rsi     # 0x5df14
movl $0x1c9, %edx            # imm = 0x1C9
leaq 0x435c3(%rip), %rcx     # 0x5eb21
callq 0xd1c0
movq -0x78(%rbp), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %edx
movq 0x18(%rax), %rax
movq (%rax), %rax
movl -0x14(%rbp), %ecx
movl %edx, 0xc(%rax,%rcx,4)
leaq 0x67e0e(%rip), %rdi     # 0x83390
callq 0x16210
cmpq $0x0, %rax
je 0x1b5ae
leaq 0x67dfc(%rip), %rdi     # 0x83390
callq 0x178d0
movq %rax, %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
movq (%rdi), %rax
movl $0x1, %ecx
callq *0x40(%rax)
leaq 0x67ddb(%rip), %rdi     # 0x83390
callq 0x16210
cmpq $0x0, %rax
je 0x1b5d9
leaq 0x67dc9(%rip), %rdi     # 0x83390
callq 0x178d0
movq %rax, %rdi
movq -0x10(%rbp), %rsi
movq (%rdi), %rax
callq *0x50(%rax)
jmp 0x1b5db
jmp 0x1b5dd
jmp 0x1b6b2
movq -0x78(%rbp), %rcx
movl -0x14(%rbp), %eax
cmpl 0xb0(%rcx), %eax
jbe 0x1b653
cmpl $-0x1, -0x1c(%rbp)
je 0x1b653
movq -0x78(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x1c0e0
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rdi
movl -0x14(%rbp), %edx
leaq -0x34(%rbp), %rsi
callq 0x1c4d0
movl $0xffffffff, -0x14(%rbp) # imm = 0xFFFFFFFF
leaq 0x67d6b(%rip), %rdi     # 0x83390
callq 0x16210
cmpq $0x0, %rax
je 0x1b651
leaq 0x67d59(%rip), %rdi     # 0x83390
callq 0x178d0
movq %rax, %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
movq (%rdi), %rax
movl $0x1, %ecx
callq *0x40(%rax)
jmp 0x1b6b0
movq -0x78(%rbp), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
shrl $0x10, %ecx
movzwl %cx, %edx
shll $0x10, %edx
orl $0x0, %edx
movq 0x18(%rax), %rax
movq (%rax), %rax
movl -0x14(%rbp), %ecx
orl 0xc(%rax,%rcx,4), %edx
movl %edx, 0xc(%rax,%rcx,4)
leaq 0x67d0e(%rip), %rdi     # 0x83390
callq 0x16210
cmpq $0x0, %rax
je 0x1b6ae
leaq 0x67cfc(%rip), %rdi     # 0x83390
callq 0x178d0
movq %rax, %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
movq (%rdi), %rax
movl $0x1, %ecx
callq *0x40(%rax)
jmp 0x1b6b0
jmp 0x1b6b2
jmp 0x1b6b4
jmp 0x1b6bb
jmp 0x1c0c6
jmp 0x1b6bd
movl $0x0, -0x3c(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
shrl $0x10, %eax
movw %ax, -0x3e(%rbp)
movzwl -0x3e(%rbp), %eax
movzwl -0x24(%rbp), %ecx
xorl $-0x1, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0x1b6e5
jmp 0x1b704
leaq 0x434d5(%rip), %rdi     # 0x5ebc1
leaq 0x42821(%rip), %rsi     # 0x5df14
movl $0x1e3, %edx            # imm = 0x1E3
leaq 0x43422(%rip), %rcx     # 0x5eb21
callq 0xd1c0
movzwl -0x3e(%rbp), %eax
xorl $-0x1, %eax
movzwl -0x24(%rbp), %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0x1b718
jmp 0x1b737
leaq 0x434c2(%rip), %rdi     # 0x5ebe1
leaq 0x427ee(%rip), %rsi     # 0x5df14
movl $0x1e5, %edx            # imm = 0x1E5
leaq 0x433ef(%rip), %rcx     # 0x5eb21
callq 0xd1c0
movzwl -0x22(%rbp), %eax
cmpl $0x2, %eax
jne 0x1ba6a
movzwl -0x3e(%rbp), %eax
cmpl $0x1, %eax
je 0x1b76c
movzwl -0x3e(%rbp), %eax
cmpl $0x2, %eax
je 0x1b76c
movzwl -0x3e(%rbp), %eax
cmpl $0x4, %eax
je 0x1b76c
movzwl -0x3e(%rbp), %eax
cmpl $0x8, %eax
jne 0x1b86e
movq -0x78(%rbp), %rcx
movl -0x14(%rbp), %eax
cmpl 0xb0(%rcx), %eax
jb 0x1b77d
jmp 0x1b79c
leaq 0x4347d(%rip), %rdi     # 0x5ec01
leaq 0x42789(%rip), %rsi     # 0x5df14
movl $0x1ed, %edx            # imm = 0x1ED
leaq 0x4338a(%rip), %rcx     # 0x5eb21
callq 0xd1c0
movq -0x78(%rbp), %rcx
movl -0x18(%rbp), %eax
cmpl 0xb0(%rcx), %eax
jne 0x1b7b3
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
je 0x1b7d0
movq -0x78(%rbp), %rcx
movl -0x1c(%rbp), %eax
cmpl 0xb0(%rcx), %eax
jne 0x1b869
cmpl $-0x1, -0x14(%rbp)
jne 0x1b869
movq -0x78(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x1c670
movl %eax, -0x44(%rbp)
movb $0x1, %al
cmpl $0x3, -0x44(%rbp)
movb %al, -0x81(%rbp)
je 0x1b819
movb $0x1, %al
cmpl $0x4, -0x44(%rbp)
movb %al, -0x81(%rbp)
je 0x1b819
movq -0x78(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0x180b0
cmpl $0x0, %eax
sete %al
movb %al, -0x81(%rbp)
movb -0x81(%rbp), %al
testb $0x1, %al
jne 0x1b825
jmp 0x1b827
jmp 0x1b846
leaq 0x433ef(%rip), %rdi     # 0x5ec1d
leaq 0x426df(%rip), %rsi     # 0x5df14
movl $0x1f1, %edx            # imm = 0x1F1
leaq 0x432e0(%rip), %rcx     # 0x5eb21
callq 0xd1c0
cmpl $0x0, -0x44(%rbp)
jne 0x1b857
movl -0x3c(%rbp), %eax
movl %eax, -0x88(%rbp)
jmp 0x1b860
movl -0x44(%rbp), %eax
movl %eax, -0x88(%rbp)
movl -0x88(%rbp), %eax
movl %eax, -0x3c(%rbp)
jmp 0x1ba65
cmpl $-0x1, -0x14(%rbp)
je 0x1b887
movq -0x78(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x1c0e0
movl $0xffffffff, -0x14(%rbp) # imm = 0xFFFFFFFF
movq -0x78(%rbp), %rax
movq 0xb8(%rax), %rdi
callq 0x10310
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x58(%rbp)
movzwl -0x3e(%rbp), %eax
cmpl $0x6, %eax
je 0x1b8bd
movzwl -0x3e(%rbp), %eax
cmpl $0x9, %eax
jne 0x1b960
movq -0x50(%rbp), %rax
movq -0x58(%rbp), %rcx
movl 0x4(%rcx), %ecx
shrl %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movl (%rax,%rcx,4), %eax
movl %eax, -0x5c(%rbp)
movq -0x58(%rbp), %rax
movl (%rax), %eax
movzwl -0x3e(%rbp), %esi
xorl %ecx, %ecx
movl $0x1, %edx
cmpl $0x9, %esi
cmovel %edx, %ecx
xorl %ecx, %eax
movl %eax, -0x60(%rbp)
cmpl $0x1, -0x5c(%rbp)
ja 0x1b932
xorl %eax, %eax
cmpl $0x1, -0x60(%rbp)
movb %al, -0x89(%rbp)
jbe 0x1b912
cmpl $-0x2, -0x60(%rbp)
setbe %al
movb %al, -0x89(%rbp)
movb -0x89(%rbp), %al
testb $0x1, %al
jne 0x1b91e
jmp 0x1b932
movq -0x78(%rbp), %rdi
movl -0x60(%rbp), %esi
movl -0x5c(%rbp), %edx
callq 0x1c920
movl %eax, -0x3c(%rbp)
jmp 0x1b95b
movl -0x5c(%rbp), %eax
cmpl -0x60(%rbp), %eax
je 0x1b952
movq -0x78(%rbp), %rdi
movq -0x58(%rbp), %rax
movl 0x4(%rax), %esi
movl -0x60(%rbp), %edx
callq 0x1c920
movl %eax, -0x3c(%rbp)
jmp 0x1b959
movl $0x3, -0x3c(%rbp)
jmp 0x1b95b
jmp 0x1ba63
movzwl -0x3e(%rbp), %eax
cmpl $0x5, %eax
je 0x1b972
movzwl -0x3e(%rbp), %eax
cmpl $0xa, %eax
jne 0x1b99a
movq -0x78(%rbp), %rdi
movq -0x58(%rbp), %rax
movl (%rax), %esi
movzwl -0x3e(%rbp), %ecx
xorl %edx, %edx
movl $0x1, %eax
cmpl $0xa, %ecx
cmovel %eax, %edx
callq 0x1c920
movl %eax, -0x3c(%rbp)
jmp 0x1ba61
movzwl -0x3e(%rbp), %eax
cmpl $0x3, %eax
je 0x1b9ac
movzwl -0x3e(%rbp), %eax
cmpl $0xc, %eax
jne 0x1b9d5
movq -0x78(%rbp), %rdi
movq -0x58(%rbp), %rax
movl 0x4(%rax), %esi
movzwl -0x3e(%rbp), %ecx
xorl %edx, %edx
movl $0x1, %eax
cmpl $0xc, %ecx
cmovel %eax, %edx
callq 0x1c920
movl %eax, -0x3c(%rbp)
jmp 0x1ba5f
movzwl -0x3e(%rbp), %eax
cmpl $0x7, %eax
je 0x1b9f9
movzwl -0x3e(%rbp), %eax
cmpl $0xb, %eax
je 0x1b9f9
movzwl -0x3e(%rbp), %eax
cmpl $0xd, %eax
je 0x1b9f9
movzwl -0x3e(%rbp), %eax
cmpl $0xe, %eax
jne 0x1ba56
movq -0x78(%rbp), %rdi
movq -0x58(%rbp), %rax
movl (%rax), %esi
movzwl -0x3e(%rbp), %ecx
andl $0xa, %ecx
xorl %edx, %edx
movl $0x1, %eax
cmpl $0xa, %ecx
cmovel %eax, %edx
callq 0x1c920
movl %eax, -0x3c(%rbp)
cmpl $0x4, -0x3c(%rbp)
je 0x1ba54
movq -0x78(%rbp), %rdi
movq -0x58(%rbp), %rax
movl 0x4(%rax), %esi
movq -0x10(%rbp), %rax
movl (%rax), %eax
shrl $0x10, %eax
movzwl %ax, %ecx
andl $0xc, %ecx
xorl %edx, %edx
movl $0x1, %eax
cmpl $0xc, %ecx
cmovel %eax, %edx
callq 0x1c920
movl %eax, -0x3c(%rbp)
jmp 0x1ba5d
movl $0x4, -0x3c(%rbp)
jmp 0x1ba5f
jmp 0x1ba61
jmp 0x1ba63
jmp 0x1ba65
jmp 0x1baf0
movzwl -0x22(%rbp), %eax
cmpl $0x3, %eax
jne 0x1ba75
jmp 0x1baee
movzwl -0x22(%rbp), %eax
cmpl $0x4, %eax
jne 0x1bacd
movb $0x1, %al
cmpl $-0x1, -0x14(%rbp)
movb %al, -0x8a(%rbp)
je 0x1ba9e
movq -0x78(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x1c640
movb %al, -0x8a(%rbp)
movb -0x8a(%rbp), %al
testb $0x1, %al
jne 0x1baaa
jmp 0x1baac
jmp 0x1bacb
leaq 0x431de(%rip), %rdi     # 0x5ec91
leaq 0x4245a(%rip), %rsi     # 0x5df14
movl $0x221, %edx            # imm = 0x221
leaq 0x4305b(%rip), %rcx     # 0x5eb21
callq 0xd1c0
jmp 0x1baec
leaq 0x48393(%rip), %rdi     # 0x63e67
leaq 0x42439(%rip), %rsi     # 0x5df14
movl $0x223, %edx            # imm = 0x223
leaq 0x4303a(%rip), %rcx     # 0x5eb21
callq 0xd1c0
jmp 0x1baee
jmp 0x1baf0
cmpl $0x0, -0x3c(%rbp)
jne 0x1bb01
movl -0x20(%rbp), %eax
movl %eax, -0x90(%rbp)
jmp 0x1bb0a
movl -0x3c(%rbp), %eax
movl %eax, -0x90(%rbp)
movl -0x90(%rbp), %eax
movl %eax, -0x20(%rbp)
cmpl $0x0, -0x3c(%rbp)
jne 0x1bff6
cmpl $-0x1, -0x14(%rbp)
jne 0x1bff6
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x8000, %eax           # imm = 0x8000
cmpl $0x0, %eax
jne 0x1bb39
jmp 0x1bb58
leaq 0x41865(%rip), %rdi     # 0x5d3a5
leaq 0x423cd(%rip), %rsi     # 0x5df14
movl $0x22a, %edx            # imm = 0x22A
leaq 0x42fce(%rip), %rcx     # 0x5eb21
callq 0xd1c0
movb $0x1, %al
cmpl $-0x1, -0x1c(%rbp)
movb %al, -0x91(%rbp)
je 0x1bb8b
movq -0x78(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
movl -0x1c(%rbp), %ecx
movl 0xc(%rax,%rcx,4), %eax
andl $0x8000, %eax           # imm = 0x8000
cmpl $0x0, %eax
sete %al
xorb $-0x1, %al
movb %al, -0x91(%rbp)
movb -0x91(%rbp), %al
testb $0x1, %al
jne 0x1bb97
jmp 0x1bb99
jmp 0x1bbb8
leaq 0x43127(%rip), %rdi     # 0x5ecc7
leaq 0x4236d(%rip), %rsi     # 0x5df14
movl $0x22c, %edx            # imm = 0x22C
leaq 0x42f6e(%rip), %rcx     # 0x5eb21
callq 0xd1c0
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rdi
movq (%rdi), %rax
leaq -0x34(%rbp), %rsi
callq *0x8(%rax)
testb $0x1, %al
jne 0x1bdcf
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rsi
leaq -0x34(%rbp), %rdx
callq 0x15190
movl -0x34(%rbp), %eax
movl %eax, -0x14(%rbp)
cmpl $-0x1, -0x14(%rbp)
je 0x1bda1
movl -0x14(%rbp), %eax
cmpl -0x1c(%rbp), %eax
je 0x1bc01
jmp 0x1bc20
leaq 0x43129(%rip), %rdi     # 0x5ed31
leaq 0x42305(%rip), %rsi     # 0x5df14
movl $0x232, %edx            # imm = 0x232
leaq 0x42f06(%rip), %rcx     # 0x5eb21
callq 0xd1c0
movq -0x78(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
movl -0x14(%rbp), %ecx
shlq $0x2, %rcx
addq %rcx, %rax
addq $0xc, %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movl (%rax), %eax
shrl $0x10, %eax
movw %ax, -0x6a(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jae 0x1bc82
movzwl -0x6a(%rbp), %eax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
shrl $0x10, %ecx
movzwl %cx, %ecx
xorl $-0x1, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0x1bc71
jmp 0x1b288
movq -0x78(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x1c0e0
jmp 0x1bd9f
movq -0x78(%rbp), %rcx
movl -0x14(%rbp), %eax
cmpl 0xb0(%rcx), %eax
ja 0x1bce5
movzwl -0x6a(%rbp), %eax
xorl $-0x1, %eax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
shrl $0x10, %ecx
movzwl %cx, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0x1bcb0
jmp 0x1c0c6
movq -0x78(%rbp), %rcx
movl -0x14(%rbp), %eax
cmpl 0xb0(%rcx), %eax
je 0x1bcc1
jmp 0x1bce0
leaq 0x42edd(%rip), %rdi     # 0x5eba5
leaq 0x42245(%rip), %rsi     # 0x5df14
movl $0x248, %edx            # imm = 0x248
leaq 0x42e46(%rip), %rcx     # 0x5eb21
callq 0xd1c0
jmp 0x1b288
movq -0x10(%rbp), %rax
movl (%rax), %eax
shrl $0x10, %eax
movzwl %ax, %eax
movzwl -0x6a(%rbp), %ecx
xorl $-0x1, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0x1bd96
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rdi
movl -0x14(%rbp), %esi
callq 0x151f0
testb $0x1, %al
jne 0x1bd27
movq -0x68(%rbp), %rax
movl (%rax), %eax
andl $0x8000, %eax           # imm = 0x8000
cmpl $0x0, %eax
je 0x1bd47
movq -0x78(%rbp), %rdi
movzwl -0x6a(%rbp), %ecx
shll $0x10, %ecx
orl $0x0, %ecx
movq -0x10(%rbp), %rax
orl (%rax), %ecx
movl %ecx, (%rax)
movl -0x14(%rbp), %esi
callq 0x1c0e0
jmp 0x1bd94
movq -0x10(%rbp), %rax
movl (%rax), %eax
shrl $0x10, %eax
movzwl %ax, %ecx
shll $0x10, %ecx
orl $0x0, %ecx
movq -0x68(%rbp), %rax
orl (%rax), %ecx
movl %ecx, (%rax)
leaq 0x67628(%rip), %rdi     # 0x83390
callq 0x16210
cmpq $0x0, %rax
je 0x1bd8f
leaq 0x67616(%rip), %rdi     # 0x83390
callq 0x178d0
movq %rax, %rdi
movq -0x10(%rbp), %rsi
movl -0x14(%rbp), %edx
movq (%rdi), %rax
callq *0x58(%rax)
jmp 0x1c0c6
jmp 0x1bd9b
jmp 0x1c0c6
jmp 0x1bd9d
jmp 0x1bd9f
jmp 0x1bda1
movl -0x14(%rbp), %eax
cmpl -0x34(%rbp), %eax
jne 0x1bdab
jmp 0x1bdca
leaq 0x42f97(%rip), %rdi     # 0x5ed49
leaq 0x4215b(%rip), %rsi     # 0x5df14
movl $0x25f, %edx            # imm = 0x25F
leaq 0x42d5c(%rip), %rcx     # 0x5eb21
callq 0xd1c0
jmp 0x1be64
movl -0x34(%rbp), %eax
movl %eax, -0x14(%rbp)
cmpl $-0x1, -0x14(%rbp)
je 0x1be62
movq -0x78(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
movl -0x14(%rbp), %ecx
movl 0xc(%rax,%rcx,4), %eax
andl $0x8000, %eax           # imm = 0x8000
cmpl $0x0, %eax
jne 0x1be60
movq -0x78(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
movl -0x14(%rbp), %ecx
movl 0xc(%rax,%rcx,4), %eax
shrl $0x10, %eax
movzwl %ax, %eax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
shrl $0x10, %ecx
movzwl %cx, %ecx
xorl $-0x1, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0x1be5e
movq -0x78(%rbp), %rcx
movl -0x14(%rbp), %eax
cmpl 0xb0(%rcx), %eax
je 0x1be3a
jmp 0x1be59
leaq 0x42d64(%rip), %rdi     # 0x5eba5
leaq 0x420cc(%rip), %rsi     # 0x5df14
movl $0x266, %edx            # imm = 0x266
leaq 0x42ccd(%rip), %rcx     # 0x5eb21
callq 0xd1c0
jmp 0x1b288
jmp 0x1be60
jmp 0x1be62
jmp 0x1be64
cmpl $-0x1, -0x1c(%rbp)
je 0x1bfb1
cmpl $-0x1, -0x14(%rbp)
je 0x1bf2c
movq -0x78(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
movl -0x14(%rbp), %ecx
movl 0xc(%rax,%rcx,4), %eax
andl $0x8000, %eax           # imm = 0x8000
cmpl $0x0, %eax
jne 0x1bf2a
movq -0x78(%rbp), %rcx
movl -0x14(%rbp), %eax
cmpl 0xb0(%rcx), %eax
jbe 0x1bea9
jmp 0x1bec8
leaq 0x42ec4(%rip), %rdi     # 0x5ed74
leaq 0x4205d(%rip), %rsi     # 0x5df14
movl $0x271, %edx            # imm = 0x271
leaq 0x42c5e(%rip), %rcx     # 0x5eb21
callq 0xd1c0
movq -0x78(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
movl -0x14(%rbp), %ecx
movl 0xc(%rax,%rcx,4), %eax
shrl $0x10, %eax
movzwl %ax, %eax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
shrl $0x10, %ecx
movzwl %cx, %ecx
xorl $-0x1, %ecx
andl %ecx, %eax
cmpl $0x0, %eax
jne 0x1bef8
jmp 0x1bf17
leaq 0x42e90(%rip), %rdi     # 0x5ed8f
leaq 0x4200e(%rip), %rsi     # 0x5df14
movl $0x272, %edx            # imm = 0x272
leaq 0x42c0f(%rip), %rcx     # 0x5eb21
callq 0xd1c0
movq -0x78(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x1c0e0
movl $0xffffffff, -0x14(%rbp) # imm = 0xFFFFFFFF
jmp 0x1bf2c
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rdi
movl -0x1c(%rbp), %esi
leaq -0x34(%rbp), %rdx
callq 0x1c180
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x8000, %eax           # imm = 0x8000
cmpl $0x0, %eax
jne 0x1bf52
jmp 0x1bf71
leaq 0x4144c(%rip), %rdi     # 0x5d3a5
leaq 0x41fb4(%rip), %rsi     # 0x5df14
movl $0x279, %edx            # imm = 0x279
leaq 0x42bb5(%rip), %rcx     # 0x5eb21
callq 0xd1c0
movq -0x78(%rbp), %rax
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
andl $0x7fff, %ecx           # imm = 0x7FFF
addl $0x1, %ecx
movl %ecx, %ecx
shlq $0x2, %rcx
addq %rcx, %rsi
movq 0x18(%rax), %rax
movq (%rax), %rdx
movl -0x1c(%rbp), %eax
shlq $0x2, %rax
addq %rax, %rdx
addq $0xc, %rdx
callq 0x115c0
jmp 0x1bfc6
movq -0x78(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rsi
leaq -0x34(%rbp), %rdx
callq 0x17350
leaq 0x673c3(%rip), %rdi     # 0x83390
callq 0x16210
cmpq $0x0, %rax
je 0x1bff1
leaq 0x673b1(%rip), %rdi     # 0x83390
callq 0x178d0
movq %rax, %rdi
movq -0x10(%rbp), %rsi
movq (%rdi), %rax
callq *0x50(%rax)
jmp 0x1c0c6
cmpl $0x1, -0x3c(%rbp)
je 0x1c002
cmpl $0x2, -0x3c(%rbp)
jne 0x1c055
cmpl $-0x1, -0x14(%rbp)
je 0x1c01b
movq -0x78(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x1c0e0
movl $0xffffffff, -0x14(%rbp) # imm = 0xFFFFFFFF
leaq 0x6736e(%rip), %rdi     # 0x83390
callq 0x16210
cmpq $0x0, %rax
je 0x1c050
leaq 0x6735c(%rip), %rdi     # 0x83390
callq 0x178d0
movq %rax, %rdi
movq -0x10(%rbp), %rsi
movq (%rdi), %rax
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
callq *0x40(%rax)
jmp 0x1b288
cmpl $0x3, -0x3c(%rbp)
jne 0x1c06f
cmpl $-0x1, -0x14(%rbp)
je 0x1c06d
movq -0x78(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x1c0e0
jmp 0x1c0c6
jmp 0x1c0c6
movzwl -0x22(%rbp), %eax
cmpl $0x1, %eax
jne 0x1c0bf
movq -0x10(%rbp), %rax
movl (%rax), %eax
shrl $0x10, %eax
movw %ax, -0x6c(%rbp)
movzwl -0x6c(%rbp), %eax
cmpl $0x3, %eax
jne 0x1c099
movl $0x4, -0x20(%rbp)
jmp 0x1c0bd
movq -0x78(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %esi
movzwl -0x6c(%rbp), %ecx
xorl %edx, %edx
movl $0x1, %eax
cmpl $0x2, %ecx
cmovel %eax, %edx
callq 0x1c920
movl %eax, -0x20(%rbp)
jmp 0x1c0c6
movl $0x4, -0x20(%rbp)
movl -0x20(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)