LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/PeterDenton[P]Nu-Pert/src/Mixed.cpp
// Function: Mixed::Talphabetai(int, int, int, double, double, int)
std::complex<double> Talphabetai(int alpha, int beta, int i, double a, double delta, int order)
{
	assert (alpha >= 0 && alpha <= 2); // alpha valid for 0, 1, 2
	assert (beta >= 0 && beta <= 2); // beta valid for 0, 1, 2
	assert (i >= 0 && i <= 2); // i valid for 0, 1, 2

	Matrix<std::complex<double> > U = UMNSm(a, delta, order);
	return std::conj(U(alpha, i)) * U(beta, i);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
cmpl $0x3, %edi
jae 0xba77
movl %esi, %ebx
cmpl $0x3, %esi
jae 0xba96
movl %edx, %ebp
cmpl $0x3, %edx
jae 0xbab5
movl %edi, %r14d
leaq 0x30(%rsp), %r15
movq %r15, %rdi
movl %ecx, %esi
callq 0xb6ab
movl %r14d, %esi
movl %ebp, %r14d
movq %r15, %rdi
movq %r14, %rdx
callq 0xa590
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x8(%rax), %xmm0
movaps %xmm0, 0x10(%rsp)
movl %ebx, %esi
leaq 0x30(%rsp), %rdi
movq %r14, %rdx
callq 0xa590
movaps 0x10(%rsp), %xmm1
xorps 0x25fd(%rip), %xmm1     # 0xe020
leaq 0x20(%rsp), %rdi
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rdi)
movlps %xmm1, 0x8(%rdi)
movq %rax, %rsi
callq 0x3994
movsd 0x20(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x28(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
leaq 0x30(%rsp), %rdi
callq 0xa582
movsd 0x8(%rsp), %xmm0
movsd 0x10(%rsp), %xmm1
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2701(%rip), %rdi      # 0xe17f
leaq 0x30eb(%rip), %rsi      # 0xeb70
leaq 0x30f2(%rip), %rcx      # 0xeb7e
movl $0x76, %edx
callq 0x20f0
leaq 0x2747(%rip), %rdi      # 0xe1e4
leaq 0x30cc(%rip), %rsi      # 0xeb70
leaq 0x30d3(%rip), %rcx      # 0xeb7e
movl $0x77, %edx
callq 0x20f0
leaq 0x273f(%rip), %rdi      # 0xe1fb
leaq 0x30ad(%rip), %rsi      # 0xeb70
leaq 0x30b4(%rip), %rcx      # 0xeb7e
movl $0x78, %edx
callq 0x20f0
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0xa582
movq %rbx, %rdi
callq 0x22a0
// File: /workspace/github_cpp_makefile_star2_O1/PeterDenton[P]Nu-Pert/src/Progress.cpp
// Function: Progress_Bar::Progress_Bar()
Progress_Bar::Progress_Bar()
{
	progress = 0;
	bar_width = 55;
	start_time = time(NULL);
	elapsed_time = 0;
	N_stats = 0;
	update(0);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x6f96(%rip), %rax      # 0x12d88
movq %rax, (%rdi)
xorl %r14d, %r14d
movq %r14, 0x10(%rdi)
movl $0x37, 0x8(%rdi)
xorl %edi, %edi
callq 0x2170
cvtsi2sd %rax, %xmm0
movsd %xmm0, 0x18(%rbx)
movq %r14, 0x20(%rbx)
movl $0x0, 0x670(%rbx)
xorpd %xmm0, %xmm0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xbe36
nop
// File: /workspace/github_cpp_makefile_star2_O1/PeterDenton[P]Nu-Pert/src/Progress.cpp
// Function: Progress_Bar::~Progress_Bar()
Progress_Bar::~Progress_Bar()
{
	if (not Progress_Bar_visible)
		return;
	update(1);
	elapsed_time = time(NULL) - start_time;
	std::cerr << std::endl;
	std::cerr << "Elapsed time: " << elapsed_time << " ";
	if (Progress_Bar_statistics)
	{
		double sum = 0;
		double sumsq = 0;
		double res;
		for (int i = 0; i < N_stats; i++)
		{
			res = times[0][i] + times[1][i] - elapsed_time;
			sum += res;
			sumsq += pow(res, 2);
		}
		std::cerr << "Mean: " << sum / N_stats << " STD: " << sqrt(sumsq / N_stats - pow(sum / N_stats, 2)) << " N: " << N_stats;
	}
	std::cerr << std::endl;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
leaq 0x6d34(%rip), %rax      # 0x12d88
movq %rax, (%rdi)
cmpb $0x1, 0x716d(%rip)      # 0x131cb
jne 0xc246
movq %rdi, %rbx
movsd 0x1fa9(%rip), %xmm0     # 0xe018
callq 0xbe36
xorl %edi, %edi
callq 0x2170
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
subsd 0x18(%rbx), %xmm0
movsd %xmm0, 0x20(%rbx)
movq 0x6f5c(%rip), %rdi      # 0x12ff0
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq 0x6f41(%rip), %rdi      # 0x12ff0
callq 0x2040
movq %rax, %rdi
callq 0x2100
movq 0x6f2d(%rip), %rdi      # 0x12ff0
leaq 0x2b66(%rip), %rsi      # 0xec30
movl $0xe, %edx
callq 0x21c0
movsd 0x20(%rbx), %xmm0
movq 0x6f10(%rip), %r14      # 0x12ff0
movq %r14, %rdi
callq 0x2260
leaq 0x2b6f(%rip), %rsi      # 0xec5e
movl $0x1, %edx
movq %rax, %rdi
callq 0x21c0
cmpb $0x1, 0x70c9(%rip)      # 0x131cc
jne 0xc21b
movslq 0x670(%rbx), %rax
testq %rax, %rax
jle 0xc14d
movsd 0x20(%rbx), %xmm0
xorpd %xmm3, %xmm3
xorl %ecx, %ecx
xorpd %xmm2, %xmm2
movsd 0x30(%rbx,%rcx,8), %xmm1
addsd 0x350(%rbx,%rcx,8), %xmm1
subsd %xmm0, %xmm1
addsd %xmm1, %xmm3
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm2
incq %rcx
cmpq %rcx, %rax
jne 0xc124
jmp 0xc155
xorpd %xmm2, %xmm2
xorpd %xmm3, %xmm3
movsd %xmm3, (%rsp)
movsd %xmm2, 0x8(%rsp)
movq 0x6e89(%rip), %rdi      # 0x12ff0
leaq 0x2ad1(%rip), %rsi      # 0xec3f
movl $0x6, %edx
callq 0x21c0
xorps %xmm1, %xmm1
cvtsi2sdl 0x670(%rbx), %xmm1
movsd (%rsp), %xmm0
divsd %xmm1, %xmm0
movq 0x6e5d(%rip), %rdi      # 0x12ff0
callq 0x2260
movq %rax, %r15
leaq 0x2aa4(%rip), %rsi      # 0xec46
movl $0x6, %edx
movq %rax, %rdi
callq 0x21c0
xorps %xmm0, %xmm0
cvtsi2sdl 0x670(%rbx), %xmm0
movsd 0x8(%rsp), %xmm1
divsd %xmm0, %xmm1
movsd (%rsp), %xmm2
divsd %xmm0, %xmm2
mulsd %xmm2, %xmm2
subsd %xmm2, %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
movapd %xmm1, %xmm0
jb 0xc1e9
sqrtsd %xmm0, %xmm0
jmp 0xc1ee
callq 0x2120
movq %r15, %rdi
callq 0x2260
movq %rax, %r15
leaq 0x2a4d(%rip), %rsi      # 0xec4d
movl $0x4, %edx
movq %rax, %rdi
callq 0x21c0
movl 0x670(%rbx), %esi
movq %r15, %rdi
callq 0x2280
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq 0x6db7(%rip), %rdi      # 0x12ff0
callq 0x2040
movq %rax, %rdi
callq 0x2100
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rdi
callq 0xc2df
// File: /workspace/github_cpp_makefile_star2_O1/PeterDenton[P]Nu-Pert/src/Progress.cpp
// Function: Progress_Bar::update(double, double, double, bool)
void Progress_Bar::update(double min, double max, double val, bool linear = true)
{
	if (linear)
		update((val - min) / (max - min));
	else
		update(log(val / min) / log(max / min));
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
testl %esi, %esi
je 0xc284
subsd %xmm0, %xmm2
subsd %xmm0, %xmm1
divsd %xmm1, %xmm2
jmp 0xc2be
divsd %xmm0, %xmm2
movsd %xmm0, 0x10(%rsp)
movapd %xmm2, %xmm0
movsd %xmm1, 0x8(%rsp)
callq 0x2130
movsd %xmm0, 0x18(%rsp)
movsd 0x8(%rsp), %xmm0
divsd 0x10(%rsp), %xmm0
callq 0x2130
movsd 0x18(%rsp), %xmm2
divsd %xmm0, %xmm2
movq %rbx, %rdi
movapd %xmm2, %xmm0
addq $0x20, %rsp
popq %rbx
jmp 0xbe36
// File: /workspace/github_cpp_makefile_star2_O1/PeterDenton[P]Nu-Pert/src/Warning.cpp
// Function: IndexWarning::IndexWarning(int, int, double)
IndexWarning::IndexWarning(int _min, int _max, double _val)
: min(_min), max(_max), val(_val)
{
	name = "IndexWarning";
	std::ostringstream tmp;
	tmp << "Index range = [" << min << ", " << max << "], " << val << " was provided.";
	message = tmp.str();
	N_IndexWarning++;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x1a0, %rsp            # imm = 0x1A0
movsd %xmm0, (%rsp)
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
callq 0xce04
movl %r14d, 0x48(%rbx)
movl %ebp, 0x4c(%rbx)
movsd (%rsp), %xmm0
movsd %xmm0, 0x50(%rbx)
movq 0x8(%rbx), %rdx
leaq 0x1d7a(%rip), %rcx      # 0xed93
movl $0xc, %r8d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2240
leaq 0x28(%rsp), %rdi
callq 0x2200
leaq 0x1d66(%rip), %rsi      # 0xeda0
leaq 0x28(%rsp), %rdi
movl $0xf, %edx
callq 0x21c0
movl 0x48(%rbx), %esi
leaq 0x28(%rsp), %rdi
callq 0x2280
movq %rax, %r14
leaq 0x1d51(%rip), %rsi      # 0xedb1
movl $0x2, %edx
movq %rax, %rdi
callq 0x21c0
movl 0x4c(%rbx), %esi
movq %r14, %rdi
callq 0x2280
movq %rax, %r14
leaq 0x1d2e(%rip), %rsi      # 0xedb0
movl $0x3, %edx
movq %rax, %rdi
callq 0x21c0
movsd 0x50(%rbx), %xmm0
movq %r14, %rdi
callq 0x2260
leaq 0x1d11(%rip), %rsi      # 0xedb4
movl $0xe, %edx
movq %rax, %rdi
callq 0x21c0
leaq 0x30(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x2250
addq $0x20, %rbx
leaq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21d0
movq (%r14), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xd0e5
callq 0x2180
incl 0x60ed(%rip)            # 0x131d8
movq 0x5ede(%rip), %rsi      # 0x12fd0
leaq 0x28(%rsp), %rdi
callq 0x20c0
leaq 0x98(%rsp), %rdi
callq 0x20a0
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbx
popq %r14
popq %rbp
retq
jmp 0xd11e
jmp 0xd119
movq %rax, %r14
jmp 0xd13f
movq %rax, %r14
movq 0x5ea8(%rip), %rsi      # 0x12fd0
leaq 0x28(%rsp), %rdi
callq 0x20c0
leaq 0x98(%rsp), %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0xce78
movq %r14, %rdi
callq 0x22a0
nop
// File: /workspace/github_cpp_makefile_star2_O1/PeterDenton[P]Nu-Pert/src/Warning.cpp
// Function: EdgeCaseWarning::EdgeCaseWarning(double, double, double)
EdgeCaseWarning::EdgeCaseWarning(double _min, double _max, double _val)
: min(_min), max(_max), val(_val)
{
	name = "EdgeCaseWarning";
	std::ostringstream tmp;
	tmp << "Range = [" << min << ", " << max << "], " << val << " was returned.";
	message = tmp.str();
	N_EdgeCaseWarning++;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
movsd %xmm2, 0x18(%rsp)
movsd %xmm1, 0x10(%rsp)
movsd %xmm0, 0x8(%rsp)
movq %rdi, %rbx
callq 0xce04
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x48(%rbx)
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x50(%rbx)
movsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x58(%rbx)
movq 0x8(%rbx), %rdx
leaq 0x1c23(%rip), %rcx      # 0xedc3
movl $0xf, %r8d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2240
leaq 0x40(%rsp), %rdi
callq 0x2200
leaq 0x1c12(%rip), %rsi      # 0xedd3
leaq 0x40(%rsp), %rdi
movl $0x9, %edx
callq 0x21c0
movsd 0x48(%rbx), %xmm0
leaq 0x40(%rsp), %rdi
callq 0x2260
movq %rax, %r14
leaq 0x1bc8(%rip), %rsi      # 0xedb1
movl $0x2, %edx
movq %rax, %rdi
callq 0x21c0
movsd 0x50(%rbx), %xmm0
movq %r14, %rdi
callq 0x2260
movq %rax, %r14
leaq 0x1ba3(%rip), %rsi      # 0xedb0
movl $0x3, %edx
movq %rax, %rdi
callq 0x21c0
movsd 0x58(%rbx), %xmm0
movq %r14, %rdi
callq 0x2260
leaq 0x1baf(%rip), %rsi      # 0xeddd
movl $0xe, %edx
movq %rax, %rdi
callq 0x21c0
leaq 0x48(%rsp), %rsi
leaq 0x20(%rsp), %rdi
callq 0x2250
addq $0x20, %rbx
leaq 0x20(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21d0
movq (%r14), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0xd270
callq 0x2180
incl 0x5f66(%rip)            # 0x131dc
movq 0x5d53(%rip), %rsi      # 0x12fd0
leaq 0x40(%rsp), %rdi
callq 0x20c0
leaq 0xb0(%rsp), %rdi
callq 0x20a0
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r14
retq
jmp 0xd2a8
jmp 0xd2a3
movq %rax, %r14
jmp 0xd2c9
movq %rax, %r14
movq 0x5d1e(%rip), %rsi      # 0x12fd0
leaq 0x40(%rsp), %rdi
callq 0x20c0
leaq 0xb0(%rsp), %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0xce78
movq %r14, %rdi
callq 0x22a0
nop
// File: /workspace/github_cpp_makefile_star2_O1/PeterDenton[P]Nu-Pert/src/Warning.cpp
// Function: ProbabilityWarning::ProbabilityWarning(double*)
ProbabilityWarning::ProbabilityWarning(double *P)
{
	if (*P >= 0 and *P <= 1)
	{
		N_Warning--;
		warn = false;		
	}
	else
	{
		name = "ProbabilityWarning";
		std::ostringstream tmp;
		tmp << "P = " << *P << ", is outside of [0, 1]. Setting P to " << (*P < 0 ? 0 : 1) << ".";
		*P = (*P < 0 ? 0 : 1);
		message = tmp.str();
		N_ProbabilityWarning++;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x1a0, %rsp            # imm = 0x1A0
movq %rsi, %r14
movq %rdi, %rbx
callq 0xce04
movsd (%r14), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0xd31d
movsd 0xd10(%rip), %xmm1      # 0xe018
ucomisd %xmm0, %xmm1
jb 0xd31d
decl 0x5ec0(%rip)            # 0x131d4
movb $0x0, 0x40(%rbx)
jmp 0xd421
movq 0x8(%rbx), %rdx
leaq 0x1ac4(%rip), %rcx      # 0xedec
movl $0x12, %r8d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2240
leaq 0x28(%rsp), %rdi
callq 0x2200
leaq 0x1ab6(%rip), %rsi      # 0xedff
leaq 0x28(%rsp), %rdi
movl $0x4, %edx
callq 0x21c0
movsd (%r14), %xmm0
leaq 0x28(%rsp), %rdi
callq 0x2260
movq %rax, %r15
leaq 0x1a93(%rip), %rsi      # 0xee04
movl $0x25, %edx
movq %rax, %rdi
callq 0x21c0
xorpd %xmm0, %xmm0
xorl %esi, %esi
ucomisd (%r14), %xmm0
setbe %sil
movq %r15, %rdi
callq 0x2280
leaq 0x1a25(%rip), %rsi      # 0xedc1
movl $0x1, %edx
movq %rax, %rdi
callq 0x21c0
movsd (%r14), %xmm0
xorpd %xmm1, %xmm1
cmpnltsd %xmm1, %xmm0
movsd 0xc59(%rip), %xmm1      # 0xe018
andpd %xmm0, %xmm1
movlpd %xmm1, (%r14)
leaq 0x30(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x2250
addq $0x20, %rbx
leaq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x21d0
movq (%r14), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xd3fd
callq 0x2180
incl 0x5ddd(%rip)            # 0x131e0
movq 0x5bc6(%rip), %rsi      # 0x12fd0
leaq 0x28(%rsp), %rdi
callq 0x20c0
leaq 0x98(%rsp), %rdi
callq 0x20a0
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbx
popq %r14
popq %r15
retq
jmp 0xd437
jmp 0xd432
movq %rax, %r14
jmp 0xd458
movq %rax, %r14
movq 0x5b8f(%rip), %rsi      # 0x12fd0
leaq 0x28(%rsp), %rdi
callq 0x20c0
leaq 0x98(%rsp), %rdi
callq 0x20a0
movq %rbx, %rdi
callq 0xce78
movq %r14, %rdi
callq 0x22a0
// File: /workspace/github_cpp_makefile_star2_O1/jaldhar[P]Lets-Build-a-Simple-Interpreter/calc6.cc
// Function: operator<<(std::ostream&, TOKENTYPE const&)
ostream& operator<<(ostream& out, const TOKENTYPE& t) {
    string repr;
    switch(t) {
        case TOKENTYPE::ENDOFFILE:
            repr = "ENDOFFILE";
            break;
        case TOKENTYPE::INTEGER:
            repr = "INTEGER";
            break;
        case TOKENTYPE::PLUS:
            repr = "PLUS";
            break;
        case TOKENTYPE::MINUS:
            repr = "MINUS";
            break;
        case TOKENTYPE::MUL:
            repr = "MUL";
            break;
        case TOKENTYPE::DIV:
            repr = "DIV";
            break;
        case TOKENTYPE::LPAREN:
            repr = "LPAREN";
            break;
        case TOKENTYPE::RPAREN:
            repr = "RPAREN";
            break;
    }

    out << repr;
    return out;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x18(%rsp), %r14
movq %r14, -0x10(%r14)
movq $0x0, -0x8(%r14)
movb $0x0, (%r14)
movl (%rsi), %eax
cmpq $0x8, %rax
jae 0x239a
leaq 0xcae(%rip), %rdx       # 0x3028
movslq (%rdx,%rax,4), %rcx
addq %rdx, %rcx
leaq 0xcc0(%rip), %rdx       # 0x3048
movq (%rdx,%rax,8), %r8
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x21b0
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rdi
callq 0x2160
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x23c3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2150
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x23e8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2150
movq %rbx, %rdi
callq 0x21f0
// File: /workspace/github_cpp_makefile_star2_O1/jaldhar[P]Lets-Build-a-Simple-Interpreter/calc6.cc
// Function: Lexer::integer()
long Lexer::integer() {
    string result("");

    while (_current_char != '\0' && isdigit(_current_char)) {
        result += _current_char;
        advance();
    }

    return stol(result);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x907(%rip), %rdx       # 0x30fe
movq %rsp, %rdi
movq %rdx, %rsi
callq 0x2dcc
movsbl 0x10(%rbx), %eax
leal -0x30(%rax), %ecx
cmpl $0x9, %ecx
ja 0x284e
movq %rsp, %r14
movsbl %al, %esi
movq %r14, %rdi
callq 0x2100
movq (%rbx), %rcx
movq 0x8(%rbx), %rax
incq %rax
movq %rax, 0x8(%rbx)
movq 0x8(%rcx), %rdx
decq %rdx
cmpq %rdx, %rax
jbe 0x283a
xorl %eax, %eax
jmp 0x2840
movq (%rcx), %rcx
movb (%rcx,%rax), %al
movb %al, 0x10(%rbx)
movsbl %al, %ecx
addl $-0x30, %ecx
cmpl $0xa, %ecx
jb 0x2811
movq (%rsp), %r15
callq 0x2040
movq %rax, %rbx
movl (%rax), %ebp
movl $0x0, (%rax)
leaq 0x20(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
movl $0xa, %edx
callq 0x2180
cmpq %r15, (%r12)
je 0x28c1
movq %rax, %r14
movl (%rbx), %eax
testl %eax, %eax
je 0x2897
cmpl $0x22, %eax
jne 0x2899
leaq 0x8af(%rip), %rdi       # 0x3141
callq 0x2190
movl %ebp, (%rbx)
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x28af
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2150
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x879(%rip), %rdi       # 0x3141
callq 0x20b0
movq %rax, %r14
cmpl $0x0, (%rbx)
jne 0x28dc
movl %ebp, (%rbx)
jmp 0x28dc
movq %rax, %r14
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x28f2
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2150
movq %r14, %rdi
callq 0x21f0
// File: /workspace/github_cpp_makefile_star2_O1/jaldhar[P]Lets-Build-a-Simple-Interpreter/calc6.cc
// Function: Interpreter::expression()
long Interpreter::expression() {
    long result = term();

    while (_current_token.type == TOKENTYPE::PLUS ||
    _current_token.type == TOKENTYPE::MINUS) {
        Token token = _current_token;
        if (token.type == TOKENTYPE::PLUS) {
            eat(TOKENTYPE::PLUS);
            result += term();
        } else if (token.type == TOKENTYPE::MINUS) {
            eat(TOKENTYPE::MINUS);
            result -= term();
        }
    }

    return result;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x29a0
movq %rax, %rbx
movl 0x8(%r14), %eax
movl %eax, %ecx
andl $-0x2, %ecx
cmpl $0x2, %ecx
jne 0x2995
cmpl $0x3, %eax
je 0x297b
cmpl $0x2, %eax
jne 0x2949
movq %r14, %rdi
movl $0x2, %esi
callq 0x2a38
movq %r14, %rdi
callq 0x29a0
addq %rax, %rbx
jmp 0x2949
movq %r14, %rdi
movl $0x3, %esi
callq 0x2a38
movq %r14, %rdi
callq 0x29a0
subq %rax, %rbx
jmp 0x2949
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/jaldhar[P]Lets-Build-a-Simple-Interpreter/calc6.cc
// Function: Interpreter::term()
long Interpreter::term() {
    long result = factor();
                                                                      
    while (_current_token.type == TOKENTYPE::MUL
    || _current_token.type == TOKENTYPE::DIV) {
        Token token = _current_token;
        if (token.type == TOKENTYPE::MUL) {
            eat(TOKENTYPE::MUL);
            result *= factor();
        } else if (token.type == TOKENTYPE::DIV) {
            eat(TOKENTYPE::DIV);
            long rhs = factor();
            if (rhs == 0) {
                throw("Division by zero");
            }
            result /= rhs;
        }
    }

    return result;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x2b2c
movq %rax, %r14
movl 0x8(%rbx), %eax
movl %eax, %ecx
andl $-0x2, %ecx
cmpl $0x4, %ecx
jne 0x2a08
cmpl $0x5, %eax
je 0x29e1
cmpl $0x4, %eax
jne 0x29af
movq %rbx, %rdi
movl $0x4, %esi
callq 0x2a38
movq %rbx, %rdi
callq 0x2b2c
imulq %rax, %r14
jmp 0x29af
movq %rbx, %rdi
movl $0x5, %esi
callq 0x2a38
movq %rbx, %rdi
callq 0x2b2c
testq %rax, %rax
je 0x2a13
movq %rax, %rcx
movq %r14, %rax
cqto
idivq %rcx
jmp 0x29ac
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0x8, %edi
callq 0x2090
leaq 0x705(%rip), %rcx       # 0x3129
movq %rcx, (%rax)
movq 0x2582(%rip), %rsi      # 0x4fb0
movq %rax, %rdi
xorl %edx, %edx
callq 0x21e0
// File: /workspace/github_cpp_makefile_star2_O1/jaldhar[P]Lets-Build-a-Simple-Interpreter/calc6.cc
// Function: Interpreter::eat(TOKENTYPE)
void Interpreter::eat(TOKENTYPE token_type) {
    if (_current_token.type == token_type) {
        _current_token = _lexer.get_next_token();
    } else {
        ostringstream out;
        out << "Error parsing input. Wanted: " << token_type;
        throw(out.str().c_str());
    }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movl %esi, 0xc(%rsp)
cmpl %esi, 0x8(%rdi)
jne 0x2a68
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x246a
movl %eax, 0x8(%rbx)
movq %rdx, 0x10(%rbx)
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r14
retq
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
callq 0x2170
leaq 0x665(%rip), %rsi       # 0x30e1
movl $0x1d, %edx
movq %rbx, %rdi
callq 0x2160
leaq 0x30(%rsp), %rdi
leaq 0xc(%rsp), %rsi
callq 0x234c
movl $0x8, %edi
callq 0x2090
movq %rax, %rbx
leaq 0x38(%rsp), %rsi
leaq 0x10(%rsp), %rdi
callq 0x21c0
movq 0x10(%rsp), %rax
movq %rax, (%rbx)
movq 0x24ed(%rip), %rsi      # 0x4fb0
movq %rbx, %rdi
xorl %edx, %edx
callq 0x21e0
movq %rax, %r14
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2aeb
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2150
xorl %eax, %eax
jmp 0x2af4
movq %rax, %r14
movb $0x1, %al
testb %al, %al
je 0x2b05
movq %rbx, %rdi
callq 0x20e0
jmp 0x2b05
movq %rax, %r14
movq 0x24b4(%rip), %rsi      # 0x4fc0
leaq 0x30(%rsp), %rdi
callq 0x20a0
leaq 0xa0(%rsp), %rdi
callq 0x2060
movq %r14, %rdi
callq 0x21f0
nop
// File: /workspace/github_cpp_makefile_star2_O1/jaldhar[P]Lets-Build-a-Simple-Interpreter/calc6.cc
// Function: Interpreter::factor()
long Interpreter::factor() {
    Token token = _current_token;
    
    if (token.type == TOKENTYPE::INTEGER) {
        eat(TOKENTYPE::INTEGER);
        return token.value;
    } else if (token.type == TOKENTYPE::LPAREN) {
        eat(TOKENTYPE::LPAREN);
        long result = expression();
        eat(TOKENTYPE::RPAREN);
        return result;
    } else {
        ostringstream out;
        out << "Error parsing input. Wanted: Integer or (";
        throw(out.str().c_str());
    }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movq %rdi, %rbx
movl 0x8(%rdi), %eax
cmpl $0x6, %eax
je 0x2b51
cmpl $0x1, %eax
jne 0x2b84
movq 0x10(%rbx), %r14
movl $0x1, %esi
jmp 0x2b6e
movq %rbx, %rdi
movl $0x6, %esi
callq 0x2a38
movq %rbx, %rdi
callq 0x293a
movq %rax, %r14
movl $0x7, %esi
movq %rbx, %rdi
callq 0x2a38
movq %r14, %rax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r14
retq
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
callq 0x2170
leaq 0x567(%rip), %rsi       # 0x30ff
movl $0x29, %edx
movq %rbx, %rdi
callq 0x2160
movl $0x8, %edi
callq 0x2090
movq %rax, %rbx
leaq 0x28(%rsp), %rsi
movq %rsp, %rdi
callq 0x21c0
movq (%rsp), %rax
movq %rax, (%rbx)
movq 0x23e3(%rip), %rsi      # 0x4fb0
movq %rbx, %rdi
xorl %edx, %edx
callq 0x21e0
movq %rax, %r14
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2bf5
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2150
xorl %eax, %eax
jmp 0x2bfe
movq %rax, %r14
movb $0x1, %al
testb %al, %al
je 0x2c0f
movq %rbx, %rdi
callq 0x20e0
jmp 0x2c0f
movq %rax, %r14
movq 0x23aa(%rip), %rsi      # 0x4fc0
leaq 0x20(%rsp), %rdi
callq 0x20a0
leaq 0x90(%rsp), %rdi
callq 0x2060
movq %r14, %rdi
callq 0x21f0
// File: /workspace/github_cpp_makefile_star2_O1/git-kale[P]CppContainer/container.cpp
// Function: stack_memory()
char *stack_memory()
{
    const int stackSize = 65536;
    auto *stack = new (std::nothrow) char[stackSize];

    if (stack == nullptr)
    { // Can't allocate memory from heap hence `new` will return null pointer
        printf("Memory allocation failed !! \n");
        exit(1);
    }

    return stack + stackSize; // As stack grows backward so we have to start from end of stack   {(end of stack)| *stack|-------> stackSize(start of stack)}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x2d41(%rip), %rsi      # 0x3fc8
movl $0x10000, %edi          # imm = 0x10000
callq 0x1110
testq %rax, %rax
je 0x129e
addq $0x10000, %rax          # imm = 0x10000
popq %rbp
retq
leaq 0xddb(%rip), %rdi       # 0x2080
callq 0x1100
movl $0x1, %edi
callq 0x1090
// File: /workspace/github_cpp_makefile_star2_O1/git-kale[P]CppContainer/container.cpp
// Function: jail(void*)
int jail(void *args)
{

    printf("Namastey from JAIL \n");
    printf("jail pid : %d\n", getpid());
    sethostname("Devil's Nest", 13);
    setup_vars();

    setup_root("./root");

    mount("proc", "/proc", "proc", 0, 0);

    auto runThis = [](void *args) -> int { run("/bin/sh"); };

    clone_process(runThis, SIGCHLD);

    umount("/proc");
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0xddc(%rip), %rdi       # 0x209d
callq 0x1100
callq 0x10c0
leaq 0xd32(%rip), %rdi       # 0x2004
movl %eax, %esi
xorl %eax, %eax
callq 0x1030
leaq 0xd31(%rip), %rdi       # 0x2013
movl $0xd, %esi
callq 0x1040
callq 0x135c
leaq 0xd28(%rip), %rdi       # 0x2020
callq 0x1080
leaq 0xd29(%rip), %rdi       # 0x202d
callq 0x10d0
leaq 0xd17(%rip), %rbx       # 0x2027
leaq 0xd11(%rip), %rdi       # 0x2028
movq %rbx, %rsi
movq %rdi, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x1130
callq 0x127c
leaq 0xb9(%rip), %rdi        # 0x13ec
movq %rax, %rsi
movl $0x11, %edx
xorl %ecx, %ecx
xorl %eax, %eax
callq 0x1120
xorl %edi, %edi
callq 0x10a0
movq %rbx, %rdi
callq 0x10b0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/git-kale[P]CppContainer/container.cpp
// Function: main
int main(int argc, char **argv)
{

    printf("Namastey from main(), Waiting for JAIL.....\n");
    printf("parent pid : %d\n", getpid());

    clone_process(jail, CLONE_NEWPID | CLONE_NEWUTS | SIGCHLD);
    printf("Exitting from container.... \n");

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0xd00(%rip), %rdi       # 0x20b1
callq 0x1100
callq 0x10c0
leaq 0xca5(%rip), %rdi       # 0x2067
movl %eax, %esi
xorl %eax, %eax
callq 0x1030
leaq -0x11e(%rip), %rdi      # 0x12b4
movl $0x24000011, %esi       # imm = 0x24000011
callq 0x13fc
leaq 0xcfa(%rip), %rdi       # 0x20dd
callq 0x1100
xorl %eax, %eax
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/nmmmnu[P]HM3/test/test_glob.cc
// Function: main
int main(int argc, char **argv){
	if (argc < 2){
		print_usage(argv[0]);
		return 1;
	}

	const char *path = argv[1];

	MyGlob gl = getGlobSimulateMove(path);

	for(const StringRef &s : gl.getData())
		std::cout << s << '\n';

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x78, %rsp
cmpl $0x1, %edi
jg 0x1326
movq (%rsi), %rbx
leaq 0xd36(%rip), %rdi       # 0x2033
callq 0x1130
leaq 0xcfb(%rip), %rdi       # 0x2004
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1030
leaq 0xd20(%rip), %rdi       # 0x203a
callq 0x1130
movl $0x1, %eax
jmp 0x1389
movq 0x8(%rsi), %rsi
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x128c
movq 0x50(%rbx), %r15
movq 0x58(%rbx), %r12
cmpq %r12, %r15
je 0x137d
movq 0x2c8d(%rip), %rbx      # 0x3fd8
leaq 0xf(%rsp), %r14
movq (%r15), %rdx
movq 0x8(%r15), %rsi
movq %rbx, %rdi
callq 0x1110
movb $0xa, 0xf(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %r14, %rsi
callq 0x1100
addq $0x10, %r15
cmpq %r12, %r15
jne 0x1350
leaq 0x10(%rsp), %rdi
callq 0x13aa
xorl %eax, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x13aa
movq %rbx, %rdi
callq 0x1140
// File: /workspace/github_cpp_makefile_star2_O1/nmmmnu[P]HM3/common/myglob.cc
// Function: MyGlob::swap(MyGlob&)
void MyGlob::swap(MyGlob &other){
	using std::swap;

	swap(globresults_,	other.globresults_	);
	swap(isOpen_,		other.isOpen_		);
	swap(data_,		other.data_		);
}

// Assembly:
movq %rsi, %rax
movq %rdi, %rdx
leaq -0x48(%rsp), %r8
movl $0x9, %ecx
movq %r8, %rdi
movq %rdx, %rsi
rep  movsq (%rsi), %es:(%rdi)
movl $0x9, %ecx
movq %rdx, %rdi
movq %rax, %rsi
rep  movsq (%rsi), %es:(%rdi)
movl $0x9, %ecx
movq %rax, %rdi
movq %r8, %rsi
rep  movsq (%rsi), %es:(%rdi)
movb 0x48(%rdx), %cl
movb 0x48(%rax), %sil
movb %sil, 0x48(%rdx)
movb %cl, 0x48(%rax)
movq 0x60(%rdx), %rcx
movups 0x50(%rax), %xmm0
movups 0x50(%rdx), %xmm1
movups %xmm0, 0x50(%rdx)
movq 0x60(%rax), %rsi
movq %rsi, 0x60(%rdx)
movups %xmm1, 0x50(%rax)
movq %rcx, 0x60(%rax)
retq
// File: /workspace/github_cpp_makefile_star2_O1/nmmmnu[P]HM3/common/myglob.cc
// Function: MyGlob::open(StringRef const&)
bool MyGlob::open(const StringRef &path) noexcept{
	if (isOpen_)
		close();


	data_.clear();

	if (open_(path.data(), globresults_) == false)
		return false;

	isOpen_ = true;



	size_t i;
	for(i = 0; i < globresults_.gl_pathc; ++i){
		const char *filename = globresults_.gl_pathv[i];

		if (checkFile_( filename ))
			data_.push_back(filename);
	}



	return i > 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x1, 0x48(%rdi)
jne 0x150f
movq %rbx, %rdi
callq 0x1040
movq 0x50(%rbx), %rax
cmpq %rax, 0x58(%rbx)
je 0x150b
movq %rax, 0x58(%rbx)
movb $0x0, 0x48(%rbx)
movq 0x50(%rbx), %rax
cmpq %rax, 0x58(%rbx)
je 0x151d
movq %rax, 0x58(%rbx)
movq 0x8(%r14), %rdi
xorl %r14d, %r14d
xorl %esi, %esi
xorl %edx, %edx
movq %rbx, %rcx
callq 0x10f0
testl %eax, %eax
jne 0x15bc
movb $0x1, 0x48(%rbx)
cmpq $0x0, (%rbx)
setne %r14b
je 0x15bc
leaq 0x50(%rbx), %r15
xorl %ebp, %ebp
leaq 0x8(%rsp), %r12
movq 0x8(%rbx), %rax
movq (%rax,%rbp,8), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x10c0
testl $0xa000, 0x20(%rsp)     # imm = 0xA000
je 0x15b4
testq %r13, %r13
je 0x157d
movq %r13, %rdi
callq 0x1080
jmp 0x1586
leaq 0xaae(%rip), %r13       # 0x2032
xorl %eax, %eax
movq %rax, 0x8(%rsp)
movq %r13, 0x10(%rsp)
movq 0x58(%rbx), %rsi
cmpq 0x60(%rbx), %rsi
je 0x15a9
movups 0x8(%rsp), %xmm0
movups %xmm0, (%rsi)
addq $0x10, 0x58(%rbx)
jmp 0x15b4
movq %r15, %rdi
movq %r12, %rdx
callq 0x1644
incq %rbp
cmpq (%rbx), %rbp
jb 0x1551
movl %r14d, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rdi
callq 0x1638
nop
// File: /workspace/github_cpp_makefile_star2_O1/nmmmnu[P]HM3/common/myglob.cc
// Function: MyGlob::close()
void MyGlob::close() noexcept{
	if (! isOpen_)
		return;

	globfree(& globresults_);
	data_.clear();

	isOpen_ = false;
}

// Assembly:
cmpb $0x1, 0x48(%rdi)
jne 0x15fc
pushq %rbx
movq %rdi, %rbx
callq 0x1040
movq 0x50(%rbx), %rax
cmpq %rax, 0x58(%rbx)
je 0x15f7
movq %rax, 0x58(%rbx)
movb $0x0, 0x48(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/apps/conf2conf/conf2conf.cpp
// Function: NegateYZ(gaps::RGBDConfiguration*)
static int
NegateYZ(RGBDConfiguration *configuration)
{
  // Start statistics
  RNTime start_time;
  start_time.Read();
  if (print_verbose) {
    printf("Negating Y and Z ...\n");
    fflush(stdout);
  }

  // Create transformation
  R3Affine transformation = R3identity_affine;
  transformation.YScale(-1);
  transformation.ZScale(-1);
  
  // Negate Y and Z in camera coordinate system
  for (int i = 0; i < configuration->NImages(); i++) {
    RGBDImage *image = configuration->Image(i);
    image->Transform(transformation);
  }

  // Print statistics
  if (print_verbose) {
    printf("  Time = %.2f seconds\n", start_time.Elapsed());
    printf("  # Images = %d\n", configuration->NImages());
    fflush(stdout);
  }

  // Return success
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x120, %rsp            # imm = 0x120
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rdi
callq 0x75c78
movq %r14, %rdi
xorl %esi, %esi
callq 0x119b0
cmpb $0x1, 0xf11b6(%rip)     # 0x106df8
jne 0x15c5f
leaq 0xa7813(%rip), %rdi     # 0xbd45e
callq 0x11910
movq 0xf0309(%rip), %rax     # 0x105f60
movq (%rax), %rdi
callq 0x11700
leaq 0xed89a(%rip), %rax     # 0x103500
addq $0x10, %rax
leaq 0x18(%rsp), %r14
movq %rax, -0x8(%r14)
leaq 0xf1826(%rip), %r15     # 0x1074a0
leaq 0x8(%r15), %rsi
movq %r14, %rdi
callq 0x48742
movl $0x88, %esi
leaq 0x10(%rsp), %rdi
addq %rsi, %rdi
addq 0xf0346(%rip), %rsi     # 0x105fe0
callq 0x48742
movq 0x108(%r15), %rax
movq %rax, 0x118(%rsp)
movsd 0xa7382(%rip), %xmm0    # 0xbd038
movq %r14, %rdi
callq 0x4994a
andb $-0x3, 0x118(%rsp)
movsd 0xa736a(%rip), %xmm0    # 0xbd038
movq %r14, %rdi
callq 0x49972
andb $-0x3, 0x118(%rsp)
cmpl $0x0, 0x14(%rbx)
jle 0x15d0c
xorl %r15d, %r15d
leaq 0x10(%rsp), %r14
movq 0x8(%rbx), %rax
movq (%rax,%r15,8), %rdi
movq (%rdi), %rax
movq %r14, %rsi
callq *0x88(%rax)
incq %r15
movslq 0x14(%rbx), %rax
cmpq %rax, %r15
jl 0x15cec
cmpb $0x0, 0xf10e5(%rip)     # 0x106df8
je 0x15d4b
movq %rsp, %rdi
callq 0x75cda
leaq 0xa75cd(%rip), %rdi     # 0xbd2f1
movb $0x1, %al
callq 0x11080
movl 0x14(%rbx), %esi
leaq 0xa75d3(%rip), %rdi     # 0xbd308
xorl %eax, %eax
callq 0x11080
movq 0xf021d(%rip), %rax     # 0x105f60
movq (%rax), %rdi
callq 0x11700
leaq 0x10(%rsp), %rdi
callq 0x46404
addq $0x120, %rsp            # imm = 0x120
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x46a8c
jmp 0x15d80
jmp 0x15d73
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x46404
movq %rbx, %rdi
callq 0x11a70
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/apps/conf2conf/conf2conf.cpp
// Function: ResetTransformations(gaps::RGBDConfiguration*)
static int
ResetTransformations(RGBDConfiguration *configuration)
{
  // Start statistics
  RNTime start_time;
  start_time.Read();
  if (print_verbose) {
    printf("Reseting transformations to identity ...\n");
    fflush(stdout);
  }

  // Reset transformations
  for (int i = 0; i < configuration->NImages(); i++) {
    RGBDImage *image = configuration->Image(i);
    image->SetCameraToWorld(R3identity_affine);
  }

  // Print statistics
  if (print_verbose) {
    printf("  Time = %.2f seconds\n", start_time.Elapsed());
    printf("  # Images = %d\n", configuration->NImages());
    fflush(stdout);
  }

  // Return success
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rdi
callq 0x75c78
movq %r14, %rdi
xorl %esi, %esi
callq 0x119b0
cmpb $0x1, 0xf1048(%rip)     # 0x106df8
jne 0x15dcd
leaq 0xa76ba(%rip), %rdi     # 0xbd473
callq 0x11910
movq 0xf019b(%rip), %rax     # 0x105f60
movq (%rax), %rdi
callq 0x11700
cmpl $0x0, 0x14(%rbx)
jle 0x15dfa
xorl %r15d, %r15d
leaq 0xf16c3(%rip), %r14     # 0x1074a0
movq 0x8(%rbx), %rax
movq (%rax,%r15,8), %rdi
movq (%rdi), %rax
movq %r14, %rsi
callq *0x68(%rax)
incq %r15
movslq 0x14(%rbx), %rax
cmpq %rax, %r15
jl 0x15ddd
cmpb $0x0, 0xf0ff7(%rip)     # 0x106df8
je 0x15e39
movq %rsp, %rdi
callq 0x75cda
leaq 0xa74df(%rip), %rdi     # 0xbd2f1
movb $0x1, %al
callq 0x11080
movl 0x14(%rbx), %esi
leaq 0xa74e5(%rip), %rdi     # 0xbd308
xorl %eax, %eax
callq 0x11080
movq 0xf012f(%rip), %rax     # 0x105f60
movq (%rax), %rdi
callq 0x11700
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/apps/conf2conf/conf2conf.cpp
// Function: Transform(gaps::RGBDConfiguration*, gaps::R4Matrix const&)
static int
Transform(RGBDConfiguration *configuration, const R4Matrix& matrix)
{
  // Start statistics
  RNTime start_time;
  start_time.Read();
  if (print_verbose) {
    printf("Transforming ...\n");
    fflush(stdout);
  }

  // Transform all images
  R3Affine transformation(matrix, 0);
  for (int i = 0; i < configuration->NImages(); i++) {
    RGBDImage *image = configuration->Image(i);
    image->Transform(transformation);
  }

  // Print statistics
  if (print_verbose) {
    printf("  Time = %.2f seconds\n", start_time.Elapsed());
    printf("  # Images = %d\n", configuration->NImages());
    printf("  Matrix =\n    %g %g %g %g\n    %g %g %g %g\n    %g %g %g %g\n    %g %g %g %g\n",
      matrix[0][0], matrix[0][1], matrix[0][2], matrix[0][3],
      matrix[1][0], matrix[1][1], matrix[1][2], matrix[1][3],
      matrix[2][0], matrix[2][1], matrix[2][2], matrix[2][3],
      matrix[3][0], matrix[3][1], matrix[3][2], matrix[3][3]);
    fflush(stdout);
  }

  // Return success
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x168, %rsp            # imm = 0x168
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x48(%rsp), %r15
movq %r15, %rdi
callq 0x75c78
movq %r15, %rdi
xorl %esi, %esi
callq 0x119b0
cmpb $0x1, 0xf0f83(%rip)     # 0x106df8
jne 0x15e92
leaq 0xa761e(%rip), %rdi     # 0xbd49c
callq 0x11910
movq 0xf00d6(%rip), %rax     # 0x105f60
movq (%rax), %rdi
callq 0x11700
leaq 0x58(%rsp), %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x463b6
cmpl $0x0, 0x14(%r14)
jle 0x15ed0
xorl %r12d, %r12d
leaq 0x58(%rsp), %r15
movq 0x8(%r14), %rax
movq (%rax,%r12,8), %rdi
movq (%rdi), %rax
movq %r15, %rsi
callq *0x88(%rax)
incq %r12
movslq 0x14(%r14), %rax
cmpq %rax, %r12
jl 0x15eb0
cmpb $0x0, 0xf0f21(%rip)     # 0x106df8
je 0x15f76
leaq 0x48(%rsp), %rdi
callq 0x75cda
leaq 0xa7403(%rip), %rdi     # 0xbd2f1
movb $0x1, %al
callq 0x11080
movl 0x14(%r14), %esi
leaq 0xa7408(%rip), %rdi     # 0xbd308
xorl %eax, %eax
callq 0x11080
movsd (%rbx), %xmm0
movsd 0x8(%rbx), %xmm1
movsd 0x10(%rbx), %xmm2
movsd 0x18(%rbx), %xmm3
movsd 0x20(%rbx), %xmm4
movsd 0x28(%rbx), %xmm5
movsd 0x30(%rbx), %xmm6
movsd 0x38(%rbx), %xmm7
movups 0x40(%rbx), %xmm8
movups 0x50(%rbx), %xmm9
movups 0x60(%rbx), %xmm10
movups 0x70(%rbx), %xmm11
movups %xmm11, 0x30(%rsp)
movups %xmm10, 0x20(%rsp)
movups %xmm9, 0x10(%rsp)
movups %xmm8, (%rsp)
leaq 0xa7472(%rip), %rdi     # 0xbd3d2
movb $0x8, %al
callq 0x11080
movq 0xefff2(%rip), %rax     # 0x105f60
movq (%rax), %rdi
callq 0x11700
leaq 0x58(%rsp), %rdi
callq 0x46404
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x15f91
movq %rax, %rbx
leaq 0x58(%rsp), %rdi
callq 0x46404
movq %rbx, %rdi
callq 0x11a70
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDTransform.cpp
// Function: gaps::RGBDTransformTextureToWorld(gaps::R2Point const&, gaps::R3Point&, gaps::RGBDSurface const*)
int RGBDTransformTextureToWorld(const R2Point& texture_position, R3Point& world_position, const RGBDSurface *surface)
{
  // Transform from position in texture coordinates to world coordinates
  R2Point surface_position;
  if (!RGBDTransformTextureToSurface(texture_position, surface_position, surface)) return 0;
  if (!RGBDTransformSurfaceToWorld(surface_position, world_position, surface)) return 0;
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x6fee4
movq (%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq *0x38(%rax)
testl %eax, %eax
je 0x1600d
movq (%r14), %rax
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq *0x48(%rax)
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setne %al
jmp 0x1600f
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDTransform.cpp
// Function: gaps::RGBDTransformTextureToCamera(gaps::R2Point const&, gaps::R3Point&, gaps::RGBDSurface const*, gaps::RGBDImage const*)
int RGBDTransformTextureToCamera(const R2Point& texture_position, R3Point& camera_position, const RGBDSurface *surface, const RGBDImage *image)
{
  // Transform from position in texture coordinates to camera coordinates
  R3Point world_position;
  if (!RGBDTransformTextureToWorld(texture_position, world_position, surface)) return 0;
  if (!RGBDTransformWorldToCamera(world_position, camera_position, image)) return 0;
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r12
leaq 0x8(%rsp), %r13
movq %r13, %rdi
callq 0x4be44
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rdx
callq 0x15fbd
testl %eax, %eax
je 0x16087
movq (%r14), %rax
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq *0xa8(%rax)
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setne %al
jmp 0x16089
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDTransform.cpp
// Function: gaps::RGBDTransformWorldToImage(gaps::R3Point const&, gaps::R2Point&, gaps::RGBDImage const*)
int RGBDTransformWorldToImage(const R3Point& world_position, R2Point& image_position, const RGBDImage *image)
{
  // Transform from position in world coordinates to image coordinates
  R3Point camera_position;
  if (!RGBDTransformWorldToCamera(world_position, camera_position, image)) return 0;
  if (!RGBDTransformCameraToImage(camera_position, image_position, image)) return 0;
  return 1;

  // Return success
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq %rsp, %r12
movq %r12, %rdi
callq 0x4be44
movq (%rbx), %rax
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq *0xa8(%rax)
testl %eax, %eax
je 0x1614e
movq %rsp, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x162a7
jmp 0x16150
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDTransform.cpp
// Function: gaps::RGBDTransformSurfaceToCamera(gaps::R2Point const&, gaps::R3Point&, gaps::RGBDSurface const*, gaps::RGBDImage const*)
int RGBDTransformSurfaceToCamera(const R2Point& surface_position, R3Point& camera_position, const RGBDSurface *surface, const RGBDImage *image)
{
  // Transform from position in surface coordinates to camera coordinates
  R3Point world_position;
  if (!RGBDTransformSurfaceToWorld(surface_position, world_position, surface)) return 0;
  if (!RGBDTransformWorldToCamera(world_position, camera_position, image)) return 0;
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r12
leaq 0x8(%rsp), %r13
movq %r13, %rdi
callq 0x4be44
movq (%r15), %rax
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq *0x48(%rax)
testl %eax, %eax
je 0x161c9
movq (%r14), %rax
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq *0xa8(%rax)
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setne %al
jmp 0x161cb
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDTransform.cpp
// Function: gaps::RGBDTransformSurfaceToImage(gaps::R2Point const&, gaps::R2Point&, gaps::RGBDSurface const*, gaps::RGBDImage const*)
int RGBDTransformSurfaceToImage(const R2Point& surface_position, R2Point& image_position, const RGBDSurface *surface, const RGBDImage *image)
{
  // Transform from position in surface coordinates to image coordinates
  R3Point world_position;
  if (!RGBDTransformSurfaceToWorld(surface_position, world_position, surface)) return 0;
  if (!RGBDTransformWorldToImage(world_position, image_position, image)) return 0;
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r12
leaq 0x8(%rsp), %r13
movq %r13, %rdi
callq 0x4be44
movq (%r15), %rax
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq *0x48(%rax)
testl %eax, %eax
je 0x16224
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x16109
jmp 0x16226
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDTransform.cpp
// Function: gaps::RGBDTransformWorldToTexture(gaps::R3Point const&, gaps::R2Point&, gaps::RGBDSurface const*)
int RGBDTransformWorldToTexture(const R3Point& world_position, R2Point& texture_position, const RGBDSurface *surface)
{
  // Transform from position in world coordinates to texture coordinates
  R2Point surface_position;
  if (!RGBDTransformWorldToSurface(world_position, surface_position, surface)) return 0;
  if (!RGBDTransformSurfaceToTexture(surface_position, texture_position, surface)) return 0;
  return 1;

  // Return success
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x8(%rsp), %r12
movq %r12, %rdi
callq 0x6fee4
movq (%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq *0x50(%rax)
testl %eax, %eax
je 0x16284
movq (%r14), %rax
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq *0x40(%rax)
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setne %al
jmp 0x16286
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDTransform.cpp
// Function: gaps::RGBDTransformCameraToImage(gaps::R3Point const&, gaps::R2Point&, gaps::RGBDImage const*)
int RGBDTransformCameraToImage(const R3Point& camera_position, R2Point& image_position, const RGBDImage *image)
{
  // Transform from position in camera coordinates to image coordinates
  if (!image->TransformCameraToImage(camera_position, image_position)) return 0;

  // Check pixel position
  int image_ix = (int) (image_position.X() + 0.5);
  if ((image_ix < 0) || (image_ix >= image->NPixels(RN_X))) return 0;
  int image_iy = (int) (image_position.Y() + 0.5);
  if ((image_iy < 0) || (image_iy >= image->NPixels(RN_Y))) return 0;

#if 0
  // Get/check point depth
  RNScalar point_depth = -camera_position[2];
  if (RNIsNegativeOrZero(point_depth)) return 0;

  // Check depth
  RNScalar image_depth = image->PixelDepth(image_ix, image_iy);
  if ((image_depth == R2_GRID_UNKNOWN_VALUE) || (image_depth == 0)) return 0;

  // If depth is not within 10% of image depth, then probably not 
  if (image_depth < 0.9 * point_depth) return 0;
  if (image_depth > 1.1 * point_depth) return 0;
#endif
  
  // Return success
  return 1;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %rsi
movq (%rdx), %rax
movq %rdx, %rdi
movq %r14, %rdx
callq *0x98(%rax)
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
je 0x16303
movsd (%r14), %xmm0
addsd 0xa6d48(%rip), %xmm0    # 0xbd020
cvttsd2si %xmm0, %ecx
testl %ecx, %ecx
js 0x16303
cmpl %ecx, 0x28(%rbx)
jle 0x16303
movsd 0x8(%r14), %xmm0
addsd 0xa6d2d(%rip), %xmm0    # 0xbd020
cvttsd2si %xmm0, %ecx
testl %ecx, %ecx
js 0x16303
xorl %eax, %eax
cmpl %ecx, 0x2c(%rbx)
setg %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDTransform.cpp
// Function: gaps::RGBDTransformCameraToTexture(gaps::R3Point const&, gaps::R2Point&, gaps::RGBDImage const*, gaps::RGBDSurface const*)
int RGBDTransformCameraToTexture(const R3Point& camera_position, R2Point& texture_position, const RGBDImage *image, const RGBDSurface *surface)
{
  // Transform from position in camera coordinates to texture coordinates
  R3Point world_position;
  if (!RGBDTransformCameraToWorld(camera_position, world_position, image)) return 0;
  if (!RGBDTransformWorldToTexture(world_position, texture_position, surface)) return 0;
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %r12
leaq 0x8(%rsp), %r13
movq %r13, %rdi
callq 0x4be44
movq (%r15), %rax
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq *0xa0(%rax)
testl %eax, %eax
je 0x16359
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x16234
jmp 0x1635b
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDTransform.cpp
// Function: gaps::RGBDTransformCameraToSurface(gaps::R3Point const&, gaps::R2Point&, gaps::RGBDImage const*, gaps::RGBDSurface const*)
int RGBDTransformCameraToSurface(const R3Point& camera_position, R2Point& surface_position, const RGBDImage *image, const RGBDSurface *surface)
{
  // Transform from position in camera coordinates to surface coordinates
  R3Point world_position;
  if (!RGBDTransformCameraToWorld(camera_position, world_position, image)) return 0;
  if (!RGBDTransformWorldToSurface(world_position, surface_position, surface)) return 0;
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r12
leaq 0x8(%rsp), %r13
movq %r13, %rdi
callq 0x4be44
movq (%r15), %rax
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq *0xa0(%rax)
testl %eax, %eax
je 0x163d9
movq (%r14), %rax
leaq 0x8(%rsp), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq *0x50(%rax)
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setne %al
jmp 0x163db
xorl %eax, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/pkgs/RGBD/RGBDTransform.cpp
// Function: gaps::RGBDTransformImageToWorld(gaps::R2Point const&, gaps::R3Point&, gaps::RGBDImage const*)
int RGBDTransformImageToWorld(const R2Point& image_position, R3Point& world_position, const RGBDImage *image)
{
  // Transform from position in image coordinates to world coordinates
  R3Point camera_position;
  if (!RGBDTransformImageToCamera(image_position, camera_position, image)) return 0;
  if (!RGBDTransformCameraToWorld(camera_position, world_position, image)) return 0;
  return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movq %rsp, %r12
movq %r12, %rdi
callq 0x4be44
movq (%r14), %rax
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq *0x90(%rax)
testl %eax, %eax
je 0x16495
movq (%r14), %rax
movq %rsp, %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq *0xa0(%rax)
movl %eax, %ecx
xorl %eax, %eax
testl %ecx, %ecx
setne %al
jmp 0x16497
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq