// File: estwings57[P]CasHMC/sources/LinkSlave.cpp
// Function: CasHMC::LinkSlave::PrintState()
void LinkSlave::PrintState()
{
	if(Buffers.size()>0) {
		STATEN(ALI(17)<<header);
		STATEN((downstream ? "Down " : " Up  "));
		int realInd = 0;
		for(int i=0; i<bufferMax; i++) {
			if(i>0 && i%8==0) {
				STATEN(endl<<"                      ");
			}
			if(i < Buffers.size()) {
				if(Buffers[i] != NULL)	realInd = i;
				STATEN(*Buffers[realInd]);
			}
			else if(i == bufferMax-1) {
				STATEN("[ - ]");
			}
			else {
				STATEN("[ - ]...");
				break;
			}
		}
		STATEN(endl);
	}
	
	//Print linkRx buffer
	if(linkRxTx.size()>0) {
		STATEN(ALI(17)<<header);
		STATEN("LKRX ");
		int realInd = 0;
		for(int i=0; i<linkRxTx.size(); i++) {
			if(i>0 && i%8==0) {
				STATEN(endl<<"                      ");
			}
			if(linkRxTx[i] != NULL)	realInd = i;
			STATEN(*linkRxTx[realInd]);
		}
		STATEN(endl);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x30(%rbp)
addq $0x1d0, %rdi            # imm = 0x1D0
callq 0x22d60
cmpq $0x0, %rax
jbe 0x43708
leaq 0x23019(%rip), %rax     # 0x6652a
testb $0x1, (%rax)
je 0x43560
movl $0x11, %edi
callq 0x177b0
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %esi
movq 0x22aa3(%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 0x22fc3(%rip), %rax     # 0x6652a
testb $0x1, (%rax)
je 0x435a3
movq -0x30(%rbp), %rax
testb $0x1, 0x1cc(%rax)
je 0x43586
leaq 0xf99d(%rip), %rax      # 0x52f1d
movq %rax, -0x40(%rbp)
jmp 0x43593
leaq 0xf996(%rip), %rax      # 0x52f23
movq %rax, -0x40(%rbp)
jmp 0x43593
movq -0x40(%rbp), %rsi
movq 0x22a32(%rip), %rdi     # 0x65fd0
callq 0x4380
movl $0x0, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x30(%rbp), %rcx
movl -0x18(%rbp), %eax
cmpl 0x1c8(%rcx), %eax
jge 0x436e7
cmpl $0x0, -0x18(%rbp)
jle 0x4360a
movl -0x18(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x4360a
leaq 0x22f49(%rip), %rax     # 0x6652a
testb $0x1, (%rax)
je 0x43608
movq 0x229e3(%rip), %rdi     # 0x65fd0
movq 0x229bc(%rip), %rsi     # 0x65fb0
callq 0x43c0
movq %rax, %rdi
leaq 0xf3fc(%rip), %rsi      # 0x529ff
callq 0x4380
jmp 0x4360a
movq -0x30(%rbp), %rdi
movslq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
addq $0x1d0, %rdi            # imm = 0x1D0
callq 0x22d60
movq %rax, %rcx
movq -0x48(%rbp), %rax
cmpq %rcx, %rax
jae 0x4367f
movq -0x30(%rbp), %rdi
addq $0x1d0, %rdi            # imm = 0x1D0
movslq -0x18(%rbp), %rsi
callq 0x29940
cmpq $0x0, (%rax)
je 0x4364e
movl -0x18(%rbp), %eax
movl %eax, -0x14(%rbp)
leaq 0x22ed5(%rip), %rax     # 0x6652a
testb $0x1, (%rax)
je 0x4367d
movq -0x30(%rbp), %rdi
addq $0x1d0, %rdi            # imm = 0x1D0
movslq -0x14(%rbp), %rsi
callq 0x29940
movq (%rax), %rsi
movq 0x22958(%rip), %rdi     # 0x65fd0
callq 0x44960
jmp 0x436d7
movq -0x30(%rbp), %rcx
movl -0x18(%rbp), %eax
movl 0x1c8(%rcx), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x436b4
leaq 0x22e90(%rip), %rax     # 0x6652a
testb $0x1, (%rax)
je 0x436b2
movq 0x2292a(%rip), %rdi     # 0x65fd0
leaq 0xf369(%rip), %rsi      # 0x52a16
callq 0x4380
jmp 0x436d5
leaq 0x22e6f(%rip), %rax     # 0x6652a
testb $0x1, (%rax)
je 0x436d3
movq 0x22909(%rip), %rdi     # 0x65fd0
leaq 0xf34e(%rip), %rsi      # 0x52a1c
callq 0x4380
jmp 0x436e7
jmp 0x436d7
jmp 0x436d9
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x435b1
leaq 0x22e3c(%rip), %rax     # 0x6652a
testb $0x1, (%rax)
je 0x43706
movq 0x228d6(%rip), %rdi     # 0x65fd0
movq 0x228af(%rip), %rsi     # 0x65fb0
callq 0x43c0
jmp 0x43708
movq -0x30(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
callq 0x22d60
cmpq $0x0, %rax
jbe 0x43893
leaq 0x22e01(%rip), %rax     # 0x6652a
testb $0x1, (%rax)
je 0x43778
movl $0x11, %edi
callq 0x177b0
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %esi
movq 0x2288b(%rip), %rdi     # 0x65fd0
callq 0x4440
movq %rax, -0x50(%rbp)
movl $0x20, %edi
callq 0x177d0
movq -0x50(%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 0x22dab(%rip), %rax     # 0x6652a
testb $0x1, (%rax)
je 0x43797
movq 0x22845(%rip), %rdi     # 0x65fd0
leaq 0x106b2(%rip), %rsi     # 0x53e44
callq 0x4380
movl $0x0, -0x24(%rbp)
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 0x43872
cmpl $0x0, -0x28(%rbp)
jle 0x43813
movl -0x28(%rbp), %eax
movl $0x8, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x43813
leaq 0x22d40(%rip), %rax     # 0x6652a
testb $0x1, (%rax)
je 0x43811
movq 0x227da(%rip), %rdi     # 0x65fd0
movq 0x227b3(%rip), %rsi     # 0x65fb0
callq 0x43c0
movq %rax, %rdi
leaq 0xf1f3(%rip), %rsi      # 0x529ff
callq 0x4380
jmp 0x43813
movq -0x30(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0x28(%rbp), %rsi
callq 0x29940
cmpq $0x0, (%rax)
je 0x43833
movl -0x28(%rbp), %eax
movl %eax, -0x24(%rbp)
leaq 0x22cf0(%rip), %rax     # 0x6652a
testb $0x1, (%rax)
je 0x43862
movq -0x30(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
movslq -0x24(%rbp), %rsi
callq 0x29940
movq (%rax), %rsi
movq 0x22773(%rip), %rdi     # 0x65fd0
callq 0x44960
jmp 0x43864
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x437a5
leaq 0x22cb1(%rip), %rax     # 0x6652a
testb $0x1, (%rax)
je 0x43891
movq 0x2274b(%rip), %rdi     # 0x65fd0
movq 0x22724(%rip), %rsi     # 0x65fb0
callq 0x43c0
jmp 0x43893
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)