// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %ecx, %r12d
movl %edx, %r8d
movq %rsi, %r14
movq %rdi, %r15
cmpl $-0x1, %ecx
je 0x15a7b
cmpl %r12d, 0xb0(%r15)
jb 0x16919
movq 0x10(%r15), %rax
movl 0x50(%rax), %eax
cmpl %r12d, %eax
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl %r12d, %ecx
cmoval %ebx, %ecx
cmpl $-0x1, %eax
cmovel %r12d, %ecx
movq %rcx, -0x60(%rbp)
leaq 0x4(%r14), %rax
movq %rax, -0x68(%rbp)
movl $0x0, -0x54(%rbp)
movl %r12d, -0x2c(%rbp)
movq %r15, -0x50(%rbp)
incq 0xc8(%r15)
movl (%r14), %eax
movl %eax, %r13d
andl $0x7fff, %r13d          # imm = 0x7FFF
cmpl $0x2, %r13d
jb 0x15ae9
movl 0xb0(%r15), %eax
cmpl %eax, %r8d
jae 0x15b2a
movq 0x18(%r15), %rcx
movq (%rcx), %rcx
movl %r8d, %edx
movzwl 0xe(%rcx,%rdx,4), %ecx
jmp 0x15b2c
movl $0x4, -0x54(%rbp)
movb $0x1, %bl
cmpl $0x1, %r13d
jne 0x1671c
shrl $0x10, %eax
cmpl $0x3, %eax
je 0x1671c
movl 0x4(%r14), %esi
xorl %edx, %edx
cmpl $0x2, %eax
sete %dl
movq %r15, %rdi
movq %r8, %r13
callq 0x17036
movq %r13, %r8
movl %eax, -0x54(%rbp)
jmp 0x1671c
xorl %ecx, %ecx
movl $0xffffffff, -0x3c(%rbp) # imm = 0xFFFFFFFF
cmpl $-0x1, %r8d
jne 0x15c8c
movl %ecx, -0x30(%rbp)
movq 0x10(%r15), %rdx
movl 0x5c(%rdx), %ecx
movl %ecx, -0x3c(%rbp)
movl $0xffffffff, -0x40(%rbp) # imm = 0xFFFFFFFF
leal -0x1(%r13), %ecx
movl 0x4(%r14,%rcx,4), %esi
shrl %esi
decl %esi
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpl 0x38(%rdx), %esi
jae 0x15b71
movq 0x30(%rdx), %rcx
movl %esi, %edi
movl (%rcx,%rdi,4), %ecx
cmpl $-0x1, %ecx
je 0x15c51
movq 0x8(%rdx), %rdx
movl %ecx, %esi
leaq 0x4976d(%rip), %rdi     # 0x5f2f4
incl (%rdi)
movzwl 0xc(%rdx,%rsi,4), %edi
andl $0x7fff, %edi           # imm = 0x7FFF
movzwl (%r14), %r8d
movw $0x7fff, %r9w           # imm = 0x7FFF
andw %r9w, %r8w
je 0x15bdf
testw %di, %di
je 0x15bdf
leaq (%rdx,%rsi,4), %r9
addq $0xc, %r9
movzwl %r8w, %r10d
movzwl %di, %r11d
movl (%r9,%r11,4), %r11d
cmpl %r11d, (%r14,%r10,4)
jne 0x15bf4
leal -0x1(%r8), %r10d
leal -0x1(%rdi), %r11d
cmpw $0x1, %di
je 0x15be5
movl %r11d, %edi
cmpw $0x1, %r8w
movl %r10d, %r8d
jne 0x15bb0
jmp 0x15be5
movl %r8d, %r10d
movl %edi, %r11d
xorl %edi, %edi
cmpw %r11w, %r10w
setne %dil
cmovbl %ebx, %edi
jmp 0x15bfe
movl $0x0, %edi
sbbl %edi, %edi
orl $0x1, %edi
leaq (%rdx,%rsi,4), %rsi
testl %edi, %edi
jle 0x15c1d
movl 0x4(%rsi), %edi
movb $0x1, %sil
cmpl $-0x1, %edi
jne 0x15c30
movl $0x2, -0x38(%rbp)
movl %ecx, -0x34(%rbp)
jmp 0x15c2c
js 0x15c3d
movl $0x3, -0x38(%rbp)
movl %ecx, -0x34(%rbp)
movl %ecx, -0x40(%rbp)
xorl %esi, %esi
movl %ecx, %edi
movl %edi, %ecx
testb %sil, %sil
jne 0x15b7e
jmp 0x15c5b
movl 0x8(%rsi), %edi
movb $0x1, %sil
cmpl $-0x1, %edi
jne 0x15c30
movl $0x1, -0x38(%rbp)
jmp 0x15c18
movl $0x0, -0x38(%rbp)
movl %esi, -0x34(%rbp)
movl -0x40(%rbp), %r8d
leaq 0x49686(%rip), %rcx     # 0x5f2ec
cmpl $-0x1, %r8d
jne 0x15c73
leaq 0x4967d(%rip), %rcx     # 0x5f2f0
incl (%rcx)
cmpl %eax, %r8d
jae 0x15c89
movq 0x18(%r15), %rcx
movq (%rcx), %rcx
movzwl 0xe(%rcx,%r8,4), %ecx
jmp 0x15c8c
movl -0x30(%rbp), %ecx
cmpl $-0x1, %r8d
je 0x15dad
cmpl %r12d, %eax
jne 0x15ca4
cmpl %r12d, %r8d
je 0x15f03
movq 0x18(%r15), %rax
movq (%rax), %rax
movl %r8d, %r12d
movl 0xc(%rax,%r12,4), %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
jbe 0x167c4
movl %eax, %edx
andl $0xffff0000, %edx       # imm = 0xFFFF0000
orl (%r14), %edx
movl %edx, (%r14)
xorl %eax, %edx
movl $0x3, %r15d
cmpl $0x10000, %edx          # imm = 0x10000
jb 0x15db8
movl %edx, -0x44(%rbp)
movl %ecx, -0x30(%rbp)
movq 0x49623(%rip), %rdi     # 0x5f310
testq %rdi, %rdi
je 0x15d04
movq (%rdi), %rax
movq %r14, %rsi
movl %r8d, %edx
movq %r8, %rbx
callq *0x58(%rax)
movq %rbx, %r8
movq -0x50(%rbp), %rbx
movq 0x10(%rbx), %rax
movl 0x50(%rax), %ecx
cmpl $-0x1, %ecx
je 0x15dc1
cmpl %r8d, %ecx
jbe 0x15dc1
movq 0x495e8(%rip), %rdi     # 0x5f310
testq %rdi, %rdi
je 0x15d4b
movq 0x18(%rbx), %rax
movq (%rax), %rax
testb $-0x80, 0xd(%rax,%r12,4)
jne 0x15d4b
movq (%rdi), %rax
movl %r8d, %esi
movq %r8, %r15
callq *0x60(%rax)
movq %r15, %r8
movq 0x18(%rbx), %rax
movq (%rax), %rax
orl $0x8000, 0xc(%rax,%r12,4) # imm = 0x8000
movq 0x10(%rbx), %rax
cmpl $-0x1, -0x3c(%rbp)
je 0x15d75
cmpl $0x3, -0x38(%rbp)
jne 0x15d75
cmpl %r8d, -0x34(%rbp)
je 0x15ec5
cmpl %r8d, 0x10(%rax)
jbe 0x16938
movq 0x8(%rax), %rcx
movl (%rcx,%r12,4), %edx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
cmpq %rsi, %rdx
je 0x15e80
cmpl %r8d, 0x8(%rcx,%rdx,4)
je 0x15eb0
leaq (%rcx,%rdx,4), %rcx
addq $0x4, %rcx
jmp 0x15eab
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
jmp 0x15f03
movl -0x2c(%rbp), %r12d
jmp 0x15ef7
movq 0x18(%rbx), %rcx
movq (%rcx), %rcx
movl 0xc(%rcx,%r12,4), %edx
movl 0xb0(%rbx), %esi
testw %dx, %dx
js 0x15e00
cmpl $-0x1, -0x60(%rbp)
je 0x160e8
cmpl %esi, %r8d
jbe 0x160e8
movq 0x4951e(%rip), %rdi     # 0x5f310
testq %rdi, %rdi
jne 0x15d3c
jmp 0x15d4b
cmpl %esi, %r8d
je 0x16957
jb 0x15d5f
xorl %r15d, %r15d
cmpl %esi, %r8d
movl -0x44(%rbp), %edx
jbe 0x16156
movl (%r14), %eax
testw %ax, %ax
js 0x169d3
movl %eax, 0xc(%rcx,%r12,4)
movq 0x494da(%rip), %rdi     # 0x5f310
testq %rdi, %rdi
je 0x15e55
movq (%rdi), %rax
movq %r14, %rsi
movl %r8d, %edx
movl $0x1, %ecx
movq %r8, %rbx
callq *0x40(%rax)
movl -0x44(%rbp), %edx
movq %rbx, %r8
movq 0x494b4(%rip), %rdi     # 0x5f310
testq %rdi, %rdi
movl -0x2c(%rbp), %r12d
je 0x1615a
movq (%rdi), %rax
movq %r14, %rsi
movq %r8, %rbx
callq *0x50(%rax)
movl -0x44(%rbp), %edx
movq %rbx, %r8
jmp 0x1615a
leaq (%rcx,%r12,4), %rcx
movl 0xc(%rcx), %edx
movl $0x7fff, %esi           # imm = 0x7FFF
andl %esi, %edx
decl %edx
movl 0x10(%rcx,%rdx,4), %ecx
shrl %ecx
decl %ecx
cmpl 0x38(%rax), %ecx
jae 0x16995
movl %ecx, %ecx
shlq $0x2, %rcx
addq 0x30(%rax), %rcx
cmpl %r8d, (%rcx)
jne 0x15ec5
movl 0x5c(%rax), %eax
movl %eax, -0x3c(%rbp)
movl $0x3, -0x38(%rbp)
movl %r8d, -0x34(%rbp)
movl %r8d, -0x40(%rbp)
movq 0x49444(%rip), %rdi     # 0x5f310
xorl %r15d, %r15d
testq %rdi, %rdi
je 0x15ee7
movq (%rdi), %rax
movq %r14, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
callq *0x40(%rax)
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
movl -0x2c(%rbp), %r12d
movl -0x30(%rbp), %ecx
movl -0x44(%rbp), %edx
cmpl $0x10000, %edx          # imm = 0x10000
jb 0x16711
movl (%r14), %ebx
movl %ebx, %r15d
shrl $0x10, %r15d
movzwl %cx, %eax
movl %eax, %ecx
notl %ecx
testl %ecx, %r15d
je 0x16767
movl %r15d, %ecx
notl %ecx
testl %eax, %ecx
jne 0x16786
xorl %r12d, %r12d
cmpl $0x4, %r13d
je 0x15fc1
cmpl $0x3, %r13d
je 0x161d0
cmpl $0x2, %r13d
jne 0x167e3
cmpl $0x8, %r15d
ja 0x16017
movl $0x116, %eax            # imm = 0x116
btl %r15d, %eax
jae 0x16017
movq -0x50(%rbp), %r15
movl 0xb0(%r15), %eax
cmpl %eax, %r8d
jb 0x16821
movl %eax, %ecx
movl -0x2c(%rbp), %esi
xorl %esi, %ecx
movl %r8d, %edx
xorl %esi, %edx
orl %ecx, %edx
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
je 0x15fa0
cmpl $-0x1, %r8d
jne 0x161d9
cmpl %eax, -0x60(%rbp)
jne 0x161d9
movq %r8, %r13
movq %r15, %rdi
movq %r14, %rsi
callq 0x16db4
movl %eax, %r12d
addl $-0x3, %eax
cmpl $0x2, %eax
jae 0x15ff9
movq %r13, %r8
jmp 0x161d9
cmpl $-0x1, %r8d
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
je 0x15fea
movq -0x50(%rbp), %r15
movq 0x18(%r15), %rax
movq (%rax), %rax
movl %r8d, %ecx
testb $-0x80, 0xd(%rax,%rcx,4)
je 0x161d9
jmp 0x1685f
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
movq -0x50(%rbp), %r15
jmp 0x161d9
movq %r15, %rdi
movq %r14, %rsi
movq %r14, %rdx
callq 0x141ac
testl %eax, %eax
movq %r13, %r8
je 0x161d9
jmp 0x168bc
cmpl $-0x1, %r8d
je 0x1605c
movq 0x492ec(%rip), %rdi     # 0x5f310
movl %r8d, %r12d
testq %rdi, %rdi
je 0x16048
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
testb $-0x80, 0xd(%rax,%r12,4)
jne 0x16048
movq (%rdi), %rax
movl %r8d, %esi
callq *0x60(%rax)
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
orl $0x8000, 0xc(%rax,%r12,4) # imm = 0x8000
cmpl $0x9, %r15d
je 0x1606c
cmpl $0x6, %r15d
jne 0x16126
xorl %edx, %edx
cmpl $0x9, %r15d
sete %dl
movq -0x50(%rbp), %r15
movq 0xb8(%r15), %rax
movq (%rax), %rax
movl 0x4(%r14), %ecx
movl 0x8(%r14), %esi
movl %esi, %edi
shrl %edi
decl %edi
movl (%rax,%rdi,4), %eax
xorl %ecx, %edx
cmpl $0x1, %eax
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
ja 0x160be
cmpl $0x2, %ecx
jb 0x160be
cmpl $-0x1, %edx
je 0x160be
movq %r15, %rdi
movl %edx, %esi
movl %eax, %edx
callq 0x17036
movl %eax, %r12d
jmp 0x161c8
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
movl $0x3, %r12d
cmpl %edx, %eax
je 0x161d9
movq %r15, %rdi
callq 0x17036
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
movl %eax, %r12d
jmp 0x161d9
movzwl 0x2(%r14), %eax
shll $0x10, %eax
orl %edx, %eax
movl %eax, 0xc(%rcx,%r12,4)
movq 0x49212(%rip), %rdi     # 0x5f310
xorl %r15d, %r15d
testq %rdi, %rdi
je 0x15eed
movq (%rdi), %rax
movq %r14, %rsi
movl %r8d, %edx
movl $0x1, %ecx
movq %r8, %rbx
callq *0x40(%rax)
movq %rbx, %r8
jmp 0x15eed
cmpl $0xa, %r15d
je 0x16132
cmpl $0x5, %r15d
jne 0x16162
xorl %edx, %edx
cmpl $0xa, %r15d
sete %dl
movl 0x4(%r14), %esi
movq -0x50(%rbp), %r15
movq %r15, %rdi
callq 0x17036
movl %eax, %r12d
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
jmp 0x161d4
movl -0x2c(%rbp), %r12d
movl -0x30(%rbp), %ecx
jmp 0x15ef7
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
movl $0x4, %r12d
cmpl $0xe, %r15d
ja 0x161d0
movl $0x6880, %eax           # imm = 0x6880
btl %r15d, %eax
jae 0x1672b
movl 0x4(%r14), %esi
notl %ebx
xorl %edx, %edx
testl $0xa0000, %ebx          # imm = 0xA0000
sete %dl
movq -0x50(%rbp), %r15
movq %r15, %rdi
callq 0x17036
cmpl $0x4, %eax
je 0x161c3
movl (%r14), %eax
movl 0x8(%r14), %esi
notl %eax
xorl %edx, %edx
testl $0xc0000, %eax          # imm = 0xC0000
sete %dl
movq %r15, %rdi
callq 0x17036
movl %eax, %r12d
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
jmp 0x161d9
movq -0x50(%rbp), %r15
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testl %r12d, %r12d
movl -0x54(%rbp), %eax
cmovnel %r12d, %eax
movl %eax, -0x54(%rbp)
jne 0x16267
cmpl $-0x1, %r8d
jne 0x16267
testb $-0x80, 0x1(%r14)
jne 0x167a5
movq -0x60(%rbp), %rcx
cmpl $-0x1, %ecx
je 0x16214
movq 0x18(%r15), %rax
movq (%rax), %rax
testb $-0x80, 0xd(%rax,%rcx,4)
je 0x16802
movq 0x10(%r15), %rdi
movq (%rdi), %rax
leaq -0x40(%rbp), %rsi
callq *0x8(%rax)
testb %al, %al
je 0x1634f
movl -0x40(%rbp), %r8d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, %r8
je 0x16468
movq 0x18(%r15), %rax
movq (%rax), %rax
movl 0xc(%rax,%r8,4), %eax
testw %ax, %ax
js 0x1625f
movl (%r14), %ecx
notl %ecx
andl %ecx, %eax
cmpl $0x10000, %eax          # imm = 0x10000
jae 0x1656c
movl %r8d, %r12d
jmp 0x16608
leal -0x1(%r12), %eax
cmpl $0x1, %eax
ja 0x162e9
cmpl $-0x1, %r8d
movl -0x2c(%rbp), %r12d
je 0x162b9
movq 0x4908e(%rip), %rdi     # 0x5f310
testq %rdi, %rdi
je 0x162a7
movq 0x18(%r15), %rax
movq (%rax), %rax
movl %r8d, %ecx
testb $-0x80, 0xd(%rax,%rcx,4)
jne 0x162a7
movq (%rdi), %rax
movl %r8d, %esi
movq %r8, %rbx
callq *0x60(%rax)
movq %rbx, %r8
movq 0x18(%r15), %rax
movq (%rax), %rax
movl %r8d, %ecx
orl $0x8000, 0xc(%rax,%rcx,4) # imm = 0x8000
movq 0x49050(%rip), %rdi     # 0x5f310
movl $0x2, %r15d
testq %rdi, %rdi
je 0x162de
movq (%rdi), %rax
movq %r14, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x1, %ecx
callq *0x40(%rax)
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
jmp 0x16711
movl $0x3, %r15d
cmpl $0x3, %r12d
jne 0x16696
cmpl $-0x1, %r8d
movl -0x2c(%rbp), %r12d
je 0x16711
movq 0x49002(%rip), %rdi     # 0x5f310
movl %r8d, %ebx
testq %rdi, %rdi
je 0x16337
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
testb $-0x80, 0xd(%rax,%rbx,4)
jne 0x16337
movq (%rdi), %rax
movl %r8d, %esi
movq %r8, %r13
callq *0x60(%rax)
movq %r13, %r8
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
orl $0x8000, 0xc(%rax,%rbx,4) # imm = 0x8000
jmp 0x16711
movq 0x10(%r15), %rax
movl 0x5c(%rax), %ecx
movl %ecx, -0x3c(%rbp)
movl $0xffffffff, -0x40(%rbp) # imm = 0xFFFFFFFF
movl (%r14), %ecx
movl $0x7fff, %edx           # imm = 0x7FFF
andl %edx, %ecx
decl %ecx
movl 0x4(%r14,%rcx,4), %edx
shrl %edx
decl %edx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpl 0x38(%rax), %edx
jae 0x16388
movq 0x30(%rax), %rcx
movl %edx, %esi
movl (%rcx,%rsi,4), %ecx
cmpl $-0x1, %ecx
je 0x16473
movq 0x8(%rax), %rdx
movl %ecx, %esi
leaq 0x48f56(%rip), %rdi     # 0x5f2f4
incl (%rdi)
movzwl 0xc(%rdx,%rsi,4), %edi
andl $0x7fff, %edi           # imm = 0x7FFF
movzwl (%r14), %r8d
movw $0x7fff, %r9w           # imm = 0x7FFF
andw %r9w, %r8w
je 0x163f6
testw %di, %di
je 0x163f6
leaq (%rdx,%rsi,4), %r9
addq $0xc, %r9
movzwl %r8w, %r10d
movzwl %di, %r11d
movl (%r9,%r11,4), %r11d
cmpl %r11d, (%r14,%r10,4)
jne 0x1640b
leal -0x1(%r8), %r10d
leal -0x1(%rdi), %r11d
cmpw $0x1, %di
je 0x163fc
movl %r11d, %edi
cmpw $0x1, %r8w
movl %r10d, %r8d
jne 0x163c7
jmp 0x163fc
movl %r8d, %r10d
movl %edi, %r11d
xorl %edi, %edi
cmpw %r11w, %r10w
setne %dil
cmovbl %ebx, %edi
jmp 0x16415
movl $0x0, %edi
sbbl %edi, %edi
orl $0x1, %edi
leaq (%rdx,%rsi,4), %rsi
testl %edi, %edi
jle 0x16434
movl 0x4(%rsi), %edi
movb $0x1, %sil
cmpl $-0x1, %edi
jne 0x16447
movl $0x2, -0x38(%rbp)
movl %ecx, -0x34(%rbp)
jmp 0x16443
js 0x16454
movl $0x3, -0x38(%rbp)
movl %ecx, -0x34(%rbp)
movl %ecx, -0x40(%rbp)
xorl %esi, %esi
movl %ecx, %edi
movl %edi, %ecx
testb %sil, %sil
jne 0x16395
jmp 0x1647d
movl 0x8(%rsi), %edi
movb $0x1, %sil
cmpl $-0x1, %edi
jne 0x16447
movl $0x1, -0x38(%rbp)
jmp 0x1642f
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
jmp 0x16608
movl $0x0, -0x38(%rbp)
movl %edx, -0x34(%rbp)
movl -0x40(%rbp), %r12d
leaq 0x48e64(%rip), %rcx     # 0x5f2ec
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
cmpq %rdx, %r12
jne 0x16499
leaq 0x48e57(%rip), %rcx     # 0x5f2f0
incl (%rcx)
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rcx, %r12
je 0x165fa
movq -0x60(%rbp), %rsi
cmpl %esi, %r12d
je 0x1689d
movq -0x50(%rbp), %rbx
movq 0x18(%rbx), %rcx
movq (%rcx), %rdx
movl 0xc(%rdx,%r12,4), %ecx
movl %ecx, %edi
shrl $0x10, %edi
cmpl %r12d, %esi
jae 0x16505
movzwl 0x2(%r14), %eax
notl %eax
testl %eax, %edi
jne 0x1659f
movq 0x48e2a(%rip), %rdi     # 0x5f310
testq %rdi, %rdi
je 0x164fc
andl $0x8000, %ecx           # imm = 0x8000
jne 0x164fc
movq (%rdi), %rax
movl %r12d, %esi
callq *0x60(%rax)
movq 0x18(%rbx), %rax
jmp 0x165e1
movl 0xb0(%rbx), %esi
cmpl %esi, %r12d
jbe 0x1658b
movl (%r14), %esi
movl %esi, %r8d
shrl $0x10, %r8d
notl %edi
movl $0x3, %r15d
testl %edi, %r8d
je 0x165a5
movl 0x50(%rax), %eax
cmpl $-0x1, %eax
setne %dil
cmpl %r12d, %eax
seta %al
testb %al, %dil
jne 0x165b1
movl %ecx, %eax
andl $0x8000, %eax           # imm = 0x8000
jne 0x165b1
andl $0xffff0000, %esi       # imm = 0xFFFF0000
orl %ecx, %esi
movl %esi, 0xc(%rdx,%r12,4)
movq 0x48db7(%rip), %rdi     # 0x5f310
testq %rdi, %rdi
je 0x165a5
movq (%rdi), %rax
movq %r14, %rsi
movl %r12d, %edx
callq *0x58(%rax)
jmp 0x165a5
movq %r15, %rax
movl $0x2, %r15d
cmpl 0xb0(%rax), %r8d
movl -0x2c(%rbp), %r12d
jne 0x16711
jmp 0x16976
notl %edi
movzwl 0x2(%r14), %eax
testl %edi, %eax
je 0x165a9
cmpl %esi, %r12d
je 0x169b4
movl $0x2, %r15d
xorl %eax, %eax
jmp 0x165f2
movl $0x3, %r15d
jmp 0x165a5
andl $0xffff0000, %ecx       # imm = 0xFFFF0000
orl %ecx, %esi
movl %esi, (%r14)
movq 0x48d4d(%rip), %rdi     # 0x5f310
testq %rdi, %rdi
je 0x165d9
testb $-0x80, 0xd(%rdx,%r12,4)
jne 0x165d9
movq (%rdi), %rax
movl %r12d, %esi
callq *0x60(%rax)
movq -0x50(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax), %rax
orl $0x8000, 0xc(%rax,%r12,4) # imm = 0x8000
xorl %r15d, %r15d
movb $0x1, %al
testb %al, %al
je 0x16693
cmpl -0x40(%rbp), %r12d
movq -0x50(%rbp), %r15
jne 0x1687e
cmpl $-0x1, -0x60(%rbp)
je 0x16672
cmpl $-0x1, %r12d
je 0x1668b
movq 0x18(%r15), %rax
movq (%rax), %rax
movl %r12d, %ebx
movl 0xc(%rax,%rbx,4), %eax
testw %ax, %ax
js 0x1669c
cmpl 0xb0(%r15), %r12d
jbe 0x168db
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
movl (%r14), %ecx
notl %ecx
andl %ecx, %eax
cmpl $0x10000, %eax          # imm = 0x10000
jae 0x168fa
movq 0x48cbd(%rip), %rdi     # 0x5f310
testq %rdi, %rdi
je 0x16661
movq (%rdi), %rax
movl %r12d, %esi
callq *0x60(%rax)
movq 0x18(%r15), %rax
movq (%rax), %rax
orl $0x8000, 0xc(%rax,%rbx,4) # imm = 0x8000
jmp 0x1669f
movq 0x10(%r15), %rdi
movq %r14, %rsi
leaq -0x40(%rbp), %rdx
callq 0x13840
movl %r12d, %r8d
movl -0x2c(%rbp), %r12d
jmp 0x166f0
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
jmp 0x1669f
movl %r12d, %r8d
movl -0x2c(%rbp), %r12d
jmp 0x16711
movl %r12d, %r13d
movq 0x10(%r15), %rdi
movq -0x60(%rbp), %rsi
leaq -0x40(%rbp), %rdx
callq 0x169f2
movl (%r14), %eax
testw %ax, %ax
movl -0x2c(%rbp), %r12d
js 0x16840
andl $0x7fff, %eax           # imm = 0x7FFF
movq -0x68(%rbp), %rcx
leaq (%rcx,%rax,4), %rdx
subq %r14, %rdx
je 0x166ed
movq 0x18(%r15), %rax
movq (%rax), %rax
movq -0x60(%rbp), %rcx
leaq (%rax,%rcx,4), %rdi
addq $0xc, %rdi
movq %r14, %rsi
callq 0xc450
movq %r13, %r8
movq 0x48c19(%rip), %rdi     # 0x5f310
movl $0x3, %r15d
testq %rdi, %rdi
je 0x16711
movq (%rdi), %rax
movq %r14, %rsi
movq %r8, %rbx
callq *0x50(%rax)
movq %rbx, %r8
cmpl $0x3, %r15d
sete %bl
movq -0x50(%rbp), %r15
testb %bl, %bl
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
je 0x15ab2
jmp 0x16755
movl $0x1008, %eax           # imm = 0x1008
btl %r15d, %eax
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
jae 0x15ff0
xorl %edx, %edx
cmpl $0xc, %r15d
sete %dl
movl 0x8(%r14), %esi
movq -0x50(%rbp), %r15
jmp 0x160d2
movl -0x54(%rbp), %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2e337(%rip), %rdi     # 0x44aa5
leaq 0x2d683(%rip), %rsi     # 0x43df8
leaq 0x2e289(%rip), %rcx     # 0x44a05
movl $0x1e3, %edx            # imm = 0x1E3
callq 0xc180
leaq 0x2e338(%rip), %rdi     # 0x44ac5
leaq 0x2d664(%rip), %rsi     # 0x43df8
leaq 0x2e26a(%rip), %rcx     # 0x44a05
movl $0x1e5, %edx            # imm = 0x1E5
callq 0xc180
leaq 0x2cc09(%rip), %rdi     # 0x433b5
leaq 0x2d645(%rip), %rsi     # 0x43df8
leaq 0x2e24b(%rip), %rcx     # 0x44a05
movl $0x22a, %edx            # imm = 0x22A
callq 0xc180
leaq 0x2e2b1(%rip), %rdi     # 0x44a7c
leaq 0x2d626(%rip), %rsi     # 0x43df8
leaq 0x2e22c(%rip), %rcx     # 0x44a05
movl $0x1b4, %edx            # imm = 0x1B4
callq 0xc180
leaq 0x334a8(%rip), %rdi     # 0x49c92
leaq 0x2d607(%rip), %rsi     # 0x43df8
leaq 0x2e20d(%rip), %rcx     # 0x44a05
movl $0x223, %edx            # imm = 0x223
callq 0xc180
leaq 0x2e3a2(%rip), %rdi     # 0x44bab
leaq 0x2d5e8(%rip), %rsi     # 0x43df8
leaq 0x2e1ee(%rip), %rcx     # 0x44a05
movl $0x22c, %edx            # imm = 0x22C
callq 0xc180
leaq 0x2e2bd(%rip), %rdi     # 0x44ae5
leaq 0x2d5c9(%rip), %rsi     # 0x43df8
leaq 0x2e1cf(%rip), %rcx     # 0x44a05
movl $0x1ed, %edx            # imm = 0x1ED
callq 0xc180
leaq 0x2cb6e(%rip), %rdi     # 0x433b5
leaq 0x2d5aa(%rip), %rsi     # 0x43df8
leaq 0x2e1b0(%rip), %rcx     # 0x44a05
movl $0x279, %edx            # imm = 0x279
callq 0xc180
leaq 0x2e30f(%rip), %rdi     # 0x44b75
leaq 0x2d58b(%rip), %rsi     # 0x43df8
leaq 0x2e191(%rip), %rcx     # 0x44a05
movl $0x221, %edx            # imm = 0x221
callq 0xc180
leaq 0x2e3a8(%rip), %rdi     # 0x44c2d
leaq 0x2d56c(%rip), %rsi     # 0x43df8
leaq 0x2e172(%rip), %rcx     # 0x44a05
movl $0x25f, %edx            # imm = 0x25F
callq 0xc180
leaq 0x2e371(%rip), %rdi     # 0x44c15
leaq 0x2d54d(%rip), %rsi     # 0x43df8
leaq 0x2e153(%rip), %rcx     # 0x44a05
movl $0x232, %edx            # imm = 0x232
callq 0xc180
leaq 0x2e23e(%rip), %rdi     # 0x44b01
leaq 0x2d52e(%rip), %rsi     # 0x43df8
leaq 0x2e134(%rip), %rcx     # 0x44a05
movl $0x1f1, %edx            # imm = 0x1F1
callq 0xc180
leaq 0x2e376(%rip), %rdi     # 0x44c58
leaq 0x2d50f(%rip), %rsi     # 0x43df8
leaq 0x2e115(%rip), %rcx     # 0x44a05
movl $0x271, %edx            # imm = 0x271
callq 0xc180
leaq 0x2e372(%rip), %rdi     # 0x44c73
leaq 0x2d4f0(%rip), %rsi     # 0x43df8
leaq 0x2e0f6(%rip), %rcx     # 0x44a05
movl $0x272, %edx            # imm = 0x272
callq 0xc180
leaq 0x2e09c(%rip), %rdi     # 0x449bc
leaq 0x2d4d1(%rip), %rsi     # 0x43df8
leaq 0x2e0d7(%rip), %rcx     # 0x44a05
movl $0x18b, %edx            # imm = 0x18B
callq 0xc180
leaq 0x2d00d(%rip), %rdi     # 0x4394c
leaq 0x2cdf7(%rip), %rsi     # 0x4373d
leaq 0x2e39c(%rip), %rcx     # 0x44ce9
movl $0x1ea, %edx            # imm = 0x1EA
callq 0xc180
leaq 0x2e12b(%rip), %rdi     # 0x44a89
leaq 0x2d493(%rip), %rsi     # 0x43df8
leaq 0x2e099(%rip), %rcx     # 0x44a05
movl $0x1c0, %edx            # imm = 0x1C0
callq 0xc180
leaq 0x2e10c(%rip), %rdi     # 0x44a89
leaq 0x2d474(%rip), %rsi     # 0x43df8
leaq 0x2e07a(%rip), %rcx     # 0x44a05
movl $0x266, %edx            # imm = 0x266
callq 0xc180
leaq 0x2d395(%rip), %rdi     # 0x43d31
leaq 0x2cd9a(%rip), %rsi     # 0x4373d
leaq 0x2e33f(%rip), %rcx     # 0x44ce9
movl $0x1f3, %edx            # imm = 0x1F3
callq 0xc180
leaq 0x2e0ce(%rip), %rdi     # 0x44a89
leaq 0x2d436(%rip), %rsi     # 0x43df8
leaq 0x2e03c(%rip), %rcx     # 0x44a05
movl $0x248, %edx            # imm = 0x248
callq 0xc180
leaq 0x2c9db(%rip), %rdi     # 0x433b5
leaq 0x2d417(%rip), %rsi     # 0x43df8
leaq 0x2e01d(%rip), %rcx     # 0x44a05
movl $0x1c9, %edx            # imm = 0x1C9
callq 0xc180