// File: dramninjasUMD[P]BOBSim/BOBWrapper.cpp
// Function: BOBSim::BOBWrapper::PrintStats(bool)
void BOBWrapper::PrintStats(bool finalPrint)
{
	float fullMean = (float)fullSum / returnedReads;
	float dramMean = (float)dramSum / returnedReads;
	float chanMean = (float)chanSum / returnedReads;

	//calculate standard deviation
	double fullstdsum = 0;
	double dramstdsum = 0;
	double chanstdsum = 0;
	unsigned fullLatMax = 0;
	unsigned fullLatMin = -1;//max unsigned value
	unsigned dramLatMax = 0;
	unsigned dramLatMin = -1;
	unsigned chanLatMax = 0;
	unsigned chanLatMin = -1;
	for(unsigned i=0; i<fullLatencies.size(); i++)
	{
		fullLatMax = max(fullLatencies[i],fullLatMax);
		fullLatMin = min(fullLatencies[i], fullLatMin);
		fullstdsum+=pow(fullLatencies[i]-fullMean,2);

		if(dramLatencies[i]>dramLatMax) dramLatMax = dramLatencies[i];
		if(dramLatencies[i]<dramLatMin) dramLatMin = dramLatencies[i];
		dramstdsum+=pow(dramLatencies[i]-dramMean,2);

		if(chanLatencies[i]>chanLatMax) chanLatMax = chanLatencies[i];
		if(chanLatencies[i]<chanLatMin) chanLatMin = chanLatencies[i];
		chanstdsum+=pow(chanLatencies[i]-chanMean,2);
	}
	double fullstddev = sqrt(fullstdsum/returnedReads);
	double dramstddev = sqrt(dramstdsum/returnedReads);
	double chanstddev = sqrt(chanstdsum/returnedReads);

	//
	//
	//check - 1E9 or 2E30????
	//
	//
	unsigned elapsedCycles;
	if(currentClockCycle%EPOCH_LENGTH==0)
	{
		elapsedCycles = EPOCH_LENGTH;
	}
	else
	{
		elapsedCycles = currentClockCycle%EPOCH_LENGTH;
	}


	double bandwidth = ((issuedWrites+returnedReads)*TRANSACTION_SIZE)/(double)(elapsedCycles*CPU_CLK_PERIOD*1E-9)/(1<<30);

	double rw_ratio = ((double)returnedReads/(double)committedWrites)*100.0f;

	statsOut  <<currentClockCycle*CPU_CLK_PERIOD/1000000<< ","<< setprecision(4) << bandwidth << "," << fullMean*CPU_CLK_PERIOD<<","<<rw_ratio<<",;";

	totalTransactionsServiced += (issuedWrites + returnedReads);
	totalReturnedReads += returnedReads;
	totalIssuedWrites += issuedWrites;

	PRINT("==================Epoch ["<<currentClockCycle/EPOCH_LENGTH<<"]=======================");
	PRINT("per epoch] reads   : "<<returnedReads<<" writes : "<<issuedWrites<<" ("<<(float)returnedReads/(float)(returnedReads+issuedWrites)*100<<"% Reads) : "<<returnedReads+issuedWrites);
	PRINT("lifetime ] reads   : "<<totalReturnedReads<<" writes : "<<totalIssuedWrites<<" total : "<<totalTransactionsServiced);
	PRINT("issued logic ops   : "<<issuedLogicOperations<< " returned logic responses : "<<totalLogicResponses);
	PRINT("bandwidth          : "<<bandwidth<<" GB/sec");
	PRINT("current cycle      : "<<currentClockCycle);
	PRINT("--------------------------");
	PRINT("full time mean  : "<<fullMean*CPU_CLK_PERIOD<<" ns");
	PRINT("          std   : "<<fullstddev*CPU_CLK_PERIOD<<" ns");
	PRINT("          min   : "<<fullLatMin*CPU_CLK_PERIOD<<" ns");
	PRINT("          max   : "<<fullLatMax*CPU_CLK_PERIOD<<" ns");
	PRINT("chan time mean  : "<<chanMean*CPU_CLK_PERIOD<<" ns");
	PRINT("           std  : "<<chanstddev*CPU_CLK_PERIOD);
	PRINT("           min  : "<<chanLatMin*CPU_CLK_PERIOD<<" ns");
	PRINT("           max  : "<<chanLatMax*CPU_CLK_PERIOD<<" ns");
	PRINT("dram time mean  : "<<dramMean*CPU_CLK_PERIOD<<" ns");
	PRINT("          std   : "<<dramstddev*CPU_CLK_PERIOD<<" ns");
	PRINT("          min   : "<<dramLatMin*CPU_CLK_PERIOD<<" ns");
	PRINT("          max   : "<<dramLatMax*CPU_CLK_PERIOD<<" ns");
	PRINT("-- Per Channel Latency Components in nanoseconds (All from READs) : ");
	maxReadsPerCycle = maxWritesPerCycle = 0;
	PRINT("      reqPort    reqLink     workQ    access     rrq    rspLink   rspPort  total");
	for(unsigned i=0; i<NUM_CHANNELS; i++)
	{
		float tempSum=0;
		unsigned tempMax=0;
		unsigned tempMin=-1;
		double stdsum=0;
		double mean=0;
		double reqLinkSum=0;
		double rspLinkSum=0;
		double reqPortSum=0;
		double rspPortSum=0;
		double vSum=0;
		double rrqSum=0;
		double workQSum=0;

		for(unsigned j=0; j<perChanFullLatencies[i].size(); j++)
		{
			if(perChanFullLatencies[i][j]>tempMax) tempMax = perChanFullLatencies[i][j];
			if(perChanFullLatencies[i][j]<tempMin) tempMin = perChanFullLatencies[i][j];

			tempSum+=perChanFullLatencies[i][j];
			reqLinkSum+=perChanReqLink[i][j];
			rspLinkSum+=perChanRspLink[i][j];
			reqPortSum+=perChanReqPort[i][j];
			rspPortSum+=perChanRspPort[i][j];
			vSum+=perChanAccess[i][j];
			rrqSum+=perChanRRQ[i][j];
			workQSum+=perChanWorkQTimes[i][j];
		}

		mean=tempSum/(float)perChanFullLatencies[i].size();

		//write per channel latency to stats file
		statsOut<<CPU_CLK_PERIOD*mean<<",";

		for(unsigned j=0; j<perChanFullLatencies[i].size(); j++)
		{
			stdsum+=pow(perChanFullLatencies[i][j]-mean,2);
		}

#define MAX_STR 512
		char tmp_str[MAX_STR];

		snprintf(tmp_str,MAX_STR,"%d]%10.4f%10.4f%10.4f%10.4f%10.4f%10.4f%10.4f%10.4f\n",
		         i,
		         CPU_CLK_PERIOD*(reqPortSum/perChanReqPort[i].size()),
		         CPU_CLK_PERIOD*(reqLinkSum/perChanReqLink[i].size()),
		         CPU_CLK_PERIOD*(workQSum/perChanWorkQTimes[i].size()),
		         CPU_CLK_PERIOD*(vSum/perChanAccess[i].size()),
		         CPU_CLK_PERIOD*(rrqSum/perChanRRQ[i].size()),
		         CPU_CLK_PERIOD*(rspLinkSum/perChanRspLink[i].size()),
		         CPU_CLK_PERIOD*(rspPortSum/perChanRspPort[i].size()),
		         CPU_CLK_PERIOD*(mean));

		PRINTN(tmp_str);
		//clear
		perChanWorkQTimes[i].clear();
		perChanFullLatencies[i].clear();
		perChanReqLink[i].clear();
		perChanRspLink[i].clear();
		perChanReqPort[i].clear();
		perChanRspPort[i].clear();
		perChanAccess[i].clear();
		perChanRRQ[i].clear();
	}

	PRINT(" ---  Port stats (per epoch) : ");
	for(unsigned i=0; i<NUM_PORTS; i++)
	{
		PRINTN(" "<<i<<"] ");
		PRINTN(" request: "<<(float)requestPortEmptyCount[i]/(elapsedCycles)*100.0<<"\% idle ");
		PRINTN(" response: "<<(float)responsePortEmptyCount[i]/(elapsedCycles)*100.0<<"\% idle ");
		PRINTN(" rds:"<<readsPerPort[i]);
		PRINTN(" wrts:"<<writesPerPort[i]);
		PRINTN(" rtn:"<<returnsPerPort[i]);
		PRINT(" tot:"<<requestCounterPerPort[i]);

		//clear
		returnsPerPort[i]=0;
		writesPerPort[i]=0;
		readsPerPort[i]=0;
		responsePortEmptyCount[i]=0;
		requestPortEmptyCount[i]=0;
		requestCounterPerPort[i]=0;
	}

	issuedWrites = 0;
	returnedReads = 0;
	fullSum = 0;
	dramSum = 0;
	chanSum = 0;

	fullLatencies.clear();
	dramLatencies.clear();
	chanLatencies.clear();
	bob->PrintStats(statsOut, powerOut, finalPrint, elapsedCycles);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x4a0, %rsp            # imm = 0x4A0
movb %sil, %al
movq %rdi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x300(%rbp)
movl 0x248(%rax), %edx
movl 0x298(%rax), %ecx
cvtsi2ss %rdx, %xmm0
cvtsi2ss %rcx, %xmm1
divss %xmm1, %xmm0
movss %xmm0, -0x10(%rbp)
movl 0x268(%rax), %edx
movl 0x298(%rax), %ecx
cvtsi2ss %rdx, %xmm0
cvtsi2ss %rcx, %xmm1
divss %xmm1, %xmm0
movss %xmm0, -0x14(%rbp)
movl 0x288(%rax), %ecx
movl 0x298(%rax), %eax
cvtsi2ss %rcx, %xmm0
cvtsi2ss %rax, %xmm1
divss %xmm1, %xmm0
movss %xmm0, -0x18(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x20(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x28(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movl $0xffffffff, -0x38(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x3c(%rbp)
movl $0xffffffff, -0x40(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x44(%rbp)
movl $0xffffffff, -0x48(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x4c(%rbp)
movq -0x300(%rbp), %rdi
movl -0x4c(%rbp), %eax
movq %rax, -0x308(%rbp)
addq $0x230, %rdi            # imm = 0x230
callq 0x17100
movq %rax, %rcx
movq -0x308(%rbp), %rax
cmpq %rcx, %rax
jae 0x15499
movq -0x300(%rbp), %rdi
addq $0x230, %rdi            # imm = 0x230
movq %rdi, -0x310(%rbp)
movl -0x4c(%rbp), %eax
movl %eax, %esi
callq 0xbec0
movq %rax, %rdi
leaq -0x34(%rbp), %rsi
callq 0x17120
movq -0x310(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x34(%rbp)
movl -0x4c(%rbp), %eax
movl %eax, %esi
callq 0xbec0
movq %rax, %rdi
leaq -0x38(%rbp), %rsi
callq 0x17160
movq -0x310(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x38(%rbp)
movl -0x4c(%rbp), %eax
movl %eax, %esi
callq 0xbec0
movl (%rax), %eax
cvtsi2ss %rax, %xmm0
subss -0x10(%rbp), %xmm0
movl $0x2, %edi
callq 0x171a0
movq -0x300(%rbp), %rdi
addsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
addq $0x250, %rdi            # imm = 0x250
movl -0x4c(%rbp), %eax
movl %eax, %esi
callq 0xbec0
movl (%rax), %eax
cmpl -0x3c(%rbp), %eax
jbe 0x15367
movq -0x300(%rbp), %rdi
addq $0x250, %rdi            # imm = 0x250
movl -0x4c(%rbp), %eax
movl %eax, %esi
callq 0xbec0
movl (%rax), %eax
movl %eax, -0x3c(%rbp)
movq -0x300(%rbp), %rdi
addq $0x250, %rdi            # imm = 0x250
movl -0x4c(%rbp), %eax
movl %eax, %esi
callq 0xbec0
movl (%rax), %eax
cmpl -0x40(%rbp), %eax
jae 0x153a3
movq -0x300(%rbp), %rdi
addq $0x250, %rdi            # imm = 0x250
movl -0x4c(%rbp), %eax
movl %eax, %esi
callq 0xbec0
movl (%rax), %eax
movl %eax, -0x40(%rbp)
movq -0x300(%rbp), %rdi
addq $0x250, %rdi            # imm = 0x250
movl -0x4c(%rbp), %eax
movl %eax, %esi
callq 0xbec0
movl (%rax), %eax
cvtsi2ss %rax, %xmm0
subss -0x14(%rbp), %xmm0
movl $0x2, %edi
callq 0x171a0
movq -0x300(%rbp), %rdi
addsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x28(%rbp)
addq $0x270, %rdi            # imm = 0x270
movl -0x4c(%rbp), %eax
movl %eax, %esi
callq 0xbec0
movl (%rax), %eax
cmpl -0x44(%rbp), %eax
jbe 0x15417
movq -0x300(%rbp), %rdi
addq $0x270, %rdi            # imm = 0x270
movl -0x4c(%rbp), %eax
movl %eax, %esi
callq 0xbec0
movl (%rax), %eax
movl %eax, -0x44(%rbp)
movq -0x300(%rbp), %rdi
addq $0x270, %rdi            # imm = 0x270
movl -0x4c(%rbp), %eax
movl %eax, %esi
callq 0xbec0
movl (%rax), %eax
cmpl -0x48(%rbp), %eax
jae 0x15453
movq -0x300(%rbp), %rdi
addq $0x270, %rdi            # imm = 0x270
movl -0x4c(%rbp), %eax
movl %eax, %esi
callq 0xbec0
movl (%rax), %eax
movl %eax, -0x48(%rbp)
movq -0x300(%rbp), %rdi
addq $0x270, %rdi            # imm = 0x270
movl -0x4c(%rbp), %eax
movl %eax, %esi
callq 0xbec0
movl (%rax), %eax
cvtsi2ss %rax, %xmm0
subss -0x18(%rbp), %xmm0
movl $0x2, %edi
callq 0x171a0
addsd -0x30(%rbp), %xmm0
movsd %xmm0, -0x30(%rbp)
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x15278
movq -0x300(%rbp), %rax
movsd -0x20(%rbp), %xmm0
movl 0x298(%rax), %eax
cvtsi2sd %rax, %xmm1
divsd %xmm1, %xmm0
callq 0x3170
movq -0x300(%rbp), %rax
movsd %xmm0, -0x58(%rbp)
movsd -0x28(%rbp), %xmm0
movl 0x298(%rax), %eax
cvtsi2sd %rax, %xmm1
divsd %xmm1, %xmm0
callq 0x3170
movq -0x300(%rbp), %rax
movsd %xmm0, -0x60(%rbp)
movsd -0x30(%rbp), %xmm0
movl 0x298(%rax), %eax
cvtsi2sd %rax, %xmm1
divsd %xmm1, %xmm0
callq 0x3170
movq -0x300(%rbp), %rax
movsd %xmm0, -0x68(%rbp)
movq 0x8(%rax), %rax
movl 0x22d9f(%rip), %ecx     # 0x382b8
xorl %edx, %edx
divq %rcx
cmpq $0x0, %rdx
jne 0x1552f
movl 0x22d8e(%rip), %eax     # 0x382b8
movl %eax, -0x6c(%rbp)
jmp 0x1554a
movq -0x300(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x22d78(%rip), %ecx     # 0x382b8
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, -0x6c(%rbp)
movq -0x300(%rbp), %rax
movl 0x290(%rax), %ecx
movl 0x298(%rax), %edx
addl %edx, %ecx
movl 0x22de7(%rip), %edx     # 0x3834c
imull %edx, %ecx
cvtsi2sd %rcx, %xmm0
movl -0x6c(%rbp), %ecx
cvtsi2ss %rcx, %xmm1
movss 0x22dd7(%rip), %xmm2    # 0x38354
mulss %xmm2, %xmm1
cvtss2sd %xmm1, %xmm1
movsd 0x1566b(%rip), %xmm2    # 0x2abf8
mulsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd 0x14a83(%rip), %xmm1    # 0x2a020
mulsd %xmm1, %xmm0
movsd %xmm0, -0x78(%rbp)
movl 0x294(%rax), %ecx
movl 0x298(%rax), %edx
cvtsi2sd %rdx, %xmm0
cvtsi2sd %rcx, %xmm1
divsd %xmm1, %xmm0
movsd 0x15638(%rip), %xmm1    # 0x2ac00
mulsd %xmm1, %xmm0
movsd %xmm0, -0x80(%rbp)
movq %rax, %rcx
addq $0x2b0, %rcx            # imm = 0x2B0
movq %rcx, -0x320(%rbp)
movq 0x8(%rax), %rax
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, -0x318(%rbp)
testq %rax, %rax
movss %xmm0, -0x314(%rbp)
js 0x15627
movss -0x318(%rbp), %xmm0
movss %xmm0, -0x314(%rbp)
movq -0x320(%rbp), %rdi
movss -0x314(%rbp), %xmm0
movss 0x22d16(%rip), %xmm1    # 0x38354
mulss %xmm1, %xmm0
movss 0x14a26(%rip), %xmm1    # 0x2a070
divss %xmm1, %xmm0
callq 0x3140
movq %rax, %rdi
leaq 0x1529a(%rip), %rsi     # 0x2a8f7
movq %rsi, -0x360(%rbp)
callq 0x31c0
movq %rax, -0x368(%rbp)
movl $0x4, %edi
callq 0xc180
movq -0x368(%rbp), %rdi
movl %eax, -0x84(%rbp)
movl -0x84(%rbp), %esi
callq 0x3320
movq %rax, %rdi
movsd -0x78(%rbp), %xmm0
callq 0x33e0
movq -0x360(%rbp), %rsi
movq %rax, %rdi
callq 0x31c0
movq %rax, %rdi
movss -0x10(%rbp), %xmm0
movss 0x22c96(%rip), %xmm1    # 0x38354
mulss %xmm1, %xmm0
callq 0x3140
movq -0x360(%rbp), %rsi
movq %rax, %rdi
callq 0x31c0
movq %rax, %rdi
movsd -0x80(%rbp), %xmm0
callq 0x33e0
movq %rax, %rdi
leaq 0x159b9(%rip), %rsi     # 0x2b0a6
callq 0x31c0
movq -0x300(%rbp), %rax
movl 0x290(%rax), %edx
movl 0x298(%rax), %ecx
addl %ecx, %edx
movl 0x2a4(%rax), %ecx
addl %edx, %ecx
movl %ecx, 0x2a4(%rax)
movl 0x298(%rax), %edx
movl 0x29c(%rax), %ecx
addl %edx, %ecx
movl %ecx, 0x29c(%rax)
movl 0x290(%rax), %edx
movl 0x2a0(%rax), %ecx
addl %edx, %ecx
movl %ecx, 0x2a0(%rax)
movq 0x22884(%rip), %rdi     # 0x37fc8
movq %rdi, -0x330(%rbp)
leaq 0x15957(%rip), %rsi     # 0x2b0a9
callq 0x31c0
movq %rax, %rdi
movq -0x300(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x22b4d(%rip), %ecx     # 0x382b8
xorl %edx, %edx
divq %rcx
movq %rax, %rsi
callq 0x3070
movq %rax, %rdi
leaq 0x15941(%rip), %rsi     # 0x2b0c3
callq 0x31c0
movq %rax, %rdi
movq 0x22817(%rip), %rsi     # 0x37fa8
movq %rsi, -0x338(%rbp)
callq 0x3200
movq -0x330(%rbp), %rdi
leaq 0x15931(%rip), %rsi     # 0x2b0dc
callq 0x31c0
movq %rax, %rdi
movq -0x300(%rbp), %rax
movl 0x298(%rax), %esi
callq 0x32d0
movq %rax, %rdi
leaq 0x15923(%rip), %rsi     # 0x2b0f2
movq %rsi, -0x358(%rbp)
callq 0x31c0
movq %rax, %rdi
movq -0x300(%rbp), %rax
movl 0x290(%rax), %esi
callq 0x32d0
movq %rax, %rdi
leaq 0x1491c(%rip), %rsi     # 0x2a116
callq 0x31c0
movq %rax, %rdi
movq -0x300(%rbp), %rax
movl 0x290(%rax), %ecx
movl 0x298(%rax), %eax
movl %eax, %edx
movl %edx, %eax
cvtsi2ss %rdx, %xmm0
addl %ecx, %eax
cvtsi2ss %rax, %xmm1
divss %xmm1, %xmm0
movss 0x14847(%rip), %xmm1    # 0x2a078
mulss %xmm1, %xmm0
callq 0x3140
movq %rax, %rdi
leaq 0x158b9(%rip), %rsi     # 0x2b0fd
callq 0x31c0
movq -0x300(%rbp), %rcx
movq %rax, %rdi
movl 0x290(%rcx), %eax
movl 0x298(%rcx), %esi
addl %eax, %esi
callq 0x32d0
movq -0x338(%rbp), %rsi
movq %rax, %rdi
callq 0x3200
movq -0x330(%rbp), %rdi
leaq 0x15886(%rip), %rsi     # 0x2b109
callq 0x31c0
movq %rax, %rdi
movq -0x300(%rbp), %rax
movl 0x29c(%rax), %esi
callq 0x32d0
movq -0x358(%rbp), %rsi
movq %rax, %rdi
callq 0x31c0
movq %rax, %rdi
movq -0x300(%rbp), %rax
movl 0x2a0(%rax), %esi
callq 0x32d0
movq %rax, %rdi
leaq 0x15854(%rip), %rsi     # 0x2b11f
callq 0x31c0
movq %rax, %rdi
movq -0x300(%rbp), %rax
movl 0x2a4(%rax), %esi
callq 0x32d0
movq -0x338(%rbp), %rsi
movq %rax, %rdi
callq 0x3200
movq -0x330(%rbp), %rdi
leaq 0x15827(%rip), %rsi     # 0x2b129
callq 0x31c0
movq %rax, %rdi
movq -0x300(%rbp), %rax
movl 0x28c(%rax), %esi
callq 0x32d0
movq %rax, %rdi
leaq 0x15819(%rip), %rsi     # 0x2b13f
callq 0x31c0
movq %rax, %rdi
movq -0x300(%rbp), %rax
movl 0x2a8(%rax), %esi
callq 0x32d0
movq -0x338(%rbp), %rsi
movq %rax, %rdi
callq 0x3200
movq -0x330(%rbp), %rdi
leaq 0x157ff(%rip), %rsi     # 0x2b15c
callq 0x31c0
movq %rax, %rdi
movsd -0x78(%rbp), %xmm0
callq 0x33e0
movq %rax, %rdi
leaq 0x157f9(%rip), %rsi     # 0x2b172
callq 0x31c0
movq -0x338(%rbp), %rsi
movq %rax, %rdi
callq 0x3200
movq -0x330(%rbp), %rdi
leaq 0x157df(%rip), %rsi     # 0x2b17a
callq 0x31c0
movq %rax, %rdi
movq -0x300(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x3070
movq -0x338(%rbp), %rsi
movq %rax, %rdi
callq 0x3200
movq -0x330(%rbp), %rdi
leaq 0x157c0(%rip), %rsi     # 0x2b190
callq 0x31c0
movq -0x338(%rbp), %rsi
movq %rax, %rdi
callq 0x3200
movq -0x330(%rbp), %rdi
leaq 0x157b9(%rip), %rsi     # 0x2b1ab
callq 0x31c0
movq %rax, %rdi
movss -0x10(%rbp), %xmm0
movss 0x2294d(%rip), %xmm1    # 0x38354
mulss %xmm1, %xmm0
callq 0x3140
movq %rax, %rdi
leaq 0x157a4(%rip), %rsi     # 0x2b1be
movq %rsi, -0x340(%rbp)
callq 0x31c0
movq -0x338(%rbp), %rsi
movq %rax, %rdi
callq 0x3200
movq -0x330(%rbp), %rdi
leaq 0x1577f(%rip), %rsi     # 0x2b1c2
movq %rsi, -0x350(%rbp)
callq 0x31c0
movq %rax, %rdi
movsd -0x58(%rbp), %xmm0
movss 0x228f5(%rip), %xmm1    # 0x38354
cvtss2sd %xmm1, %xmm1
mulsd %xmm1, %xmm0
callq 0x33e0
movq -0x340(%rbp), %rsi
movq %rax, %rdi
callq 0x31c0
movq -0x338(%rbp), %rsi
movq %rax, %rdi
callq 0x3200
movq -0x330(%rbp), %rdi
leaq 0x1573d(%rip), %rsi     # 0x2b1d5
movq %rsi, -0x348(%rbp)
callq 0x31c0
movq %rax, %rdi
movl -0x38(%rbp), %eax
cvtsi2ss %rax, %xmm0
movss 0x2289d(%rip), %xmm1    # 0x38354
mulss %xmm1, %xmm0
callq 0x3140
movq -0x340(%rbp), %rsi
movq %rax, %rdi
callq 0x31c0
movq -0x338(%rbp), %rsi
movq %rax, %rdi
callq 0x3200
movq -0x330(%rbp), %rdi
leaq 0x156fc(%rip), %rsi     # 0x2b1e8
movq %rsi, -0x328(%rbp)
callq 0x31c0
movq %rax, %rdi
movl -0x34(%rbp), %eax
cvtsi2ss %rax, %xmm0
movss 0x22849(%rip), %xmm1    # 0x38354
mulss %xmm1, %xmm0
callq 0x3140
movq -0x340(%rbp), %rsi
movq %rax, %rdi
callq 0x31c0
movq -0x338(%rbp), %rsi
movq %rax, %rdi
callq 0x3200
movq -0x330(%rbp), %rdi
leaq 0x156bb(%rip), %rsi     # 0x2b1fb
callq 0x31c0
movq %rax, %rdi
movss -0x18(%rbp), %xmm0
movss 0x227ff(%rip), %xmm1    # 0x38354
mulss %xmm1, %xmm0
callq 0x3140
movq -0x340(%rbp), %rsi
movq %rax, %rdi
callq 0x31c0
movq -0x338(%rbp), %rsi
movq %rax, %rdi
callq 0x3200
movq -0x330(%rbp), %rdi
leaq 0x15684(%rip), %rsi     # 0x2b20e
callq 0x31c0
movq %rax, %rdi
movsd -0x68(%rbp), %xmm0
movss 0x227b5(%rip), %xmm1    # 0x38354
cvtss2sd %xmm1, %xmm1
mulsd %xmm1, %xmm0
callq 0x33e0
movq -0x338(%rbp), %rsi
movq %rax, %rdi
callq 0x3200
movq -0x330(%rbp), %rdi
leaq 0x15658(%rip), %rsi     # 0x2b221
callq 0x31c0
movq %rax, %rdi
movl -0x48(%rbp), %eax
cvtsi2ss %rax, %xmm0
movss 0x22773(%rip), %xmm1    # 0x38354
mulss %xmm1, %xmm0
callq 0x3140
movq -0x340(%rbp), %rsi
movq %rax, %rdi
callq 0x31c0
movq -0x338(%rbp), %rsi
movq %rax, %rdi
callq 0x3200
movq -0x330(%rbp), %rdi
leaq 0x1561e(%rip), %rsi     # 0x2b234
callq 0x31c0
movq %rax, %rdi
movl -0x44(%rbp), %eax
cvtsi2ss %rax, %xmm0
movss 0x22726(%rip), %xmm1    # 0x38354
mulss %xmm1, %xmm0
callq 0x3140
movq -0x340(%rbp), %rsi
movq %rax, %rdi
callq 0x31c0
movq -0x338(%rbp), %rsi
movq %rax, %rdi
callq 0x3200
movq -0x330(%rbp), %rdi
leaq 0x155e4(%rip), %rsi     # 0x2b247
callq 0x31c0
movq %rax, %rdi
movss -0x14(%rbp), %xmm0
movss 0x226dc(%rip), %xmm1    # 0x38354
mulss %xmm1, %xmm0
callq 0x3140
movq -0x340(%rbp), %rsi
movq %rax, %rdi
callq 0x31c0
movq -0x338(%rbp), %rsi
movq %rax, %rdi
callq 0x3200
movq -0x350(%rbp), %rsi
movq -0x330(%rbp), %rdi
callq 0x31c0
movq %rax, %rdi
movsd -0x60(%rbp), %xmm0
movss 0x22692(%rip), %xmm1    # 0x38354
cvtss2sd %xmm1, %xmm1
mulsd %xmm1, %xmm0
callq 0x33e0
movq -0x340(%rbp), %rsi
movq %rax, %rdi
callq 0x31c0
movq -0x338(%rbp), %rsi
movq %rax, %rdi
callq 0x3200
movq -0x348(%rbp), %rsi
movq -0x330(%rbp), %rdi
callq 0x31c0
movq %rax, %rdi
movl -0x40(%rbp), %eax
cvtsi2ss %rax, %xmm0
movss 0x22641(%rip), %xmm1    # 0x38354
mulss %xmm1, %xmm0
callq 0x3140
movq -0x340(%rbp), %rsi
movq %rax, %rdi
callq 0x31c0
movq -0x338(%rbp), %rsi
movq %rax, %rdi
callq 0x3200
movq -0x330(%rbp), %rdi
movq -0x328(%rbp), %rsi
callq 0x31c0
movq %rax, %rdi
movl -0x3c(%rbp), %eax
cvtsi2ss %rax, %xmm0
mulss 0x225f4(%rip), %xmm0    # 0x38354
callq 0x3140
movq %rax, %rdi
leaq 0x1544f(%rip), %rsi     # 0x2b1be
callq 0x31c0
movq %rax, %rdi
movq 0x2222a(%rip), %rsi     # 0x37fa8
callq 0x3200
movq 0x2223e(%rip), %rdi     # 0x37fc8
leaq 0x154c9(%rip), %rsi     # 0x2b25a
callq 0x31c0
movq %rax, %rdi
movq 0x22208(%rip), %rsi     # 0x37fa8
callq 0x3200
movq -0x300(%rbp), %rax
movq $0x0, 0xb0(%rax)
movq $0x0, 0xa8(%rax)
movq 0x221ff(%rip), %rdi     # 0x37fc8
leaq 0x154cf(%rip), %rsi     # 0x2b29f
callq 0x31c0
movq %rax, %rdi
movq 0x221c9(%rip), %rsi     # 0x37fa8
callq 0x3200
movl $0x0, -0x88(%rbp)
movl -0x88(%rbp), %eax
cmpl 0x224a6(%rip), %eax     # 0x382a0
jae 0x168fb
xorps %xmm0, %xmm0
movss %xmm0, -0x8c(%rbp)
movl $0x0, -0x90(%rbp)
movl $0xffffffff, -0x94(%rbp) # imm = 0xFFFFFFFF
xorps %xmm0, %xmm0
movsd %xmm0, -0xa0(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0xa8(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0xb0(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0xb8(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0xc0(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0xc8(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0xd0(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0xd8(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0xe0(%rbp)
movl $0x0, -0xe4(%rbp)
movq -0x300(%rbp), %rdi
movl -0xe4(%rbp), %eax
movq %rax, -0x370(%rbp)
addq $0x170, %rdi            # imm = 0x170
movl -0x88(%rbp), %eax
movl %eax, %esi
callq 0x17040
movq %rax, %rdi
callq 0x17100
movq %rax, %rcx
movq -0x370(%rbp), %rax
cmpq %rcx, %rax
jae 0x161df
movq -0x300(%rbp), %rdi
addq $0x170, %rdi            # imm = 0x170
movl -0x88(%rbp), %eax
movl %eax, %esi
callq 0x17040
movq %rax, %rdi
movl -0xe4(%rbp), %eax
movl %eax, %esi
callq 0xbec0
movl (%rax), %eax
cmpl -0x90(%rbp), %eax
jbe 0x15f37
movq -0x300(%rbp), %rdi
addq $0x170, %rdi            # imm = 0x170
movl -0x88(%rbp), %eax
movl %eax, %esi
callq 0x17040
movq %rax, %rdi
movl -0xe4(%rbp), %eax
movl %eax, %esi
callq 0xbec0
movl (%rax), %eax
movl %eax, -0x90(%rbp)
movq -0x300(%rbp), %rdi
addq $0x170, %rdi            # imm = 0x170
movl -0x88(%rbp), %eax
movl %eax, %esi
callq 0x17040
movq %rax, %rdi
movl -0xe4(%rbp), %eax
movl %eax, %esi
callq 0xbec0
movl (%rax), %eax
cmpl -0x94(%rbp), %eax
jae 0x15f9f
movq -0x300(%rbp), %rdi
addq $0x170, %rdi            # imm = 0x170
movl -0x88(%rbp), %eax
movl %eax, %esi
callq 0x17040
movq %rax, %rdi
movl -0xe4(%rbp), %eax
movl %eax, %esi
callq 0xbec0
movl (%rax), %eax
movl %eax, -0x94(%rbp)
movq -0x300(%rbp), %rdi
addq $0x170, %rdi            # imm = 0x170
movl -0x88(%rbp), %eax
movl %eax, %esi
callq 0x17040
movq %rax, %rdi
movl -0xe4(%rbp), %eax
movl %eax, %esi
callq 0xbec0
movq -0x300(%rbp), %rdi
movl (%rax), %eax
cvtsi2ss %rax, %xmm1
movss -0x8c(%rbp), %xmm0
addss %xmm1, %xmm0
movss %xmm0, -0x8c(%rbp)
addq $0x1b8, %rdi            # imm = 0x1B8
movl -0x88(%rbp), %eax
movl %eax, %esi
callq 0x17040
movq %rax, %rdi
movl -0xe4(%rbp), %eax
movl %eax, %esi
callq 0xbec0
movq -0x300(%rbp), %rdi
movl (%rax), %eax
cvtsi2sd %rax, %xmm1
movsd -0xb0(%rbp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0xb0(%rbp)
addq $0x1d0, %rdi            # imm = 0x1D0
movl -0x88(%rbp), %eax
movl %eax, %esi
callq 0x17040
movq %rax, %rdi
movl -0xe4(%rbp), %eax
movl %eax, %esi
callq 0xbec0
movq -0x300(%rbp), %rdi
movl (%rax), %eax
cvtsi2sd %rax, %xmm1
movsd -0xb8(%rbp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0xb8(%rbp)
addq $0x188, %rdi            # imm = 0x188
movl -0x88(%rbp), %eax
movl %eax, %esi
callq 0x17040
movq %rax, %rdi
movl -0xe4(%rbp), %eax
movl %eax, %esi
callq 0xbec0
movq -0x300(%rbp), %rdi
movl (%rax), %eax
cvtsi2sd %rax, %xmm1
movsd -0xc0(%rbp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0xc0(%rbp)
addq $0x1a0, %rdi            # imm = 0x1A0
movl -0x88(%rbp), %eax
movl %eax, %esi
callq 0x17040
movq %rax, %rdi
movl -0xe4(%rbp), %eax
movl %eax, %esi
callq 0xbec0
movq -0x300(%rbp), %rdi
movl (%rax), %eax
cvtsi2sd %rax, %xmm1
movsd -0xc8(%rbp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0xc8(%rbp)
addq $0x1e8, %rdi            # imm = 0x1E8
movl -0x88(%rbp), %eax
movl %eax, %esi
callq 0x17040
movq %rax, %rdi
movl -0xe4(%rbp), %eax
movl %eax, %esi
callq 0xbec0
movq -0x300(%rbp), %rdi
movl (%rax), %eax
cvtsi2sd %rax, %xmm1
movsd -0xd0(%rbp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0xd0(%rbp)
addq $0x200, %rdi            # imm = 0x200
movl -0x88(%rbp), %eax
movl %eax, %esi
callq 0x17040
movq %rax, %rdi
movl -0xe4(%rbp), %eax
movl %eax, %esi
callq 0xbec0
movq -0x300(%rbp), %rdi
movl (%rax), %eax
cvtsi2sd %rax, %xmm1
movsd -0xd8(%rbp), %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0xd8(%rbp)
addq $0x218, %rdi            # imm = 0x218
movl -0x88(%rbp), %eax
movl %eax, %esi
callq 0x17040
movq %rax, %rdi
movl -0xe4(%rbp), %eax
movl %eax, %esi
callq 0xbec0
movl (%rax), %eax
cvtsi2sd %rax, %xmm0
addsd -0xe0(%rbp), %xmm0
movsd %xmm0, -0xe0(%rbp)
movl -0xe4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xe4(%rbp)
jmp 0x15e8c
movq -0x300(%rbp), %rdi
movss -0x8c(%rbp), %xmm0
movss %xmm0, -0x37c(%rbp)
addq $0x170, %rdi            # imm = 0x170
movl -0x88(%rbp), %eax
movl %eax, %esi
callq 0x17040
movq %rax, %rdi
callq 0x17100
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, -0x378(%rbp)
testq %rax, %rax
movss %xmm0, -0x374(%rbp)
js 0x16253
movss -0x378(%rbp), %xmm0
movss %xmm0, -0x374(%rbp)
movq -0x300(%rbp), %rdi
movss -0x37c(%rbp), %xmm0
movss -0x374(%rbp), %xmm1
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0xa8(%rbp)
addq $0x2b0, %rdi            # imm = 0x2B0
movss 0x220cb(%rip), %xmm0    # 0x38354
cvtss2sd %xmm0, %xmm0
mulsd -0xa8(%rbp), %xmm0
callq 0x33e0
movq %rax, %rdi
leaq 0x14653(%rip), %rsi     # 0x2a8f7
callq 0x31c0
movl $0x0, -0xe8(%rbp)
movq -0x300(%rbp), %rdi
movl -0xe8(%rbp), %eax
movq %rax, -0x388(%rbp)
addq $0x170, %rdi            # imm = 0x170
movl -0x88(%rbp), %eax
movl %eax, %esi
callq 0x17040
movq %rax, %rdi
callq 0x17100
movq %rax, %rcx
movq -0x388(%rbp), %rax
cmpq %rcx, %rax
jae 0x1635a
movq -0x300(%rbp), %rdi
addq $0x170, %rdi            # imm = 0x170
movl -0x88(%rbp), %eax
movl %eax, %esi
callq 0x17040
movq %rax, %rdi
movl -0xe8(%rbp), %eax
movl %eax, %esi
callq 0xbec0
movl (%rax), %eax
cvtsi2sd %rax, %xmm0
subsd -0xa8(%rbp), %xmm0
movl $0x2, %edi
callq 0x171d0
addsd -0xa0(%rbp), %xmm0
movsd %xmm0, -0xa0(%rbp)
movl -0xe8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xe8(%rbp)
jmp 0x162b3
movq -0x300(%rbp), %rdi
leaq -0x2f0(%rbp), %rax
movq %rax, -0x3c8(%rbp)
movl -0x88(%rbp), %eax
movl %eax, -0x3bc(%rbp)
movss 0x21fd1(%rip), %xmm0    # 0x38354
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x458(%rbp)
movsd -0xc0(%rbp), %xmm0
movsd %xmm0, -0x460(%rbp)
addq $0x188, %rdi            # imm = 0x188
movl %eax, %esi
callq 0x17040
movq %rax, %rdi
callq 0x17100
movsd -0x460(%rbp), %xmm1
movsd -0x458(%rbp), %xmm0
movq -0x300(%rbp), %rdi
movq %rax, %xmm2
movaps 0x13ca8(%rip), %xmm3    # 0x2a080
movaps %xmm3, -0x400(%rbp)
punpckldq %xmm3, %xmm2    # xmm2 = xmm2[0],xmm3[0],xmm2[1],xmm3[1]
movapd 0x13ca5(%rip), %xmm3    # 0x2a090
movaps %xmm3, -0x3f0(%rbp)
subpd %xmm3, %xmm2
movaps %xmm2, %xmm3
unpckhpd %xmm2, %xmm2            # xmm2 = xmm2[1,1]
addsd %xmm3, %xmm2
divsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, -0x3b8(%rbp)
movss 0x21f3b(%rip), %xmm0    # 0x38354
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x448(%rbp)
movsd -0xb0(%rbp), %xmm0
movsd %xmm0, -0x450(%rbp)
addq $0x1b8, %rdi            # imm = 0x1B8
movl -0x88(%rbp), %eax
movl %eax, %esi
callq 0x17040
movq %rax, %rdi
callq 0x17100
movsd -0x450(%rbp), %xmm1
movsd -0x448(%rbp), %xmm0
movaps -0x400(%rbp), %xmm4
movaps -0x3f0(%rbp), %xmm3
movq -0x300(%rbp), %rdi
movq %rax, %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
divsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, -0x3b0(%rbp)
movss 0x21eae(%rip), %xmm0    # 0x38354
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x438(%rbp)
movsd -0xe0(%rbp), %xmm0
movsd %xmm0, -0x440(%rbp)
addq $0x218, %rdi            # imm = 0x218
movl -0x88(%rbp), %eax
movl %eax, %esi
callq 0x17040
movq %rax, %rdi
callq 0x17100
movsd -0x440(%rbp), %xmm1
movsd -0x438(%rbp), %xmm0
movaps -0x400(%rbp), %xmm4
movaps -0x3f0(%rbp), %xmm3
movq -0x300(%rbp), %rdi
movq %rax, %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
divsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, -0x3a8(%rbp)
movss 0x21e21(%rip), %xmm0    # 0x38354
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x428(%rbp)
movsd -0xd0(%rbp), %xmm0
movsd %xmm0, -0x430(%rbp)
addq $0x1e8, %rdi            # imm = 0x1E8
movl -0x88(%rbp), %eax
movl %eax, %esi
callq 0x17040
movq %rax, %rdi
callq 0x17100
movsd -0x430(%rbp), %xmm1
movsd -0x428(%rbp), %xmm0
movaps -0x400(%rbp), %xmm4
movaps -0x3f0(%rbp), %xmm3
movq -0x300(%rbp), %rdi
movq %rax, %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
divsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, -0x3a0(%rbp)
movss 0x21d94(%rip), %xmm0    # 0x38354
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x418(%rbp)
movsd -0xd8(%rbp), %xmm0
movsd %xmm0, -0x420(%rbp)
addq $0x200, %rdi            # imm = 0x200
movl -0x88(%rbp), %eax
movl %eax, %esi
callq 0x17040
movq %rax, %rdi
callq 0x17100
movsd -0x420(%rbp), %xmm1
movsd -0x418(%rbp), %xmm0
movaps -0x400(%rbp), %xmm4
movaps -0x3f0(%rbp), %xmm3
movq -0x300(%rbp), %rdi
movq %rax, %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
divsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, -0x398(%rbp)
movss 0x21d07(%rip), %xmm0    # 0x38354
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x408(%rbp)
movsd -0xb8(%rbp), %xmm0
movsd %xmm0, -0x410(%rbp)
addq $0x1d0, %rdi            # imm = 0x1D0
movl -0x88(%rbp), %eax
movl %eax, %esi
callq 0x17040
movq %rax, %rdi
callq 0x17100
movsd -0x410(%rbp), %xmm1
movsd -0x408(%rbp), %xmm0
movaps -0x400(%rbp), %xmm4
movaps -0x3f0(%rbp), %xmm3
movq -0x300(%rbp), %rdi
movq %rax, %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
divsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, -0x390(%rbp)
movss 0x21c7a(%rip), %xmm0    # 0x38354
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x3d0(%rbp)
movsd -0xc8(%rbp), %xmm0
movsd %xmm0, -0x3d8(%rbp)
addq $0x1a0, %rdi            # imm = 0x1A0
movl -0x88(%rbp), %eax
movl %eax, %esi
callq 0x17040
movq %rax, %rdi
callq 0x17100
movaps -0x400(%rbp), %xmm10
movaps -0x3f0(%rbp), %xmm9
movsd -0x3d8(%rbp), %xmm7
movsd -0x3d0(%rbp), %xmm6
movq -0x3c8(%rbp), %rdi
movl -0x3bc(%rbp), %ecx
movsd -0x3b8(%rbp), %xmm0
movsd -0x3b0(%rbp), %xmm1
movsd -0x3a8(%rbp), %xmm2
movsd -0x3a0(%rbp), %xmm3
movsd -0x398(%rbp), %xmm4
movsd -0x390(%rbp), %xmm5
movq %rax, %xmm8
punpckldq %xmm10, %xmm8   # xmm8 = xmm8[0],xmm10[0],xmm8[1],xmm10[1]
subpd %xmm9, %xmm8
movaps %xmm8, %xmm9
unpckhpd %xmm8, %xmm8            # xmm8 = xmm8[1,1]
addsd %xmm9, %xmm8
divsd %xmm8, %xmm7
mulsd %xmm7, %xmm6
movss 0x21bb7(%rip), %xmm7    # 0x38354
cvtss2sd %xmm7, %xmm7
mulsd -0xa8(%rbp), %xmm7
movl $0x200, %esi            # imm = 0x200
leaq 0x14b3b(%rip), %rdx     # 0x2b2f0
movb $0x8, %al
callq 0x3330
leaq -0x2f0(%rbp), %rsi
movq 0x217fe(%rip), %rdi     # 0x37fc8
callq 0x31c0
movq -0x300(%rbp), %rdi
addq $0x218, %rdi            # imm = 0x218
movl -0x88(%rbp), %eax
movl %eax, %esi
callq 0x17040
movq %rax, %rdi
callq 0x17200
movq -0x300(%rbp), %rdi
addq $0x170, %rdi            # imm = 0x170
movl -0x88(%rbp), %eax
movl %eax, %esi
callq 0x17040
movq %rax, %rdi
callq 0x17200
movq -0x300(%rbp), %rdi
addq $0x1b8, %rdi            # imm = 0x1B8
movl -0x88(%rbp), %eax
movl %eax, %esi
callq 0x17040
movq %rax, %rdi
callq 0x17200
movq -0x300(%rbp), %rdi
addq $0x1d0, %rdi            # imm = 0x1D0
movl -0x88(%rbp), %eax
movl %eax, %esi
callq 0x17040
movq %rax, %rdi
callq 0x17200
movq -0x300(%rbp), %rdi
addq $0x188, %rdi            # imm = 0x188
movl -0x88(%rbp), %eax
movl %eax, %esi
callq 0x17040
movq %rax, %rdi
callq 0x17200
movq -0x300(%rbp), %rdi
addq $0x1a0, %rdi            # imm = 0x1A0
movl -0x88(%rbp), %eax
movl %eax, %esi
callq 0x17040
movq %rax, %rdi
callq 0x17200
movq -0x300(%rbp), %rdi
addq $0x1e8, %rdi            # imm = 0x1E8
movl -0x88(%rbp), %eax
movl %eax, %esi
callq 0x17040
movq %rax, %rdi
callq 0x17200
movq -0x300(%rbp), %rdi
addq $0x200, %rdi            # imm = 0x200
movl -0x88(%rbp), %eax
movl %eax, %esi
callq 0x17040
movq %rax, %rdi
callq 0x17200
movl -0x88(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x88(%rbp)
jmp 0x15dee
movq 0x216c6(%rip), %rdi     # 0x37fc8
leaq 0x14a1c(%rip), %rsi     # 0x2b325
callq 0x31c0
movq %rax, %rdi
movq 0x21690(%rip), %rsi     # 0x37fa8
callq 0x3200
movl $0x0, -0x2f4(%rbp)
movl -0x2f4(%rbp), %eax
leaq 0x21a3c(%rip), %rcx     # 0x38370
cmpl (%rcx), %eax
jae 0x16c4e
movq 0x21685(%rip), %rdi     # 0x37fc8
movq %rdi, -0x490(%rbp)
leaq 0x13ec5(%rip), %rsi     # 0x2a816
callq 0x31c0
movq %rax, %rdi
movl -0x2f4(%rbp), %esi
callq 0x32d0
movq %rax, %rdi
leaq 0x15895(%rip), %rsi     # 0x2c203
callq 0x31c0
movq -0x490(%rbp), %rdi
leaq 0x1392d(%rip), %rsi     # 0x2a2ae
callq 0x31c0
movq -0x300(%rbp), %rdi
movq %rax, -0x498(%rbp)
addq $0xc8, %rdi
movl -0x2f4(%rbp), %eax
movl %eax, %esi
callq 0xbec0
movq -0x498(%rbp), %rdi
movl (%rax), %eax
cvtsi2ss %rax, %xmm0
movl -0x6c(%rbp), %eax
cvtsi2ss %rax, %xmm1
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x14232(%rip), %xmm1    # 0x2ac00
mulsd %xmm1, %xmm0
callq 0x33e0
movq %rax, %rdi
leaq 0x14964(%rip), %rsi     # 0x2b345
callq 0x31c0
movq -0x490(%rbp), %rdi
leaq 0x138c7(%rip), %rsi     # 0x2a2bb
callq 0x31c0
movq -0x300(%rbp), %rdi
movq %rax, -0x488(%rbp)
addq $0xe0, %rdi
movl -0x2f4(%rbp), %eax
movl %eax, %esi
callq 0xbec0
movq -0x488(%rbp), %rdi
movl (%rax), %eax
cvtsi2ss %rax, %xmm0
movl -0x6c(%rbp), %eax
cvtsi2ss %rax, %xmm1
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x141bf(%rip), %xmm1    # 0x2ac00
mulsd %xmm1, %xmm0
callq 0x33e0
movq %rax, %rdi
leaq 0x148f1(%rip), %rsi     # 0x2b345
callq 0x31c0
movq 0x21568(%rip), %rdi     # 0x37fc8
leaq 0x148e6(%rip), %rsi     # 0x2b34d
callq 0x31c0
movq -0x300(%rbp), %rdi
movq %rax, -0x480(%rbp)
addq $0x110, %rdi            # imm = 0x110
movl -0x2f4(%rbp), %eax
movl %eax, %esi
callq 0xbec0
movq -0x480(%rbp), %rdi
movl (%rax), %esi
callq 0x32d0
movq 0x21525(%rip), %rdi     # 0x37fc8
leaq 0x148a9(%rip), %rsi     # 0x2b353
callq 0x31c0
movq -0x300(%rbp), %rdi
movq %rax, -0x478(%rbp)
addq $0x128, %rdi            # imm = 0x128
movl -0x2f4(%rbp), %eax
movl %eax, %esi
callq 0xbec0
movq -0x478(%rbp), %rdi
movl (%rax), %esi
callq 0x32d0
movq 0x214e2(%rip), %rdi     # 0x37fc8
leaq 0x1486d(%rip), %rsi     # 0x2b35a
callq 0x31c0
movq -0x300(%rbp), %rdi
movq %rax, -0x470(%rbp)
addq $0x140, %rdi            # imm = 0x140
movl -0x2f4(%rbp), %eax
movl %eax, %esi
callq 0xbec0
movq -0x470(%rbp), %rdi
movl (%rax), %esi
callq 0x32d0
movq 0x2149f(%rip), %rdi     # 0x37fc8
leaq 0x14830(%rip), %rsi     # 0x2b360
callq 0x31c0
movq -0x300(%rbp), %rdi
movq %rax, -0x468(%rbp)
addq $0xf8, %rdi
movl -0x2f4(%rbp), %eax
movl %eax, %esi
callq 0xbec0
movq -0x468(%rbp), %rdi
movl (%rax), %esi
callq 0x32d0
movq %rax, %rdi
movq 0x21439(%rip), %rsi     # 0x37fa8
callq 0x3200
movq -0x300(%rbp), %rdi
addq $0x140, %rdi            # imm = 0x140
movl -0x2f4(%rbp), %eax
movl %eax, %esi
callq 0xbec0
movq -0x300(%rbp), %rdi
movl $0x0, (%rax)
addq $0x128, %rdi            # imm = 0x128
movl -0x2f4(%rbp), %eax
movl %eax, %esi
callq 0xbec0
movq -0x300(%rbp), %rdi
movl $0x0, (%rax)
addq $0x110, %rdi            # imm = 0x110
movl -0x2f4(%rbp), %eax
movl %eax, %esi
callq 0xbec0
movq -0x300(%rbp), %rdi
movl $0x0, (%rax)
addq $0xe0, %rdi
movl -0x2f4(%rbp), %eax
movl %eax, %esi
callq 0xbec0
movq -0x300(%rbp), %rdi
movl $0x0, (%rax)
addq $0xc8, %rdi
movl -0x2f4(%rbp), %eax
movl %eax, %esi
callq 0xbec0
movq -0x300(%rbp), %rdi
movl $0x0, (%rax)
addq $0xf8, %rdi
movl -0x2f4(%rbp), %eax
movl %eax, %esi
callq 0xbec0
movl $0x0, (%rax)
movl -0x2f4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2f4(%rbp)
jmp 0x16927
movq -0x300(%rbp), %rdi
movl $0x0, 0x290(%rdi)
movl $0x0, 0x298(%rdi)
movl $0x0, 0x248(%rdi)
movl $0x0, 0x268(%rdi)
movl $0x0, 0x288(%rdi)
addq $0x230, %rdi            # imm = 0x230
callq 0x17200
movq -0x300(%rbp), %rdi
addq $0x250, %rdi            # imm = 0x250
callq 0x17200
movq -0x300(%rbp), %rdi
addq $0x270, %rdi            # imm = 0x270
callq 0x17200
movq -0x300(%rbp), %rdx
movq 0x10(%rdx), %rdi
movq %rdx, %rsi
addq $0x2b0, %rsi            # imm = 0x2B0
addq $0x4b0, %rdx            # imm = 0x4B0
movb -0x9(%rbp), %al
movl -0x6c(%rbp), %r8d
andb $0x1, %al
movzbl %al, %ecx
callq 0x9400
addq $0x4a0, %rsp            # imm = 0x4A0
popq %rbp
retq
nop