// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq %rsi, 0x8(%rsp)
movq 0xc8(%rdi), %rcx
movzwl 0x14(%rsi), %eax
leaq (%rax,%rax,4), %rdx
shll $0x4, %edx
leaq (%rcx,%rdx), %rdi
movq 0x30(%rcx,%rdx), %rax
movq 0x40(%rcx,%rdx), %rcx
addq $-0x8, %rcx
cmpq %rcx, %rax
je 0x35f3e
movq %rsi, (%rax)
addq $0x8, 0x30(%rdi)
jmp 0x35f48
leaq 0x8(%rsp), %rsi
callq 0x351e0
movq 0xc8(%rbx), %rax
movq 0x8(%rsp), %rcx
movzwl 0x14(%rcx), %ecx
leaq (%rcx,%rcx,4), %rcx
shll $0x4, %ecx
movq 0x48(%rax,%rcx), %rdx
movq %rdx, %rsi
subq 0x28(%rax,%rcx), %rsi
shrq $0x3, %rsi
cmpq $0x1, %rdx
adcq $-0x1, %rsi
shlq $0x6, %rsi
movq 0x30(%rax,%rcx), %rdx
subq 0x38(%rax,%rcx), %rdx
movq 0x20(%rax,%rcx), %rdi
sarq $0x3, %rdx
subq 0x10(%rax,%rcx), %rdi
sarq $0x3, %rdi
addq %rdx, %rdi
addq %rsi, %rdi
cmpq $0x1, %rdi
jne 0x3618b
callq 0x281b4
movq %rax, %r14
callq 0x281b4
movq %rax, %rdi
callq 0x285a6
movq %rax, %r10
movq 0x8(%rsp), %rcx
movl (%rcx), %edi
movl 0x40(%rbx), %r8d
movl 0x48(%rbx), %esi
movsd 0x50(%rbx), %xmm0
movq 0x58(%rbx), %r15
movq 0x60(%rbx), %r11
cmpl %r8d, %edi
jbe 0x36144
movl %r8d, %eax
xorl %edx, %edx
divl %esi
movl %eax, %r9d
movq 0x68(%rbx), %xmm3
movl %edi, %eax
xorl %edx, %edx
divl %r8d
leaq (%r11,%r15), %rdi
movq %rdi, %xmm5
movq 0x218b5(%rip), %xmm1    # 0x578c0
punpckldq %xmm1, %xmm5    # xmm5 = xmm5[0],xmm1[0],xmm5[1],xmm1[1]
movapd 0x218b9(%rip), %xmm2    # 0x578d0
subpd %xmm2, %xmm5
movapd %xmm5, %xmm4
unpckhpd %xmm5, %xmm4            # xmm4 = xmm4[1],xmm5[1]
addsd %xmm5, %xmm4
shrl %r9d
xorps %xmm5, %xmm5
cvtsi2sd %r9d, %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, %rdi
movq %rdi, %r8
sarq $0x3f, %r8
movsd 0x1efee(%rip), %xmm3    # 0x55050
subsd %xmm3, %xmm5
cvttsd2si %xmm5, %r9
andq %r8, %r9
orq %rdi, %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 %r15, %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 %r11, %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 %esi, %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 0x36179
addq %r15, %r11
movl %edi, %eax
xorl %edx, %edx
divl %esi
shrl %eax
cvtsi2sd %eax, %xmm1
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movq %rax, %rdx
subsd 0x1eee9(%rip), %xmm0    # 0x55050
cvttsd2si %xmm0, %rsi
sarq $0x3f, %rdx
andq %rdx, %rsi
orq %rax, %rsi
addq %r11, %rsi
addq %r10, %rsi
movl 0x10(%rcx), %r8d
movq %r14, %rdi
movq %rbx, %rdx
callq 0x285aa
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop