// File: /workspace/github_cpp_makefile_star2_O3/CMU-SAFARI[P]MQSim/src/ssd/Data_Cache_Manager_Flash_Simple.cpp
// Function: SSD_Components::Data_Cache_Manager_Flash_Simple::service_dram_access_request(SSD_Components::Memory_Transfer_Info*)
void Data_Cache_Manager_Flash_Simple::service_dram_access_request(Memory_Transfer_Info* request_info)
	{
		dram_execution_queue[request_info->Stream_id].push(request_info);
		if(dram_execution_queue[request_info->Stream_id].size() == 1) {
			Simulator->Register_sim_event(Simulator->Time() + estimate_dram_access_time(request_info->Size_in_bytes, dram_row_size,
				dram_busrt_size, dram_burst_transfer_time_ddr, dram_tRCD, dram_tCL, dram_tRP),
				this, request_info, static_cast<int>(request_info->next_event_type));
		}
	}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsi, (%rsp)
movq 0xc8(%rdi), %rdx
movzwl 0x14(%rsi), %eax
leaq (%rax,%rax,4), %r8
shll $0x4, %r8d
leaq (%rdx,%r8), %rdi
movq 0x30(%rdx,%r8), %rcx
movq 0x40(%rdx,%r8), %rdx
addq $-0x8, %rdx
cmpq %rdx, %rcx
je 0x354d9
movq %rsi, (%rcx)
addq $0x8, 0x30(%rdi)
jmp 0x354eb
movq %rsp, %r14
movq %r14, %rsi
callq 0x34782
movq (%r14), %rax
movzwl 0x14(%rax), %eax
movq 0xc8(%rbx), %rcx
leaq (%rax,%rax,4), %rax
shll $0x4, %eax
movq 0x48(%rcx,%rax), %rdx
movq %rdx, %rsi
subq 0x28(%rcx,%rax), %rsi
shrq $0x3, %rsi
cmpq $0x1, %rdx
adcq $-0x1, %rsi
shlq $0x6, %rsi
movq 0x30(%rcx,%rax), %rdx
subq 0x38(%rcx,%rax), %rdx
movq 0x20(%rcx,%rax), %rdi
sarq $0x3, %rdx
subq 0x10(%rcx,%rax), %rdi
sarq $0x3, %rdi
addq %rdx, %rdi
addq %rsi, %rdi
cmpq $0x1, %rdi
jne 0x35728
callq 0x28018
movq %rax, %r14
callq 0x28018
movq %rax, %rdi
callq 0x2841a
movq %rax, %rdi
movq (%rsp), %rcx
movl (%rcx), %r8d
movl 0x40(%rbx), %r9d
movl 0x48(%rbx), %r11d
movsd 0x50(%rbx), %xmm0
movq 0x58(%rbx), %r12
movq 0x60(%rbx), %r15
leaq (%r15,%r12), %rsi
cmpl %r9d, %r8d
jbe 0x356e2
movl %r9d, %eax
xorl %edx, %edx
divl %r11d
movl %eax, %r10d
movq 0x68(%rbx), %xmm3
movl %r8d, %eax
xorl %edx, %edx
divl %r9d
movq %rsi, %xmm5
movq 0x22318(%rip), %xmm1    # 0x578c0
punpckldq %xmm1, %xmm5    # xmm5 = xmm5[0],xmm1[0],xmm5[1],xmm1[1]
movapd 0x2231c(%rip), %xmm2    # 0x578d0
subpd %xmm2, %xmm5
movapd %xmm5, %xmm4
unpckhpd %xmm5, %xmm4            # xmm4 = xmm4[1],xmm5[1]
addsd %xmm5, %xmm4
shrl %r10d
xorps %xmm5, %xmm5
cvtsi2sd %r10d, %xmm5
punpckldq %xmm1, %xmm3    # xmm3 = xmm3[0],xmm1[0],xmm3[1],xmm1[1]
subpd %xmm2, %xmm3
movapd %xmm3, %xmm6
unpckhpd %xmm3, %xmm6            # xmm6 = xmm6[1],xmm3[1]
addsd %xmm3, %xmm6
mulsd %xmm0, %xmm5
addsd %xmm6, %xmm5
cvttsd2si %xmm5, %rsi
movq %rsi, %r8
sarq $0x3f, %r8
movsd 0x1fa51(%rip), %xmm3    # 0x55050
subsd %xmm3, %xmm5
cvttsd2si %xmm5, %r9
andq %r8, %r9
orq %rsi, %r9
movq %r9, %xmm5
punpckldq %xmm1, %xmm5    # xmm5 = xmm5[0],xmm1[0],xmm5[1],xmm1[1]
subpd %xmm2, %xmm5
movapd %xmm5, %xmm6
unpckhpd %xmm5, %xmm6            # xmm6 = xmm6[1],xmm5[1]
addsd %xmm5, %xmm6
shrl %eax
xorps %xmm5, %xmm5
cvtsi2sd %eax, %xmm5
mulsd %xmm6, %xmm5
addsd %xmm4, %xmm5
movq %r12, %xmm4
punpckldq %xmm1, %xmm4    # xmm4 = xmm4[0],xmm1[0],xmm4[1],xmm1[1]
subpd %xmm2, %xmm4
movapd %xmm4, %xmm6
unpckhpd %xmm4, %xmm6            # xmm6 = xmm6[1],xmm4[1]
addsd %xmm4, %xmm6
addsd %xmm5, %xmm6
movq %r15, %xmm5
punpckldq %xmm1, %xmm5    # xmm5 = xmm5[0],xmm1[0],xmm5[1],xmm1[1]
subpd %xmm2, %xmm5
movapd %xmm5, %xmm4
unpckhpd %xmm5, %xmm4            # xmm4 = xmm4[1],xmm5[1]
addsd %xmm5, %xmm4
xorps %xmm5, %xmm5
cvtsi2sd %rdx, %xmm5
addsd %xmm6, %xmm4
movl %r11d, %eax
xorps %xmm6, %xmm6
cvtsi2sd %rax, %xmm6
mulsd %xmm0, %xmm6
divsd %xmm6, %xmm5
cvttsd2si %xmm5, %rax
movq %rax, %rdx
subsd %xmm3, %xmm5
cvttsd2si %xmm5, %rsi
sarq $0x3f, %rdx
andq %rdx, %rsi
orq %rax, %rsi
movq %rsi, %xmm0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
subpd %xmm2, %xmm0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
addsd %xmm4, %xmm1
cvttsd2si %xmm1, %rax
movq %rax, %rdx
sarq $0x3f, %rdx
subsd %xmm3, %xmm1
cvttsd2si %xmm1, %rsi
andq %rdx, %rsi
orq %rax, %rsi
jmp 0x35716
movl %r8d, %eax
xorl %edx, %edx
divl %r11d
shrl %eax
cvtsi2sd %eax, %xmm1
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movq %rax, %rdx
subsd 0x1f94c(%rip), %xmm0    # 0x55050
cvttsd2si %xmm0, %r8
sarq $0x3f, %rdx
andq %rdx, %r8
orq %rax, %r8
addq %r8, %rsi
addq %rdi, %rsi
movl 0x10(%rcx), %r8d
movq %r14, %rdi
movq %rbx, %rdx
callq 0x2841e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq