// File: vsklad[P]cgen/commands.cpp
// Function: get_formula_named_variable(bal::Formula const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
const bal::VariablesArray* const get_formula_named_variable(const bal::Formula& formula, const std::string& name) {
    auto vn_it = formula.get_named_variables().find(name);
    if (vn_it == formula.get_named_variables().end()) {
        throw std::invalid_argument(std::string("\"") + name + std::string("\" ") +
                                    std::string(ERROR_UNKNOWN_VARIABLE_NAME));
    };
    
    return &(vn_it->second);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0x54e00
movq %rax, %rdi
movq -0x10(%rbp), %rsi
callq 0x2ddb0
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x54e00
movq %rax, %rdi
callq 0x2de10
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x2dde0
testb $0x1, %al
jne 0x2a087
jmp 0x2a2b5
movb $0x1, -0x102(%rbp)
movl $0x10, %edi
callq 0xd150
movq %rax, -0x118(%rbp)
leaq -0xa1(%rbp), %rdi
movq %rdi, -0x110(%rbp)
callq 0xd5b0
movq -0x110(%rbp), %rdx
leaq 0x3d016(%rip), %rsi     # 0x670d6
leaq -0xa0(%rbp), %rdi
callq 0xd440
jmp 0x2a0ce
movq -0x10(%rbp), %rdx
leaq -0x80(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x2de40
jmp 0x2a0e4
leaq -0xd9(%rbp), %rdi
movq %rdi, -0x120(%rbp)
callq 0xd5b0
movq -0x120(%rbp), %rdx
leaq 0x38341(%rip), %rsi     # 0x62446
leaq -0xd8(%rbp), %rdi
callq 0xd440
jmp 0x2a113
leaq -0x60(%rbp), %rdi
leaq -0x80(%rbp), %rsi
leaq -0xd8(%rbp), %rdx
callq 0x28080
jmp 0x2a129
leaq -0x101(%rbp), %rdi
movq %rdi, -0x128(%rbp)
callq 0xd5b0
movq -0x128(%rbp), %rdx
leaq 0x382ff(%rip), %rsi     # 0x62449
leaq -0x100(%rbp), %rdi
callq 0xd440
jmp 0x2a158
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rsi
leaq -0x100(%rbp), %rdx
callq 0x28080
jmp 0x2a16e
movq -0x118(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0xd590
jmp 0x2a180
movq -0x118(%rbp), %rdi
movb $0x0, -0x102(%rbp)
movq 0x58e43(%rip), %rsi     # 0x82fd8
movq 0x58e24(%rip), %rdx     # 0x82fc0
callq 0xd570
jmp 0x2a2d7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x2a290
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x2a284
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x2a26f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x2a263
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x2a24e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x2a242
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x40(%rbp), %rdi
callq 0xd1b0
leaq -0x100(%rbp), %rdi
callq 0xd1b0
leaq -0x101(%rbp), %rdi
callq 0xd370
leaq -0x60(%rbp), %rdi
callq 0xd1b0
leaq -0xd8(%rbp), %rdi
callq 0xd1b0
leaq -0xd9(%rbp), %rdi
callq 0xd370
leaq -0x80(%rbp), %rdi
callq 0xd1b0
leaq -0xa0(%rbp), %rdi
callq 0xd1b0
leaq -0xa1(%rbp), %rdi
callq 0xd370
testb $0x1, -0x102(%rbp)
jne 0x2a2a7
jmp 0x2a2b3
movq -0x118(%rbp), %rdi
callq 0xd210
jmp 0x2a2cb
leaq -0x18(%rbp), %rdi
callq 0x2de90
addq $0x20, %rax
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
movq -0xb0(%rbp), %rdi
callq 0xd5a0
nopw (%rax,%rax)