// File: /workspace/github_cpp_makefile_star2_O1/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 0x2ec61(%rip), %rsi     # 0x158920
leaq 0x2ec62(%rip), %rdx     # 0x158928
leaq 0x8(%rsp), %rdi
callq 0x17586
movl %ebp, 0x54(%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq %rbx, %rsi
callq 0x13b32
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 0x129f5a
movq %rax, %r14
movslq %r14d, %rax
cmpq %r14, %rax
jne 0x129f66
movl (%r12), %eax
cmpl $0x22, %eax
je 0x129f66
testl %eax, %eax
leaq 0x18(%rsp), %r15
jne 0x129d40
movl %ebp, (%r12)
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x129d5b
movq 0x40(%rsp), %rsi
incq %rsi
callq 0xb2f0
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x129d72
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb2f0
leaq 0x8(%rsp), %rdi
movq %r15, (%rdi)
leaq 0x2eba8(%rip), %rsi     # 0x158929
leaq 0x2eba6(%rip), %rdx     # 0x15892e
callq 0x17586
leaq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq %rbx, %rsi
callq 0x13b32
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 0x129f72
movq %rax, %r15
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
leaq -0x80000000(%r15), %rcx
cmpq %rax, %rcx
leaq 0x40(%rsp), %rbp
jb 0x129f7e
movl (%r12), %eax
cmpl $0x22, %eax
je 0x129f7e
testl %eax, %eax
leaq 0x18(%rsp), %r13
jne 0x129e10
movl 0x2c(%rsp), %eax
movl %eax, (%r12)
movq 0x30(%rsp), %rdi
cmpq %rbp, %rdi
je 0x129e27
movq 0x40(%rsp), %rsi
incq %rsi
callq 0xb2f0
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x129e3e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb2f0
movl %r14d, %edi
movl %r15d, %esi
callq 0x129c24
leaq 0x8(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x2352f(%rip), %rsi     # 0x14d387
leaq 0x2352b(%rip), %rdx     # 0x14d38a
callq 0x17586
leaq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq %rbx, %rsi
callq 0x13b32
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x129e8d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb2f0
leaq 0x68(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x234ed(%rip), %rsi     # 0x14d38b
leaq 0x234eb(%rip), %rdx     # 0x14d390
leaq 0x58(%rsp), %rdi
callq 0x17586
leaq 0x8(%rsp), %rdi
leaq 0x58(%rsp), %rdx
movq %rbx, %rsi
callq 0x13b32
movq 0x58(%rsp), %rdi
cmpq %r12, %rdi
je 0x129ed8
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 0x14b498
movq %r12, %rdi
movl 0x54(%rsp), %esi
callq 0x12a600
movq %rbx, %rdi
movq %r12, %rsi
movl %r14d, %edx
movl %r15d, %ecx
callq 0x12a67a
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x129f31
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb2f0
movq 0x30(%rsp), %rdi
cmpq %rbp, %rdi
je 0x129f48
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 0x2496e(%rip), %rdi     # 0x14e8cf
callq 0xb1f0
leaq 0x24962(%rip), %rdi     # 0x14e8cf
callq 0xb3d0
leaq 0x24956(%rip), %rdi     # 0x14e8cf
callq 0xb1f0
leaq 0x2494a(%rip), %rdi     # 0x14e8cf
callq 0xb3d0
movq %rax, %rbx
movl $0x2a30, %esi           # imm = 0x2A30
movq %r12, %rdi
callq 0xb2f0
jmp 0x129fe4
movq %rax, %rbx
movq 0x58(%rsp), %rdi
cmpq %r12, %rdi
je 0x12a000
movq 0x68(%rsp), %rsi
jmp 0x129ff8
movq %rax, %rbx
jmp 0x12a000
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
jne 0x12a06c
jmp 0x12a079
jmp 0x129fd9
jmp 0x129fd1
jmp 0x129fd9
movq %rax, %rbx
jmp 0x12a05d
movq %rax, %rbx
jmp 0x12a079
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x12a000
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb2f0
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x12a079
movq 0x40(%rsp), %rsi
jmp 0x12a071
movq %rax, %rbx
cmpl $0x0, (%r12)
jne 0x12a028
movl 0x2c(%rsp), %eax
movl %eax, (%r12)
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
jmp 0x12a04b
movq %rax, %rbx
cmpl $0x0, (%r12)
jne 0x12a042
movl %ebp, (%r12)
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x12a05d
movq 0x40(%rsp), %rsi
incq %rsi
callq 0xb2f0
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x12a079
movq 0x18(%rsp), %rsi
incq %rsi
callq 0xb2f0
movq %rbx, %rdi
callq 0xb510
nop