// File: estwings57[P]CasHMC/sources/HMCController.cpp
// Function: CasHMC::HMCController::PrintState()
void HMCController::PrintState()
{
	if(downBuffers.size()>0) {
		STATEN(ALI(17)<<header);
		STATEN("Down ");
		for(int i=0; i<downBufferMax; i++) {
			if(i>0 && i%8==0) {
				STATEN(endl<<"                      ");
			}
			if(i < downBuffers.size()) {
				STATEN(*downBuffers[i]);
			}
			else if(i == downBufferMax-1) {
				STATEN("[ - ]");
			}
			else {
				STATEN("[ - ]...");
				break;
			}
		}
		STATEN(endl);
	}
	
	if(upBuffers.size()>0) {
		STATEN(ALI(17)<<header);
		STATEN(" Up  ");
		int realInd = 0;
		for(int i=0; i<upBufferMax; i++) {
			if(i>0 && i%8==0) {
				STATEN(endl<<"                      ");
			}
			if(i < upBuffers.size()) {
				if(upBuffers[i] != NULL)	realInd = i;
				STATEN(*upBuffers[realInd]);
			}
			else if(i == upBufferMax-1) {
				STATEN("[ - ]");
			}
			else {
				STATEN("[ - ]...");
				break;
			}
		}
		STATEN(endl);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x30(%rbp)
addq $0x1d0, %rdi            # imm = 0x1D0
callq 0x1b4f0
cmpq $0x0, %rax
jbe 0x3a49d
leaq 0x2c239(%rip), %rax     # 0x6652a
testb $0x1, (%rax)
je 0x3a340
movl $0x11, %edi
callq 0x177b0
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %esi
movq 0x2bcc3(%rip), %rdi     # 0x65fd0
callq 0x4440
movq %rax, -0x38(%rbp)
movl $0x20, %edi
callq 0x177d0
movq -0x38(%rbp), %rdi
movb %al, -0xd(%rbp)
movzbl -0xd(%rbp), %esi
callq 0x4550
movq -0x30(%rbp), %rsi
movq %rax, %rdi
addq $0x20, %rsi
callq 0x4320
leaq 0x2c1e3(%rip), %rax     # 0x6652a
testb $0x1, (%rax)
je 0x3a35f
movq 0x2bc7d(%rip), %rdi     # 0x65fd0
leaq 0x18bc3(%rip), %rsi     # 0x52f1d
callq 0x4380
movl $0x0, -0x14(%rbp)
movq -0x30(%rbp), %rcx
movl -0x14(%rbp), %eax
cmpl 0x1c8(%rcx), %eax
jge 0x3a47c
cmpl $0x0, -0x14(%rbp)
jle 0x3a3bf
movl -0x14(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x3a3bf
leaq 0x2c194(%rip), %rax     # 0x6652a
testb $0x1, (%rax)
je 0x3a3bd
movq 0x2bc2e(%rip), %rdi     # 0x65fd0
movq 0x2bc07(%rip), %rsi     # 0x65fb0
callq 0x43c0
movq %rax, %rdi
leaq 0x18647(%rip), %rsi     # 0x529ff
callq 0x4380
jmp 0x3a3bf
movq -0x30(%rbp), %rdi
movslq -0x14(%rbp), %rax
movq %rax, -0x40(%rbp)
addq $0x1d0, %rdi            # imm = 0x1D0
callq 0x1b4f0
movq %rax, %rcx
movq -0x40(%rbp), %rax
cmpq %rcx, %rax
jae 0x3a414
leaq 0x2c140(%rip), %rax     # 0x6652a
testb $0x1, (%rax)
je 0x3a412
movq -0x30(%rbp), %rdi
addq $0x1d0, %rdi            # imm = 0x1D0
movslq -0x14(%rbp), %rsi
callq 0x3a790
movq (%rax), %rsi
movq 0x2bbc3(%rip), %rdi     # 0x65fd0
callq 0x4a3b0
jmp 0x3a46c
movq -0x30(%rbp), %rcx
movl -0x14(%rbp), %eax
movl 0x1c8(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x3a449
leaq 0x2c0fb(%rip), %rax     # 0x6652a
testb $0x1, (%rax)
je 0x3a447
movq 0x2bb95(%rip), %rdi     # 0x65fd0
leaq 0x185d4(%rip), %rsi     # 0x52a16
callq 0x4380
jmp 0x3a46a
leaq 0x2c0da(%rip), %rax     # 0x6652a
testb $0x1, (%rax)
je 0x3a468
movq 0x2bb74(%rip), %rdi     # 0x65fd0
leaq 0x185b9(%rip), %rsi     # 0x52a1c
callq 0x4380
jmp 0x3a47c
jmp 0x3a46c
jmp 0x3a46e
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x3a366
leaq 0x2c0a7(%rip), %rax     # 0x6652a
testb $0x1, (%rax)
je 0x3a49b
movq 0x2bb41(%rip), %rdi     # 0x65fd0
movq 0x2bb1a(%rip), %rsi     # 0x65fb0
callq 0x43c0
jmp 0x3a49d
movq -0x30(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
callq 0x22d60
cmpq $0x0, %rax
jbe 0x3a691
leaq 0x2c06c(%rip), %rax     # 0x6652a
testb $0x1, (%rax)
je 0x3a50d
movl $0x11, %edi
callq 0x177b0
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %esi
movq 0x2baf6(%rip), %rdi     # 0x65fd0
callq 0x4440
movq %rax, -0x48(%rbp)
movl $0x20, %edi
callq 0x177d0
movq -0x48(%rbp), %rdi
movb %al, -0x19(%rbp)
movzbl -0x19(%rbp), %esi
callq 0x4550
movq -0x30(%rbp), %rsi
movq %rax, %rdi
addq $0x20, %rsi
callq 0x4320
leaq 0x2c016(%rip), %rax     # 0x6652a
testb $0x1, (%rax)
je 0x3a52c
movq 0x2bab0(%rip), %rdi     # 0x65fd0
leaq 0x189fc(%rip), %rsi     # 0x52f23
callq 0x4380
movl $0x0, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x30(%rbp), %rcx
movl -0x24(%rbp), %eax
cmpl 0x1cc(%rcx), %eax
jge 0x3a670
cmpl $0x0, -0x24(%rbp)
jle 0x3a593
movl -0x24(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x3a593
leaq 0x2bfc0(%rip), %rax     # 0x6652a
testb $0x1, (%rax)
je 0x3a591
movq 0x2ba5a(%rip), %rdi     # 0x65fd0
movq 0x2ba33(%rip), %rsi     # 0x65fb0
callq 0x43c0
movq %rax, %rdi
leaq 0x18473(%rip), %rsi     # 0x529ff
callq 0x4380
jmp 0x3a593
movq -0x30(%rbp), %rdi
movslq -0x24(%rbp), %rax
movq %rax, -0x50(%rbp)
addq $0x1e8, %rdi            # imm = 0x1E8
callq 0x22d60
movq %rax, %rcx
movq -0x50(%rbp), %rax
cmpq %rcx, %rax
jae 0x3a608
movq -0x30(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0x24(%rbp), %rsi
callq 0x29940
cmpq $0x0, (%rax)
je 0x3a5d7
movl -0x24(%rbp), %eax
movl %eax, -0x20(%rbp)
leaq 0x2bf4c(%rip), %rax     # 0x6652a
testb $0x1, (%rax)
je 0x3a606
movq -0x30(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0x20(%rbp), %rsi
callq 0x29940
movq (%rax), %rsi
movq 0x2b9cf(%rip), %rdi     # 0x65fd0
callq 0x44960
jmp 0x3a660
movq -0x30(%rbp), %rcx
movl -0x24(%rbp), %eax
movl 0x1cc(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x3a63d
leaq 0x2bf07(%rip), %rax     # 0x6652a
testb $0x1, (%rax)
je 0x3a63b
movq 0x2b9a1(%rip), %rdi     # 0x65fd0
leaq 0x183e0(%rip), %rsi     # 0x52a16
callq 0x4380
jmp 0x3a65e
leaq 0x2bee6(%rip), %rax     # 0x6652a
testb $0x1, (%rax)
je 0x3a65c
movq 0x2b980(%rip), %rdi     # 0x65fd0
leaq 0x183c5(%rip), %rsi     # 0x52a1c
callq 0x4380
jmp 0x3a670
jmp 0x3a660
jmp 0x3a662
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x3a53a
leaq 0x2beb3(%rip), %rax     # 0x6652a
testb $0x1, (%rax)
je 0x3a68f
movq 0x2b94d(%rip), %rdi     # 0x65fd0
movq 0x2b926(%rip), %rsi     # 0x65fb0
callq 0x43c0
jmp 0x3a691
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)