LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/occivink[P]pyct/pyct.cpp
// Function: decrypt(std::vector<unsigned char, std::allocator<unsigned char>>, std::array<unsigned char, 32ul> const&)
vector<u8> decrypt(vector<u8> input, const Hash& hash) {
    if (input.size() < (8 + 16 + 24))
        throw invalid_argument{"Not enough data"};
    size_t message_length = input.size() - 24 - 16;
    u8* message_data = input.data();
    u8* mac_data = message_data + message_length;
    u8* nonce_data = mac_data + 16;

    if (0 != crypto_unlock(message_data,
                           hash.data(),
                           nonce_data,
                           mac_data,
                           message_data, message_length))
        throw invalid_argument{"Couldn't decrypt, invalid password?"};

    u8* size_data = message_data + message_length - 8;
    u64 original_size = static_cast<u64>(size_data[7])       |
                        static_cast<u64>(size_data[6]) << 8  |
                        static_cast<u64>(size_data[5]) << 16 |
                        static_cast<u64>(size_data[4]) << 24 |
                        static_cast<u64>(size_data[3]) << 32 |
                        static_cast<u64>(size_data[2]) << 40 |
                        static_cast<u64>(size_data[1]) << 48 |
                        static_cast<u64>(size_data[0]) << 56;
    input.resize(original_size);
    return input;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq (%rsi), %rdi
movq 0x8(%rsi), %rax
subq %rdi, %rax
cmpq $0x2f, %rax
jbe 0xac2e
movq %rsi, %r14
leaq -0x28(%rax), %r9
leaq (%rdi,%rax), %r15
addq $-0x28, %r15
leaq -0x18(%rdi,%rax), %rax
movq %rdx, %rsi
movq %rax, %rdx
movq %r15, %rcx
movq %rdi, %r8
callq 0x970d
testl %eax, %eax
jne 0xac4c
movq -0x8(%r15), %rsi
bswapq %rsi
movq %r14, %rdi
callq 0xc238
movups (%r14), %xmm0
movups %xmm0, (%rbx)
movq 0x10(%r14), %rax
movq %rax, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movq $0x0, 0x10(%r14)
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
movl $0x10, %edi
callq 0x20f0
movq %rax, %rbx
leaq 0x34ff(%rip), %rsi      # 0xe141
movq %rax, %rdi
callq 0x23a0
jmp 0xac68
movl $0x10, %edi
callq 0x20f0
movq %rax, %rbx
leaq 0x34f1(%rip), %rsi      # 0xe151
movq %rax, %rdi
callq 0x23a0
movq 0x7361(%rip), %rsi      # 0x11fd0
movq 0x734a(%rip), %rdx      # 0x11fc0
movq %rbx, %rdi
callq 0x2360
jmp 0xac80
movq %rax, %r14
movq %rbx, %rdi
callq 0x2160
movq %r14, %rdi
callq 0x2380
// File: /workspace/github_cpp_makefile_star2_O3/occivink[P]pyct/pyct.cpp
// Function: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> read_from_fd<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>(int)
T read_from_fd(int fd) {
    T data;
    size_t old_size = 0;
    size_t new_size = 32;
    while (true) {
        data.resize(new_size);
        size_t left_to_read = new_size - old_size;
        size_t already_read = 0;
        while (left_to_read > 0) {
            auto just_read = read(fd, &data[old_size + already_read], left_to_read);
            if (just_read < 0 or (size_t)just_read > left_to_read)
                throw runtime_error{"I/O error"};
            else if (just_read == 0) {
                data.resize(old_size + already_read);
                return data;
            }
            left_to_read -= just_read;
            already_read += just_read;
        }
        old_size = new_size;
        new_size *= 2;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, 0x8(%rsp)
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movl $0x20, %r15d
xorl %r14d, %r14d
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x2080
movq %r15, 0x10(%rsp)
subq %r14, %r15
je 0xc426
xorl %r13d, %r13d
leaq (%r14,%r13), %r12
movq (%rbx), %rsi
addq %r12, %rsi
movl %ebp, %edi
movq %r15, %rdx
callq 0x22d0
testq %rax, %rax
js 0xc453
cmpq %rax, %r15
jb 0xc453
testq %rax, %rax
je 0xc434
addq %rax, %r13
subq %rax, %r15
jne 0xc3fb
movq 0x10(%rsp), %rax
movq %rax, %r14
leaq (%rax,%rax), %r15
jmp 0xc3e1
movq %rbx, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x2080
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x20f0
movq %rax, %r15
leaq 0x253f(%rip), %rsi      # 0xe9a6
movq %rax, %rdi
callq 0x20b0
movq 0x5b7a(%rip), %rsi      # 0x11ff0
movq 0x5b33(%rip), %rdx      # 0x11fb0
movq %r15, %rdi
callq 0x2360
jmp 0xc496
movq %rax, %r14
movq %r15, %rdi
callq 0x2160
jmp 0xc499
jmp 0xc496
movq %rax, %r14
movq (%rbx), %rdi
cmpq 0x8(%rsp), %rdi
je 0xc4b3
movq 0x8(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x21f0
movq %r14, %rdi
callq 0x2380
// File: /workspace/github_cpp_makefile_star2_O3/jingdao[P]PointCloudApp/main.cpp
// Function: testEigenvalue()
void testEigenvalue() {
	int n=4;
	double A[4*4] = {0.35,0.09,-0.44,0.25,
					 0.45,0.07,-0.33,-0.32,
					 -0.14,-0.54,-0.03,-0.13,
					 -0.17,0.35,0.17,0.11};
	double lambda_real[4] = {};
	double lambda_imag[4] = {};
	double v[4*4] = {};
	Normal::eigenvalue(n,A,lambda_real,lambda_imag,v);
	printf("lambda: ");
	for (int i=0;i<n;i++)
		printf("%f+%fi ",lambda_real[i],lambda_imag[i]);
	printf("\n");
	for (int i=0;i<n;i++) {
		printf("v%d: ",i);
		for (int j=0;j<n;j++) {
			if (lambda_imag[i]==0)
				printf("%f ",v[i*n+j]);
			else if (lambda_imag[i]>0)
				printf("%f+%fi ",v[i*n+j],v[(i+1)*n+j]);
			else
				printf("%f+%fi ",v[(i-1)*n+j],-v[i*n+j]);

		}
		printf("\n");
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
leaq 0x899c(%rip), %rsi      # 0xb040
leaq 0xc0(%rsp), %rax
movl $0x10, %ecx
movq %rax, %rdi
rep  movsq (%rsi), %es:(%rdi)
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rdx
movaps %xmm0, 0x10(%rdx)
movaps %xmm0, (%rdx)
movq %rsp, %rcx
movaps %xmm0, 0x10(%rcx)
movaps %xmm0, (%rcx)
leaq 0x40(%rsp), %r8
movaps %xmm0, 0x70(%r8)
movaps %xmm0, 0x60(%r8)
movaps %xmm0, 0x50(%r8)
movaps %xmm0, 0x40(%r8)
movaps %xmm0, 0x30(%r8)
movaps %xmm0, 0x20(%r8)
movaps %xmm0, 0x10(%r8)
movaps %xmm0, (%r8)
movl $0x4, %edi
movq %rax, %rsi
callq 0x9f38
leaq 0x8a70(%rip), %rdi      # 0xb180
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x2050
leaq 0x8a68(%rip), %rbx      # 0xb189
movsd 0x20(%rsp,%r14,8), %xmm0
movsd (%rsp,%r14,8), %xmm1
movq %rbx, %rdi
movb $0x2, %al
callq 0x2050
incq %r14
cmpq $0x4, %r14
jne 0x2721
movl $0xa, %edi
callq 0x2280
leaq 0x60(%rsp), %r13
leaq 0x8a3a(%rip), %rbx      # 0xb191
leaq 0x8a39(%rip), %r14      # 0xb197
leaq 0x8a24(%rip), %r15      # 0xb189
xorl %r12d, %r12d
movq %rbx, %rdi
movl %r12d, %esi
xorl %eax, %eax
callq 0x2050
movq $-0x4, %rbp
movsd (%rsp,%r12,8), %xmm0
ucomisd 0x8896(%rip), %xmm0     # 0xb020
jne 0x27a1
jp 0x27a1
movsd (%r13,%rbp,8), %xmm0
movq %r14, %rdi
movb $0x1, %al
callq 0x2050
jmp 0x27d2
jbe 0x27b3
movsd (%r13,%rbp,8), %xmm0
movsd 0x20(%r13,%rbp,8), %xmm1
jmp 0x27c8
movsd -0x20(%r13,%rbp,8), %xmm0
movsd (%r13,%rbp,8), %xmm1
xorps 0x8848(%rip), %xmm1     # 0xb010
movq %r15, %rdi
movb $0x2, %al
callq 0x2050
incq %rbp
jne 0x277c
movl $0xa, %edi
callq 0x2280
incq %r12
addq $0x20, %r13
cmpq $0x4, %r12
jne 0x2768
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jingdao[P]PointCloudApp/main.cpp
// Function: testSVD()
void testSVD() {
	int m=6,n=4,l=(m>n?n:m);
	double A[6*4] = {2.27,0.28,-0.48,1.07,-2.35,0.62,
					-1.54,-1.67,-3.09,1.22,2.93,-7.39,
					1.15,0.94,0.99,0.79,-1.45,1.03,
					-1.94,-0.78,-0.21,0.63,2.30,-2.57};
	double U[6*6] = {};
	double S[4] = {};
	double VT[4*4] = {};
	Normal::svd(m,n,A,U,S,VT);
	printf("S: ");
	for (int i=0;i<l;i++)
		printf("%f ",S[i]);
	printf("\n");
	for (int i=0;i<m;i++) {
		printf("u%d: ",i);
		for (int j=0;j<m;j++) {
			printf("%f ",U[i*m+j]);
		}
		printf("\n");
	}
	for (int i=0;i<n;i++) {
		printf("v%d: ",i);
		for (int j=0;j<n;j++) {
			printf("%f ",VT[i*n+j]);
		}
		printf("\n");
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x288, %rsp            # imm = 0x288
leaq 0x88a4(%rip), %rsi      # 0xb0c0
leaq 0xa0(%rsp), %r15
movl $0xc0, %edx
movq %r15, %rdi
callq 0x2180
leaq 0x160(%rsp), %r14
xorl %r12d, %r12d
movl $0x120, %edx            # imm = 0x120
movq %r14, %rdi
xorl %esi, %esi
callq 0x2100
xorps %xmm0, %xmm0
movq %rsp, %r8
movaps %xmm0, 0x10(%r8)
movaps %xmm0, (%r8)
leaq 0x20(%rsp), %rbx
movaps %xmm0, 0x70(%rbx)
movaps %xmm0, 0x60(%rbx)
movaps %xmm0, 0x50(%rbx)
movaps %xmm0, 0x40(%rbx)
movaps %xmm0, 0x30(%rbx)
movaps %xmm0, 0x20(%rbx)
movaps %xmm0, 0x10(%rbx)
movaps %xmm0, (%rbx)
movl $0x6, %edi
movl $0x4, %esi
movq %r15, %rdx
movq %r14, %rcx
movq %rbx, %r9
callq 0xa03e
leaq 0x88fe(%rip), %rdi      # 0xb19b
xorl %eax, %eax
callq 0x2050
leaq 0x88ec(%rip), %r15      # 0xb197
movsd (%rsp,%r12,8), %xmm0
movq %r15, %rdi
movb $0x1, %al
callq 0x2050
incq %r12
cmpq $0x4, %r12
jne 0x28ab
movl $0xa, %edi
callq 0x2280
leaq 0x88ca(%rip), %r15      # 0xb19f
leaq 0x88bb(%rip), %r12      # 0xb197
xorl %r13d, %r13d
movq %r15, %rdi
movl %r13d, %esi
xorl %eax, %eax
callq 0x2050
xorl %ebp, %ebp
movsd (%r14,%rbp,8), %xmm0
movq %r12, %rdi
movb $0x1, %al
callq 0x2050
incq %rbp
cmpq $0x6, %rbp
jne 0x28ee
movl $0xa, %edi
callq 0x2280
incq %r13
addq $0x30, %r14
cmpq $0x6, %r13
jne 0x28df
leaq 0x886c(%rip), %r14      # 0xb191
leaq 0x886b(%rip), %r15      # 0xb197
xorl %r12d, %r12d
movq %r14, %rdi
movl %r12d, %esi
xorl %eax, %eax
callq 0x2050
xorl %r13d, %r13d
movsd (%rbx,%r13,8), %xmm0
movq %r15, %rdi
movb $0x1, %al
callq 0x2050
incq %r13
cmpq $0x4, %r13
jne 0x293f
movl $0xa, %edi
callq 0x2280
incq %r12
addq $0x20, %rbx
cmpq $0x4, %r12
jne 0x292f
addq $0x288, %rsp            # imm = 0x288
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jingdao[P]PointCloudApp/main.cpp
// Function: main
int main(int argc,char* argv[]) {
	srand(time(NULL));
//	srand(0);
	numCommandLineArgs = argc;
	commandLineArgs = argv;

	if (argc >= 3)
		fileConversion(argv[1], argv[2]);

//	printf("Loaded %s (%d points)\n",f, d->numPoints);
//	std::vector<std::vector<int>> clusters;
//	d->kMeansClustering(&clusters);
//	for (size_t i=0;i<clusters.size();i++) {
//		for (size_t j=0;j<clusters[i].size();j++) {
//			printf("%d.pcd ",clusters[i][j]);
//		}
//		printf("\n");
//	}

//	p->loadDescriptor(argv[3]);

//	delete d;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
xorl %edi, %edi
callq 0x21b0
movl %eax, %edi
callq 0x21d0
movl %ebp, 0xc48b(%rip)      # 0xf23c
movq %rbx, 0xc488(%rip)      # 0xf240
cmpl $0x3, %ebp
jl 0x2dca
movq 0x8(%rbx), %rdi
movq 0x10(%rbx), %rsi
callq 0x2981
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/jingdao[P]PointCloudApp/pcd.cpp
// Function: PCD::~PCD()
PCD::~PCD() {
	if (fields) free(fields);
	if (data) free(data);
	if (float_data) free(float_data);
	if (kdtree) delete kdtree;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x48(%rdi), %rdi
testq %rdi, %rdi
je 0x34a6
callq 0x2240
movq 0x50(%rbx), %rdi
testq %rdi, %rdi
je 0x34b4
callq 0x2240
movq 0x58(%rbx), %rdi
testq %rdi, %rdi
je 0x34c2
callq 0x2240
movq 0x70(%rbx), %rbx
testq %rbx, %rbx
je 0x34e1
movq %rbx, %rdi
callq 0x85fa
movl $0x40, %esi
movq %rbx, %rdi
popq %rbx
jmp 0x2210
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/jingdao[P]PointCloudApp/pcd.cpp
// Function: PCD::expand(int)
bool PCD::expand(int size) {
	if (size < 0)
		return false;
	numPoints = size;
	if (size > capacity) {
		if (capacity == 0)
			capacity = size;
		else while (capacity < size)
			capacity *= 2;
		void* memblk  = realloc(float_data, capacity * 4 * sizeof(float));
		if (memblk) {
			float_data = (float*) memblk;
		} else {
			printf("Error: Cannot realloc %lu bytes\n",capacity * 4 * sizeof(float));
			return false;
		}
	}
	return true;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testl %esi, %esi
js 0x3507
movq %rdi, %r14
movl %esi, 0x60(%rdi)
movl 0x64(%rdi), %eax
movb $0x1, %bl
cmpl %esi, %eax
jge 0x3547
testl %eax, %eax
je 0x350b
addl %eax, %eax
cmpl %esi, %eax
jl 0x34ff
jmp 0x350d
xorl %ebx, %ebx
jmp 0x3547
movl %esi, %eax
movl %eax, 0x64(%r14)
movq 0x58(%r14), %rdi
shll $0x2, %eax
movslq %eax, %rsi
shlq $0x2, %rsi
callq 0x2380
testq %rax, %rax
je 0x352f
movq %rax, 0x58(%r14)
jmp 0x3547
movslq 0x64(%r14), %rsi
shlq $0x4, %rsi
leaq 0x7ff1(%rip), %rdi      # 0xb52f
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x2050
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/jingdao[P]PointCloudApp/pcd.cpp
// Function: PCD::drawLine(float, float, float, float, float, float, float, float)
void PCD::drawLine(float x1,float y1,float z1,float x2,float y2,float z2,float rgb,float interval) {
	float distance = 0;
	int offset = numPoints * 4,numSteps;
	distance += (x2-x1) * (x2-x1);
	distance += (y2-y1) * (y2-y1);
	distance += (z2-z1) * (z2-z1);
	numSteps = (int) (distance/interval/interval);
	expand(numPoints + numSteps - 1);
	float* data = float_data + offset;

	float dx = (x2-x1) / numSteps;
	float dy = (y2-y1) / numSteps;
	float dz = (z2-z1) / numSteps;
	float x = x1+dx, y = y1+dy, z = z1+dz;
	for (int i=1;i<numSteps;i++) {
		*data++ = x;
		*data++ = y;
		*data++ = z;
		*data++ = rgb;
		x += dx;
		y += dy;
		z += dz;
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movss %xmm6, 0xc(%rsp)
movss %xmm2, 0x4(%rsp)
movq %rdi, %rbx
movslq 0x60(%rdi), %r14
unpcklps %xmm4, %xmm3            # xmm3 = xmm3[0],xmm4[0],xmm3[1],xmm4[1]
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movaps %xmm0, 0x30(%rsp)
subps %xmm0, %xmm3
movaps %xmm3, 0x20(%rsp)
movaps %xmm3, %xmm0
mulss %xmm3, %xmm0
xorps %xmm1, %xmm1
addss %xmm0, %xmm1
movaps %xmm3, %xmm0
shufps $0x55, %xmm3, %xmm0     # xmm0 = xmm0[1,1],xmm3[1,1]
mulss %xmm0, %xmm0
addss %xmm1, %xmm0
subss %xmm2, %xmm5
movss %xmm5, 0x8(%rsp)
movaps %xmm5, %xmm1
mulss %xmm5, %xmm1
addss %xmm0, %xmm1
divss %xmm7, %xmm1
divss %xmm7, %xmm1
movaps %xmm1, 0x10(%rsp)
cvttss2si %xmm1, %r15d
leal (%r15,%r14), %esi
decl %esi
callq 0x34e4
movaps 0x30(%rsp), %xmm5
movss 0x4(%rsp), %xmm4
movaps 0x20(%rsp), %xmm3
movss 0x8(%rsp), %xmm2
movss 0xc(%rsp), %xmm1
cmpl $0x2, %r15d
jl 0x3631
cvttps2dq 0x10(%rsp), %xmm0
cvtdq2ps %xmm0, %xmm0
divss %xmm0, %xmm2
shufps $0x0, %xmm0, %xmm0      # xmm0 = xmm0[0,0,0,0]
divps %xmm0, %xmm3
shlq $0x4, %r14
addq 0x58(%rbx), %r14
decl %r15d
addss %xmm2, %xmm4
addps %xmm3, %xmm5
movlps %xmm5, (%r14)
movss %xmm4, 0x8(%r14)
movss %xmm1, 0xc(%r14)
addq $0x10, %r14
decl %r15d
jne 0x3611
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/jingdao[P]PointCloudApp/pcd.cpp
// Function: PCD::drawAxis(float, float, float, float*, float, float)
void PCD::drawAxis(float x,float y,float z,float* R,float length,float interval) {
	float I[9] = {1,0,0,0,1,0,0,0,1}; //identity matrix
	float *rotation = R ? R : I;
	float rgb[3] = {255<<16, 255<<8, 255};

	for (int i=0;i<3;i++) { // three axes
		float x2 = x + rotation[i] * length;
		float y2 = y + rotation[i + 3] * length;
		float z2 = z + rotation[i + 6] * length;
		drawLine(x,y,z,x2,y2,z2,rgb[i],interval);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movss %xmm4, 0x1c(%rsp)
movss %xmm3, 0x18(%rsp)
movq %rsi, %rbx
movss %xmm2, 0x14(%rsp)
movss %xmm1, 0x10(%rsp)
movss %xmm0, 0xc(%rsp)
movq %rdi, %r14
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rax
movaps %xmm0, (%rax)
movaps %xmm0, 0x10(%rax)
movl $0x3f800000, %ecx       # imm = 0x3F800000
movl %ecx, (%rax)
movl %ecx, 0x10(%rax)
movl %ecx, 0x20(%rax)
testq %rsi, %rsi
cmoveq %rax, %rbx
xorl %r15d, %r15d
leaq 0x8338(%rip), %r12      # 0xb9d0
movss (%rbx,%r15), %xmm3
movss 0x18(%rsp), %xmm2
mulss %xmm2, %xmm3
movss 0xc(%rsp), %xmm0
addss %xmm0, %xmm3
movss 0xc(%rbx,%r15), %xmm4
mulss %xmm2, %xmm4
movss 0x10(%rsp), %xmm1
addss %xmm1, %xmm4
movss 0x18(%rbx,%r15), %xmm5
mulss %xmm2, %xmm5
movss 0x14(%rsp), %xmm2
addss %xmm2, %xmm5
movss (%r15,%r12), %xmm6
movq %r14, %rdi
movss 0x1c(%rsp), %xmm7
callq 0x3552
addq $0x4, %r15
cmpq $0xc, %r15
jne 0x3698
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/jingdao[P]PointCloudApp/pcd.cpp
// Function: PCD::colormap(float)
float PCD::colormap(float f) {
	unsigned char r=0,g=0,b=0;
	if (f<=0) {
		b = 128;
	} else if (f <= 0.25) {
		g = (unsigned char) f / 0.25 * 255;
		b = (unsigned char) 128 * (1 - f / 0.25);
	} else if (f <= 0.5) {
		g = 255;
		r = (unsigned char) (f - 0.25) / 0.25 * 255;
	} else if (f <= 0.75) {
		r = 255;
		g = (unsigned char) 255 + (0.5 - f) / 0.25 * 127;
	} else if (f <= 1) {
		r = 255;
		g = (unsigned char) 128 * (1 - f) / 0.25;
	} else {
		r = 255;
	}
	int res = (r<<16)|(g<<8)|b;
	return (float) res;
}

// Assembly:
xorl %eax, %eax
xorps %xmm1, %xmm1
ucomiss %xmm0, %xmm1
jae 0x3989
xorps %xmm1, %xmm1
cvtss2sd %xmm0, %xmm1
movss 0x7b6f(%rip), %xmm2     # 0xb4a0
ucomiss %xmm0, %xmm2
jae 0x3992
movss 0x7b66(%rip), %xmm2     # 0xb4a4
ucomiss %xmm0, %xmm2
jae 0x39bc
movss 0x7b5d(%rip), %xmm2     # 0xb4a8
ucomiss %xmm0, %xmm2
jae 0x39d9
movl $0xff0000, %eax         # imm = 0xFF0000
xorl %ecx, %ecx
movss 0x7b49(%rip), %xmm1     # 0xb4ac
ucomiss %xmm0, %xmm1
jb 0x398e
subss %xmm0, %xmm1
mulss 0x7b3c(%rip), %xmm1     # 0xb4b0
xorps %xmm0, %xmm0
cvtss2sd %xmm1, %xmm0
mulsd 0x78fd(%rip), %xmm0     # 0xb280
cvttsd2si %xmm0, %edx
jmp 0x3a08
movl $0x80, %ecx
xorl %edx, %edx
jmp 0x3a08
cvttss2si %xmm0, %edx
shlb $0x2, %dl
mulsd 0x7967(%rip), %xmm1     # 0xb308
addsd 0x789f(%rip), %xmm1     # 0xb248
mulsd 0x795f(%rip), %xmm1     # 0xb310
negb %dl
cvttsd2si %xmm1, %ecx
movzbl %cl, %ecx
jmp 0x3a08
addsd 0x7954(%rip), %xmm1     # 0xb318
cvttsd2si %xmm1, %eax
shlb $0x2, %al
negb %al
movzbl %al, %eax
shll $0x10, %eax
xorl %ecx, %ecx
movb $-0x1, %dl
jmp 0x3a08
movsd 0x78ff(%rip), %xmm0     # 0xb2e0
subsd %xmm1, %xmm0
mulsd 0x7893(%rip), %xmm0     # 0xb280
mulsd 0x792b(%rip), %xmm0     # 0xb320
addsd 0x792b(%rip), %xmm0     # 0xb328
cvttsd2si %xmm0, %edx
movl $0xff0000, %eax         # imm = 0xFF0000
xorl %ecx, %ecx
orl %eax, %ecx
movzbl %dl, %eax
shll $0x8, %eax
orl %ecx, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O3/jingdao[P]PointCloudApp/pcd.cpp
// Function: PCD::writeToPCD(char const*)
void PCD::writeToPCD(const char* filename) {
	if (!filename)
		return;
	FILE* f = fopen(filename, "w");
	if (!f) {
		printf("Cannot write to file: %s\n", filename);
		return;
	}
	fprintf(f,"# .PCD v0.7 - Point Cloud Data file format\n"
	"VERSION 0.7\n"
	"FIELDS x y z rgb\n"
	"SIZE 4 4 4 4\n"
	"TYPE F F F I\n"
	"COUNT 1 1 1 1\n"
	"WIDTH %d\n"
	"HEIGHT 1\n"
	"VIEWPOINT 0 0 0 1 0 0 0\n"
	"POINTS %d\n"
	"DATA ascii\n",numPoints,numPoints);
	int k=0;
	float x,y,z,rgb;
	for (int i=0;i<numPoints;i++) {
		x=float_data[k++];
		y=float_data[k++];
		z=float_data[k++];
		rgb=float_data[k++];
//		fprintf(f,"%f %f %f %f\n",x,y,z,rgb);
		fprintf(f,"%f %f %f %d\n",x,y,z,(int)rgb);
	}
	fclose(f);
	printf("Wrote %d points to %s\n",numPoints,filename);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x3ae8
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x7b1e(%rip), %rsi      # 0xb559
movq %rbx, %rdi
callq 0x2230
testq %rax, %rax
je 0x3af7
movq %rax, %r15
movl 0x60(%r14), %ecx
leaq 0x7b1b(%rip), %rsi      # 0xb575
xorl %ebp, %ebp
movq %rax, %rdi
movl %ecx, %edx
xorl %eax, %eax
callq 0x22a0
cmpl $0x0, 0x60(%r14)
jle 0x3abd
movl $0xc, %r13d
leaq 0x7ba9(%rip), %r12      # 0xb625
movq 0x58(%r14), %rax
xorps %xmm0, %xmm0
cvtss2sd -0xc(%rax,%r13), %xmm0
xorps %xmm1, %xmm1
cvtss2sd -0x8(%rax,%r13), %xmm1
xorps %xmm2, %xmm2
cvtss2sd -0x4(%rax,%r13), %xmm2
cvttss2si (%rax,%r13), %edx
movq %r15, %rdi
movq %r12, %rsi
movb $0x3, %al
callq 0x22a0
incl %ebp
addq $0x10, %r13
cmpl 0x60(%r14), %ebp
jl 0x3a7c
movq %r15, %rdi
callq 0x21f0
movl 0x60(%r14), %esi
leaq 0x7b62(%rip), %rdi      # 0xb632
movq %rbx, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2050
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7a5d(%rip), %rdi      # 0xb55b
movq %rbx, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2050
// File: /workspace/github_cpp_makefile_star2_O3/jingdao[P]PointCloudApp/pcd.cpp
// Function: PCD::writeToPLY(char const*)
void PCD::writeToPLY(const char* filename) {
	if (!filename)
		return;
	FILE* f = fopen(filename, "w");
	if (!f) {
		printf("Cannot write to file: %s\n", filename);
		return;
	}
	fprintf(f,"ply\n"
	"format ascii 1.0\n"
	"element face 0\n"
	"property list uchar int vertex_indices\n"
	"element vertex %d\n"
	"property float x\n"
	"property float y\n"
	"property float z\n"
	"property uchar diffuse_red\n"
	"property uchar diffuse_green\n"
	"property uchar diffuse_blue\n"
	"end_header\n",numPoints);
	int k=0;
	float x,y,z;
	int rgb;
	for (int i=0;i<numPoints;i++) {
		x=float_data[k++];
		y=float_data[k++];
		z=float_data[k++];
		rgb=(int)float_data[k++];
		fprintf(f,"%f %f %f %d %d %d\n",x,y,z,(rgb>>16)&0xff,(rgb>>8)&0xff,rgb&0xff);
	}
	fclose(f);
	printf("Wrote %d points to %s\n",numPoints,filename);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x3bff
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x7a22(%rip), %rsi      # 0xb559
movq %rbx, %rdi
callq 0x2230
testq %rax, %rax
je 0x3c0e
movq %rax, %r15
movq %rbx, (%rsp)
movl 0x60(%r14), %edx
leaq 0x7aef(%rip), %rsi      # 0xb649
xorl %ebp, %ebp
movq %rax, %rdi
xorl %eax, %eax
callq 0x22a0
cmpl $0x0, 0x60(%r14)
jle 0x3bd3
movl $0xc, %r13d
movl $0xff, %ebx
leaq 0x7bba(%rip), %r12      # 0xb739
movq 0x58(%r14), %rax
cvttss2si (%rax,%r13), %r8d
xorps %xmm0, %xmm0
cvtss2sd -0xc(%rax,%r13), %xmm0
xorps %xmm1, %xmm1
cvtss2sd -0x8(%rax,%r13), %xmm1
xorps %xmm2, %xmm2
cvtss2sd -0x4(%rax,%r13), %xmm2
movl %r8d, %edx
shrl $0x10, %edx
andl %ebx, %edx
movl %r8d, %ecx
shrl $0x8, %ecx
andl %ebx, %ecx
andl %ebx, %r8d
movq %r15, %rdi
movq %r12, %rsi
movb $0x3, %al
callq 0x22a0
incl %ebp
addq $0x10, %r13
cmpl 0x60(%r14), %ebp
jl 0x3b7f
movq %r15, %rdi
callq 0x21f0
movl 0x60(%r14), %esi
leaq 0x7a4c(%rip), %rdi      # 0xb632
movq (%rsp), %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2050
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7946(%rip), %rdi      # 0xb55b
movq %rbx, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2050
nop
// File: /workspace/github_cpp_makefile_star2_O3/jingdao[P]PointCloudApp/pcd.cpp
// Function: PCD::writeClustersToPCD(std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>>*, char const*)
void PCD::writeClustersToPCD(std::vector<std::vector<int>> *indices,const char* dir) {
	char buffer[256];
	for (size_t i=0;i<indices->size();i++) {
		snprintf(buffer,256,"%s/%lu-cloud.pcd",dir,i);
		std::vector<int> currentIndices = (*indices)[i];
		PCD* subcloud = extractIndices(&currentIndices);
		subcloud->writeToPCD(buffer);
		subcloud->writeToOBJ(dir,i);
		delete subcloud;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rdi, (%rsp)
movq 0x8(%rsi), %rax
cmpq (%rsi), %rax
je 0x3d0d
movq %rdx, %rbx
movq %rsi, %r14
leaq 0x20(%rsp), %rbp
xorl %r13d, %r13d
xorl %r12d, %r12d
movl $0x100, %esi            # imm = 0x100
movq %rbp, %rdi
leaq 0x7adc(%rip), %rdx      # 0xb74c
movq %rbx, %rcx
movq %r12, %r8
xorl %eax, %eax
callq 0x2340
movq (%r14), %rsi
addq %r13, %rsi
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x7bc4
movq (%rsp), %rdi
movq %r15, %rsi
callq 0x3d42
movq %rax, %r15
movq %rax, %rdi
movq %rbp, %rsi
callq 0x3a1a
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x3e4c
movq %r15, %rdi
callq 0x3494
movl $0x78, %esi
movq %r15, %rdi
callq 0x2210
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3ce4
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
incq %r12
movq 0x8(%r14), %rax
subq (%r14), %rax
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
addq $0x18, %r13
cmpq %rax, %r12
jb 0x3c61
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3d39
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
movq %rbx, %rdi
callq 0x23a0
nop
// File: /workspace/github_cpp_makefile_star2_O3/jingdao[P]PointCloudApp/pcd.cpp
// Function: PCD::translate(float, float, float)
void PCD::translate(float x, float y, float z) {
	for (int i=0;i<numPoints;i++) {
		float_data[i * 4] += x;
		float_data[i * 4 + 1] += y;
		float_data[i * 4 + 2] += z;
	}
}

// Assembly:
movslq 0x60(%rdi), %rax
testq %rax, %rax
jle 0x5371
movq 0x58(%rdi), %rcx
unpcklps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
shlq $0x4, %rax
xorl %edx, %edx
movsd (%rcx,%rdx), %xmm1
addps %xmm0, %xmm1
movlps %xmm1, (%rcx,%rdx)
movss 0x8(%rcx,%rdx), %xmm1
addss %xmm2, %xmm1
movss %xmm1, 0x8(%rcx,%rdx)
addq $0x10, %rdx
cmpq %rdx, %rax
jne 0x534c
retq
// File: /workspace/github_cpp_makefile_star2_O3/jingdao[P]PointCloudApp/pcd.cpp
// Function: PCD::getCentroid(std::vector<int, std::allocator<int>>*)
PCD::Quaternion PCD::getCentroid(std::vector<int> *indices) {
	float sumX=0, sumY=0, sumZ=0;
	if (indices) {
		for (size_t i=0;i<indices->size();i++) {
			sumX += float_data[(*indices)[i] * 4];
			sumY += float_data[(*indices)[i] * 4 + 1];
			sumZ += float_data[(*indices)[i] * 4 + 2];
		}
	} else {
		for (int i=0;i<numPoints;i++) {
			sumX += float_data[i * 4];
			sumY += float_data[i * 4 + 1];
			sumZ += float_data[i * 4 + 2];
		}
	}
	Quaternion q = {0, sumX / numPoints, sumY / numPoints, sumZ / numPoints};
	return q;
}

// Assembly:
testq %rsi, %rsi
je 0x64a0
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
subq %rax, %rcx
je 0x64d2
sarq $0x2, %rcx
cmpq $0x1, %rcx
adcq $0x0, %rcx
movq 0x58(%rdi), %rdx
xorps %xmm1, %xmm1
xorps %xmm0, %xmm0
xorl %esi, %esi
movslq (%rax,%rsi,4), %r8
leaq (,%r8,4), %r9
shlq $0x4, %r8
addss (%rdx,%r8), %xmm0
incl %r9d
movslq %r9d, %r8
movsd (%rdx,%r8,4), %xmm2
addps %xmm2, %xmm1
incq %rsi
cmpq %rsi, %rcx
jne 0x6471
jmp 0x64d8
movslq 0x60(%rdi), %rax
testq %rax, %rax
jle 0x64d2
movq 0x58(%rdi), %rcx
shlq $0x4, %rax
xorps %xmm1, %xmm1
xorps %xmm0, %xmm0
xorl %edx, %edx
addss (%rcx,%rdx), %xmm0
movsd 0x4(%rcx,%rdx), %xmm2
addps %xmm2, %xmm1
addq $0x10, %rdx
cmpq %rdx, %rax
jne 0x64b9
jmp 0x64d8
xorps %xmm1, %xmm1
xorps %xmm0, %xmm0
xorps %xmm2, %xmm2
cvtsi2ssl 0x60(%rdi), %xmm2
divss %xmm2, %xmm0
shufps $0x0, %xmm2, %xmm2      # xmm2 = xmm2[0,0,0,0]
divps %xmm2, %xmm1
movq %xmm0, %xmm0            # xmm0 = xmm0[0],zero
xorps %xmm2, %xmm2
shufps $0xe2, %xmm2, %xmm0     # xmm0 = xmm0[2,0],xmm2[2,3]
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/jingdao[P]PointCloudApp/pcd.cpp
// Function: closestBSearch(void*, void*, int, int, int (*)(void const*, void const*), bool)
void* closestBSearch(void* key,void* base,int num,int size,int (*compar)(const void*,const void*),bool lowerOrUpper) {
	char* A = (char*) base;
	int l = 0, h = num-1, mid=(l+h)/2, diff;
	if (lowerOrUpper) { //lower
		while (l < h) {
			diff = compar(key,A + mid * size);
			if (diff > 0)
				l = mid + 1;
			else if (diff <= 0)
				h = mid;
			mid = (l + h) / 2;
		}
	} else { //upper
		while (l < h - 1) {
			diff = compar(key,A + mid * size);
			if (diff >= 0)
				l = mid;
			else if (diff < 0)
				h = mid - 1;
			mid = (l + h) / 2;
		}
		if (l == h - 1) //edge case
			if (compar(key, A + h * size) >= 0)
				mid++;
	}
	return A + mid * size;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movl %ecx, 0x4(%rsp)
movq %rsi, %rbx
movq %rdi, %r15
leal -0x1(%rdx), %r13d
movl %r13d, %eax
shrl $0x1f, %eax
leal (%rdx,%rax), %r12d
decl %r12d
sarl %r12d
testl %r9d, %r9d
je 0x735c
cmpl $0x2, %edx
jl 0x73c5
xorl %ebp, %ebp
movl %r12d, %eax
imull 0x4(%rsp), %eax
movslq %eax, %rsi
addq %rbx, %rsi
movq %r15, %rdi
callq *%r14
testl %eax, %eax
jg 0x733d
movl %r12d, %r13d
jmp 0x7343
incl %r12d
movl %r12d, %ebp
leal (%rbp,%r13), %eax
movl %eax, %r12d
shrl $0x1f, %r12d
addl %eax, %r12d
sarl %r12d
cmpl %r13d, %ebp
jl 0x7320
jmp 0x73c5
cmpl $0x3, %edx
jl 0x73a2
xorl %ebp, %ebp
movl %r12d, %eax
imull 0x4(%rsp), %eax
movslq %eax, %rsi
addq %rbx, %rsi
movq %r15, %rdi
callq *%r14
testl %eax, %eax
jns 0x7383
decl %r12d
movl %r12d, %r13d
jmp 0x7386
movl %r12d, %ebp
leal (%rbp,%r13), %eax
movl %eax, %r12d
shrl $0x1f, %r12d
addl %eax, %r12d
sarl %r12d
leal -0x1(%r13), %edx
cmpl %edx, %ebp
jl 0x7363
jmp 0x73a7
addl $-0x2, %edx
xorl %ebp, %ebp
cmpl %edx, %ebp
jne 0x73c5
imull 0x4(%rsp), %r13d
movslq %r13d, %rsi
addq %rbx, %rsi
movq %r15, %rdi
callq *%r14
notl %eax
shrl $0x1f, %eax
addl %eax, %r12d
imull 0x4(%rsp), %r12d
movslq %r12d, %rax
addq %rax, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/jingdao[P]PointCloudApp/kdtree.cpp
// Function: KdTree::buildKdTreeNode(int*, int, int)
KdTree::KdTreeNode* KdTree::buildKdTreeNode(int* pointList, int n, int depth) {
	if (depth > kdtreeDepth)
		kdtreeDepth = depth;
	if (n == 1) //only one point
		return kdtreeLeaves + *pointList; 
	int dimension = depth % 3;

	//find median element
	findMedian(pointList,n,n/2,dimension); //partitions around median
	int medianIndex = n / 2;
	int median = pointList[medianIndex];
	float medianValue = float_data[median * 4 + dimension];
	KdTreeNode* currentNode = (KdTreeNode*) calloc(1,sizeof(KdTreeNode));
	currentNode->value = medianValue;
	kdtreeBranches.push_back(currentNode);

	//partition around median
	int leftSize = medianIndex, *leftPoints = pointList;
	int rightSize = n - leftSize, *rightPoints = pointList + leftSize;
//	printf("n %d i,j %d %d left %d right %d median %d\n",n,i,j,leftSize,rightSize,medianIndex);

	//get left and right children
	if (leftSize > 0)
		currentNode->left = buildKdTreeNode(leftPoints,leftSize,depth+1);
	if (rightSize > 0)
		currentNode->right = buildKdTreeNode(rightPoints,rightSize,depth+1);

//	printf("depth %d left %d right %d median %d %f\n",depth,leftSize,rightSize,medianIndex,medianValue);
	return currentNode;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %ecx, %r14d
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
cmpl %ecx, 0x28(%rdi)
jge 0x84de
movl %r14d, 0x28(%rbx)
cmpl $0x1, %ebp
jne 0x84f6
movslq (%r15), %rax
leaq (%rax,%rax,2), %rax
shlq $0x3, %rax
addq (%rbx), %rax
jmp 0x85eb
movslq %r14d, %rax
imulq $0x55555556, %rax, %rax # imm = 0x55555556
movq %rax, %rcx
shrq $0x3f, %rcx
shrq $0x20, %rax
addl %ecx, %eax
leal (%rax,%rax,2), %eax
movl %r14d, %r13d
subl %eax, %r13d
movl %ebp, %r12d
shrl $0x1f, %r12d
addl %ebp, %r12d
sarl %r12d
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %edx
movl %r12d, %ecx
movl %r13d, %r8d
callq 0x865c
movslq %r12d, %rax
movq %rax, 0x10(%rsp)
movslq (%r15,%rax,4), %rax
movq 0x30(%rbx), %rcx
movslq %r13d, %rdx
leaq (%rdx,%rax,4), %rax
movss (%rcx,%rax,4), %xmm0
movss %xmm0, 0xc(%rsp)
movl $0x1, %edi
movl $0x18, %esi
callq 0x2120
movq %rax, (%rsp)
movss 0xc(%rsp), %xmm0
movss %xmm0, 0x4(%rax)
movq 0x10(%rbx), %rsi
cmpq 0x18(%rbx), %rsi
je 0x858a
movq %rax, (%rsi)
addq $0x8, 0x10(%rbx)
jmp 0x8596
leaq 0x8(%rbx), %rdi
movq %rsp, %rdx
callq 0x8c14
movl %ebp, %r13d
subl %r12d, %r13d
cmpl $0x2, %ebp
jl 0x85bb
leal 0x1(%r14), %ecx
movq %rbx, %rdi
movq %r15, %rsi
movl %r12d, %edx
callq 0x84bc
movq (%rsp), %rcx
movq %rax, 0x8(%rcx)
testl %r13d, %r13d
jle 0x85e7
movq 0x10(%rsp), %rax
leaq (%r15,%rax,4), %rsi
incl %r14d
movq %rbx, %rdi
movl %r13d, %edx
movl %r14d, %ecx
callq 0x84bc
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x10(%rax)
jmp 0x85eb
movq (%rsp), %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jingdao[P]PointCloudApp/kdtree.cpp
// Function: KdTree::findMedian(int*, int, int, int)
void KdTree::findMedian(int* pointList, int n, int target, int dimension) {
	if (n < 2) return;
	int pivot_index = rand() % n;
	int pivot = pointList[pivot_index];
	float pivotValue = float_data[pivot * 4 + dimension];
	pointList[pivot_index] = pointList[n-1];
	int i=-1,j=-1,tmp;
	do {
		j++;
		if (float_data[pointList[j] * 4 + dimension] < pivotValue || 
			(float_data[pointList[j] * 4 + dimension] == pivotValue && rand()%2 == 0)) {
			i++;
			tmp = pointList[i];
			pointList[i] = pointList[j];
			pointList[j] = tmp;
		}
	} while (j < n - 2);
	i++;
	pointList[n-1] = pointList[i];
	pointList[i] = pivot;
	if (i == target) return;
	else if (i > target) findMedian(pointList, i , target, dimension);
	else findMedian(pointList + i + 1, n - i - 1, target - i - 1, dimension);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %ebx
movl %edx, %r12d
movq %rsi, %r14
movq %rdi, %r15
movl %ecx, 0xc(%rsp)
cmpl $0x2, %r12d
jl 0x877d
callq 0x2080
cltd
idivl %r12d
movslq %edx, %rax
movl (%r14,%rax,4), %edx
movq 0x30(%r15), %rcx
movq %rdx, 0x20(%rsp)
leal (%rbx,%rdx,4), %edx
movslq %edx, %rdx
movss (%rcx,%rdx,4), %xmm1
movl %r12d, %ecx
movq %rcx, 0x18(%rsp)
movl -0x4(%r14,%rcx,4), %ecx
movl %ecx, (%r14,%rax,4)
movl %r12d, %eax
addl $-0x2, %eax
movq %rax, 0x10(%rsp)
leaq 0x1(%rax), %r12
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
xorl %r13d, %r13d
movss %xmm1, 0x8(%rsp)
movq 0x30(%r15), %rcx
movl (%r14,%r13,4), %eax
leal (%rbx,%rax,4), %edx
movslq %edx, %rdx
movss (%rcx,%rdx,4), %xmm0
ucomiss %xmm0, %xmm1
ja 0x8708
ucomiss %xmm1, %xmm0
jne 0x871b
jp 0x871b
callq 0x2080
testb $0x1, %al
jne 0x8725
movl (%r14,%r13,4), %eax
movss 0x8(%rsp), %xmm1
movslq %ebp, %rcx
incl %ebp
movl 0x4(%r14,%rcx,4), %edx
movl %eax, 0x4(%r14,%rcx,4)
movl %edx, (%r14,%r13,4)
incq %r13
cmpq %r13, %r12
jne 0x86d6
jmp 0x872d
movss 0x8(%rsp), %xmm1
jmp 0x871b
movslq %ebp, %rax
leal 0x1(%rax), %r12d
movl 0x4(%r14,%rax,4), %ecx
movq 0x18(%rsp), %rdx
movl %ecx, -0x4(%r14,%rdx,4)
movq 0x20(%rsp), %rcx
movl %ecx, 0x4(%r14,%rax,4)
movl 0xc(%rsp), %ecx
cmpl %ecx, %r12d
je 0x877d
cmpl %ecx, %ebp
jge 0x867a
incq %rax
leaq (%r14,%rax,4), %r14
addq $0x4, %r14
movq 0x10(%rsp), %rax
subl %ebp, %eax
subl %ebp, %ecx
addl $-0x2, %ecx
movl %eax, %r12d
jmp 0x8676
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/jingdao[P]PointCloudApp/kdtree.cpp
// Function: KdTree::getBoundingBox()
KdTree::Cube KdTree::getBoundingBox() {
	float minX=float_data[0],maxX=float_data[0];
	float minY=float_data[1],maxY=float_data[1];
	float minZ=float_data[2],maxZ=float_data[2];
	for (int i=1;i<cloud->numPoints;i++) {
		if (float_data[i * 4] < minX) minX = float_data[i * 4];
		else if (float_data[i * 4] > maxX) maxX = float_data[i * 4];
		if (float_data[i * 4 + 1] < minY) minY = float_data[i * 4 + 1];
		else if (float_data[i * 4 + 1] > maxY) maxY = float_data[i * 4 + 1];
		if (float_data[i * 4 + 2] < minZ) minZ = float_data[i * 4 + 2];
		else if (float_data[i * 4 + 2] > maxZ) maxZ = float_data[i * 4 + 2];
	}
	Cube res = {minX, minY, minZ, maxX, maxY, maxZ};
	return res;
}

// Assembly:
movq %rdi, %rax
movq 0x30(%rsi), %rcx
movq 0x38(%rsi), %rdx
movss (%rcx), %xmm0
movss 0x4(%rcx), %xmm1
movss 0x8(%rcx), %xmm5
movslq 0x60(%rdx), %rdx
cmpq $0x2, %rdx
jl 0x889e
shlq $0x4, %rdx
addq $-0x10, %rdx
xorl %esi, %esi
movaps %xmm5, %xmm2
movaps %xmm1, %xmm3
movaps %xmm0, %xmm4
movss 0x10(%rcx,%rsi), %xmm6
ucomiss %xmm6, %xmm4
jbe 0x8858
movaps %xmm6, %xmm4
jmp 0x8860
ucomiss %xmm0, %xmm6
jbe 0x8860
movaps %xmm6, %xmm0
movss 0x14(%rcx,%rsi), %xmm6
ucomiss %xmm6, %xmm3
jbe 0x8870
movaps %xmm6, %xmm3
jmp 0x8878
ucomiss %xmm1, %xmm6
jbe 0x8878
movaps %xmm6, %xmm1
movss 0x18(%rcx,%rsi), %xmm6
ucomiss %xmm6, %xmm2
jbe 0x8888
movaps %xmm6, %xmm2
jmp 0x888d
ucomiss %xmm5, %xmm6
ja 0x8890
movaps %xmm5, %xmm6
addq $0x10, %rsi
movaps %xmm6, %xmm5
cmpq %rsi, %rdx
jne 0x8848
jmp 0x88aa
movaps %xmm0, %xmm4
movaps %xmm1, %xmm3
movaps %xmm5, %xmm2
movaps %xmm5, %xmm6
movss %xmm4, (%rax)
movss %xmm3, 0x4(%rax)
movss %xmm2, 0x8(%rax)
movss %xmm0, 0xc(%rax)
movss %xmm1, 0x10(%rax)
movss %xmm6, 0x14(%rax)
retq
// File: /workspace/github_cpp_makefile_star2_O3/jingdao[P]PointCloudApp/kdtree.cpp
// Function: KdTree::getIndexFromSubTree(KdTree::KdTreeNode*, std::vector<int, std::allocator<int>>*)
void KdTree::getIndexFromSubTree(KdTreeNode* node, std::vector<int> *indices) {
	if (!node) return;
	if (node->isLeaf)
		indices->push_back(node->index);
	else {
		getIndexFromSubTree(node->left,indices);
		getIndexFromSubTree(node->right,indices);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rsi, %rsi
je 0x8bfe
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
cmpb $0x1, (%r14)
je 0x8be3
movq 0x8(%r14), %rsi
movq %r15, %rdi
movq %rbx, %rdx
callq 0x8bb0
movq 0x10(%r14), %r14
testq %r14, %r14
jne 0x8bc3
jmp 0x8bfe
addq $0x4, %r14
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x8c04
movl (%r14), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
movq %r14, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x8112
// File: /workspace/github_cpp_makefile_star2_O3/jingdao[P]PointCloudApp/descriptor.cpp
// Function: Descriptor::Descriptor(char const*)
Descriptor::Descriptor(const char* filename) {
	FILE* f = fopen(filename,"r");
	if (!f) {
		printf("File not found: %s\n", filename);
		return;
	}
	char buf[256];
	while (fgets(buf, 256, f)) {
		if (sscanf(buf, "POINTS %d", &numPoints) == 1) {
		} else if (sscanf(buf,"COUNT %d",&dimension)==1) {
		} else if (strncmp(buf,"DATA ascii",10)==0) 
			break;
	}
	float val;
	char* c;
	data = new float[numPoints * dimension];
	for (int i=0;i<numPoints;i++) {
		fgets(buf,256,f);
		c = buf;
		for (int j=0;j<dimension;j++) {
			val = strtod(c,&c);
			data[i * dimension + j] = val;
		}
	}
	fclose(f);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x2afe(%rip), %rsi      # 0xb874
movq %r15, %rdi
callq 0x2230
testq %rax, %rax
je 0x8ebe
movq %rax, %r14
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movl $0x100, %esi            # imm = 0x100
movq %rax, %rdx
callq 0x2330
testq %rax, %rax
je 0x8e1a
leaq 0x4(%rbx), %r12
leaq 0x2735(%rip), %r13      # 0xb4e4
leaq 0x10(%rsp), %rbp
movq %rbp, %rdi
movq %r13, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x21e0
cmpl $0x1, %eax
je 0x8e05
movq %rbp, %rdi
leaq 0x277d(%rip), %rsi      # 0xb550
movq %r12, %rdx
xorl %eax, %eax
callq 0x21e0
cmpl $0x1, %eax
je 0x8e05
movq 0x10(%rsp), %rax
movabsq $0x6373612041544144, %rcx # imm = 0x6373612041544144
xorq %rcx, %rax
movzwl 0x18(%rsp), %ecx
xorq $0x6969, %rcx           # imm = 0x6969
orq %rax, %rcx
je 0x8e1a
movq %rbp, %rdi
movl $0x100, %esi            # imm = 0x100
movq %r14, %rdx
callq 0x2330
testq %rax, %rax
jne 0x8db4
movslq (%rbx), %r12
movslq 0x4(%rbx), %rax
imulq %r12, %rax
movq %rax, %rcx
shlq $0x2, %rcx
testl %eax, %eax
movq $-0x1, %rdi
cmovnsq %rcx, %rdi
callq 0x2040
movq %rax, 0x8(%rbx)
testq %r12, %r12
jle 0x8ea4
xorl %r13d, %r13d
leaq 0x8(%rsp), %r12
movq %r15, %rdi
movl $0x100, %esi            # imm = 0x100
movq %r14, %rdx
callq 0x2330
movq %r15, 0x8(%rsp)
cmpl $0x0, 0x4(%rbx)
jle 0x8e9c
xorl %ebp, %ebp
movq 0x8(%rsp), %rdi
movq %r12, %rsi
callq 0x2150
cvtsd2ss %xmm0, %xmm0
movq 0x8(%rbx), %rax
movl 0x4(%rbx), %ecx
movl %r13d, %edx
imull %ecx, %edx
movslq %edx, %rdx
addq %rbp, %rdx
movss %xmm0, (%rax,%rdx,4)
incq %rbp
cmpl %ecx, %ebp
jl 0x8e6c
incl %r13d
cmpl (%rbx), %r13d
jl 0x8e4f
movq %r14, %rdi
callq 0x21f0
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x260b(%rip), %rdi      # 0xb4d0
movq %r15, %rsi
xorl %eax, %eax
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2050
// File: /workspace/github_cpp_makefile_star2_O3/jingdao[P]PointCloudApp/descriptor.cpp
// Function: Descriptor::getPCA_XY(double*, double*)
void Descriptor::getPCA_XY(double* lambda_real,double* v) {
	double cov[4] = {}; //column major
	PCD::Quaternion center = pointcloud->getCentroid(NULL);
	for (int j=0;j<pointcloud->numPoints;j++) {
		float deltaP[2] = {
			pointcloud->float_data[j * 4] - center.i,
			pointcloud->float_data[j * 4 + 1] - center.j,
		};
		cov[0] += deltaP[0] * deltaP[0];
		cov[1] += deltaP[1] * deltaP[0];
		cov[2] += deltaP[0] * deltaP[1];
		cov[3] += deltaP[1] * deltaP[1];
	}
	//compute PCA
	double lambda_imag[2];
	Normal::eigenvalue(2,cov,lambda_real,lambda_imag,v);
	//complete 3D structure
	lambda_real[2] = -1;
	v[4] = v[3];
	v[3] = v[2];
	v[2] = v[5] = v[6] = v[7] = 0;
	v[8] = 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
movq 0x10(%rdi), %rdi
xorl %esi, %esi
callq 0x6448
movq 0x10(%r15), %rcx
movslq 0x60(%rcx), %rax
testq %rax, %rax
jle 0x9211
movq 0x58(%rcx), %rcx
shufps $0x10, %xmm0, %xmm1     # xmm1 = xmm1[0,0],xmm0[1,0]
shufps $0xe2, %xmm0, %xmm1     # xmm1 = xmm1[2,0],xmm0[2,3]
shlq $0x4, %rax
xorl %edx, %edx
xorpd %xmm2, %xmm2
xorps %xmm0, %xmm0
movsd (%rcx,%rdx), %xmm3
subps %xmm1, %xmm3
movaps %xmm3, %xmm4
shufps $0x55, %xmm3, %xmm4     # xmm4 = xmm4[1,1],xmm3[1,1]
mulss %xmm3, %xmm4
mulps %xmm3, %xmm3
cvtps2pd %xmm3, %xmm3
addpd %xmm3, %xmm0
xorps %xmm3, %xmm3
cvtss2sd %xmm4, %xmm3
movlhps %xmm3, %xmm3            # xmm3 = xmm3[0,0]
addpd %xmm3, %xmm2
addq $0x10, %rdx
cmpq %rdx, %rax
jne 0x91cf
movupd %xmm2, 0x8(%rsp)
movhpd %xmm0, 0x18(%rsp)
jmp 0x9214
xorps %xmm0, %xmm0
movq %rsp, %rsi
movsd %xmm0, (%rsi)
leaq 0x20(%rsp), %rcx
movl $0x2, %edi
movq %r14, %rdx
movq %rbx, %r8
callq 0x9f38
movabsq $-0x4010000000000000, %rax # imm = 0xBFF0000000000000
movq %rax, 0x10(%r14)
movups 0x10(%rbx), %xmm0
movups %xmm0, 0x18(%rbx)
xorl %eax, %eax
movq %rax, 0x10(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rbx)
movq %rax, 0x38(%rbx)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0x40(%rbx)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/jingdao[P]PointCloudApp/descriptor.cpp
// Function: Descriptor::writeToPCD(char const*)
void Descriptor::writeToPCD(const char* filename) {
	if (!filename)
		return;
	FILE* f = fopen(filename, "w");
	if (!f) {
		printf("Cannot write to file: %s\n", filename);
		return;
	}
	fprintf(f,"# .PCD v0.7 - Point Cloud Data file format\n"
	"VERSION 0.7\n"
	"FIELDS descriptor\n"
	"SIZE 4\n"
	"TYPE F\n"
	"COUNT %d\n"
	"WIDTH %d\n"
	"HEIGHT 1\n"
	"POINTS %d\n"
	"DATA ascii\n",dimension,numPoints,numPoints);
	for (int i=0;i<numPoints;i++) {
		for (int j=0;j<dimension;j++)
			fprintf(f,"%f ",data[i*dimension+j]);
		fprintf(f,"\n");
	}
	fclose(f);
	printf("Wrote %d points to %s\n",numPoints,filename);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x959e
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x2070(%rip), %rsi      # 0xb559
movq %rbx, %rdi
callq 0x2230
testq %rax, %rax
je 0x95ad
movq %rax, %r15
movl (%r14), %ecx
movl 0x4(%r14), %edx
leaq 0x24fe(%rip), %rsi      # 0xba09
xorl %r13d, %r13d
movq %rax, %rdi
movl %ecx, %r8d
xorl %eax, %eax
callq 0x22a0
cmpl $0x0, (%r14)
jle 0x9574
leaq 0x1c6f(%rip), %r12      # 0xb197
movl 0x4(%r14), %eax
testl %eax, %eax
jle 0x955f
xorl %ebp, %ebp
movq 0x8(%r14), %rcx
imull %r13d, %eax
cltq
addq %rbp, %rax
xorps %xmm0, %xmm0
cvtss2sd (%rcx,%rax,4), %xmm0
movq %r15, %rdi
movq %r12, %rsi
movb $0x1, %al
callq 0x22a0
movl 0x4(%r14), %eax
incq %rbp
cmpl %eax, %ebp
jl 0x9532
movl $0xa, %edi
movq %r15, %rsi
callq 0x2250
incl %r13d
cmpl (%r14), %r13d
jl 0x9528
movq %r15, %rdi
callq 0x21f0
movl (%r14), %esi
leaq 0x20ac(%rip), %rdi      # 0xb632
movq %rbx, %rdx
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2050
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1fa7(%rip), %rdi      # 0xb55b
movq %rbx, %rsi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2050
// File: /workspace/github_cpp_makefile_star2_O3/jingdao[P]PointCloudApp/descriptor.cpp
// Function: Descriptor::getPCA(double*, double*)
void Descriptor::getPCA(double* lambda_real,double* v) {
	double cov[9] = {}; //column major
	PCD::Quaternion center = pointcloud->getCentroid(NULL);
	for (int j=0;j<pointcloud->numPoints;j++) {
		float deltaP[3] = {
			pointcloud->float_data[j * 4] - center.i,
			pointcloud->float_data[j * 4 + 1] - center.j,
			pointcloud->float_data[j * 4 + 2] - center.k,
		};
		cov[0] += deltaP[0] * deltaP[0];
		cov[1] += deltaP[1] * deltaP[0];
		cov[2] += deltaP[2] * deltaP[0];
		cov[3] += deltaP[0] * deltaP[1];
		cov[4] += deltaP[1] * deltaP[1];
		cov[5] += deltaP[2] * deltaP[1];
		cov[6] += deltaP[0] * deltaP[2];
		cov[7] += deltaP[1] * deltaP[2];
		cov[8] += deltaP[2] * deltaP[2];
	}
	//compute PCA
	double lambda_imag[3];
	Normal::eigenvalue(3,cov,lambda_real,lambda_imag,v);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
movq $0x0, 0x40(%rsp)
movq 0x10(%rdi), %rdi
xorl %esi, %esi
callq 0x6448
movq 0x10(%r15), %rcx
movslq 0x60(%rcx), %rax
testq %rax, %rax
jle 0x96c4
movq 0x58(%rcx), %rcx
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
shlq $0x4, %rax
xorpd %xmm2, %xmm2
xorl %edx, %edx
xorpd %xmm3, %xmm3
xorpd %xmm4, %xmm4
xorpd %xmm5, %xmm5
xorpd %xmm10, %xmm10
movss (%rcx,%rdx), %xmm6
subss %xmm0, %xmm6
movaps %xmm6, %xmm7
mulss %xmm6, %xmm7
cvtss2sd %xmm7, %xmm7
addsd %xmm7, %xmm2
movsd 0x4(%rcx,%rdx), %xmm7
subps %xmm1, %xmm7
shufps $0x0, %xmm6, %xmm6      # xmm6 = xmm6[0,0,0,0]
mulps %xmm7, %xmm6
cvtps2pd %xmm6, %xmm6
addpd %xmm6, %xmm10
movaps %xmm7, %xmm8
shufps $0x55, %xmm7, %xmm8     # xmm8 = xmm8[1,1],xmm7[1,1]
mulps %xmm7, %xmm8
mulss %xmm7, %xmm7
cvtss2sd %xmm7, %xmm7
movapd %xmm6, %xmm9
unpcklpd %xmm7, %xmm9            # xmm9 = xmm9[0],xmm7[0]
addpd %xmm9, %xmm3
cvtps2pd %xmm8, %xmm7
movsd %xmm7, %xmm6            # xmm6 = xmm7[0],xmm6[1]
addpd %xmm6, %xmm4
addpd %xmm7, %xmm5
addq $0x10, %rdx
cmpq %rdx, %rax
jne 0x963c
movupd %xmm10, 0x8(%rsp)
movupd %xmm3, 0x18(%rsp)
movupd %xmm4, 0x28(%rsp)
movupd %xmm5, 0x38(%rsp)
jmp 0x96c8
xorpd %xmm2, %xmm2
movq %rsp, %rsi
movsd %xmm2, (%rsi)
leaq 0x50(%rsp), %rcx
movl $0x3, %edi
movq %r14, %rdx
movq %rbx, %r8
callq 0x9f38
addq $0x70, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/jingdao[P]PointCloudApp/normal.cpp
// Function: Normal::svd(int, int, double*, double*, double*, double*)
void Normal::svd(int M,int N,double* A,double *U, double* S, double* VT) {

	int info, lwork=5*(M>N?N:M);
	double* work = new double[lwork];
	char jobu = 'A', jobvt = 'A';
	dgesvd_(&jobu, &jobvt, &M, &N, A, &M, 
	     S, U, &M, VT, &N, work, &lwork, &info);
//	printf("info: %d\n",info);
//	printf("optimal: %f\n",work[0]);
	if (info!=0) {
		printf("Error in subroutine dgesvd_ (info=%d)\n",info);
	}
	delete[] work;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r9, 0x10(%rsp)
movq %r8, 0x20(%rsp)
movq %rcx, 0x18(%rsp)
movq %rdx, %rbx
leaq 0x34(%rsp), %r13
movl %edi, (%r13)
leaq 0x30(%rsp), %rbp
movl %esi, (%rbp)
cmpl %esi, %edi
cmovll %edi, %esi
leal (%rsi,%rsi,4), %eax
leaq 0x28(%rsp), %r14
movl %eax, (%r14)
cltq
shlq $0x3, %rax
testl %esi, %esi
movq $-0x1, %rdi
cmovnsq %rax, %rdi
callq 0x2040
movq %rax, %r12
movb $0x41, %al
leaq 0xf(%rsp), %rdi
movb %al, (%rdi)
leaq 0xe(%rsp), %rsi
movb %al, (%rsi)
leaq 0x2c(%rsp), %r15
movq %r13, %rdx
movq %rbp, %rcx
movq %rbx, %r8
movq %r13, %r9
pushq %r15
pushq %r14
pushq %r12
pushq %rbp
pushq 0x30(%rsp)
pushq %r13
pushq 0x48(%rsp)
pushq 0x58(%rsp)
callq 0x22e0
addq $0x40, %rsp
movl (%r15), %esi
testl %esi, %esi
je 0xa0ee
leaq 0x19d0(%rip), %rdi      # 0xbab7
xorl %eax, %eax
callq 0x2050
movq %r12, %rdi
callq 0x2260
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)