// File: /workspace/github_cpp_makefile_star2_O3/vsklad[P]cgen/commands.cpp
// Function: variables_define(bal::Formula&, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, CGenVariableInfo, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, CGenVariableInfo>>>&)
void variables_define(bal::Formula& formula, CGenVariablesMap& variables_map) {
    for (auto it = variables_map.begin(); it != variables_map.end(); it++ ) {
        if (is_binary_variable_name(it->first)) {
            if (it->second.mode == vmRandom && it->second.data.size() == 0) {
                variable_define_random(it->second, variable_get_template(formula, it->first.c_str()));
            };
        } else {
            auto vn_it = formula.get_named_variables().find(it->first);
            if (vn_it == formula.get_named_variables().end() || it->second.replace_existing) {
                if (it->second.mode != vmValue) {
                    throw std::invalid_argument(std::string("\"") + it->first + std::string("\" ") +
                                                std::string(ERROR_VARIABLE_DEFINITION_MODE));
                };
                if (it->second.except_count > 0 || it->second.except_range_size > 0) {
                    throw std::invalid_argument(std::string("\"") + it->first + std::string("\" ") +
                                                std::string(ERROR_VARIABLE_DEFINITION_EXCEPT));
                };
                formula.add_named_variable(it->first.c_str(), it->second.data);
            } else if (it->second.mode == vmRandom && it->second.data.size() == 0) {
                variable_define_random(it->second, vn_it->second);
            };
        };
    };
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rsi, %rbx
movq 0x18(%rsi), %r15
addq $0x8, %rbx
cmpq %rbx, %r15
je 0x1edce
movq %rdi, %r14
leaq 0x20(%r15), %r13
cmpq $0x0, 0x28(%r15)
je 0x1ed41
movq (%r13), %rdx
movsbl (%rdx), %eax
addl $-0x30, %eax
cmpl $0x9, %eax
ja 0x1ed41
cmpl $0x1, 0x40(%r15)
jne 0x1ed98
cmpl $0x0, 0x60(%r15)
jne 0x1ed98
leaq 0x40(%r15), %r12
leaq -0x48(%rbp), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x1eaef
movq %r12, %rdi
movq %r13, %rsi
callq 0x1e9fa
cmpl $0x0, -0x30(%rbp)
je 0x1ed98
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0x1ed98
callq 0xb350
jmp 0x1ed98
movq %r14, %rdi
callq 0x3af56
movq %rax, %rdi
movq %r13, %rsi
callq 0x2c4d0
movq %rax, %r12
movq %r14, %rdi
callq 0x3af56
addq $0x8, %rax
cmpq %rax, %r12
je 0x1ed6f
cmpb $0x1, 0x78(%r15)
jne 0x1edae
cmpl $0x0, 0x40(%r15)
jne 0x1eec5
cmpl $0x0, 0x48(%r15)
jne 0x1ede0
cmpl $0x0, 0x50(%r15)
jne 0x1ede0
movq 0x20(%r15), %rsi
leaq 0x58(%r15), %rdx
movq %r14, %rdi
callq 0x3af60
movq %r15, %rdi
callq 0xb1b0
movq %rax, %r15
cmpq %rbx, %rax
jne 0x1ecdd
jmp 0x1edce
cmpl $0x1, 0x40(%r15)
jne 0x1ed98
cmpl $0x0, 0x60(%r15)
jne 0x1ed98
leaq 0x40(%r15), %rdi
addq $0x40, %r12
movq %r12, %rsi
callq 0x1e9fa
jmp 0x1ed98
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0xb130
movq %rax, %r14
leaq -0x78(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x2bbe0(%rip), %rsi     # 0x4a9dc
leaq 0x2bbda(%rip), %rdx     # 0x4a9dd
leaq -0x88(%rbp), %rdi
callq 0x1dab2
leaq -0xc8(%rbp), %rdi
leaq -0x88(%rbp), %rsi
movq %r13, %rdx
callq 0x217a6
leaq -0x98(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x27622(%rip), %rsi     # 0x4645a
leaq 0x2761d(%rip), %rdx     # 0x4645c
leaq -0xa8(%rbp), %rdi
callq 0x1dab2
leaq -0xe8(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
leaq -0xa8(%rbp), %rdx
callq 0x216f4
leaq -0x58(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x276f0(%rip), %rsi     # 0x46564
leaq 0x27724(%rip), %rdx     # 0x4659f
leaq -0x68(%rbp), %rdi
callq 0x1dab2
leaq -0x48(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
leaq -0x68(%rbp), %rdx
callq 0x216f4
movb $0x1, %r13b
leaq -0x48(%rbp), %rsi
movq %r14, %rdi
callq 0xb4d0
xorl %r13d, %r13d
movq 0x3d127(%rip), %rsi     # 0x5bfd8
movq 0x3d108(%rip), %rdx     # 0x5bfc0
movq %r14, %rdi
callq 0xb4b0
jmp 0x1efa5
movl $0x10, %edi
callq 0xb130
movq %rax, %r14
leaq -0x78(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x2bafb(%rip), %rsi     # 0x4a9dc
leaq 0x2baf5(%rip), %rdx     # 0x4a9dd
leaq -0x88(%rbp), %rdi
callq 0x1dab2
leaq -0xc8(%rbp), %rdi
leaq -0x88(%rbp), %rsi
movq %r13, %rdx
callq 0x217a6
leaq -0x98(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x2753d(%rip), %rsi     # 0x4645a
leaq 0x27538(%rip), %rdx     # 0x4645c
leaq -0xa8(%rbp), %rdi
callq 0x1dab2
leaq -0xe8(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
leaq -0xa8(%rbp), %rdx
callq 0x216f4
leaq -0x58(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x275c6(%rip), %rsi     # 0x4651f
leaq 0x27603(%rip), %rdx     # 0x46563
leaq -0x68(%rbp), %rdi
callq 0x1dab2
leaq -0x48(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
leaq -0x68(%rbp), %rdx
callq 0x216f4
movb $0x1, %r13b
leaq -0x48(%rbp), %rsi
movq %r14, %rdi
callq 0xb4d0
xorl %r13d, %r13d
movq 0x3d042(%rip), %rsi     # 0x5bfd8
movq 0x3d023(%rip), %rdx     # 0x5bfc0
movq %r14, %rdi
callq 0xb4b0
jmp 0x1efa9
jmp 0x1efc0
movq %rax, %rbx
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1efc6
callq 0xb280
jmp 0x1efc6
movq %rax, %rbx
movb $0x1, %r13b
movq -0x68(%rbp), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x1efe2
callq 0xb280
jmp 0x1efe2
jmp 0x1efdc
movq %rax, %rbx
movb $0x1, %r13b
leaq -0xd8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1f01e
callq 0xb280
jmp 0x1f01e
jmp 0x1f018
movq %rax, %rbx
cmpl $0x0, -0x30(%rbp)
je 0x1f08b
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0x1f08b
callq 0xb350
jmp 0x1f08b
movq %rax, %rbx
movb $0x1, %r13b
movq -0xa8(%rbp), %rdi
cmpq %r12, %rdi
je 0x1f039
callq 0xb280
jmp 0x1f039
jmp 0x1f033
movq %rax, %rbx
movb $0x1, %r13b
leaq -0xb8(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1f04e
callq 0xb280
movq -0x88(%rbp), %rdi
cmpq %r15, %rdi
je 0x1f05f
callq 0xb280
testb %r13b, %r13b
jne 0x1f083
jmp 0x1f08b
jmp 0x1f068
movq %rax, %rbx
movq -0x88(%rbp), %rdi
cmpq %r15, %rdi
je 0x1f083
callq 0xb280
jmp 0x1f083
jmp 0x1f080
movq %rax, %rbx
movq %r14, %rdi
callq 0xb1e0
movq %rbx, %rdi
callq 0xb4e0