LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: nmmmnu[P]HM3/net/sockets.cc
// Function: net::socket_create(net::SOCKET_TCP, char const*, unsigned short, unsigned short, unsigned char)
int socket_create(const SOCKET_TCP,  const char *ip, uint16_t const port, uint16_t const backlog, options_type const options) noexcept{
	int fd = socket(AF_INET , SOCK_STREAM , 0);

	if(fd < 0)
		return SOCKET_ERROR_CREATE;

	if (options & SOCKET_REUSEADDR)
	if (! socket_makeReuseAddr_(fd))
		socket_error_(fd, SOCKET_ERROR_OPTIONS);

	if (options & SOCKET_NONBLOCK)
	if (! socket_makeNonBlocking(fd) )
		socket_error_(fd, SOCKET_ERROR_NONBLOCK);

	if (options & SOCKET_TCPNODELAY)
	if (! socket_makeTCPNoDelay(fd) )
		socket_error_(fd, SOCKET_ERROR_NODELAY);

	if (options & SOCKET_KEEPALIVE)
	if (! socket_makeKeepAlive(fd) )
		socket_error_(fd, SOCKET_ERROR_KEEPALIVE);

	struct sockaddr_in address;

	address.sin_family = AF_INET;
	address.sin_addr.s_addr = INADDR_ANY;
	address.sin_port = htons(port);

	return socket_server_(fd, address, backlog);
}

