// File: /workspace/github_cpp_makefile_star2_O1/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 0x2e878(%rip), %rsi     # 0x158920
leaq 0x2e879(%rip), %rdx     # 0x158928
movq %rsp, %rdi
callq 0x17586
movl %ebp, 0x64(%rsp)
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
movq %rbx, %rsi
callq 0x13b32
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 0x12a461
movslq %eax, %rcx
cmpq %rax, %rcx
jne 0x12a46d
movl (%r12), %ecx
cmpl $0x22, %ecx
je 0x12a46d
movq %rax, 0x70(%rsp)
testl %ecx, %ecx
jne 0x12a122
movl %ebp, (%r12)
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x12a13d
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xb2f0
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x12a153
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb2f0
movq %rsp, %rdi
movq %r14, (%rdi)
leaq 0x2e7c9(%rip), %rsi     # 0x158929
leaq 0x2e7c7(%rip), %rdx     # 0x15892e
callq 0x17586
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
movq %rbx, %rsi
callq 0x13b32
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 0x12a479
movabsq $-0x100000000, %r15     # imm = 0xFFFFFFFF00000000
leaq -0x80000000(%rax), %rcx
cmpq %r15, %rcx
jb 0x12a485
movl (%r12), %ecx
cmpl $0x22, %ecx
je 0x12a485
movq %rax, 0x68(%rsp)
testl %ecx, %ecx
jne 0x12a1dd
movl %r14d, (%r12)
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x12a1f9
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xb2f0
movq (%rsp), %rdi
leaq 0x10(%rsp), %r14
cmpq %r14, %rdi
je 0x12a214
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb2f0
movq %rsp, %rdi
movq %r14, (%rdi)
leaq 0x2e70e(%rip), %rsi     # 0x15892f
leaq 0x2e710(%rip), %rdx     # 0x158938
callq 0x17586
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
movq %rbx, %rsi
callq 0x13b32
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 0x12a491
leaq -0x80000000(%rax), %rcx
cmpq %r15, %rcx
jb 0x12a49d
movl (%r12), %ecx
cmpl $0x22, %ecx
je 0x12a49d
movq %rax, %rbp
testl %ecx, %ecx
leaq 0x10(%rsp), %r14
jne 0x12a296
movl %r13d, (%r12)
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x12a2b2
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xb2f0
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x12a2c8
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb2f0
cmpl $0x0, 0x70(%rsp)
jle 0x12a4a9
cmpl $0x0, 0x68(%rsp)
jle 0x12a4a9
movq %rsp, %rdi
movq %r14, (%rdi)
leaq 0x23009(%rip), %rsi     # 0x14d2f4
leaq 0x2300a(%rip), %rdx     # 0x14d2fc
callq 0x17586
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
movq %rbx, %rsi
callq 0x13b32
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x12a31d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb2f0
leaq 0x50(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x2305a(%rip), %rsi     # 0x14d387
leaq 0x23056(%rip), %rdx     # 0x14d38a
leaq 0x40(%rsp), %rdi
callq 0x17586
movq %rsp, %rdi
leaq 0x40(%rsp), %rdx
movq %rbx, %rsi
callq 0x13b32
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x12a365
movq 0x50(%rsp), %rsi
incq %rsi
callq 0xb2f0
leaq 0x88(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x23013(%rip), %rsi     # 0x14d38b
leaq 0x23011(%rip), %rdx     # 0x14d390
leaq 0x78(%rsp), %rdi
callq 0x17586
leaq 0x40(%rsp), %rdi
leaq 0x78(%rsp), %rdx
movq %rbx, %rsi
callq 0x13b32
movq 0x78(%rsp), %rdi
cmpq %r15, %rdi
je 0x12a3b5
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 0x138132
movq %r12, %rdi
movl 0x64(%rsp), %esi
callq 0x12a878
movq %rbx, %rdi
movq %r12, %rsi
movq 0x70(%rsp), %rdx
movq 0x68(%rsp), %rcx
callq 0x12a8f2
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x12a415
movq 0x50(%rsp), %rsi
incq %rsi
callq 0xb2f0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x12a430
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb2f0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x12a44c
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 0x24467(%rip), %rdi     # 0x14e8cf
callq 0xb1f0
leaq 0x2445b(%rip), %rdi     # 0x14e8cf
callq 0xb3d0
leaq 0x2444f(%rip), %rdi     # 0x14e8cf
callq 0xb1f0
leaq 0x24443(%rip), %rdi     # 0x14e8cf
callq 0xb3d0
leaq 0x24437(%rip), %rdi     # 0x14e8cf
callq 0xb1f0
leaq 0x2442b(%rip), %rdi     # 0x14e8cf
callq 0xb3d0
leaq 0x32d64(%rip), %rdi     # 0x15d214
leaq 0x32c6f(%rip), %rsi     # 0x15d126
leaq 0x32d70(%rip), %rcx     # 0x15d22e
movl $0x36, %edx
callq 0xb200
movq %rax, %rbx
movl $0x3dc8, %esi           # imm = 0x3DC8
movq %r12, %rdi
callq 0xb2f0
jmp 0x12a541
movq %rax, %rbx
movq 0x78(%rsp), %rdi
cmpq %r15, %rdi
je 0x12a558
movq 0x88(%rsp), %rsi
jmp 0x12a550
movq %rax, %rbx
jmp 0x12a558
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x12a573
movq 0x50(%rsp), %rsi
jmp 0x12a56b
movq %rax, %rbx
jmp 0x12a573
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
jne 0x12a5ea
jmp 0x12a5f7
jmp 0x12a536
jmp 0x12a52e
jmp 0x12a536
jmp 0x12a52e
jmp 0x12a536
movq %rax, %rbx
jmp 0x12a5dc
movq %rax, %rbx
jmp 0x12a5f7
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0x12a558
movq 0x50(%rsp), %rsi
incq %rsi
callq 0xb2f0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x12a573
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb2f0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x12a5f7
movq 0x30(%rsp), %rsi
jmp 0x12a5ef
movq %rax, %rbx
cmpl $0x0, (%r12)
jne 0x12a5a7
movl %r13d, (%r12)
jmp 0x12a5a7
movq %rax, %rbx
cmpl $0x0, (%r12)
jne 0x12a5a7
movl %r14d, (%r12)
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
jmp 0x12a5ca
movq %rax, %rbx
cmpl $0x0, (%r12)
jne 0x12a5c1
movl %ebp, (%r12)
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x12a5dc
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xb2f0
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x12a5f7
movq 0x10(%rsp), %rsi
incq %rsi
callq 0xb2f0
movq %rbx, %rdi
callq 0xb510