// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]ramulator/src/MemoryFactory.cpp
// Function: ramulator::MemoryFactory<ramulator::SALP>::create(ramulator::Config const&, int)
MemoryBase *MemoryFactory<SALP>::create(const Config& configs, int cacheline) {
    int channels = stoi(configs["channels"], NULL, 0);
    int ranks = stoi(configs["ranks"], NULL, 0);
    int subarrays = stoi(configs["subarrays"], NULL, 0);
    validate(channels, ranks, configs);

    const string& std_name = configs["standard"];
    const string& org_name = configs["org"];
    const string& speed_name = configs["speed"];

    SALP *spec = new SALP(org_name, speed_name, std_name, subarrays);

    extend_channel_width(spec, cacheline);

    return (MemoryBase *)populate_memory(configs, spec, channels, ranks);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x2e9d8(%rip), %rsi     # 0x155960
leaq 0x2e9d9(%rip), %rdx     # 0x155968
movq %rsp, %rdi
callq 0x175a0
movl %ebp, 0x64(%rsp)
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
movq %rbx, %rsi
callq 0x13b46
movq 0x20(%rsp), %r15
callq 0xb050
movq %rax, %r12
movl (%rax), %ebp
movl $0x0, (%rax)
leaq 0x40(%rsp), %r13
movq %r15, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0xb3b0
cmpq %r15, (%r13)
je 0x127341
movslq %eax, %rcx
cmpq %rax, %rcx
jne 0x12734d
movl (%r12), %ecx
cmpl $0x22, %ecx
je 0x12734d
movq %rax, 0x70(%rsp)
testl %ecx, %ecx
jne 0x127002
movl %ebp, (%r12)
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x12701d
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xb2f0
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x127033
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb2f0
movq %rsp, %rdi
movq %r14, (%rdi)
leaq 0x2e929(%rip), %rsi     # 0x155969
leaq 0x2e927(%rip), %rdx     # 0x15596e
callq 0x175a0
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
movq %rbx, %rsi
callq 0x13b46
movq 0x20(%rsp), %r13
movl (%r12), %r14d
movl $0x0, (%r12)
leaq 0x40(%rsp), %rbp
movq %r13, %rdi
movq %rbp, %rsi
xorl %edx, %edx
callq 0xb3b0
cmpq %r13, (%rbp)
je 0x127359
movabsq $-0x100000000, %r15     # imm = 0xFFFFFFFF00000000
leaq -0x80000000(%rax), %rcx
cmpq %r15, %rcx
jb 0x127365
movl (%r12), %ecx
cmpl $0x22, %ecx
je 0x127365
movq %rax, 0x68(%rsp)
testl %ecx, %ecx
jne 0x1270bd
movl %r14d, (%r12)
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x1270d9
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xb2f0
movq (%rsp), %rdi
leaq 0x10(%rsp), %r14
cmpq %r14, %rdi
je 0x1270f4
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb2f0
movq %rsp, %rdi
movq %r14, (%rdi)
leaq 0x2e86e(%rip), %rsi     # 0x15596f
leaq 0x2e870(%rip), %rdx     # 0x155978
callq 0x175a0
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
movq %rbx, %rsi
callq 0x13b46
movq 0x20(%rsp), %rbp
movl (%r12), %r13d
movl $0x0, (%r12)
leaq 0x40(%rsp), %r14
movq %rbp, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0xb3b0
cmpq %rbp, (%r14)
je 0x127371
leaq -0x80000000(%rax), %rcx
cmpq %r15, %rcx
jb 0x12737d
movl (%r12), %ecx
cmpl $0x22, %ecx
je 0x12737d
movq %rax, %rbp
testl %ecx, %ecx
leaq 0x10(%rsp), %r14
jne 0x127176
movl %r13d, (%r12)
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x127192
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xb2f0
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x1271a8
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb2f0
cmpl $0x0, 0x70(%rsp)
jle 0x127389
cmpl $0x0, 0x68(%rsp)
jle 0x127389
movq %rsp, %rdi
movq %r14, (%rdi)
leaq 0x23169(%rip), %rsi     # 0x14a334
leaq 0x2316a(%rip), %rdx     # 0x14a33c
callq 0x175a0
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
movq %rbx, %rsi
callq 0x13b46
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x1271fd
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb2f0
leaq 0x50(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x231ba(%rip), %rsi     # 0x14a3c7
leaq 0x231b6(%rip), %rdx     # 0x14a3ca
leaq 0x40(%rsp), %rdi
callq 0x175a0
movq %rsp, %rdi
leaq 0x40(%rsp), %rdx
movq %rbx, %rsi
callq 0x13b46
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x127245
movq 0x50(%rsp), %rsi
incq %rsi
callq 0xb2f0
leaq 0x88(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x23173(%rip), %rsi     # 0x14a3cb
leaq 0x23171(%rip), %rdx     # 0x14a3d0
leaq 0x78(%rsp), %rdi
callq 0x175a0
leaq 0x40(%rsp), %rdi
leaq 0x78(%rsp), %rdx
movq %rbx, %rsi
callq 0x13b46
movq 0x78(%rsp), %rdi
cmpq %r15, %rdi
je 0x127295
movq 0x88(%rsp), %rsi
incq %rsi
callq 0xb2f0
movl $0x3dc8, %edi           # imm = 0x3DC8
callq 0xb2e0
movq %rax, %r12
movq %rsp, %rsi
leaq 0x40(%rsp), %rdx
leaq 0x20(%rsp), %rcx
movq %rax, %rdi
movl %ebp, %r8d
callq 0x134d86
movq %r12, %rdi
movl 0x64(%rsp), %esi
callq 0x127758
movq %rbx, %rdi
movq %r12, %rsi
movq 0x70(%rsp), %rdx
movq 0x68(%rsp), %rcx
callq 0x1277d2
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x1272f5
movq 0x50(%rsp), %rsi
incq %rsi
callq 0xb2f0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x127310
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb2f0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x12732c
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xb2f0
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x245c7(%rip), %rdi     # 0x14b90f
callq 0xb1f0
leaq 0x245bb(%rip), %rdi     # 0x14b90f
callq 0xb3d0
leaq 0x245af(%rip), %rdi     # 0x14b90f
callq 0xb1f0
leaq 0x245a3(%rip), %rdi     # 0x14b90f
callq 0xb3d0
leaq 0x24597(%rip), %rdi     # 0x14b90f
callq 0xb1f0
leaq 0x2458b(%rip), %rdi     # 0x14b90f
callq 0xb3d0
leaq 0x32ee4(%rip), %rdi     # 0x15a274
leaq 0x32def(%rip), %rsi     # 0x15a186
leaq 0x32ef0(%rip), %rcx     # 0x15a28e
movl $0x36, %edx
callq 0xb200
movq %rax, %rbx
movl $0x3dc8, %esi           # imm = 0x3DC8
movq %r12, %rdi
callq 0xb2f0
jmp 0x127421
movq %rax, %rbx
movq 0x78(%rsp), %rdi
cmpq %r15, %rdi
je 0x127438
movq 0x88(%rsp), %rsi
jmp 0x127430
movq %rax, %rbx
jmp 0x127438
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x127453
movq 0x50(%rsp), %rsi
jmp 0x12744b
movq %rax, %rbx
jmp 0x127453
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
jne 0x1274ca
jmp 0x1274d7
jmp 0x127416
jmp 0x12740e
jmp 0x127416
jmp 0x12740e
jmp 0x127416
movq %rax, %rbx
jmp 0x1274bc
movq %rax, %rbx
jmp 0x1274d7
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x127438
movq 0x50(%rsp), %rsi
incq %rsi
callq 0xb2f0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x127453
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb2f0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x1274d7
movq 0x30(%rsp), %rsi
jmp 0x1274cf
movq %rax, %rbx
cmpl $0x0, (%r12)
jne 0x127487
movl %r13d, (%r12)
jmp 0x127487
movq %rax, %rbx
cmpl $0x0, (%r12)
jne 0x127487
movl %r14d, (%r12)
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
jmp 0x1274aa
movq %rax, %rbx
cmpl $0x0, (%r12)
jne 0x1274a1
movl %ebp, (%r12)
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1274bc
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xb2f0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1274d7
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb2f0
movq %rbx, %rdi
callq 0xb510