LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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
movq %rdi, %rbx
leaq 0x1c913(%rip), %rbp     # 0x31580
movl (%rbp), %eax
movq 0x1d8(%rdi), %rcx
movq 0x1f0(%rdi), %rdx
xorl %esi, %esi
testl %eax, %eax
cmovlel %esi, %eax
cmpq %rsi, %rax
je 0x14dd6
movl (%rdx,%rsi,4), %edi
movq (%rcx,%rsi,8), %r8
incq %rsi
cmpl 0x4(%r8), %edi
je 0x14c85
leaq 0x1c7e5(%rip), %r12     # 0x3148a
movb (%r12), %al
cmpb $0x1, %al
jne 0x14cdc
movq 0x1c31c(%rip), %rdi     # 0x30fd0
movq (%rdi), %rax
movq -0x18(%rax), %rax
movq $0x11, 0x10(%rdi,%rax)
pushq $0x20
popq %rsi
callq 0x4440
leaq 0x20(%rbx), %rsi
movq %rax, %rdi
callq 0x42b0
movb (%r12), %al
testb $0x1, %al
je 0x14cf3
movq 0x1c2e9(%rip), %rdi     # 0x30fd0
leaq 0x11432(%rip), %rsi     # 0x26120
callq 0x4300
xorl %r15d, %r15d
movq 0x1c2d3(%rip), %r14     # 0x30fd0
leaq 0x10d56(%rip), %r13     # 0x25a5a
movslq (%rbp), %rax
cmpq %rax, %r15
jge 0x14db5
movq 0x1d8(%rbx), %rcx
movq 0x1f0(%rbx), %rax
movq (%rcx,%r15,8), %rdx
movl 0x4(%rdx), %edx
movl %edx, (%rax,%r15,4)
movb (%r12), %al
cmpb $0x1, %al
jne 0x14d4c
movq %r14, %rdi
leaq 0x103aa(%rip), %rsi     # 0x250e6
callq 0x4300
movb (%r12), %al
movq 0x1d8(%rbx), %rcx
testb $0x1, %al
je 0x14d67
movq (%rcx,%r15,8), %rsi
movq %r14, %rdi
callq 0x5b4d
movq 0x1d8(%rbx), %rcx
movb (%r12), %al
movq (%rcx,%r15,8), %rcx
cmpl $0x1, 0x4(%rcx)
jne 0x14d9e
testb $0x1, %al
je 0x14d9e
movq %r14, %rdi
leaq 0xfbf8(%rip), %rsi      # 0x24977
callq 0x4300
movq 0x1d8(%rbx), %rcx
movq (%rcx,%r15,8), %rcx
movl 0x8(%rcx), %esi
movq %rax, %rdi
callq 0x4210
movb (%r12), %al
testb $0x1, %al
je 0x14dad
movq %r14, %rdi
movq %r13, %rsi
callq 0x4300
incq %r15
jmp 0x14d04
cmpb $0x0, (%r12)
je 0x14dd6
movq 0x1c20d(%rip), %rdi     # 0x30fd0
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
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x1b8a9(%rip), %rax     # 0x30ad8
movq %rax, (%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x8(%rdi)
movups 0x10(%rsi), %xmm0
movups %xmm0, 0x10(%rdi)
movq 0x20(%rsi), %rax
movq %rax, 0x20(%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_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x1b09d(%rip), %rax     # 0x30b08
movq %rax, (%rdi)
leaq 0x1d0(%rdi), %r14
leaq 0x1e8(%rdi), %r15
xorl %r12d, %r12d
leaq 0x1ba22(%rip), %r13     # 0x314a8
movslq (%r13), %rcx
movq (%r14), %rax
cmpq %rcx, %r12
jge 0x15ab8
movq (%rax,%r12,8), %rdi
testq %rdi, %rdi
je 0x15aa1
movq (%rdi), %rax
callq *0x8(%rax)
movq (%r15), %rax
movq (%rax,%r12,8), %rdi
testq %rdi, %rdi
je 0x15ab3
movq (%rdi), %rax
callq *0x8(%rax)
incq %r12
jmp 0x15a86
cmpq %rax, 0x1d8(%rbx)
je 0x15ac8
movq %rax, 0x1d8(%rbx)
movq 0x1e8(%rbx), %rax
cmpq %rax, 0x1f0(%rbx)
je 0x15adf
movq %rax, 0x1f0(%rbx)
movq 0x200(%rbx), %rdi
testq %rdi, %rdi
je 0x15af1
movq (%rdi), %rax
callq *0x8(%rax)
andq $0x0, 0x200(%rbx)
leaq 0x208(%rbx), %r12
movq %rbx, (%rsp)
leaq 0x220(%rbx), %r13
xorl %ebp, %ebp
leaq 0x1ba68(%rip), %rbx     # 0x3157c
movslq (%rbx), %rcx
movq (%r12), %rax
cmpq %rcx, %rbp
jge 0x15b47
movq (%rax,%rbp,8), %rdi
testq %rdi, %rdi
je 0x15b2f
movq (%rdi), %rax
callq *0x8(%rax)
movq (%r13), %rax
movq (%rax,%rbp,8), %rdi
testq %rdi, %rdi
je 0x15b42
movq (%rdi), %rax
callq *0x8(%rax)
incq %rbp
jmp 0x15b14
movq (%rsp), %rbx
cmpq %rax, 0x210(%rbx)
je 0x15b5b
movq %rax, 0x210(%rbx)
movq 0x220(%rbx), %rax
cmpq %rax, 0x228(%rbx)
je 0x15b72
movq %rax, 0x228(%rbx)
movq %r13, %rdi
callq 0x15ff8
movq %r12, %rdi
callq 0x15fc4
movq %r15, %rdi
callq 0x136ac
movq %r14, %rdi
callq 0x15f90
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x11246
// File: /workspace/github_cpp_makefile_star2_O2/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
xorl %r15d, %r15d
leaq 0x1b8d3(%rip), %r14     # 0x314a8
movslq (%r14), %rax
cmpq %rax, %r15
jge 0x15bf3
movq 0x1d0(%rbx), %rax
movq (%rax,%r15,8), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
incq %r15
jmp 0x15bd5
movq 0x200(%rbx), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
xorl %r12d, %r12d
leaq 0x1b972(%rip), %r15     # 0x3157c
movslq (%r15), %rax
cmpq %rax, %r12
jge 0x15c28
movq 0x208(%rbx), %rax
movq (%rax,%r12,8), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
incq %r12
jmp 0x15c0a
xorl %r12d, %r12d
cltq
cmpq %rax, %r12
jge 0x15c4b
movq 0x220(%rbx), %rax
movq (%rax,%r12,8), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
incq %r12
movl (%r15), %eax
jmp 0x15c2b
xorl %r15d, %r15d
movslq (%r14), %rax
cmpq %rax, %r15
jge 0x15c6c
movq 0x1e8(%rbx), %rax
movq (%rax,%r15,8), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
incq %r15
jmp 0x15c4e
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_O2/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
xorl %r15d, %r15d
leaq 0x1b80f(%rip), %r14     # 0x314a8
movslq (%r14), %rax
cmpq %rax, %r15
jge 0x15cb6
movq 0x1d0(%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0x1d9d2
incq %r15
jmp 0x15c99
movq 0x200(%rbx), %rdi
callq 0x12e08
xorl %r12d, %r12d
leaq 0x1b8b0(%rip), %r15     # 0x3157c
movslq (%r15), %rax
cmpq %rax, %r12
jge 0x15ce9
movq 0x208(%rbx), %rax
movq (%rax,%r12,8), %rdi
callq 0x2325e
incq %r12
jmp 0x15ccc
xorl %r12d, %r12d
cltq
cmpq %rax, %r12
jge 0x15d0b
movq 0x220(%rbx), %rax
movq (%rax,%r12,8), %rdi
callq 0x14c58
incq %r12
movl (%r15), %eax
jmp 0x15cec
xorl %r15d, %r15d
movslq (%r14), %rax
cmpq %rax, %r15
jge 0x15d2b
movq 0x1e8(%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0x1bfac
incq %r15
jmp 0x15d0e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x1a041(%rip), %rax     # 0x30b48
movq %rax, (%rdi)
leaq 0x208(%rdi), %r14
leaq 0x220(%rdi), %r15
xorl %r12d, %r12d
leaq 0x1a986(%rip), %r13     # 0x314a8
movslq (%r13), %rcx
movq (%r14), %rax
cmpq %rcx, %r12
jge 0x16b54
movq (%rax,%r12,8), %rdi
testq %rdi, %rdi
je 0x16b3d
movq (%rdi), %rax
callq *0x8(%rax)
movq (%r15), %rax
movq (%rax,%r12,8), %rdi
testq %rdi, %rdi
je 0x16b4f
movq (%rdi), %rax
callq *0x8(%rax)
incq %r12
jmp 0x16b22
cmpq %rax, 0x210(%rbx)
je 0x16b64
movq %rax, 0x210(%rbx)
movq 0x220(%rbx), %rax
cmpq %rax, 0x228(%rbx)
je 0x16b7b
movq %rax, 0x228(%rbx)
leaq 0x338(%rbx), %rdi
callq 0xe66e
leaq 0x320(%rbx), %rdi
callq 0xe66e
leaq 0x2f8(%rbx), %rdi
callq 0x10ef4
leaq 0x2d0(%rbx), %rdi
callq 0x10ef4
leaq 0x2b8(%rbx), %rdi
callq 0xe66e
leaq 0x2a0(%rbx), %rdi
callq 0xe66e
leaq 0x288(%rbx), %rdi
callq 0xe66e
movq %r15, %rdi
callq 0x15f90
movq %r14, %rdi
callq 0x136ac
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x19530
// File: /workspace/github_cpp_makefile_star2_O2/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 0x16c74
leaq 0x1a959(%rip), %rax     # 0x3157c
movslq (%rax), %rax
leaq 0x1a953(%rip), %rcx     # 0x31580
movslq (%rcx), %rcx
imulq %rax, %rcx
leaq 0x1a94d(%rip), %rax     # 0x31588
movslq (%rax), %rax
leaq 0x1a93f(%rip), %rdx     # 0x31584
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 0x16c74
movl 0x20(%rsi), %ecx
movq (%rax), %rax
addq %rcx, 0x128(%rax)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/estwings57[P]CasHMC/sources/Link.cpp
// Function: CasHMC::Link::Link(std::basic_ofstream<char, std::char_traits<char>>&, std::basic_ofstream<char, std::char_traits<char>>&, unsigned int, bool, CasHMC::TranStatistic*)
Link::Link(ofstream &debugOut_, ofstream &stateOut_, unsigned id, bool down, TranStatistic *statisP):
	SimulatorObject(debugOut_, stateOut_),
	linkID(id),
	downstream(down),
	statis(statisP)
{
	classID << linkID;
	header = "   (LK_";
	header += downstream ? "D" : "U";
	header += classID.str() + ")";
	
	linkMasterP = NULL;
	linkSlaveP = NULL;
	inFlightPacket = NULL;
	inFlightCountdown = 0;
	
	//The probability of at least one bit error
	//  (pow(10, -LINK_BER) - 1)/pow(10, -LINK_BER) : Probability of no error in one bit
	//  (1 - pow((pow(10, -LINK_BER) - 1)/pow(10, -LINK_BER), 128)) : Probability of at least one bit error in 128 bits
	//  errorProba is square root of bits size per one bit error, because errorProba is over than variable capacity.
	//  Link error will be calculated two times by errorProba respectively
	errorProba = sqrt(1 / (1 - pow((pow(10, -LINK_BER) - 1)/pow(10, -LINK_BER), 128)));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %r9, %r14
movl %r8d, %ebp
movl %ecx, %r15d
movq %rdi, %rbx
callq 0x10de6
leaq 0x1760a(%rip), %rax     # 0x30be8
movq %rax, (%rbx)
movl %r15d, 0x1c8(%rbx)
movb %bpl, 0x1cc(%rbx)
movq %r14, 0x1e0(%rbx)
leaq 0x50(%rbx), %rdi
movl %r15d, %esi
callq 0x4210
leaq 0x20(%rbx), %r14
leaq 0xd153(%rip), %rsi      # 0x26760
movq %r14, %rdi
callq 0x4560
leaq 0xdfe9(%rip), %rax      # 0x27605
leaq 0xc938(%rip), %rsi      # 0x25f5b
cmpb $0x0, 0x1cc(%rbx)
cmovneq %rax, %rsi
movq %r14, %rdi
callq 0x4550
leaq 0x58(%rbx), %rsi
leaq 0x8(%rsp), %rdi
callq 0x4450
leaq 0xde86(%rip), %rdx      # 0x274d1
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0xdeea
leaq 0x28(%rsp), %rsi
movq %r14, %rdi
callq 0x4570
leaq 0x28(%rsp), %rdi
callq 0x4598
leaq 0x8(%rsp), %rdi
callq 0x4598
andq $0x0, 0x1d8(%rbx)
xorps %xmm0, %xmm0
andl $0x0, 0x1f8(%rbx)
movups %xmm0, 0x1e8(%rbx)
leaq 0x17e45(%rip), %r14     # 0x314e0
xorl %ebp, %ebp
xorl %eax, %eax
subl (%r14), %eax
cvtsi2sd %eax, %xmm1
movsd 0xd09a(%rip), %xmm0     # 0x26748
callq 0x4500
addsd 0xd095(%rip), %xmm0     # 0x26750
movsd %xmm0, (%rsp)
subl (%r14), %ebp
cvtsi2sd %ebp, %xmm1
movsd 0xd079(%rip), %xmm0     # 0x26748
callq 0x4500
movsd (%rsp), %xmm2
divsd %xmm0, %xmm2
movsd 0xd073(%rip), %xmm1     # 0x26758
movapd %xmm2, %xmm0
callq 0x4500
movapd %xmm0, %xmm1
movsd 0xa9b6(%rip), %xmm0     # 0x240b0
movapd %xmm0, %xmm2
subsd %xmm1, %xmm2
divsd %xmm2, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x19716
sqrtsd %xmm0, %xmm0
jmp 0x1971b
callq 0x4280
cvttsd2si %xmm0, %rax
movl %eax, 0x1d0(%rbx)
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x28(%rsp), %rdi
callq 0x4598
jmp 0x19743
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x4598
jmp 0x19754
jmp 0x19751
movq %rax, %r14
movq %rbx, %rdi
callq 0x11246
movq %r14, %rdi
callq 0x4520
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
cmpl 0x430(%rbx), %r15d
jae 0x19e0a
callq 0x4100
movl %eax, %ebp
callq 0x4100
movl %eax, %ecx
movl 0x1d0(%r14), %esi
movl %ebp, %eax
xorl %edx, %edx
divl %esi
testl %edx, %edx
jne 0x19d64
movl %ecx, %eax
xorl %edx, %edx
divl %esi
testl %edx, %edx
je 0x19d69
incl %r15d
jmp 0x19d2e
leaq 0x17718(%rip), %rax     # 0x31488
cmpb $0x1, (%rax)
jne 0x19e04
movq 0x17250(%rip), %rdi     # 0x30fd0
movq (%rdi), %rax
movq -0x18(%rax), %rax
movq $0x12, 0x10(%rdi,%rax)
pushq $0x20
popq %rbp
movl %ebp, %esi
callq 0x4440
leaq 0x20(%r14), %rsi
movq %rax, %rdi
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
leaq 0xc996(%rip), %rcx      # 0x26768
leaq 0xc996(%rip), %rsi      # 0x2676f
cmpb $0x0, 0x1cc(%r14)
cmovneq %rcx, %rsi
movq %rax, %rdi
callq 0x4300
leaq 0xca05(%rip), %rsi      # 0x267f9
movq %rax, %rdi
callq 0x4300
movq %rax, %rdi
callq 0x4180
notl 0x438(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
cmpq $0x0, 0x1f0(%rdi)
je 0x19ee8
movq %rdi, %rbx
leaq 0x17658(%rip), %r14     # 0x3148a
movb (%r14), %al
cmpb $0x1, %al
jne 0x19e67
movq 0x17190(%rip), %rdi     # 0x30fd0
movq (%rdi), %rax
movq -0x18(%rax), %rax
movq $0x11, 0x10(%rdi,%rax)
pushq $0x20
popq %rsi
callq 0x4440
leaq 0x20(%rbx), %rsi
movq %rax, %rdi
callq 0x42b0
movb (%r14), %al
testb $0x1, %al
je 0x19e93
leaq 0xc0eb(%rip), %rax      # 0x25f5d
leaq 0xc0ea(%rip), %rsi      # 0x25f63
cmpb $0x0, 0x1cc(%rbx)
cmovneq %rax, %rsi
movq 0x17145(%rip), %rdi     # 0x30fd0
callq 0x4300
movb (%r14), %al
testb $0x1, %al
je 0x19ead
movq 0x1f0(%rbx), %rsi
movq 0x1712b(%rip), %rdi     # 0x30fd0
callq 0x1e2c8
movb (%r14), %al
testb $0x1, %al
je 0x19ee8
movq 0x17118(%rip), %rdi     # 0x30fd0
leaq 0xa46a(%rip), %rsi      # 0x24329
callq 0x4300
movq 0x1f0(%rbx), %rcx
movl 0x430(%rcx), %esi
movq %rax, %rdi
callq 0x4210
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4180
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/estwings57[P]CasHMC/sources/LinkMaster.cpp
// Function: CasHMC::LinkMaster::LinkMaster(std::basic_ofstream<char, std::char_traits<char>>&, std::basic_ofstream<char, std::char_traits<char>>&, unsigned int, bool)
LinkMaster::LinkMaster(ofstream &debugOut_, ofstream &stateOut_, unsigned id, bool down):
	SingleVectorObject<Packet>(debugOut_, stateOut_, MAX_LINK_BUF, down),
	linkMasterID(id)
{
	classID << linkMasterID;
	header = "   (LM_";
	header += downstream ? "D" : "U";
	header += classID.str() + ")";
	
	tokenCount = MAX_LINK_BUF;
	lastestRRP = 0;
	linkP = NULL;
	localLinkSlave = NULL;
	masterSEQ = 0;
	countdownCRC = 0;
	startCRC = false;
	retryStartPacket = NULL;
	readyStartRetry = false;
	startRetryTimer = false;
	retryTimer = 0;
	retryAttempts = 1;
	retBufReadP = 0;
	retBufWriteP = 0;
	retrainTransit = 0;
	firstNull = true;
	
	retryBuffers = vector<Packet *>(MAX_RETRY_BUF, NULL);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x50, %rsp
movl %ecx, %ebp
movq %rdi, %rbx
leaq 0x175ac(%rip), %r12     # 0x314b8
movl (%r12), %ecx
callq 0x1c5b8
leaq 0x16d0c(%rip), %rax     # 0x30c28
movq %rax, (%rbx)
movl %ebp, 0x204(%rbx)
xorps %xmm0, %xmm0
andq $0x0, 0x230(%rbx)
movups %xmm0, 0x220(%rbx)
andq $0x0, 0x280(%rbx)
leaq 0x270(%rbx), %r14
movups %xmm0, 0x270(%rbx)
leaq 0x50(%rbx), %rdi
movl %ebp, %esi
callq 0x4210
leaq 0x20(%rbx), %r15
leaq 0xc8dd(%rip), %rsi      # 0x26840
movq %r15, %rdi
callq 0x4560
leaq 0xd693(%rip), %rax      # 0x27605
leaq 0xbfe2(%rip), %rsi      # 0x25f5b
cmpb $0x0, 0x1cc(%rbx)
cmovneq %rax, %rsi
movq %r15, %rdi
callq 0x4550
leaq 0x58(%rbx), %rsi
leaq 0x30(%rsp), %rdi
callq 0x4450
leaq 0xd530(%rip), %rdx      # 0x274d1
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xdeea
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x4570
leaq 0x10(%rsp), %rdi
callq 0x4598
leaq 0x30(%rsp), %r15
movq %r15, %rdi
callq 0x4598
movl (%r12), %eax
movl %eax, 0x208(%rbx)
andq $0x0, 0x248(%rbx)
andw $0x0, 0x250(%rbx)
xorps %xmm0, %xmm0
andl $0x0, 0x21c(%rbx)
movups %xmm0, 0x20c(%rbx)
andq $0x0, 0x238(%rbx)
movb $0x0, 0x240(%rbx)
movsd 0xc81a(%rip), %xmm0     # 0x26830
movups %xmm0, 0x254(%rbx)
andl $0x0, 0x264(%rbx)
movb $0x1, 0x268(%rbx)
leaq 0x1748a(%rip), %rax     # 0x314bc
movslq (%rax), %rsi
andq $0x0, (%r15)
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
leaq 0xf(%rsp), %rcx
callq 0x1c648
leaq 0x10(%rsp), %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1c7c8
movq %rbx, %rdi
callq 0x136e0
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1a094
movq %rax, %r15
leaq 0x10(%rsp), %rdi
callq 0x4598
jmp 0x1a086
movq %rax, %r15
leaq 0x30(%rsp), %rdi
callq 0x4598
jmp 0x1a097
jmp 0x1a094
movq %rax, %r15
leaq 0x220(%rbx), %r12
movq %r14, %rdi
callq 0x136e0
movq %r12, %rdi
callq 0x136e0
movq %rbx, %rdi
callq 0x1c6e2
movq %r15, %rdi
callq 0x4520
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
pushq %rax
movl 0x25c(%rdi), %ecx
movl 0x44c(%rsi), %eax
cmpl %eax, %ecx
je 0x1a1c9
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x17356(%rip), %r15     # 0x314bc
xorl %ebp, %ebp
movl %ecx, %edx
movq 0x270(%rbx), %rsi
movq (%rsi,%rdx,8), %rdi
testq %rdi, %rdi
je 0x1a196
movq (%rdi), %rax
callq *0x8(%rax)
movl 0x25c(%rbx), %edx
movq 0x270(%rbx), %rsi
movl 0x44c(%r14), %eax
movl %edx, %ecx
andq $0x0, (%rsi,%rdx,8)
incl %ecx
movl (%r15), %edx
cmpl %edx, %ecx
cmovbl %ebp, %edx
subl %edx, %ecx
movl %ecx, 0x25c(%rbx)
cmpl %eax, %ecx
jne 0x1a168
leaq 0x172d0(%rip), %rax     # 0x31488
cmpb $0x1, (%rax)
jne 0x1a1c9
leaq 0x172c5(%rip), %rax     # 0x31489
cmpb $0x0, (%rax)
je 0x1a1d4
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x16df5(%rip), %rdi     # 0x30fd0
movq (%rdi), %rax
movq -0x18(%rax), %rax
movq $0x12, 0x10(%rdi,%rax)
pushq $0x20
popq %rbp
movl %ebp, %esi
callq 0x4440
leaq 0x20(%rbx), %rsi
movq %rax, %rdi
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 %r14, %rsi
callq 0x1e2c8
leaq 0xc53b(%rip), %rcx      # 0x26768
leaq 0xc53b(%rip), %rsi      # 0x2676f
cmpb $0x0, 0x1cc(%rbx)
cmovneq %rcx, %rsi
movq %rax, %rdi
callq 0x4300
leaq 0xc5fa(%rip), %rsi      # 0x26848
movq %rax, %rdi
callq 0x4300
movl 0x25c(%rbx), %esi
movq %rax, %rdi
callq 0x4210
leaq 0xd266(%rip), %rsi      # 0x274d1
movq %rax, %rdi
callq 0x4300
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x4180
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbp
pushq %r14
pushq %rbx
movl 0x43c(%rsi), %eax
testl %eax, %eax
je 0x1a5f5
movq %rdi, %rbx
addl 0x208(%rdi), %eax
movl %eax, 0x208(%rdi)
leaq 0x16f76(%rip), %rcx     # 0x31488
cmpb $0x1, (%rcx)
jne 0x1a5ea
leaq 0x16f67(%rip), %rcx     # 0x31489
cmpb $0x0, (%rcx)
jne 0x1a5ea
movq %rsi, %r14
movq 0x16a9b(%rip), %rdi     # 0x30fd0
movq (%rdi), %rax
movq -0x18(%rax), %rax
movq $0x12, 0x10(%rdi,%rax)
pushq $0x20
popq %rbp
movl %ebp, %esi
callq 0x4440
leaq 0x20(%rbx), %rsi
movq %rax, %rdi
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 %r14, %rsi
callq 0x1e2c8
leaq 0xc1e1(%rip), %rcx      # 0x26768
leaq 0xc1e1(%rip), %rsi      # 0x2676f
cmpb $0x0, 0x1cc(%rbx)
cmovneq %rcx, %rsi
movq %rax, %rdi
callq 0x4300
leaq 0xc30c(%rip), %rsi      # 0x268b4
movq %rax, %rdi
callq 0x4300
movl 0x43c(%r14), %esi
movq %rax, %rdi
callq 0x4210
leaq 0xc2ff(%rip), %rsi      # 0x268c5
movq %rax, %rdi
callq 0x4300
movl 0x208(%rbx), %esi
movq %rax, %rdi
callq 0x4210
movq %rax, %rdi
callq 0x4180
movl 0x208(%rbx), %eax
leaq 0x16ec7(%rip), %rcx     # 0x314b8
cmpl (%rcx), %eax
ja 0x1a5fa
popq %rbx
popq %r14
popq %rbp
retq
movq 0x169ef(%rip), %rdi     # 0x30ff0
leaq 0x9a1a(%rip), %rsi      # 0x24022
callq 0x4300
leaq 0xc2cb(%rip), %rsi      # 0x268df
movq %rax, %rdi
callq 0x4300
leaq 0xa254(%rip), %rsi      # 0x24877
movq %rax, %rdi
callq 0x4300
pushq $0x71
popq %rsi
movq %rax, %rdi
callq 0x44f0
leaq 0x9a04(%rip), %rsi      # 0x24041
movq %rax, %rdi
callq 0x4300
leaq 0x20(%rbx), %rsi
movq %rax, %rdi
callq 0x42b0
leaq 0xc29e(%rip), %rsi      # 0x268f6
movq %rax, %rdi
callq 0x4300
movq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x40d0
leaq 0xce5e(%rip), %rsi      # 0x274d1
movq %rax, %rdi
callq 0x4300
movq %rax, %rdi
callq 0x4180
xorl %edi, %edi
callq 0x4370
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x16423(%rip), %rax     # 0x31488
cmpb $0x1, (%rax)
jne 0x1b0d9
leaq 0x16418(%rip), %rax     # 0x31489
cmpb $0x0, (%rax)
jne 0x1b0d9
movq 0x15f53(%rip), %rdi     # 0x30fd0
movq (%rdi), %rax
movq -0x18(%rax), %rax
movq $0x21, 0x10(%rdi,%rax)
pushq $0x20
popq %rsi
callq 0x4440
leaq 0x20(%rbx), %rsi
movq %rax, %rdi
callq 0x42b0
leaq 0xb6c0(%rip), %rcx      # 0x26768
leaq 0xb6c0(%rip), %rsi      # 0x2676f
cmpb $0x0, 0x1cc(%rbx)
cmovneq %rcx, %rsi
movq %rax, %rdi
callq 0x4300
leaq 0xba14(%rip), %rsi      # 0x26add
movq %rax, %rdi
callq 0x4300
movq %rax, %rdi
callq 0x4180
andl $0x0, 0x200(%rbx)
leaq 0x20(%rbx), %r14
leaq 0xc3e6(%rip), %r15      # 0x274d1
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x4580
pushq $-0x1
popq %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x40b0
movq %r14, %rdi
movq %r15, %rsi
callq 0x4550
movq 0x248(%rbx), %rdi
testq %rdi, %rdi
je 0x1b123
movq (%rdi), %rax
callq *0x8(%rax)
andq $0x0, 0x248(%rbx)
movl $0x1, 0x258(%rbx)
movb $0x0, 0x251(%rbx)
movl 0x254(%rbx), %eax
cmpb $0x0, 0x1cc(%rbx)
jne 0x1b18a
movl %eax, %eax
cvtsi2sd %rax, %xmm0
leaq 0x16447(%rip), %rax     # 0x315a0
mulsd (%rax), %xmm0
leaq 0x16334(%rip), %rax     # 0x31498
divsd (%rax), %xmm0
callq 0x4080
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0xb0b7(%rip), %xmm0     # 0x26238
cvttsd2si %xmm0, %rdx
andl %ecx, %edx
orl %edx, %eax
movq 0x210(%rbx), %rcx
movq 0x1e0(%rcx), %rdi
addq $0x50, %rdi
leaq 0xc(%rsp), %rsi
movl %eax, (%rsi)
callq 0xe3de
andl $0x0, 0x254(%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
pushq %rax
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x15d1c(%rip), %rax     # 0x314cc
cmpb $0x1, (%rax)
jne 0x1b8fe
cmpb $0x1, 0x240(%rbx)
jne 0x1b7ca
movl 0x23c(%rbx), %eax
jmp 0x1b7f7
movb $0x1, 0x240(%rbx)
leaq 0x15cf8(%rip), %rax     # 0x314d0
movl 0x430(%r14), %ecx
cvtsi2sd %rcx, %xmm0
mulsd (%rax), %xmm0
callq 0x4080
cvttsd2si %xmm0, %eax
movl %eax, 0x23c(%rbx)
testl %eax, %eax
jle 0x1b8fe
leaq 0x15c82(%rip), %rax     # 0x31488
cmpb $0x1, (%rax)
jne 0x1b90b
leaq 0x15c73(%rip), %rax     # 0x31489
cmpb $0x0, (%rax)
jne 0x1b90b
movq 0x157aa(%rip), %rdi     # 0x30fd0
movq (%rdi), %rax
movq -0x18(%rax), %rax
movq $0x12, 0x10(%rdi,%rax)
pushq $0x20
popq %rbp
movl %ebp, %esi
callq 0x4440
leaq 0x20(%rbx), %rsi
movq %rax, %rdi
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 %r14, %rsi
callq 0x1e2c8
leaq 0xaef0(%rip), %rcx      # 0x26768
leaq 0xaef0(%rip), %rsi      # 0x2676f
cmpb $0x0, 0x1cc(%rbx)
cmovneq %rcx, %rsi
movq %rax, %rdi
callq 0x4300
leaq 0xb33d(%rip), %rsi      # 0x26bd6
movq %rax, %rdi
callq 0x4300
movl 0x23c(%rbx), %esi
movq %rax, %rdi
callq 0x44f0
leaq 0x8a24(%rip), %rsi      # 0x242da
movq %rax, %rdi
callq 0x4300
movq %rax, %r15
leaq 0x15c08(%rip), %rax     # 0x314d0
movl 0x430(%r14), %ecx
cvtsi2sd %rcx, %xmm0
mulsd (%rax), %xmm0
callq 0x4080
movq %r15, %rdi
callq 0x4470
leaq 0xbbe5(%rip), %rsi      # 0x274d1
movq %rax, %rdi
callq 0x4300
movq %rax, %rdi
callq 0x4180
jmp 0x1b90b
movq %rbx, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x1b92c
movl 0x23c(%rbx), %eax
leal -0x1(%rax), %ecx
xorl %edx, %edx
testl %eax, %eax
cmovgl %ecx, %edx
movl %edx, 0x23c(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movl $0x468, %edi            # imm = 0x468
callq 0x4310
movq %rax, %r14
andq $0x0, (%rsp)
pushq $0x2
popq %rsi
pushq $0x4
popq %rdx
pushq $0x1
popq %r9
movq %rax, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x1dd04
movq %r14, 0x8(%rsp)
movl 0x20c(%rbx), %eax
movl %eax, 0x44c(%r14)
leaq 0x156ff(%rip), %rax     # 0x31488
cmpb $0x1, (%rax)
jne 0x1be2c
leaq 0x156f0(%rip), %rax     # 0x31489
cmpb $0x0, (%rax)
jne 0x1be2c
movq 0x15227(%rip), %rdi     # 0x30fd0
movq (%rdi), %rax
movq -0x18(%rax), %rax
movq $0x12, 0x10(%rdi,%rax)
pushq $0x20
popq %rbp
movl %ebp, %esi
callq 0x4440
leaq 0x20(%rbx), %rsi
movq %rax, %rdi
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 %r14, %rsi
callq 0x1e2c8
leaq 0xa96d(%rip), %rcx      # 0x26768
leaq 0xa96d(%rip), %rsi      # 0x2676f
cmpb $0x0, 0x1cc(%rbx)
cmovneq %rcx, %rsi
movq %rax, %rdi
callq 0x4300
leaq 0xae49(%rip), %rsi      # 0x26c65
movq %rax, %rdi
callq 0x4300
movq %rax, %rdi
callq 0x4180
addq $0x1e8, %rbx            # imm = 0x1E8
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x13442
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movl $0x468, %esi            # imm = 0x468
movq %r14, %rdi
callq 0x4320
movq %rbx, %rdi
callq 0x4520
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
andl $0x0, 0x200(%rdi)
leaq 0x8(%rsp), %r14
andq $0x0, (%r14)
movq %rdi, 0x10(%rsp)
leaq 0x1e8(%rdi), %r15
pushq $0x20
popq %rbx
pushq $0x2
popq %rbp
pushq $0x1
popq %r12
subl $0x1, %ebx
jb 0x1bed3
movl $0x468, %edi            # imm = 0x468
callq 0x4310
movq %rax, %r13
andq $0x0, (%rsp)
movq %rax, %rdi
movl %ebp, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
movl %r12d, %r9d
callq 0x1dd04
movq %r13, 0x8(%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x13442
jmp 0x1be96
leaq 0x155ae(%rip), %rax     # 0x31488
cmpb $0x0, (%rax)
je 0x1bf84
leaq 0x1559f(%rip), %rax     # 0x31489
cmpb $0x0, (%rax)
jne 0x1bf84
movq 0x150d6(%rip), %rdi     # 0x30fd0
movq (%rdi), %rax
movq -0x18(%rax), %rax
movq $0x12, 0x10(%rdi,%rax)
pushq $0x20
popq %rbp
movl %ebp, %esi
callq 0x4440
movq 0x10(%rsp), %rbx
leaq 0x20(%rbx), %rsi
movq %rax, %rdi
callq 0x42b0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq $0xf, 0x10(%rax,%rcx)
movq %rax, %rdi
movl %ebp, %esi
callq 0x4440
movq 0x8(%rsp), %rsi
movq %rax, %rdi
callq 0x1e2c8
leaq 0xa815(%rip), %rcx      # 0x26768
leaq 0xa815(%rip), %rsi      # 0x2676f
cmpb $0x0, 0x1cc(%rbx)
cmovneq %rcx, %rsi
movq %rax, %rdi
callq 0x4300
leaq 0xad06(%rip), %rsi      # 0x26c7a
movq %rax, %rdi
callq 0x4300
movq %rax, %rdi
callq 0x4180
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movl $0x468, %esi            # imm = 0x468
movq %r13, %rdi
callq 0x4320
movq %rbx, %rdi
callq 0x4520
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
leaq 0x14fe8(%rip), %rax     # 0x314e4
movl (%rax), %eax
cmpl $0x1, %eax
je 0x1c522
testl %eax, %eax
jne 0x1c5b1
movl (%rdi), %ecx
incl %ecx
movl %ecx, (%rdi)
leaq 0x14f90(%rip), %rdx     # 0x314a8
xorl %eax, %eax
cmpl (%rdx), %ecx
cmovll %ecx, %eax
movl %eax, (%rdi)
retq
pushq %rbx
leaq 0x14f8e(%rip), %rax     # 0x314b8
movl (%rax), %ecx
leaq 0x14f75(%rip), %rax     # 0x314a8
movl (%rax), %edx
movq (%rsi), %rsi
xorl %edi, %edi
testl %edx, %edx
cmovlel %edi, %edx
xorl %eax, %eax
cmpq %rdx, %rdi
je 0x1c5af
movq (%rsi,%rdi,8), %r10
movl 0x200(%r10), %r8d
cmpl $0xb, %r8d
je 0x1c55c
testl %r8d, %r8d
jne 0x1c5aa
movq 0x1d8(%r10), %r8
movq 0x1e8(%r10), %r9
subq 0x1d0(%r10), %r8
shrq $0x3, %r8
movq 0x1f0(%r10), %r10
subq %r9, %r10
sarq $0x3, %r10
xorl %r11d, %r11d
cmpq %r11, %r10
je 0x1c5a0
movq (%r9,%r11,8), %rbx
testq %rbx, %rbx
je 0x1c59b
addl 0x430(%rbx), %r8d
incq %r11
jmp 0x1c586
cmpl %ecx, %r8d
cmovbl %r8d, %ecx
cmovbl %edi, %eax
incq %rdi
jmp 0x1c541
popq %rbx
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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
sarq $0x3, %rcx
xorl %edx, %edx
xorl %esi, %esi
cmpq %rsi, %rcx
jbe 0x1c6e1
movq (%rax,%rsi,8), %rdi
testq %rdi, %rdi
je 0x1c6dc
movl 0x14(%rdi), %r8d
leal -0x1(%r8), %r9d
testl %r8d, %r8d
cmovlel %edx, %r9d
movl %r9d, 0x14(%rdi)
incq %rsi
jmp 0x1c6bb
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x40, %rsp
movl %ecx, %ebp
movq %rdi, %rbx
leaq 0x14c88(%rip), %rax     # 0x314b8
movl (%rax), %ecx
callq 0x1c5b8
leaq 0x1447a(%rip), %rax     # 0x30cb8
movq %rax, (%rbx)
movl %ebp, 0x204(%rbx)
leaq 0x50(%rbx), %rdi
movl %ebp, %esi
callq 0x4210
leaq 0x20(%rbx), %r14
leaq 0xa714(%rip), %rsi      # 0x26f71
movq %r14, %rdi
callq 0x4560
leaq 0xad99(%rip), %rax      # 0x27605
leaq 0x96e8(%rip), %rsi      # 0x25f5b
cmpb $0x0, 0x1cc(%rbx)
cmovneq %rax, %rsi
movq %r14, %rdi
callq 0x4550
leaq 0x58(%rbx), %rsi
movq %rsp, %rdi
callq 0x4450
leaq 0xac38(%rip), %rdx      # 0x274d1
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
callq 0xdeea
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x4570
leaq 0x20(%rsp), %rdi
callq 0x4598
movq %rsp, %rdi
callq 0x4598
xorps %xmm0, %xmm0
movups %xmm0, 0x218(%rbx)
movups %xmm0, 0x208(%rbx)
movb $0x0, 0x228(%rbx)
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x4598
jmp 0x1c8f8
movq %rax, %r14
movq %rsp, %rdi
callq 0x4598
jmp 0x1c907
jmp 0x1c904
movq %rax, %r14
movq %rbx, %rdi
callq 0x1c6e2
movq %r14, %rdi
callq 0x4520
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x1c97a
testb %dl, %dl
je 0x1c9fa
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x1466f(%rip), %rdi     # 0x30ff0
leaq 0x769a(%rip), %rsi      # 0x24022
callq 0x4300
leaq 0xa37c(%rip), %rsi      # 0x26d10
movq %rax, %rdi
callq 0x4300
leaq 0x7ed4(%rip), %rsi      # 0x24877
movq %rax, %rdi
callq 0x4300
pushq $0x35
popq %rsi
movq %rax, %rdi
callq 0x44f0
leaq 0x7684(%rip), %rsi      # 0x24041
movq %rax, %rdi
callq 0x4300
addq $0x20, %r14
movq %rax, %rdi
movq %r14, %rsi
callq 0x42b0
leaq 0xa34b(%rip), %rsi      # 0x26d26
movq %rax, %rdi
callq 0x4300
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1e2c8
leaq 0xa34b(%rip), %rsi      # 0x26d40
jmp 0x1ca8d
movq 0x145ef(%rip), %rdi     # 0x30ff0
leaq 0x761a(%rip), %rsi      # 0x24022
callq 0x4300
leaq 0xa2fc(%rip), %rsi      # 0x26d10
movq %rax, %rdi
callq 0x4300
leaq 0x7e54(%rip), %rsi      # 0x24877
movq %rax, %rdi
callq 0x4300
pushq $0x3a
popq %rsi
movq %rax, %rdi
callq 0x44f0
leaq 0x7604(%rip), %rsi      # 0x24041
movq %rax, %rdi
callq 0x4300
leaq 0x20(%r14), %rsi
movq %rax, %rdi
callq 0x42b0
leaq 0xa301(%rip), %rsi      # 0x26d59
movq %rax, %rdi
callq 0x4300
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1e2c8
leaq 0xa2fc(%rip), %rsi      # 0x26d6e
movq %rax, %rdi
callq 0x4300
movq 0x8(%r14), %rsi
movq %rax, %rdi
callq 0x40d0
leaq 0xaa44(%rip), %rsi      # 0x274d1
movq %rax, %rdi
callq 0x4300
movq %rax, %rdi
callq 0x4180
xorl %edi, %edi
callq 0x4370
// File: /workspace/github_cpp_makefile_star2_O2/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
subq 0x1e8(%rdi), %rax
sarq $0x3, %rax
movl 0x430(%rsi), %r12d
addq %rax, %r12
movslq 0x1cc(%rdi), %r13
cmpq %r13, %r12
ja 0x1dce1
leaq 0x1e8(%rbx), %r14
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
callq 0x13442
pushq $0x1
popq %rbp
leaq 0x10(%rsp), %r15
movq 0x8(%rsp), %rsi
cmpl 0x430(%rsi), %ebp
jae 0x1dcd6
andq $0x0, 0x10(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x13bc4
incl %ebp
jmp 0x1dcb4
movq (%rbx), %rax
pushq $0x1
popq %rdx
movq %rbx, %rdi
jmp 0x1dce9
movq (%rbx), %rax
movq %rbx, %rdi
xorl %edx, %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
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O2/estwings57[P]CasHMC/sources/Packet.cpp
// Function: CasHMC::Packet::Packet(CasHMC::PacketType, CasHMC::PacketCommandType, unsigned long, unsigned int, unsigned int, CasHMC::TranTrace*)
Packet::Packet(PacketType packet, PacketCommandType cmd, uint64_t addr, unsigned cub, unsigned lng, TranTrace *lat):
	trace(lat),
	packetType(packet),
	CUB(cub),
	LNG(lng),
	CMD(cmd),
	ADRS(addr)
{
	bufPopDelay=1;
	CRCtable[256]=0;	
	Pb=0;
	CRC=0; RTC=0; SLID=0;
	SEQ=0; FRP=0; RRP=0;
	AF=0; ERRSTAT=0; DINV=0;
	chkCRC = false;
	chkRRP = false;
	segment = false;
	reqDataSize=16;	//The minimum size is 16-Byte
	
	if(packet != FLOW) {
		TAG = (packetGlobalTAG++)%2048;
	}
	else {
		TAG = 0;
	}
	
	ADRS = (ADRS<<30)>>30;	//Address length is 34 bits
	
	if(CRC_CHECK) {
		if(LNG>1) {
			DATA = new uint64_t[(LNG-1)*2];
			uint64_t tempData;
			for(int i=0; i<(LNG-1)*2; i++) {
				tempData = rand();
				tempData = (tempData<<32)|rand();
				DATA[i] = tempData;
			}
		}
		else {
			DATA = NULL;
		}
		MakeCRCtable(CRCtable, 0xEB31D82E);
	}
	else {
		DATA = NULL;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %r14d
movq %rdi, %rbx
movq 0x30(%rsp), %rax
leaq 0x12fe2(%rip), %rdi     # 0x30d00
movq %rdi, (%rbx)
movq %rax, 0x8(%rbx)
movl %esi, 0x10(%rbx)
movl %r8d, 0x428(%rbx)
movl %r9d, 0x430(%rbx)
movl %edx, 0x434(%rbx)
movl $0x1, 0x14(%rbx)
movabsq $0x1000000000, %rax     # imm = 0x1000000000
movq %rax, 0x420(%rbx)
xorps %xmm0, %xmm0
andq $0x0, 0x448(%rbx)
movups %xmm0, 0x438(%rbx)
movups %xmm0, 0x458(%rbx)
xorl %eax, %eax
cmpl $0x2, %esi
je 0x1dd87
leaq 0x136fd(%rip), %rdx     # 0x31478
movl (%rdx), %eax
leal 0x1(%rax), %esi
movl %esi, (%rdx)
andl $0x7ff, %eax            # imm = 0x7FF
movl %eax, 0x42c(%rbx)
movabsq $0x3ffffffff, %rax      # imm = 0x3FFFFFFFF
andq %rax, %rcx
movq %rcx, 0x450(%rbx)
leaq 0x13724(%rip), %rax     # 0x314cc
cmpb $0x1, (%rax)
jne 0x1de06
leaq 0x20(%rbx), %r15
cmpl $0x2, %r14d
jb 0x1de17
leal -0x2(,%r14,2), %edi
shlq $0x3, %rdi
callq 0x4030
movq %rax, 0x18(%rbx)
xorl %r12d, %r12d
leal -0x2(,%r14,2), %eax
cmpq %rax, %r12
jae 0x1de1c
callq 0x4100
movl %eax, %r14d
shlq $0x20, %r14
callq 0x4100
cltq
orq %r14, %rax
movq 0x18(%rbx), %rcx
movq %rax, (%rcx,%r12,8)
incq %r12
movl 0x430(%rbx), %r14d
jmp 0x1ddcf
andq $0x0, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
andq $0x0, 0x18(%rbx)
movq %r15, %rsi
movl $0xeb31d82e, %edx       # imm = 0xEB31D82E
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1de34
// File: /workspace/github_cpp_makefile_star2_O2/estwings57[P]CasHMC/sources/Packet.cpp
// Function: CasHMC::Packet::MakeCRCtable(unsigned int*, unsigned int)
void Packet::MakeCRCtable(uint32_t *table, uint32_t id) 
{
	uint32_t k;
	for(int i=0; i<256; ++i){
		k = i;
		for(int j=0; j<8; ++j){
			if(k&1)	k = (k >> 1) ^ id;
			else	k >>= 1;
		}
		table[i] = k;
	}
}

// Assembly:
xorl %eax, %eax
pushq $0x8
popq %rcx
cmpq $0x100, %rax            # imm = 0x100
je 0x1de68
movl %ecx, %r8d
movl %eax, %edi
subl $0x1, %r8d
jb 0x1de60
movl %edi, %r9d
andl $0x1, %r9d
negl %r9d
shrl %edi
andl %edx, %r9d
xorl %r9d, %edi
jmp 0x1de46
movl %edi, (%rsi,%rax,4)
incq %rax
jmp 0x1de39
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/estwings57[P]CasHMC/sources/Packet.cpp
// Function: CasHMC::Packet::Packet(CasHMC::PacketType, CasHMC::PacketCommandType, unsigned int, unsigned int, CasHMC::TranTrace*)
Packet::Packet(PacketType packet, PacketCommandType cmd, unsigned tag, unsigned lng, TranTrace *lat):
	trace(lat),
	packetType(packet),
	TAG(tag),
	LNG(lng),
	CMD(cmd)
{
	bufPopDelay=1;
	CRCtable[256]=0;	
	CUB=0; Pb=0;
	CRC=0; RTC=0; SLID=0;
	SEQ=0; FRP=0; RRP=0;
	AF=0; ERRSTAT=0; DINV=0;
	chkCRC = false;
	chkRRP = false;
	segment = false;
	reqDataSize=16;	//The minimum size is 16-Byte
	
	if(CRC_CHECK) {
		if(LNG>1) {
			DATA = new uint64_t[(LNG-1)*2];
			uint64_t tempData;
			for(int i=0; i<(LNG-1)*2; i++) {
				tempData = rand();
				tempData = (tempData<<32)|rand();
				DATA[i] = tempData;
			}
		}
		else {
			DATA = NULL;
		}
		MakeCRCtable(CRCtable, 0xEB31D82E);
	}
	else {
		DATA = NULL;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x12e84(%rip), %rax     # 0x30d00
movq %rax, (%rdi)
movq %r9, 0x8(%rdi)
movl %esi, 0x10(%rdi)
movl %ecx, 0x42c(%rdi)
movl %r8d, 0x430(%rdi)
movl %edx, 0x434(%rdi)
movl $0x1, 0x14(%rdi)
andl $0x0, 0x428(%rdi)
movabsq $0x1000000000, %rax     # imm = 0x1000000000
movq %rax, 0x420(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x438(%rdi)
andq $0x0, 0x448(%rdi)
movups %xmm0, 0x458(%rdi)
leaq 0x135f4(%rip), %rax     # 0x314cc
cmpb $0x1, (%rax)
jne 0x1df39
movl %r8d, %r15d
leaq 0x20(%rbx), %r14
cmpl $0x2, %r8d
jb 0x1df4a
leal -0x2(,%r15,2), %edi
shlq $0x3, %rdi
callq 0x4030
movq %rax, 0x18(%rbx)
xorl %r12d, %r12d
leal -0x2(,%r15,2), %eax
cmpq %rax, %r12
jae 0x1df4f
callq 0x4100
movl %eax, %r15d
shlq $0x20, %r15
callq 0x4100
cltq
orq %r15, %rax
movq 0x18(%rbx), %rcx
movq %rax, (%rcx,%r12,8)
incq %r12
movl 0x430(%rbx), %r15d
jmp 0x1df02
andq $0x0, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
andq $0x0, 0x18(%rbx)
movq %r14, %rsi
movl $0xeb31d82e, %edx       # imm = 0xEB31D82E
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1de34
nop