// File: /workspace/github_cpp_makefile_star2_O3/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 0x26eaa
leal 0x1(%rax), %ecx
movl %ecx, 0x220(%r14)
movl %eax, %r13d
leaq 0x1461b(%rip), %rax     # 0x3b4cc
cmpb $0x1, (%rax)
jne 0x27090
movq %rbx, %rdi
callq 0x28074
movq %rax, %r15
cmpl %r15d, 0x438(%rbx)
jne 0x271d3
leaq 0x145af(%rip), %rax     # 0x3b488
movb (%rax), %al
cmpl %r13d, 0x444(%rbx)
jne 0x27501
movb $0x1, %bpl
testb %al, %al
je 0x277b7
leaq 0x1458f(%rip), %rax     # 0x3b489
cmpb $0x0, (%rax)
jne 0x277b7
movq 0x140c6(%rip), %rax     # 0x3afd0
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 0x26f42
movq %r12, %rdi
movl $0x20, %esi
callq 0x42d0
movb $0x1, 0xe1(%r12)
movb $0x20, 0xe0(%r12)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
movq 0x14076(%rip), %rdi     # 0x3afd0
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 0x26f99
movq %rbp, %rdi
movl $0x20, %esi
callq 0x42d0
movb $0x1, 0xe1(%rbp)
movb $0x20, 0xe0(%rbp)
movq %r12, %rdi
movq %rbx, %rsi
callq 0x28270
movq %rax, %rbx
leaq 0xb7c3(%rip), %rax      # 0x32778
leaq 0xb7c3(%rip), %rsi      # 0x3277f
cmpb $0x0, 0x1cc(%r14)
cmovneq %rax, %rsi
movl $0x6, %edx
movq %rbx, %rdi
callq 0x4340
leaq 0xbef6(%rip), %rsi      # 0x32ed2
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 0x27032
movq %r14, %rdi
movl $0x20, %esi
callq 0x42d0
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 0xbe75(%rip), %rsi      # 0x32ed9
movl $0x7, %edx
movq %rbx, %rdi
callq 0x4340
movl %r13d, %esi
movq %rbx, %rdi
callq 0x41e0
movq %rax, %rbx
leaq 0xbe5b(%rip), %rsi      # 0x32ee1
movl $0x18, %edx
jmp 0x271c3
leaq 0x143f1(%rip), %rax     # 0x3b488
movb (%rax), %al
cmpl %r13d, 0x444(%rbx)
jne 0x273e2
movb $0x1, %bpl
testb %al, %al
je 0x277b7
leaq 0x143d1(%rip), %rax     # 0x3b489
cmpb $0x0, (%rax)
jne 0x277b7
movq 0x13f08(%rip), %rax     # 0x3afd0
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 0x270ff
movq %r15, %rdi
movl $0x20, %esi
callq 0x42d0
movb $0x1, 0xe1(%r15)
movb $0x20, 0xe0(%r15)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
movq 0x13eba(%rip), %rdi     # 0x3afd0
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 0x27157
movq %r12, %rdi
movl $0x20, %esi
callq 0x42d0
movb $0x1, 0xe1(%r12)
movb $0x20, 0xe0(%r12)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x28270
movq %rax, %rbx
leaq 0xb603(%rip), %rax      # 0x32778
leaq 0xb603(%rip), %rsi      # 0x3277f
cmpb $0x0, 0x1cc(%r14)
cmovneq %rax, %rsi
movl $0x6, %edx
movq %rbx, %rdi
callq 0x4340
leaq 0xbd40(%rip), %rsi      # 0x32edc
movl $0x4, %edx
movq %rbx, %rdi
callq 0x4340
movl %r13d, %esi
movq %rbx, %rdi
callq 0x41e0
movq %rax, %rbx
leaq 0xbdaa(%rip), %rsi      # 0x32f68
movl $0x17, %edx
movq %rax, %rdi
callq 0x4340
movb $0x1, %bpl
jmp 0x27790
leaq 0x142ae(%rip), %rax     # 0x3b488
cmpb $0x1, (%rax)
jne 0x274fa
movq 0x13de6(%rip), %rax     # 0x3afd0
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 0x27222
movq %r12, %rdi
movl $0x20, %esi
callq 0x42d0
movb $0x1, 0xe1(%r12)
movb $0x20, 0xe0(%r12)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
movq 0x13d96(%rip), %rdi     # 0x3afd0
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 0x2727a
movq %r13, %rdi
movl $0x20, %esi
callq 0x42d0
movb $0x1, 0xe1(%r13)
movb $0x20, 0xe0(%r13)
movq %r12, %rdi
movq %rbx, %rsi
callq 0x28270
movq %rax, %r12
leaq 0xb4e1(%rip), %rax      # 0x32778
leaq 0xb4e1(%rip), %rsi      # 0x3277f
cmpb $0x0, 0x1cc(%r14)
cmovneq %rax, %rsi
movl $0x6, %edx
movq %r12, %rdi
callq 0x4340
leaq 0xbc71(%rip), %rsi      # 0x32f2f
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 0x27318
movq %r14, %rdi
movl $0x20, %esi
callq 0x42d0
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 0xbc09(%rip), %rsi      # 0x32f56
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 0x273a3
movq %r14, %rdi
movl $0x20, %esi
callq 0x42d0
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 0xc10c(%rip), %rsi      # 0x334e1
movl $0x1, %edx
movq %rbx, %rdi
jmp 0x27789
testb %al, %al
je 0x274fa
movq 0x13bdf(%rip), %r15     # 0x3afd0
leaq 0xbb88(%rip), %rsi      # 0x32f80
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 0x2744f
movq %r15, %rdi
movl $0x20, %esi
callq 0x42d0
movb $0x1, 0xe1(%r15)
movb $0x20, 0xe0(%r15)
leaq 0xc083(%rip), %r15      # 0x334e1
movl $0x1, %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x4340
movq %r12, %rdi
movq %rbx, %rsi
callq 0x28270
movq %rax, %r12
leaq 0xb2f5(%rip), %rax      # 0x32778
leaq 0xb2f5(%rip), %rsi      # 0x3277f
cmpb $0x0, 0x1cc(%r14)
cmovneq %rax, %rsi
movl $0x6, %edx
movq %r12, %rdi
callq 0x4340
leaq 0xba50(%rip), %rsi      # 0x32efa
movl $0x24, %edx
movq %r12, %rdi
callq 0x4340
movl 0x444(%rbx), %esi
movq %r12, %rdi
callq 0x41e0
movq %rax, %rbx
leaq 0xba50(%rip), %rsi      # 0x32f1f
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 0x27789
xorl %ebp, %ebp
jmp 0x277b7
testb %al, %al
je 0x2765f
movq 0x13ac0(%rip), %rax     # 0x3afd0
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 0x27547
movq %r15, %rdi
movl $0x20, %esi
callq 0x42d0
movb $0x1, 0xe1(%r15)
movb $0x20, 0xe0(%r15)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
movq 0x13a72(%rip), %rdi     # 0x3afd0
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 0x2759f
movq %r12, %rdi
movl $0x20, %esi
callq 0x42d0
movb $0x1, 0xe1(%r12)
movb $0x20, 0xe0(%r12)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x28270
movq %rax, %r15
leaq 0xb1bb(%rip), %rax      # 0x32778
leaq 0xb1bb(%rip), %rsi      # 0x3277f
cmpb $0x0, 0x1cc(%r14)
cmovneq %rax, %rsi
movl $0x6, %edx
movq %r15, %rdi
callq 0x4340
leaq 0xb916(%rip), %rsi      # 0x32efa
movl $0x24, %edx
movq %r15, %rdi
callq 0x4340
movl 0x444(%rbx), %esi
movq %r15, %rdi
callq 0x41e0
movq %rax, %r15
leaq 0xb916(%rip), %rsi      # 0x32f1f
movl $0xf, %edx
movq %rax, %rdi
callq 0x4340
movl %r13d, %esi
movq %r15, %rdi
callq 0x41e0
movq %rax, %r15
leaq 0xbeb6(%rip), %rsi      # 0x334e1
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 0x1396a(%rip), %rax     # 0x3afd0
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 0x2769d
movq %r15, %rdi
movl $0x20, %esi
callq 0x42d0
movb $0x1, 0xe1(%r15)
movb $0x20, 0xe0(%r15)
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
movq 0x1391c(%rip), %rdi     # 0x3afd0
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 0x276f5
movq %r12, %rdi
movl $0x20, %esi
callq 0x42d0
movb $0x1, 0xe1(%r12)
movb $0x20, 0xe0(%r12)
movq %r15, %rdi
movq %rbx, %rsi
callq 0x28270
movq %rax, %r15
leaq 0xb065(%rip), %rax      # 0x32778
leaq 0xb065(%rip), %rsi      # 0x3277f
cmpb $0x0, 0x1cc(%r14)
cmovneq %rax, %rsi
movl $0x6, %edx
movq %r15, %rdi
callq 0x4340
leaq 0xb7c0(%rip), %rsi      # 0x32efa
movl $0x24, %edx
movq %r15, %rdi
callq 0x4340
movl 0x444(%rbx), %esi
movq %r15, %rdi
callq 0x41e0
movq %rax, %rbx
leaq 0xb7c0(%rip), %rsi      # 0x32f1f
movl $0xf, %edx
movq %rax, %rdi
callq 0x4340
movl %r13d, %esi
movq %rbx, %rdi
callq 0x41e0
movq %rax, %rbx
leaq 0xbd60(%rip), %rsi      # 0x334e1
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