// File: /workspace/github_cpp_makefile_star2_O1/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 0xf018(%rip), %rax      # 0x3c4c0
movl (%rax), %ecx
movl %ecx, %r8d
callq 0x1a67c
leaq 0xe88f(%rip), %rax      # 0x3bd48
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 0x7627(%rip), %rcx      # 0x34b33
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 0x2d546
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x2d54d
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 0x6ef3(%rip), %rsi      # 0x34461
callq 0x4580
leaq 0x50(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2d59b
movq %rdx, 0x40(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x50(%rsp)
jmp 0x2d5a3
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 0x2d5e0
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x4300
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2d5f6
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4300
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2d611
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 0x146a4
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 0x2d6c6
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2d6b0
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x4300
jmp 0x2d6b0
movq %rax, %r14
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2d6d2
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x4300
jmp 0x2d6d2
jmp 0x2d6cf
movq %rax, %r14
leaq 0x278(%rbx), %r15
movq 0x290(%rbx), %rdi
testq %rdi, %rdi
je 0x2d6f4
movq 0x2a0(%rbx), %rsi
subq %rdi, %rsi
callq 0x4300
leaq 0x238(%rbx), %r12
movq (%r15), %rdi
testq %rdi, %rdi
je 0x2d712
movq 0x288(%rbx), %rsi
subq %rdi, %rsi
callq 0x4300
movq (%r12), %rdi
testq %rdi, %rdi
je 0x2d72a
movq 0x248(%rbx), %rsi
subq %rdi, %rsi
callq 0x4300
movq %rbx, %rdi
callq 0x1ab12
movq %r14, %rdi
callq 0x4540