// File: /workspace/github_cpp_makefile_star2_O2/estwings57[P]CasHMC/sources/VaultController.cpp
// Function: CasHMC::VaultController::CallbackReceiveUp(CasHMC::Packet*, bool)
void VaultController::CallbackReceiveUp(Packet *upEle, bool chkReceive)
{
	if(chkReceive) {
		switch(upEle->CMD) {
			case RD_RS:	DE_CR(ALI(18)<<header<<ALI(15)<<*upEle<<"Up)   RETURNING read data response packet");	break;
			case WR_RS:	DE_CR(ALI(18)<<header<<ALI(15)<<*upEle<<"Up)   RETURNING write response packet");		break;
			default:
				ERROR(header<<"  == Error - WRONG response packet command type  "<<*upEle<<"  (CurrentClock : "<<currentClockCycle<<")");
				exit(0);
				break;
		}
	}
	else {
		ERROR(header<<"  == Error - Vault controller upstream packet buffer FULL  "<<*upEle<<"  (CurrentClock : "<<currentClockCycle<<")");
		ERROR(header<<"             Vault buffer max size : "<<upBufferMax<<", current size : "<<upBuffers.size()<<", "<<*upEle<<" size : "<<upEle->LNG);
		exit(0);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
testl %edx, %edx
je 0x217f2
movl 0x434(%rbx), %eax
cmpl $0x39, %eax
je 0x2175a
cmpl $0x38, %eax
jne 0x2196e
leaq 0xfd40(%rip), %rax      # 0x31488
cmpb $0x0, (%rax)
je 0x217e3
leaq 0x6458(%rip), %r15      # 0x27bb0
jmp 0x2176d
leaq 0xfd27(%rip), %rax      # 0x31488
cmpb $0x0, (%rax)
je 0x217e3
leaq 0x646d(%rip), %r15      # 0x27bda
movq 0xf85c(%rip), %rdi      # 0x30fd0
movq (%rdi), %rax
movq -0x18(%rax), %rax
movq $0x12, 0x10(%rdi,%rax)
pushq $0x20
popq %rbp
movl %ebp, %esi
callq 0x4440
addq $0x20, %r14
movq %rax, %rdi
movq %r14, %rsi
callq 0x42b0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0xf, 0x10(%rax,%rcx)
movq %rax, %rdi
movl %ebp, %esi
callq 0x4440
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1e2c8
movq %rax, %rdi
movq %r15, %rsi
callq 0x4300
movq %rax, %rdi
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
movq 0xf7f7(%rip), %rdi      # 0x30ff0
leaq 0x2822(%rip), %rsi      # 0x24022
callq 0x4300
leaq 0x63f4(%rip), %r13      # 0x27c00
movq %rax, %rdi
movq %r13, %rsi
callq 0x4300
leaq 0x3059(%rip), %rbp      # 0x24877
movq %rax, %rdi
movq %rbp, %rsi
callq 0x4300
pushq $0x4b
popq %rsi
movq %rax, %rdi
callq 0x44f0
leaq 0x2806(%rip), %r15      # 0x24041
movq %rax, %rdi
movq %r15, %rsi
callq 0x4300
leaq 0x20(%r14), %r12
movq %rax, %rdi
movq %r12, %rsi
callq 0x42b0
leaq 0x63f2(%rip), %rsi      # 0x27c4e
movq %rax, %rdi
callq 0x4300
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1e2c8
leaq 0x6485(%rip), %rsi      # 0x27cfb
movq %rax, %rdi
callq 0x4300
movq 0x8(%r14), %rsi
movq %rax, %rdi
callq 0x40d0
leaq 0x5c40(%rip), %rsi      # 0x274d1
movq %rax, %rdi
callq 0x4300
movq %rax, %rdi
callq 0x4180
movq 0xf748(%rip), %rdi      # 0x30ff0
leaq 0x2773(%rip), %rsi      # 0x24022
callq 0x4300
movq %rax, %rdi
movq %r13, %rsi
callq 0x4300
movq %rax, %rdi
movq %rbp, %rsi
callq 0x4300
pushq $0x4c
popq %rsi
movq %rax, %rdi
callq 0x44f0
movq %rax, %rdi
movq %r15, %rsi
callq 0x4300
movq %rax, %rdi
movq %r12, %rsi
callq 0x42b0
leaq 0x6398(%rip), %rsi      # 0x27c8a
movq %rax, %rdi
callq 0x4300
movl 0x1cc(%r14), %esi
movq %rax, %rdi
callq 0x44f0
leaq 0x63a0(%rip), %rsi      # 0x27cb0
movq %rax, %rdi
callq 0x4300
movq 0x1f0(%r14), %rsi
subq 0x1e8(%r14), %rsi
sarq $0x3, %rsi
movq %rax, %rdi
callq 0x40d0
leaq 0x6389(%rip), %rsi      # 0x27cc2
movq %rax, %rdi
callq 0x4300
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1e2c8
leaq 0x4d02(%rip), %rsi      # 0x26655
movq %rax, %rdi
callq 0x4300
movl 0x430(%rbx), %esi
movq %rax, %rdi
callq 0x43c0
jmp 0x21a09
movq 0xf67b(%rip), %rdi      # 0x30ff0
leaq 0x26a6(%rip), %rsi      # 0x24022
callq 0x4300
leaq 0x6278(%rip), %rsi      # 0x27c00
movq %rax, %rdi
callq 0x4300
leaq 0x2ee0(%rip), %rsi      # 0x24877
movq %rax, %rdi
callq 0x4300
pushq $0x45
popq %rsi
movq %rax, %rdi
callq 0x44f0
leaq 0x2690(%rip), %rsi      # 0x24041
movq %rax, %rdi
callq 0x4300
leaq 0x20(%r14), %rsi
movq %rax, %rdi
callq 0x42b0
leaq 0x6250(%rip), %rsi      # 0x27c1c
movq %rax, %rdi
callq 0x4300
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1e2c8
leaq 0x6315(%rip), %rsi      # 0x27cfb
movq %rax, %rdi
callq 0x4300
movq 0x8(%r14), %rsi
movq %rax, %rdi
callq 0x40d0
leaq 0x5ad0(%rip), %rsi      # 0x274d1
movq %rax, %rdi
callq 0x4300
movq %rax, %rdi
callq 0x4180
xorl %edi, %edi
callq 0x4370