LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/estwings57[P]CasHMC/sources/DRAM.cpp
// Function: CasHMC::DRAM::powerUp()
void DRAM::powerUp()
{
	for(int b=0; b<NUM_BANKS; b++) {
		bankStates[b]->lastCommand = POWERDOWN_EXIT;
		bankStates[b]->currentBankState = AWAKING;
		bankStates[b]->stateChangeCountdown = tXP;
		bankStates[b]->nextActivate = currentClockCycle + tXP;
	}
	DEBUG(ALI(39)<<header<<"AWAKE DRAM power down mode   nextActivate time : "<<bankStates[0]->nextActivate);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x202fc(%rip), %rax     # 0x3c580
movslq (%rax), %rax
testq %rax, %rax
jle 0x1c2c9
movq 0x1d8(%rbx), %rcx
leaq 0x2034e(%rip), %rdx     # 0x3c5e8
movl (%rdx), %edx
movq %rdx, %rsi
addq 0x8(%rbx), %rsi
xorl %edi, %edi
movq (%rcx,%rdi,8), %r8
movl $0xa, 0x38(%r8)
movl $0x5, 0x4(%r8)
movl %edx, 0x3c(%r8)
movq %rsi, 0x10(%r8)
incq %rdi
cmpq %rdi, %rax
jne 0x1c2a5
leaq 0x201b8(%rip), %rax     # 0x3c488
cmpb $0x0, (%rax)
je 0x1c2e1
leaq 0x201ad(%rip), %rax     # 0x3c489
cmpb $0x0, (%rax)
je 0x1c2e9
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x1fce0(%rip), %rax     # 0x3bfd0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movq $0x27, 0x10(%rax,%rdx)
movq -0x18(%rcx), %rcx
leaq (%rax,%rcx), %r14
cmpb $0x0, 0xe1(%rax,%rcx)
jne 0x1c32e
movq %r14, %rdi
movl $0x20, %esi
callq 0x42d0
movb %al, 0xe0(%r14)
movb $0x1, 0xe1(%r14)
movb $0x20, 0xe0(%r14)
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
movq 0x1fc8b(%rip), %rdi     # 0x3bfd0
callq 0x4340
movq %rax, %r14
leaq 0x16d4a(%rip), %rsi     # 0x3309e
movl $0x31, %edx
movq %rax, %rdi
callq 0x4340
movq 0x1d8(%rbx), %rax
movq (%rax), %rax
movq 0x10(%rax), %rsi
movq %r14, %rdi
callq 0x41e0
movq %rax, %rbx
movq (%rax), %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 %r14
jmp 0x41f0
// File: /workspace/github_cpp_makefile_star2_O1/estwings57[P]CasHMC/sources/DRAM.cpp
// Function: CasHMC::DRAM::Update()
void DRAM::Update()
{
	//update bank states
	for(int b=0; b<NUM_BANKS; b++) {
		if(bankStates[b]->stateChangeCountdown>0) {
			//decrement counters
			bankStates[b]->stateChangeCountdown--;

			//if counter has reached 0, change state
			if(bankStates[b]->stateChangeCountdown == 0) {
				switch(bankStates[b]->lastCommand) {
					//only these commands have an implicit state change
					case WRITE_P:
					case READ_P:
						bankStates[b]->currentBankState = PRECHARGING;
						bankStates[b]->lastCommand = PRECHARGE;
						bankStates[b]->stateChangeCountdown = tRP;
						break;
					case REFRESH:
					case PRECHARGE:
					case POWERDOWN_EXIT:
						bankStates[b]->currentBankState = IDLE;
						break;
					default:
						break;
				}
			}
		}
	}
	
	UpdateState();
	Step();
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0x201cd(%rip), %rax     # 0x3c580
movslq (%rax), %rax
testq %rax, %rax
jle 0x1c42a
movq 0x1d8(%rbx), %rcx
leaq 0x201fb(%rip), %rdx     # 0x3c5c4
movl (%rdx), %edx
xorl %esi, %esi
movl $0x580, %edi            # imm = 0x580
movl $0x14, %r8d
movq (%rcx,%rsi,8), %r9
movl 0x3c(%r9), %r10d
testl %r10d, %r10d
je 0x1c422
decl %r10d
movl %r10d, 0x3c(%r9)
jne 0x1c422
movl 0x38(%r9), %r10d
cmpl $0xa, %r10d
ja 0x1c422
btl %r10d, %edi
jae 0x1c408
movl $0x0, 0x4(%r9)
jmp 0x1c422
btl %r10d, %r8d
jae 0x1c422
movl $0x2, 0x4(%r9)
movl $0x7, 0x38(%r9)
movl %edx, 0x3c(%r9)
incq %rsi
cmpq %rsi, %rax
jne 0x1c3d8
movq %rbx, %rdi
callq 0x1c438
incq 0x8(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/estwings57[P]CasHMC/sources/DRAM.cpp
// Function: CasHMC::DRAM::UpdateState()
void DRAM::UpdateState()
{
	if(readData != NULL) {
		dataCyclesLeft--;
		if(dataCyclesLeft == 0) {
			vaultContP->ReturnCommand(readData);
			readData = NULL;
		}
	}

	//Send back return command to vault controller
	if(readReturnCountdown.size() > 0 && readReturnCountdown[0] == 0) {
		readData = readReturnDATA[0];
		dataCyclesLeft = BL;
		readReturnDATA.erase(readReturnDATA.begin());
		readReturnCountdown.erase(readReturnCountdown.begin());
	}
	
	for(int i=0; i<readReturnCountdown.size(); i++) {
		readReturnCountdown[i]--;
	}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x208(%rdi), %rsi
testq %rsi, %rsi
je 0x1c467
decl 0x210(%rbx)
jne 0x1c467
movq 0x1d0(%rbx), %rdi
callq 0x2dc6c
movq $0x0, 0x208(%rbx)
movq 0x230(%rbx), %rax
cmpq %rax, 0x238(%rbx)
je 0x1c4e6
cmpl $0x0, (%rax)
jne 0x1c4e6
movq 0x218(%rbx), %rdi
movq 0x220(%rbx), %rdx
movq (%rdi), %rax
movq %rax, 0x208(%rbx)
leaq 0x200f1(%rip), %rax     # 0x3c58c
movl (%rax), %eax
shrl $0x5, %eax
movl %eax, 0x210(%rbx)
leaq 0x8(%rdi), %rsi
cmpq %rdx, %rsi
je 0x1c4b7
subq %rsi, %rdx
callq 0x4480
addq $-0x8, 0x220(%rbx)
movq 0x230(%rbx), %rdi
movq 0x238(%rbx), %rdx
leaq 0x4(%rdi), %rsi
cmpq %rdx, %rsi
je 0x1c4de
subq %rsi, %rdx
callq 0x4480
addq $-0x4, 0x238(%rbx)
movq 0x230(%rbx), %rax
movq 0x238(%rbx), %rcx
subq %rax, %rcx
je 0x1c512
sarq $0x2, %rcx
cmpq $0x1, %rcx
adcq $0x0, %rcx
xorl %edx, %edx
decl (%rax,%rdx,4)
incq %rdx
cmpq %rdx, %rcx
jne 0x1c507
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/estwings57[P]CasHMC/sources/DRAM.cpp
// Function: CasHMC::DRAM::PrintState()
void DRAM::PrintState()
{
	bool printDR = false;
	for(int b=0; b<NUM_BANKS; b++) {
		if(previousBankState[b] != bankStates[b]->currentBankState) {
			printDR = true;
			break;
		}
	}
	
	if(printDR) {
		STATEN(ALI(17)<<header);
		STATEN("State");
		for(int b=0; b<NUM_BANKS; b++) {
			previousBankState[b] = bankStates[b]->currentBankState;
			STATEN("[");
			STATEN(*bankStates[b]);
			if(bankStates[b]->currentBankState == ROW_ACTIVE) {
				STATEN("-"<<bankStates[b]->openRowAddress);
			}
			STATEN("]");
		}
		STATEN(endl);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x2005a(%rip), %rbp     # 0x3c580
movslq (%rbp), %rax
testq %rax, %rax
jle 0x1c703
movq %rdi, %rbx
movq 0x1d8(%rdi), %rcx
movq 0x1f0(%rdi), %rdx
xorl %esi, %esi
movl (%rdx,%rsi,4), %edi
movq (%rcx,%rsi,8), %r8
cmpl 0x4(%r8), %edi
jne 0x1c560
incq %rsi
cmpq %rsi, %rax
jne 0x1c546
jmp 0x1c703
leaq 0x1ff23(%rip), %r12     # 0x3c48a
cmpb $0x1, (%r12)
jne 0x1c5cf
movq 0x1fa5b(%rip), %rax     # 0x3bfd0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movq $0x11, 0x10(%rax,%rdx)
movq -0x18(%rcx), %rcx
leaq (%rax,%rcx), %r14
cmpb $0x0, 0xe1(%rax,%rcx)
jne 0x1c5b3
movq %r14, %rdi
movl $0x20, %esi
callq 0x42d0
movb %al, 0xe0(%r14)
movb $0x1, 0xe1(%r14)
movb $0x20, 0xe0(%r14)
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
movq 0x1fa06(%rip), %rdi     # 0x3bfd0
callq 0x4340
cmpb $0x1, (%r12)
jne 0x1c5ee
movq 0x1f9f3(%rip), %rdi     # 0x3bfd0
leaq 0x16aec(%rip), %rsi     # 0x330d0
movl $0x5, %edx
callq 0x4340
cmpl $0x0, (%rbp)
jle 0x1c6c0
xorl %r15d, %r15d
movq 0x1f9ce(%rip), %r14     # 0x3bfd0
leaq 0x16479(%rip), %r13     # 0x32a82
movq 0x1d8(%rbx), %rax
movq 0x1f0(%rbx), %rcx
movq (%rax,%r15,8), %rax
movl 0x4(%rax), %eax
movl %eax, (%rcx,%r15,4)
cmpb $0x1, (%r12)
jne 0x1c63d
movl $0x1, %edx
movq %r14, %rdi
leaq 0x15a6e(%rip), %rsi     # 0x320a6
callq 0x4340
cmpb $0x1, (%r12)
jne 0x1c657
movq 0x1d8(%rbx), %rax
movq (%rax,%r15,8), %rsi
movq %r14, %rdi
callq 0x63dd
movq 0x1d8(%rbx), %rax
movq (%rax,%r15,8), %rax
cmpl $0x1, 0x4(%rax)
jne 0x1c699
cmpb $0x1, (%r12)
jne 0x1c699
movl $0x1, %edx
movq %r14, %rdi
leaq 0x152b9(%rip), %rsi     # 0x31937
callq 0x4340
movq 0x1d8(%rbx), %rax
movq (%rax,%r15,8), %rax
movl 0x8(%rax), %esi
movq %r14, %rdi
callq 0x41e0
cmpb $0x1, (%r12)
jne 0x1c6b0
movl $0x1, %edx
movq %r14, %rdi
movq %r13, %rsi
callq 0x4340
incq %r15
movslq (%rbp), %rax
cmpq %rax, %r15
jl 0x1c609
cmpb $0x0, (%r12)
je 0x1c703
movq 0x1f902(%rip), %rbx     # 0x3bfd0
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
// File: /workspace/github_cpp_makefile_star2_O1/estwings57[P]CasHMC/sources/DRAMCommand.cpp
// Function: CasHMC::DRAMCommand::DRAMCommand(CasHMC::DRAMCommand const&)
DRAMCommand::DRAMCommand(const DRAMCommand &dc)
{
	trace = dc.trace;
	commandType = dc.commandType;
	packetTAG = dc.packetTAG;
	bank = dc.bank;
	column = dc.column;
	row = dc.row;
	dataSize = dc.dataSize;
	posted = dc.posted;
	lastCMD = dc.lastCMD;
	packetCMD = dc.packetCMD;
	atomic = dc.atomic;
	segment = dc.segment;
}

// Assembly:
leaq 0x1f061(%rip), %rax     # 0x3bac0
movq %rax, (%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x8(%rdi)
movl 0x10(%rsi), %eax
movl %eax, 0x10(%rdi)
movl 0x14(%rsi), %eax
movl %eax, 0x14(%rdi)
movl 0x18(%rsi), %eax
movl %eax, 0x18(%rdi)
movl 0x1c(%rsi), %eax
movl %eax, 0x1c(%rdi)
movl 0x20(%rsi), %eax
movl %eax, 0x20(%rdi)
movl 0x24(%rsi), %eax
movl %eax, 0x24(%rdi)
movb 0x28(%rsi), %al
movb %al, 0x28(%rdi)
movb 0x29(%rsi), %al
movb %al, 0x29(%rdi)
movl 0x2c(%rsi), %eax
movl %eax, 0x2c(%rdi)
movb 0x30(%rsi), %al
movb %al, 0x30(%rdi)
movb 0x31(%rsi), %al
movb %al, 0x31(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/estwings57[P]CasHMC/sources/HMC.cpp
// Function: CasHMC::HMC::~HMC()
HMC::~HMC()
{
	for(int l=0; l<NUM_LINKS; l++) {
		delete downLinkSlaves[l];
		delete upLinkMasters[l];
	}
	downLinkSlaves.clear();
	upLinkMasters.clear();

	delete crossbarSwitch;
	crossbarSwitch = NULL;

	for(int v=0; v<NUM_VAULTS; v++) {
		delete vaultControllers[v];
		delete drams[v];
	}
	vaultControllers.clear();
	drams.clear();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x1e303(%rip), %rax     # 0x3baf0
movq %rax, (%rdi)
leaq 0x1ecb1(%rip), %r14     # 0x3c4a8
cmpl $0x0, (%r14)
jle 0x1d837
xorl %r15d, %r15d
movq 0x1d0(%rbx), %rax
movq (%rax,%r15,8), %rdi
testq %rdi, %rdi
je 0x1d816
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x1e8(%rbx), %rax
movq (%rax,%r15,8), %rdi
testq %rdi, %rdi
je 0x1d82c
movq (%rdi), %rax
callq *0x8(%rax)
incq %r15
movslq (%r14), %rax
cmpq %rax, %r15
jl 0x1d800
movq 0x1d0(%rbx), %rax
cmpq %rax, 0x1d8(%rbx)
je 0x1d84e
movq %rax, 0x1d8(%rbx)
movq 0x1e8(%rbx), %rax
cmpq %rax, 0x1f0(%rbx)
je 0x1d865
movq %rax, 0x1f0(%rbx)
movq 0x200(%rbx), %rdi
testq %rdi, %rdi
je 0x1d877
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x200(%rbx)
leaq 0x1ecf3(%rip), %r14     # 0x3c57c
cmpl $0x0, (%r14)
jle 0x1d8c9
xorl %r15d, %r15d
movq 0x208(%rbx), %rax
movq (%rax,%r15,8), %rdi
testq %rdi, %rdi
je 0x1d8a8
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x220(%rbx), %rax
movq (%rax,%r15,8), %rdi
testq %rdi, %rdi
je 0x1d8be
movq (%rdi), %rax
callq *0x8(%rax)
incq %r15
movslq (%r14), %rax
cmpq %rax, %r15
jl 0x1d892
movq 0x208(%rbx), %rax
cmpq %rax, 0x210(%rbx)
je 0x1d8e0
movq %rax, 0x210(%rbx)
movq 0x220(%rbx), %rdi
cmpq %rdi, 0x228(%rbx)
je 0x1d8f7
movq %rdi, 0x228(%rbx)
testq %rdi, %rdi
je 0x1d90b
movq 0x230(%rbx), %rsi
subq %rdi, %rsi
callq 0x4300
movq 0x208(%rbx), %rdi
testq %rdi, %rdi
je 0x1d926
movq 0x218(%rbx), %rsi
subq %rdi, %rsi
callq 0x4300
movq 0x1e8(%rbx), %rdi
testq %rdi, %rdi
je 0x1d941
movq 0x1f8(%rbx), %rsi
subq %rdi, %rsi
callq 0x4300
movq 0x1d0(%rbx), %rdi
testq %rdi, %rdi
je 0x1d95c
movq 0x1e0(%rbx), %rsi
subq %rdi, %rsi
callq 0x4300
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x17d50
nop
// File: /workspace/github_cpp_makefile_star2_O1/estwings57[P]CasHMC/sources/HMC.cpp
// Function: CasHMC::HMC::Update()
void HMC::Update()
{	
	for(int l=0; l<NUM_LINKS; l++) {
		downLinkSlaves[l]->Update();
	}
	crossbarSwitch->Update();
	for(int v=0; v<NUM_VAULTS; v++) {
		vaultControllers[v]->Update();
	}
	for(int v=0; v<NUM_VAULTS; v++) {
		drams[v]->Update();
	}
	for(int l=0; l<NUM_LINKS; l++) {
		upLinkMasters[l]->Update();
	}
	clockTuner++;
	Step();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1eb14(%rip), %r14     # 0x3c4a8
cmpl $0x0, (%r14)
jle 0x1d9b9
xorl %r15d, %r15d
movq 0x1d0(%rbx), %rax
movq (%rax,%r15,8), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
incq %r15
movslq (%r14), %rax
cmpq %rax, %r15
jl 0x1d99d
movq 0x200(%rbx), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
leaq 0x1ebaf(%rip), %r15     # 0x3c57c
cmpl $0x0, (%r15)
jle 0x1d9f2
xorl %r12d, %r12d
movq 0x208(%rbx), %rax
movq (%rax,%r12,8), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
incq %r12
movslq (%r15), %rax
cmpq %rax, %r12
jl 0x1d9d6
cmpl $0x0, (%r15)
jle 0x1da17
xorl %r12d, %r12d
movq 0x220(%rbx), %rax
movq (%rax,%r12,8), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
incq %r12
movslq (%r15), %rax
cmpq %rax, %r12
jl 0x1d9fb
cmpl $0x0, (%r14)
jle 0x1da3c
xorl %r15d, %r15d
movq 0x1e8(%rbx), %rax
movq (%rax,%r15,8), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
incq %r15
movslq (%r14), %rax
cmpq %rax, %r15
jl 0x1da20
incq 0x1c8(%rbx)
incq 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/estwings57[P]CasHMC/sources/HMC.cpp
// Function: CasHMC::HMC::PrintState()
void HMC::PrintState()
{
	for(int l=0; l<NUM_LINKS; l++) {
		downLinkSlaves[l]->PrintState();
	}
	crossbarSwitch->PrintState();
	for(int v=0; v<NUM_VAULTS; v++) {
		vaultControllers[v]->PrintState();
	}
	for(int v=0; v<NUM_VAULTS; v++) {
		drams[v]->PrintState();
	}
	for(int l=0; l<NUM_LINKS; l++) {
		upLinkMasters[l]->PrintState();
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1ea42(%rip), %r14     # 0x3c4a8
cmpl $0x0, (%r14)
jle 0x1da8a
xorl %r15d, %r15d
movq 0x1d0(%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0x2803c
incq %r15
movslq (%r14), %rax
cmpq %rax, %r15
jl 0x1da6f
movq 0x200(%rbx), %rdi
callq 0x1a1b2
leaq 0x1eadf(%rip), %r15     # 0x3c57c
cmpl $0x0, (%r15)
jle 0x1dac1
xorl %r12d, %r12d
movq 0x208(%rbx), %rax
movq (%rax,%r12,8), %rdi
callq 0x2fe66
incq %r12
movslq (%r15), %rax
cmpq %rax, %r12
jl 0x1daa6
cmpl $0x0, (%r15)
jle 0x1dae5
xorl %r12d, %r12d
movq 0x220(%rbx), %rax
movq (%rax,%r12,8), %rdi
callq 0x1c514
incq %r12
movslq (%r15), %rax
cmpq %rax, %r12
jl 0x1daca
cmpl $0x0, (%r14)
jle 0x1db09
xorl %r15d, %r15d
movq 0x1e8(%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0x25b4a
incq %r15
movslq (%r14), %rax
cmpq %rax, %r15
jl 0x1daee
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/estwings57[P]CasHMC/sources/HMCController.cpp
// Function: CasHMC::HMCController::~HMCController()
HMCController::~HMCController()
{
	for(int l=0; l<NUM_LINKS; l++) {
		delete downLinkMasters[l];
		delete upLinkSlaves[l];
	}
	downLinkMasters.clear();
	upLinkSlaves.clear();
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x1d1eb(%rip), %rax     # 0x3bb30
movq %rax, (%rdi)
leaq 0x1db59(%rip), %r14     # 0x3c4a8
cmpl $0x0, (%r14)
jle 0x1e98f
xorl %r15d, %r15d
movq 0x208(%rbx), %rax
movq (%rax,%r15,8), %rdi
testq %rdi, %rdi
je 0x1e96e
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x220(%rbx), %rax
movq (%rax,%r15,8), %rdi
testq %rdi, %rdi
je 0x1e984
movq (%rdi), %rax
callq *0x8(%rax)
incq %r15
movslq (%r14), %rax
cmpq %rax, %r15
jl 0x1e958
movq 0x208(%rbx), %rax
cmpq %rax, 0x210(%rbx)
je 0x1e9a6
movq %rax, 0x210(%rbx)
movq 0x220(%rbx), %rax
cmpq %rax, 0x228(%rbx)
je 0x1e9bd
movq %rax, 0x228(%rbx)
movq 0x338(%rbx), %rdi
testq %rdi, %rdi
je 0x1e9d8
movq 0x348(%rbx), %rsi
subq %rdi, %rsi
callq 0x4300
movq 0x320(%rbx), %rdi
testq %rdi, %rdi
je 0x1e9f3
movq 0x330(%rbx), %rsi
subq %rdi, %rsi
callq 0x4300
leaq 0x2f8(%rbx), %rdi
callq 0x17d96
leaq 0x2d0(%rbx), %rdi
callq 0x17d96
movq 0x2b8(%rbx), %rdi
testq %rdi, %rdi
je 0x1ea26
movq 0x2c8(%rbx), %rsi
subq %rdi, %rsi
callq 0x4300
movq 0x2a0(%rbx), %rdi
testq %rdi, %rdi
je 0x1ea41
movq 0x2b0(%rbx), %rsi
subq %rdi, %rsi
callq 0x4300
movq 0x288(%rbx), %rdi
testq %rdi, %rdi
je 0x1ea5c
movq 0x298(%rbx), %rsi
subq %rdi, %rsi
callq 0x4300
movq 0x220(%rbx), %rdi
testq %rdi, %rdi
je 0x1ea77
movq 0x230(%rbx), %rsi
subq %rdi, %rsi
callq 0x4300
movq 0x208(%rbx), %rdi
testq %rdi, %rdi
je 0x1ea92
movq 0x218(%rbx), %rsi
subq %rdi, %rsi
callq 0x4300
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x21e72
jmp 0x1eaa1
movq %rax, %rdi
callq 0x13940
nop
// File: /workspace/github_cpp_makefile_star2_O1/estwings57[P]CasHMC/sources/HMCController.cpp
// Function: CasHMC::HMCController::CallbackReceiveDown(CasHMC::Transaction*, bool)
void HMCController::CallbackReceiveDown(Transaction *downEle, bool chkReceive)
{
	if(chkReceive) {
		//Check transaction address
		downEle->address &= ((uint64_t)NUM_VAULTS*NUM_BANKS*NUM_COLS*NUM_ROWS - 1);
		downEle->trace->tranTransmitTime = currentClockCycle;
		if(downEle->transactionType == DATA_WRITE)	downEle->trace->statis->hmcTransmitSize += downEle->dataSize;
		//DEBUG(ALI(18)<<header<<ALI(15)<<*downEle<<"Down) RECEIVING transaction");
	}
	else {
		//DEBUG(ALI(18)<<header<<ALI(15)<<*downEle<<"Down) Transaction buffer FULL");
	}
}

// Assembly:
testl %edx, %edx
je 0x1eb2e
leaq 0x1da9f(%rip), %rax     # 0x3c57c
movslq (%rax), %rax
leaq 0x1da99(%rip), %rcx     # 0x3c580
movslq (%rcx), %rcx
imulq %rax, %rcx
leaq 0x1da93(%rip), %rax     # 0x3c588
movslq (%rax), %rax
leaq 0x1da85(%rip), %rdx     # 0x3c584
movslq (%rdx), %rdx
imulq %rax, %rdx
imulq %rcx, %rdx
decq %rdx
andq %rdx, 0x18(%rsi)
movl 0x8(%rdi), %ecx
movq 0x8(%rsi), %rax
movl %ecx, 0x8(%rax)
cmpl $0x1, 0x10(%rsi)
jne 0x1eb2e
movl 0x20(%rsi), %ecx
movq (%rax), %rax
addq %rcx, 0x128(%rax)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/estwings57[P]CasHMC/sources/Link.cpp
// Function: CasHMC::Link::NoisePacket(CasHMC::Packet*)
void Link::NoisePacket(Packet *packet)
{
	for(int i=0; i<packet->LNG; i++) {
		unsigned ranNum1 = rand();
		unsigned ranNum2 = rand();	
		if(ranNum1%errorProba == 0 && ranNum2%errorProba == 0) {
			DE_CR(ALI(18)<<header<<ALI(15)<<*packet<<(downstream ? "Down) " : "Up)   ")<<"====> Link ERROR is occurred <====");
			packet->CRC = ~packet->CRC;
			break;
		}
	}
}

// Assembly:
cmpl $0x0, 0x430(%rsi)
je 0x22a9c
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
callq 0x40e0
movl %eax, %ebp
callq 0x40e0
movl %eax, %ecx
movl 0x1d0(%r14), %esi
movl %ebp, %eax
xorl %edx, %edx
divl %esi
testl %edx, %edx
jne 0x2294f
movl %ecx, %eax
xorl %edx, %edx
divl %esi
testl %edx, %edx
je 0x22960
incl %r15d
cmpl 0x430(%rbx), %r15d
jb 0x22926
jmp 0x22a94
leaq 0x19b21(%rip), %rax     # 0x3c488
cmpb $0x1, (%rax)
jne 0x22a8e
movq 0x19659(%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 0x229b5
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 0x19604(%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 0x22a15
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 0x10cbd(%rip), %rax     # 0x336f0
leaq 0x10cbd(%rip), %rsi     # 0x336f7
cmpb $0x0, 0x1cc(%r14)
cmovneq %rax, %rsi
movl $0x6, %edx
movq %r15, %rdi
callq 0x4340
leaq 0x10d27(%rip), %rsi     # 0x33781
movl $0x22, %edx
movq %r15, %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
notl 0x438(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/estwings57[P]CasHMC/sources/Link.cpp
// Function: CasHMC::Link::PrintState()
void Link::PrintState()
{
	if(inFlightPacket != NULL) {
		STATEN(ALI(17)<<header);
		STATEN((downstream ? "Down " : " Up  "));
		STATEN(*inFlightPacket);
		STATE("*"<<inFlightPacket->LNG);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpq $0x0, 0x1f0(%rdi)
je 0x22bd0
movq %rdi, %rbx
leaq 0x199cf(%rip), %r15     # 0x3c48a
cmpb $0x1, (%r15)
jne 0x22b22
movq 0x19508(%rip), %rax     # 0x3bfd0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movq $0x11, 0x10(%rax,%rdx)
movq -0x18(%rcx), %rcx
leaq (%rax,%rcx), %r14
cmpb $0x0, 0xe1(%rax,%rcx)
jne 0x22b06
movq %r14, %rdi
movl $0x20, %esi
callq 0x42d0
movb %al, 0xe0(%r14)
movb $0x1, 0xe1(%r14)
movb $0x20, 0xe0(%r14)
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
movq 0x194b3(%rip), %rdi     # 0x3bfd0
callq 0x4340
cmpb $0x1, (%r15)
jne 0x22b52
leaq 0x103dd(%rip), %rax     # 0x32f0c
leaq 0x103dc(%rip), %rsi     # 0x32f12
cmpb $0x0, 0x1cc(%rbx)
cmovneq %rax, %rsi
movq 0x19488(%rip), %rdi     # 0x3bfd0
movl $0x5, %edx
callq 0x4340
cmpb $0x1, (%r15)
jne 0x22b6b
movq 0x1f0(%rbx), %rsi
movq 0x1946a(%rip), %rdi     # 0x3bfd0
callq 0x28bbe
cmpb $0x1, (%r15)
jne 0x22bd0
movq 0x19458(%rip), %r14     # 0x3bfd0
leaq 0xe76a(%rip), %rsi      # 0x312e9
movl $0x1, %edx
movq %r14, %rdi
callq 0x4340
movq 0x1f0(%rbx), %rax
movl 0x430(%rax), %esi
movq %r14, %rdi
callq 0x41e0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x42d0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x41f0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/estwings57[P]CasHMC/sources/LinkMaster.cpp
// Function: CasHMC::LinkMaster::UpdateRetryPointer(CasHMC::Packet*)
void LinkMaster::UpdateRetryPointer(Packet *packet)
{
	if(retBufReadP != packet->RRP) {
		do {
			if(retryBuffers[retBufReadP] != NULL) {
				delete retryBuffers[retBufReadP];
			}
			retryBuffers[retBufReadP] = NULL;
			retBufReadP++;
			retBufReadP = (retBufReadP < MAX_RETRY_BUF) ? retBufReadP : retBufReadP - MAX_RETRY_BUF;
		} while(retBufReadP != packet->RRP);
		DEBUG(ALI(18)<<header<<ALI(15)<<*packet<<(downstream ? "Down) " : "Up)   ")<<"Retry buffer READ POINTER is updated ("<<retBufReadP<<")");
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl 0x25c(%rdi), %eax
cmpl 0x44c(%rsi), %eax
je 0x22f79
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x195af(%rip), %r15     # 0x3c4bc
xorl %ebp, %ebp
movl 0x25c(%rbx), %eax
movq 0x270(%rbx), %rcx
movq (%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x22f2b
movq (%rdi), %rax
callq *0x8(%rax)
movl 0x25c(%rbx), %eax
movq 0x270(%rbx), %rcx
movq $0x0, (%rcx,%rax,8)
incl %eax
movl %eax, 0x25c(%rbx)
movl (%r15), %ecx
cmpl %ecx, %eax
cmovbl %ebp, %ecx
subl %ecx, %eax
movl %eax, 0x25c(%rbx)
cmpl 0x44c(%r14), %eax
jne 0x22f0f
leaq 0x19520(%rip), %rax     # 0x3c488
cmpb $0x1, (%rax)
jne 0x22f79
leaq 0x19515(%rip), %rax     # 0x3c489
cmpb $0x0, (%rax)
je 0x22f82
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x19047(%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 0x22fc7
movq %r15, %rdi
movl $0x20, %esi
callq 0x42d0
movb %al, 0xe0(%r15)
movb $0x1, 0xe1(%r15)
movb $0x20, 0xe0(%r15)
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
movq 0x18ff2(%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 0x23027
movq %r12, %rdi
movl $0x20, %esi
callq 0x42d0
movb %al, 0xe0(%r12)
movb $0x1, 0xe1(%r12)
movb $0x20, 0xe0(%r12)
movq %r15, %rdi
movq %r14, %rsi
callq 0x28bbe
movq %rax, %r14
leaq 0x106ab(%rip), %rax     # 0x336f0
leaq 0x106ab(%rip), %rsi     # 0x336f7
cmpb $0x0, 0x1cc(%rbx)
cmovneq %rax, %rsi
movl $0x6, %edx
movq %r14, %rdi
callq 0x4340
leaq 0x10771(%rip), %rsi     # 0x337dc
movl $0x26, %edx
movq %r14, %rdi
callq 0x4340
movl 0x25c(%rbx), %esi
movq %r14, %rdi
callq 0x41e0
movq %rax, %rbx
leaq 0x113d1(%rip), %rsi     # 0x34461
movl $0x1, %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
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x41f0
// File: /workspace/github_cpp_makefile_star2_O1/estwings57[P]CasHMC/sources/LinkMaster.cpp
// Function: CasHMC::LinkMaster::UpdateToken(CasHMC::Packet*)
void LinkMaster::UpdateToken(Packet *packet)
{
	if(packet->RTC != 0) {
		tokenCount += packet->RTC;
		DEBUG(ALI(18)<<header<<ALI(15)<<*packet<<(downstream ? "Down) " : "Up)   ")<<"Extracted RTC : "<<packet->RTC<<"  TOKEN COUNT register : "<<tokenCount);
		if(tokenCount > MAX_LINK_BUF) {
			ERROR(header<<"  == Error - TOKEN COUNT register is over the maximum  (CurrentClock : "<<currentClockCycle<<")");
			exit(0);
		}
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl 0x43c(%rsi), %eax
testl %eax, %eax
je 0x2362f
movq %rdi, %rbx
addl %eax, 0x208(%rdi)
leaq 0x18fda(%rip), %rax     # 0x3c488
cmpb $0x1, (%rax)
jne 0x2361e
leaq 0x18fcb(%rip), %rax     # 0x3c489
cmpb $0x0, (%rax)
jne 0x2361e
movq %rsi, %r14
movq 0x18aff(%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 0x2350f
movq %r15, %rdi
movl $0x20, %esi
callq 0x42d0
movb %al, 0xe0(%r15)
movb $0x1, 0xe1(%r15)
movb $0x20, 0xe0(%r15)
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
movq 0x18aaa(%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 0x2356f
movq %r12, %rdi
movl $0x20, %esi
callq 0x42d0
movb %al, 0xe0(%r12)
movb $0x1, 0xe1(%r12)
movb $0x20, 0xe0(%r12)
movq %r15, %rdi
movq %r14, %rsi
callq 0x28bbe
movq %rax, %r15
leaq 0x10163(%rip), %rax     # 0x336f0
leaq 0x10163(%rip), %rsi     # 0x336f7
cmpb $0x0, 0x1cc(%rbx)
cmovneq %rax, %rsi
movl $0x6, %edx
movq %r15, %rdi
callq 0x4340
leaq 0x10295(%rip), %rsi     # 0x33848
movl $0x10, %edx
movq %r15, %rdi
callq 0x4340
movl 0x43c(%r14), %esi
movq %r15, %rdi
callq 0x41e0
movq %rax, %r14
leaq 0x10280(%rip), %rsi     # 0x33859
movl $0x19, %edx
movq %rax, %rdi
callq 0x4340
movl 0x208(%rbx), %esi
movq %r14, %rdi
callq 0x41e0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x42d0
movsbl %al, %esi
movq %r14, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41f0
movl 0x208(%rbx), %eax
leaq 0x18e8d(%rip), %rcx     # 0x3c4b8
cmpl (%rcx), %eax
ja 0x2363b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x189ae(%rip), %rdi     # 0x3bff0
leaq 0xd9d9(%rip), %rsi      # 0x31022
callq 0x42e0
leaq 0x1021e(%rip), %rsi     # 0x33873
movq %rax, %rdi
callq 0x42e0
leaq 0xe1d3(%rip), %rsi      # 0x31837
movq %rax, %rdi
callq 0x42e0
movq %rax, %rdi
movl $0x71, %esi
callq 0x4500
leaq 0xd9c1(%rip), %rsi      # 0x31041
movq %rax, %rdi
callq 0x42e0
leaq 0x20(%rbx), %rsi
movq %rax, %rdi
callq 0x4290
leaq 0x101ef(%rip), %rsi     # 0x3388a
movq %rax, %rdi
callq 0x42e0
movq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x40c0
leaq 0x10dab(%rip), %rsi     # 0x34461
movq %rax, %rdi
callq 0x42e0
movq %rax, %rdi
callq 0x4170
xorl %edi, %edi
callq 0x4360
nop
// File: /workspace/github_cpp_makefile_star2_O1/estwings57[P]CasHMC/sources/LinkMaster.cpp
// Function: CasHMC::LinkMaster::FinishRetry()
void LinkMaster::FinishRetry()
{
	DEBUG(ALI(33)<<header<<(downstream ? "Down) " : "Up)   ")<<"RETRY sequence is finished");
	currentState = ACTIVE;
	header.erase(header.find(")"));
	header += ")";
	delete retryStartPacket;
	retryStartPacket = NULL;
	retryAttempts = 1;
	startRetryTimer = false;
	uint64_t retryTime;
	if(downstream) {
		retryTime = retryTimer;
	}
	else {
		retryTime = ceil(retryTimer * (double)tCK/CPU_CLK_PERIOD);
	}
	linkP->statis->errorRetryLat.push_back(retryTime);
	retryTimer = 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x17ef6(%rip), %rax     # 0x3c488
cmpb $0x1, (%rax)
jne 0x24670
leaq 0x17ee7(%rip), %rax     # 0x3c489
cmpb $0x0, (%rax)
jne 0x24670
movq 0x17a1e(%rip), %rax     # 0x3bfd0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movq $0x21, 0x10(%rax,%rdx)
movq -0x18(%rcx), %rcx
leaq (%rax,%rcx), %r14
cmpb $0x0, 0xe1(%rax,%rcx)
jne 0x245f0
movq %r14, %rdi
movl $0x20, %esi
callq 0x42d0
movb %al, 0xe0(%r14)
movb $0x1, 0xe1(%r14)
movb $0x20, 0xe0(%r14)
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
movq 0x179c9(%rip), %rdi     # 0x3bfd0
callq 0x4340
movq %rax, %r14
leaq 0xf0da(%rip), %rax      # 0x336f0
leaq 0xf0da(%rip), %rsi      # 0x336f7
cmpb $0x0, 0x1cc(%rbx)
cmovneq %rax, %rsi
movl $0x6, %edx
movq %r14, %rdi
callq 0x4340
leaq 0xf435(%rip), %rsi      # 0x33a71
movl $0x1a, %edx
movq %r14, %rdi
callq 0x4340
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x42d0
movsbl %al, %esi
movq %r14, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41f0
movl $0x0, 0x200(%rbx)
leaq 0x20(%rbx), %r14
leaq 0xfddc(%rip), %rsi      # 0x34461
movl $0x1, %ecx
movq %r14, %rdi
xorl %edx, %edx
callq 0x4510
movq 0x28(%rbx), %rcx
cmpq %rax, %rcx
jb 0x24780
movq %rax, 0x28(%rbx)
movq 0x20(%rbx), %rcx
movb $0x0, (%rcx,%rax)
leaq 0xfdad(%rip), %rsi      # 0x34461
movq %r14, %rdi
callq 0x4580
movq 0x248(%rbx), %rdi
testq %rdi, %rdi
je 0x246ce
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x248(%rbx)
movl $0x1, 0x258(%rbx)
movb $0x0, 0x251(%rbx)
movl 0x254(%rbx), %eax
cmpb $0x0, 0x1cc(%rbx)
jne 0x24738
movl %eax, %eax
cvtsi2sd %rax, %xmm0
leaq 0x17e99(%rip), %rax     # 0x3c5a0
mulsd (%rax), %xmm0
leaq 0x17d86(%rip), %rax     # 0x3c498
divsd (%rax), %xmm0
callq 0x4090
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0xeab9(%rip), %xmm0     # 0x331e8
cvttsd2si %xmm0, %rdx
andl %ecx, %edx
orl %edx, %eax
movq 0x210(%rbx), %rcx
movq 0x1e0(%rcx), %rdi
movl %eax, 0x4(%rsp)
movq 0x58(%rdi), %rsi
cmpq 0x60(%rdi), %rsi
je 0x24760
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x58(%rdi)
jmp 0x2476e
addq $0x50, %rdi
leaq 0x4(%rsp), %rdx
callq 0x14060
movl $0x0, 0x254(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0xe158(%rip), %rdi      # 0x328df
leaq 0xe198(%rip), %rsi      # 0x32926
movq %rax, %rdx
xorl %eax, %eax
callq 0x4410
// File: /workspace/github_cpp_makefile_star2_O1/estwings57[P]CasHMC/sources/LinkMaster.cpp
// Function: CasHMC::LinkMaster::CRCCountdown(int, CasHMC::Packet*)
void LinkMaster::CRCCountdown(int writeP, Packet *packet)
{
	if(CRC_CHECK && !startCRC) {
		startCRC = true;
		countdownCRC = ceil((double)CRC_CAL_CYCLE * packet->LNG);
	}
	
	if(CRC_CHECK && countdownCRC > 0) {
		DEBUG(ALI(18)<<header<<ALI(15)<<*packet<<(downstream ? "Down) " : "Up)   ")
				<<"WAITING CRC calculation ("<<countdownCRC<<"/"<<ceil((double)CRC_CAL_CYCLE*packet->LNG)<<")");
	}
	else {
		UpdateField(writeP, packet);
	}
	countdownCRC = (countdownCRC>0) ? countdownCRC-1 : 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x1752b(%rip), %rax     # 0x3c4cc
movb (%rax), %r15b
cmpb $0x1, %r15b
jne 0x2519c
cmpb $0x0, 0x240(%rbx)
jne 0x24fe4
movb $0x1, 0x240(%rbx)
leaq 0x1750b(%rip), %rax     # 0x3c4d0
movl 0x430(%r14), %ecx
cvtsi2sd %rcx, %xmm0
mulsd (%rax), %xmm0
callq 0x4090
cvttsd2si %xmm0, %eax
movl %eax, 0x23c(%rbx)
testb %r15b, %r15b
je 0x2519c
cmpl $0x0, 0x23c(%rbx)
jle 0x2519c
leaq 0x17487(%rip), %rax     # 0x3c488
cmpb $0x1, (%rax)
jne 0x251a9
leaq 0x17478(%rip), %rax     # 0x3c489
cmpb $0x0, (%rax)
jne 0x251a9
movq 0x16faf(%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 0x2505f
movq %r15, %rdi
movl $0x20, %esi
callq 0x42d0
movb %al, 0xe0(%r15)
movb $0x1, 0xe1(%r15)
movb $0x20, 0xe0(%r15)
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
movq 0x16f5a(%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 0x250bf
movq %r12, %rdi
movl $0x20, %esi
callq 0x42d0
movb %al, 0xe0(%r12)
movb $0x1, 0xe1(%r12)
movb $0x20, 0xe0(%r12)
movq %r15, %rdi
movq %r14, %rsi
callq 0x28bbe
movq %rax, %r15
leaq 0xe613(%rip), %rax      # 0x336f0
leaq 0xe613(%rip), %rsi      # 0x336f7
cmpb $0x0, 0x1cc(%rbx)
cmovneq %rax, %rsi
movl $0x6, %edx
movq %r15, %rdi
callq 0x4340
leaq 0xea67(%rip), %rsi      # 0x33b6a
movl $0x19, %edx
movq %r15, %rdi
callq 0x4340
movl 0x23c(%rbx), %esi
movq %r15, %rdi
callq 0x4500
movq %rax, %r15
leaq 0xc172(%rip), %rsi      # 0x3129a
movl $0x1, %edx
movq %rax, %rdi
callq 0x4340
leaq 0x17394(%rip), %rax     # 0x3c4d0
movl 0x430(%r14), %ecx
xorps %xmm0, %xmm0
cvtsi2sd %rcx, %xmm0
mulsd (%rax), %xmm0
callq 0x4090
movq %r15, %rdi
callq 0x4460
movq %rax, %r14
leaq 0xf2fb(%rip), %rsi      # 0x34461
movl $0x1, %edx
movq %rax, %rdi
callq 0x4340
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x42d0
movsbl %al, %esi
movq %r14, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41f0
jmp 0x251a9
movq %rbx, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x251c8
movl 0x23c(%rbx), %eax
leal -0x1(%rax), %ecx
xorl %edx, %edx
testl %eax, %eax
cmovgl %ecx, %edx
movl %edx, 0x23c(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/estwings57[P]CasHMC/sources/LinkMaster.cpp
// Function: CasHMC::LinkMaster::QuitePacket()
void LinkMaster::QuitePacket()
{
	//packet, cmd, addr, cub, lng, *lat
	Packet *packetQUIET = new Packet(FLOW, QUIET, 0, 0, 1, NULL);
	packetQUIET->RRP = lastestRRP;
	DEBUG(ALI(18)<<header<<ALI(15)<<*packetQUIET<<(downstream ? "Down) " : "Up)   ")<<"sending QUITE packet");
	linkRxTx.push_back(packetQUIET);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x468, %edi            # imm = 0x468
callq 0x42f0
movq %rax, %r14
movq $0x0, (%rsp)
movq %rax, %rdi
movl $0x2, %esi
movl $0x4, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0x284bc
movq %r14, 0x8(%rsp)
movl 0x20c(%rbx), %eax
movl %eax, 0x44c(%r14)
leaq 0x16cbd(%rip), %rax     # 0x3c488
cmpb $0x1, (%rax)
jne 0x25900
leaq 0x16cae(%rip), %rax     # 0x3c489
cmpb $0x0, (%rax)
jne 0x25900
movq 0x167e5(%rip), %rax     # 0x3bfd0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movq $0x12, 0x10(%rax,%rdx)
movq -0x18(%rcx), %rcx
leaq (%rax,%rcx), %r14
cmpb $0x0, 0xe1(%rax,%rcx)
jne 0x25829
movq %r14, %rdi
movl $0x20, %esi
callq 0x42d0
movb %al, 0xe0(%r14)
movb $0x1, 0xe1(%r14)
movb $0x20, 0xe0(%r14)
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
movq 0x16790(%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 0x25887
movq %r15, %rdi
movl $0x20, %esi
callq 0x42d0
movb %al, 0xe0(%r15)
movb $0x1, 0xe1(%r15)
movb $0x20, 0xe0(%r15)
movq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x28bbe
movq %rax, %r14
leaq 0xde4a(%rip), %rax      # 0x336f0
leaq 0xde4a(%rip), %rsi      # 0x336f7
cmpb $0x0, 0x1cc(%rbx)
cmovneq %rax, %rsi
movl $0x6, %edx
movq %r14, %rdi
callq 0x4340
leaq 0xe32d(%rip), %rsi      # 0x33bf9
movl $0x14, %edx
movq %r14, %rdi
callq 0x4340
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x42d0
movsbl %al, %esi
movq %r14, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41f0
movq 0x1f0(%rbx), %rsi
cmpq 0x1f8(%rbx), %rsi
je 0x25922
movq 0x8(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x1f0(%rbx)
jmp 0x25936
addq $0x1e8, %rbx            # imm = 0x1E8
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x1ac5a
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movl $0x468, %esi            # imm = 0x468
movq %r14, %rdi
callq 0x4300
movq %rbx, %rdi
callq 0x4540
// File: /workspace/github_cpp_makefile_star2_O1/estwings57[P]CasHMC/sources/LinkMaster.cpp
// Function: CasHMC::LinkMaster::FinishRetrain()
void LinkMaster::FinishRetrain()
{
	currentState = ACTIVE;
	//The requester must send a minimum of 32 NULL FLITs before sending the first nonNULL flow packet
	Packet *packetNULL = NULL;
	for(int i=0; i<32; i++) {
		packetNULL = new Packet(FLOW, NULL_, 0, 0, 1, NULL);
		linkRxTx.push_back(packetNULL);
	}
	DEBUG(ALI(18)<<header<<ALI(15)<<*packetNULL<<(downstream ? "Down) " : "Up)   ")
			<<"sending a minimum of 32 NULL FLITs before entering ACTIVE mode");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x0, 0x200(%rdi)
leaq 0x8(%rsp), %r14
movq $0x0, (%r14)
leaq 0x1e8(%rdi), %r15
movl $0x20, %ebp
movl $0x468, %edi            # imm = 0x468
callq 0x42f0
movq %rax, %r12
movq $0x0, (%rsp)
movq %rax, %rdi
movl $0x2, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0x284bc
movq %r12, 0x8(%rsp)
movq 0x1f0(%rbx), %rsi
cmpq 0x1f8(%rbx), %rsi
je 0x259da
movq %r12, (%rsi)
addq $0x8, 0x1f0(%rbx)
jmp 0x259e5
movq %r15, %rdi
movq %r14, %rdx
callq 0x1ac5a
decl %ebp
jne 0x25989
leaq 0x16a98(%rip), %rax     # 0x3c488
cmpb $0x0, (%rax)
je 0x25b25
leaq 0x16a89(%rip), %rax     # 0x3c489
cmpb $0x0, (%rax)
jne 0x25b25
movq 0x165c0(%rip), %rax     # 0x3bfd0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movq $0x12, 0x10(%rax,%rdx)
movq -0x18(%rcx), %rcx
leaq (%rax,%rcx), %r14
cmpb $0x0, 0xe1(%rax,%rcx)
jne 0x25a4e
movq %r14, %rdi
movl $0x20, %esi
callq 0x42d0
movb %al, 0xe0(%r14)
movb $0x1, 0xe1(%r14)
movb $0x20, 0xe0(%r14)
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
movq 0x1656b(%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 0x25aac
movq %r15, %rdi
movl $0x20, %esi
callq 0x42d0
movb %al, 0xe0(%r15)
movb $0x1, 0xe1(%r15)
movb $0x20, 0xe0(%r15)
movq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x28bbe
movq %rax, %r14
leaq 0xdc25(%rip), %rax      # 0x336f0
leaq 0xdc25(%rip), %rsi      # 0x336f7
cmpb $0x0, 0x1cc(%rbx)
cmovneq %rax, %rsi
movl $0x6, %edx
movq %r14, %rdi
callq 0x4340
leaq 0xe11d(%rip), %rsi      # 0x33c0e
movl $0x3e, %edx
movq %r14, %rdi
callq 0x4340
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x42d0
movsbl %al, %esi
movq %r14, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41f0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x468, %esi            # imm = 0x468
movq %r12, %rdi
callq 0x4300
movq %rbx, %rdi
callq 0x4540
// File: /workspace/github_cpp_makefile_star2_O1/estwings57[P]CasHMC/sources/LinkMaster.cpp
// Function: CasHMC::FindAvailableLink(int&, std::vector<CasHMC::LinkMaster*, std::allocator<CasHMC::LinkMaster*>>&)
int FindAvailableLink(int &link, vector<LinkMaster *> &LM)
{
	switch(LINK_PRIORITY) {
		case ROUND_ROBIN:
			if(++link >= NUM_LINKS)
				link=0;
			return link;
			break;
		case BUFFER_AWARE:
			unsigned minBufferSize = MAX_LINK_BUF;
			unsigned minBufferLink = 0;
			for(int l=0; l<NUM_LINKS; l++) {
				if(LM[l]->currentState != ACTIVE && LM[l]->currentState != LINK_RETRY) {
					continue;
				}
				else {
					int bufSizeTemp = LM[l]->Buffers.size();
					for(int i=0; i<LM[l]->linkRxTx.size(); i++) {
						if(LM[l]->linkRxTx[i] != NULL) {
							bufSizeTemp += LM[l]->linkRxTx[i]->LNG;
						}
					}
					if(bufSizeTemp < minBufferSize) {
						minBufferSize = bufSizeTemp;
						minBufferLink = l;
					}
				}
			}
			return minBufferLink;
			break;
	}
	return -1;
}

// Assembly:
pushq %rbx
leaq 0x1619a(%rip), %rax     # 0x3c4e4
movl (%rax), %ecx
cmpl $0x1, %ecx
je 0x26379
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x26414
movl (%rdi), %ecx
incl %ecx
movl %ecx, (%rdi)
leaq 0x1613d(%rip), %rdx     # 0x3c4a8
xorl %eax, %eax
cmpl (%rdx), %ecx
cmovll %ecx, %eax
movl %eax, (%rdi)
jmp 0x26414
leaq 0x16128(%rip), %rax     # 0x3c4a8
movslq (%rax), %rcx
testq %rcx, %rcx
jle 0x26412
leaq 0x16125(%rip), %rax     # 0x3c4b8
movl (%rax), %edx
movq (%rsi), %rsi
xorl %edi, %edi
xorl %eax, %eax
movq (%rsi,%rdi,8), %r10
movl 0x200(%r10), %r8d
cmpl $0xb, %r8d
je 0x263b2
testl %r8d, %r8d
jne 0x26408
movq 0x1d8(%r10), %r8
subq 0x1d0(%r10), %r8
movq 0x1e8(%r10), %r9
shrq $0x3, %r8
movq 0x1f0(%r10), %r10
subq %r9, %r10
je 0x263fe
sarq $0x3, %r10
cmpq $0x1, %r10
adcq $0x0, %r10
xorl %r11d, %r11d
movq (%r9,%r11,8), %rbx
testq %rbx, %rbx
je 0x263f6
addl 0x430(%rbx), %r8d
incq %r11
cmpq %r11, %r10
jne 0x263e6
cmpl %edx, %r8d
cmovbl %r8d, %edx
cmovbl %edi, %eax
incq %rdi
cmpq %rcx, %rdi
jne 0x2639c
jmp 0x26414
xorl %eax, %eax
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/estwings57[P]CasHMC/sources/SingleVectorObject.h
// Function: CasHMC::SingleVectorObject<CasHMC::Packet>::Step()
void Step() {
		currentClockCycle++;
		for(int i=0; i<Buffers.size(); i++) {
			if(Buffers[i] != NULL) {
				Buffers[i]->bufPopDelay = (Buffers[i]->bufPopDelay>0) ? Buffers[i]->bufPopDelay-1 : 0;
			}
		}
	}

// Assembly:
incq 0x8(%rdi)
movq 0x1d0(%rdi), %rax
movq 0x1d8(%rdi), %rcx
subq %rax, %rcx
je 0x26585
sarq $0x3, %rcx
cmpq $0x1, %rcx
adcq $0x0, %rcx
xorl %edx, %edx
xorl %esi, %esi
movq (%rax,%rsi,8), %rdi
testq %rdi, %rdi
je 0x2657d
movl 0x14(%rdi), %r8d
leal -0x1(%r8), %r9d
testl %r8d, %r8d
cmovlel %edx, %r9d
movl %r9d, 0x14(%rdi)
incq %rsi
cmpq %rsi, %rcx
jne 0x26561
retq
// File: /workspace/github_cpp_makefile_star2_O1/estwings57[P]CasHMC/sources/LinkSlave.cpp
// Function: CasHMC::LinkSlave::LinkSlave(std::basic_ofstream<char, std::char_traits<char>>&, std::basic_ofstream<char, std::char_traits<char>>&, unsigned int, bool)
LinkSlave::LinkSlave(ofstream &debugOut_, ofstream &stateOut_, unsigned id, bool down):
	SingleVectorObject<Packet>(debugOut_, stateOut_, MAX_LINK_BUF, down),
	linkSlaveID(id)
{
	classID << linkSlaveID;
	header = "   (LS_";
	header += downstream ? "D" : "U";
	header += classID.str() + ")";
	
	slaveSEQ = 0;
	countdownCRC = 0;
	startCRC = false;
	downBufferDest = NULL;
	upBufferDest = NULL;
	localLinkMaster = NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movl %ecx, %ebp
movq %rdi, %rbx
leaq 0x15e66(%rip), %rax     # 0x3c4b8
movl (%rax), %ecx
callq 0x26416
leaq 0x15640(%rip), %rax     # 0x3bca0
movq %rax, (%rbx)
movl %ebp, 0x204(%rbx)
leaq 0x50(%rbx), %rdi
movl %ebp, %esi
callq 0x41e0
leaq 0x20(%rbx), %r14
movq 0x28(%rbx), %rdx
leaq 0xd882(%rip), %rcx      # 0x33f05
movl $0x7, %r8d
movq %r14, %rdi
xorl %esi, %esi
callq 0x4440
leaq 0xdefb(%rip), %rax      # 0x34595
leaq 0xc869(%rip), %rsi      # 0x32f0a
cmpb $0x0, 0x1cc(%rbx)
cmovneq %rax, %rsi
movq %r14, %rdi
callq 0x4580
leaq 0x58(%rbx), %rsi
leaq 0x28(%rsp), %rdi
callq 0x4450
leaq 0xdd98(%rip), %rsi      # 0x34461
leaq 0x28(%rsp), %rdi
callq 0x4580
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x266fa
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x26701
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x10(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r14, %rdi
callq 0x4110
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x26742
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4300
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2675d
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4300
xorps %xmm0, %xmm0
movups %xmm0, 0x218(%rbx)
movups %xmm0, 0x208(%rbx)
movb $0x0, 0x228(%rbx)
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x2679f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x4300
jmp 0x2679f
movq %rax, %r14
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x267c1
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x4300
jmp 0x267c1
jmp 0x267be
movq %rax, %r14
movq %rbx, %rdi
callq 0x26586
movq %r14, %rdi
callq 0x4540
nop
// File: /workspace/github_cpp_makefile_star2_O1/estwings57[P]CasHMC/sources/LinkSlave.cpp
// Function: CasHMC::LinkSlave::CallbackReceive(CasHMC::Packet*, bool)
void LinkSlave::CallbackReceive(Packet *packet, bool chkReceive)
{
/*	if(chkReceive) {
		DEBUG(ALI(18)<<header<<ALI(15)<<*packet<<(downstream ? "Down) " : "Up)   ")<<"RECEIVING packet");
	}
	else {
		DEBUG(ALI(18)<<header<<ALI(15)<<*packet<<(downstream ? "Down) " : "Up)   ")<<"packet buffer FULL");
	}*/
	
	if(packet->packetType == FLOW) {
		ERROR(header<<"  == Error - flow packet "<<*packet<<" is not meant to be here");
		exit(0);
	}
	else {
		if(!chkReceive) {
			ERROR(header<<"  == Error - packet "<<*packet<<" is missed, because link slave buffer is FULL (CurrentClock : "<<currentClockCycle<<")");
			exit(0);
		}
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpl $0x2, 0x10(%rsi)
je 0x26858
testb %dl, %dl
je 0x268da
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x15791(%rip), %rdi     # 0x3bff0
leaq 0xa7bc(%rip), %rsi      # 0x31022
callq 0x42e0
leaq 0xd432(%rip), %rsi      # 0x33ca4
movq %rax, %rdi
callq 0x42e0
leaq 0xafb6(%rip), %rsi      # 0x31837
movq %rax, %rdi
callq 0x42e0
movq %rax, %rdi
movl $0x35, %esi
callq 0x4500
leaq 0xa7a4(%rip), %rsi      # 0x31041
movq %rax, %rdi
callq 0x42e0
addq $0x20, %r14
movq %rax, %rdi
movq %r14, %rsi
callq 0x4290
leaq 0xd3ff(%rip), %rsi      # 0x33cba
movq %rax, %rdi
callq 0x42e0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x28bbe
leaq 0xd3ff(%rip), %rsi      # 0x33cd4
jmp 0x2696f
movq 0x1570f(%rip), %rdi     # 0x3bff0
leaq 0xa73a(%rip), %rsi      # 0x31022
callq 0x42e0
leaq 0xd3b0(%rip), %rsi      # 0x33ca4
movq %rax, %rdi
callq 0x42e0
leaq 0xaf34(%rip), %rsi      # 0x31837
movq %rax, %rdi
callq 0x42e0
movq %rax, %rdi
movl $0x3a, %esi
callq 0x4500
leaq 0xa722(%rip), %rsi      # 0x31041
movq %rax, %rdi
callq 0x42e0
leaq 0x20(%r14), %rsi
movq %rax, %rdi
callq 0x4290
leaq 0xd3b3(%rip), %rsi      # 0x33ced
movq %rax, %rdi
callq 0x42e0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x28bbe
leaq 0xd3ae(%rip), %rsi      # 0x33d02
movq %rax, %rdi
callq 0x42e0
movq 0x8(%r14), %rsi
movq %rax, %rdi
callq 0x40c0
leaq 0xdaf2(%rip), %rsi      # 0x34461
movq %rax, %rdi
callq 0x42e0
movq %rax, %rdi
callq 0x4170
xorl %edi, %edi
callq 0x4360
// File: /workspace/github_cpp_makefile_star2_O1/estwings57[P]CasHMC/sources/DualVectorObject.h
// Function: CasHMC::DualVectorObject<CasHMC::Transaction, CasHMC::Packet>::ReceiveUp(CasHMC::Packet*)
bool ReceiveUp(UpT *upEle) {
		if(upBuffers.size() + upEle->LNG <= upBufferMax) {
			//Upstream buffer does not need upBufPopCycle (one cycle to pop one buffer data), 
			//	because upBufferDest (upstream buffer destination) is updated before buffer class.
			upBuffers.push_back(upEle);
			//If receiving packet is packet, add virtual tail packet in Buffers as long as packet length
			if(sizeof(*upEle) == sizeof(Packet)) {
				for(int i=1; i<upEle->LNG; i++) {
					upBuffers.push_back(NULL);
				}
			}
			CallbackReceiveUp(upEle, true);
			return true;
		}
		else {
			CallbackReceiveUp(upEle, false);
			return false;
		}
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq %rsi, 0x8(%rsp)
movq 0x1f0(%rdi), %rax
movq %rax, %rcx
subq 0x1e8(%rdi), %rcx
sarq $0x3, %rcx
movl 0x430(%rsi), %r12d
addq %rcx, %r12
movslq 0x1cc(%rdi), %r13
cmpq %r13, %r12
ja 0x28444
leaq 0x1e8(%rbx), %r14
cmpq 0x1f8(%rbx), %rax
je 0x2844e
movq %rsi, (%rax)
addq $0x8, 0x1f0(%rbx)
jmp 0x2845e
movq (%rbx), %rax
movq %rbx, %rdi
xorl %edx, %edx
jmp 0x284a4
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x1ac5a
movq 0x8(%rsp), %rsi
cmpl $0x2, 0x430(%rsi)
jb 0x28499
movl $0x1, %ebp
leaq 0x10(%rsp), %r15
movq $0x0, 0x10(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x1aee0
incl %ebp
movq 0x8(%rsp), %rsi
cmpl 0x430(%rsi), %ebp
jb 0x28476
movq (%rbx), %rax
movq %rbx, %rdi
movl $0x1, %edx
callq *0x20(%rax)
cmpq %r13, %r12
setbe %al
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq