// File: 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 %rbp
movq %rsp, %rbp
subq $0x320, %rsp            # imm = 0x320
movq %rsi, -0x2d0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x2d8(%rbp)
leaq -0x58(%rbp), %rdi
callq 0xda9d0
movq -0x2d0(%rbp), %rsi
leaq -0x98(%rbp), %rdi
callq 0x5150
jmp 0xd9893
movq -0x2d8(%rbp), %rsi
leaq -0x78(%rbp), %rdi
leaq -0x98(%rbp), %rdx
callq 0xda8d0
jmp 0xd98ac
leaq -0x78(%rbp), %rdi
callq 0x54e0
movq %rax, -0x2e0(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x5200
leaq -0x98(%rbp), %rdi
callq 0x5200
movq -0x2e0(%rbp), %rax
cmpq $0x0, %rax
jne 0xd9927
movl $0x1, -0xa8(%rbp)
jmp 0xd9fa5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
jmp 0xd9fb7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x5200
jmp 0xd9fb7
movq -0x2d0(%rbp), %rsi
movq -0x2d8(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x1, %edx
leaq -0x58(%rbp), %rcx
callq 0xdaf80
movb %al, -0x2e1(%rbp)
jmp 0xd994f
movb -0x2e1(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0xd9b6f
movq -0x2d0(%rbp), %rsi
movq -0x2d8(%rbp), %rax
movq 0x18(%rax), %rcx
movl (%rcx), %edx
addl $-0x4, %edx
movl %edx, (%rcx)
movq 0x8(%rax), %rax
movq %rax, -0x2f0(%rbp)
leaq -0x110(%rbp), %rdi
callq 0x5150
jmp 0xd9995
movq -0x2d8(%rbp), %rax
movq 0x18(%rax), %rax
movl (%rax), %edx
leaq -0xf0(%rbp), %rdi
leaq -0x110(%rbp), %rsi
xorl %ecx, %ecx
callq 0xdb170
jmp 0xd99b9
movq -0x2f0(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0xdb140
jmp 0xd99ce
leaq -0xf0(%rbp), %rdi
callq 0xdac70
leaq -0x110(%rbp), %rdi
callq 0x5200
movq -0x2d8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x300(%rbp)
leaq -0x171(%rbp), %rdi
movq %rdi, -0x2f8(%rbp)
callq 0x55d0
movq -0x2f8(%rbp), %rdx
leaq 0x17a59(%rip), %rsi     # 0xf1472
leaq -0x170(%rbp), %rdi
callq 0x19840
jmp 0xd9a27
movq -0x2d0(%rbp), %rdx
leaq -0x150(%rbp), %rdi
leaq -0x170(%rbp), %rsi
callq 0x1a4d0
jmp 0xd9a43
leaq 0x17a55(%rip), %rdx     # 0xf149f
leaq -0x130(%rbp), %rdi
leaq -0x150(%rbp), %rsi
callq 0x1a380
jmp 0xd9a5f
movq -0x300(%rbp), %rdi
leaq -0x130(%rbp), %rsi
callq 0xdaf40
jmp 0xd9a74
leaq -0x130(%rbp), %rdi
callq 0x5200
leaq -0x150(%rbp), %rdi
callq 0x5200
leaq -0x170(%rbp), %rdi
callq 0x5200
leaq -0x171(%rbp), %rdi
callq 0x53c0
jmp 0xd9b6f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
jmp 0xd9adb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0xdac70
leaq -0x110(%rbp), %rdi
callq 0x5200
jmp 0xd9fb7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
jmp 0xd9b5e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
jmp 0xd9b52
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
jmp 0xd9b46
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
leaq -0x130(%rbp), %rdi
callq 0x5200
leaq -0x150(%rbp), %rdi
callq 0x5200
leaq -0x170(%rbp), %rdi
callq 0x5200
leaq -0x171(%rbp), %rdi
callq 0x53c0
jmp 0xd9fb7
movq -0x2d8(%rbp), %rax
addq $0xf0, %rax
movq %rax, -0x180(%rbp)
movq -0x180(%rbp), %rdi
callq 0xdacd0
movq %rax, -0x188(%rbp)
movq -0x180(%rbp), %rdi
callq 0xdad00
movq %rax, -0x190(%rbp)
leaq -0x188(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0xdad30
testb $0x1, %al
jne 0xd9bc5
jmp 0xd9f9b
leaq -0x188(%rbp), %rdi
callq 0xdad60
movq -0x2d0(%rbp), %rsi
movq %rax, -0x198(%rbp)
movq -0x198(%rbp), %rdi
addq $0x20, %rdi
callq 0x19db0
testb $0x1, %al
jne 0xd9bf8
jmp 0xd9f88
leaq -0x58(%rbp), %rdi
callq 0x54e0
cmpq $0x0, %rax
jne 0xd9d09
movq -0x2d8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x310(%rbp)
leaq -0x1d9(%rbp), %rdi
movq %rdi, -0x308(%rbp)
callq 0x55d0
movq -0x308(%rbp), %rdx
leaq 0x17874(%rip), %rsi     # 0xf14b2
leaq -0x1d8(%rbp), %rdi
callq 0x19840
jmp 0xd9c4c
movq -0x198(%rbp), %rdx
leaq -0x1b8(%rbp), %rdi
leaq -0x1d8(%rbp), %rsi
callq 0x1a4d0
jmp 0xd9c68
movq -0x310(%rbp), %rdi
leaq -0x1b8(%rbp), %rsi
callq 0xdaf40
jmp 0xd9c7d
leaq -0x1b8(%rbp), %rdi
callq 0x5200
leaq -0x1d8(%rbp), %rdi
callq 0x5200
leaq -0x1d9(%rbp), %rdi
callq 0x53c0
jmp 0xd9f27
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
jmp 0xd9cf8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
jmp 0xd9cec
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
leaq -0x1b8(%rbp), %rdi
callq 0x5200
leaq -0x1d8(%rbp), %rdi
callq 0x5200
leaq -0x1d9(%rbp), %rdi
callq 0x53c0
jmp 0xd9fb7
movq -0x2d8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x320(%rbp)
leaq -0x261(%rbp), %rdi
movq %rdi, -0x318(%rbp)
callq 0x55d0
movq -0x318(%rbp), %rdx
leaq 0x1778c(%rip), %rsi     # 0xf14c8
leaq -0x260(%rbp), %rdi
callq 0x19840
jmp 0xd9d4a
leaq -0x2a8(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x5150
jmp 0xd9d5c
movq -0x2d8(%rbp), %rsi
movq (%rsi), %rax
movq 0x48(%rax), %rax
leaq -0x288(%rbp), %rdi
leaq -0x2a8(%rbp), %rdx
callq *%rax
jmp 0xd9d7c
leaq -0x240(%rbp), %rdi
leaq -0x260(%rbp), %rsi
leaq -0x288(%rbp), %rdx
callq 0x1a3d0
jmp 0xd9d98
leaq 0x17726(%rip), %rdx     # 0xf14c5
leaq -0x220(%rbp), %rdi
leaq -0x240(%rbp), %rsi
callq 0x1a380
jmp 0xd9db4
movq -0x198(%rbp), %rdx
leaq -0x200(%rbp), %rdi
leaq -0x220(%rbp), %rsi
callq 0x1a4d0
jmp 0xd9dd0
movq -0x320(%rbp), %rdi
leaq -0x200(%rbp), %rsi
callq 0xdaf40
jmp 0xd9de5
leaq -0x200(%rbp), %rdi
callq 0x5200
leaq -0x220(%rbp), %rdi
callq 0x5200
leaq -0x240(%rbp), %rdi
callq 0x5200
leaq -0x288(%rbp), %rdi
callq 0x5200
leaq -0x2a8(%rbp), %rdi
callq 0x5200
leaq -0x260(%rbp), %rdi
callq 0x5200
leaq -0x261(%rbp), %rdi
callq 0x53c0
jmp 0xd9f27
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
jmp 0xd9f16
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
jmp 0xd9f0a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
jmp 0xd9efe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
jmp 0xd9ef2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
jmp 0xd9ee6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
jmp 0xd9eda
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
leaq -0x200(%rbp), %rdi
callq 0x5200
leaq -0x220(%rbp), %rdi
callq 0x5200
leaq -0x240(%rbp), %rdi
callq 0x5200
leaq -0x288(%rbp), %rdi
callq 0x5200
leaq -0x2a8(%rbp), %rdi
callq 0x5200
leaq -0x260(%rbp), %rdi
callq 0x5200
leaq -0x261(%rbp), %rdi
callq 0x53c0
jmp 0xd9fb7
movq -0x198(%rbp), %rsi
leaq -0x2c8(%rbp), %rdi
callq 0x5150
jmp 0xd9f3c
movq -0x2d8(%rbp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
leaq -0x2c8(%rbp), %rsi
movl $0x1, %edx
callq *%rax
jmp 0xd9f5a
leaq -0x2c8(%rbp), %rdi
callq 0x5200
jmp 0xd9f9b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
leaq -0x2c8(%rbp), %rdi
callq 0x5200
jmp 0xd9fb7
jmp 0xd9f8a
leaq -0x188(%rbp), %rdi
callq 0xdad80
jmp 0xd9ba9
movl $0x0, -0xa8(%rbp)
leaq -0x58(%rbp), %rdi
callq 0xdac70
addq $0x320, %rsp            # imm = 0x320
popq %rbp
retq
leaq -0x58(%rbp), %rdi
callq 0xdac70
movq -0xa0(%rbp), %rdi
callq 0x55b0
nopl (%rax)