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

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

    WideIO2 *spec = new WideIO2(org_name, speed_name, channels);

    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 $0x78, %rsp
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x2edc1(%rip), %rsi     # 0x155960
leaq 0x2edc2(%rip), %rdx     # 0x155968
leaq 0x8(%rsp), %rdi
callq 0x175a0
movl %ebp, 0x54(%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq %rbx, %rsi
callq 0x13b46
movq 0x30(%rsp), %r15
callq 0xb050
movq %rax, %r12
movl (%rax), %ebp
movl $0x0, (%rax)
leaq 0x58(%rsp), %r13
movq %r15, %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0xb3b0
cmpq %r15, (%r13)
je 0x126e3a
movq %rax, %r14
movslq %r14d, %rax
cmpq %r14, %rax
jne 0x126e46
movl (%r12), %eax
cmpl $0x22, %eax
je 0x126e46
testl %eax, %eax
leaq 0x18(%rsp), %r15
jne 0x126c20
movl %ebp, (%r12)
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x126c3b
movq 0x40(%rsp), %rsi
incq %rsi
callq 0xb2f0
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x126c52
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb2f0
leaq 0x8(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x2ed08(%rip), %rsi     # 0x155969
leaq 0x2ed06(%rip), %rdx     # 0x15596e
callq 0x175a0
leaq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq %rbx, %rsi
callq 0x13b46
movq 0x30(%rsp), %r13
movl (%r12), %eax
movl %eax, 0x2c(%rsp)
movl $0x0, (%r12)
leaq 0x58(%rsp), %rbp
movq %r13, %rdi
movq %rbp, %rsi
xorl %edx, %edx
callq 0xb3b0
cmpq %r13, (%rbp)
je 0x126e52
movq %rax, %r15
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
leaq -0x80000000(%r15), %rcx
cmpq %rax, %rcx
leaq 0x40(%rsp), %rbp
jb 0x126e5e
movl (%r12), %eax
cmpl $0x22, %eax
je 0x126e5e
testl %eax, %eax
leaq 0x18(%rsp), %r13
jne 0x126cf0
movl 0x2c(%rsp), %eax
movl %eax, (%r12)
movq 0x30(%rsp), %rdi
cmpq %rbp, %rdi
je 0x126d07
movq 0x40(%rsp), %rsi
incq %rsi
callq 0xb2f0
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x126d1e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb2f0
movl %r14d, %edi
movl %r15d, %esi
callq 0x126b04
leaq 0x8(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x2368f(%rip), %rsi     # 0x14a3c7
leaq 0x2368b(%rip), %rdx     # 0x14a3ca
callq 0x175a0
leaq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq %rbx, %rsi
callq 0x13b46
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x126d6d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb2f0
leaq 0x68(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x2364d(%rip), %rsi     # 0x14a3cb
leaq 0x2364b(%rip), %rdx     # 0x14a3d0
leaq 0x58(%rsp), %rdi
callq 0x175a0
leaq 0x8(%rsp), %rdi
leaq 0x58(%rsp), %rdx
movq %rbx, %rsi
callq 0x13b46
movq 0x58(%rsp), %rdi
cmpq %r12, %rdi
je 0x126db8
movq 0x68(%rsp), %rsi
incq %rsi
callq 0xb2f0
movl $0x2a30, %edi           # imm = 0x2A30
callq 0xb2e0
movq %rax, %r12
leaq 0x30(%rsp), %rsi
leaq 0x8(%rsp), %rdx
movq %rax, %rdi
movl %r14d, %ecx
callq 0x147fac
movq %r12, %rdi
movl 0x54(%rsp), %esi
callq 0x1274e0
movq %rbx, %rdi
movq %r12, %rsi
movl %r14d, %edx
movl %r15d, %ecx
callq 0x12755a
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x126e11
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb2f0
movq 0x30(%rsp), %rdi
cmpq %rbp, %rdi
je 0x126e28
movq 0x40(%rsp), %rsi
incq %rsi
callq 0xb2f0
movq %rbx, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x24ace(%rip), %rdi     # 0x14b90f
callq 0xb1f0
leaq 0x24ac2(%rip), %rdi     # 0x14b90f
callq 0xb3d0
leaq 0x24ab6(%rip), %rdi     # 0x14b90f
callq 0xb1f0
leaq 0x24aaa(%rip), %rdi     # 0x14b90f
callq 0xb3d0
movq %rax, %rbx
movl $0x2a30, %esi           # imm = 0x2A30
movq %r12, %rdi
callq 0xb2f0
jmp 0x126ec4
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r12, %rdi
je 0x126ee0
movq 0x68(%rsp), %rsi
jmp 0x126ed8
movq %rax, %rbx
jmp 0x126ee0
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
jne 0x126f4c
jmp 0x126f59
jmp 0x126eb9
jmp 0x126eb1
jmp 0x126eb9
movq %rax, %rbx
jmp 0x126f3d
movq %rax, %rbx
jmp 0x126f59
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x126ee0
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb2f0
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x126f59
movq 0x40(%rsp), %rsi
jmp 0x126f51
movq %rax, %rbx
cmpl $0x0, (%r12)
jne 0x126f08
movl 0x2c(%rsp), %eax
movl %eax, (%r12)
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
jmp 0x126f2b
movq %rax, %rbx
cmpl $0x0, (%r12)
jne 0x126f22
movl %ebp, (%r12)
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x126f3d
movq 0x40(%rsp), %rsi
incq %rsi
callq 0xb2f0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x126f59
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb2f0
movq %rbx, %rdi
callq 0xb510
nop