// File: /workspace/github_cpp_makefile_star2_O3/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 0x21ac5
cmpl %r13d, 0x18(%r14)
je 0x21ac1
movq (%r14), %rdi
testq %rdi, %rdi
je 0x21a7a
testl %r13d, %r13d
je 0x21ab3
leaq (,%r13,4), %rsi
callq 0xb470
testq %rax, %rax
jne 0x21aba
leaq 0x1f815(%rip), %rdi     # 0x41277
leaq 0x1dd3a(%rip), %rsi     # 0x3f7a3
leaq 0x1dd4b(%rip), %rcx     # 0x3f7bb
movl $0x33, %edx
callq 0xb180
testl %r13d, %r13d
je 0x21abd
leaq (,%r13,4), %rdi
callq 0xb380
movq %rax, (%r14)
testq %rax, %rax
jne 0x21abd
leaq 0x1dd76(%rip), %rdi     # 0x3f811
leaq 0x1dd01(%rip), %rsi     # 0x3f7a3
leaq 0x1dd12(%rip), %rcx     # 0x3f7bb
movl $0x38, %edx
callq 0xb180
callq 0xb350
xorl %eax, %eax
movq %rax, (%r14)
movl %r13d, 0x18(%r14)
movl %r13d, 0x8(%r14)
movl 0x1c(%r12), %eax
movl %eax, 0x1c(%r14)
testl %r15d, %r15d
je 0x21b5f
testl %r13d, %r13d
je 0x21bb4
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 0x21b27
movl %edi, %r8d
shrl %r8d
decl %r8d
cmpl 0x8(%rbx), %r8d
jae 0x21bc3
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 0x21b35
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 0x21af2
jmp 0x21bb4
cmpl %r13d, 0x8(%r12)
jne 0x21c01
testl %r13d, %r13d
je 0x21bb4
movq (%r14), %rax
leaq (%rax,%r13,4), %rcx
movq (%r12), %rdx
movq (%rbx), %rsi
movl (%rdx), %edi
leal 0x1(%rdi), %r8d
cmpl $0x3, %r8d
jb 0x21ba5
movl %edi, %r8d
shrl %r8d
decl %r8d
cmpl 0x8(%rbx), %r8d
jae 0x21be2
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 0x21b7d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x24f99(%rip), %rdi     # 0x46b63
leaq 0x1db5b(%rip), %rsi     # 0x3f72c
leaq 0x24fc5(%rip), %rcx     # 0x46b9d
movl $0xe2, %edx
callq 0xb180
leaq 0x1dd35(%rip), %rdi     # 0x3f91e
leaq 0x1db3c(%rip), %rsi     # 0x3f72c
leaq 0x1dcc8(%rip), %rcx     # 0x3f8bf
movl $0xcb, %edx
callq 0xb180
leaq 0x1dc1a(%rip), %rdi     # 0x3f822
leaq 0x1db1d(%rip), %rsi     # 0x3f72c
leaq 0x1dca9(%rip), %rcx     # 0x3f8bf
movl $0xc5, %edx
callq 0xb180