// File: estwings57[P]CasHMC/sources/HMCController.cpp
// Function: CasHMC::HMCController::LinkPowerStateManager()
void HMCController::LinkPowerStateManager()
{
	switch(LINK_POWER) {
		case NO_MANAGEMENT:
		case QUIESCE_SLEEP:{
			break;
		}
		case MSHR:{
			linkEpochCycle--;
			//control the number of active link in every one epoch
			if(linkEpochCycle == 0) {
				//The average allocated MSHR size
				double aveMSHR = accuMSHR/((double)LINK_EPOCH*1000000/CPU_CLK_PERIOD);
				aveMSHR *= MSHR_SCALING;
				
				if(aveMSHR >= 4) {
					sleepLink = 0;
				}
				else if(aveMSHR >= 3) {
					sleepLink = 1;
				}
				else if(aveMSHR >= 2) {
					sleepLink = 2;
				}
				else {
					sleepLink = 3;
				}
				DEBUG(ALI(33)<<header<<"Down) epoch average MSHR size : "<<aveMSHR);
				
				//link epoch cycle reset
				accuMSHR = 0;
				linkEpochCycle = ceil((double)LINK_EPOCH*1000000/CPU_CLK_PERIOD);
			}
			break;
		}
		case LINK_MONITOR:{
			linkEpochCycle--;
			//control the number of active link in every one epoch
			if(linkEpochCycle == 0) {
				//( ( total FLIT length * 16 bytes) / one epoch time ) * 1000 ms / 1000000000 B = [GB/s]
				double epochDownBandwidth = LINK_SCALING*((requestAccLNG*16)/LINK_EPOCH)/1000000;
				double epochUpBandwidth = LINK_SCALING*((responseAccLNG*16)/LINK_EPOCH)/1000000;
				if(epochDownBandwidth >= maxLinkBand*3 || epochUpBandwidth >= maxLinkBand*3) {
					sleepLink = 0;
				}
				else if(epochDownBandwidth >= maxLinkBand*2 || epochUpBandwidth >= maxLinkBand*2) {
					sleepLink = 1;
				}
				else if(epochDownBandwidth >= maxLinkBand || epochUpBandwidth >= maxLinkBand) {
					sleepLink = 2;
				}
				else {
					sleepLink = 3;
				}

				DEBUG(ALI(33)<<header<<"Down) epoch link BANDWIDTH downstream : "<<epochDownBandwidth<<" GB/s | upstream : "<<epochUpBandwidth<<" GB/s (sleepLink : "<<sleepLink<<")");
				
				//packet accumulated length and link epoch cycle reset
				requestAccLNG = 0;
				responseAccLNG = 0;
				linkEpochCycle = ceil((double)LINK_EPOCH*1000000/CPU_CLK_PERIOD);
			}
			break;
		}
		case AUTONOMOUS:{
			linkEpochCycle--;
			//control the number of active link in every one epoch
			if(linkEpochCycle == 0) {
				//The average MSHR size
				double aveMSHR = accuMSHR/((double)LINK_EPOCH*1000000/CPU_CLK_PERIOD);
				aveMSHR *= MSHR_SCALING;
				//( ( total FLIT length * 16 bytes) / one epoch time ) * 1000 ms / 1000000000 B = [GB/s]
				double epochDownBandwidth = LINK_SCALING*((requestAccLNG*16)/LINK_EPOCH)/1000000;
				double epochUpBandwidth = LINK_SCALING*((responseAccLNG*16)/LINK_EPOCH)/1000000;
				if(aveMSHR >= 4 || epochDownBandwidth >= maxLinkBand*3 || epochUpBandwidth >= maxLinkBand*3) {
					sleepLink = 0;
				}
				else if(aveMSHR >= 3 || epochDownBandwidth >= maxLinkBand*2 || epochUpBandwidth >= maxLinkBand*2) {
					sleepLink = 1;
				}
				else if(aveMSHR >= 2 || epochDownBandwidth >= maxLinkBand || epochUpBandwidth >= maxLinkBand) {
					sleepLink = 2;
				}
				else {
					sleepLink = 3;
				}
				
				DEBUG(ALI(33)<<header<<"Down) epoch average MSHR size : "<<aveMSHR);
				DEBUG(ALI(33)<<header<<"Down) epoch link BANDWIDTH downstream : "<<epochDownBandwidth<<" GB/s | upstream : "<<epochUpBandwidth<<" GB/s (sleepLink : "<<sleepLink<<")");

				//packet accumulated length and link epoch cycle reset
				accuMSHR = 0;
				requestAccLNG = 0;
				responseAccLNG = 0;
				linkEpochCycle = ceil((double)LINK_EPOCH*1000000/CPU_CLK_PERIOD);
			}
			break;
		}
		default:{
			ERROR(header<<"   == Error - WRONG LINK_POWER parameter  (LINK_POWER : "<<LINK_POWER<<")");
			exit(0);
			break;
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq 0x2e23a(%rip), %rax     # 0x66588
movl (%rax), %eax
movq %rax, -0x60(%rbp)
subq $0x4, %rax
ja 0x38c65
movq -0x60(%rbp), %rax
leaq 0x1af1f(%rip), %rcx     # 0x53288
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x38d07
movq -0x68(%rbp), %rax
movl 0x240(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x240(%rax)
cmpl $0x0, 0x240(%rax)
jne 0x38556
movq -0x68(%rbp), %rax
movq 0x260(%rax), %xmm0
movaps 0x18d76(%rip), %xmm1    # 0x51120
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x18d7a(%rip), %xmm1    # 0x51130
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd 0x1ae23(%rip), %xmm1    # 0x531f0
leaq 0x2e1bc(%rip), %rax     # 0x66590
mulsd (%rax), %xmm1
leaq 0x2e159(%rip), %rax     # 0x66538
divsd (%rax), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x10(%rbp)
leaq 0x2e1a5(%rip), %rax     # 0x66598
movsd (%rax), %xmm0
mulsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x10(%rbp)
movsd -0x10(%rbp), %xmm0
movsd 0x1adf2(%rip), %xmm1    # 0x53200
ucomisd %xmm1, %xmm0
jb 0x38424
movq -0x68(%rbp), %rax
movl $0x0, 0x258(%rax)
jmp 0x3847c
movsd -0x10(%rbp), %xmm0
movsd 0x1add7(%rip), %xmm1    # 0x53208
ucomisd %xmm1, %xmm0
jb 0x38447
movq -0x68(%rbp), %rax
movl $0x1, 0x258(%rax)
jmp 0x3847a
movsd -0x10(%rbp), %xmm0
movsd 0x1adbc(%rip), %xmm1    # 0x53210
ucomisd %xmm1, %xmm0
jb 0x3846a
movq -0x68(%rbp), %rax
movl $0x2, 0x258(%rax)
jmp 0x38478
movq -0x68(%rbp), %rax
movl $0x3, 0x258(%rax)
jmp 0x3847a
jmp 0x3847c
leaq 0x2e0a5(%rip), %rax     # 0x66528
testb $0x1, (%rax)
je 0x3850d
leaq 0x2e096(%rip), %rax     # 0x66529
testb $0x1, (%rax)
jne 0x3850d
movl $0x21, %edi
callq 0x177b0
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %esi
movq 0x2db21(%rip), %rdi     # 0x65fd0
callq 0x4440
movq %rax, -0x70(%rbp)
movl $0x20, %edi
callq 0x177d0
movq -0x70(%rbp), %rdi
movb %al, -0x15(%rbp)
movzbl -0x15(%rbp), %esi
callq 0x4550
movq -0x68(%rbp), %rsi
movq %rax, %rdi
addq $0x20, %rsi
callq 0x4320
movq %rax, %rdi
leaq 0x1b041(%rip), %rsi     # 0x5352d
callq 0x4380
movq %rax, %rdi
movsd -0x10(%rbp), %xmm0
callq 0x4690
movq %rax, %rdi
movq 0x2daa8(%rip), %rsi     # 0x65fb0
callq 0x43c0
movq -0x68(%rbp), %rax
movq $0x0, 0x260(%rax)
leaq 0x2e06d(%rip), %rax     # 0x66590
movsd (%rax), %xmm0
movsd 0x1acc1(%rip), %xmm1    # 0x531f0
mulsd %xmm1, %xmm0
leaq 0x2dffe(%rip), %rax     # 0x66538
movsd (%rax), %xmm1
divsd %xmm1, %xmm0
callq 0x40a0
movq -0x68(%rbp), %rax
cvttsd2si %xmm0, %rcx
movl %ecx, 0x240(%rax)
jmp 0x38d07
movq -0x68(%rbp), %rax
movl 0x240(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x240(%rax)
cmpl $0x0, 0x240(%rax)
jne 0x3883c
movq -0x68(%rbp), %rax
leaq 0x2e01a(%rip), %rdx     # 0x665a0
movsd (%rdx), %xmm0
movq 0x248(%rax), %rcx
shlq $0x4, %rcx
movq %rcx, %xmm1
movaps 0x18b7f(%rip), %xmm4    # 0x51120
punpckldq %xmm4, %xmm1    # xmm1 = xmm1[0],xmm4[0],xmm1[1],xmm4[1]
movapd 0x18b83(%rip), %xmm3    # 0x51130
subpd %xmm3, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
leaq 0x2dfcd(%rip), %rcx     # 0x66590
movsd (%rcx), %xmm2
divsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd 0x1ac19(%rip), %xmm1    # 0x531f0
divsd %xmm1, %xmm0
movsd %xmm0, -0x20(%rbp)
movsd (%rdx), %xmm0
movq 0x250(%rax), %rdx
shlq $0x4, %rdx
movq %rdx, %xmm2
punpckldq %xmm4, %xmm2    # xmm2 = xmm2[0],xmm4[0],xmm2[1],xmm4[1]
subpd %xmm3, %xmm2
movaps %xmm2, %xmm3
unpckhpd %xmm2, %xmm2            # xmm2 = xmm2[1,1]
addsd %xmm3, %xmm2
movsd (%rcx), %xmm3
divsd %xmm3, %xmm2
mulsd %xmm2, %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x28(%rbp)
movsd -0x20(%rbp), %xmm0
movl 0x23c(%rax), %ecx
movl %ecx, %eax
leal (%rax,%rax,2), %eax
cvtsi2sd %rax, %xmm1
ucomisd %xmm1, %xmm0
jae 0x38656
movq -0x68(%rbp), %rax
movsd -0x28(%rbp), %xmm0
movl 0x23c(%rax), %ecx
movl %ecx, %eax
leal (%rax,%rax,2), %eax
cvtsi2sd %rax, %xmm1
ucomisd %xmm1, %xmm0
jb 0x38669
movq -0x68(%rbp), %rax
movl $0x0, 0x258(%rax)
jmp 0x38707
movq -0x68(%rbp), %rax
movsd -0x20(%rbp), %xmm0
movl 0x23c(%rax), %eax
addl %eax, %eax
cvtsi2sd %rax, %xmm1
ucomisd %xmm1, %xmm0
jae 0x386a1
movq -0x68(%rbp), %rax
movsd -0x28(%rbp), %xmm0
movl 0x23c(%rax), %eax
addl %eax, %eax
cvtsi2sd %rax, %xmm1
ucomisd %xmm1, %xmm0
jb 0x386b1
movq -0x68(%rbp), %rax
movl $0x1, 0x258(%rax)
jmp 0x38705
movq -0x68(%rbp), %rax
movsd -0x20(%rbp), %xmm0
movl 0x23c(%rax), %eax
cvtsi2sd %rax, %xmm1
ucomisd %xmm1, %xmm0
jae 0x386e5
movq -0x68(%rbp), %rax
movsd -0x28(%rbp), %xmm0
movl 0x23c(%rax), %eax
cvtsi2sd %rax, %xmm1
ucomisd %xmm1, %xmm0
jb 0x386f5
movq -0x68(%rbp), %rax
movl $0x2, 0x258(%rax)
jmp 0x38703
movq -0x68(%rbp), %rax
movl $0x3, 0x258(%rax)
jmp 0x38705
jmp 0x38707
leaq 0x2de1a(%rip), %rax     # 0x66528
testb $0x1, (%rax)
je 0x387e8
leaq 0x2de0b(%rip), %rax     # 0x66529
testb $0x1, (%rax)
jne 0x387e8
movl $0x21, %edi
callq 0x177b0
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %esi
movq 0x2d892(%rip), %rdi     # 0x65fd0
callq 0x4440
movq %rax, -0x78(%rbp)
movl $0x20, %edi
callq 0x177d0
movq -0x78(%rbp), %rdi
movb %al, -0x2d(%rbp)
movzbl -0x2d(%rbp), %esi
callq 0x4550
movq -0x68(%rbp), %rsi
movq %rax, %rdi
addq $0x20, %rsi
callq 0x4320
movq %rax, %rdi
leaq 0x1add3(%rip), %rsi     # 0x5354e
callq 0x4380
movq %rax, %rdi
movsd -0x20(%rbp), %xmm0
callq 0x4690
movq %rax, %rdi
leaq 0x1ade0(%rip), %rsi     # 0x53577
callq 0x4380
movq %rax, %rdi
movsd -0x28(%rbp), %xmm0
callq 0x4690
movq %rax, %rdi
leaq 0x1add8(%rip), %rsi     # 0x5358b
callq 0x4380
movq %rax, %rdi
movq -0x68(%rbp), %rax
movl 0x258(%rax), %esi
callq 0x44c0
movq %rax, %rdi
leaq 0x1bba5(%rip), %rsi     # 0x54379
callq 0x4380
movq %rax, %rdi
movq 0x2d7cd(%rip), %rsi     # 0x65fb0
callq 0x43c0
movq -0x68(%rbp), %rax
movq $0x0, 0x248(%rax)
movq $0x0, 0x250(%rax)
leaq 0x2dd87(%rip), %rax     # 0x66590
movsd (%rax), %xmm0
movsd 0x1a9db(%rip), %xmm1    # 0x531f0
mulsd %xmm1, %xmm0
leaq 0x2dd18(%rip), %rax     # 0x66538
movsd (%rax), %xmm1
divsd %xmm1, %xmm0
callq 0x40a0
movq -0x68(%rbp), %rax
cvttsd2si %xmm0, %rcx
movl %ecx, 0x240(%rax)
jmp 0x38d07
movq -0x68(%rbp), %rax
movl 0x240(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x240(%rax)
cmpl $0x0, 0x240(%rax)
jne 0x38c60
movq -0x68(%rbp), %rax
movq 0x260(%rax), %xmm0
movaps 0x188ac(%rip), %xmm3    # 0x51120
punpckldq %xmm3, %xmm0    # xmm0 = xmm0[0],xmm3[0],xmm0[1],xmm3[1]
movapd 0x188b0(%rip), %xmm2    # 0x51130
subpd %xmm2, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
leaq 0x2dcfa(%rip), %rdx     # 0x66590
movsd (%rdx), %xmm4
movsd 0x1a94e(%rip), %xmm1    # 0x531f0
mulsd %xmm1, %xmm4
leaq 0x2dc8b(%rip), %rcx     # 0x66538
movsd (%rcx), %xmm5
divsd %xmm5, %xmm4
divsd %xmm4, %xmm0
movsd %xmm0, -0x38(%rbp)
leaq 0x2dcd3(%rip), %rcx     # 0x66598
movsd (%rcx), %xmm4
movsd -0x38(%rbp), %xmm0
mulsd %xmm4, %xmm0
movsd %xmm0, -0x38(%rbp)
leaq 0x2dcc2(%rip), %rcx     # 0x665a0
movsd (%rcx), %xmm0
movq 0x248(%rax), %rsi
shlq $0x4, %rsi
movq %rsi, %xmm4
punpckldq %xmm3, %xmm4    # xmm4 = xmm4[0],xmm3[0],xmm4[1],xmm3[1]
subpd %xmm2, %xmm4
movaps %xmm4, %xmm5
unpckhpd %xmm4, %xmm4            # xmm4 = xmm4[1,1]
addsd %xmm5, %xmm4
movsd (%rdx), %xmm5
divsd %xmm5, %xmm4
mulsd %xmm4, %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x40(%rbp)
movsd (%rcx), %xmm0
movq 0x250(%rax), %rax
shlq $0x4, %rax
movq %rax, %xmm1
punpckldq %xmm3, %xmm1    # xmm1 = xmm1[0],xmm3[0],xmm1[1],xmm3[1]
subpd %xmm2, %xmm1
movaps %xmm1, %xmm2
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm2, %xmm1
leaq 0x2dc48(%rip), %rax     # 0x66590
divsd (%rax), %xmm1
mulsd %xmm1, %xmm0
movsd 0x1a898(%rip), %xmm1    # 0x531f0
divsd %xmm1, %xmm0
movsd %xmm0, -0x48(%rbp)
movsd -0x38(%rbp), %xmm0
movsd 0x1a892(%rip), %xmm1    # 0x53200
ucomisd %xmm1, %xmm0
jae 0x389b2
movq -0x68(%rbp), %rax
movsd -0x40(%rbp), %xmm0
movl 0x23c(%rax), %ecx
movl %ecx, %eax
leal (%rax,%rax,2), %eax
cvtsi2sd %rax, %xmm1
ucomisd %xmm1, %xmm0
jae 0x389b2
movq -0x68(%rbp), %rax
movsd -0x48(%rbp), %xmm0
movl 0x23c(%rax), %ecx
movl %ecx, %eax
leal (%rax,%rax,2), %eax
cvtsi2sd %rax, %xmm1
ucomisd %xmm1, %xmm0
jb 0x389c5
movq -0x68(%rbp), %rax
movl $0x0, 0x258(%rax)
jmp 0x38a89
movsd -0x38(%rbp), %xmm0
movsd 0x1a836(%rip), %xmm1    # 0x53208
ucomisd %xmm1, %xmm0
jae 0x38a10
movq -0x68(%rbp), %rax
movsd -0x40(%rbp), %xmm0
movl 0x23c(%rax), %eax
addl %eax, %eax
cvtsi2sd %rax, %xmm1
ucomisd %xmm1, %xmm0
jae 0x38a10
movq -0x68(%rbp), %rax
movsd -0x48(%rbp), %xmm0
movl 0x23c(%rax), %eax
addl %eax, %eax
cvtsi2sd %rax, %xmm1
ucomisd %xmm1, %xmm0
jb 0x38a20
movq -0x68(%rbp), %rax
movl $0x1, 0x258(%rax)
jmp 0x38a87
movsd -0x38(%rbp), %xmm0
movsd 0x1a7e3(%rip), %xmm1    # 0x53210
ucomisd %xmm1, %xmm0
jae 0x38a67
movq -0x68(%rbp), %rax
movsd -0x40(%rbp), %xmm0
movl 0x23c(%rax), %eax
cvtsi2sd %rax, %xmm1
ucomisd %xmm1, %xmm0
jae 0x38a67
movq -0x68(%rbp), %rax
movsd -0x48(%rbp), %xmm0
movl 0x23c(%rax), %eax
cvtsi2sd %rax, %xmm1
ucomisd %xmm1, %xmm0
jb 0x38a77
movq -0x68(%rbp), %rax
movl $0x2, 0x258(%rax)
jmp 0x38a85
movq -0x68(%rbp), %rax
movl $0x3, 0x258(%rax)
jmp 0x38a87
jmp 0x38a89
leaq 0x2da98(%rip), %rax     # 0x66528
testb $0x1, (%rax)
je 0x38b1a
leaq 0x2da89(%rip), %rax     # 0x66529
testb $0x1, (%rax)
jne 0x38b1a
movl $0x21, %edi
callq 0x177b0
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %esi
movq 0x2d514(%rip), %rdi     # 0x65fd0
callq 0x4440
movq %rax, -0x80(%rbp)
movl $0x20, %edi
callq 0x177d0
movq -0x80(%rbp), %rdi
movb %al, -0x4d(%rbp)
movzbl -0x4d(%rbp), %esi
callq 0x4550
movq -0x68(%rbp), %rsi
movq %rax, %rdi
addq $0x20, %rsi
callq 0x4320
movq %rax, %rdi
leaq 0x1aa34(%rip), %rsi     # 0x5352d
callq 0x4380
movq %rax, %rdi
movsd -0x38(%rbp), %xmm0
callq 0x4690
movq %rax, %rdi
movq 0x2d49b(%rip), %rsi     # 0x65fb0
callq 0x43c0
leaq 0x2da07(%rip), %rax     # 0x66528
testb $0x1, (%rax)
je 0x38c01
leaq 0x2d9f8(%rip), %rax     # 0x66529
testb $0x1, (%rax)
jne 0x38c01
movl $0x21, %edi
callq 0x177b0
movl %eax, -0x54(%rbp)
movl -0x54(%rbp), %esi
movq 0x2d47f(%rip), %rdi     # 0x65fd0
callq 0x4440
movq %rax, -0x88(%rbp)
movl $0x20, %edi
callq 0x177d0
movq -0x88(%rbp), %rdi
movb %al, -0x55(%rbp)
movzbl -0x55(%rbp), %esi
callq 0x4550
movq -0x68(%rbp), %rsi
movq %rax, %rdi
addq $0x20, %rsi
callq 0x4320
movq %rax, %rdi
leaq 0x1a9ba(%rip), %rsi     # 0x5354e
callq 0x4380
movq %rax, %rdi
movsd -0x40(%rbp), %xmm0
callq 0x4690
movq %rax, %rdi
leaq 0x1a9c7(%rip), %rsi     # 0x53577
callq 0x4380
movq %rax, %rdi
movsd -0x48(%rbp), %xmm0
callq 0x4690
movq %rax, %rdi
leaq 0x1a9bf(%rip), %rsi     # 0x5358b
callq 0x4380
movq %rax, %rdi
movq -0x68(%rbp), %rax
movl 0x258(%rax), %esi
callq 0x44c0
movq %rax, %rdi
leaq 0x1b78c(%rip), %rsi     # 0x54379
callq 0x4380
movq %rax, %rdi
movq 0x2d3b4(%rip), %rsi     # 0x65fb0
callq 0x43c0
movq -0x68(%rbp), %rax
movq $0x0, 0x260(%rax)
movq $0x0, 0x248(%rax)
movq $0x0, 0x250(%rax)
leaq 0x2d963(%rip), %rax     # 0x66590
movsd (%rax), %xmm0
movsd 0x1a5b7(%rip), %xmm1    # 0x531f0
mulsd %xmm1, %xmm0
leaq 0x2d8f4(%rip), %rax     # 0x66538
movsd (%rax), %xmm1
divsd %xmm1, %xmm0
callq 0x40a0
movq -0x68(%rbp), %rax
cvttsd2si %xmm0, %rcx
movl %ecx, 0x240(%rax)
jmp 0x38d07
movq 0x2d384(%rip), %rdi     # 0x65ff0
leaq 0x183c7(%rip), %rsi     # 0x5103a
callq 0x4380
movq %rax, %rdi
leaq 0x1a685(%rip), %rsi     # 0x53307
callq 0x4380
movq %rax, %rdi
leaq 0x18ba4(%rip), %rsi     # 0x51835
callq 0x4380
movq %rax, %rdi
movl $0x254, %esi            # imm = 0x254
callq 0x4610
movq %rax, %rdi
leaq 0x183ac(%rip), %rsi     # 0x51059
callq 0x4380
movq -0x68(%rbp), %rsi
movq %rax, %rdi
addq $0x20, %rsi
callq 0x4320
movq %rax, %rdi
leaq 0x1a828(%rip), %rsi     # 0x534f4
callq 0x4380
movq %rax, %rdi
leaq 0x2d8ad(%rip), %rax     # 0x66588
movl (%rax), %esi
callq 0x4610
movq %rax, %rdi
leaq 0x1b68d(%rip), %rsi     # 0x54379
callq 0x4380
movq %rax, %rdi
movq 0x2d2b5(%rip), %rsi     # 0x65fb0
callq 0x43c0
xorl %edi, %edi
callq 0x4460
addq $0x90, %rsp
popq %rbp
retq