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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x30(%rbp)
movl $0x0, -0xc(%rbp)
addq $0x1d0, %rdi            # imm = 0x1D0
callq 0x22d60
cmpq $0x0, %rax
jbe 0x29194
leaq 0x3d562(%rip), %rax     # 0x6652a
testb $0x1, (%rax)
je 0x29017
movl $0x11, %edi
callq 0x177b0
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %esi
movq 0x3cfec(%rip), %rdi     # 0x65fd0
callq 0x4440
movq %rax, -0x38(%rbp)
movl $0x20, %edi
callq 0x177d0
movq -0x38(%rbp), %rdi
movb %al, -0x11(%rbp)
movzbl -0x11(%rbp), %esi
callq 0x4550
movq -0x30(%rbp), %rsi
movq %rax, %rdi
addq $0x20, %rsi
callq 0x4320
leaq 0x3d50c(%rip), %rax     # 0x6652a
testb $0x1, (%rax)
je 0x29036
movq 0x3cfa6(%rip), %rdi     # 0x65fd0
leaq 0x29eec(%rip), %rsi     # 0x52f1d
callq 0x4380
movl $0x0, -0x18(%rbp)
movq -0x30(%rbp), %rcx
movl -0x18(%rbp), %eax
cmpl 0x1c8(%rcx), %eax
jge 0x29173
cmpl $0x0, -0x18(%rbp)
jle 0x29096
movl -0x18(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x29096
leaq 0x3d4bd(%rip), %rax     # 0x6652a
testb $0x1, (%rax)
je 0x29094
movq 0x3cf57(%rip), %rdi     # 0x65fd0
movq 0x3cf30(%rip), %rsi     # 0x65fb0
callq 0x43c0
movq %rax, %rdi
leaq 0x29970(%rip), %rsi     # 0x529ff
callq 0x4380
jmp 0x29096
movq -0x30(%rbp), %rdi
movslq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
addq $0x1d0, %rdi            # imm = 0x1D0
callq 0x22d60
movq %rax, %rcx
movq -0x40(%rbp), %rax
cmpq %rcx, %rax
jae 0x2910b
movq -0x30(%rbp), %rdi
addq $0x1d0, %rdi            # imm = 0x1D0
movslq -0x18(%rbp), %rsi
callq 0x29940
cmpq $0x0, (%rax)
je 0x290da
movl -0x18(%rbp), %eax
movl %eax, -0xc(%rbp)
leaq 0x3d449(%rip), %rax     # 0x6652a
testb $0x1, (%rax)
je 0x29109
movq -0x30(%rbp), %rdi
addq $0x1d0, %rdi            # imm = 0x1D0
movslq -0xc(%rbp), %rsi
callq 0x29940
movq (%rax), %rsi
movq 0x3cecc(%rip), %rdi     # 0x65fd0
callq 0x44960
jmp 0x29163
movq -0x30(%rbp), %rcx
movl -0x18(%rbp), %eax
movl 0x1c8(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x29140
leaq 0x3d404(%rip), %rax     # 0x6652a
testb $0x1, (%rax)
je 0x2913e
movq 0x3ce9e(%rip), %rdi     # 0x65fd0
leaq 0x298dd(%rip), %rsi     # 0x52a16
callq 0x4380
jmp 0x29161
leaq 0x3d3e3(%rip), %rax     # 0x6652a
testb $0x1, (%rax)
je 0x2915f
movq 0x3ce7d(%rip), %rdi     # 0x65fd0
leaq 0x298c2(%rip), %rsi     # 0x52a1c
callq 0x4380
jmp 0x29173
jmp 0x29163
jmp 0x29165
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x2903d
leaq 0x3d3b0(%rip), %rax     # 0x6652a
testb $0x1, (%rax)
je 0x29192
movq 0x3ce4a(%rip), %rdi     # 0x65fd0
movq 0x3ce23(%rip), %rsi     # 0x65fb0
callq 0x43c0
jmp 0x29194
movq -0x30(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
callq 0x22d60
cmpq $0x0, %rax
jbe 0x29480
leaq 0x3d375(%rip), %rax     # 0x6652a
testb $0x1, (%rax)
je 0x29204
movl $0x11, %edi
callq 0x177b0
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %esi
movq 0x3cdff(%rip), %rdi     # 0x65fd0
callq 0x4440
movq %rax, -0x48(%rbp)
movl $0x20, %edi
callq 0x177d0
movq -0x48(%rbp), %rdi
movb %al, -0x1d(%rbp)
movzbl -0x1d(%rbp), %esi
callq 0x4550
movq -0x30(%rbp), %rsi
movq %rax, %rdi
addq $0x20, %rsi
callq 0x4320
leaq 0x3d31f(%rip), %rax     # 0x6652a
testb $0x1, (%rax)
je 0x29223
movq 0x3cdb9(%rip), %rdi     # 0x65fd0
leaq 0x29d05(%rip), %rsi     # 0x52f23
callq 0x4380
movq -0x30(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
callq 0x22d60
movq -0x30(%rbp), %rcx
movslq 0x1cc(%rcx), %rcx
cmpq %rcx, %rax
jae 0x29389
movl $0x0, -0x24(%rbp)
movq -0x30(%rbp), %rcx
movl -0x24(%rbp), %eax
cmpl 0x1cc(%rcx), %eax
jge 0x29384
cmpl $0x0, -0x24(%rbp)
jle 0x292a7
movl -0x24(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x292a7
leaq 0x3d2ac(%rip), %rax     # 0x6652a
testb $0x1, (%rax)
je 0x292a5
movq 0x3cd46(%rip), %rdi     # 0x65fd0
movq 0x3cd1f(%rip), %rsi     # 0x65fb0
callq 0x43c0
movq %rax, %rdi
leaq 0x2975f(%rip), %rsi     # 0x529ff
callq 0x4380
jmp 0x292a7
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 0x2931c
movq -0x30(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0x24(%rbp), %rsi
callq 0x29940
cmpq $0x0, (%rax)
je 0x292eb
movl -0x24(%rbp), %eax
movl %eax, -0xc(%rbp)
leaq 0x3d238(%rip), %rax     # 0x6652a
testb $0x1, (%rax)
je 0x2931a
movq -0x30(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0xc(%rbp), %rsi
callq 0x29940
movq (%rax), %rsi
movq 0x3ccbb(%rip), %rdi     # 0x65fd0
callq 0x44960
jmp 0x29374
movq -0x30(%rbp), %rcx
movl -0x24(%rbp), %eax
movl 0x1cc(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x29351
leaq 0x3d1f3(%rip), %rax     # 0x6652a
testb $0x1, (%rax)
je 0x2934f
movq 0x3cc8d(%rip), %rdi     # 0x65fd0
leaq 0x296cc(%rip), %rsi     # 0x52a16
callq 0x4380
jmp 0x29372
leaq 0x3d1d2(%rip), %rax     # 0x6652a
testb $0x1, (%rax)
je 0x29370
movq 0x3cc6c(%rip), %rdi     # 0x65fd0
leaq 0x296b1(%rip), %rsi     # 0x52a1c
callq 0x4380
jmp 0x29384
jmp 0x29374
jmp 0x29376
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x2924e
jmp 0x2945f
movl $0x0, -0x28(%rbp)
movq -0x30(%rbp), %rdi
movslq -0x28(%rbp), %rax
movq %rax, -0x58(%rbp)
addq $0x1e8, %rdi            # imm = 0x1E8
callq 0x22d60
movq %rax, %rcx
movq -0x58(%rbp), %rax
cmpq %rcx, %rax
jae 0x2945d
cmpl $0x0, -0x28(%rbp)
jle 0x293fe
movl -0x28(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x293fe
leaq 0x3d155(%rip), %rax     # 0x6652a
testb $0x1, (%rax)
je 0x293fc
movq 0x3cbef(%rip), %rdi     # 0x65fd0
movq 0x3cbc8(%rip), %rsi     # 0x65fb0
callq 0x43c0
movq %rax, %rdi
leaq 0x29608(%rip), %rsi     # 0x529ff
callq 0x4380
jmp 0x293fe
movq -0x30(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0x28(%rbp), %rsi
callq 0x29940
cmpq $0x0, (%rax)
je 0x2941e
movl -0x28(%rbp), %eax
movl %eax, -0xc(%rbp)
leaq 0x3d105(%rip), %rax     # 0x6652a
testb $0x1, (%rax)
je 0x2944d
movq -0x30(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0xc(%rbp), %rsi
callq 0x29940
movq (%rax), %rsi
movq 0x3cb88(%rip), %rdi     # 0x65fd0
callq 0x44960
jmp 0x2944f
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x29390
jmp 0x2945f
leaq 0x3d0c4(%rip), %rax     # 0x6652a
testb $0x1, (%rax)
je 0x2947e
movq 0x3cb5e(%rip), %rdi     # 0x65fd0
movq 0x3cb37(%rip), %rsi     # 0x65fb0
callq 0x43c0
jmp 0x29480
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)