// File: estwings57[P]CasHMC/sources/CasHMCWrapper.cpp
// Function: CasHMC::CasHMCWrapper::~CasHMCWrapper()
CasHMCWrapper::~CasHMCWrapper()
{
	PrintEpochStatistic();
	PrintFinalStatistic();
	debugOut.flush();		debugOut.close();
	stateOut.flush();		stateOut.close();
	plotDataOut.flush();	plotDataOut.close();
	plotScriptOut.flush();	plotScriptOut.close();
	resultOut.flush();		resultOut.close();
	
	for(int l=0; l<NUM_LINKS; l++) {
		delete downstreamLinks[l];
		delete upstreamLinks[l];
	}
	downstreamLinks.clear(); 
	upstreamLinks.clear(); 
	delete hmcCont;
	hmcCont = NULL;
	delete hmc;
	hmc = NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
leaq 0x59bc5(%rip), %rax     # 0x65910
movq %rax, (%rdi)
callq 0xbfd0
jmp 0xbd55
movq -0x18(%rbp), %rdi
callq 0x10400
jmp 0xbd60
movq -0x18(%rbp), %rdi
addq $0x618, %rdi            # imm = 0x618
callq 0x4240
jmp 0xbd72
movq -0x18(%rbp), %rdi
addq $0x618, %rdi            # imm = 0x618
callq 0x4510
jmp 0xbd84
movq -0x18(%rbp), %rdi
addq $0x818, %rdi            # imm = 0x818
callq 0x4240
jmp 0xbd96
movq -0x18(%rbp), %rdi
addq $0x818, %rdi            # imm = 0x818
callq 0x4510
jmp 0xbda8
movq -0x18(%rbp), %rdi
addq $0xa18, %rdi            # imm = 0xA18
callq 0x4240
jmp 0xbdba
movq -0x18(%rbp), %rdi
addq $0xa18, %rdi            # imm = 0xA18
callq 0x4510
jmp 0xbdcc
movq -0x18(%rbp), %rdi
addq $0xc18, %rdi            # imm = 0xC18
callq 0x4240
jmp 0xbdde
movq -0x18(%rbp), %rdi
addq $0xc18, %rdi            # imm = 0xC18
callq 0x4510
jmp 0xbdf0
movq -0x18(%rbp), %rdi
addq $0xe18, %rdi            # imm = 0xE18
callq 0x4240
jmp 0xbe02
movq -0x18(%rbp), %rdi
addq $0xe18, %rdi            # imm = 0xE18
callq 0x4510
jmp 0xbe14
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
leaq 0x5a723(%rip), %rcx     # 0x66548
cmpl (%rcx), %eax
jge 0xbe8c
movq -0x18(%rbp), %rdi
addq $0x338, %rdi            # imm = 0x338
movslq -0xc(%rbp), %rsi
callq 0x17750
movq (%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0xbe54
movq -0x20(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq -0x18(%rbp), %rdi
addq $0x350, %rdi            # imm = 0x350
movslq -0xc(%rbp), %rsi
callq 0x17750
movq (%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0xbe7f
movq -0x28(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0xbe81
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xbe1b
movq -0x18(%rbp), %rdi
addq $0x338, %rdi            # imm = 0x338
callq 0x17a80
movq -0x18(%rbp), %rdi
addq $0x350, %rdi            # imm = 0x350
callq 0x17a80
movq -0x18(%rbp), %rax
movq 0x330(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
je 0xbecb
movq -0x30(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x330(%rax)
movq 0x368(%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0xbef5
movq -0x38(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq -0x18(%rbp), %rdi
movq $0x0, 0x368(%rdi)
addq $0xe18, %rdi            # imm = 0xE18
callq 0x4530
movq -0x18(%rbp), %rdi
addq $0xc18, %rdi            # imm = 0xC18
callq 0x4530
movq -0x18(%rbp), %rdi
addq $0xa18, %rdi            # imm = 0xA18
callq 0x4530
movq -0x18(%rbp), %rdi
addq $0x818, %rdi            # imm = 0x818
callq 0x4530
movq -0x18(%rbp), %rdi
addq $0x618, %rdi            # imm = 0x618
callq 0x4530
movq -0x18(%rbp), %rdi
addq $0x418, %rdi            # imm = 0x418
callq 0x4530
movq -0x18(%rbp), %rdi
addq $0x400, %rdi            # imm = 0x400
callq 0x178f0
movq -0x18(%rbp), %rdi
addq $0x3e8, %rdi            # imm = 0x3E8
callq 0x178f0
movq -0x18(%rbp), %rdi
addq $0x3a8, %rdi            # imm = 0x3A8
callq 0x46e8
movq -0x18(%rbp), %rdi
addq $0x350, %rdi            # imm = 0x350
callq 0x17a10
movq -0x18(%rbp), %rdi
addq $0x338, %rdi            # imm = 0x338
callq 0x17a10
movq -0x18(%rbp), %rdi
callq 0x181e0
addq $0x40, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0x17a70
nopw (%rax,%rax)