// File: 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:
subq $0x468, %rsp            # imm = 0x468
movq %rsi, 0xf0(%rsp)
movq %rdi, 0x460(%rsp)
movq %rsi, 0x458(%rsp)
movq %rdx, 0x450(%rsp)
movq 0x460(%rsp), %rax
movq %rax, 0xf8(%rsp)
movq 0x450(%rsp), %rax
movq %rax, 0x100(%rsp)
leaq 0x17599(%rip), %rdx     # 0xae7b7
leaq 0x430(%rsp), %rdi
movq %rdi, 0x108(%rsp)
callq 0x1fe40
movq 0x100(%rsp), %rdi
movq 0x108(%rsp), %rsi
callq 0xa8240
jmp 0x9724a
leaq 0x430(%rsp), %rdi
callq 0x8848
movq 0x450(%rsp), %rax
movq %rax, 0xe0(%rsp)
leaq 0x3ff(%rsp), %rdi
movq %rdi, 0xe8(%rsp)
callq 0x8780
movq 0xe8(%rsp), %rdx
leaq 0x17538(%rip), %rsi     # 0xae7c3
leaq 0x400(%rsp), %rdi
callq 0x85d0
jmp 0x9729a
movq 0xf8(%rsp), %rdi
callq 0x97f20
movl %eax, 0xdc(%rsp)
jmp 0x972b0
movl 0xdc(%rsp), %esi
leaq 0x3d8(%rsp), %rdi
callq 0x18f30
jmp 0x972c6
movq 0xe0(%rsp), %rdi
leaq 0x400(%rsp), %rsi
leaq 0x3d8(%rsp), %rdx
callq 0xa7eb0
jmp 0x972e5
leaq 0x3d8(%rsp), %rdi
callq 0x8848
leaq 0x400(%rsp), %rdi
callq 0x8848
leaq 0x3ff(%rsp), %rdi
callq 0x84a0
movq 0x450(%rsp), %rax
movq %rax, 0xc8(%rsp)
leaq 0x3b7(%rsp), %rdi
movq %rdi, 0xd0(%rsp)
callq 0x8780
movq 0xd0(%rsp), %rdx
leaq 0x17492(%rip), %rsi     # 0xae7d2
leaq 0x3b8(%rsp), %rdi
callq 0x85d0
jmp 0x9734f
movq 0xf8(%rsp), %rdi
callq 0x97f40
movsd %xmm0, 0xc0(%rsp)
jmp 0x97367
movsd 0xc0(%rsp), %xmm0
leaq 0x390(%rsp), %rdi
callq 0x19130
jmp 0x9737f
movq 0xc8(%rsp), %rdi
leaq 0x3b8(%rsp), %rsi
leaq 0x390(%rsp), %rdx
callq 0xa7eb0
jmp 0x9739e
leaq 0x390(%rsp), %rdi
callq 0x8848
leaq 0x3b8(%rsp), %rdi
callq 0x8848
leaq 0x3b7(%rsp), %rdi
callq 0x84a0
movq 0x450(%rsp), %rax
movq %rax, 0xb0(%rsp)
leaq 0x36f(%rsp), %rdi
movq %rdi, 0xb8(%rsp)
callq 0x8780
movq 0xb8(%rsp), %rdx
leaq 0x173e8(%rip), %rsi     # 0xae7e1
leaq 0x370(%rsp), %rdi
callq 0x85d0
jmp 0x97408
movq 0xf8(%rsp), %rdi
callq 0x98040
movq %rax, 0xa8(%rsp)
jmp 0x9741f
movq 0xa8(%rsp), %rsi
leaq 0x348(%rsp), %rdi
callq 0x19030
jmp 0x97436
movq 0xb0(%rsp), %rdi
leaq 0x370(%rsp), %rsi
leaq 0x348(%rsp), %rdx
callq 0xa7eb0
jmp 0x97455
leaq 0x348(%rsp), %rdi
callq 0x8848
leaq 0x370(%rsp), %rdi
callq 0x8848
leaq 0x36f(%rsp), %rdi
callq 0x84a0
movq 0x450(%rsp), %rax
movq %rax, 0x98(%rsp)
leaq 0x327(%rsp), %rdi
movq %rdi, 0xa0(%rsp)
callq 0x8780
movq 0xa0(%rsp), %rdx
leaq 0x17340(%rip), %rsi     # 0xae7f0
leaq 0x328(%rsp), %rdi
callq 0x85d0
jmp 0x974bf
movq 0xf8(%rsp), %rdi
callq 0x98060
movq %rax, 0x90(%rsp)
jmp 0x974d6
movq 0x90(%rsp), %rsi
leaq 0x300(%rsp), %rdi
callq 0x19030
jmp 0x974ed
movq 0x98(%rsp), %rdi
leaq 0x328(%rsp), %rsi
leaq 0x300(%rsp), %rdx
callq 0xa7eb0
jmp 0x9750c
leaq 0x300(%rsp), %rdi
callq 0x8848
leaq 0x328(%rsp), %rdi
callq 0x8848
leaq 0x327(%rsp), %rdi
callq 0x84a0
movq 0x450(%rsp), %rax
movq %rax, 0x80(%rsp)
leaq 0x2df(%rsp), %rdi
movq %rdi, 0x88(%rsp)
callq 0x8780
movq 0x88(%rsp), %rdx
leaq 0x17298(%rip), %rsi     # 0xae7ff
leaq 0x2e0(%rsp), %rdi
callq 0x85d0
jmp 0x97576
movq 0xf8(%rsp), %rdi
callq 0x98110
movq %rax, 0x78(%rsp)
jmp 0x9758a
movq 0x78(%rsp), %rsi
leaq 0x2b8(%rsp), %rdi
callq 0x19030
jmp 0x9759e
movq 0x80(%rsp), %rdi
leaq 0x2e0(%rsp), %rsi
leaq 0x2b8(%rsp), %rdx
callq 0xa7eb0
jmp 0x975bd
leaq 0x2b8(%rsp), %rdi
callq 0x8848
leaq 0x2e0(%rsp), %rdi
callq 0x8848
leaq 0x2df(%rsp), %rdi
callq 0x84a0
movq 0x450(%rsp), %rax
movq %rax, 0x68(%rsp)
leaq 0x297(%rsp), %rdi
movq %rdi, 0x70(%rsp)
callq 0x8780
movq 0x70(%rsp), %rdx
leaq 0x171fa(%rip), %rsi     # 0xae809
leaq 0x298(%rsp), %rdi
callq 0x85d0
jmp 0x9761e
movq 0xf8(%rsp), %rdi
callq 0x98120
movq %rax, 0x60(%rsp)
jmp 0x97632
movq 0x60(%rsp), %rsi
leaq 0x270(%rsp), %rdi
callq 0x19030
jmp 0x97646
movq 0x68(%rsp), %rdi
leaq 0x298(%rsp), %rsi
leaq 0x270(%rsp), %rdx
callq 0xa7eb0
jmp 0x97662
leaq 0x270(%rsp), %rdi
callq 0x8848
leaq 0x298(%rsp), %rdi
callq 0x8848
leaq 0x297(%rsp), %rdi
callq 0x84a0
movl $0x0, 0x26c(%rsp)
movq 0xf8(%rsp), %rdi
movl 0x26c(%rsp), %eax
movq %rax, 0x58(%rsp)
addq $0x50, %rdi
callq 0x98660
movq %rax, %rcx
movq 0x58(%rsp), %rax
cmpq %rcx, %rax
jae 0x97ef9
movq 0xf0(%rsp), %rsi
movq 0x450(%rsp), %rax
movq %rax, 0x48(%rsp)
leaq 0x13e22(%rip), %rdx     # 0xab500
leaq 0x248(%rsp), %rdi
movq %rdi, 0x50(%rsp)
callq 0x1fe40
movq 0x48(%rsp), %rdi
movq 0x50(%rsp), %rsi
callq 0xa8240
jmp 0x97701
leaq 0x248(%rsp), %rdi
callq 0x8848
callq 0x46500
movq %rax, %rdi
callq 0x46c50
movq 0xf8(%rsp), %rdi
movq %rax, 0x240(%rsp)
addq $0x50, %rdi
movl 0x26c(%rsp), %eax
movl %eax, %esi
callq 0x98640
movq %rax, %rcx
movq 0xf8(%rsp), %rax
movq 0x8(%rcx), %rcx
movq %rcx, 0x238(%rsp)
movl (%rax), %eax
cmpl 0x26c(%rsp), %eax
jne 0x97a60
movq 0xf8(%rsp), %rcx
movq 0x240(%rsp), %rax
subq 0x20(%rcx), %rax
addq 0x238(%rsp), %rax
movq %rax, 0x238(%rsp)
jmp 0x97a60
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
leaq 0x430(%rsp), %rdi
callq 0x8848
jmp 0x97f0e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
jmp 0x9780c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
jmp 0x977ff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
leaq 0x3d8(%rsp), %rdi
callq 0x8848
leaq 0x400(%rsp), %rdi
callq 0x8848
leaq 0x3ff(%rsp), %rdi
callq 0x84a0
jmp 0x97f0e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
jmp 0x97878
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
jmp 0x9786b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
leaq 0x390(%rsp), %rdi
callq 0x8848
leaq 0x3b8(%rsp), %rdi
callq 0x8848
leaq 0x3b7(%rsp), %rdi
callq 0x84a0
jmp 0x97f0e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
jmp 0x978e4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
jmp 0x978d7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
leaq 0x348(%rsp), %rdi
callq 0x8848
leaq 0x370(%rsp), %rdi
callq 0x8848
leaq 0x36f(%rsp), %rdi
callq 0x84a0
jmp 0x97f0e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
jmp 0x97950
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
jmp 0x97943
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
leaq 0x300(%rsp), %rdi
callq 0x8848
leaq 0x328(%rsp), %rdi
callq 0x8848
leaq 0x327(%rsp), %rdi
callq 0x84a0
jmp 0x97f0e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
jmp 0x979bc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
jmp 0x979af
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
leaq 0x2b8(%rsp), %rdi
callq 0x8848
leaq 0x2e0(%rsp), %rdi
callq 0x8848
leaq 0x2df(%rsp), %rdi
callq 0x84a0
jmp 0x97f0e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
jmp 0x97a28
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
jmp 0x97a1b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
leaq 0x270(%rsp), %rdi
callq 0x8848
leaq 0x298(%rsp), %rdi
callq 0x8848
leaq 0x297(%rsp), %rdi
callq 0x84a0
jmp 0x97f0e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
leaq 0x248(%rsp), %rdi
callq 0x8848
jmp 0x97f0e
movq 0xf8(%rsp), %rcx
movq 0x238(%rsp), %xmm0
movaps 0x13f38(%rip), %xmm3    # 0xab9b0
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
movapd 0x13f3c(%rip), %xmm2    # 0xab9c0
subpd %xmm2, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movq 0x240(%rsp), %rax
movq 0x28(%rcx), %rcx
subq %rcx, %rax
movq %rax, %xmm1
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x230(%rsp)
movq 0x450(%rsp), %rax
movq %rax, 0x38(%rsp)
leaq 0x20f(%rsp), %rdi
movq %rdi, 0x40(%rsp)
callq 0x8780
movq 0x40(%rsp), %rdx
leaq 0x16ce3(%rip), %rsi     # 0xae7d5
leaq 0x210(%rsp), %rdi
callq 0x85d0
jmp 0x97b01
movl 0x26c(%rsp), %esi
leaq 0x1e8(%rsp), %rdi
callq 0x18f30
jmp 0x97b17
movq 0x38(%rsp), %rdi
leaq 0x210(%rsp), %rsi
leaq 0x1e8(%rsp), %rdx
callq 0xa7eb0
jmp 0x97b33
leaq 0x1e8(%rsp), %rdi
callq 0x8848
leaq 0x210(%rsp), %rdi
callq 0x8848
leaq 0x20f(%rsp), %rdi
callq 0x84a0
movq 0x450(%rsp), %rax
movq %rax, 0x28(%rsp)
leaq 0x1c7(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x8780
movq 0x30(%rsp), %rdx
leaq 0x16c90(%rip), %rsi     # 0xae815
leaq 0x1c8(%rsp), %rdi
callq 0x85d0
jmp 0x97b94
movq 0xf8(%rsp), %rdi
addq $0x50, %rdi
movl 0x26c(%rsp), %eax
movl %eax, %esi
callq 0x98640
movq (%rax), %rsi
leaq 0x1a0(%rsp), %rdi
callq 0x19030
jmp 0x97bc0
movq 0x28(%rsp), %rdi
leaq 0x1c8(%rsp), %rsi
leaq 0x1a0(%rsp), %rdx
callq 0xa7eb0
jmp 0x97bdc
leaq 0x1a0(%rsp), %rdi
callq 0x8848
leaq 0x1c8(%rsp), %rdi
callq 0x8848
leaq 0x1c7(%rsp), %rdi
callq 0x84a0
movq 0x450(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0x17f(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x8780
movq 0x20(%rsp), %rdx
leaq 0x16bf3(%rip), %rsi     # 0xae821
leaq 0x180(%rsp), %rdi
callq 0x85d0
jmp 0x97c3d
movq 0x238(%rsp), %rsi
leaq 0x158(%rsp), %rdi
callq 0x19030
jmp 0x97c54
movq 0x18(%rsp), %rdi
leaq 0x180(%rsp), %rsi
leaq 0x158(%rsp), %rdx
callq 0xa7eb0
jmp 0x97c70
leaq 0x158(%rsp), %rdi
callq 0x8848
leaq 0x180(%rsp), %rdi
callq 0x8848
leaq 0x17f(%rsp), %rdi
callq 0x84a0
movq 0x450(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x137(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x8780
movq 0x10(%rsp), %rdx
leaq 0x16b69(%rip), %rsi     # 0xae82b
leaq 0x138(%rsp), %rdi
callq 0x85d0
jmp 0x97cd1
movsd 0x230(%rsp), %xmm0
leaq 0x110(%rsp), %rdi
callq 0x19130
jmp 0x97ce9
movq 0x8(%rsp), %rdi
leaq 0x138(%rsp), %rsi
leaq 0x110(%rsp), %rdx
callq 0xa7eb0
jmp 0x97d05
leaq 0x110(%rsp), %rdi
callq 0x8848
leaq 0x138(%rsp), %rdi
callq 0x8848
leaq 0x137(%rsp), %rdi
callq 0x84a0
movq 0x450(%rsp), %rdi
callq 0xa8370
movl 0x26c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x26c(%rsp)
jmp 0x97694
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
jmp 0x97da9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
jmp 0x97d9c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
leaq 0x1e8(%rsp), %rdi
callq 0x8848
leaq 0x210(%rsp), %rdi
callq 0x8848
leaq 0x20f(%rsp), %rdi
callq 0x84a0
jmp 0x97f0e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
jmp 0x97e15
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
jmp 0x97e08
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
leaq 0x1a0(%rsp), %rdi
callq 0x8848
leaq 0x1c8(%rsp), %rdi
callq 0x8848
leaq 0x1c7(%rsp), %rdi
callq 0x84a0
jmp 0x97f0e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
jmp 0x97e81
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
jmp 0x97e74
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
leaq 0x158(%rsp), %rdi
callq 0x8848
leaq 0x180(%rsp), %rdi
callq 0x8848
leaq 0x17f(%rsp), %rdi
callq 0x84a0
jmp 0x97f0e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
jmp 0x97eea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
jmp 0x97edd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x428(%rsp)
movl %eax, 0x424(%rsp)
leaq 0x110(%rsp), %rdi
callq 0x8848
leaq 0x138(%rsp), %rdi
callq 0x8848
leaq 0x137(%rsp), %rdi
callq 0x84a0
jmp 0x97f0e
movq 0x450(%rsp), %rdi
callq 0xa8370
addq $0x468, %rsp            # imm = 0x468
retq
movq 0x428(%rsp), %rdi
callq 0x8770
nopl (%rax,%rax)