// File: /workspace/github_cpp_makefile_star2_O2/CMU-SAFARI[P]MQSim/src/ssd/Queue_Probe.cpp
// Function: SSD_Components::Queue_Probe::Snapshot(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, Utils::XmlWriter&)
void Queue_Probe::Snapshot(std::string id, Utils::XmlWriter& writer)
	{
		writer.Write_start_element_tag(id + "_QueueProbe");
		writer.Write_attribute_string("MaxQueueLength", std::to_string(MaxQueueLength()));
		writer.Write_attribute_string("AvgQueueLength", std::to_string(AvgQueueLength()));
		writer.Write_attribute_string("MaxWaitingTime", std::to_string(MaxWaitingTime()));
		writer.Write_attribute_string("AvgWaitingTime", std::to_string(AvgWaitingTime()));
		writer.Write_attribute_string("NRequests", std::to_string(NRequests()));
		writer.Write_attribute_string("NDepartures", std::to_string(NDepartures()));
		for (unsigned int i = 0; i < states.size(); i++) {
			writer.Write_start_element_tag(id + "_Distribution");
			sim_time_type now = Simulator->Time();
			sim_time_type t = states[i].totalTime;
			if (count == i) {
				t += now - lastCountChange;
			}
			double r = (double)t / (double)(now - lastCountChangeReference);
			writer.Write_attribute_string("QueueLength", std::to_string(i));
			writer.Write_attribute_string("nEnterances", std::to_string(states[i].nEnterances));
			writer.Write_attribute_string("totalTime", std::to_string(t));
			writer.Write_attribute_string("totalTimeRatio", std::to_string(r));
			writer.Write_end_element_tag();
		}
		writer.Write_end_element_tag();//id + "_QueueProbe"
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2e8, %rsp            # imm = 0x2E8
movq %rdx, %r13
movq %rdi, 0x10(%rsp)
leaq 0xdac9(%rip), %rdx      # 0x4844f
leaq 0x208(%rsp), %r14
movq %r14, %rdi
movq %rsi, 0x20(%rsp)
callq 0x11c18
movq %r13, %rdi
movq %r14, %rsi
callq 0x41d4a
leaq 0x208(%rsp), %rdi
callq 0x7678
leaq 0xdaa1(%rip), %rsi      # 0x4845b
leaq 0x188(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x7150
movq 0x10(%rsp), %rax
movl 0xb8(%rax), %esi
leaq 0x168(%rsp), %rdi
callq 0xe74b
leaq 0x188(%rsp), %rsi
leaq 0x168(%rsp), %rdx
movq %r13, %rdi
callq 0x41adc
leaq 0x168(%rsp), %rdi
callq 0x7678
leaq 0x188(%rsp), %rdi
callq 0x7678
leaq 0xda4d(%rip), %rsi      # 0x4846a
leaq 0x148(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x7150
movq 0x10(%rsp), %rdi
callq 0x3afe6
leaq 0x128(%rsp), %rdi
callq 0xe7cc
leaq 0x148(%rsp), %rsi
leaq 0x128(%rsp), %rdx
movq %r13, %rdi
callq 0x41adc
leaq 0x128(%rsp), %rdi
callq 0x7678
leaq 0x148(%rsp), %rdi
callq 0x7678
leaq 0xd9fa(%rip), %rsi      # 0x48479
leaq 0x108(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x7150
movq 0x10(%rsp), %rax
movq 0xc0(%rax), %rax
movl $0x3e8, %ecx            # imm = 0x3E8
xorl %edx, %edx
divq %rcx
leaq 0xe8(%rsp), %rdi
movq %rax, %rsi
callq 0xe78a
leaq 0x108(%rsp), %rsi
leaq 0xe8(%rsp), %rdx
movq %r13, %rdi
callq 0x41adc
leaq 0xe8(%rsp), %rdi
callq 0x7678
leaq 0x108(%rsp), %rdi
callq 0x7678
leaq 0xd998(%rip), %rsi      # 0x48488
leaq 0xc8(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x7150
movq 0x10(%rsp), %rdi
callq 0x3b090
leaq 0xa8(%rsp), %rdi
movq %rax, %rsi
callq 0xe78a
leaq 0xc8(%rsp), %rsi
leaq 0xa8(%rsp), %rdx
movq %r13, %rdi
callq 0x41adc
leaq 0xa8(%rsp), %rdi
callq 0x7678
leaq 0xc8(%rsp), %rdi
callq 0x7678
leaq 0xd942(%rip), %rsi      # 0x48497
leaq 0x88(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x7150
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rsi
leaq 0x68(%rsp), %rdi
callq 0xe78a
leaq 0x88(%rsp), %rsi
leaq 0x68(%rsp), %rdx
movq %r13, %rdi
callq 0x41adc
leaq 0x68(%rsp), %rdi
callq 0x7678
leaq 0x88(%rsp), %rdi
callq 0x7678
leaq 0xd8f4(%rip), %rsi      # 0x484a1
leaq 0x48(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x7150
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rsi
leaq 0x28(%rsp), %rdi
callq 0xe78a
leaq 0x48(%rsp), %rsi
leaq 0x28(%rsp), %rdx
movq %r13, %rdi
callq 0x41adc
leaq 0x28(%rsp), %rdi
callq 0x7678
leaq 0x48(%rsp), %rdi
callq 0x7678
leaq 0x1e8(%rsp), %r14
xorl %r12d, %r12d
movq %r13, 0x18(%rsp)
movl %r12d, %r12d
movq 0x10(%rsp), %rcx
movq 0x58(%rcx), %rax
subq 0x50(%rcx), %rax
sarq $0x4, %rax
cmpq %r12, %rax
jbe 0x3ae31
movq %r14, %rdi
movq 0x20(%rsp), %rsi
leaq 0xa5a7(%rip), %rdx      # 0x451d8
callq 0x11c18
movq %r13, %rdi
movq %r14, %rsi
callq 0x41d4a
movq %r14, %rdi
callq 0x7678
callq 0x1f784
movq %rax, %rdi
callq 0x1fafc
movq %rax, %rbp
movq 0x10(%rsp), %rdx
movq 0x50(%rdx), %rax
movq %r12, %r13
shlq $0x4, %r13
movq %rbp, %r14
subq 0x20(%rdx), %r14
cmpl (%rdx), %r12d
movl $0x0, %ecx
cmovneq %rcx, %r14
addq 0x8(%rax,%r13), %r14
subq 0x28(%rdx), %rbp
leaq 0x1c8(%rsp), %rdi
leaq 0xd7d9(%rip), %rsi      # 0x4846d
leaq 0xf(%rsp), %rdx
callq 0x7150
leaq 0x2c8(%rsp), %rbx
movq %rbx, %rdi
movl %r12d, %esi
callq 0xe74b
movq 0x18(%rsp), %rdi
leaq 0x1c8(%rsp), %r15
movq %r15, %rsi
movq %rbx, %rdx
callq 0x41adc
movq %rbx, %rdi
callq 0x7678
movq %r15, %rdi
callq 0x7678
leaq 0x2a8(%rsp), %rbx
movq %rbx, %rdi
leaq 0xd7c2(%rip), %rsi      # 0x484ad
leaq 0xf(%rsp), %rdx
callq 0x7150
movq 0x10(%rsp), %rax
movq 0x50(%rax), %rax
movq (%rax,%r13), %rsi
leaq 0x288(%rsp), %r15
movq %r15, %rdi
callq 0xe78a
movq 0x18(%rsp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x41adc
movq %r15, %rdi
callq 0x7678
movq %rbx, %rdi
callq 0x7678
leaq 0x268(%rsp), %rbx
movq %rbx, %rdi
leaq 0xd775(%rip), %rsi      # 0x484b9
leaq 0xf(%rsp), %rdx
callq 0x7150
leaq 0x248(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0xe78a
movq 0x18(%rsp), %rdi
movq %rdi, %r13
movq %rbx, %rsi
movq %r15, %rdx
callq 0x41adc
movq %r15, %rdi
callq 0x7678
movq %rbx, %rdi
callq 0x7678
leaq 0x1a8(%rsp), %rdi
leaq 0xd730(%rip), %rsi      # 0x484c3
leaq 0xf(%rsp), %rdx
callq 0x7150
movq %r14, %xmm1
movq 0xaa26(%rip), %xmm2     # 0x457d0
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
movapd 0xaa2a(%rip), %xmm3     # 0x457e0
subpd %xmm3, %xmm1
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
movq %rbp, %xmm1
punpckldq %xmm2, %xmm1    # xmm1 = xmm1[0],xmm2[0],xmm1[1],xmm2[1]
subpd %xmm3, %xmm1
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
divsd %xmm2, %xmm0
leaq 0x228(%rsp), %r15
movq %r15, %rdi
callq 0xe7cc
movq %r13, %rdi
leaq 0x1a8(%rsp), %r14
movq %r14, %rsi
movq %r15, %rdx
callq 0x41adc
movq %r15, %rdi
callq 0x7678
movq %r14, %rdi
callq 0x7678
movq %r13, %rdi
callq 0x41e22
incl %r12d
leaq 0x1e8(%rsp), %r14
jmp 0x3ac05
movq %r13, %rdi
callq 0x41e22
addq $0x2e8, %rsp            # imm = 0x2E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x7678
jmp 0x3ae5d
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
jmp 0x3afcc
jmp 0x3afd3
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x7678
jmp 0x3ae7e
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
jmp 0x3afcc
jmp 0x3afd3
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x7678
jmp 0x3aea5
movq %rax, %rbx
leaq 0xc8(%rsp), %rdi
jmp 0x3afcc
jmp 0x3afd3
movq %rax, %rbx
leaq 0xe8(%rsp), %rdi
callq 0x7678
jmp 0x3aecc
movq %rax, %rbx
leaq 0x108(%rsp), %rdi
jmp 0x3afcc
jmp 0x3afd3
movq %rax, %rbx
leaq 0x128(%rsp), %rdi
callq 0x7678
jmp 0x3af2f
jmp 0x3afd3
movq %rax, %rbx
leaq 0x168(%rsp), %rdi
callq 0x7678
jmp 0x3af0a
movq %rax, %rbx
leaq 0x188(%rsp), %rdi
jmp 0x3afcc
jmp 0x3afd3
movq %rax, %rbx
leaq 0x208(%rsp), %rdi
jmp 0x3afcc
movq %rax, %rbx
leaq 0x148(%rsp), %rdi
jmp 0x3afcc
jmp 0x3afd3
movq %rax, %rbx
jmp 0x3afaa
movq %rax, %rbx
leaq 0x288(%rsp), %rdi
callq 0x7678
jmp 0x3af7c
jmp 0x3afd3
movq %rax, %rbx
leaq 0x228(%rsp), %rdi
callq 0x7678
jmp 0x3af6f
movq %rax, %rbx
leaq 0x1a8(%rsp), %rdi
jmp 0x3afcc
movq %rax, %rbx
leaq 0x2a8(%rsp), %rdi
jmp 0x3afcc
movq %rax, %rbx
leaq 0x248(%rsp), %rdi
callq 0x7678
jmp 0x3afc4
jmp 0x3afd3
movq %rax, %rbx
leaq 0x2c8(%rsp), %rdi
callq 0x7678
leaq 0x1c8(%rsp), %rdi
jmp 0x3afcc
movq %rax, %rbx
leaq 0x1e8(%rsp), %rdi
jmp 0x3afcc
movq %rax, %rbx
leaq 0x268(%rsp), %rdi
callq 0x7678
jmp 0x3afd6
movq %rax, %rbx
movq %rbx, %rdi
callq 0x75d0