// File: suyunu[P]Discrete-Event-Simulation/RandQueuing.cpp
// Function: RandQueuing::print(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void RandQueuing::print(string fname){
	ofstream fout (fname);
	
	int i;
	
	fout << fixed;
	fout.precision(4);
	fout << currentTime <<endl;
	
	fout.precision(2);
	for(i = 0 ; i < N_unit ; i++)
		fout << i << " " << units[i].Jcounter * units[i].procTime / currentTime << " " << units[i].maxQ <<endl;
	
	fout.precision(4);
	for(i = 0 ; i < N_job ; i++)
		fout << i << " " << jobs[i].timeToGo - jobs[i].enterTime <<endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x280, %rsp            # imm = 0x280
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x238(%rbp)
leaq -0x210(%rbp), %rdi
movq %rdi, -0x230(%rbp)
movl $0x10, %edx
callq 0x22b0
movq -0x230(%rbp), %rdi
leaq 0x7ec(%rip), %rsi       # 0x4c30
callq 0x2090
jmp 0x444b
movq -0x210(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x210(%rbp,%rax), %rdi
movl $0x4, %esi
callq 0x4c60
jmp 0x446a
movq -0x238(%rbp), %rax
movsd 0x8(%rax), %xmm0
leaq -0x210(%rbp), %rdi
callq 0x22a0
movq %rax, -0x240(%rbp)
jmp 0x448b
movq -0x240(%rbp), %rdi
movq 0x7b37(%rip), %rsi      # 0xbfd0
callq 0x2190
jmp 0x44a0
movq -0x210(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x210(%rbp,%rax), %rdi
movl $0x2, %esi
callq 0x4c60
jmp 0x44bf
movl $0x0, -0x214(%rbp)
movq -0x238(%rbp), %rcx
movl -0x214(%rbp), %eax
cmpl 0x4(%rcx), %eax
jge 0x45f3
movl -0x214(%rbp), %esi
leaq -0x210(%rbp), %rdi
callq 0x2270
movq %rax, -0x248(%rbp)
jmp 0x44fa
movq -0x248(%rbp), %rdi
leaq 0x3afc(%rip), %rsi      # 0x8004
callq 0x2170
movq %rax, -0x250(%rbp)
jmp 0x4516
movq -0x250(%rbp), %rdi
movq -0x238(%rbp), %rax
movq 0x20(%rax), %rcx
movslq -0x214(%rbp), %rdx
imulq $0x70, %rdx, %rdx
cvtsi2sdl 0x64(%rcx,%rdx), %xmm0
movsd 0x8(%rcx,%rdx), %xmm1
mulsd %xmm1, %xmm0
movsd 0x8(%rax), %xmm1
divsd %xmm1, %xmm0
callq 0x22a0
movq %rax, -0x258(%rbp)
jmp 0x455a
movq -0x258(%rbp), %rdi
leaq 0x3a9c(%rip), %rsi      # 0x8004
callq 0x2170
movq %rax, -0x260(%rbp)
jmp 0x4576
movq -0x260(%rbp), %rdi
movq -0x238(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x214(%rbp), %rcx
imulq $0x70, %rcx, %rcx
movl 0x60(%rax,%rcx), %esi
callq 0x2270
movq %rax, -0x268(%rbp)
jmp 0x45a5
movq -0x268(%rbp), %rdi
movq 0x7a1d(%rip), %rsi      # 0xbfd0
callq 0x2190
jmp 0x45ba
jmp 0x45bc
movl -0x214(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x214(%rbp)
jmp 0x44c9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x220(%rbp)
movl %eax, -0x224(%rbp)
leaq -0x210(%rbp), %rdi
callq 0x2200
jmp 0x46e3
movq -0x210(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x210(%rbp,%rax), %rdi
movl $0x4, %esi
callq 0x4c60
jmp 0x4612
movl $0x0, -0x214(%rbp)
movq -0x238(%rbp), %rcx
movl -0x214(%rbp), %eax
cmpl (%rcx), %eax
jge 0x46ce
movl -0x214(%rbp), %esi
leaq -0x210(%rbp), %rdi
callq 0x2270
movq %rax, -0x270(%rbp)
jmp 0x464c
movq -0x270(%rbp), %rdi
leaq 0x39aa(%rip), %rsi      # 0x8004
callq 0x2170
movq %rax, -0x278(%rbp)
jmp 0x4668
movq -0x278(%rbp), %rdi
movq -0x238(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x214(%rbp), %rcx
shlq $0x5, %rcx
movsd 0x8(%rax,%rcx), %xmm1
movsd 0x10(%rax,%rcx), %xmm0
subsd %xmm1, %xmm0
callq 0x22a0
movq %rax, -0x280(%rbp)
jmp 0x46a3
movq -0x280(%rbp), %rdi
movq 0x791f(%rip), %rsi      # 0xbfd0
callq 0x2190
jmp 0x46b8
jmp 0x46ba
movl -0x214(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x214(%rbp)
jmp 0x461c
leaq -0x210(%rbp), %rdi
callq 0x2200
addq $0x280, %rsp            # imm = 0x280
popq %rbp
retq
movq -0x220(%rbp), %rdi
callq 0x2280
nop