// Assembly:
subq $0x38, %rsp
movb %cl, %al
movw %dx, %cx
movw %si, %dx
movq %rdi, 0x28(%rsp)
movw %dx, 0x26(%rsp)
movw %cx, 0x24(%rsp)
movb %al, 0x23(%rsp)
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x2090
movl %eax, 0x1c(%rsp)
cmpl $0x0, 0x1c(%rsp)
jge 0xaea8
movl $0xffffffff, 0x34(%rsp) # imm = 0xFFFFFFFF
jmp 0xaf9f
movzbl 0x23(%rsp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0xaed6
movl 0x1c(%rsp), %edi
callq 0xac00
testb $0x1, %al
jne 0xaed4
movl 0x1c(%rsp), %edi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0xb180
jmp 0xaed2
jmp 0xaed4
jmp 0xaed6
movzbl 0x23(%rsp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xaf04
movl 0x1c(%rsp), %edi
callq 0xabc0
testb $0x1, %al
jne 0xaf02
movl 0x1c(%rsp), %edi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0xb180
jmp 0xaf00
jmp 0xaf02
jmp 0xaf04
movzbl 0x23(%rsp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0xaf32
movl 0x1c(%rsp), %edi
callq 0xac30
testb $0x1, %al
jne 0xaf30
movl 0x1c(%rsp), %edi
movl $0xfffffffc, %esi       # imm = 0xFFFFFFFC
callq 0xb180
jmp 0xaf2e
jmp 0xaf30
jmp 0xaf32
movzbl 0x23(%rsp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0xaf60
movl 0x1c(%rsp), %edi
callq 0xac60
testb $0x1, %al
jne 0xaf5e
movl 0x1c(%rsp), %edi
movl $0xfffffffb, %esi       # imm = 0xFFFFFFFB
callq 0xb180
jmp 0xaf5c
jmp 0xaf5e
jmp 0xaf60
movw $0x2, 0xc(%rsp)
movl $0x0, 0x10(%rsp)
movzwl 0x26(%rsp), %edi
callq 0x2060
movw %ax, 0xe(%rsp)
movl 0x1c(%rsp), %edi
movzwl 0x24(%rsp), %edx
leaq 0xc(%rsp), %rsi
callq 0xb1a0
movl %eax, 0x8(%rsp)
jmp 0xaf97
movl 0x8(%rsp), %eax
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
movq %rax, %rdi
callq 0x2bf0
// File: nmmmnu[P]HM3/net/sockets.cc
// Function: net::socket_create(net::SOCKET_UNIX, char const*, unsigned short, unsigned char)
int socket_create(const SOCKET_UNIX, const char *path, uint16_t const backlog, options_type const options) noexcept{
	if (sizeof sockaddr_un::sun_path < strlen(path))
		return SOCKET_NAME_SIZE;


	int fd = socket(AF_UNIX , SOCK_STREAM , 0);

	if(fd < 0)
		return SOCKET_ERROR_CREATE;

	if (options & SOCKET_NONBLOCK)
	if (! socket_makeNonBlocking(fd) )
		socket_error_(fd, SOCKET_ERROR_NONBLOCK);

	struct sockaddr_un address;
	address.sun_family = AF_UNIX;
	strcpy(address.sun_path, path);

	unlink(address.sun_path);

	return socket_server_(fd, address, backlog);
}

// Assembly:
subq $0x98, %rsp
movb %dl, %al
movw %si, %cx
movq %rdi, 0x88(%rsp)
movw %cx, 0x86(%rsp)
movb %al, 0x85(%rsp)
movq 0x88(%rsp), %rdi
callq 0x20f0
movq %rax, %rcx
movl $0x6c, %eax
cmpq %rcx, %rax
jae 0xaffd
movl $0xfffffff8, 0x94(%rsp) # imm = 0xFFFFFFF8
jmp 0xb0b3
movl $0x1, %esi
xorl %edx, %edx
movl %esi, %edi
callq 0x2090
movl %eax, 0x80(%rsp)
cmpl $0x0, 0x80(%rsp)
jge 0xb02c
movl $0xffffffff, 0x94(%rsp) # imm = 0xFFFFFFFF
jmp 0xb0b3
movzbl 0x85(%rsp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0xb063
movl 0x80(%rsp), %edi
callq 0xabc0
testb $0x1, %al
jne 0xb061
movl 0x80(%rsp), %edi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0xb180
jmp 0xb05f
jmp 0xb061
jmp 0xb063
movw $0x1, 0x12(%rsp)
leaq 0x14(%rsp), %rdi
movq %rdi, (%rsp)
movq 0x88(%rsp), %rsi
callq 0x21d0
movq (%rsp), %rdi
callq 0x2110
movl 0x80(%rsp), %edi
movzwl 0x86(%rsp), %edx
leaq 0x12(%rsp), %rsi
callq 0xb240
movl %eax, 0xc(%rsp)
jmp 0xb0a8
movl 0xc(%rsp), %eax
movl %eax, 0x94(%rsp)
movl 0x94(%rsp), %eax
addq $0x98, %rsp
retq
movq %rax, %rdi
callq 0x2bf0
nopw (%rax,%rax)
// File: nmmmnu[P]HM3/net/sockets.cc
// Function: net::socket_poll_(int, short, int)
inline bool socket_poll_(int const fd, pollfd_event_type event, int const timeout){
	pollfd p;
	p.fd		= fd;
	p.events	= event;

	// size cast is for FreeBSD and OSX warning
	int const result = poll(&p, (nfds_t) 1, timeout);

	// we are still checking the result, because it could be -1
	return result == 1 && p.revents & event;
}

// Assembly:
subq $0x28, %rsp
movw %si, %ax
movl %edi, 0x24(%rsp)
movw %ax, 0x22(%rsp)
movl %edx, 0x1c(%rsp)
movl 0x24(%rsp), %eax
movl %eax, 0x14(%rsp)
movw 0x22(%rsp), %ax
movw %ax, 0x18(%rsp)
movl 0x1c(%rsp), %edx
leaq 0x14(%rsp), %rdi
movl $0x1, %esi
callq 0x22b0
movl %eax, 0x10(%rsp)
xorl %eax, %eax
cmpl $0x1, 0x10(%rsp)
movb %al, 0xf(%rsp)
jne 0xb170
movswl 0x1a(%rsp), %eax
movswl 0x22(%rsp), %ecx
andl %ecx, %eax
cmpl $0x0, %eax
setne %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
andb $0x1, %al
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: nmmmnu[P]HM3/net/sockets.cc
// Function: int net::socket_server_<sockaddr_in>(int, sockaddr_in&, unsigned short)
int socket_server_(int const fd, SOCKADDR &address, uint16_t const backlog){
	if (bind(fd, (struct sockaddr *) & address, sizeof address) < 0){
		::close(fd);
		return SOCKET_ERROR_BIND;
	}

	if (listen(fd, backlog ? backlog : SOMAXCONN) < 0){
		::close(fd);
		return SOCKET_ERROR_BACKLOG;
	}

	return fd;
}

// Assembly:
subq $0x28, %rsp
movw %dx, %ax
movl %edi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movw %ax, 0x16(%rsp)
movl 0x20(%rsp), %edi
movq 0x18(%rsp), %rsi
movl $0x10, %edx
callq 0x2080
cmpl $0x0, %eax
jge 0xb1e0
movl 0x20(%rsp), %edi
callq 0x2330
movl $0xfffffffa, 0x24(%rsp) # imm = 0xFFFFFFFA
jmp 0xb233
movl 0x20(%rsp), %eax
movl %eax, 0x10(%rsp)
cmpw $0x0, 0x16(%rsp)
je 0xb1fb
movzwl 0x16(%rsp), %eax
movl %eax, 0xc(%rsp)
jmp 0xb206
movl $0x1000, %eax           # imm = 0x1000
movl %eax, 0xc(%rsp)
jmp 0xb206
movl 0x10(%rsp), %edi
movl 0xc(%rsp), %esi
callq 0x2210
cmpl $0x0, %eax
jge 0xb22b
movl 0x20(%rsp), %edi
callq 0x2330
movl $0xfffffff9, 0x24(%rsp) # imm = 0xFFFFFFF9
jmp 0xb233
movl 0x20(%rsp), %eax
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopl (%rax)
// File: jcipar[P]stack-distance/src/rank-tree.cpp
// Function: RankTreeNode::RankTreeNode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, unsigned long)
RankTreeNode::RankTreeNode(string name, uint64_t weight) {
	_name = name;
	_subtreeWeight = 0;
	_weight = weight;
	_priority = rand();
	_left = nullptr;
	_right = nullptr;
	_parent = nullptr;
}

// Assembly:
subq $0x48, %rsp
movq %rsi, 0x18(%rsp)
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq %rdx, 0x30(%rsp)
movq 0x40(%rsp), %rdi
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x8(%rsp)
callq 0x21e0
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x2030
jmp 0x2450
movq 0x8(%rsp), %rax
movq $0x0, 0x20(%rax)
movq 0x30(%rsp), %rcx
movq %rcx, 0x28(%rax)
callq 0x2060
movl %eax, %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x30(%rax)
movq $0x0, 0x38(%rax)
movq $0x0, 0x40(%rax)
movq $0x0, 0x48(%rax)
addq $0x48, %rsp
retq
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
callq 0x20e0
movq 0x28(%rsp), %rdi
callq 0x2250
nopw %cs:(%rax,%rax)
// File: jcipar[P]stack-distance/src/rank-tree.cpp
// Function: RankTreeNode::~RankTreeNode()
RankTreeNode::~RankTreeNode() {
	if (_left != nullptr) {
		delete _left;
	}
	if (_right != nullptr) {
		delete _right;
	}
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x38(%rax)
je 0x2504
movq 0x18(%rsp), %rax
movq 0x38(%rax), %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, %rax
je 0x2502
movq 0x10(%rsp), %rdi
callq 0x24c0
movq 0x10(%rsp), %rdi
callq 0x2140
jmp 0x2504
movq 0x18(%rsp), %rax
cmpq $0x0, 0x40(%rax)
je 0x253a
movq 0x18(%rsp), %rax
movq 0x40(%rax), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, %rax
je 0x2538
movq 0x8(%rsp), %rdi
callq 0x24c0
movq 0x8(%rsp), %rdi
callq 0x2140
jmp 0x253a
movq 0x18(%rsp), %rdi
callq 0x20e0
addq $0x28, %rsp
retq
nopl (%rax)
// File: jcipar[P]stack-distance/src/rank-tree.cpp
// Function: RankTreeNode::print(int)
void RankTreeNode::print(int level) {
	for (int i=0; i< level; i++) {
		cout << "  ";
	}
	cout << _name 
	<< " " << _subtreeWeight
	<< " " << _priority 
	<< " " << Rank()
	<< endl;
	if (_left) {
		_left->print(level+1);
	} else { 
		for (int i=0; i< level+1; i++) {
			cout << "  ";
		}
		cout << "<empty subtree>\n";
	}

	if (_right) {
		_right->print(level+1);
	} else { 
		for (int i=0; i< level+1; i++) {
			cout << "  ";
		}
		cout << "<empty subtree>\n";
	}

}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movl $0x0, 0x18(%rsp)
movl 0x18(%rsp), %eax
cmpl 0x1c(%rsp), %eax
jge 0x25b9
movq 0x8a30(%rip), %rdi      # 0xafd0
leaq 0x4a5d(%rip), %rsi      # 0x7004
callq 0x2150
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
jmp 0x258f
movq 0x8(%rsp), %rsi
movq 0x8a0b(%rip), %rdi      # 0xafd0
callq 0x2130
movq %rax, %rdi
leaq 0x4a31(%rip), %rsi      # 0x7005
callq 0x2150
movq %rax, %rdi
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rsi
callq 0x2270
movq %rax, %rdi
leaq 0x4a11(%rip), %rsi      # 0x7005
callq 0x2150
movq %rax, %rdi
movq 0x8(%rsp), %rax
movl 0x30(%rax), %esi
callq 0x2240
movq %rax, %rdi
leaq 0x49f2(%rip), %rsi      # 0x7005
callq 0x2150
movq 0x8(%rsp), %rdi
movq %rax, (%rsp)
callq 0x2720
movq (%rsp), %rdi
movq %rax, %rsi
callq 0x2270
movq %rax, %rdi
movq 0x8984(%rip), %rsi      # 0xafc0
callq 0x2180
movq 0x8(%rsp), %rax
cmpq $0x0, 0x38(%rax)
je 0x2664
movq 0x8(%rsp), %rax
movq 0x38(%rax), %rdi
movl 0x1c(%rsp), %esi
addl $0x1, %esi
callq 0x2570
jmp 0x26ae
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
movl 0x1c(%rsp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jge 0x269b
movq 0x894e(%rip), %rdi      # 0xafd0
leaq 0x497b(%rip), %rsi      # 0x7004
callq 0x2150
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x266c
movq 0x892e(%rip), %rdi      # 0xafd0
leaq 0x495e(%rip), %rsi      # 0x7007
callq 0x2150
movq 0x8(%rsp), %rax
cmpq $0x0, 0x40(%rax)
je 0x26d1
movq 0x8(%rsp), %rax
movq 0x40(%rax), %rdi
movl 0x1c(%rsp), %esi
addl $0x1, %esi
callq 0x2570
jmp 0x271b
movl $0x0, 0x10(%rsp)
movl 0x10(%rsp), %eax
movl 0x1c(%rsp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jge 0x2708
movq 0x88e1(%rip), %rdi      # 0xafd0
leaq 0x490e(%rip), %rsi      # 0x7004
callq 0x2150
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x26d9
movq 0x88c1(%rip), %rdi      # 0xafd0
leaq 0x48f1(%rip), %rsi      # 0x7007
callq 0x2150
addq $0x28, %rsp
retq
// File: jcipar[P]stack-distance/src/rank-tree.cpp
// Function: RankTreeNode::Rank()
int64_t RankTreeNode::Rank() {
	if (root()) {
		return leftWeight();
	} else if (leftChild()) {
		return _parent->leftChildRank(leftWeight());
	} else {
		assert(rightChild());
		return _parent->rightChildRank(leftWeight());
	}
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x2f80
testb $0x1, %al
jne 0x273e
jmp 0x2752
movq 0x10(%rsp), %rdi
callq 0x31e0
movq %rax, 0x20(%rsp)
jmp 0x27dd
movq 0x10(%rsp), %rdi
callq 0x2c00
testb $0x1, %al
jne 0x2762
jmp 0x2789
movq 0x10(%rsp), %rdi
movq 0x48(%rdi), %rax
movq %rax, 0x8(%rsp)
callq 0x31e0
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x3020
movq %rax, 0x20(%rsp)
jmp 0x27dd
movq 0x10(%rsp), %rdi
callq 0x2c40
testb $0x1, %al
jne 0x2799
jmp 0x279b
jmp 0x27ba
leaq 0x49f4(%rip), %rdi      # 0x7196
leaq 0x48a4(%rip), %rsi      # 0x704d
movl $0xf5, %edx
leaq 0x4ae0(%rip), %rcx      # 0x7295
callq 0x20f0
movq 0x10(%rsp), %rdi
movq 0x48(%rdi), %rax
movq %rax, (%rsp)
callq 0x31e0
movq (%rsp), %rdi
movq %rax, %rsi
callq 0x30d0
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: jcipar[P]stack-distance/src/rank-tree.cpp
// Function: RankTreeNode::checkWeights()
int64_t RankTreeNode::checkWeights() {
	int64_t leftWeight = 0;
	int64_t rightWeight = 0;
	if (_left != nullptr) {
		leftWeight = _left->checkWeights();
	}
	if (_right != nullptr) {
		rightWeight = _right->checkWeights();
	}
	assert(_subtreeWeight == _weight + leftWeight + rightWeight);
	return _subtreeWeight;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movq $0x0, 0x18(%rsp)
movq $0x0, 0x10(%rsp)
cmpq $0x0, 0x38(%rax)
je 0x282f
movq 0x8(%rsp), %rax
movq 0x38(%rax), %rdi
callq 0x27f0
movq %rax, 0x18(%rsp)
movq 0x8(%rsp), %rax
cmpq $0x0, 0x40(%rax)
je 0x284e
movq 0x8(%rsp), %rax
movq 0x40(%rax), %rdi
callq 0x27f0
movq %rax, 0x10(%rsp)
movq 0x8(%rsp), %rcx
movq 0x20(%rcx), %rax
movq 0x28(%rcx), %rcx
addq 0x18(%rsp), %rcx
addq 0x10(%rsp), %rcx
cmpq %rcx, %rax
jne 0x286c
jmp 0x288b
leaq 0x47a5(%rip), %rdi      # 0x7018
leaq 0x47d3(%rip), %rsi      # 0x704d
movl $0x48, %edx
leaq 0x47d9(%rip), %rcx      # 0x705f
callq 0x20f0
movq 0x8(%rsp), %rax
movq 0x20(%rax), %rax
addq $0x28, %rsp
retq
nopl (%rax)
// File: jcipar[P]stack-distance/src/rank-tree.cpp
// Function: RankTreeNode::checkPriorities(int)
void RankTreeNode::checkPriorities(int parentPriority) {
	assert(_priority <= parentPriority);
	if (_left != nullptr) {
		_left->checkPriorities(_priority);
	}
	if (_right != nullptr) {
		_right->checkPriorities(_priority);
	}
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl %esi, 0xc(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movl 0x30(%rax), %eax
cmpl 0xc(%rsp), %eax
jg 0x28c1
jmp 0x28e0
leaq 0x47bc(%rip), %rdi      # 0x7084
leaq 0x477e(%rip), %rsi      # 0x704d
movl $0x4e, %edx
leaq 0x47c5(%rip), %rcx      # 0x70a0
callq 0x20f0
movq (%rsp), %rax
cmpq $0x0, 0x38(%rax)
je 0x28fb
movq (%rsp), %rax
movq 0x38(%rax), %rdi
movl 0x30(%rax), %esi
callq 0x28a0
movq (%rsp), %rax
cmpq $0x0, 0x40(%rax)
je 0x2916
movq (%rsp), %rax
movq 0x40(%rax), %rdi
movl 0x30(%rax), %esi
callq 0x28a0
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: jcipar[P]stack-distance/src/rank-tree.cpp
// Function: RankTreeNode::checkParentPointers(RankTreeNode*)
void RankTreeNode::checkParentPointers(RankTreeNode* parent) {
	assert(_parent == parent);
	if (_left != nullptr) {
		_left->checkParentPointers(this);
	}
	if (_right != nullptr) {
		_right->checkParentPointers(this);
	}
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x48(%rax), %rax
cmpq 0x8(%rsp), %rax
jne 0x2944
jmp 0x2963
leaq 0x477d(%rip), %rdi      # 0x70c8
leaq 0x46fb(%rip), %rsi      # 0x704d
movl $0x59, %edx
leaq 0x477c(%rip), %rcx      # 0x70da
callq 0x20f0
movq (%rsp), %rax
cmpq $0x0, 0x38(%rax)
je 0x297b
movq (%rsp), %rsi
movq 0x38(%rsi), %rdi
callq 0x2920
movq (%rsp), %rax
cmpq $0x0, 0x40(%rax)
je 0x2993
movq (%rsp), %rsi
movq 0x40(%rsi), %rdi
callq 0x2920
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: jcipar[P]stack-distance/src/rank-tree.cpp
// Function: RankTreeNode::checkUniqueness(std::set<RankTreeNode*, std::less<RankTreeNode*>, std::allocator<RankTreeNode*>>&)
void RankTreeNode::checkUniqueness(std::set<RankTreeNode*>& ptrs) {
	assert(ptrs.count(this) == 0);
	ptrs.insert(this);
	if (_left != nullptr) {
		_left->checkUniqueness(ptrs);
	}
	if (_right != nullptr) {
		_right->checkUniqueness(ptrs);
	}
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq 0x30(%rsp), %rax
movq %rax, (%rsp)
movq 0x28(%rsp), %rdi
movq %rax, 0x20(%rsp)
leaq 0x20(%rsp), %rsi
callq 0x3710
cmpq $0x0, %rax
jne 0x29d3
jmp 0x29f2
leaq 0x4737(%rip), %rdi      # 0x7111
leaq 0x466c(%rip), %rsi      # 0x704d
movl $0x64, %edx
leaq 0x473a(%rip), %rcx      # 0x7127
callq 0x20f0
movq (%rsp), %rax
movq 0x28(%rsp), %rdi
movq %rax, 0x18(%rsp)
leaq 0x18(%rsp), %rsi
callq 0x3770
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x8(%rsp)
movb %dl, 0x10(%rsp)
cmpq $0x0, 0x38(%rax)
je 0x2a33
movq (%rsp), %rax
movq 0x38(%rax), %rdi
movq 0x28(%rsp), %rsi
callq 0x29a0
movq (%rsp), %rax
cmpq $0x0, 0x40(%rax)
je 0x2a50
movq (%rsp), %rax
movq 0x40(%rax), %rdi
movq 0x28(%rsp), %rsi
callq 0x29a0
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: jcipar[P]stack-distance/src/rank-tree.cpp
// Function: RankTreeNode::promote()
void RankTreeNode::promote() {
	assert(_parent != nullptr);
	auto A = _parent;
	auto GP = _parent->_parent;
	if (leftChild()) {
		auto E = _right;
		_right = A;
		A->_parent = this;
		A->_left = E;
		if (E != nullptr) {
			E->_parent = A;
		}
	} else {
		assert(rightChild());
		auto E = _left;
		_left = A;
		A->_parent = this;
		A->_right = E;
		if (E != nullptr) {
			E->_parent = A;
		}
	}
	_parent = GP;
	if (GP != nullptr) {
		if (GP->_left == A) {
			GP->_left = this;
		} else {
			assert(GP->_right == A);
			GP->_right = this;
		}
	}
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x48(%rax)
je 0x2a7c
jmp 0x2a9b
leaq 0x46e3(%rip), %rdi      # 0x7166
leaq 0x45c3(%rip), %rsi      # 0x704d
movl $0x79, %edx
leaq 0x46e3(%rip), %rcx      # 0x7179
callq 0x20f0
movq 0x8(%rsp), %rdi
movq 0x48(%rdi), %rax
movq %rax, 0x28(%rsp)
movq 0x48(%rdi), %rax
movq 0x48(%rax), %rax
movq %rax, 0x20(%rsp)
callq 0x2c00
testb $0x1, %al
jne 0x2ac1
jmp 0x2b07
movq 0x8(%rsp), %rcx
movq 0x40(%rcx), %rax
movq %rax, 0x18(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x40(%rcx)
movq 0x28(%rsp), %rax
movq %rcx, 0x48(%rax)
movq 0x18(%rsp), %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x38(%rax)
cmpq $0x0, 0x18(%rsp)
je 0x2b05
movq 0x28(%rsp), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x48(%rax)
jmp 0x2b7e
movq 0x8(%rsp), %rdi
callq 0x2c40
testb $0x1, %al
jne 0x2b17
jmp 0x2b19
jmp 0x2b38
leaq 0x4676(%rip), %rdi      # 0x7196
leaq 0x4526(%rip), %rsi      # 0x704d
movl $0x85, %edx
leaq 0x4646(%rip), %rcx      # 0x7179
callq 0x20f0
movq 0x8(%rsp), %rcx
movq 0x38(%rcx), %rax
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x38(%rcx)
movq 0x28(%rsp), %rax
movq %rcx, 0x48(%rax)
movq 0x10(%rsp), %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x40(%rax)
cmpq $0x0, 0x10(%rsp)
je 0x2b7c
movq 0x28(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x48(%rax)
jmp 0x2b7e
movq 0x8(%rsp), %rax
movq 0x20(%rsp), %rcx
movq %rcx, 0x48(%rax)
cmpq $0x0, 0x20(%rsp)
je 0x2bf5
movq 0x20(%rsp), %rax
movq 0x38(%rax), %rax
cmpq 0x28(%rsp), %rax
jne 0x2bb4
movq 0x8(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x38(%rax)
jmp 0x2bf3
movq 0x20(%rsp), %rax
movq 0x40(%rax), %rax
cmpq 0x28(%rsp), %rax
jne 0x2bc6
jmp 0x2be5
leaq 0x45d6(%rip), %rdi      # 0x71a3
leaq 0x4479(%rip), %rsi      # 0x704d
movl $0x93, %edx
leaq 0x4599(%rip), %rcx      # 0x7179
callq 0x20f0
movq 0x8(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x40(%rax)
jmp 0x2bf5
addq $0x38, %rsp
retq
nopw (%rax,%rax)
// File: jcipar[P]stack-distance/src/rank-tree.cpp
// Function: RankTreeNode::demote()
RankTreeNode* RankTreeNode::demote() {
	assert(!leaf());
	RankTreeNode* ret;
	if (_left == nullptr) {
		ret = _right;
	} else if (_right == nullptr) {
		ret = _left;
	} else {
		assert(_left != nullptr and _right != nullptr);
		if (_left->_priority >= _right->_priority) {
			ret = _left;
		} else {
			ret = _right;
		}
	}
	ret->promote();
	return ret;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x2da0
xorb $-0x1, %al
testb $0x1, %al
jne 0x2ca0
jmp 0x2ca2
jmp 0x2cc1
leaq 0x450a(%rip), %rdi      # 0x71b3
leaq 0x439d(%rip), %rsi      # 0x704d
movl $0x9b, %edx
leaq 0x44ff(%rip), %rcx      # 0x71bb
callq 0x20f0
movq 0x10(%rsp), %rax
cmpq $0x0, 0x38(%rax)
jne 0x2ce0
movq 0x10(%rsp), %rax
movq 0x40(%rax), %rax
movq %rax, 0x18(%rsp)
jmp 0x2d84
movq 0x10(%rsp), %rax
cmpq $0x0, 0x40(%rax)
jne 0x2cff
movq 0x10(%rsp), %rax
movq 0x38(%rax), %rax
movq %rax, 0x18(%rsp)
jmp 0x2d82
movq 0x10(%rsp), %rcx
xorl %eax, %eax
cmpq $0x0, 0x38(%rcx)
movb %al, 0xf(%rsp)
je 0x2d22
movq 0x10(%rsp), %rax
cmpq $0x0, 0x40(%rax)
setne %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x2d2c
jmp 0x2d2e
jmp 0x2d4d
leaq 0x44ab(%rip), %rdi      # 0x71e0
leaq 0x4311(%rip), %rsi      # 0x704d
movl $0xa2, %edx
leaq 0x4473(%rip), %rcx      # 0x71bb
callq 0x20f0
movq 0x10(%rsp), %rcx
movq 0x38(%rcx), %rax
movl 0x30(%rax), %eax
movq 0x40(%rcx), %rcx
cmpl 0x30(%rcx), %eax
jl 0x2d72
movq 0x10(%rsp), %rax
movq 0x38(%rax), %rax
movq %rax, 0x18(%rsp)
jmp 0x2d80
movq 0x10(%rsp), %rax
movq 0x40(%rax), %rax
movq %rax, 0x18(%rsp)
jmp 0x2d82
jmp 0x2d84
movq 0x18(%rsp), %rdi
callq 0x2a60
movq 0x18(%rsp), %rax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: jcipar[P]stack-distance/src/rank-tree.cpp
// Function: RankTreeNode::unlink()
void RankTreeNode::unlink() {
	assert(leaf());
	if (_parent == nullptr) {
		return;
	}
	if (_parent->_right == this) {
		_parent->_right = nullptr;
	} else {
		assert(_parent->_left == this);
		_parent->_left = nullptr;
	}
	_parent->fixWeights();
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x2da0
testb $0x1, %al
jne 0x2dfe
jmp 0x2e00
jmp 0x2e1f
leaq 0x43ad(%rip), %rdi      # 0x71b4
leaq 0x423f(%rip), %rsi      # 0x704d
movl $0xaf, %edx
leaq 0x43ed(%rip), %rcx      # 0x7207
callq 0x20f0
movq 0x8(%rsp), %rax
cmpq $0x0, 0x48(%rax)
jne 0x2e2d
jmp 0x2e9e
movq 0x8(%rsp), %rcx
movq 0x48(%rcx), %rax
cmpq %rcx, 0x40(%rax)
jne 0x2e4f
movq 0x8(%rsp), %rax
movq 0x48(%rax), %rax
movq $0x0, 0x40(%rax)
jmp 0x2e90
movq 0x8(%rsp), %rcx
movq 0x48(%rcx), %rax
cmpq %rcx, 0x38(%rax)
jne 0x2e60
jmp 0x2e7f
leaq 0x43bc(%rip), %rdi      # 0x7223
leaq 0x41df(%rip), %rsi      # 0x704d
movl $0xb6, %edx
leaq 0x438d(%rip), %rcx      # 0x7207
callq 0x20f0
movq 0x8(%rsp), %rax
movq 0x48(%rax), %rax
movq $0x0, 0x38(%rax)
movq 0x8(%rsp), %rax
movq 0x48(%rax), %rdi
callq 0x2eb0
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: jcipar[P]stack-distance/src/rank-tree.cpp
// Function: RankTreeNode::makeLeaf()
RankTreeNode* RankTreeNode::makeLeaf() {
	RankTreeNode* ret = nullptr;
	while(!leaf()) {
		if (root()) {
			ret = demote();
		} else {
			demote();
		}
	}
	return ret;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq $0x0, 0x8(%rsp)
movq (%rsp), %rdi
callq 0x2da0
xorb $-0x1, %al
testb $0x1, %al
jne 0x2f4c
jmp 0x2f76
movq (%rsp), %rdi
callq 0x2f80
testb $0x1, %al
jne 0x2f5b
jmp 0x2f6b
movq (%rsp), %rdi
callq 0x2c80
movq %rax, 0x8(%rsp)
jmp 0x2f74
movq (%rsp), %rdi
callq 0x2c80
jmp 0x2f3b
movq 0x8(%rsp), %rax
addq $0x18, %rsp
retq
// File: jcipar[P]stack-distance/src/rank-tree.cpp
// Function: RankTreeNode::fixPriority()
bool RankTreeNode::fixPriority() {
	while(_parent != nullptr
		  and _parent->_priority < _priority) {
		promote();
	}
	if (_parent == nullptr) {
		return true;
	} else {
		return false;
	}
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rcx
xorl %eax, %eax
cmpq $0x0, 0x48(%rcx)
movb %al, 0xf(%rsp)
je 0x2fdb
movq 0x10(%rsp), %rcx
movq 0x48(%rcx), %rax
movl 0x30(%rax), %eax
cmpl 0x30(%rcx), %eax
setl %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x2fe5
jmp 0x2ff1
movq 0x10(%rsp), %rdi
callq 0x2a60
jmp 0x2fb3
movq 0x10(%rsp), %rax
cmpq $0x0, 0x48(%rax)
jne 0x3004
movb $0x1, 0x27(%rsp)
jmp 0x3009
movb $0x0, 0x27(%rsp)
movb 0x27(%rsp), %al
andb $0x1, %al
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: jcipar[P]stack-distance/src/rank-tree.cpp
// Function: RankTreeNode::leftChildRank(long)
int64_t RankTreeNode::leftChildRank(int64_t rank) {
	if (root()) {
		return rank;
	} else if (leftChild()) {
		return _parent->leftChildRank(rank);
	} else {
		assert(rightChild());
		return _parent->rightChildRank(rank);
	}
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x2f80
testb $0x1, %al
jne 0x3043
jmp 0x304f
movq 0x10(%rsp), %rax
movq %rax, 0x20(%rsp)
jmp 0x30c2
movq 0x8(%rsp), %rdi
callq 0x2c00
testb $0x1, %al
jne 0x305f
jmp 0x3079
movq 0x8(%rsp), %rax
movq 0x48(%rax), %rdi
movq 0x10(%rsp), %rsi
callq 0x3020
movq %rax, 0x20(%rsp)
jmp 0x30c2
movq 0x8(%rsp), %rdi
callq 0x2c40
testb $0x1, %al
jne 0x3089
jmp 0x308b
jmp 0x30aa
leaq 0x4104(%rip), %rdi      # 0x7196
leaq 0x3fb4(%rip), %rsi      # 0x704d
movl $0xdd, %edx
leaq 0x4195(%rip), %rcx      # 0x723a
callq 0x20f0
movq 0x8(%rsp), %rax
movq 0x48(%rax), %rdi
movq 0x10(%rsp), %rsi
callq 0x30d0
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopl (%rax)
// File: jcipar[P]stack-distance/src/rank-tree.cpp
// Function: RankTreeNode::rightChildRank(long)
int64_t RankTreeNode::rightChildRank(int64_t rank) {
	if (root()) {
		return _weight + rank + leftWeight();
	} else if (leftChild()) {
		return _parent->leftChildRank(_weight + rank + leftWeight());
	} else {
		assert(rightChild());
		return _parent->rightChildRank(_weight + rank + leftWeight());
	}
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq 0x38(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x2f80
testb $0x1, %al
jne 0x30f3
jmp 0x3120
movq 0x28(%rsp), %rdi
movq 0x28(%rdi), %rax
addq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
callq 0x31e0
movq %rax, %rcx
movq 0x20(%rsp), %rax
addq %rcx, %rax
movq %rax, 0x40(%rsp)
jmp 0x31d1
movq 0x28(%rsp), %rdi
callq 0x2c00
testb $0x1, %al
jne 0x3130
jmp 0x316a
movq 0x28(%rsp), %rdi
movq 0x48(%rdi), %rax
movq %rax, 0x18(%rsp)
movq 0x28(%rdi), %rax
addq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
callq 0x31e0
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdi
addq %rax, %rsi
callq 0x3020
movq %rax, 0x40(%rsp)
jmp 0x31d1
movq 0x28(%rsp), %rdi
callq 0x2c40
testb $0x1, %al
jne 0x317a
jmp 0x317c
jmp 0x319b
leaq 0x4013(%rip), %rdi      # 0x7196
leaq 0x3ec3(%rip), %rsi      # 0x704d
movl $0xe9, %edx
leaq 0x40d1(%rip), %rcx      # 0x7267
callq 0x20f0
movq 0x28(%rsp), %rdi
movq 0x48(%rdi), %rax
movq %rax, 0x8(%rsp)
movq 0x28(%rdi), %rax
addq 0x30(%rsp), %rax
movq %rax, (%rsp)
callq 0x31e0
movq (%rsp), %rsi
movq 0x8(%rsp), %rdi
addq %rax, %rsi
callq 0x30d0
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
nopl (%rax,%rax)
// File: jcipar[P]stack-distance/src/rank-tree.cpp
// Function: RankTreeNode::leftWeight()
int64_t RankTreeNode::leftWeight() {
	if (_left != nullptr) {
		return _left->_subtreeWeight;
	} else {
		return 0;
	}
}

// Assembly:
movq %rdi, -0x10(%rsp)
movq -0x10(%rsp), %rax
movq %rax, -0x18(%rsp)
cmpq $0x0, 0x38(%rax)
je 0x320a
movq -0x18(%rsp), %rax
movq 0x38(%rax), %rax
movq 0x20(%rax), %rax
movq %rax, -0x8(%rsp)
jmp 0x3213
movq $0x0, -0x8(%rsp)
movq -0x8(%rsp), %rax
retq
nopl (%rax)
// File: jcipar[P]stack-distance/src/rank-tree.cpp
// Function: RankTree::first()
RankTreeNode* RankTree::first() {
	if (_root == nullptr) {
		return nullptr;
	}
	RankTreeNode* node = _root;
	while (node->_left != nullptr) {
		node = node->_left;
	}
	return node;
}

// Assembly:
movq %rdi, -0x10(%rsp)
movq -0x10(%rsp), %rax
movq %rax, -0x20(%rsp)
cmpq $0x0, (%rax)
jne 0x32b0
movq $0x0, -0x8(%rsp)
jmp 0x32e3
movq -0x20(%rsp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rsp)
movq -0x18(%rsp), %rax
cmpq $0x0, 0x38(%rax)
je 0x32d9
movq -0x18(%rsp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x18(%rsp)
jmp 0x32bd
movq -0x18(%rsp), %rax
movq %rax, -0x8(%rsp)
movq -0x8(%rsp), %rax
retq
nopl (%rax)
// File: jcipar[P]stack-distance/src/rank-tree.cpp
// Function: RankTree::last()
RankTreeNode* RankTree::last() {
	if (_root == nullptr) {
		return nullptr;
	}
	RankTreeNode* node = _root;
	while(node->_right != nullptr) {
		node = node->_right;
	}
	return node;
}

// Assembly:
movq %rdi, -0x10(%rsp)
movq -0x10(%rsp), %rax
movq %rax, -0x20(%rsp)
cmpq $0x0, (%rax)
jne 0x3310
movq $0x0, -0x8(%rsp)
jmp 0x3343
movq -0x20(%rsp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rsp)
movq -0x18(%rsp), %rax
cmpq $0x0, 0x40(%rax)
je 0x3339
movq -0x18(%rsp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x18(%rsp)
jmp 0x331d
movq -0x18(%rsp), %rax
movq %rax, -0x8(%rsp)
movq -0x8(%rsp), %rax
retq
nopl (%rax)
// File: jcipar[P]stack-distance/src/rank-tree.cpp
// Function: RankTreeNode::rightWeight()
int64_t RankTreeNode::rightWeight() {
	if (_right != nullptr) {
		return _right->_subtreeWeight;
	} else {
		return 0;
	}
}

// Assembly:
movq %rdi, -0x10(%rsp)
movq -0x10(%rsp), %rax
movq %rax, -0x18(%rsp)
cmpq $0x0, 0x40(%rax)
je 0x337a
movq -0x18(%rsp), %rax
movq 0x40(%rax), %rax
movq 0x20(%rax), %rax
movq %rax, -0x8(%rsp)
jmp 0x3383
movq $0x0, -0x8(%rsp)
movq -0x8(%rsp), %rax
retq
nopl (%rax)
// File: jcipar[P]stack-distance/src/rank-tree.cpp
// Function: RankTree::InsertNode(RankTreeNode*)
void RankTree::InsertNode(RankTreeNode* node) {
	if (_root == nullptr) {
		_root = node;
	} else {
		auto first_ = first();
		first_->_left = node;
		node->_parent = first_;
		if(node->fixPriority()) {
			_root = node;
		}
	}
	node->fixWeights();
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, (%rax)
jne 0x349d
movq 0x8(%rsp), %rax
movq 0x18(%rsp), %rcx
movq %rcx, (%rax)
jmp 0x34e7
movq 0x8(%rsp), %rdi
callq 0x3290
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x38(%rax)
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x48(%rax)
movq 0x18(%rsp), %rdi
callq 0x2fa0
testb $0x1, %al
jne 0x34d8
jmp 0x34e5
movq 0x8(%rsp), %rax
movq 0x18(%rsp), %rcx
movq %rcx, (%rax)
jmp 0x34e7
movq 0x18(%rsp), %rdi
callq 0x2eb0
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: jcipar[P]stack-distance/src/rank-tree.cpp
// Function: RankTree::print()
void RankTree::print() {
	if (_root == nullptr) {
		cout << "<Empty tree>\n";
		return;
	}
	_root->print(0);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, (%rax)
jne 0x352e
movq 0x7ab0(%rip), %rdi      # 0xafd0
leaq 0x3d8b(%rip), %rsi      # 0x72b2
callq 0x2150
jmp 0x353d
movq 0x8(%rsp), %rax
movq (%rax), %rdi
xorl %esi, %esi
callq 0x2570
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: jcipar[P]stack-distance/src/rank-tree.cpp
// Function: RankTree::check()
void RankTree::check() {
	if (_root != nullptr) {
		_root->checkPriorities(_root->_priority);
		_root->checkParentPointers(nullptr);
		_root->checkWeights();
		std::set<RankTreeNode*> nodes;
		_root->checkUniqueness(nodes);
	}
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq 0x50(%rsp), %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, (%rax)
je 0x35de
movq 0x8(%rsp), %rax
movq (%rax), %rdi
movl 0x30(%rdi), %esi
callq 0x28a0
movq 0x8(%rsp), %rax
movq (%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2920
movq 0x8(%rsp), %rax
movq (%rax), %rdi
callq 0x27f0
leaq 0x20(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x37d0
movq 0x8(%rsp), %rax
movq (%rsp), %rsi
movq (%rax), %rdi
callq 0x29a0
jmp 0x35b8
leaq 0x20(%rsp), %rdi
callq 0x37e0
jmp 0x35de
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x37e0
jmp 0x35e3
addq $0x58, %rsp
retq
movq 0x18(%rsp), %rdi
callq 0x2250
nopl (%rax)
// File: jcipar[P]stack-distance/src/rank-tree.cpp
// Function: RankTree::Remove(RankTreeNode*)
void RankTree::Remove(RankTreeNode* node) {
	auto newRoot = node->makeLeaf();
	if (newRoot != nullptr) {
		_root = newRoot;
	}
	if (_root == node) {
		_root = nullptr;
	} else {
		node->unlink();
	}
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rdi
callq 0x2f20
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
je 0x362c
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
movq %rcx, (%rax)
movq 0x8(%rsp), %rax
movq (%rax), %rax
cmpq 0x18(%rsp), %rax
jne 0x3649
movq 0x8(%rsp), %rax
movq $0x0, (%rax)
jmp 0x3653
movq 0x18(%rsp), %rdi
callq 0x2de0
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: jcipar[P]stack-distance/src/rank-tree.cpp
// Function: RankTree::computeSize()
int64_t RankTree::computeSize() {
	if (_root == nullptr) {
		return 0;
	} else {
		return _root->computeSize();
	}
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq %rax, (%rsp)
cmpq $0x0, (%rax)
jne 0x3683
movq $0x0, 0x10(%rsp)
jmp 0x3694
movq (%rsp), %rax
movq (%rax), %rdi
callq 0x36a0
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
addq $0x18, %rsp
retq
nop
// File: jcipar[P]stack-distance/src/rank-tree.cpp
// Function: RankTreeNode::computeSize()
size_t RankTreeNode::computeSize() {
	size_t size = 1;
	if (_left) {
		size += _left->computeSize();
	}
	if (_right) {
		size += _right->computeSize();
	}
	return size;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq $0x1, 0x8(%rsp)
cmpq $0x0, 0x38(%rax)
je 0x36d9
movq (%rsp), %rax
movq 0x38(%rax), %rdi
callq 0x36a0
addq 0x8(%rsp), %rax
movq %rax, 0x8(%rsp)
movq (%rsp), %rax
cmpq $0x0, 0x40(%rax)
je 0x36fb
movq (%rsp), %rax
movq 0x40(%rax), %rdi
callq 0x36a0
addq 0x8(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
nop
// File: jcipar[P]stack-distance/src/stack-simulator.cpp
// Function: StackSimulator::Reference(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, unsigned long)
int64_t StackSimulator::Reference(string key, uint64_t weight) {
	if (_objectNodeMap.count(key) == 0) {
		_objectNodeMap[key] = _lruTree.Insert(key, weight);
		return INT64_MAX;
	} else {
		auto node = _objectNodeMap[key];
		int64_t rank = node->Rank();
		_lruTree.Remove(node);
		node->setWeight(weight);
		_lruTree.InsertNode(node);
		return rank;
	}
}

// Assembly:
subq $0x88, %rsp
movq %rsi, 0x18(%rsp)
movq %rdi, 0x78(%rsp)
movq %rsi, 0x70(%rsp)
movq %rdx, 0x68(%rsp)
movq 0x78(%rsp), %rdi
movq %rdi, 0x20(%rsp)
addq $0x8, %rdi
callq 0x4740
cmpq $0x0, %rax
jne 0x4624
movq 0x18(%rsp), %rsi
leaq 0x48(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x20b0
movq 0x20(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq 0x68(%rsp), %rdx
callq 0x3390
movq %rax, 0x10(%rsp)
jmp 0x45c7
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdi
addq $0x8, %rdi
callq 0x4770
movq %rax, (%rsp)
jmp 0x45e0
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
movq %rcx, (%rax)
leaq 0x48(%rsp), %rdi
callq 0x20e0
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
movq %rax, 0x80(%rsp)
jmp 0x4688
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x20e0
jmp 0x4698
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
addq $0x8, %rdi
callq 0x4770
movq (%rax), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rdi
callq 0x2720
movq 0x20(%rsp), %rdi
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rsi
callq 0x35f0
movq 0x30(%rsp), %rdi
movq 0x68(%rsp), %rsi
callq 0x2550
movq 0x20(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x3470
movq 0x28(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x80(%rsp), %rax
addq $0x88, %rsp
retq
movq 0x40(%rsp), %rdi
callq 0x2250
nopw %cs:(%rax,%rax)
// File: jcipar[P]stack-distance/src/main.cpp
// Function: main
int main(int argc, char** argv) {
	StackSimulator simulator;
	bool weights = hasFlag("--weight", argc, argv);
	while (not cin.eof()) {
		string s;
		uint64_t weight = 1;
		cin >> s;
		if (weights) {
			cin >> weight;
		}
		cout << simulator.Reference(s, weight) << endl;
	}
	return 0;
}

// Assembly:
subq $0x108, %rsp            # imm = 0x108
movl $0x0, 0x104(%rsp)
movl %edi, 0x100(%rsp)
movq %rsi, 0xf8(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0x6180
leaq 0x8f(%rsp), %rdi
movq %rdi, 0x28(%rsp)
callq 0x2260
movq 0x28(%rsp), %rdx
leaq 0x1440(%rip), %rsi      # 0x732c
leaq 0x90(%rsp), %rdi
callq 0x21d0
jmp 0x5efb
movl 0x100(%rsp), %esi
movq 0xf8(%rsp), %rdx
leaq 0x90(%rsp), %rdi
callq 0x6110
movb %al, 0x27(%rsp)
jmp 0x5f1d
leaq 0x90(%rsp), %rdi
callq 0x20e0
leaq 0x8f(%rsp), %rdi
callq 0x2190
movb 0x27(%rsp), %al
andb $0x1, %al
movb %al, 0xb7(%rsp)
movq 0x5095(%rip), %rdi      # 0xafe0
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x2280
movb %al, 0x26(%rsp)
jmp 0x5f60
movb 0x26(%rsp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x5f6f
jmp 0x60c6
leaq 0x58(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x21e0
movq 0x18(%rsp), %rsi
movq $0x1, 0x50(%rsp)
movq 0x504d(%rip), %rdi      # 0xafe0
callq 0x21a0
jmp 0x5f9a
testb $0x1, 0xb7(%rsp)
je 0x602c
movq 0x5031(%rip), %rdi      # 0xafe0
leaq 0x50(%rsp), %rsi
callq 0x21f0
jmp 0x5fbb
jmp 0x602c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x80(%rsp)
movl %eax, 0x7c(%rsp)
jmp 0x5fee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x80(%rsp)
movl %eax, 0x7c(%rsp)
leaq 0x90(%rsp), %rdi
callq 0x20e0
leaq 0x8f(%rsp), %rdi
callq 0x2190
jmp 0x60ed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x80(%rsp)
movl %eax, 0x7c(%rsp)
jmp 0x60ed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x80(%rsp)
movl %eax, 0x7c(%rsp)
jmp 0x60ba
leaq 0x30(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x20b0
jmp 0x603d
movq 0x50(%rsp), %rdx
leaq 0xb8(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x4560
movq %rax, 0x10(%rsp)
jmp 0x605b
movq 0x10(%rsp), %rsi
movq 0x4f69(%rip), %rdi      # 0xafd0
callq 0x2270
movq %rax, 0x8(%rsp)
jmp 0x6073
movq 0x8(%rsp), %rdi
movq 0x4f41(%rip), %rsi      # 0xafc0
callq 0x2180
jmp 0x6086
leaq 0x30(%rsp), %rdi
callq 0x20e0
leaq 0x58(%rsp), %rdi
callq 0x20e0
jmp 0x5f44
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x80(%rsp)
movl %eax, 0x7c(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x20e0
leaq 0x58(%rsp), %rdi
callq 0x20e0
jmp 0x60ed
movl $0x0, 0x104(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0x61b0
movl 0x104(%rsp), %eax
addq $0x108, %rsp            # imm = 0x108
retq
leaq 0xb8(%rsp), %rdi
callq 0x61b0
movq 0x80(%rsp), %rdi
callq 0x2250
nopw (%rax,%rax)
// File: jcipar[P]stack-distance/src/main.cpp
// Function: hasFlag(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, char**)
bool hasFlag(string flag, int argc, char** argv) {
	for (int i=1; i < argc; i++) {
		if (flag == argv[i]) {
			return true;
		}
	}
	return false;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x8(%rsp)
movq %rdi, 0x28(%rsp)
movl %esi, 0x24(%rsp)
movq %rdx, 0x18(%rsp)
movl $0x1, 0x14(%rsp)
movl 0x14(%rsp), %eax
cmpl 0x24(%rsp), %eax
jge 0x616d
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rax
movslq 0x14(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x61e0
testb $0x1, %al
jne 0x6157
jmp 0x615e
movb $0x1, 0x37(%rsp)
jmp 0x6172
jmp 0x6160
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x612f
movb $0x0, 0x37(%rsp)
movb 0x37(%rsp), %al
andb $0x1, %al
addq $0x38, %rsp
retq
nopl (%rax)
// File: TTLIUJJ[P]acker_redis/adlist.cpp
// Function: listCreate()
list *listCreate()
{
	list *l = (list *)zmalloc(sizeof(struct list));
	
	if (l == NULL)
		return NULL;
	l->head = NULL;
	l->tail = NULL;
	l->len = 0;
	l->dup = NULL;
	l->free = NULL;
	l->match = NULL;

	return l;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x30, %edi
callq 0x5710
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x13a7
movq $0x0, -0x8(%rbp)
jmp 0x13f6
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
// File: TTLIUJJ[P]acker_redis/adlist.cpp
// Function: listAddNodeHead(list*, void*)
list *listAddNodeHead(list *l, void *value)
{
	listNode *node = (listNode *)zmalloc(sizeof(struct listNode));
	
	if (node == NULL)
		return NULL;

	node->value = value;

	if (l->len != 0) {
		node->prev = NULL;
		node->next = l->head;
		l->head->prev = node;
		l->head = node;
	}
	else {
		l->head = l->tail = node;
		node->prev = NULL;
		node->next = NULL;
	}
	++l->len;

	return l;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x18, %edi
callq 0x5710
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x1432
movq $0x0, -0x8(%rbp)
jmp 0x14c0
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x147e
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0x14a8
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x28(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: TTLIUJJ[P]acker_redis/adlist.cpp
// Function: listAddNodeTail(list*, void*)
list *listAddNodeTail(list *l, void *value)
{
	listNode *node = (listNode *)zmalloc(sizeof(struct listNode));

	if (node == NULL)
		return NULL;
	node->value = value;
	if(l->len != 0){
		l->tail->next = node;
		node->prev = l->tail;
		node->next = NULL;
		l->tail = node;
	}
	else {
		l->head = node;
		l->tail = node;
	}
	++l->len;

	return l;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x18, %edi
callq 0x5710
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x14ff
movq $0x0, -0x8(%rbp)
jmp 0x157e
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x154f
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x1566
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x28(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: TTLIUJJ[P]acker_redis/adlist.cpp
// Function: listInsertNode(list*, listNode*, void*, int)
list *listInsertNode(list *l, listNode *old_node, void *value, int after)
{
	listNode *node = (listNode *)zmalloc(sizeof(struct listNode));

	if (node == NULL)
		return NULL;

	node->value = value;
	if (after) {
		node->prev = old_node;
		node->next = old_node->next;
		if (old_node == l->tail)
			l->tail = node;
	}
	else {
		node->prev = old_node->prev;
		node->next = old_node;
		if (old_node == l->head)
			l->head = node;
	}
	if (node->prev != NULL)
		old_node->prev->next = node;
	if (node->next != NULL)
		old_node->next->prev = node;
	++l->len;

	return l;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl $0x18, %edi
callq 0x5710
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x15c9
movq $0x0, -0x8(%rbp)
jmp 0x1691
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
cmpl $0x0, -0x24(%rbp)
je 0x1612
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x1610
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x1646
movq -0x18(%rbp), %rax
movq (%rax), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq (%rcx), %rax
jne 0x1644
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0x1646
movq -0x30(%rbp), %rax
cmpq $0x0, (%rax)
je 0x165f
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1679
movq -0x30(%rbp), %rcx
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x28(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: TTLIUJJ[P]acker_redis/adlist.cpp
// Function: listGetIterator(list*, int)
listIterator *listGetIterator(list *l, int direction)
{
	listIterator *iter = (listIterator *)zmalloc(sizeof(struct listIterator));
	
	if (iter == NULL)
		return NULL;
	iter->direction = direction;
	
	if (direction == AL_START_HEAD)
		iter->next = l->head;
	else 
		iter->next = l->tail;

	return iter;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl $0x10, %edi
callq 0x5710
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x16ce
movq $0x0, -0x8(%rbp)
jmp 0x1705
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x8(%rax)
cmpl $0x0, -0x14(%rbp)
jne 0x16ee
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
jmp 0x16fd
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: TTLIUJJ[P]acker_redis/adlist.cpp
// Function: listNext(listIterator*)
listNode *listNext(listIterator *iter)
{
	listNode *cur = iter->next;
	
	if (cur != NULL) {
		if (iter->direction == AL_START_HEAD)
			iter->next = cur->next;
		else
			iter->next = cur->prev;
	}

	return cur;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x1775
movq -0x8(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jne 0x1765
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
jmp 0x1773
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
jmp 0x1775
movq -0x10(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)
// File: TTLIUJJ[P]acker_redis/adlist.cpp
// Function: listSearchKey(list*, void*)
listNode *listSearchKey(list *l, void *key)
{
	listIterator *iter = listGetIterator(l, AL_START_HEAD);
	listNode *node;

	while ((node = listNext(iter)) != NULL) {
		if (l->match) {
			if (l->match(node->value, key)) {
				listReleaseIterator(iter);
				return node;
			}
		}
		else {
			if (node->value == key) {
				listReleaseIterator(iter);
				return node;
			}
		}
	}
	listReleaseIterator(iter);

	return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x16a0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x1730
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x1812
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x17ed
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x28(%rbp), %rcx
movq 0x10(%rcx), %rdi
movq -0x18(%rbp), %rsi
callq *%rax
cmpl $0x0, %eax
je 0x17eb
movq -0x20(%rbp), %rdi
callq 0x1710
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1823
jmp 0x1810
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
cmpq -0x18(%rbp), %rax
jne 0x180e
movq -0x20(%rbp), %rdi
callq 0x1710
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1823
jmp 0x1810
jmp 0x179f
movq -0x20(%rbp), %rdi
callq 0x1710
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: TTLIUJJ[P]acker_redis/adlist.cpp
// Function: listDelNode(list*, listNode*)
void listDelNode(list *l, listNode *node)
{
	if (node->prev)
		node->prev->next = node->next;
	else
		l->head = node->next;

	if (node->next)
		node->next->prev = node->prev;
	else
		l->tail = node->prev;

	--l->len;

	zfree(node);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x185f
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x8(%rax)
jmp 0x186e
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x188d
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, (%rax)
jmp 0x189c
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x28(%rax)
movq -0x10(%rbp), %rdi
callq 0x5a10
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)