// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x1d8(%rdi), %rax
cmpq 0x1d0(%rdi), %rax
je 0x1db37
leaq 0x13a8f(%rip), %r13     # 0x3148a
movb (%r13), %al
cmpb $0x1, %al
jne 0x1da32
movq 0x135c6(%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 0x1da5b
leaq 0x8520(%rip), %rax      # 0x25f5d
leaq 0x851f(%rip), %rsi      # 0x25f63
cmpb $0x0, 0x1cc(%rbx)
cmovneq %rax, %rsi
movq 0x1357a(%rip), %rdi     # 0x30fd0
callq 0x4300
xorl %ebp, %ebp
movq 0x1356c(%rip), %r14     # 0x30fd0
leaq 0x7fd4(%rip), %r15      # 0x25a3f
xorl %r12d, %r12d
movslq 0x1c8(%rbx), %rax
cmpq %rax, %rbp
jge 0x1db24
testq %rbp, %rbp
sete %al
testb $0x7, %bpl
setne %cl
orb %al, %cl
jne 0x1daa9
cmpb $0x1, (%r13)
jne 0x1daa9
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 %rbp, %rdx
jbe 0x1dae5
cmpq $0x0, (%rax,%rbp,8)
cmovnel %ebp, %r12d
testb %cl, %cl
je 0x1db05
movslq %r12d, %rcx
movq (%rax,%rcx,8), %rsi
movq %r14, %rdi
callq 0x1e2c8
jmp 0x1db05
movl 0x1c8(%rbx), %eax
decl %eax
cmpq %rax, %rbp
jne 0x1db0d
testb %cl, %cl
je 0x1db05
movq %r14, %rdi
leaq 0x7f56(%rip), %rsi      # 0x25a56
callq 0x4300
incq %rbp
jmp 0x1da6e
testb %cl, %cl
je 0x1db24
movq 0x134b8(%rip), %rdi     # 0x30fd0
leaq 0x7f3d(%rip), %rsi      # 0x25a5c
callq 0x4300
cmpb $0x1, (%r13)
jne 0x1db37
movq 0x1349e(%rip), %rdi     # 0x30fd0
callq 0x4180
movq 0x1f0(%rbx), %rax
cmpq 0x1e8(%rbx), %rax
je 0x1dc4a
leaq 0x13938(%rip), %r12     # 0x3148a
movb (%r12), %al
cmpb $0x1, %al
jne 0x1db89
movq 0x1346f(%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 (%r12), %al
testb $0x1, %al
je 0x1dba0
movq 0x1343c(%rip), %rdi     # 0x30fd0
leaq 0x93de(%rip), %rsi      # 0x26f79
callq 0x4300
xorl %r13d, %r13d
movq 0x13426(%rip), %r14     # 0x30fd0
leaq 0x7e8e(%rip), %r15      # 0x25a3f
xorl %ebp, %ebp
movq 0x1e8(%rbx), %rax
movq 0x1f0(%rbx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r13, %rcx
jbe 0x1dc29
testq %r13, %r13
sete %dl
testb $0x7, %r13b
setne %sil
movb (%r12), %cl
orb %dl, %sil
jne 0x1dc07
testb $0x1, %cl
je 0x1dc07
movq %r14, %rdi
callq 0x4180
movq %rax, %rdi
movq %r15, %rsi
callq 0x4300
movq 0x1e8(%rbx), %rax
movb (%r12), %cl
cmpq $0x0, (%rax,%r13,8)
cmovnel %r13d, %ebp
testb $0x1, %cl
je 0x1dc24
movslq %ebp, %rcx
movq (%rax,%rcx,8), %rsi
movq %r14, %rdi
callq 0x1e2c8
incq %r13
jmp 0x1dbb3
cmpb $0x0, (%r12)
je 0x1dc4a
movq 0x13399(%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