// File: /workspace/github_cpp_makefile_star2_O3/estwings57[P]CasHMC/sources/VaultController.cpp
// Function: CasHMC::VaultController::VaultController(std::basic_ofstream<char, std::char_traits<char>>&, std::basic_ofstream<char, std::char_traits<char>>&, unsigned int)
VaultController::VaultController(ofstream &debugOut_, ofstream &stateOut_, unsigned id):
	DualVectorObject<Packet, Packet>(debugOut_, stateOut_, MAX_VLT_BUF, MAX_VLT_BUF),
	vaultContID(id)
{	
	classID << vaultContID;
	header = "        (VC_" + classID.str() + ")";
	
	refreshCountdown = 0;
	powerDown = false;
	poppedCMD = NULL;
	atomicCMD = NULL;
	atomicOperLeft = 0;
	pendingDataSize = 0;
	
	cmdBus = NULL;
	cmdCyclesLeft = 0;
	dataBus = NULL;
	dataCyclesLeft = 0;
	
	//Make class objects
	commandQueue = new CommandQueue(debugOut, stateOut, vaultContID, this);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movl %ecx, %ebp
movq %rdi, %rbx
leaq 0xe94c(%rip), %rax      # 0x3b4c0
movl (%rax), %ecx
movl %ecx, %r8d
callq 0x19d96
leaq 0xe1c3(%rip), %rax      # 0x3ad48
movq %rax, (%rbx)
movl %ebp, 0x204(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x238(%rbx)
movq $0x0, 0x248(%rbx)
leaq 0x50(%rbx), %rdi
movl %ebp, %esi
movups %xmm0, 0x278(%rbx)
movups %xmm0, 0x288(%rbx)
movups %xmm0, 0x298(%rbx)
callq 0x41e0
leaq 0x58(%rbx), %rsi
leaq 0x20(%rsp), %rdi
callq 0x4450
leaq 0x6fdb(%rip), %rcx      # 0x33bb3
leaq 0x20(%rsp), %rdi
movl $0xc, %r8d
xorl %esi, %esi
xorl %edx, %edx
callq 0x4320
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2cc12
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x2cc19
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rsp, %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x68a7(%rip), %rsi      # 0x334e1
callq 0x4580
leaq 0x50(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2cc67
movq %rdx, 0x40(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x50(%rsp)
jmp 0x2cc6f
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0x40(%rsp), %r14
movq %rdx, 0x8(%r14)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x20(%rbx), %rdi
movq %r14, %rsi
callq 0x4370
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x2ccac
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x4300
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2ccc2
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4300
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2ccdd
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4300
xorl %eax, %eax
movl %eax, 0x208(%rbx)
movb $0x0, 0x20c(%rbx)
movq %rax, 0x258(%rbx)
movl %eax, 0x260(%rbx)
movq %rax, 0x268(%rbx)
movl %eax, 0x270(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x220(%rbx)
movq %rax, 0x230(%rbx)
movl $0x280, %edi            # imm = 0x280
callq 0x42f0
movq %rax, %r15
movq 0x10(%rbx), %rsi
movq 0x18(%rbx), %rdx
movl 0x204(%rbx), %ecx
movq %rax, %rdi
movq %rbx, %r8
callq 0x14220
movq %r15, 0x218(%rbx)
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movl $0x280, %esi            # imm = 0x280
movq %r15, %rdi
jmp 0x2cd92
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2cd7c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4300
jmp 0x2cd7c
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2cd9e
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4300
jmp 0x2cd9e
jmp 0x2cd9b
movq %rax, %r14
leaq 0x278(%rbx), %r15
movq 0x290(%rbx), %rdi
testq %rdi, %rdi
je 0x2cdc0
movq 0x2a0(%rbx), %rsi
subq %rdi, %rsi
callq 0x4300
leaq 0x238(%rbx), %r12
movq (%r15), %rdi
testq %rdi, %rdi
je 0x2cdde
movq 0x288(%rbx), %rsi
subq %rdi, %rsi
callq 0x4300
movq (%r12), %rdi
testq %rdi, %rdi
je 0x2cdf6
movq 0x248(%rbx), %rsi
subq %rdi, %rsi
callq 0x4300
movq %rbx, %rdi
callq 0x1a396
movq %r14, %rdi
callq 0x4540