LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/ctSkennerton[P]fxtract/util/sheap.c
// Function: sheap_dump
void
sheap_dump(SHEAP const*shp, FILE *fp)
{
    SCORE *base = shp->count ? (SCORE*)(void*)-1 : NULL;
    int i;
    for (i = 0; i < shp->count; ++i)
        if (base > shp->vec[i]) base = shp->vec[i];
    fprintf(fp, "size=%d count=%d hole=%d\n",
            shp->size, shp->count, shp->hole);
    for (i = 0; i < shp->count; ++i)
        if (i != shp->hole)
            fprintf(fp, "%d: @%04lx %d\n", i, shp->vec[i] - base, *shp->vec[i]);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movslq 0x4(%rdi), %rcx
xorl %r13d, %r13d
testq %rcx, %rcx
setne %r13b
negq %r13
testq %rcx, %rcx
jle 0x180f
movq 0x10(%r14), %rax
xorl %edx, %edx
movq (%rax,%rdx,8), %rsi
cmpq %rsi, %r13
cmovaq %rsi, %r13
incq %rdx
cmpq %rdx, %rcx
jne 0x17fc
movl (%r14), %edx
movl 0x8(%r14), %r8d
leaq 0x196e(%rip), %rsi      # 0x318b
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1190
movl 0x4(%r14), %eax
testl %eax, %eax
jle 0x1873
leaq 0x196f(%rip), %r15      # 0x31a5
xorl %r12d, %r12d
movl 0x8(%r14), %ecx
cmpq %rcx, %r12
je 0x1868
movq 0x10(%r14), %rax
movq (%rax,%r12,8), %rcx
movl (%rcx), %r8d
subq %r13, %rcx
sarq $0x2, %rcx
movq %rbx, %rdi
movq %r15, %rsi
movl %r12d, %edx
xorl %eax, %eax
callq 0x1190
movl 0x4(%r14), %eax
incq %r12
movslq %eax, %rcx
cmpq %rcx, %r12
jl 0x1839
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O3/sergiosvieira[P]ptd2ns2/ptd2ns2.cc
// Function: Friis(double, double, double, double, double, double)
double Friis(double Pt, double Gt, double Gr, double lambda, double L, double d) {
	/*
	 * Friis free space equation:
	 *
	 *       Pt * Gt * Gr * (lambda^2)
	 *   P = --------------------------
	 *       (4 * pi * d)^2 * L
	 */
	if (d == 0.0) //XXX probably better check < MIN_DISTANCE or some such
		return Pt;
	double M = lambda / (4 * PI * d);

	return (Pt * Gt * Gr * (M * M)) / L;
}

// Assembly:
xorpd %xmm6, %xmm6
ucomisd %xmm6, %xmm5
jne 0x2719
jp 0x2719
retq
pushq %rbp
movq %rsp, %rbp
mulsd 0x38e3(%rip), %xmm5     # 0x6008
divsd %xmm5, %xmm3
mulsd %xmm1, %xmm0
mulsd %xmm2, %xmm0
mulsd %xmm3, %xmm3
mulsd %xmm0, %xmm3
divsd %xmm4, %xmm3
movapd %xmm3, %xmm0
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/sergiosvieira[P]ptd2ns2/ranvar.cc
// Function: ErlangRandomVariable::value()
double ErlangRandomVariable::value() {
	double result = 0;
	for (int i = 0; i < k_; i++) {
		result += rng_->exponential(lambda_);
	}
	return result;

}

// Assembly:
cmpl $0x0, 0x18(%rdi)
jle 0x3389
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
xorl %r14d, %r14d
movsd %xmm0, -0x18(%rbp)
movq 0x8(%rbx), %rdi
movsd 0x10(%rbx), %xmm0
movsd %xmm0, -0x20(%rbp)
callq 0x4702
callq 0x2130
mulsd -0x20(%rbp), %xmm0
movsd -0x18(%rbp), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, -0x18(%rbp)
movsd -0x18(%rbp), %xmm0
incl %r14d
cmpl 0x18(%rbx), %r14d
jl 0x3342
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
xorps %xmm0, %xmm0
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/sergiosvieira[P]ptd2ns2/ranvar.cc
// Function: GammaRandomVariable::value()
double GammaRandomVariable::value() {
	// Proposed by Marsaglia in 2000:
	// G. Marsaglia, W. W. Tsang: A simple method for gereating Gamma variables
	// ACM Transactions on mathematical software, Vol. 26, No. 3, Sept. 2000
	if (alpha_ < 1) {
		double u = rng_->uniform(1.0);
		return GammaRandomVariable(1.0 + alpha_, beta_).value() * pow(u,
				1.0 / alpha_);
	}

	double x, v, u;
	double d = alpha_ - 1.0 / 3.0;
	double c = (1.0 / 3.0) / sqrt(d);

	while (1) {
		do {
			x = rng_->normal(0.0, 1.0);
			v = 1.0 + c * x;
		} while (v <= 0);

		v = v * v * v;
		u = rng_->uniform(1.0);
		if (u < 1 - 0.0331 * x * x * x * x)
			break;
		if (log(u) < 0.5 * x * x + d * (1 - v + log(v)))
			break;
	}
	return beta_ * d * v;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
movsd 0x10(%rdi), %xmm0
movsd 0x2c4b(%rip), %xmm1     # 0x6038
ucomisd %xmm0, %xmm1
jbe 0x3469
movq 0x8(%rbx), %rdi
callq 0x4702
movsd %xmm0, -0x18(%rbp)
movsd 0x10(%rbx), %xmm0
addsd 0x2c2a(%rip), %xmm0     # 0x6038
movsd 0x18(%rbx), %xmm1
leaq 0x6e8e(%rip), %rax      # 0xa2a8
movq (%rax), %rax
leaq -0x60(%rbp), %rdi
movq %rax, 0x8(%rdi)
leaq 0x673c(%rip), %rax      # 0x9b68
movq %rax, (%rdi)
movsd %xmm0, 0x10(%rdi)
movsd %xmm1, 0x18(%rdi)
callq 0x33d4
movsd %xmm0, -0x10(%rbp)
movsd 0x2bed(%rip), %xmm1     # 0x6038
divsd 0x10(%rbx), %xmm1
movsd -0x18(%rbp), %xmm0
callq 0x22e0
mulsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x10(%rbp)
jmp 0x3588
addsd 0x2dcf(%rip), %xmm0     # 0x6240
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
movsd %xmm0, -0x20(%rbp)
jb 0x3486
sqrtsd %xmm0, %xmm0
jmp 0x348b
callq 0x2120
movsd 0x2db5(%rip), %xmm1     # 0x6248
divsd %xmm0, %xmm1
movsd %xmm1, -0x40(%rbp)
movq 0x8(%rbx), %rdi
xorpd %xmm0, %xmm0
movsd 0x2b8c(%rip), %xmm1     # 0x6038
callq 0x3d1c
movsd -0x40(%rbp), %xmm2
mulsd %xmm0, %xmm2
addsd 0x2b76(%rip), %xmm2     # 0x6038
xorpd %xmm1, %xmm1
ucomisd %xmm2, %xmm1
jae 0x349c
movapd %xmm2, %xmm1
mulsd %xmm2, %xmm1
mulsd %xmm2, %xmm1
movsd %xmm1, -0x10(%rbp)
movq 0x8(%rbx), %rdi
movsd %xmm0, -0x18(%rbp)
callq 0x4702
movsd -0x18(%rbp), %xmm2
movapd %xmm2, %xmm1
mulsd 0x2d54(%rip), %xmm1     # 0x6250
mulsd %xmm2, %xmm1
mulsd %xmm2, %xmm1
mulsd %xmm2, %xmm1
addsd 0x2b28(%rip), %xmm1     # 0x6038
ucomisd %xmm0, %xmm1
ja 0x3570
callq 0x2130
movsd %xmm0, -0x38(%rbp)
movsd -0x18(%rbp), %xmm0
mulsd 0x2d2b(%rip), %xmm0     # 0x6258
movsd %xmm0, -0x30(%rbp)
movsd 0x2afe(%rip), %xmm1     # 0x6038
movsd -0x10(%rbp), %xmm0
subsd %xmm0, %xmm1
movsd %xmm1, -0x28(%rbp)
callq 0x2130
addsd -0x28(%rbp), %xmm0
mulsd -0x20(%rbp), %xmm0
movsd -0x30(%rbp), %xmm1
mulsd -0x18(%rbp), %xmm1
addsd %xmm0, %xmm1
ucomisd -0x38(%rbp), %xmm1
jbe 0x349c
movsd -0x20(%rbp), %xmm0
mulsd 0x18(%rbx), %xmm0
movsd -0x10(%rbp), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, -0x10(%rbp)
movsd -0x10(%rbp), %xmm0
addq $0x58, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/sergiosvieira[P]ptd2ns2/ranvar.cc
// Function: HyperExponentialRandomVariable::value()
double HyperExponentialRandomVariable::value() {
	double temp, res;
	double u = Random::uniform();

	temp = sqrt((cov_ * cov_ - 1.0) / (2.0 * alpha_ * (1.0 - alpha_)));
	if (u < alpha_)
		res = Random::exponential(avg_ - temp * (1.0 - alpha_) * avg_);
	else
		res = Random::exponential(avg_ + temp * (alpha_) * avg_);
	return (res);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
leaq 0x6a7f(%rip), %r14      # 0xa2a8
movq (%r14), %rdi
callq 0x4702
movaps %xmm0, -0x20(%rbp)
movsd 0x18(%rbx), %xmm0
movsd 0x20(%rbx), %xmm1
mulsd %xmm0, %xmm0
addsd 0x2a1d(%rip), %xmm0     # 0x6268
movsd 0x27e5(%rip), %xmm4     # 0x6038
movapd %xmm4, %xmm2
subsd %xmm1, %xmm2
addsd %xmm1, %xmm1
mulsd %xmm2, %xmm1
divsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x3877
sqrtsd %xmm0, %xmm0
jmp 0x3884
callq 0x2120
movsd 0x27b4(%rip), %xmm4     # 0x6038
movsd 0x10(%rbx), %xmm1
movsd 0x20(%rbx), %xmm2
movapd %xmm0, %xmm3
mulsd %xmm2, %xmm3
subsd %xmm2, %xmm4
xorpd 0x298e(%rip), %xmm0     # 0x6230
mulsd %xmm4, %xmm0
movapd -0x20(%rbp), %xmm4
cmpltsd %xmm2, %xmm4
movapd %xmm4, %xmm2
andnpd %xmm3, %xmm2
andpd %xmm0, %xmm4
orpd %xmm2, %xmm4
mulsd %xmm1, %xmm4
addsd %xmm1, %xmm4
movapd %xmm4, -0x20(%rbp)
movq (%r14), %rdi
callq 0x4702
callq 0x2130
xorpd 0x294e(%rip), %xmm0     # 0x6230
mulsd -0x20(%rbp), %xmm0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/sergiosvieira[P]ptd2ns2/ranvar.cc
// Function: EmpiricalRandomVariable::EmpiricalRandomVariable()
EmpiricalRandomVariable::EmpiricalRandomVariable() :
	minCDF_(0), maxCDF_(1), maxEntry_(32), table_(0) {
	/*
	 bind("minCDF_", &minCDF_);
	 bind("maxCDF_", &maxCDF_);
	 bind("interpolation_", &interpolation_);
	 bind("maxEntry_", &maxEntry_);
	 */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x68ed(%rip), %rax      # 0xa2a8
movq (%rax), %rax
movq %rax, 0x8(%rdi)
leaq 0x629f(%rip), %rax      # 0x9c68
movq %rax, (%rdi)
xorl %eax, %eax
movq %rax, 0x10(%rdi)
movabsq $0x3ff0000000000000, %rcx # imm = 0x3FF0000000000000
movq %rcx, 0x18(%rdi)
movl $0x20, 0x28(%rdi)
movq %rax, 0x30(%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/sergiosvieira[P]ptd2ns2/ranvar.cc
// Function: EmpiricalRandomVariable::loadCDF(char const*)
int EmpiricalRandomVariable::loadCDF(const char* filename) {
	FILE* fp;
	char line[256];
	CDFentry* e;

	fp = fopen(filename, "r");
	if (fp == 0)
		return 0;

	if (table_ == 0)
		table_ = new CDFentry[maxEntry_];
	for (numEntry_ = 0; fgets(line, 256, fp); numEntry_++) {
		if (numEntry_ >= maxEntry_) { // resize the CDF table
			maxEntry_ *= 2;
			e = new CDFentry[maxEntry_];
			for (int i = numEntry_ - 1; i >= 0; i--)
				e[i] = table_[i];
			delete table_;
			table_ = e;
		}
		e = &table_[numEntry_];
		// Use * and l together raises a warning
		sscanf(line, "%lf %*f %lf", &e->val_, &e->cdf_);
	}
	fclose(fp);
	return numEntry_;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rsi, %rax
movq %rdi, %rbx
leaq 0x2653(%rip), %rsi      # 0x6062
movq %rax, %rdi
callq 0x21f0
testq %rax, %rax
je 0x3b38
movq %rax, %r14
cmpq $0x0, 0x30(%rbx)
jne 0x3a4c
movslq 0x28(%rbx), %rax
movq %rax, %rcx
shlq $0x4, %rcx
testq %rax, %rax
movq $-0x1, %rdi
cmovnsq %rcx, %rdi
callq 0x2030
movq %rax, 0x30(%rbx)
movl $0x0, 0x24(%rbx)
leaq -0x130(%rbp), %rdi
movl $0x100, %esi            # imm = 0x100
movq %r14, %rdx
callq 0x2280
testq %rax, %rax
je 0x3b2b
leaq -0x130(%rbp), %r12
movl 0x24(%rbx), %r15d
movslq 0x28(%rbx), %rax
cmpl %eax, %r15d
jge 0x3a8a
movq 0x30(%rbx), %r13
jmp 0x3aeb
leal (%rax,%rax), %ecx
movl %ecx, 0x28(%rbx)
movq %rax, %rdi
shlq $0x5, %rdi
testl %eax, %eax
movq $-0x1, %rax
cmovsq %rax, %rdi
callq 0x2030
movq %rax, %r13
movq 0x30(%rbx), %rdi
testl %r15d, %r15d
jle 0x3ad9
leaq 0x1(%r15), %rax
shlq $0x4, %r15
addq $-0x10, %r15
movups (%rdi,%r15), %xmm0
movups %xmm0, (%r13,%r15)
decq %rax
addq $-0x10, %r15
cmpq $0x1, %rax
ja 0x3ac1
movl $0x10, %esi
callq 0x21b0
movq %r13, 0x30(%rbx)
movl 0x24(%rbx), %r15d
movslq %r15d, %rax
shlq $0x4, %rax
leaq (%rax,%r13), %rcx
leaq (%rax,%r13), %rdx
addq $0x8, %rdx
movq %r12, %rdi
leaq 0x2768(%rip), %rsi      # 0x6270
xorl %eax, %eax
callq 0x2180
incl 0x24(%rbx)
movq %r12, %rdi
movl $0x100, %esi            # imm = 0x100
movq %r14, %rdx
callq 0x2280
testq %rax, %rax
jne 0x3a77
movq %r14, %rdi
callq 0x2190
movl 0x24(%rbx), %eax
jmp 0x3b3a
xorl %eax, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/sergiosvieira[P]ptd2ns2/ranvar.cc
// Function: EmpiricalRandomVariable::value()
double EmpiricalRandomVariable::value() {
	if (numEntry_ <= 0)
		return 0;
	double u = rng_->uniform(minCDF_, maxCDF_);
	int mid = lookup(u);
	if (mid && interpolation_ && u < table_[mid].cdf_)
		return interpolate(u, table_[mid - 1].cdf_, table_[mid - 1].val_,
				table_[mid].cdf_, table_[mid].val_);
	return table_[mid].val_;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x18, %rsp
cmpl $0x0, 0x24(%rdi)
jle 0x3bf2
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
movsd 0x10(%rbx), %xmm0
movsd %xmm0, -0x10(%rbp)
movsd 0x18(%rbx), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, -0x18(%rbp)
callq 0x4702
mulsd -0x18(%rbp), %xmm0
addsd -0x10(%rbp), %xmm0
movq %rbx, %rdi
movsd %xmm0, -0x10(%rbp)
callq 0x3bfc
movq 0x30(%rbx), %rcx
movl %eax, %edx
testl %eax, %eax
je 0x3be6
cmpl $0x0, 0x20(%rbx)
je 0x3be6
movq %rdx, %rax
shlq $0x4, %rax
movsd (%rcx,%rax), %xmm3
ucomisd -0x10(%rbp), %xmm3
jbe 0x3be6
addq %rax, %rcx
movsd -0x10(%rcx), %xmm1
movsd -0x8(%rcx), %xmm2
movsd 0x8(%rcx), %xmm4
movq (%rbx), %rax
movq 0x10(%rax), %rax
movq %rbx, %rdi
movsd -0x10(%rbp), %xmm0
addq $0x18, %rsp
popq %rbx
popq %rbp
jmpq *%rax
shlq $0x4, %rdx
movsd 0x8(%rcx,%rdx), %xmm0
jmp 0x3bf5
xorps %xmm0, %xmm0
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/sergiosvieira[P]ptd2ns2/ranvar.cc
// Function: EmpiricalRandomVariable::lookup(double)
int EmpiricalRandomVariable::lookup(double u) {
	// always return an index whose value is >= u
	int lo, hi, mid;
	if (u <= table_[0].cdf_)
		return 0;
	for (lo = 1, hi = numEntry_ - 1; lo < hi;) {
		mid = (lo + hi) / 2;
		if (u > table_[mid].cdf_)
			lo = mid + 1;
		else
			hi = mid;
	}
	return lo;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x30(%rdi), %rcx
movsd (%rcx), %xmm1
xorl %eax, %eax
ucomisd %xmm0, %xmm1
jae 0x3c43
movl 0x24(%rdi), %edx
movl $0x1, %eax
cmpl $0x3, %edx
jl 0x3c43
decl %edx
movl $0x1, %eax
leal (%rdx,%rax), %esi
shrl %esi
movq %rsi, %rdi
shlq $0x4, %rdi
ucomisd (%rcx,%rdi), %xmm0
ja 0x3c3b
movl %esi, %edx
jmp 0x3c3f
incl %esi
movl %esi, %eax
cmpl %edx, %eax
jl 0x3c24
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/sergiosvieira[P]ptd2ns2/rng.cc
// Function: RNG::normal(double, double)
double RNG::normal(double avg, double std) {
	static int parity = 0;
	static double nextresult;
	double sam1, sam2, rad;

	if (std == 0)
		return avg;
	if (parity == 0) {
		sam1 = 2 * uniform() - 1;
		sam2 = 2 * uniform() - 1;
		while ((rad = sam1 * sam1 + sam2 * sam2) >= 1) {
			sam1 = 2 * uniform() - 1;
			sam2 = 2 * uniform() - 1;
		}
		rad = sqrt((-2 * log(rad)) / rad);
		nextresult = sam2 * rad;
		parity = 1;
		return (sam1 * rad * std + avg);
	} else {
		parity = 0;
		return (nextresult * std + avg);
	}
}

// Assembly:
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm1
jne 0x3d29
jp 0x3d29
retq
cmpb $0x0, 0x6580(%rip)      # 0xa2b0
je 0x3d4a
movb $0x0, 0x6577(%rip)      # 0xa2b0
mulsd 0x6577(%rip), %xmm1     # 0xa2b8
addsd %xmm0, %xmm1
movapd %xmm1, %xmm0
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movsd %xmm1, -0x18(%rbp)
movsd %xmm0, -0x20(%rbp)
cmpb $0x1, 0x91(%rbx)
jne 0x3d73
movq %rbx, %rdi
callq 0x4394
jmp 0x3d7b
movq %rbx, %rdi
callq 0x4262
addsd %xmm0, %xmm0
addsd 0x24e1(%rip), %xmm0     # 0x6268
movsd %xmm0, -0x10(%rbp)
cmpb $0x1, 0x91(%rbx)
jne 0x3d9f
movq %rbx, %rdi
callq 0x4394
jmp 0x3da7
movq %rbx, %rdi
callq 0x4262
addsd %xmm0, %xmm0
addsd 0x24b5(%rip), %xmm0     # 0x6268
movapd %xmm0, %xmm2
mulsd %xmm0, %xmm2
movsd -0x10(%rbp), %xmm1
movapd %xmm1, %xmm3
mulsd %xmm1, %xmm3
addsd %xmm2, %xmm3
ucomisd 0x2264(%rip), %xmm3     # 0x6038
jae 0x3d60
movsd %xmm3, -0x28(%rbp)
movsd %xmm0, -0x30(%rbp)
movsd %xmm1, -0x10(%rbp)
movapd %xmm3, %xmm0
callq 0x2130
mulsd 0x25ca(%rip), %xmm0     # 0x63c0
divsd -0x28(%rbp), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x3e0b
sqrtsd %xmm0, %xmm0
jmp 0x3e10
callq 0x2120
movsd -0x20(%rbp), %xmm1
movsd -0x18(%rbp), %xmm2
movsd -0x30(%rbp), %xmm3
mulsd %xmm0, %xmm3
movsd %xmm3, 0x648d(%rip)     # 0xa2b8
movb $0x1, 0x647e(%rip)      # 0xa2b0
movsd -0x10(%rbp), %xmm3
mulsd %xmm0, %xmm3
mulsd %xmm2, %xmm3
addsd %xmm1, %xmm3
movapd %xmm3, %xmm0
addq $0x28, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/sergiosvieira[P]ptd2ns2/rng.cc
// Function: RNG::set_seed(long)
void RNG::set_seed(long seed) {
	if (seed == 0) {
		set_seed(HEURISTIC_SEED_SOURCE, seed);
	} else {
		unsigned long seed_vec[6] = { 0, 0, 0, 0, 0, 0 };
		for (int i = 0; i < 6; i++) {
			seed_vec[i] = (unsigned long) seed;
		}
		set_package_seed(seed_vec);
		init();
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
testq %rsi, %rsi
je 0x3f41
xorps %xmm0, %xmm0
movaps %xmm0, -0x20(%rbp)
movaps %xmm0, -0x30(%rbp)
movaps %xmm0, -0x40(%rbp)
xorl %eax, %eax
movq %rsi, -0x40(%rbp,%rax,8)
incq %rax
cmpq $0x6, %rax
jne 0x3f1c
leaq -0x40(%rbp), %rdi
callq 0x45b0
movq %rbx, %rdi
addq $0x38, %rsp
popq %rbx
popq %rbp
jmp 0x4458
movq %rbx, %rdi
movl $0x2, %esi
xorl %edx, %edx
addq $0x38, %rsp
popq %rbx
popq %rbp
jmp 0x3e4e
// File: /workspace/github_cpp_makefile_star2_O3/sergiosvieira[P]ptd2ns2/rng.cc
// Function: RNGTest::RNGTest()
RNGTest::RNGTest()
{
	RNG rng(RNG::RAW_SEED_SOURCE, 1L);

	int i;
	long r;
	for (i = 0; i < 10000; i++)
	r = rng.uniform_positive_int();

#ifdef OLD_RNG
	if (r != 1043618065L) {
		fprintf (stderr, "r (%lu) != 1043618065L\n", r);
		exit(-1);
	}
#else
	if (r != 1179983147L) {
		fprintf (stderr, "r (%lu) != 1179983147L\n", r);
		exit(-1);
	}
#endif /* OLD_RNG */

	for (i = 10000; i < 551246; i++)
	r = rng.uniform_positive_int();

#ifdef OLD_RNG
	if (r != 1003L) {
		fprintf (stderr, "r (%lu) != 1003L\n", r);
		exit(-1);
	}
#else
	if (r != 817829295L) {
		fprintf (stderr, "r (%lu) != 817829295L\n", r);
		exit(-1);
	}
#endif /* OLD_RNG */

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
leaq -0x108(%rbp), %rbx
movl $0x1, %esi
movq %rbx, %rdi
callq 0x3efa
movl $0x2710, %r14d          # imm = 0x2710
movq %rbx, %rdi
callq 0x3f56
decl %r14d
jne 0x3fc0
shlq $0x20, %rax
movabsq $0x46551d2b00000000, %rcx # imm = 0x46551D2B00000000
cmpq %rcx, %rax
jne 0x4019
movl $0x8423e, %r14d         # imm = 0x8423E
leaq -0x108(%rbp), %rbx
movq %rbx, %rdi
callq 0x3f56
decl %r14d
jne 0x3fed
shlq $0x20, %rax
movabsq $0x30bf15af00000000, %rcx # imm = 0x30BF15AF00000000
cmpq %rcx, %rax
jne 0x4021
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rdi
callq 0x2340
movq %rax, %rdi
callq 0x236b
nop
// File: /workspace/github_cpp_makefile_star2_O3/sergiosvieira[P]ptd2ns2/rng.cc
// Function: RNGTest::first_n(RNG::RNGSources, long, int)
void
RNGTest::first_n(RNG::RNGSources source, long seed, int n)
{
	RNG rng(source, seed);

	for (int i = 0; i < n; i++) {
		long r = rng.uniform_positive_int();
		printf("%10lu ", r);
	};
	printf("\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0xf8, %rsp
movl %ecx, %ebx
leaq -0x110(%rbp), %rdi
callq 0x3e4e
testl %ebx, %ebx
jle 0x4073
leaq -0x110(%rbp), %r14
leaq 0x28ad(%rip), %r15      # 0x6907
movq %r14, %rdi
callq 0x3f56
movslq %eax, %rsi
movq %r15, %rdi
xorl %eax, %eax
callq 0x2050
decl %ebx
jne 0x405a
movl $0xa, %edi
addq $0xf8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2230
// File: /workspace/github_cpp_makefile_star2_O3/sergiosvieira[P]ptd2ns2/rng.cc
// Function: RNGTest::first_n_mil(RNG::RNGSources, long, int, _IO_FILE*)
void
RNGTest::first_n_mil(RNG::RNGSources source, long seed, int n, FILE *outfile)
{
	RNG rng(source, seed);
	// print the first 1000 no, then every millionth upto n millions
	long m = n * 1000000;
	for (int i = 0; i < m; i++) {
		long r = rng.uniform_positive_int();
		if (i < 100 || (i % 1000000 == 0))
		fprintf(outfile, "%10lu ", r);
	};
	fprintf(outfile, "\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %r8, %rbx
movl %ecx, %r14d
leaq -0x120(%rbp), %rdi
callq 0x3e4e
testl %r14d, %r14d
jle 0x4119
imull $0xf4240, %r14d, %eax   # imm = 0xF4240
cmpl $0x2, %eax
movl $0x1, %r12d
cmovgel %eax, %r12d
leaq -0x120(%rbp), %r14
leaq 0x2830(%rip), %r15      # 0x6907
xorl %r13d, %r13d
movq %r14, %rdi
callq 0x3f56
cmpl $0x64, %r13d
jb 0x4101
movl %r13d, %ecx
imulq $0x431bde83, %rcx, %rcx # imm = 0x431BDE83
shrq $0x32, %rcx
imull $0xf4240, %ecx, %ecx    # imm = 0xF4240
cmpl %r13d, %ecx
jne 0x4111
movslq %eax, %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x2240
incl %r13d
cmpl %r13d, %r12d
jne 0x40da
movl $0xa, %edi
movq %rbx, %rsi
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2220
nop
// File: /workspace/github_cpp_makefile_star2_O3/sergiosvieira[P]ptd2ns2/rng.cc
// Function: RNGTest::verbose_mil()
void
RNGTest::verbose_mil()
{
	FILE *outfile = NULL;
	outfile = fopen("temp.rands", "w");

	if (outfile == NULL)
	fprintf(stderr, "Cannot create temp.rands\n");

	fprintf (outfile, "default: ");
	first_n_mil(RNG::RAW_SEED_SOURCE, 188312339, 5, outfile);
	int i = 1;
	fprintf (outfile, "predef source %2u: ", i);
	first_n_mil(RNG::PREDEF_SEED_SOURCE, i, 5, outfile);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x27c9(%rip), %rdi      # 0x690e
leaq 0x27cd(%rip), %rsi      # 0x6919
callq 0x21f0
testq %rax, %rax
je 0x41b9
movq %rax, %rbx
leaq 0x27d5(%rip), %rdi      # 0x6935
movl $0x9, %esi
movl $0x1, %edx
movq %rax, %rcx
callq 0x2320
movl $0xb396b13, %edx        # imm = 0xB396B13
xorl %esi, %esi
movl $0x5, %ecx
movq %rbx, %r8
callq 0x408a
leaq 0x27b2(%rip), %rsi      # 0x693f
movq %rbx, %rdi
movl $0x1, %edx
xorl %eax, %eax
callq 0x2240
movl $0x1, %edx
movl $0x1, %esi
movl $0x5, %ecx
movq %rbx, %r8
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x408a
callq 0x2396
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/sergiosvieira[P]ptd2ns2/rng.cc
// Function: RNGTest::verbose()
void
RNGTest::verbose()
{
	printf ("default: ");
	first_n(RNG::RAW_SEED_SOURCE, 1L, 5);

	int i;
	for (i = 0; i < 64; i++) {
		printf ("predef source %2u: ", i);
		first_n(RNG::PREDEF_SEED_SOURCE, i, 5);
	};

	printf("heuristic seeds should be different from each other and on each run.\n");
	for (i = 0; i < 64; i++) {
		printf ("heuristic source %2u: ", i);
		first_n(RNG::HEURISTIC_SEED_SOURCE, i, 5);
	};
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
leaq 0x2761(%rip), %rdi      # 0x6935
xorl %eax, %eax
callq 0x2050
movl $0x1, %edx
xorl %esi, %esi
movl $0x5, %ecx
callq 0x402a
leaq 0x274c(%rip), %rbx      # 0x693f
xorl %r14d, %r14d
movq %rbx, %rdi
movl %r14d, %esi
xorl %eax, %eax
callq 0x2050
movl $0x1, %esi
movq %r14, %rdx
movl $0x5, %ecx
callq 0x402a
incq %r14
cmpq $0x40, %r14
jne 0x41f6
leaq 0x2898(%rip), %rdi      # 0x6abd
callq 0x2270
leaq 0x2722(%rip), %rbx      # 0x6953
xorl %r14d, %r14d
movq %rbx, %rdi
movl %r14d, %esi
xorl %eax, %eax
callq 0x2050
movl $0x2, %esi
movq %r14, %rdx
movl $0x5, %ecx
callq 0x402a
incq %r14
cmpq $0x40, %r14
jne 0x4234
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/sergiosvieira[P]ptd2ns2/rng.cc
// Function: RNG::U01()
double RNG::U01() {
	long k;
	double p1, p2, u;
	/* Component 1 */
	p1 = a12 * Cg_[1] - a13n * Cg_[0];
	k = static_cast<long> (p1 / m1);
	p1 -= k * m1;
	if (p1 < 0.0)
		p1 += m1;
	Cg_[0] = Cg_[1];
	Cg_[1] = Cg_[2];
	Cg_[2] = p1;
	/* Component 2 */
	p2 = a21 * Cg_[5] - a23n * Cg_[3];
	k = static_cast<long> (p2 / m2);
	p2 -= k * m2;
	if (p2 < 0.0)
		p2 += m2;
	Cg_[3] = Cg_[4];
	Cg_[4] = Cg_[5];
	Cg_[5] = p2;
	/* Combination */
	u = ((p1 > p2) ? (p1 - p2) * norm : (p1 - p2 + m1) * norm);
	return (anti_ == false) ? u : (1 - u);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movsd (%rdi), %xmm0
movsd 0x8(%rdi), %xmm4
mulsd 0x2161(%rip), %xmm0     # 0x63d8
movsd 0x2161(%rip), %xmm5     # 0x63e0
mulsd %xmm4, %xmm5
addsd %xmm0, %xmm5
movsd 0x2159(%rip), %xmm1     # 0x63e8
movapd %xmm5, %xmm0
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd %xmm1, %xmm0
subsd %xmm0, %xmm5
movapd %xmm5, %xmm0
addsd %xmm1, %xmm0
xorpd %xmm3, %xmm3
movapd %xmm5, %xmm2
cmpltsd %xmm3, %xmm2
andpd %xmm2, %xmm0
andnpd %xmm5, %xmm2
orpd %xmm0, %xmm2
movsd %xmm4, (%rdi)
movsd 0x10(%rdi), %xmm0
movsd %xmm0, 0x8(%rdi)
movlpd %xmm2, 0x10(%rdi)
movsd 0x28(%rdi), %xmm4
movsd 0x18(%rdi), %xmm0
mulsd 0x20fe(%rip), %xmm0     # 0x63f0
movsd 0x20fe(%rip), %xmm5     # 0x63f8
mulsd %xmm4, %xmm5
addsd %xmm0, %xmm5
movsd 0x20f6(%rip), %xmm6     # 0x6400
movapd %xmm5, %xmm0
divsd %xmm6, %xmm0
cvttsd2si %xmm0, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd %xmm6, %xmm0
subsd %xmm0, %xmm5
addsd %xmm5, %xmm6
movapd %xmm5, %xmm0
cmpltsd %xmm3, %xmm0
andpd %xmm0, %xmm6
andnpd %xmm5, %xmm0
orpd %xmm6, %xmm0
movsd 0x20(%rdi), %xmm3
movsd %xmm3, 0x18(%rdi)
movsd %xmm4, 0x20(%rdi)
movlpd %xmm0, 0x28(%rdi)
movapd %xmm2, %xmm3
subsd %xmm0, %xmm3
addsd %xmm3, %xmm1
cmpltsd %xmm2, %xmm0
andpd %xmm0, %xmm3
andnpd %xmm1, %xmm0
orpd %xmm3, %xmm0
mulsd 0x208f(%rip), %xmm0     # 0x6408
cmpb $0x0, 0x90(%rdi)
je 0x4392
movsd 0x1cae(%rip), %xmm1     # 0x6038
subsd %xmm0, %xmm1
movapd %xmm1, %xmm0
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/sergiosvieira[P]ptd2ns2/rng.cc
// Function: RNG::U01d()
double RNG::U01d() {
	double u;
	u = U01();
	if (anti_) {
		// Don't forget that U01() returns 1 - u in 
		// the antithetic case 
		u += (U01() - 1.0) * fact;
		return (u < 0.0) ? u + 1.0 : u;
	} else {
		u += U01() * fact;
		return (u < 1.0) ? u : (u - 1.0);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
callq 0x4262
movsd %xmm0, -0x18(%rbp)
movb 0x90(%rbx), %r14b
movq %rbx, %rdi
callq 0x4262
cmpb $0x1, %r14b
jne 0x43fd
addsd 0x1e9f(%rip), %xmm0     # 0x6268
mulsd 0x203f(%rip), %xmm0     # 0x6410
addsd -0x18(%rbp), %xmm0
movsd 0x1c5a(%rip), %xmm2     # 0x6038
addsd %xmm0, %xmm2
xorpd %xmm3, %xmm3
movapd %xmm0, %xmm1
cmpltsd %xmm3, %xmm1
andpd %xmm1, %xmm2
andnpd %xmm0, %xmm1
orpd %xmm2, %xmm1
jmp 0x442f
mulsd 0x200b(%rip), %xmm0     # 0x6410
addsd -0x18(%rbp), %xmm0
movsd 0x1e56(%rip), %xmm2     # 0x6268
movapd %xmm0, %xmm1
cmpltsd 0x1c19(%rip), %xmm1     # 0x6038
addsd %xmm0, %xmm2
andpd %xmm1, %xmm0
andnpd %xmm2, %xmm1
orpd %xmm0, %xmm1
movapd %xmm1, %xmm0
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/sergiosvieira[P]ptd2ns2/rng.cc
// Function: RNG::init()
void RNG::init() {
	anti_ = false;
	inc_prec_ = false;

	/* Information on a stream. The arrays {Cg_, Bg_, Ig_} contain the
	 current state of the stream, the starting state of the current
	 SubStream, and the starting state of the stream. This stream
	 generates antithetic variates if anti_ = true. It also generates
	 numbers with extended precision (53 bits if machine follows IEEE
	 754 standard) if inc_prec_ = true. next_seed_ will be the seed of
	 the next declared RngStream. */

	for (int i = 0; i < 6; ++i) {
		Bg_[i] = Cg_[i] = Ig_[i] = next_seed_[i];
	}
	MatVecModM(A1p127, next_seed_, next_seed_, m1);
	MatVecModM(A2p127, &next_seed_[3], &next_seed_[3], m2);
#ifdef MEASURE_MODULE
	for ( unsigned int i = 0; i < Simulator::run(); i++ )
	reset_next_substream ();
#endif // MEASURE_MODULE
}

// Assembly:
movw $0x0, 0x90(%rdi)
movaps 0x5df8(%rip), %xmm0     # 0xa260
movups %xmm0, (%rdi)
movaps 0x5dfe(%rip), %xmm0     # 0xa270
movups %xmm0, 0x10(%rdi)
movaps 0x5e03(%rip), %xmm0     # 0xa280
movups %xmm0, 0x20(%rdi)
movaps 0x5dd8(%rip), %xmm0     # 0xa260
movups %xmm0, 0x30(%rdi)
movaps 0x5ddd(%rip), %xmm0     # 0xa270
movups %xmm0, 0x40(%rdi)
movaps 0x5de2(%rip), %xmm0     # 0xa280
movups %xmm0, 0x50(%rdi)
xorl %eax, %eax
leaq 0x5db5(%rip), %rcx      # 0xa260
movsd (%rax,%rcx), %xmm0
movsd %xmm0, 0x60(%rdi,%rax)
addq $0x8, %rax
cmpq $0x30, %rax
jne 0x44ab
pushq %rbp
movq %rsp, %rbp
leaq 0x2195(%rip), %rdi      # 0x6660
leaq 0x5d8e(%rip), %rdx      # 0xa260
movsd 0x1f0e(%rip), %xmm0     # 0x63e8
movq %rdx, %rsi
callq 0x44fe
leaq 0x21c7(%rip), %rdi      # 0x66b0
leaq 0x5d88(%rip), %rdx      # 0xa278
movsd 0x1f08(%rip), %xmm0     # 0x6400
movq %rdx, %rsi
popq %rbp
jmp 0x44fe
// File: /workspace/github_cpp_makefile_star2_O3/sergiosvieira[P]ptd2ns2/rng.cc
// Function: (anonymous namespace)::MatVecModM(double const (*) [3], double const*, double*, double)
void MatVecModM(const double A[3][3], const double s[3], double v[3], double m) {
	int i;
	double x[3]; // Necessary if v = s
	for (i = 0; i < 3; ++i) {
		x[i] = MultModM(A[i][0], s[0], 0.0, m);
		x[i] = MultModM(A[i][1], s[1], x[i], m);
		x[i] = MultModM(A[i][2], s[2], x[i], m);
	}
	for (i = 0; i < 3; ++i)
		v[i] = x[i];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movsd %xmm0, -0x20(%rbp)
movq %rdx, %rbx
movq %rdi, %r14
movsd (%rsi), %xmm0
movsd %xmm0, -0x38(%rbp)
movsd 0x8(%rsi), %xmm0
movsd %xmm0, -0x30(%rbp)
movsd 0x10(%rsi), %xmm0
movsd %xmm0, -0x28(%rbp)
addq $0x10, %r14
xorl %r15d, %r15d
movsd -0x10(%r14), %xmm0
xorps %xmm2, %xmm2
movsd -0x38(%rbp), %xmm1
movsd -0x20(%rbp), %xmm3
callq 0x4f4f
movaps %xmm0, %xmm2
movsd -0x8(%r14), %xmm0
movsd -0x30(%rbp), %xmm1
movsd -0x20(%rbp), %xmm3
callq 0x4f4f
movaps %xmm0, %xmm2
movsd (%r14), %xmm0
movsd -0x28(%rbp), %xmm1
movsd -0x20(%rbp), %xmm3
callq 0x4f4f
movsd %xmm0, -0x50(%rbp,%r15,8)
incq %r15
addq $0x18, %r14
cmpq $0x3, %r15
jne 0x453a
movq -0x40(%rbp), %rax
movq %rax, 0x10(%rbx)
movaps -0x50(%rbp), %xmm0
movups %xmm0, (%rbx)
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/sergiosvieira[P]ptd2ns2/rng.cc
// Function: RNG::set_package_seed(unsigned long const*)
void RNG::set_package_seed(const unsigned long seed[6]) {
	if (CheckSeed(seed))
		abort();
	for (int i = 0; i < 6; ++i)
		next_seed_[i] = seed[i];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x4825
testl %eax, %eax
jne 0x4609
xorl %eax, %eax
movsd 0x1e64(%rip), %xmm0     # 0x6430
movapd 0x1e6c(%rip), %xmm1     # 0x6440
leaq 0x5c85(%rip), %rcx      # 0xa260
movsd (%rbx,%rax), %xmm2
unpcklps %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
subpd %xmm1, %xmm2
movapd %xmm2, %xmm3
unpckhpd %xmm2, %xmm3            # xmm3 = xmm3[1],xmm2[1]
addsd %xmm2, %xmm3
movsd %xmm3, (%rax,%rcx)
addq $0x8, %rax
cmpq $0x30, %rax
jne 0x45db
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x20e0
// File: /workspace/github_cpp_makefile_star2_O3/sergiosvieira[P]ptd2ns2/rng.cc
// Function: RNG::rand_u01()
double RNG::rand_u01() {
	if (inc_prec_)
		return U01d();
	else
		return U01();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpb $0x1, 0x91(%rdi)
jne 0x472f
popq %rbp
jmp 0x4394
popq %rbp
jmp 0x4262
nop
// File: /workspace/github_cpp_makefile_star2_O3/sergiosvieira[P]ptd2ns2/rng.cc
// Function: RNG::RNG(char const*)
RNG::RNG(const char *s) {
	if (strlen(s) > 99) {
		strncpy(name_, s, 99);
		name_[100] = 0;
	} else
		strcpy(name_, s);

	init();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x20b0
leaq 0x92(%rbx), %rdi
cmpq $0x64, %rax
jb 0x476e
movl $0x63, %edx
movq %r14, %rsi
callq 0x20d0
movb $0x0, 0xf6(%rbx)
jmp 0x4776
movq %r14, %rsi
callq 0x2160
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x4458
// File: /workspace/github_cpp_makefile_star2_O3/sergiosvieira[P]ptd2ns2/rng.cc
// Function: RNG::reset_next_substream()
void RNG::reset_next_substream() {
	MatVecModM(A1p76, Bg_, Bg_, m1);
	MatVecModM(A2p76, &Bg_[3], &Bg_[3], m2);
	for (int i = 0; i < 6; ++i)
		Cg_[i] = Bg_[i];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x30(%rdi), %rdx
leaq 0x1f24(%rip), %rdi      # 0x6700
movsd 0x1c04(%rip), %xmm0     # 0x63e8
movq %rdx, %rsi
callq 0x44fe
leaq 0x48(%rbx), %rdx
leaq 0x1f59(%rip), %rdi      # 0x6750
movsd 0x1c01(%rip), %xmm0     # 0x6400
movq %rdx, %rsi
callq 0x44fe
movups 0x30(%rbx), %xmm0
movups 0x40(%rbx), %xmm1
movups 0x50(%rbx), %xmm2
movups %xmm2, 0x20(%rbx)
movups %xmm1, 0x10(%rbx)
movups %xmm0, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/sergiosvieira[P]ptd2ns2/rng.cc
// Function: (anonymous namespace)::CheckSeed(unsigned long const*)
int CheckSeed(const unsigned long seed[6]) {
	int i;
	for (i = 0; i < 3; ++i) {
		if (seed[i] >= m1) {
			fprintf(stderr, "****************************************\n\n");
			fprintf(stderr, "ERROR: Seed[%d] >= 4294967087, Seed is not set.",
					i);
			fprintf(stderr, "\n\n****************************************\n\n");
			return (-1);
		}
	}
	for (i = 3; i < 6; ++i) {
		if (seed[i] >= m2) {
			fprintf(stderr, "****************************************\n\n");
			fprintf(stderr, "ERROR: Seed[%d] >= 429444443, Seed is not set.", i);
			fprintf(stderr, "\n\n****************************************\n\n");
			return (-1);
		}
	}
	if (seed[0] == 0 && seed[1] == 0 && seed[2] == 0) {
		fprintf(stderr, "****************************************\n\n");
		fprintf(stderr, "ERROR: First 3 seeds = 0.\n\n");
		fprintf(stderr, "****************************************\n\n");
		return (-1);
	}
	if (seed[3] == 0 && seed[4] == 0 && seed[5] == 0) {
		fprintf(stderr, "****************************************\n\n");
		fprintf(stderr, "ERROR: Last 3 seeds = 0.\n\n");
		fprintf(stderr, "****************************************\n\n");
		return (-1);
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0xffffa6ba, %ecx       # imm = 0xFFFFA6BA
xorl %eax, %eax
leaq 0x5874(%rcx), %rdx
cmpq %rdx, (%rdi,%rax,8)
ja 0x488c
incq %rax
cmpq $0x3, %rax
jne 0x4837
movl $0x3, %eax
cmpq %rcx, (%rdi,%rax,8)
ja 0x4896
incq %rax
cmpq $0x6, %rax
jne 0x484b
cmpq $0x0, (%rdi)
jne 0x486e
cmpq $0x0, 0x8(%rdi)
jne 0x486e
cmpq $0x0, 0x10(%rdi)
je 0x48a5
xorl %eax, %eax
cmpq $0x0, 0x18(%rdi)
jne 0x48a3
cmpq $0x0, 0x20(%rdi)
jne 0x48a3
cmpq $0x0, 0x28(%rdi)
jne 0x48a3
callq 0x241b
jmp 0x489e
movq %rax, %rdi
callq 0x2540
jmp 0x489e
movq %rax, %rdi
callq 0x24e1
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbp
retq
callq 0x247e
jmp 0x489e
// File: /workspace/github_cpp_makefile_star2_O3/sergiosvieira[P]ptd2ns2/rng.cc
// Function: RNG::set_seed(unsigned long const*)
void RNG::set_seed(const unsigned long seed[6]) {
	if (CheckSeed(seed))
		abort();
	for (int i = 0; i < 6; ++i)
		Cg_[i] = Bg_[i] = Ig_[i] = seed[i];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x4825
testl %eax, %eax
jne 0x4911
xorl %eax, %eax
movsd 0x1b61(%rip), %xmm0     # 0x6430
movapd 0x1b69(%rip), %xmm1     # 0x6440
movsd (%rbx,%rax,8), %xmm2
unpcklps %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
subpd %xmm1, %xmm2
movapd %xmm2, %xmm3
unpckhpd %xmm2, %xmm3            # xmm3 = xmm3[1],xmm2[1]
addsd %xmm2, %xmm3
movsd %xmm3, 0x60(%r14,%rax,8)
movsd %xmm3, 0x30(%r14,%rax,8)
movsd %xmm3, (%r14,%rax,8)
incq %rax
cmpq $0x6, %rax
jne 0x48d7
popq %rbx
popq %r14
popq %rbp
retq
callq 0x20e0
// File: /workspace/github_cpp_makefile_star2_O3/sergiosvieira[P]ptd2ns2/rng.cc
// Function: RNG::advance_state(long, long)
void RNG::advance_state(long e, long c) {
	double B1[3][3], C1[3][3], B2[3][3], C2[3][3];
	if (e > 0) {
		MatTwoPowModM(A1p0, B1, m1, e);
		MatTwoPowModM(A2p0, B2, m2, e);
	} else if (e < 0) {
		MatTwoPowModM(InvA1, B1, m1, -e);
		MatTwoPowModM(InvA2, B2, m2, -e);
	}
	if (c >= 0) {
		MatPowModM(A1p0, C1, m1, c);
		MatPowModM(A2p0, C2, m2, c);
	} else {
		MatPowModM(InvA1, C1, m1, -c);
		MatPowModM(InvA2, C2, m2, -c);
	}
	if (e) {
		MatMatModM(B1, C1, C1, m1);
		MatMatModM(B2, C2, C2, m2);
	}
	MatVecModM(C1, Cg_, Cg_, m1);
	MatVecModM(C2, &Cg_[3], &Cg_[3], m2);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x140, %rsp            # imm = 0x140
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
testq %rsi, %rsi
jle 0x4974
leaq 0x1e63(%rip), %rdi      # 0x67a0
leaq -0x160(%rbp), %rsi
movsd 0x1a9c(%rip), %xmm0     # 0x63e8
movq %r14, %rdx
callq 0x4aa7
leaq 0x1e95(%rip), %rdi      # 0x67f0
leaq -0x110(%rbp), %rsi
movsd 0x1a96(%rip), %xmm0     # 0x6400
movq %r14, %rdx
callq 0x4aa7
jmp 0x497a
js 0x4a65
testq %r15, %r15
js 0x49a6
leaq 0x1e1a(%rip), %rdi      # 0x67a0
leaq -0xc0(%rbp), %rsi
movsd 0x1a53(%rip), %xmm0     # 0x63e8
movq %r15, %rdx
callq 0x4b13
leaq 0x1e4c(%rip), %rdi      # 0x67f0
jmp 0x49ce
negq %r15
leaq 0x1e90(%rip), %rdi      # 0x6840
leaq -0xc0(%rbp), %rsi
movsd 0x1a29(%rip), %xmm0     # 0x63e8
movq %r15, %rdx
callq 0x4b13
leaq 0x1ec2(%rip), %rdi      # 0x6890
leaq -0x70(%rbp), %rsi
movsd 0x1a26(%rip), %xmm0     # 0x6400
movq %r15, %rdx
callq 0x4b13
testq %r14, %r14
je 0x4a20
leaq -0x160(%rbp), %rdi
leaq -0xc0(%rbp), %rdx
movsd 0x19eb(%rip), %xmm0     # 0x63e8
movq %rdx, %rsi
callq 0x4bc9
leaq -0x110(%rbp), %rdi
leaq -0x70(%rbp), %rdx
movsd 0x19e8(%rip), %xmm0     # 0x6400
movq %rdx, %rsi
callq 0x4bc9
leaq -0xc0(%rbp), %rdi
movsd 0x19b9(%rip), %xmm0     # 0x63e8
movq %rbx, %rsi
movq %rbx, %rdx
callq 0x44fe
addq $0x18, %rbx
leaq -0x70(%rbp), %rdi
movsd 0x19b6(%rip), %xmm0     # 0x6400
movq %rbx, %rsi
movq %rbx, %rdx
callq 0x44fe
addq $0x140, %rsp            # imm = 0x140
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %r12
negq %r12
leaq 0x1dce(%rip), %rdi      # 0x6840
leaq -0x160(%rbp), %rsi
movsd 0x1967(%rip), %xmm0     # 0x63e8
movq %r12, %rdx
callq 0x4aa7
leaq 0x1e00(%rip), %rdi      # 0x6890
leaq -0x110(%rbp), %rsi
movsd 0x1961(%rip), %xmm0     # 0x6400
movq %r12, %rdx
jmp 0x496d
// File: /workspace/github_cpp_makefile_star2_O3/sergiosvieira[P]ptd2ns2/rng.cc
// Function: (anonymous namespace)::MatTwoPowModM(double const (*) [3], double (*) [3], double, long)
void MatTwoPowModM(const double A[3][3], double B[3][3], double m, long e) {
	int i, j;
	/* initialize: B = A */
	if (A != B) {
		for (i = 0; i < 3; ++i)
			for (j = 0; j < 3; ++j)
				B[i][j] = A[i][j];
	}
	/* Compute B = A^(2^e) mod m */
	for (i = 0; i < e; i++)
		MatMatModM(B, B, B, m);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
cmpq %rsi, %rdi
je 0x4ae8
xorl %eax, %eax
movq %r14, %rcx
xorl %edx, %edx
movsd (%rdi,%rdx,8), %xmm1
movsd %xmm1, (%rcx,%rdx,8)
incq %rdx
cmpq $0x3, %rdx
jne 0x4ac4
incq %rax
addq $0x18, %rcx
addq $0x18, %rdi
cmpq $0x3, %rax
jne 0x4ac2
testq %rbx, %rbx
jle 0x4b0a
movsd %xmm0, -0x18(%rbp)
movq %r14, %rdi
movq %r14, %rsi
movq %r14, %rdx
callq 0x4bc9
movsd -0x18(%rbp), %xmm0
decq %rbx
jne 0x4af2
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/sergiosvieira[P]ptd2ns2/rng.cc
// Function: (anonymous namespace)::MatPowModM(double const (*) [3], double (*) [3], double, long)
void MatPowModM(const double A[3][3], double B[3][3], double m, long n) {
	int i, j;
	double W[3][3];
	/* initialize: W = A; B = I */
	for (i = 0; i < 3; ++i)
		for (j = 0; j < 3; ++j) {
			W[i][j] = A[i][j];
			B[i][j] = 0.0;
		}
	for (j = 0; j < 3; ++j)
		B[j][j] = 1.0;
	/* Compute B = A^n mod m using the binary decomposition of n */
	while (n > 0) {
		if (n % 2)
			MatMatModM(W, B, B, m);
		MatMatModM(W, W, W, m);

		n /= 2;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rdx, %rbx
movsd %xmm0, -0x20(%rbp)
movq %rsi, %r14
leaq -0x70(%rbp), %rax
xorl %ecx, %ecx
movq %rsi, %rdx
xorl %esi, %esi
movsd (%rdi,%rsi,8), %xmm0
movsd %xmm0, (%rax,%rsi,8)
movq $0x0, (%rdx,%rsi,8)
incq %rsi
cmpq $0x3, %rsi
jne 0x4b36
incq %rcx
addq $0x18, %rdx
addq $0x18, %rdi
addq $0x18, %rax
cmpq $0x3, %rcx
jne 0x4b34
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, (%r14)
movq %rax, 0x20(%r14)
movq %rax, 0x40(%r14)
testq %rbx, %rbx
jle 0x4bbe
leaq -0x70(%rbp), %r15
testb $0x1, %bl
je 0x4b9c
movq %r15, %rdi
movq %r14, %rsi
movq %r14, %rdx
movsd -0x20(%rbp), %xmm0
callq 0x4bc9
movq %r15, %rdi
movq %r15, %rsi
movq %r15, %rdx
movsd -0x20(%rbp), %xmm0
callq 0x4bc9
movq %rbx, %rax
shrq %rax
cmpq $0x1, %rbx
movq %rax, %rbx
ja 0x4b84
addq $0x58, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/sergiosvieira[P]ptd2ns2/rng.cc
// Function: (anonymous namespace)::MatMatModM(double const (*) [3], double const (*) [3], double (*) [3], double)
void MatMatModM(const double A[3][3], const double B[3][3], double C[3][3],
		double m) {
	int i, j;
	double V[3], W[3][3];
	for (i = 0; i < 3; ++i) {
		for (j = 0; j < 3; ++j)
			V[j] = B[j][i];
		MatVecModM(A, V, V, m);
		for (j = 0; j < 3; ++j)

			W[j][i] = V[j];
	}
	for (i = 0; i < 3; ++i)
		for (j = 0; j < 3; ++j)
			C[i][j] = W[i][j];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movsd %xmm0, -0x38(%rbp)
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, -0x30(%rbp)
leaq -0xa0(%rbp), %r13
xorl %r15d, %r15d
leaq -0x50(%rbp), %r12
movq %r14, %rax
xorl %ecx, %ecx
movsd (%rax), %xmm0
movsd %xmm0, -0x50(%rbp,%rcx,8)
incq %rcx
addq $0x18, %rax
cmpq $0x3, %rcx
jne 0x4bfc
movq -0x30(%rbp), %rdi
movq %r12, %rsi
movq %r12, %rdx
movsd -0x38(%rbp), %xmm0
callq 0x44fe
movq %r13, %rax
xorl %ecx, %ecx
movsd -0x50(%rbp,%rcx,8), %xmm0
movsd %xmm0, (%rax)
incq %rcx
addq $0x18, %rax
cmpq $0x3, %rcx
jne 0x4c2c
incq %r15
addq $0x8, %r14
addq $0x8, %r13
cmpq $0x3, %r15
jne 0x4bf7
xorl %eax, %eax
movq -0x90(%rbp,%rax), %rcx
movq %rcx, 0x10(%rbx,%rax)
movups -0xa0(%rbp,%rax), %xmm0
movups %xmm0, (%rbx,%rax)
addq $0x18, %rax
cmpq $0x48, %rax
jne 0x4c56
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/sergiosvieira[P]ptd2ns2/rng.cc
// Function: RNG::write_state() const
void RNG::write_state() const {
	printf("The current state of the Rngstream %s:\n", name_);
	printf(" Cg_ = { ");
	for (int i = 0; i < 5; i++) {
		printf("%lu, ", (unsigned long) Cg_[i]);
	}
	printf("%lu }\n\n", (unsigned long) Cg_[5]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x92(%rdi), %rsi
leaq 0x1cc7(%rip), %rdi      # 0x696a
xorl %eax, %eax
callq 0x2050
leaq 0x1ce1(%rip), %rdi      # 0x6992
xorl %eax, %eax
callq 0x2050
leaq 0x1cdd(%rip), %r14      # 0x699c
xorl %r15d, %r15d
movsd (%rbx,%r15,8), %xmm0
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x16f4(%rip), %xmm0     # 0x63d0
cvttsd2si %xmm0, %rsi
andq %rcx, %rsi
orq %rax, %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0x2050
incq %r15
cmpq $0x5, %r15
jne 0x4cc2
movsd 0x28(%rbx), %xmm0
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x16bd(%rip), %xmm0     # 0x63d0
cvttsd2si %xmm0, %rsi
andq %rcx, %rsi
orq %rax, %rsi
leaq 0x1c7d(%rip), %rdi      # 0x69a2
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2050
// File: /workspace/github_cpp_makefile_star2_O3/sergiosvieira[P]ptd2ns2/rng.cc
// Function: RNG::write_state_full() const
void RNG::write_state_full() const {
	int i;
	printf("The RNG %s:\n", name_);
	printf(" anti_ = %s", (anti_ ? "true" : "false"));
	printf(" inc_prec_ = %s\n", (inc_prec_ ? "true" : "false"));

	printf(" Ig_ = { ");
	for (i = 0; i < 5; i++) {
		printf("%lu, ", (unsigned long) Ig_[i]);
	}
	printf("%lu }\n", (unsigned long) Ig_[5]);

	printf(" Bg_ = { ");
	for (i = 0; i < 5; i++) {
		printf("%lu, ", (unsigned long) Bg_[i]);
	}
	printf("%lu }\n", (unsigned long) Bg_[5]);

	printf(" Cg_ = { ");
	for (i = 0; i < 5; i++) {
		printf("%lu, ", (unsigned long) Cg_[i]);
	}
	printf("%lu }\n\n", (unsigned long) Cg_[5]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x92(%rdi), %rsi
leaq 0x1c59(%rip), %rdi      # 0x69aa
xorl %eax, %eax
callq 0x2050
leaq 0x1c64(%rip), %r15      # 0x69c3
cmpb $0x0, 0x90(%rbx)
leaq 0x1c5b(%rip), %r14      # 0x69c8
movq %r14, %rsi
cmovneq %r15, %rsi
leaq 0x1c3c(%rip), %rdi      # 0x69b7
xorl %eax, %eax
callq 0x2050
cmpb $0x0, 0x91(%rbx)
cmovneq %r15, %r14
leaq 0x1c3a(%rip), %rdi      # 0x69ce
movq %r14, %rsi
xorl %eax, %eax
callq 0x2050
leaq 0x1c3a(%rip), %rdi      # 0x69df
xorl %eax, %eax
callq 0x2050
leaq 0x1be9(%rip), %r14      # 0x699c
xorl %r15d, %r15d
movsd 0x60(%rbx,%r15,8), %xmm0
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x15ff(%rip), %xmm0     # 0x63d0
cvttsd2si %xmm0, %rsi
andq %rcx, %rsi
orq %rax, %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0x2050
incq %r15
cmpq $0x5, %r15
jne 0x4db6
movsd 0x88(%rbx), %xmm0
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x15c5(%rip), %xmm0     # 0x63d0
cvttsd2si %xmm0, %rsi
andq %rcx, %rsi
orq %rax, %rsi
leaq 0x1bcc(%rip), %rdi      # 0x69e9
xorl %eax, %eax
callq 0x2050
leaq 0x1bc5(%rip), %rdi      # 0x69f0
xorl %eax, %eax
callq 0x2050
leaq 0x1b63(%rip), %r14      # 0x699c
xorl %r15d, %r15d
movsd 0x30(%rbx,%r15,8), %xmm0
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x1579(%rip), %xmm0     # 0x63d0
cvttsd2si %xmm0, %rsi
andq %rcx, %rsi
orq %rax, %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0x2050
incq %r15
cmpq $0x5, %r15
jne 0x4e3c
movsd 0x58(%rbx), %xmm0
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x1542(%rip), %xmm0     # 0x63d0
cvttsd2si %xmm0, %rsi
andq %rcx, %rsi
orq %rax, %rsi
leaq 0x1b49(%rip), %rdi      # 0x69e9
xorl %eax, %eax
callq 0x2050
leaq 0x1ae4(%rip), %rdi      # 0x6992
xorl %eax, %eax
callq 0x2050
leaq 0x1ae0(%rip), %r14      # 0x699c
xorl %r15d, %r15d
movsd (%rbx,%r15,8), %xmm0
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x14f7(%rip), %xmm0     # 0x63d0
cvttsd2si %xmm0, %rsi
andq %rcx, %rsi
orq %rax, %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0x2050
incq %r15
cmpq $0x5, %r15
jne 0x4ebf
movsd 0x28(%rbx), %xmm0
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0x14c0(%rip), %xmm0     # 0x63d0
cvttsd2si %xmm0, %rsi
andq %rcx, %rsi
orq %rax, %rsi
leaq 0x1a80(%rip), %rdi      # 0x69a2
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2050
nop
// File: /workspace/github_cpp_makefile_star2_O3/sergiosvieira[P]ptd2ns2/rng.cc
// Function: (anonymous namespace)::MultModM(double, double, double, double)
double MultModM(double a, double s, double c, double m) {
	double v;
	long a1;
	v = a * s + c;

	if (v >= two53 || v <= -two53) {
		a1 = static_cast<long> (a / two17);
		a -= a1 * two17;
		v = a1 * s;
		a1 = static_cast<long> (v / m);
		v -= a1 * m;
		v = v * two17 + a * s + c;
	}
	a1 = static_cast<long> (v / m);
	/* in case v < 0)*/
	if ((v -= a1 * m) < 0.0)
		return v += m;
	else
		return v;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movapd %xmm0, %xmm4
mulsd %xmm1, %xmm4
addsd %xmm2, %xmm4
movapd 0x14e9(%rip), %xmm5     # 0x6450
andpd %xmm4, %xmm5
ucomisd 0x14a5(%rip), %xmm5     # 0x6418
jb 0x4fd3
movsd 0x14a3(%rip), %xmm4     # 0x6420
mulsd %xmm0, %xmm4
cvttsd2si %xmm4, %rax
xorps %xmm4, %xmm4
cvtsi2sd %rax, %xmm4
movsd 0x1492(%rip), %xmm5     # 0x6428
movapd %xmm4, %xmm6
mulsd %xmm5, %xmm6
subsd %xmm6, %xmm0
mulsd %xmm1, %xmm4
movapd %xmm4, %xmm6
divsd %xmm3, %xmm6
cvttsd2si %xmm6, %rax
xorps %xmm6, %xmm6
cvtsi2sd %rax, %xmm6
mulsd %xmm3, %xmm6
subsd %xmm6, %xmm4
mulsd %xmm1, %xmm0
mulsd %xmm5, %xmm4
addsd %xmm0, %xmm4
addsd %xmm2, %xmm4
movapd %xmm4, %xmm0
divsd %xmm3, %xmm0
cvttsd2si %xmm0, %rax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
mulsd %xmm3, %xmm0
subsd %xmm0, %xmm4
addsd %xmm4, %xmm3
xorpd %xmm1, %xmm1
movapd %xmm4, %xmm0
cmpltsd %xmm1, %xmm0
andpd %xmm0, %xmm3
andnpd %xmm4, %xmm0
orpd %xmm3, %xmm0
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/NinjaDevelper[P]ReedSolomon/cxx/ReedSolomon.cpp
// Function: ReedSolomon::multiplyPoly(POLY&, POLY&, unsigned char*)
POLY& ReedSolomon::multiplyPoly(POLY& x,POLY& y,unsigned char* tmp){
    int i=0,j=0;
    int n=x.n+y.n-1;

    for(j=0;j<n;j++) tmp[j]=0;
    for(i=0;i<x.n;i++){
        for(j=0;j<y.n;j++){
            tmp[i+j]^=multiply(x.data[i],y.data[j]);
        }
    }
    for(j=0;j<n;j++) x.data[j]=tmp[j];
    x.n+=y.n-1;
    return x;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r15
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r12
movl 0x8(%rsi), %edx
movl 0x8(%r14), %eax
leal (%rdx,%rax), %ebp
decl %ebp
testl %ebp, %ebp
jle 0x2407
addl %eax, %edx
addl $-0x2, %edx
incq %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0x20b0
movl 0x8(%rbx), %edx
testl %edx, %edx
jle 0x2470
movl 0x8(%r14), %esi
xorl %eax, %eax
movq %r15, %rcx
testl %esi, %esi
jle 0x2462
xorl %edx, %edx
movq (%rbx), %rsi
movzbl (%rsi,%rax), %esi
testq %rsi, %rsi
je 0x244d
movq (%r14), %rdi
movzbl (%rdi,%rdx), %edi
testq %rdi, %rdi
je 0x244d
movzbl 0x200(%r12,%rsi), %esi
movzbl 0x200(%r12,%rdi), %edi
addq %rsi, %rdi
movb (%r12,%rdi), %sil
jmp 0x244f
xorl %esi, %esi
xorb %sil, (%rcx,%rdx)
incq %rdx
movslq 0x8(%r14), %rsi
cmpq %rsi, %rdx
jl 0x241a
movl 0x8(%rbx), %edx
incq %rax
movslq %edx, %rdi
incq %rcx
cmpq %rdi, %rax
jl 0x2414
testl %ebp, %ebp
jle 0x248d
movl %ebp, %eax
xorl %ecx, %ecx
movb (%r15,%rcx), %dl
movq (%rbx), %rsi
movb %dl, (%rsi,%rcx)
incq %rcx
cmpq %rcx, %rax
jne 0x2478
movl 0x8(%rbx), %edx
movl 0x8(%r14), %eax
addl %edx, %eax
decl %eax
movl %eax, 0x8(%rbx)
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq