// File: /workspace/github_cpp_makefile_star2_O1/vsklad[P]cgen/./bal/variables/variablesarray.hpp
// Function: bal::VariablesArray::assign_from_template(bal::VariablesArray const&, bal::VariablesArray const&, bal::VariablesArray::assign_from_template_mode_t)
inline void assign_from_template(const VariablesArray& values, const VariablesArray& template_,
                                         const assign_from_template_mode_t mode) {
            // resize to match
            resize(template_.size_);
            element_size_ = template_.element_size_;
            
            if (mode == aftmComplete) {
                values.assign_template_into(template_, *this);
            } else {
                for (auto i = 0; i < size_; i++) {
                    literalid_t value = LITERALID_UNASSIGNED;
                    if (literal_t__is_variable(template_.data_[i])) {
                        assert(literal_t__variable_id(template_.data_[i]) < values.size_);
                        value = literal_t__lookup(values.data_, template_.data_[i]);
                    } else {
                        value = template_.data_[i];
                    };
                    
                    if ((mode == aftmConstant && literal_t__is_constant(value)) ||
                        (mode == aftmDifference && value != template_.data_[i])) {
                        data_[i] = value;
                    } else {
                        data_[i] = LITERALID_UNASSIGNED;
                    };
                };
            };
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %r15d
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
movl 0x8(%rdx), %r13d
cmpl %r13d, 0x8(%rdi)
je 0x23139
cmpl %r13d, 0x18(%r14)
je 0x23135
movq (%r14), %rdi
testq %rdi, %rdi
je 0x230e4
testl %r13d, %r13d
je 0x2311d
leaq (,%r13,4), %rsi
callq 0xc470
testq %rax, %rax
je 0x2329a
movq %rax, (%r14)
jmp 0x23131
testl %r13d, %r13d
je 0x23129
leaq (,%r13,4), %rdi
callq 0xc380
movq %rax, (%r14)
testq %rax, %rax
jne 0x23129
leaq 0x1e720(%rip), %rdi     # 0x41825
leaq 0x1e6ab(%rip), %rsi     # 0x417b7
leaq 0x1e6bc(%rip), %rcx     # 0x417cf
movl $0x38, %edx
callq 0xc180
callq 0xc350
movq $0x0, (%r14)
movl $0x0, 0x8(%r14)
movl %r13d, 0x18(%r14)
movl %r13d, 0x8(%r14)
movl 0x1c(%r12), %eax
movl %eax, 0x1c(%r14)
testl %r15d, %r15d
je 0x231d5
cmpl $0x0, 0x8(%r14)
je 0x2322e
movq (%r12), %rax
movq (%rbx), %rcx
movq (%r14), %rdx
xorl %esi, %esi
movl $0xffffffff, %r10d      # imm = 0xFFFFFFFF
movl (%rax,%rsi,4), %edi
leal 0x1(%rdi), %r9d
movl %edi, %r8d
cmpl $0x3, %r9d
jb 0x2319d
movl %edi, %r8d
shrl %r8d
decl %r8d
cmpl 0x8(%rbx), %r8d
jae 0x2323d
movl %r8d, %r9d
movl %edi, %r8d
andl $0x1, %r8d
xorl (%rcx,%r9,4), %r8d
xorl $0x1, %r8d
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
cmpl %edi, %r8d
je 0x231ab
movl %r8d, %r9d
cmpl $0x2, %r15d
cmovnel %r10d, %r9d
cmpl $0x2, %r8d
cmovael %r9d, %r8d
cmpl $0x1, %r15d
cmovnel %r9d, %r8d
movl %r8d, (%rdx,%rsi,4)
incq %rsi
movl 0x8(%r14), %edi
cmpq %rdi, %rsi
jb 0x23168
jmp 0x2322e
movl 0x8(%r14), %ecx
cmpl %ecx, 0x8(%r12)
jne 0x2327b
testq %rcx, %rcx
je 0x2322e
movq (%r14), %rax
leaq (%rax,%rcx,4), %rcx
movq (%r12), %rdx
movq (%rbx), %rsi
movl (%rdx), %edi
leal 0x1(%rdi), %r8d
cmpl $0x3, %r8d
jb 0x2321f
movl %edi, %r8d
shrl %r8d
decl %r8d
cmpl 0x8(%rbx), %r8d
jae 0x2325c
movl %r8d, %r8d
andl $0x1, %edi
xorl (%rsi,%r8,4), %edi
xorl $0x1, %edi
movl %edi, (%rax)
addq $0x4, %rdx
addq $0x4, %rax
cmpq %rcx, %rax
jb 0x231f7
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2590f(%rip), %rdi     # 0x48b53
leaq 0x1e4e1(%rip), %rsi     # 0x4172c
leaq 0x2593b(%rip), %rcx     # 0x48b8d
movl $0xe2, %edx
callq 0xc180
leaq 0x1e6cf(%rip), %rdi     # 0x41932
leaq 0x1e4c2(%rip), %rsi     # 0x4172c
leaq 0x1e662(%rip), %rcx     # 0x418d3
movl $0xcb, %edx
callq 0xc180
leaq 0x1e5b4(%rip), %rdi     # 0x41836
leaq 0x1e4a3(%rip), %rsi     # 0x4172c
leaq 0x1e643(%rip), %rcx     # 0x418d3
movl $0xc5, %edx
callq 0xc180
leaq 0x1e502(%rip), %rdi     # 0x417a3
leaq 0x1e50f(%rip), %rsi     # 0x417b7
leaq 0x1e520(%rip), %rcx     # 0x417cf
movl $0x33, %edx
callq 0xc180