// File: /workspace/github_cpp_makefile_star2_O1/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 0x2da40
movl 0x434(%rbx), %eax
cmpl $0x39, %eax
je 0x2d91f
cmpl $0x38, %eax
jne 0x2dbc0
leaq 0xec3c(%rip), %rax      # 0x3c488
cmpb $0x1, (%rax)
jne 0x2da31
movq 0xe774(%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 0x2d89a
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 0xe71f(%rip), %rdi      # 0x3bfd0
callq 0x4340
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rcx
movq $0xf, 0x10(%r14,%rcx)
movq -0x18(%rax), %rax
leaq (%r14,%rax), %r15
cmpb $0x0, 0xe1(%r14,%rax)
jne 0x2d8f8
movq %r15, %rdi
movl $0x20, %esi
callq 0x42d0
movb %al, 0xe0(%r15)
movb $0x1, 0xe1(%r15)
movb $0x20, 0xe0(%r15)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x28bbe
movq %rax, %rbx
leaq 0x722b(%rip), %rsi      # 0x34b40
movl $0x29, %edx
jmp 0x2d9f4
leaq 0xeb62(%rip), %rax      # 0x3c488
cmpb $0x1, (%rax)
jne 0x2da31
movq 0xe69a(%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 0x2d974
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 0xe645(%rip), %rdi      # 0x3bfd0
callq 0x4340
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rcx
movq $0xf, 0x10(%r14,%rcx)
movq -0x18(%rax), %rax
leaq (%r14,%rax), %r15
cmpb $0x0, 0xe1(%r14,%rax)
jne 0x2d9d2
movq %r15, %rdi
movl $0x20, %esi
callq 0x42d0
movb %al, 0xe0(%r15)
movb $0x1, 0xe1(%r15)
movb $0x20, 0xe0(%r15)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x28bbe
movq %rax, %rbx
leaq 0x717b(%rip), %rsi      # 0x34b6a
movl $0x25, %edx
movq %rax, %rdi
callq 0x4340
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
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x41f0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xe5a9(%rip), %rdi      # 0x3bff0
leaq 0x35d4(%rip), %rsi      # 0x31022
callq 0x42e0
leaq 0x7136(%rip), %r13      # 0x34b90
movq %rax, %rdi
movq %r13, %rsi
callq 0x42e0
leaq 0x3dcb(%rip), %rbp      # 0x31837
movq %rax, %rdi
movq %rbp, %rsi
callq 0x42e0
movq %rax, %rdi
movl $0x4b, %esi
callq 0x4500
leaq 0x35b6(%rip), %r15      # 0x31041
movq %rax, %rdi
movq %r15, %rsi
callq 0x42e0
leaq 0x20(%r14), %r12
movq %rax, %rdi
movq %r12, %rsi
callq 0x4290
leaq 0x7132(%rip), %rsi      # 0x34bde
movq %rax, %rdi
callq 0x42e0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x28bbe
leaq 0x71c5(%rip), %rsi      # 0x34c8b
movq %rax, %rdi
callq 0x42e0
movq 0x8(%r14), %rsi
movq %rax, %rdi
callq 0x40c0
leaq 0x6980(%rip), %rsi      # 0x34461
movq %rax, %rdi
callq 0x42e0
movq %rax, %rdi
callq 0x4170
movq 0xe4f8(%rip), %rdi      # 0x3bff0
leaq 0x3523(%rip), %rsi      # 0x31022
callq 0x42e0
movq %rax, %rdi
movq %r13, %rsi
callq 0x42e0
movq %rax, %rdi
movq %rbp, %rsi
callq 0x42e0
movq %rax, %rdi
movl $0x4c, %esi
callq 0x4500
movq %rax, %rdi
movq %r15, %rsi
callq 0x42e0
movq %rax, %rdi
movq %r12, %rsi
callq 0x4290
leaq 0x70d6(%rip), %rsi      # 0x34c1a
movq %rax, %rdi
callq 0x42e0
movl 0x1cc(%r14), %esi
movq %rax, %rdi
callq 0x4500
leaq 0x70de(%rip), %rsi      # 0x34c40
movq %rax, %rdi
callq 0x42e0
movq 0x1f0(%r14), %rsi
subq 0x1e8(%r14), %rsi
sarq $0x3, %rsi
movq %rax, %rdi
callq 0x40c0
leaq 0x70c7(%rip), %rsi      # 0x34c52
movq %rax, %rdi
callq 0x42e0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x28bbe
leaq 0x5a38(%rip), %rsi      # 0x335dd
movq %rax, %rdi
callq 0x42e0
movl 0x430(%rbx), %esi
movq %rax, %rdi
callq 0x43a0
jmp 0x2dc5d
movq 0xe429(%rip), %rdi      # 0x3bff0
leaq 0x3454(%rip), %rsi      # 0x31022
callq 0x42e0
leaq 0x6fb6(%rip), %rsi      # 0x34b90
movq %rax, %rdi
callq 0x42e0
leaq 0x3c4e(%rip), %rsi      # 0x31837
movq %rax, %rdi
callq 0x42e0
movq %rax, %rdi
movl $0x45, %esi
callq 0x4500
leaq 0x343c(%rip), %rsi      # 0x31041
movq %rax, %rdi
callq 0x42e0
leaq 0x20(%r14), %rsi
movq %rax, %rdi
callq 0x4290
leaq 0x6f8c(%rip), %rsi      # 0x34bac
movq %rax, %rdi
callq 0x42e0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x28bbe
leaq 0x7051(%rip), %rsi      # 0x34c8b
movq %rax, %rdi
callq 0x42e0
movq 0x8(%r14), %rsi
movq %rax, %rdi
callq 0x40c0
leaq 0x680c(%rip), %rsi      # 0x34461
movq %rax, %rdi
callq 0x42e0
movq %rax, %rdi
callq 0x4170
xorl %edi, %edi
callq 0x4360