// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x1d8(%rdi), %rax
cmpq 0x1d0(%rdi), %rax
je 0x12f31
leaq 0x1e659(%rip), %r13     # 0x3148a
movb (%r13), %al
cmpb $0x1, %al
jne 0x12e68
movq 0x1e190(%rip), %rdi     # 0x30fd0
movq (%rdi), %rax
movq -0x18(%rax), %rax
movq $0x11, 0x10(%rdi,%rax)
pushq $0x20
popq %rsi
callq 0x4440
leaq 0x20(%rbx), %rsi
movq %rax, %rdi
callq 0x42b0
movb (%r13), %al
testb $0x1, %al
je 0x12e7f
movq 0x1e15d(%rip), %rdi     # 0x30fd0
leaq 0x130e3(%rip), %rsi     # 0x25f5d
callq 0x4300
xorl %r12d, %r12d
movq 0x1e147(%rip), %r14     # 0x30fd0
leaq 0x12baf(%rip), %r15     # 0x25a3f
xorl %ebp, %ebp
movslq 0x1c8(%rbx), %rax
cmpq %rax, %r12
jge 0x12f4c
testq %r12, %r12
sete %al
testb $0x7, %r12b
setne %cl
orb %al, %cl
jne 0x12ecd
cmpb $0x1, (%r13)
jne 0x12ecd
movq %r14, %rdi
callq 0x4180
movq %rax, %rdi
movq %r15, %rsi
callq 0x4300
movq 0x1d0(%rbx), %rax
movq 0x1d8(%rbx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movb (%r13), %cl
cmpq %r12, %rdx
jbe 0x12f09
cmpq $0x0, (%rax,%r12,8)
cmovnel %r12d, %ebp
testb %cl, %cl
je 0x12f29
movslq %ebp, %rcx
movq (%rax,%rcx,8), %rsi
movq %r14, %rdi
callq 0x1e2c8
jmp 0x12f29
movl 0x1c8(%rbx), %eax
decl %eax
cmpq %rax, %r12
jne 0x12f35
testb %cl, %cl
je 0x12f29
movq %r14, %rdi
leaq 0x12b32(%rip), %rsi     # 0x25a56
callq 0x4300
incq %r12
jmp 0x12e92
xorl %ebp, %ebp
jmp 0x12f5f
testb %cl, %cl
je 0x12f4c
movq 0x1e090(%rip), %rdi     # 0x30fd0
leaq 0x12b15(%rip), %rsi     # 0x25a5c
callq 0x4300
cmpb $0x1, (%r13)
jne 0x12f5f
movq 0x1e076(%rip), %rdi     # 0x30fd0
callq 0x4180
movq 0x1f0(%rbx), %rax
cmpq 0x1e8(%rbx), %rax
je 0x13158
leaq 0x1e510(%rip), %r13     # 0x3148a
movb (%r13), %al
cmpb $0x1, %al
jne 0x12fb1
movq 0x1e047(%rip), %rdi     # 0x30fd0
movq (%rdi), %rax
movq -0x18(%rax), %rax
movq $0x11, 0x10(%rdi,%rax)
pushq $0x20
popq %rsi
callq 0x4440
leaq 0x20(%rbx), %rsi
movq %rax, %rdi
callq 0x42b0
movb (%r13), %al
testb $0x1, %al
je 0x12fc8
movq 0x1e014(%rip), %rdi     # 0x30fd0
leaq 0x12fa0(%rip), %rsi     # 0x25f63
callq 0x4300
movq 0x1e8(%rbx), %rax
movq 0x1f0(%rbx), %rcx
movq %rcx, %rsi
subq %rax, %rsi
sarq $0x3, %rsi
movslq 0x1cc(%rbx), %rdx
xorl %r12d, %r12d
movq 0x1dfdf(%rip), %r14     # 0x30fd0
leaq 0x12a47(%rip), %r15     # 0x25a3f
cmpq %rdx, %rsi
jae 0x130a6
movslq %edx, %rax
cmpq %rax, %r12
jge 0x13137
testq %r12, %r12
sete %al
testb $0x7, %r12b
setne %cl
orb %al, %cl
jne 0x13038
cmpb $0x1, (%r13)
jne 0x13038
movq %r14, %rdi
callq 0x4180
movq %rax, %rdi
movq %r15, %rsi
callq 0x4300
movq 0x1e8(%rbx), %rax
movq 0x1f0(%rbx), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movb (%r13), %cl
cmpq %r12, %rdx
jbe 0x13074
cmpq $0x0, (%rax,%r12,8)
cmovnel %r12d, %ebp
testb %cl, %cl
je 0x13098
movslq %ebp, %rcx
movq (%rax,%rcx,8), %rsi
movq %r14, %rdi
callq 0x1e2c8
jmp 0x13098
movl 0x1cc(%rbx), %eax
decl %eax
cmpq %rax, %r12
jne 0x13120
testb %cl, %cl
je 0x13098
movq %r14, %rdi
leaq 0x129c3(%rip), %rsi     # 0x25a56
callq 0x4300
incq %r12
movl 0x1cc(%rbx), %edx
jmp 0x13001
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r12, %rcx
jbe 0x13137
testq %r12, %r12
sete %dl
testb $0x7, %r12b
setne %sil
movb (%r13), %cl
orb %dl, %sil
jne 0x130f0
testb $0x1, %cl
je 0x130f0
movq %r14, %rdi
callq 0x4180
movq %rax, %rdi
movq %r15, %rsi
callq 0x4300
movq 0x1e8(%rbx), %rax
movb (%r13), %cl
cmpq $0x0, (%rax,%r12,8)
cmovnel %r12d, %ebp
testb $0x1, %cl
je 0x13114
movslq %ebp, %rcx
movq (%rax,%rcx,8), %rsi
movq %r14, %rdi
callq 0x1e2c8
movq 0x1e8(%rbx), %rax
incq %r12
movq 0x1f0(%rbx), %rcx
jmp 0x130a6
testb %cl, %cl
je 0x13137
movq 0x1dea5(%rip), %rdi     # 0x30fd0
leaq 0x1292a(%rip), %rsi     # 0x25a5c
callq 0x4300
cmpb $0x1, (%r13)
jne 0x13158
movq 0x1de8b(%rip), %rdi     # 0x30fd0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4180
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop