LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/SeTriones[P]Anubis/acceptor.cpp
// Function: acceptor::set_socket(int, int)
int acceptor::set_socket(int fd, int flag) {
	int options;
	options = SOCKET_SND_BUF_SIZE;
	setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &options, sizeof(int));
	options = SOCKET_RCV_BUF_SIZE;
	setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &options, sizeof(int));
	options = 1;
	setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &options, sizeof(int));
	options = fcntl(fd, F_GETFL);
	fcntl(fd, F_SETFL, options | flag);
	int on = 1;
	int ret = -1;
	ret = setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (char *)&on, sizeof(on));
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebp
movl %esi, %ebx
movl $0x100000, %r12d        # imm = 0x100000
leaq 0xc(%rsp), %r14
movl %r12d, (%r14)
movl $0x1, %r15d
movl %esi, %edi
movl $0x1, %esi
movl $0x7, %edx
movq %r14, %rcx
movl $0x4, %r8d
callq 0x23c0
movl %r12d, (%r14)
movl %ebx, %edi
movl $0x1, %esi
movl $0x8, %edx
movq %r14, %rcx
movl $0x4, %r8d
callq 0x23c0
movl %r15d, (%r14)
movl %ebx, %edi
movl $0x1, %esi
movl $0x2, %edx
movq %r14, %rcx
movl $0x4, %r8d
callq 0x23c0
movl %ebx, %edi
movl $0x3, %esi
xorl %eax, %eax
callq 0x2130
movl %eax, (%r14)
orl %eax, %ebp
movl %ebx, %edi
movl $0x4, %esi
movl %ebp, %edx
xorl %eax, %eax
callq 0x2130
leaq 0x8(%rsp), %rcx
movl %r15d, (%rcx)
movl %ebx, %edi
movl $0x6, %esi
movl $0x1, %edx
movl $0x4, %r8d
callq 0x23c0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/SeTriones[P]Anubis/acceptor.cpp
// Function: acceptor::del_input_fd(int, int)
int acceptor::del_input_fd(int fd, int efd) {
	epoll_event event;
	event.events = EPOLLIN | EPOLLET;
	event.data.fd = fd;
	int ret = epoll_ctl(efd, EPOLL_CTL_DEL, fd, &event);
	if (ret < 0) {
		_ERROR("del_input_fd err,fd=%d,errno=%d", fd, errno);
	}
	return ret;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0x18, %rsp
movl %edx, %edi
movl %esi, %ebx
leaq 0xc(%rsp), %rcx
movl $0x80000001, (%rcx)     # imm = 0x80000001
movl %esi, 0x4(%rcx)
movl $0x2, %esi
movl %ebx, %edx
callq 0x22e0
movl %eax, %ebp
testl %eax, %eax
js 0x36a9
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
movl %ebx, %edi
callq 0x27a8
jmp 0x36a0
// File: /workspace/github_cpp_makefile_star2_O3/SeTriones[P]Anubis/acceptor.cpp
// Function: acceptor::create_pipe(int)
int acceptor::create_pipe(int idx) {
	int options;
	int pipe_fd[2];
	
	if (pipe(pipe_fd)) {
		return -1;
	}

	pipe_read_fds[idx] = pipe_fd[0];
	pipe_write_fds[idx] = pipe_fd[1];

	for (int i = 0;i < 2;i++) {
		if ((options = fcntl(pipe_fd[i], F_GETFL)) == -1) {
			return -1;
		}
		if (fcntl(pipe_fd[i], F_SETFL, options | O_NONBLOCK) == -1) {
			return -1;
		}
	}
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %esi, %ebp
movq %rdi, %r15
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x22c0
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x3755
leaq 0xc(%rsp), %r12
movl -0x4(%r12), %eax
movq 0x90(%r15), %rcx
movslq %ebp, %rdx
movl %eax, (%rcx,%rdx,4)
movl (%r12), %eax
movq 0x98(%r15), %rcx
movl %eax, (%rcx,%rdx,4)
xorl %ebp, %ebp
movl (%r14), %edi
movl $0x3, %esi
xorl %eax, %eax
callq 0x2130
cmpl $-0x1, %eax
je 0x3755
movl (%r14), %edi
orl $0x800, %eax            # imm = 0x800
movl $0x4, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x2130
cmpl $-0x1, %eax
setne %cl
xorb $0x1, %bpl
movq %r12, %r14
testb %bpl, %cl
movb $0x1, %bpl
jne 0x370c
xorl %ebx, %ebx
cmpl $-0x1, %eax
sete %bl
negl %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/SeTriones[P]Anubis/base_nio_handler.cpp
// Function: base_nio_handler::readn_timeout(int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, int)
int base_nio_handler::readn_timeout(int fd, std::string &content, int buf_len) {
    char buf[READ_BUF_SIZE+1];
    timeval timeout = {
        0,
        recv_timeout * 1000
    };
    int n,len;
    int left = buf_len;

    while (left > 0)
    {
        len = left>READ_BUF_SIZE?READ_BUF_SIZE:left;
        if ((n = read_data(fd, buf, len,&timeout)) <= 0)
            return buf_len - left;

        buf[n] = '\0';
        content += buf;
        left -= n;
    }

    return buf_len;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x428, %rsp            # imm = 0x428
movq $0x0, 0x10(%rsp)
movslq (%rdi), %rax
imulq $0x3e8, %rax, %rax      # imm = 0x3E8
movq %rax, 0x18(%rsp)
testl %ecx, %ecx
jle 0x37ec
movq %rdx, %r14
movl %esi, %ebp
leaq 0x20(%rsp), %r15
leaq 0x10(%rsp), %r12
movl %ecx, 0xc(%rsp)
movl %ecx, %ebx
movl $0x400, %eax            # imm = 0x400
cmpl %eax, %ebx
movl $0x400, %ecx            # imm = 0x400
cmovbl %ebx, %ecx
movl %ebp, %esi
movq %r15, %rdx
movq %r12, %r8
callq 0x3800
testl %eax, %eax
jle 0x37e6
movl %eax, %r13d
movl %eax, %eax
movb $0x0, 0x20(%rsp,%rax)
movq %r14, %rdi
movq %r15, %rsi
callq 0x23f0
subl %r13d, %ebx
jg 0x37a6
movl 0xc(%rsp), %ecx
jmp 0x37ec
movl 0xc(%rsp), %ecx
subl %ebx, %ecx
movl %ecx, %eax
addq $0x428, %rsp            # imm = 0x428
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/SeTriones[P]Anubis/base_nio_handler.cpp
// Function: base_nio_handler::readn_timeout(int, char*, int, timeval*)
int base_nio_handler::readn_timeout(int fd, char* content, int need_to_read, timeval* timeout) {
	char buf[READ_BUF_SIZE + 1];
	int n, left;
	int len;
    int ptr = 0;
	left = need_to_read;
	while (left > 0) {
		len = left > READ_BUF_SIZE ? READ_BUF_SIZE : left;
		n = read_data(fd, buf, len, timeout);
		if (n <= 0 ) {
			if(n == 0)
				return -2;
			return need_to_read - left;
		}
		buf[n] = '\0';
        memcpy(content + ptr, buf, len);
        ptr = ptr + n;
		left = left - n;
	}
	return need_to_read;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x428, %rsp            # imm = 0x428
movq %r8, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
testl %ecx, %ecx
jle 0x39ad
movl %esi, %ebp
xorl %r15d, %r15d
leaq 0x20(%rsp), %r12
movl %ecx, 0xc(%rsp)
movl %ecx, %r14d
movl $0x400, %eax            # imm = 0x400
cmpl %eax, %r14d
movl $0x400, %ebx            # imm = 0x400
cmovbl %r14d, %ebx
movl %ebp, %esi
movq %r12, %rdx
movl %ebx, %ecx
movq 0x18(%rsp), %r8
callq 0x3800
movl %eax, %r13d
testl %eax, %eax
jle 0x399b
movl %r13d, %eax
movb $0x0, 0x20(%rsp,%rax)
movl %r15d, %edi
addq 0x10(%rsp), %rdi
movl %ebx, %edx
movq %r12, %rsi
callq 0x21a0
addl %r13d, %r15d
subl %r13d, %r14d
jg 0x394a
movl 0xc(%rsp), %ecx
jmp 0x39ad
movl 0xc(%rsp), %ecx
subl %r14d, %ecx
testl %r13d, %r13d
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
cmovel %eax, %ecx
movl %ecx, %eax
addq $0x428, %rsp            # imm = 0x428
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/SeTriones[P]Anubis/base_nio_handler.cpp
// Function: base_nio_handler::setSocket(int&)
int base_nio_handler::setSocket(int& fd) {
    if (fd <= 0) {
        _ERROR("error socket fd=%d", fd);
        return -1;
    }
    int options;
    options = SOCKET_SND_BUF_SIZE;
    setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &options, sizeof(int));
    options = SOCKET_RCV_BUF_SIZE;
    setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &options, sizeof(int));
    options = 1;
    setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &options, sizeof(int));
    options = fcntl(fd, F_GETFL);
    fcntl(fd, F_SETFL, options | O_NONBLOCK);
    int on = 1;
    int ret = -1;
    ret = setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (char *)&on, sizeof(on));
    return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl (%rsi), %edi
testl %edi, %edi
jle 0x3b2e
movl $0x100000, %r15d        # imm = 0x100000
leaq 0x4(%rsp), %r14
movl %r15d, (%r14)
movl $0x1, %ebp
movl $0x1, %esi
movl $0x7, %edx
movq %r14, %rcx
movl $0x4, %r8d
callq 0x23c0
movl %r15d, (%r14)
movl (%rbx), %edi
movl $0x1, %esi
movl $0x8, %edx
movq %r14, %rcx
movl $0x4, %r8d
callq 0x23c0
movl %ebp, (%r14)
movl (%rbx), %edi
movl $0x1, %esi
movl $0x2, %edx
movq %r14, %rcx
movl $0x4, %r8d
callq 0x23c0
movl (%rbx), %edi
movl $0x3, %esi
xorl %eax, %eax
callq 0x2130
movl %eax, (%r14)
movl (%rbx), %edi
orl $0x800, %eax            # imm = 0x800
movl $0x4, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x2130
movq %rsp, %rcx
movl %ebp, (%rcx)
movl (%rbx), %edi
movl $0x6, %esi
movl $0x1, %edx
movl $0x4, %r8d
callq 0x23c0
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x2c85
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x3b23
nop
// File: /workspace/github_cpp_makefile_star2_O3/SeTriones[P]Anubis/key_group.cpp
// Function: KeyGroup::KeyGroup(int)
KeyGroup::KeyGroup(int _capacity) {
	capacity = _capacity;
	cache = new LRUCache(capacity);
	store = (int*)malloc(sizeof(int) * capacity);
	memset(store, 0, sizeof(int) * capacity);
	for (int i = 0; i < capacity; i++) {
		free_poses.push_back(i);
	}
	pthread_mutex_init(&group_mutex, NULL);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %r14
leaq 0x18(%rdi), %rbx
movq %rbx, 0x20(%rdi)
movq %rbx, 0x18(%rdi)
movq $0x0, 0x28(%rdi)
movl %esi, (%rdi)
movl $0x40, %edi
callq 0x21f0
movq %rax, %r15
movq %rax, %rdi
movl %ebp, %esi
callq 0x3f68
movq %r15, 0x10(%r14)
movslq (%r14), %r15
leaq (,%r15,4), %rsi
movl $0x1, %edi
callq 0x2150
movq %rax, 0x8(%r14)
testq %r15, %r15
jle 0x3df0
xorl %ebp, %ebp
movl $0x18, %edi
callq 0x21f0
movl %ebp, 0x10(%rax)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x2050
incq 0x28(%r14)
incl %ebp
cmpl (%r14), %ebp
jl 0x3dcd
addq $0x30, %r14
movq %r14, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2330
movq %rax, %r14
movl $0x40, %esi
movq %r15, %rdi
callq 0x2200
jmp 0x3e1f
jmp 0x3e1c
movq %rax, %r14
movq (%rbx), %rdi
cmpq %rbx, %rdi
je 0x3e3c
movq (%rdi), %r15
movl $0x18, %esi
callq 0x2200
movq %r15, %rdi
cmpq %rbx, %r15
jne 0x3e27
movq %r14, %rdi
callq 0x23b0
// File: /workspace/github_cpp_makefile_star2_O3/SeTriones[P]Anubis/key_group.cpp
// Function: KeyGroup::Inc(unsigned long)
int KeyGroup::Inc(uint64_t key) {
	int ret;
	pthread_mutex_lock(&group_mutex);
	int* pos = cache->get(key);
	if (pos == NULL) {
		if (free_poses.empty()) {
			_INFO("no free pos");
			pos = NULL;
		} else {
			int idx = free_poses.front();
			free_poses.pop_front();
			pos = store + idx;
		}
		pos = cache->set(key, pos, 0);
		*pos = 1;
		pthread_mutex_unlock(&group_mutex);
		return 1;
	} else {
		pthread_mutex_unlock(&group_mutex);
		ret = __sync_add_and_fetch(pos, 1);
		return ret;
	}

}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x30(%rdi), %rbx
movq %rbx, %rdi
callq 0x2320
movq 0x10(%r15), %rdi
movq %r14, %rsi
callq 0x3ffa
testq %rax, %rax
je 0x3eec
movq %rax, %r12
movq %rbx, %rdi
callq 0x2170
movl $0x1, %eax
lock
xaddl %eax, (%r12)
incl %eax
jmp 0x3f42
leaq 0x18(%r15), %rax
movq 0x18(%r15), %r13
cmpq %rax, %r13
je 0x3f4c
movslq 0x10(%r13), %r12
decq 0x28(%r15)
movq %r13, %rdi
callq 0x2380
movl $0x18, %esi
movq %r13, %rdi
callq 0x2200
shlq $0x2, %r12
addq 0x8(%r15), %r12
movq 0x10(%r15), %rdi
movq %r14, %rsi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x404a
movl $0x1, (%rax)
movq %rbx, %rdi
callq 0x2170
movl $0x1, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
callq 0x2d75
xorl %r12d, %r12d
jmp 0x3f1e
// File: /workspace/github_cpp_makefile_star2_O3/SeTriones[P]Anubis/lru_cache.cpp
// Function: LRUCache::set(unsigned long, int*, int)
int* LRUCache::set(uint64_t key, int* pos, int overwrite){
	std::tr1::unordered_map<uint64_t, struct HashItem>::iterator it;
	it = hash.find(key);
	if (it != hash.end()) {
		if(overwrite) {
			it->second.pos = pos;
			mv_node_to_header(list, it->second.node, 0);
		}
		else {
			mv_node_to_header(list, it->second.node, 0);
		}
		return pos;
	}
	int* free_pos = pos;
	if (size == capacity) {
		node *n = pop_from_tail(list);
		it = hash.find(n->key);
		free_pos = it->second.pos;
		hash.erase(it);
		free(n);
		size--;
	}
	node *tmp = new_node();
	tmp->key = key;
	mv_node_to_header(list, tmp, 1);
	HashItem item;
	item.node = tmp;
	item.pos = free_pos;
	hash.insert(std::pair<uint64_t, struct HashItem>(key, item));
	size++;
	return free_pos;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq 0x18(%rdi), %rsi
movq 0x20(%rdi), %rdi
movq %r14, %rax
xorl %edx, %edx
divq %rdi
movq (%rsi,%rdx,8), %rax
testq %rax, %rax
je 0x40a6
cmpq %r14, (%rax)
je 0x4084
movq 0x18(%rax), %rax
jmp 0x4074
cmpq (%rsi,%rdi,8), %rax
je 0x40a6
testl %ecx, %ecx
je 0x4092
movq %r15, 0x10(%rax)
movq 0x8(%rbx), %rdi
movq 0x8(%rax), %rsi
xorl %edx, %edx
callq 0x3276
jmp 0x4141
leaq 0x10(%rbx), %r12
movl (%rbx), %eax
cmpl 0x4(%rbx), %eax
jne 0x4108
movq 0x8(%rbx), %rdi
callq 0x33bf
movq %rax, %r13
movq (%rax), %rcx
movq 0x18(%rbx), %rdi
movq 0x20(%rbx), %r8
movq %rcx, %rax
xorl %edx, %edx
divq %r8
movq (%rdi,%rdx,8), %rsi
testq %rsi, %rsi
je 0x40eb
leaq (%rdi,%rdx,8), %rdx
cmpq (%rsi), %rcx
je 0x40f2
movq 0x18(%rsi), %rsi
testq %rsi, %rsi
jne 0x40dd
leaq (%rdi,%r8,8), %rdx
movq (%rdx), %rsi
movq 0x10(%rsi), %r15
movq %r12, %rdi
callq 0x42f6
movq %r13, %rdi
callq 0x2260
decl (%rbx)
callq 0x3267
movq %rax, %r13
movq %r14, (%rax)
movq 0x8(%rbx), %rdi
movq %rax, %rsi
movl $0x1, %edx
callq 0x3276
leaq 0x18(%rsp), %rdx
movq %r14, (%rdx)
movq %r13, 0x8(%rdx)
movq %r15, 0x10(%rdx)
movq %rsp, %rdi
movq %r12, %rsi
callq 0x4330
incl (%rbx)
movq %r15, %rax
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/SeTriones[P]Anubis/main.cpp
// Function: testKeyGroup()
void testKeyGroup() {
	KeyGroup* kg = new KeyGroup(10);
	kg->dump();
	int cnt;
	for (int i = 0; i < 10; i++) {
		for (int inc_cnt = 0; inc_cnt <= i; inc_cnt++) {
			cnt = kg->Inc((uint64_t)i);
			_INFO("inc %d,get %d", i, cnt);
		}
	}
	for (int i = 0; i < 100; i++) {
		kg->Inc(1);
		kg->Inc(2);
		kg->Inc(3);
		kg->Inc(4);
	}
	kg->dump();
	for (int i = 0; i < 5; i++) {
		for (int inc_cnt = 0; inc_cnt < i + 10; inc_cnt++) {
			int tmp = i + 20;
			cnt = kg->Inc((uint64_t)tmp);
			_INFO("inc %d,get %d", tmp, cnt);
		}
	}
	kg->dump();
	return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl $0x58, %edi
callq 0x21f0
movq %rax, %r15
movq %rax, %rdi
movl $0xa, %esi
callq 0x3d70
movq %r15, %rdi
callq 0x3f56
movl $0x1, %ebp
xorl %r13d, %r13d
movq %r15, 0x18(%rsp)
movl %ebp, 0x14(%rsp)
movq %r15, %rdi
movq %r13, %rsi
callq 0x3ea6
movl %eax, %r15d
leaq 0x28(%rsp), %rbx
movq %rbx, %rdi
callq 0x21e0
movq %rbx, %rdi
leaq 0x50(%rsp), %rbx
movq %rbx, %rsi
callq 0x2100
movl $0x12, %esi
leaq 0x30(%rsp), %r14
movq %r14, %rdi
leaq 0x1937(%rip), %rdx      # 0x6004
movq %rbx, %rcx
callq 0x2190
movq 0x48fc(%rip), %rax      # 0x8fd8
movq (%rax), %r12
callq 0x21c0
movq %rax, %rbx
movl %r15d, (%rsp)
movq 0x18(%rsp), %r15
movq %r12, %rdi
leaq 0x1c6e(%rip), %rsi      # 0x6368
movq %r14, %rdx
movq %rax, %rcx
leaq 0x1a74(%rip), %r8       # 0x617b
movl %r13d, %r9d
xorl %eax, %eax
callq 0x22f0
decl %ebp
jne 0x468e
movq %rbx, 0x20(%rsp)
incq %r13
movl 0x14(%rsp), %ebp
incl %ebp
cmpq $0xa, %r13
jne 0x468a
movl $0x64, %ebx
movl $0x1, %esi
movq %r15, %rdi
callq 0x3ea6
movl $0x2, %esi
movq %r15, %rdi
callq 0x3ea6
movl $0x3, %esi
movq %r15, %rdi
callq 0x3ea6
movl $0x4, %esi
movq %r15, %rdi
callq 0x3ea6
decl %ebx
jne 0x4736
movq %r15, %rdi
callq 0x3f56
movl $0xa, %ebx
xorl %ebp, %ebp
leaq 0x14(%rbp), %r13
movl %ebx, 0x14(%rsp)
movq %r15, %rdi
movq %r13, %rsi
callq 0x3ea6
movl %eax, %r15d
leaq 0x28(%rsp), %r14
movq %r14, %rdi
callq 0x21e0
movq %r14, %rdi
leaq 0x50(%rsp), %r12
movq %r12, %rsi
callq 0x2100
movl $0x12, %esi
leaq 0x30(%rsp), %r14
movq %r14, %rdi
leaq 0x1840(%rip), %rdx      # 0x6004
movq %r12, %rcx
callq 0x2190
movq 0x4805(%rip), %rax      # 0x8fd8
movq (%rax), %rdi
movl %r15d, (%rsp)
movq 0x18(%rsp), %r15
leaq 0x1b82(%rip), %rsi      # 0x6368
movq %r14, %rdx
movq 0x20(%rsp), %rcx
leaq 0x1986(%rip), %r8       # 0x617b
movl %r13d, %r9d
xorl %eax, %eax
callq 0x22f0
decl %ebx
jne 0x4785
incq %rbp
movl 0x14(%rsp), %ebx
incl %ebx
cmpq $0x5, %rbp
jne 0x477d
movq %r15, %rdi
callq 0x3f56
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movl $0x58, %esi
movq %r15, %rdi
callq 0x2200
movq %r14, %rdi
callq 0x23b0
// File: /workspace/github_cpp_makefile_star2_O3/SeTriones[P]Anubis/receiver.cpp
// Function: receiver::receiver(int, int, int, int)
receiver::receiver(int _epoll_cnt, int _max_conn, int _key_group_cnt, int _group_capacity) : acceptor(_epoll_cnt, _max_conn) {
	endian = testEndian();
	key_group_cnt = _key_group_cnt;
	group_capacity = _group_capacity;
	key_groups = (KeyGroup**)malloc(key_group_cnt * sizeof(KeyGroup*));
	for (int i = 0; i < key_group_cnt; i++) {
		key_groups[i] = new KeyGroup(group_capacity);
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %r15d
movl %ecx, %ebp
movl %edx, %r12d
movl %esi, %r13d
movq %rdi, %rbx
callq 0x5408
leaq 0x40(%rbx), %r14
movq %r14, %rdi
movl %r13d, %esi
movl %r12d, %edx
callq 0x2430
leaq 0x41e1(%rip), %rax      # 0x8ca8
movq %rax, (%rbx)
movb $0x0, 0xf4(%rbx)
movl %ebp, 0xec(%rbx)
movl %r15d, 0xf0(%rbx)
movslq %ebp, %r15
leaq (,%r15,8), %rdi
callq 0x22b0
movq %rax, 0xf8(%rbx)
testl %r15d, %r15d
jle 0x4b32
xorl %r15d, %r15d
movl $0x58, %edi
callq 0x21f0
movq %rax, %r12
movl 0xf0(%rbx), %esi
movq %rax, %rdi
callq 0x3d70
movq 0xf8(%rbx), %rax
movq %r12, (%rax,%r15,8)
incq %r15
movslq 0xec(%rbx), %rax
cmpq %rax, %r15
jl 0x4afd
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
jmp 0x4b63
movq %rax, %r15
jmp 0x4b5b
movq %rax, %r15
movl $0x58, %esi
movq %r12, %rdi
callq 0x2200
movq %r14, %rdi
callq 0x33e8
movq %rbx, %rdi
callq 0x541a
movq %r15, %rdi
callq 0x23b0
nop
// File: /workspace/github_cpp_makefile_star2_O3/SeTriones[P]Anubis/receiver.cpp
// Function: receiver::open(int)
int receiver::open(int thread_cnt) {
	for (int i = 0; i < epoll_cnt; i++) {
		epoll_fds[i] = epoll_create(max_conn);
		if (epoll_fds[i] == -1) {
			_ERROR("create epoll fd %d err", i);
			return -1;
		}
	}
	for (int i = 0; i < epoll_cnt; i++) {
		if (create_pipe(i) < 0) {
			_ERROR("create pipe err on idx=%d", i);
			return -1;
		}
		add_input_fd(pipe_read_fds[i], epoll_fds[i]);
	}
	return task_base::open(thread_cnt * epoll_cnt, 256 * (1<<10));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movl 0x44(%rdi), %eax
testl %eax, %eax
jle 0x4c78
leaq 0x40(%rbx), %r14
xorl %r15d, %r15d
movl 0x40(%rbx), %edi
callq 0x23e0
movq 0x50(%rbx), %rcx
movl %eax, (%rcx,%r15,4)
cmpl $-0x1, %eax
je 0x4c95
incq %r15
movslq 0x44(%rbx), %rax
cmpq %rax, %r15
jl 0x4c1a
testl %eax, %eax
jle 0x4c78
xorl %r15d, %r15d
movq %r14, %rdi
movl %r15d, %esi
callq 0x36be
testl %eax, %eax
js 0x4c9f
movq 0x50(%rbx), %rax
movq 0xd0(%rbx), %rcx
movl (%rcx,%r15,4), %esi
movl (%rax,%r15,4), %edx
movq %r14, %rdi
callq 0x34e6
incq %r15
movslq 0x44(%rbx), %rax
cmpq %rax, %r15
jl 0x4c42
imull %ebp, %eax
movslq %eax, %rsi
movl $0x40000, %edx          # imm = 0x40000
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x5436
movq %r15, %rdi
callq 0x2f15
jmp 0x4ca7
movl %r15d, %edi
callq 0x2e99
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/SeTriones[P]Anubis/receiver.cpp
// Function: receiver::stop()
int receiver::stop() {
	int write_cnt = 0;
	for (int i = 0; i < epoll_cnt; i++) {
		int stop = 1;
		write_cnt = write(pipe_write_fds[i], &stop, 1);
		assert(write_cnt == 1);
	}
	stop_task = 1;
	join();
	_INFO("receiver stops");
	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
cmpl $0x0, 0x44(%rdi)
jle 0x4d03
xorl %r15d, %r15d
leaq 0xc(%rsp), %r14
movl $0x1, 0xc(%rsp)
movq 0xd8(%rbx), %rax
movl (%rax,%r15,4), %edi
movl $0x1, %edx
movq %r14, %rsi
callq 0x20b0
cmpl $0x1, %eax
jne 0x4d17
incq %r15
movslq 0x44(%rbx), %rax
cmpq %rax, %r15
jl 0x4cd2
movq %rbx, %rdi
callq 0x2f92
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1770(%rip), %rdi      # 0x648e
leaq 0x1778(%rip), %rsi      # 0x649d
leaq 0x177e(%rip), %rcx      # 0x64aa
movl $0x40, %edx
callq 0x2140
// File: /workspace/github_cpp_makefile_star2_O3/SeTriones[P]Anubis/receiver.cpp
// Function: receiver::start_listen(int)
int receiver::start_listen(int port) {
	listen_port = port;
	if (create_listen(listen_fd, listen_port)) {
		_ERROR("create listen fail on port=%d", listen_port);
		return -1;
	}
	add_input_fd(listen_fd, epoll_fds[0]);
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x40(%rdi), %r14
movl %esi, 0x48(%rdi)
leaq 0x4c(%rdi), %rax
movzwl %si, %edx
movq %r14, %rdi
movq %rax, %rsi
callq 0x3522
testl %eax, %eax
jne 0x53f5
movl 0x4c(%rbx), %esi
movq 0x50(%rbx), %rax
movl (%rax), %edx
movq %r14, %rdi
callq 0x34e6
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
addq $0x48, %rbx
movq %rbx, %rdi
callq 0x3094
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x53ed
// File: /workspace/github_cpp_makefile_star2_O3/SeTriones[P]Anubis/task_base.cpp
// Function: task_base::open(unsigned long, unsigned long)
int task_base::open(size_t thread_num, size_t stack_size)
{
	int ret = -1;
	size_t i;
	pthread_attr_t attr;
	pthread_attr_init(&attr);

	do {
		pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
		if (pthread_attr_setstacksize(&attr, stack_size))
			break;

		if (thread_num == 0 || (m_thread = (pthread_t*)malloc(thread_num * sizeof(pthread_t))) == NULL)
			break;

		pthread_barrier_init(&m_barrier, NULL, thread_num + 1);
		for (i=0; i<thread_num; i++)
			if (pthread_create(m_thread+i, &attr, run_svc, this))
				break;

		if ((m_thread_num = i) != thread_num)
			break;

		ret = 0;
	} while (false);

	pthread_attr_destroy(&attr);
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %rsp, %r12
movq %r12, %rdi
callq 0x2270
movq %r12, %rdi
xorl %esi, %esi
callq 0x22a0
movq %r12, %rdi
movq %rbx, %rsi
callq 0x22d0
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %r15, %r15
je 0x54e6
testl %eax, %eax
jne 0x54e6
leaq (,%r15,8), %rdi
callq 0x22b0
movq %rax, 0x8(%r14)
testq %rax, %rax
je 0x54e6
leaq 0x18(%r14), %rdi
leal 0x1(%r15), %edx
xorl %r13d, %r13d
xorl %esi, %esi
callq 0x2370
leaq 0x56(%rip), %rbp        # 0x5500
movq %rsp, %r12
xorl %ebx, %ebx
movq 0x8(%r14), %rdi
addq %r13, %rdi
movq %r12, %rsi
movq %rbp, %rdx
movq %r14, %rcx
callq 0x23d0
testl %eax, %eax
jne 0x54d7
incq %rbx
addq $0x8, %r13
cmpq %rbx, %r15
jne 0x54af
movq %r15, %rbx
movq %rbx, 0x10(%r14)
xorl %ebp, %ebp
cmpq %r15, %rbx
setne %bpl
negl %ebp
movq %rsp, %rdi
callq 0x23a0
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/SeTriones[P]Anubis/task_base.cpp
// Function: task_base::join()
int task_base::join()
{
	if (m_thread) {
		for (size_t i=0; i<m_thread_num; i++) {
			pthread_kill(m_thread[i], SIGTERM);
			pthread_join(m_thread[i], NULL);
		}
		free(m_thread);
		m_thread = NULL;
		pthread_barrier_destroy(&m_barrier);
	}
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x5589
cmpq $0x0, 0x10(%rbx)
je 0x5570
xorl %r14d, %r14d
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rdi
movl $0xf, %esi
callq 0x2290
movq 0x8(%rbx), %rax
movq (%rax,%r14,8), %rdi
xorl %esi, %esi
callq 0x21d0
incq %r14
cmpq 0x10(%rbx), %r14
jb 0x5542
movq 0x8(%rbx), %rdi
callq 0x2260
movq $0x0, 0x8(%rbx)
addq $0x18, %rbx
movq %rbx, %rdi
callq 0x2210
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/zengfenfei[P]codility/src/MissingInteger.cpp
// Function: solution(std::vector<int, std::allocator<int>>&)
int solution(vector<int> &A) {
	int min = 0;	// Positive minimal
	for (int i = 0; i < A.size(); i++) {
		if (A[i] > 0 && (min == 0 || A[i] < min)) {
			min = A[i];
		}
	}
	if (min == 0 || min > 1) {
		return 1;
	}

	vector<int> possibleMissing(A.size(), 0);
	for (int i = 0; i < A.size(); i++) {
		int minOffset = A[i] - min - 1;
		if (minOffset >= 0 && minOffset < A.size()) {
			possibleMissing[minOffset]++;
		}
	}

	for (int i = 0; i < A.size(); i++) {
		if (possibleMissing[i] == 0) {
			return min + i + 1;
		}
	}
	return 0; 	// Will never run
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq (%rdi), %rax
movq 0x8(%rdi), %rsi
movl $0x1, %ebx
subq %rax, %rsi
je 0x12a9
movq %rdi, %r14
sarq $0x2, %rsi
cmpq $0x1, %rsi
movq %rsi, %rcx
adcq $0x0, %rcx
xorl %edx, %edx
xorl %r15d, %r15d
movl %r15d, %edi
movl (%rax,%rdx,4), %r8d
cmpl %r15d, %r8d
cmovll %r8d, %r15d
testl %edi, %edi
cmovel %r8d, %r15d
testl %r8d, %r8d
cmovlel %edi, %r15d
incq %rdx
cmpq %rdx, %rcx
jne 0x11d5
testl %r15d, %r15d
sete %al
cmpl $0x2, %r15d
setge %cl
orb %al, %cl
jne 0x12a9
leaq -0x20(%rbp), %rdx
movl $0x0, (%rdx)
leaq -0x38(%rbp), %rbx
leaq -0x19(%rbp), %rcx
movq %rbx, %rdi
callq 0x12be
movq (%r14), %rcx
movq 0x8(%r14), %rdx
movq %rdx, %rax
movq (%rbx), %rdi
subq %rcx, %rax
je 0x128e
sarq $0x2, %rax
movl %r15d, %esi
notl %esi
cmpq $0x1, %rax
movq %rax, %r8
adcq $0x0, %r8
xorl %r9d, %r9d
movl (%rcx,%r9,4), %r10d
addl %esi, %r10d
js 0x1265
movl %r10d, %r10d
cmpq %r10, %rax
jbe 0x1265
incl (%rdi,%r10,4)
incq %r9
cmpq %r9, %r8
jne 0x1250
cmpq %rcx, %rdx
je 0x128e
cmpq $0x1, %rax
adcq $0x0, %rax
xorl %ecx, %ecx
cmpl $0x0, (%rdi,%rcx,4)
je 0x1297
incq %rcx
cmpq %rcx, %rax
jne 0x127c
xorl %ebx, %ebx
jmp 0x129d
xorl %ebx, %ebx
testq %rdi, %rdi
jne 0x129d
jmp 0x12a9
leal (%r15,%rcx), %ebx
incl %ebx
movq -0x28(%rbp), %rsi
subq %rdi, %rsi
callq 0x1070
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/byronknoll[P]paqclass/runner.cpp
// Function: exec(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
string exec(const string& cmd) {
    FILE* pipe = popen(cmd.c_str(), "r");
    if (!pipe) return "ERROR";
    char buffer[128];
    string result = "";
    while(!feof(pipe)) {
    	if(fgets(buffer, 128, pipe) != NULL)
    		result += buffer;
    }
    pclose(pipe);
    return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
movq (%rsi), %rdi
leaq 0x1bb9(%rip), %rsi      # 0x4020
callq 0x2090
testq %rax, %rax
je 0x24d2
movq %rax, %r14
leaq 0x10(%rbx), %r12
movq %r12, (%rbx)
leaq 0x1bcb(%rip), %rdx      # 0x404d
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x3256
movq %r14, %rdi
callq 0x2240
testl %eax, %eax
jne 0x24c8
movq %rsp, %r15
movq %r15, %rdi
movl $0x80, %esi
movq %r14, %rdx
callq 0x2260
testq %rax, %rax
je 0x24bc
movq %rbx, %rdi
movq %r15, %rsi
callq 0x22f0
movq %r14, %rdi
callq 0x2240
testl %eax, %eax
je 0x249c
movq %r14, %rdi
callq 0x21e0
jmp 0x24ef
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0x1b42(%rip), %rsi      # 0x4022
leaq 0x1b40(%rip), %rdx      # 0x4027
movq %rbx, %rdi
callq 0x3256
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x2518
movq (%r12), %rsi
incq %rsi
callq 0x21a0
movq %r14, %rdi
callq 0x22c0
// File: /workspace/github_cpp_makefile_star2_O3/sharmaeklavya2[P]ctmeans/src/lib/ctmeans.cpp
// Function: CTMeans::get_flat_U(std::vector<double, std::allocator<double>>&) const
void CTMeans::get_flat_U(std::vector<double>& flatu) const {
    flatu.clear();
    int flatu_size = 0;
    for(int i=0; i<n; ++i) {
        flatu_size += U[i].first.size();
    }
    flatu.reserve(flatu_size);
    for(int i=0; i<n; ++i) {
        const std::vector<double>& us = U[i].first;
        for(unsigned i2=0; i2<us.size(); ++i2) {
            flatu.push_back(us[i2]);
        }
    }
    std::sort(flatu.begin(), flatu.end(), std::greater<double>());
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rax
cmpq %rax, 0x8(%rsi)
je 0x3511
movq %rax, 0x8(%rbx)
movslq 0xc(%r14), %rcx
xorl %esi, %esi
testq %rcx, %rcx
jle 0x3545
movq 0x58(%r14), %rax
shlq $0x4, %rcx
leaq (%rcx,%rcx,2), %rcx
xorl %edx, %edx
movq 0x8(%rax,%rdx), %rdi
subq (%rax,%rdx), %rdi
shrq $0x3, %rdi
addl %edi, %esi
addq $0x30, %rdx
cmpq %rdx, %rcx
jne 0x352a
movslq %esi, %rsi
movq %rbx, %rdi
callq 0x3744
movl 0xc(%r14), %ecx
testl %ecx, %ecx
jle 0x35c9
xorl %r15d, %r15d
movq 0x58(%r14), %r12
leaq (%r15,%r15,2), %rdx
shlq $0x4, %rdx
movq (%r12,%rdx), %rax
cmpq %rax, 0x8(%r12,%rdx)
je 0x35be
addq %rdx, %r12
movl $0x1, %ebp
xorl %ecx, %ecx
leaq (%rax,%rcx,8), %rdx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x3599
movsd (%rdx), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x35a5
movq %rbx, %rdi
callq 0x485c
movq (%r12), %rax
movl %ebp, %ecx
movq 0x8(%r12), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
incl %ebp
cmpq %rcx, %rdx
ja 0x3579
movl 0xc(%r14), %ecx
incq %r15
movslq %ecx, %rax
cmpq %rax, %r15
jl 0x3558
movq (%rbx), %r14
movq 0x8(%rbx), %rbx
cmpq %rbx, %r14
je 0x360a
movq %rbx, %rax
subq %r14, %rax
sarq $0x3, %rax
bsrq %rax, %rdx
xorl $0x3f, %edx
addl %edx, %edx
xorq $0x7e, %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4b0f
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x4c08
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/sharmaeklavya2[P]ctmeans/src/lib/ctmeans.cpp
// Function: CTMeans::get_dense_U(Matrix&) const
void CTMeans::get_dense_U(Matrix& U2) const {
    for(int i=0; i<n; ++i) {
        const std::vector<double>& us = U[i].first;
        const std::vector<int>& indices = U[i].second;
        for(unsigned i2=0; i2<us.size(); ++i2) {
            U2(i, indices[i2]) = us[i2];
        }
    }
}

// Assembly:
movslq 0xc(%rdi), %rax
testq %rax, %rax
jle 0x36cc
pushq %r14
pushq %rbx
movq 0x58(%rdi), %rcx
movq 0x10(%rsi), %rdx
movslq 0x4(%rsi), %rsi
xorl %edi, %edi
leaq (%rdi,%rdi,2), %r10
shlq $0x4, %r10
movq (%rcx,%r10), %r8
movq 0x8(%rcx,%r10), %r9
subq %r8, %r9
je 0x36c1
addq %rcx, %r10
sarq $0x3, %r9
movq 0x18(%r10), %r10
movq %rdi, %r11
imulq %rsi, %r11
leaq (%rdx,%r11,8), %r11
xorl %ebx, %ebx
movsd (%r8,%rbx,8), %xmm0
movslq (%r10,%rbx,4), %r14
movsd %xmm0, (%r11,%r14,8)
incq %rbx
movl %ebx, %r14d
cmpq %r14, %r9
ja 0x36a6
incq %rdi
cmpq %rax, %rdi
jne 0x3678
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/sharmaeklavya2[P]ctmeans/src/lib/nniter_kd.h
// Function: NNIterKD::set_point(double const*)
void set_point(const double* _x_beg) {
        x_beg = _x_beg;
        pq = KDPQ();
        pq.emplace(root, C, x_beg);
        heap_ops = 0;
        counter = 0;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x48(%rdi), %r14
movq %rsi, 0x48(%rdi)
leaq 0x8(%rdi), %r15
movq 0x8(%rdi), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movq $0x0, 0x18(%rbx)
testq %rdi, %rdi
je 0x3899
callq 0x2130
leaq 0x40(%rbx), %rsi
leaq 0x28(%rbx), %rdx
movq %r15, %rdi
movq %r14, %rcx
callq 0x3ba8
movq $0x0, (%rbx)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/sharmaeklavya2[P]ctmeans/src/lib/nniter_kd.h
// Function: KDHeapElem::KDHeapElem(KDNode const*, Matrix const&, double const*)
KDHeapElem(const KDNode* _kdnode, const Matrix& X, const double* p2):
        kdnode(_kdnode), point(kdnode->point) {
        if(_kdnode->left == nullptr && _kdnode->right == nullptr) {
            type = 'p';
            prio = point_point_norm(X.cols(), p2, X.begin_row(_kdnode->point));
        }
        else {
            type = 'k';
            prio = point_range_norm(X.cols(), p2, kdnode->cmin.data(), kdnode->cmax.data());
        }
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq %rsi, (%rdi)
movl 0x4(%rsi), %eax
movl %eax, 0x8(%rdi)
cmpq $0x0, 0x10(%rsi)
jne 0x3e15
cmpq $0x0, 0x18(%rsi)
je 0x3e36
movb $0x6b, 0xc(%rbx)
movl 0x4(%rdx), %edi
movq 0x20(%rsi), %rdx
movq 0x38(%rsi), %rax
movq %rcx, %rsi
movq %rax, %rcx
callq 0x613b
movsd %xmm0, 0x10(%rbx)
popq %rbx
retq
movb $0x70, 0xc(%rbx)
movl 0x4(%rdx), %edi
imull %edi, %eax
cltq
shlq $0x3, %rax
addq 0x10(%rdx), %rax
movq %rcx, %rsi
movq %rax, %rdx
callq 0x6110
jmp 0x3e2f
nop
// File: /workspace/github_cpp_makefile_star2_O3/sharmaeklavya2[P]ctmeans/src/lib/kdtree.h
// Function: KDNode::~KDNode()
~KDNode() {
        parent = nullptr;
        delete left;
        delete right;
        left = nullptr;
        right = nullptr;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq $0x0, 0x8(%rdi)
movq 0x10(%rdi), %r14
testq %r14, %r14
je 0x3ef1
movq %r14, %rdi
callq 0x3ed0
leaq 0x10(%rbx), %r15
movq %r14, %rdi
callq 0x2130
movq 0x18(%rbx), %r14
testq %r14, %r14
je 0x3f0e
movq %r14, %rdi
callq 0x3ed0
movq %r14, %rdi
callq 0x2130
xorps %xmm0, %xmm0
movups %xmm0, (%r15)
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x3f2b
callq 0x2130
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x3f3e
popq %rbx
popq %r14
popq %r15
jmp 0x2130
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/sharmaeklavya2[P]ctmeans/src/lib/kdtree.cpp
// Function: get_kd_tree(Matrix const&)
KDNode* get_kd_tree(const Matrix& X) {
    std::vector<int> v;
    int n = X.rows();
    v.resize(n);
    for(int i=0; i<n; ++i) {
        v[i] = i;
    }
    return get_kd_tree(v.begin(), v.end(), X, 0, nullptr);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
pxor %xmm0, %xmm0
movq %rsp, %rdi
movdqa %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movslq (%rbx), %r14
movq %r14, %rsi
callq 0x39ce
testl %r14d, %r14d
jle 0x508b
movq (%rsp), %rax
leal 0x1(%r14), %ecx
andl $-0x2, %ecx
decq %r14
movq %r14, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
movdqa 0x3027(%rip), %xmm1     # 0x8040
xorl %edx, %edx
movdqa 0x302d(%rip), %xmm2     # 0x8050
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movdqa 0x30dd(%rip), %xmm4     # 0x8110
movdqa %xmm1, %xmm5
pxor %xmm2, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
movd %xmm5, %esi
notl %esi
testb $0x1, %sil
je 0x5068
movl %edx, (%rax,%rdx,4)
pxor %xmm3, %xmm5
pextrw $0x4, %xmm5, %esi
testb $0x1, %sil
je 0x507e
leal 0x1(%rdx), %esi
movl %esi, 0x4(%rax,%rdx,4)
addq $0x2, %rdx
paddq %xmm4, %xmm1
cmpq %rdx, %rcx
jne 0x5033
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x50d6
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x50b2
callq 0x2130
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x50ce
callq 0x2130
movq %rbx, %rdi
callq 0x2280
// File: /workspace/github_cpp_makefile_star2_O3/sharmaeklavya2[P]ctmeans/src/lib/kdtree.cpp
// Function: KDNode::print_nl(_IO_FILE*) const
void KDNode::print_nl(FILE* fp) const {
    fprintf(fp, "KD(%d, min=", point);
    print(fp, cmin.cbegin(), cmin.cend());
    fprintf(fp, ", max=");
    print(fp, cmax.cbegin(), cmax.cend());
    fprintf(fp, ")\n");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0x4(%rdi), %edx
leaq 0x2e34(%rip), %rsi      # 0x8120
movq %rbx, %rdi
xorl %eax, %eax
callq 0x21f0
movq 0x20(%r14), %rsi
movq 0x28(%r14), %rdx
movq %rbx, %rdi
callq 0x5494
leaq 0x2e1f(%rip), %rdi      # 0x812c
movl $0x6, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x22c0
movq 0x38(%r14), %rsi
movq 0x40(%r14), %rdx
movq %rbx, %rdi
callq 0x5494
leaq 0x2dfd(%rip), %rdi      # 0x8133
movl $0x2, %esi
movl $0x1, %edx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x22c0
// File: /workspace/github_cpp_makefile_star2_O3/sharmaeklavya2[P]ctmeans/src/lib/kdtree.cpp
// Function: print_kd_tree(_IO_FILE*, KDNode const*, int)
void print_kd_tree(FILE* fp, const KDNode* root, int indent) {
    if(root != nullptr)
    {
        for(int i=0; i<indent; ++i) {
            fprintf(fp, "  ");
        }
        root->print_nl(fp);
        print_kd_tree(fp, root->left, indent+1);
        print_kd_tree(fp, root->right, indent+1);
    }
}

// Assembly:
testq %rsi, %rsi
je 0x53b6
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x2dcb(%rip), %r12      # 0x8136
movl %ebx, %ebp
testl %ebx, %ebx
jle 0x538a
movl $0x2, %esi
movl $0x1, %edx
movq %r12, %rdi
movq %r15, %rcx
callq 0x22c0
decl %ebp
jne 0x5371
movq %r14, %rdi
movq %r15, %rsi
callq 0x52d8
movq 0x10(%r14), %rsi
incl %ebx
movq %r15, %rdi
movl %ebx, %edx
callq 0x534f
movq 0x18(%r14), %r14
testq %r14, %r14
jne 0x536b
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/sharmaeklavya2[P]ctmeans/src/lib/vecio.h
// Function: void print<__gnu_cxx::__normal_iterator<double const*, std::vector<double, std::allocator<double>>>>(_IO_FILE*, __gnu_cxx::__normal_iterator<double const*, std::vector<double, std::allocator<double>>>, __gnu_cxx::__normal_iterator<double const*, std::vector<double, std::allocator<double>>>)
void print(FILE* fp, IterT begin, IterT end) {
    fprintf(fp, "[");
    if(begin != end)
    {
        fprintf(fp, "%lf", double(*begin));
        IterT it = begin; it++;
        for(; it != end; ++it) {
            fprintf(fp, ", %lf", double(*it));
        }
    }
    fprintf(fp, "]");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl $0x5b, %edi
movq %rbx, %rsi
callq 0x21c0
cmpq %r14, %r15
je 0x54f8
movsd (%r15), %xmm0
leaq 0x2ca9(%rip), %rsi      # 0x816c
movq %rbx, %rdi
movb $0x1, %al
callq 0x21f0
addq $0x8, %r15
cmpq %r14, %r15
je 0x54f8
leaq 0x2c8d(%rip), %r12      # 0x816a
movsd (%r15), %xmm0
movq %rbx, %rdi
movq %r12, %rsi
movb $0x1, %al
callq 0x21f0
addq $0x8, %r15
cmpq %r14, %r15
jne 0x54dd
movl $0x5d, %edi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x21c0
// File: /workspace/github_cpp_makefile_star2_O3/sharmaeklavya2[P]ctmeans/src/lib/matrix.cpp
// Function: Matrix::_init(int, int, bool)
void Matrix::_init(int _m, int _n, bool zero) {
    m = _m; n = _n, mn = _m * _n;
    if(mn) {
        if(zero) {
            a = (MatrixElemType*)(std::calloc(mn, sizeof(MatrixElemType)));
        }
        else {
            a = (MatrixElemType*)(std::malloc(mn * sizeof(MatrixElemType)));
        }
    }
    else {a = nullptr;}
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl %esi, (%rdi)
movl %edx, 0x4(%rdi)
imull %esi, %edx
movl %edx, 0x8(%rdi)
testl %edx, %edx
je 0x5b16
movslq %edx, %rdi
testb %cl, %cl
je 0x5b1a
movl $0x8, %esi
callq 0x20b0
jmp 0x5b23
xorl %eax, %eax
jmp 0x5b23
shlq $0x3, %rdi
callq 0x21d0
movq %rax, 0x10(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/sharmaeklavya2[P]ctmeans/src/lib/matrix.cpp
// Function: Matrix::_init(Matrix const&)
void Matrix::_init(const Matrix& X) {
    m = X.m; n = X.n, mn = X.mn;
    if(mn) {
        a = (MatrixElemType*)(std::malloc(mn * sizeof(MatrixElemType)));
        std::memcpy(a, X.a, mn * sizeof(MatrixElemType));
    }
    else {a = nullptr;}
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
movq (%rsi), %rax
movq %rax, (%rdi)
movslq 0x8(%rsi), %r15
movl %r15d, 0x8(%rdi)
testq %r15, %r15
je 0x5b6c
movq %rsi, %rbx
shlq $0x3, %r15
movq %r15, %rdi
callq 0x21d0
movq %rax, 0x10(%r14)
movq 0x10(%rbx), %rsi
movq %rax, %rdi
movq %r15, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x20f0
movq $0x0, 0x10(%r14)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/sharmaeklavya2[P]ctmeans/src/lib/matrix.cpp
// Function: operator<<(std::ostream&, Matrix const&)
std::ostream& operator<<(std::ostream& os, const Matrix& X) {
    const char indent[] = "\t";
    int m = X.rows(), n = X.cols();
    for(int i=0; i<m; ++i) {
        os << X(i, 0);
        for(int j=1; j<n; ++j) {
            os << indent << X(i, j);
        }
        os << '\n';
    }
    return os;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movw $0x9, 0xe(%rsp)
movl (%rsi), %eax
movl %eax, 0x10(%rsp)
testl %eax, %eax
jle 0x5c3b
movq %rsi, %r14
movl 0x4(%rsi), %r13d
xorl %edx, %edx
leaq 0xe(%rsp), %r15
movq 0x10(%r14), %rax
movslq 0x4(%r14), %rcx
movl %edx, 0x14(%rsp)
movslq %edx, %rbp
imulq %rbp, %rcx
movsd (%rax,%rcx,8), %xmm0
movq %rbx, %rdi
callq 0x2240
cmpl $0x2, %r13d
jl 0x5c14
movl $0x1, %r12d
movq %r15, %rdi
callq 0x2080
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x2170
movq 0x10(%r14), %rax
movslq 0x4(%r14), %rcx
imulq %rbp, %rcx
addq %r12, %rcx
movsd (%rax,%rcx,8), %xmm0
movq %rbx, %rdi
callq 0x2240
incq %r12
cmpl %r12d, %r13d
jne 0x5bda
movb $0xa, 0xd(%rsp)
movl $0x1, %edx
movq %rbx, %rdi
leaq 0xd(%rsp), %rsi
callq 0x2170
movl 0x14(%rsp), %edx
incl %edx
cmpl 0x10(%rsp), %edx
jne 0x5bae
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/sharmaeklavya2[P]ctmeans/src/lib/matrix.cpp
// Function: output(_IO_FILE*, Matrix const&)
void output(FILE* fp, const Matrix& X) {
    const char indent[] = "\t";
    int m = X.rows(), n = X.cols();
    for(int i=0; i<m; ++i) {
        std::fprintf(fp, "%lf", X(i, 0));
        for(int j=1; j<n; ++j) {
            std::fprintf(fp, "%s%lf", indent, X(i, j));
        }
        std::fprintf(fp, "\n");
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movw $0x9, 0x6(%rsp)
movl (%rsi), %eax
movl %eax, 0x8(%rsp)
testl %eax, %eax
jle 0x5d28
movq %rsi, %rbx
movq %rdi, %r14
movl 0x4(%rsi), %r15d
xorl %edx, %edx
movq %rsi, 0x10(%rsp)
movq 0x10(%rbx), %rax
movslq 0x4(%rbx), %rcx
movl %edx, 0xc(%rsp)
movslq %edx, %rbp
imulq %rbp, %rcx
movsd (%rax,%rcx,8), %xmm0
movq %r14, %rdi
leaq 0x24c9(%rip), %rsi      # 0x816c
movb $0x1, %al
callq 0x21f0
cmpl $0x2, %r15d
leaq 0x24bb(%rip), %rsi      # 0x8170
leaq 0x6(%rsp), %rdx
jl 0x5d0b
movl $0x1, %r12d
movq 0x10(%rbx), %rax
movslq 0x4(%rbx), %rcx
imulq %rbp, %rcx
addq %r12, %rcx
movsd (%rax,%rcx,8), %xmm0
movq %r14, %rdi
movq %rsi, %r13
movb $0x1, %al
movq %rbp, %rbx
movq %r15, %rbp
movq %r14, %r15
movq %rdx, %r14
callq 0x21f0
movq %r14, %rdx
movq %r15, %r14
movq %rbp, %r15
movq %rbx, %rbp
movq 0x10(%rsp), %rbx
movq %r13, %rsi
incq %r12
cmpl %r12d, %r15d
jne 0x5cc2
movl $0xa, %edi
movq %r14, %rsi
callq 0x21c0
movl 0xc(%rsp), %edx
incl %edx
cmpl 0x8(%rsp), %edx
jne 0x5c81
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/sharmaeklavya2[P]ctmeans/src/lib/matrix.cpp
// Function: savetxt(char const*, Matrix const&)
void savetxt(const char* fname, const Matrix& X) {
    FILE* fp = fopen(fname, "w");
    if(fp == NULL) {
        fprintf(stderr, "Couldn't open %s\n", fname);
        perror("savetxt");
    }
    else {
        output(fp, X);
        fclose(fp);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x242d(%rip), %rsi      # 0x8176
callq 0x2180
testq %rax, %rax
je 0x5d6e
movq %rax, %r15
movq %rax, %rdi
movq %rbx, %rsi
callq 0x5c4d
movq %r15, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x2150
movq %r14, %rdi
callq 0x239f
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/sharmaeklavya2[P]ctmeans/src/lib/matrix.cpp
// Function: loadtxt(char const*, Matrix&)
void loadtxt(const char* fname, Matrix& X) {
    FILE* fp = fopen(fname, "r");
    if(fp == NULL) {
        fprintf(stderr, "Couldn't open %s\n", fname);
        perror("loadtxt");
    }
    else {
        input(fp, X);
        fclose(fp);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
leaq 0x23bd(%rip), %rsi      # 0x8192
callq 0x2180
testq %rax, %rax
je 0x5e22
movq %rax, %rbx
movslq 0x8(%r14), %r12
testq %r12, %r12
jle 0x5e0f
movq 0x10(%r14), %r14
leaq 0x2376(%rip), %r15      # 0x816c
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x22a0
addq $0x8, %r14
decq %r12
jne 0x5df6
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2150
movq %r15, %rdi
callq 0x23c8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/sharmaeklavya2[P]ctmeans/src/lib/nniter.cpp
// Function: NNIterSort::set_point(double const*)
void NNIterSort::set_point(const MatrixElemType* _x_beg) {
    x_beg = _x_beg;
    counter = 0;
    for(int i=0; i<c; ++i) {
        norms[i].second = i;
        double dist = 0;
        for(int j=0; j<d; ++j) {
            dist += (x_beg[j] - C(i, j)) * (x_beg[j] - C(i, j));
        }
        norms[i].first = dist;
    }
    // std::sort(norms.begin(), norms.end());
    std::make_heap(norms.begin(), norms.end(), std::greater<dipair>());
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rsi, 0x28(%rdi)
movl $0x0, 0x8(%rdi)
movslq (%rdi), %rcx
movq 0x30(%rdi), %rax
testq %rcx, %rcx
jle 0x5eaa
movl 0x4(%rdi), %edx
movq 0x20(%rdi), %r8
movslq 0x14(%rdi), %r9
shlq $0x3, %r9
xorl %r10d, %r10d
movq %r10, %r11
shlq $0x4, %r11
movl %r10d, 0x8(%rax,%r11)
xorpd %xmm0, %xmm0
testl %edx, %edx
jle 0x5e97
xorl %ebx, %ebx
movsd (%rsi,%rbx,8), %xmm1
subsd (%r8,%rbx,8), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm0
incq %rbx
cmpq %rbx, %rdx
jne 0x5e7c
addq %rax, %r11
movsd %xmm0, (%r11)
incq %r10
addq %r9, %r8
cmpq %rcx, %r10
jne 0x5e66
movq 0x38(%rdi), %rsi
leaq 0xf(%rsp), %rdx
movq %rax, %rdi
callq 0x5f60
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/sharmaeklavya2[P]ctmeans/src/lib/nniter.cpp
// Function: NNIterSort::get_neighbor()
typename NNIterSort::dipair NNIterSort::get_neighbor() {
    if(counter >= c) {
        fprintf(stderr, "NNIterSort: counter overflow\n");
    }
    // return norms[counter++];
    std::pop_heap(norms.begin(), norms.end() - counter, std::greater<dipair>());
    return norms[c - (++counter)];
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl 0x8(%rdi), %eax
cmpl (%rdi), %eax
jge 0x5f38
movq 0x30(%rbx), %rdi
movq 0x38(%rbx), %rsi
movslq %eax, %rcx
shlq $0x4, %rcx
subq %rcx, %rsi
movq %rsi, %rcx
subq %rdi, %rcx
cmpq $0x11, %rcx
jl 0x5f1b
leaq -0x10(%rsi), %rdx
movsd -0x10(%rsi), %xmm0
movl -0x8(%rsi), %ecx
movsd (%rdi), %xmm1
movsd %xmm1, -0x10(%rsi)
movl 0x8(%rdi), %eax
movl %eax, -0x8(%rsi)
subq %rdi, %rdx
sarq $0x4, %rdx
xorl %esi, %esi
callq 0x5fc0
movl 0x8(%rbx), %eax
movq 0x30(%rbx), %rdi
movslq (%rbx), %rcx
cltq
incq %rax
movl %eax, 0x8(%rbx)
subq %rax, %rcx
shlq $0x4, %rcx
movsd (%rdi,%rcx), %xmm0
movl 0x8(%rdi,%rcx), %eax
popq %rbx
retq
movq 0x6099(%rip), %rax      # 0xbfd8
movq (%rax), %rcx
leaq 0x2253(%rip), %rdi      # 0x819c
movl $0x1d, %esi
movl $0x1, %edx
callq 0x22c0
movl 0x8(%rbx), %eax
jmp 0x5ecd
// File: /workspace/github_cpp_makefile_star2_O3/sharmaeklavya2[P]ctmeans/src/lib/nniter_kd.cpp
// Function: point_point_norm(int, double const*, double const*)
double point_point_norm(int d, const double* p1, const double* p2) {
    double res = 0;
    for(int j=0; j<d; ++j) {
        double p = p1[j] - p2[j];
        res += p*p;
    }
    return res;
}

// Assembly:
testl %edi, %edi
jle 0x6137
movl %edi, %eax
xorpd %xmm0, %xmm0
xorl %ecx, %ecx
movsd (%rsi,%rcx,8), %xmm1
subsd (%rdx,%rcx,8), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm0
incq %rcx
cmpq %rcx, %rax
jne 0x611c
retq
xorps %xmm0, %xmm0
retq