// File: /workspace/github_cpp_makefile_star2_O1/estwings57[P]CasHMC/sources/LinkSlave.cpp
// Function: CasHMC::LinkSlave::CheckNoError(CasHMC::Packet*)
bool LinkSlave::CheckNoError(Packet *chkPacket)
{
	unsigned tempSEQ = (slaveSEQ<7) ? slaveSEQ++ : 0;
	if(CRC_CHECK) {
		unsigned tempCRC = chkPacket->GetCRC();
		if(chkPacket->CRC == tempCRC) {
			if(chkPacket->SEQ == tempSEQ) {
				DEBUG(ALI(18)<<header<<ALI(15)<<*chkPacket<<(downstream ? "Down) " : "Up)   ")
							<<"CRC(0x"<<hex<<setw(9)<<setfill('0')<<tempCRC<<dec<<"), SEQ("<<tempSEQ<<") are checked (NO error)");
				return true;
			}
			else {
				DE_CR(ALI(18)<<header<<ALI(15)<<*chkPacket<<(downstream ? "Down) " : "Up)   ")
							<<"= Error abort mode =  (packet SEQ : "<<chkPacket->SEQ<<" / Slave SEQ : "<<tempSEQ<<")");
				cout<<ALI(18)<<header<<ALI(15)<<*chkPacket<<(downstream ? "Down) " : "Up)   ")
							<<"= Error abort mode =  (packet SEQ : "<<chkPacket->SEQ<<" / Slave SEQ : "<<tempSEQ<<")"<<endl;
				return false;
			}
		}
		else {
			DE_CR(ALI(18)<<header<<ALI(15)<<*chkPacket<<(downstream ? "Down) " : "Up)   ")
						<<"= Error abort mode =  (packet CRC : 0x"<<hex<<setw(9)<<setfill('0')<<chkPacket->CRC<<dec
						<<" / Slave CRC : 0x"<<hex<<setw(9)<<setfill('0')<<tempCRC<<dec<<")");
			return false;
		}
	}
	else {
		if(chkPacket->SEQ == tempSEQ) {
			DEBUG(ALI(18)<<header<<ALI(15)<<*chkPacket<<(downstream ? "Down) " : "Up)   ")
						<<"SEQ("<<tempSEQ<<") is checked (NO error)");
			return true;
		}
		else {
			DE_CR("    (LS_"<<linkSlaveID<<ALI(7)<<")"<<*chkPacket<<(downstream ? "Down) " : "Up)   ")
						<<"= Error abort mode =  (packet SEQ : "<<chkPacket->SEQ<<" / Slave SEQ : "<<tempSEQ<<")");
			return false;
		}
	}
	return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0x220(%rdi), %eax
xorl %r13d, %r13d
cmpl $0x6, %eax
jg 0x276b8
leal 0x1(%rax), %ecx
movl %ecx, 0x220(%r14)
movl %eax, %r13d
leaq 0x14e0d(%rip), %rax     # 0x3c4cc
cmpb $0x1, (%rax)
jne 0x278b3
movq %rbx, %rdi
callq 0x2895c
movq %rax, %r15
cmpl %r15d, 0x438(%rbx)
jne 0x27a05
leaq 0x14da1(%rip), %rax     # 0x3c488
movb (%rax), %al
cmpl %r13d, 0x444(%rbx)
jne 0x27d57
movb $0x1, %bpl
testb %al, %al
je 0x2802b
leaq 0x14d81(%rip), %rax     # 0x3c489
cmpb $0x0, (%rax)
jne 0x2802b
movq 0x148b8(%rip), %rax     # 0x3bfd0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movq $0x12, 0x10(%rax,%rdx)
movq -0x18(%rcx), %rcx
leaq (%rax,%rcx), %r12
cmpb $0x0, 0xe1(%rax,%rcx)
jne 0x27758
movq %r12, %rdi
movl $0x20, %esi
callq 0x42d0
movb %al, 0xe0(%r12)
movb $0x1, 0xe1(%r12)
movb $0x20, 0xe0(%r12)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
movq 0x14860(%rip), %rdi     # 0x3bfd0
callq 0x4340
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rcx
movq $0xf, 0x10(%r12,%rcx)
movq -0x18(%rax), %rax
leaq (%r12,%rax), %rbp
cmpb $0x0, 0xe1(%r12,%rax)
jne 0x277b5
movq %rbp, %rdi
movl $0x20, %esi
callq 0x42d0
movb %al, 0xe0(%rbp)
movb $0x1, 0xe1(%rbp)
movb $0x20, 0xe0(%rbp)
movq %r12, %rdi
movq %rbx, %rsi
callq 0x28bbe
movq %rax, %rbx
leaq 0xbf1f(%rip), %rax      # 0x336f0
leaq 0xbf1f(%rip), %rsi      # 0x336f7
cmpb $0x0, 0x1cc(%r14)
cmovneq %rax, %rsi
movl $0x6, %edx
movq %rbx, %rdi
callq 0x4340
leaq 0xc65e(%rip), %rsi      # 0x33e56
movl $0x6, %edx
movq %rbx, %rdi
callq 0x4340
movq (%rbx), %rax
movq -0x18(%rax), %rcx
movl 0x18(%rbx,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rbx,%rcx)
movq -0x18(%rax), %rcx
movq $0x9, 0x10(%rbx,%rcx)
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %r14
cmpb $0x0, 0xe1(%rbx,%rax)
jne 0x27855
movq %r14, %rdi
movl $0x20, %esi
callq 0x42d0
movb %al, 0xe0(%r14)
movb $0x1, 0xe1(%r14)
movb $0x30, 0xe0(%r14)
movl %r15d, %esi
movq %rbx, %rdi
callq 0x41e0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rax
movl 0x18(%rbx,%rax), %ecx
andl $-0x4b, %ecx
orl $0x2, %ecx
movl %ecx, 0x18(%rbx,%rax)
leaq 0xc5d6(%rip), %rsi      # 0x33e5d
movl $0x7, %edx
movq %rbx, %rdi
callq 0x4340
movl %r13d, %esi
movq %rbx, %rdi
callq 0x41e0
movq %rax, %rbx
leaq 0xc5bc(%rip), %rsi      # 0x33e65
movl $0x18, %edx
jmp 0x279f5
leaq 0x14bce(%rip), %rax     # 0x3c488
movb (%rax), %al
cmpl %r13d, 0x444(%rbx)
jne 0x27c31
movb $0x1, %bpl
testb %al, %al
je 0x2802b
leaq 0x14bae(%rip), %rax     # 0x3c489
cmpb $0x0, (%rax)
jne 0x2802b
movq 0x146e5(%rip), %rax     # 0x3bfd0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movq $0x12, 0x10(%rax,%rdx)
movq -0x18(%rcx), %rcx
leaq (%rax,%rcx), %r15
cmpb $0x0, 0xe1(%rax,%rcx)
jne 0x27929
movq %r15, %rdi
movl $0x20, %esi
callq 0x42d0
movb %al, 0xe0(%r15)
movb $0x1, 0xe1(%r15)
movb $0x20, 0xe0(%r15)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
movq 0x14690(%rip), %rdi     # 0x3bfd0
callq 0x4340
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rcx
movq $0xf, 0x10(%r15,%rcx)
movq -0x18(%rax), %rax
leaq (%r15,%rax), %r12
cmpb $0x0, 0xe1(%r15,%rax)
jne 0x27989
movq %r12, %rdi
movl $0x20, %esi
callq 0x42d0
movb %al, 0xe0(%r12)
movb $0x1, 0xe1(%r12)
movb $0x20, 0xe0(%r12)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x28bbe
movq %rax, %rbx
leaq 0xbd49(%rip), %rax      # 0x336f0
leaq 0xbd49(%rip), %rsi      # 0x336f7
cmpb $0x0, 0x1cc(%r14)
cmovneq %rax, %rsi
movl $0x6, %edx
movq %rbx, %rdi
callq 0x4340
leaq 0xc492(%rip), %rsi      # 0x33e60
movl $0x4, %edx
movq %rbx, %rdi
callq 0x4340
movl %r13d, %esi
movq %rbx, %rdi
callq 0x41e0
movq %rax, %rbx
leaq 0xc4fc(%rip), %rsi      # 0x33eec
movl $0x17, %edx
movq %rax, %rdi
callq 0x4340
movb $0x1, %bpl
jmp 0x28004
leaq 0x14a7c(%rip), %rax     # 0x3c488
cmpb $0x1, (%rax)
jne 0x27d50
movq 0x145b4(%rip), %rax     # 0x3bfd0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movq $0x12, 0x10(%rax,%rdx)
movq -0x18(%rcx), %rcx
leaq (%rax,%rcx), %r12
cmpb $0x0, 0xe1(%rax,%rcx)
jne 0x27a5c
movq %r12, %rdi
movl $0x20, %esi
callq 0x42d0
movb %al, 0xe0(%r12)
movb $0x1, 0xe1(%r12)
movb $0x20, 0xe0(%r12)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
movq 0x1455c(%rip), %rdi     # 0x3bfd0
callq 0x4340
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rcx
movq $0xf, 0x10(%r12,%rcx)
movq -0x18(%rax), %rax
leaq (%r12,%rax), %r13
cmpb $0x0, 0xe1(%r12,%rax)
jne 0x27abb
movq %r13, %rdi
movl $0x20, %esi
callq 0x42d0
movb %al, 0xe0(%r13)
movb $0x1, 0xe1(%r13)
movb $0x20, 0xe0(%r13)
movq %r12, %rdi
movq %rbx, %rsi
callq 0x28bbe
movq %rax, %r12
leaq 0xbc18(%rip), %rax      # 0x336f0
leaq 0xbc18(%rip), %rsi      # 0x336f7
cmpb $0x0, 0x1cc(%r14)
cmovneq %rax, %rsi
movl $0x6, %edx
movq %r12, %rdi
callq 0x4340
leaq 0xc3b4(%rip), %rsi      # 0x33eb3
movl $0x26, %edx
movq %r12, %rdi
callq 0x4340
movq (%r12), %rax
movq -0x18(%rax), %rcx
movl 0x18(%r12,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%r12,%rcx)
movq -0x18(%rax), %rcx
movq $0x9, 0x10(%r12,%rcx)
movq -0x18(%rax), %rax
leaq (%r12,%rax), %r14
cmpb $0x0, 0xe1(%r12,%rax)
jne 0x27b60
movq %r14, %rdi
movl $0x20, %esi
callq 0x42d0
movb %al, 0xe0(%r14)
movb $0x1, 0xe1(%r14)
movb $0x30, 0xe0(%r14)
movl 0x438(%rbx), %esi
movq %r12, %rdi
callq 0x41e0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rax
movl 0x18(%rbx,%rax), %ecx
andl $-0x4b, %ecx
orl $0x2, %ecx
movl %ecx, 0x18(%rbx,%rax)
leaq 0xc345(%rip), %rsi      # 0x33eda
movl $0x11, %edx
movq %rbx, %rdi
callq 0x4340
movq (%rbx), %rax
movq -0x18(%rax), %rcx
movl 0x18(%rbx,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rbx,%rcx)
movq -0x18(%rax), %rcx
movq $0x9, 0x10(%rbx,%rcx)
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %r14
cmpb $0x0, 0xe1(%rbx,%rax)
jne 0x27bf2
movq %r14, %rdi
movl $0x20, %esi
callq 0x42d0
movb %al, 0xe0(%r14)
movb $0x1, 0xe1(%r14)
movb $0x30, 0xe0(%r14)
movl %r15d, %esi
movq %rbx, %rdi
callq 0x41e0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rax
movl 0x18(%rbx,%rax), %ecx
andl $-0x4b, %ecx
orl $0x2, %ecx
movl %ecx, 0x18(%rbx,%rax)
leaq 0xc83d(%rip), %rsi      # 0x34461
movl $0x1, %edx
movq %rbx, %rdi
jmp 0x27ffd
testb %al, %al
je 0x27d50
movq 0x14390(%rip), %r15     # 0x3bfd0
leaq 0xc2bd(%rip), %rsi      # 0x33f04
movl $0x8, %edx
movq %r15, %rdi
callq 0x4340
movl 0x204(%r14), %esi
movq %r15, %rdi
callq 0x41e0
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rcx
movq $0x7, 0x10(%r12,%rcx)
movq -0x18(%rax), %rax
leaq (%r12,%rax), %r15
cmpb $0x0, 0xe1(%r12,%rax)
jne 0x27ca5
movq %r15, %rdi
movl $0x20, %esi
callq 0x42d0
movb %al, 0xe0(%r15)
movb $0x1, 0xe1(%r15)
movb $0x20, 0xe0(%r15)
leaq 0xc7ad(%rip), %r15      # 0x34461
movl $0x1, %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x4340
movq %r12, %rdi
movq %rbx, %rsi
callq 0x28bbe
movq %rax, %r12
leaq 0xba17(%rip), %rax      # 0x336f0
leaq 0xba17(%rip), %rsi      # 0x336f7
cmpb $0x0, 0x1cc(%r14)
cmovneq %rax, %rsi
movl $0x6, %edx
movq %r12, %rdi
callq 0x4340
leaq 0xc17e(%rip), %rsi      # 0x33e7e
movl $0x24, %edx
movq %r12, %rdi
callq 0x4340
movl 0x444(%rbx), %esi
movq %r12, %rdi
callq 0x41e0
movq %rax, %rbx
leaq 0xc17e(%rip), %rsi      # 0x33ea3
movl $0xf, %edx
movq %rax, %rdi
callq 0x4340
movl %r13d, %esi
movq %rbx, %rdi
callq 0x41e0
movq %rax, %rbx
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
jmp 0x27ffd
xorl %ebp, %ebp
jmp 0x2802b
testb %al, %al
je 0x27ec4
movq 0x1426a(%rip), %rax     # 0x3bfd0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movq $0x12, 0x10(%rax,%rdx)
movq -0x18(%rcx), %rcx
leaq (%rax,%rcx), %r15
cmpb $0x0, 0xe1(%rax,%rcx)
jne 0x27da4
movq %r15, %rdi
movl $0x20, %esi
callq 0x42d0
movb %al, 0xe0(%r15)
movb $0x1, 0xe1(%r15)
movb $0x20, 0xe0(%r15)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
movq 0x14215(%rip), %rdi     # 0x3bfd0
callq 0x4340
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rcx
movq $0xf, 0x10(%r15,%rcx)
movq -0x18(%rax), %rax
leaq (%r15,%rax), %r12
cmpb $0x0, 0xe1(%r15,%rax)
jne 0x27e04
movq %r12, %rdi
movl $0x20, %esi
callq 0x42d0
movb %al, 0xe0(%r12)
movb $0x1, 0xe1(%r12)
movb $0x20, 0xe0(%r12)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x28bbe
movq %rax, %r15
leaq 0xb8ce(%rip), %rax      # 0x336f0
leaq 0xb8ce(%rip), %rsi      # 0x336f7
cmpb $0x0, 0x1cc(%r14)
cmovneq %rax, %rsi
movl $0x6, %edx
movq %r15, %rdi
callq 0x4340
leaq 0xc035(%rip), %rsi      # 0x33e7e
movl $0x24, %edx
movq %r15, %rdi
callq 0x4340
movl 0x444(%rbx), %esi
movq %r15, %rdi
callq 0x41e0
movq %rax, %r15
leaq 0xc035(%rip), %rsi      # 0x33ea3
movl $0xf, %edx
movq %rax, %rdi
callq 0x4340
movl %r13d, %esi
movq %r15, %rdi
callq 0x41e0
movq %rax, %r15
leaq 0xc5d1(%rip), %rsi      # 0x34461
movl $0x1, %edx
movq %rax, %rdi
callq 0x4340
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x42d0
movsbl %al, %esi
movq %r15, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41f0
movq 0x14105(%rip), %rax     # 0x3bfd0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movq $0x12, 0x10(%rax,%rdx)
movq -0x18(%rcx), %rcx
leaq (%rax,%rcx), %r15
cmpb $0x0, 0xe1(%rax,%rcx)
jne 0x27f09
movq %r15, %rdi
movl $0x20, %esi
callq 0x42d0
movb %al, 0xe0(%r15)
movb $0x1, 0xe1(%r15)
movb $0x20, 0xe0(%r15)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
movq 0x140b0(%rip), %rdi     # 0x3bfd0
callq 0x4340
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rcx
movq $0xf, 0x10(%r15,%rcx)
movq -0x18(%rax), %rax
leaq (%r15,%rax), %r12
cmpb $0x0, 0xe1(%r15,%rax)
jne 0x27f69
movq %r12, %rdi
movl $0x20, %esi
callq 0x42d0
movb %al, 0xe0(%r12)
movb $0x1, 0xe1(%r12)
movb $0x20, 0xe0(%r12)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x28bbe
movq %rax, %r15
leaq 0xb769(%rip), %rax      # 0x336f0
leaq 0xb769(%rip), %rsi      # 0x336f7
cmpb $0x0, 0x1cc(%r14)
cmovneq %rax, %rsi
movl $0x6, %edx
movq %r15, %rdi
callq 0x4340
leaq 0xbed0(%rip), %rsi      # 0x33e7e
movl $0x24, %edx
movq %r15, %rdi
callq 0x4340
movl 0x444(%rbx), %esi
movq %r15, %rdi
callq 0x41e0
movq %rax, %rbx
leaq 0xbed0(%rip), %rsi      # 0x33ea3
movl $0xf, %edx
movq %rax, %rdi
callq 0x4340
movl %r13d, %esi
movq %rbx, %rdi
callq 0x41e0
movq %rax, %rbx
leaq 0xc46c(%rip), %rsi      # 0x34461
movl $0x1, %edx
movq %rax, %rdi
callq 0x4340
xorl %ebp, %ebp
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x42d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41f0
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq