// File: /workspace/github_cpp_makefile_star2_O2/sighingnow[P]compile-pascal/pl0_allocator.cpp
// Function: SimpleAllocator::store(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void SimpleAllocator::store(std::string name) {
    LOC loc;
    if (this->exist(name).length() == 0) { return; }
    // alloc space on runtime stack.
    if (this->env.find(name, true, loc) == false) {
        this->dist = this->dist - 4;
        env.push(LOC(name, dist));
        out.emit(string("    sub esp, 4\t\t;; store temporary variable ") + name + " on runtime stack.");
    }
    // store value from register to memory.
    for (auto && p: this->record) {
        if (p.second == name) {
            if (loc.name.length() == 0) {
                // temporary implicit variable.
                out.emit(string("    mov dword [esp], ") + p.first);
            }
            else {
                // non-temporary explicit variable.
                out.emit(string("    mov dword ") + this->addr(loc.name) + ", " + p.first);
            }
            this->release(p.first, true); break;
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1d8, %rsp            # imm = 0x1D8
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x190(%rsp), %rdi
callq 0x4f086
leaq 0x170(%rsp), %rdi
movq %r14, %rsi
callq 0x5340
leaq 0x28(%rsp), %rdi
leaq 0x170(%rsp), %rdx
movq %rbx, %rsi
callq 0x4f010
leaq 0x28(%rsp), %rdi
movq 0x8(%rdi), %r15
callq 0x5120
leaq 0x170(%rsp), %rdi
callq 0x5120
testq %r15, %r15
je 0x4e9f8
movq 0x8(%rbx), %rdi
pushq $0x1
popq %rdx
leaq 0x190(%rsp), %rcx
movq %r14, %rsi
callq 0x4f2e2
testb %al, %al
jne 0x4e852
movq 0x18(%rbx), %rax
addl $-0x4, (%rax)
movq 0x8(%rbx), %r15
leaq 0x150(%rsp), %rdi
movq %r14, %rsi
callq 0x5340
movq 0x18(%rbx), %rax
movl (%rax), %edx
leaq 0x28(%rsp), %rdi
leaq 0x150(%rsp), %rsi
xorl %ecx, %ecx
callq 0x4f3f0
leaq 0x28(%rsp), %rsi
movq %r15, %rdi
callq 0x5012e
leaq 0x28(%rsp), %rdi
callq 0x4f1b6
leaq 0x150(%rsp), %rdi
callq 0x5120
movq 0x10(%rbx), %r15
leaq 0xc593(%rip), %rsi      # 0x5ad7a
leaq 0x8(%rsp), %rdi
leaq 0x70(%rsp), %rdx
callq 0xfa26
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movq %r14, %rdx
callq 0xfda4
leaq 0xc598(%rip), %rdx      # 0x5ada7
leaq 0x130(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0xfd14
leaq 0x130(%rsp), %rsi
movq %r15, %rdi
callq 0x4f2cc
leaq 0x130(%rsp), %rdi
callq 0x5120
leaq 0x28(%rsp), %rdi
callq 0x5120
leaq 0x8(%rsp), %rdi
callq 0x5120
movq 0x108(%rbx), %r15
leaq 0xf8(%rbx), %r12
cmpq %r12, %r15
je 0x4e9f8
leaq 0x40(%r15), %rdi
movq %r14, %rsi
callq 0xfb78
testb %al, %al
jne 0x4e886
movq %r15, %rdi
callq 0x51a0
movq %rax, %r15
jmp 0x4e860
addq $0x20, %r15
cmpq $0x0, 0x198(%rsp)
movq 0x10(%rbx), %r14
je 0x4e975
leaq 0xc52c(%rip), %rsi      # 0x5add0
leaq 0x70(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0xfa26
leaq 0xb0(%rsp), %rdi
leaq 0x190(%rsp), %rsi
callq 0x5340
movq (%rbx), %rax
leaq 0xd0(%rsp), %rdi
leaq 0xb0(%rsp), %rdx
movq %rbx, %rsi
callq *0x48(%rax)
leaq 0x8(%rsp), %rdi
leaq 0x70(%rsp), %rsi
leaq 0xd0(%rsp), %rdx
callq 0xfd33
leaq 0xc4ce(%rip), %rdx      # 0x5adcd
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xfd14
leaq 0xf0(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movq %r15, %rdx
callq 0xfda4
leaq 0xf0(%rsp), %rsi
movq %r14, %rdi
callq 0x4f2cc
leaq 0xf0(%rsp), %rdi
callq 0x5120
leaq 0x28(%rsp), %rdi
callq 0x5120
leaq 0x8(%rsp), %rdi
callq 0x5120
leaq 0xd0(%rsp), %rdi
callq 0x5120
leaq 0xb0(%rsp), %rdi
callq 0x5120
leaq 0x70(%rsp), %rdi
jmp 0x4e9c2
leaq 0xc43e(%rip), %rsi      # 0x5adba
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
callq 0xfa26
leaq 0x110(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movq %r15, %rdx
callq 0xfda4
leaq 0x110(%rsp), %rsi
movq %r14, %rdi
callq 0x4f2cc
leaq 0x110(%rsp), %rdi
callq 0x5120
leaq 0x28(%rsp), %rdi
callq 0x5120
leaq 0x90(%rsp), %rdi
movq %r15, %rsi
callq 0x5340
movq (%rbx), %rax
leaq 0x90(%rsp), %rsi
pushq $0x1
popq %rdx
movq %rbx, %rdi
callq *0x10(%rax)
leaq 0x90(%rsp), %rdi
callq 0x5120
leaq 0x190(%rsp), %rdi
callq 0x4f1b6
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x110(%rsp), %rdi
callq 0x5120
jmp 0x4ea29
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
jmp 0x4eaff
jmp 0x4eb06
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x5120
jmp 0x4ea4d
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x5120
jmp 0x4ea5c
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5120
jmp 0x4ea6b
movq %rax, %rbx
leaq 0xd0(%rsp), %rdi
callq 0x5120
jmp 0x4ea7d
movq %rax, %rbx
leaq 0xb0(%rsp), %rdi
callq 0x5120
leaq 0x70(%rsp), %rdi
jmp 0x4eaff
movq %rax, %rbx
jmp 0x4ea8a
jmp 0x4eb06
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
jmp 0x4eaff
jmp 0x4eb06
movq %rax, %rbx
leaq 0x130(%rsp), %rdi
callq 0x5120
jmp 0x4eabc
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x5120
jmp 0x4eacb
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
jmp 0x4eaff
jmp 0x4eb06
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x4f1b6
jmp 0x4eae6
movq %rax, %rbx
leaq 0x150(%rsp), %rdi
jmp 0x4eaff
jmp 0x4eb06
jmp 0x4eb06
movq %rax, %rbx
leaq 0x170(%rsp), %rdi
callq 0x5120
jmp 0x4eb09
movq %rax, %rbx
leaq 0x190(%rsp), %rdi
callq 0x4f1b6
movq %rbx, %rdi
callq 0x53f0