LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: splatlab[P]debgr/threadsafe-gqf/gqf.c
// Function: qf_destroy
void qf_destroy(QF *qf, bool mem)
{
	assert(qf->blocks != NULL);
	if (mem) {
		free(qf->mem);
		free(qf->metadata);
		free(qf->blocks);
	} else {
	munmap(qf->metadata, qf->metadata->size + sizeof(qfmetadata));
	close(qf->mem->fd);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
testb $0x1, -0x9(%rbp)
je 0x24f82
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x3350
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x3350
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x3350
jmp 0x24faf
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rsi
addq $0x80, %rsi
callq 0x3120
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl (%rax), %edi
callq 0x3500
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: splatlab[P]debgr/threadsafe-gqf/gqf.c
// Function: qf_read
void qf_read(QF *qf, const char *path)
{
	struct stat sb;
	int ret;

	qf->mem = (qfmem *)calloc(sizeof(qfmem), 1);
	qf->mem->fd = open(path, O_RDWR, S_IRWXU);
	if (qf->mem->fd < 0) {
		perror("Couldn't open file:\n");
		exit(EXIT_FAILURE);
	}

	ret = fstat (qf->mem->fd, &sb);
	if ( ret < 0) {
		perror ("fstat");
		exit(EXIT_FAILURE);
	}

	if (!S_ISREG (sb.st_mode)) {
		fprintf (stderr, "%s is not a file\n", path);
		exit(EXIT_FAILURE);
	}

	qf->metadata = (qfmetadata *)mmap(NULL, sb.st_size, PROT_READ | PROT_WRITE, MAP_SHARED,
																qf->mem->fd, 0);

	qf->blocks = (qfblock *)(qf->metadata + sizeof(qfmetadata));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x18, %edi
movl $0x1, %esi
callq 0x3170
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rdi
movl $0x2, %esi
movl $0x1c0, %edx            # imm = 0x1C0
movb $0x0, %al
callq 0x31d0
movl %eax, %ecx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
cmpl $0x0, (%rax)
jge 0x2506e
leaq 0x5a1e(%rip), %rdi      # 0x2aa7d
callq 0x3230
movl $0x1, %edi
callq 0x3360
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl (%rax), %edi
leaq -0xa0(%rbp), %rsi
callq 0x3470
movl %eax, -0xa4(%rbp)
cmpl $0x0, -0xa4(%rbp)
jge 0x250a8
leaq 0x5a13(%rip), %rdi      # 0x2aaac
callq 0x3230
movl $0x1, %edi
callq 0x3360
movl -0x88(%rbp), %eax
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x8000, %eax           # imm = 0x8000
je 0x250e0
movq 0x14f17(%rip), %rax     # 0x39fd8
movq (%rax), %rdi
movq -0x10(%rbp), %rdx
leaq 0x59e3(%rip), %rsi      # 0x2aab2
movb $0x0, %al
callq 0x33d0
movl $0x1, %edi
callq 0x3360
movq -0x70(%rbp), %rsi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl (%rax), %r8d
xorl %eax, %eax
movl %eax, %r9d
movl $0x3, %edx
movl $0x1, %ecx
movq %r9, %rdi
callq 0x34a0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x4000, %rcx           # imm = 0x4000
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
addq $0xb0, %rsp
popq %rbp
retq
// File: splatlab[P]debgr/threadsafe-gqf/gqf.c
// Function: qf_reset
void qf_reset(QF *qf)
{
	assert(popcnt(nslots) == 1); /* nslots must be a power of 2 */

	qf->metadata->nelts = 0;
	qf->metadata->ndistinct_elts = 0;
	qf->metadata->noccupied_slots = 0;

#ifdef LOG_WAIT_TIME
	memset(qf->wait_times, 0, (qf->metadata->num_locks+1)*sizeof(wait_time_data));
#endif
#if BITS_PER_SLOT == 8 || BITS_PER_SLOT == 16 || BITS_PER_SLOT == 32 || BITS_PER_SLOT == 64
	memset(qf->blocks, 0, qf->metadata->nblocks* sizeof(qfblock));
#else
	memset(qf->blocks, 0, qf->metadata->nblocks*(sizeof(qfblock) + SLOTS_PER_BLOCK *
																		 qf->metadata->bits_per_slot / 8));
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq $0x0, 0x58(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq $0x0, 0x60(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq $0x0, 0x68(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x50(%rax), %rdx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x38(%rax), %rax
shlq $0x6, %rax
shrq $0x3, %rax
addq $0x11, %rax
imulq %rax, %rdx
xorl %esi, %esi
callq 0x3100
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: splatlab[P]debgr/threadsafe-gqf/gqf.c
// Function: qf_serialize
void qf_serialize(const QF *qf, const char *filename)
{
	FILE *fout;
	fout = fopen(filename, "wb+");
	if (fout == NULL) {
		perror("Error opening file for serializing\n");
		exit(EXIT_FAILURE);
	}

	fwrite(qf->metadata, sizeof(qfmetadata), 1, fout);

	/* we don't serialize the locks */
	fwrite(qf->blocks, qf->metadata->size, 1, fout);

	fclose(fout);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x58f9(%rip), %rsi      # 0x2aac4
callq 0x3340
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x251f1
leaq 0x58e6(%rip), %rdi      # 0x2aac8
callq 0x3230
movl $0x1, %edi
callq 0x3360
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rcx
movl $0x80, %esi
movl $0x1, %edx
callq 0x34e0
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rcx
movl $0x1, %edx
callq 0x34e0
movq -0x18(%rbp), %rdi
callq 0x32a0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: splatlab[P]debgr/threadsafe-gqf/gqf.c
// Function: qf_deserialize
void qf_deserialize(QF *qf, const char *filename)
{
	FILE *fin;
	fin = fopen(filename, "rb");
	if (fin == NULL) {
		perror("Error opening file for deserializing\n");
		exit(EXIT_FAILURE);
	}

	qf->mem = (qfmem *)calloc(sizeof(qfmem), 1);
	qf->metadata = (qfmetadata *)calloc(sizeof(qfmetadata), 1);

	fread(qf->metadata, sizeof(qfmetadata), 1, fin);

	/* initlialize the locks in the QF */
	qf->metadata->num_locks = (qf->metadata->xnslots/NUM_SLOTS_TO_LOCK)+2;
	qf->mem->metadata_lock = 0;
	/* initialize all the locks to 0 */
	qf->mem->locks = (volatile int *)calloc(qf->metadata->num_locks, sizeof(volatile int));

	qf->blocks = (qfblock *)calloc(qf->metadata->size, 1);
	fread(qf->blocks, qf->metadata->size, 1, fin);

	fclose(fin);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x5891(%rip), %rsi      # 0x2aaec
callq 0x3340
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x25281
leaq 0x587d(%rip), %rdi      # 0x2aaef
callq 0x3230
movl $0x1, %edi
callq 0x3360
movl $0x18, %edi
movl $0x1, %esi
callq 0x3170
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movl $0x80, %edi
movl $0x1, %esi
callq 0x3170
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rcx
movl $0x80, %esi
movl $0x1, %edx
callq 0x3410
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x18(%rax), %rcx
shrq $0xc, %rcx
addq $0x2, %rcx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rcx, 0x70(%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl $0x0, 0x4(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x70(%rax), %rdi
movl $0x4, %esi
callq 0x3170
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rdi
movl $0x1, %esi
callq 0x3170
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rcx
movl $0x1, %edx
callq 0x3410
movq -0x18(%rbp), %rdi
callq 0x32a0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: splatlab[P]debgr/threadsafe-gqf/gqf.c
// Function: qf_count_key_value
uint64_t qf_count_key_value(const QF *qf, uint64_t key, uint64_t value)
{
	__uint128_t hash = key;
	uint64_t hash_remainder   = hash & BITMASK(qf->metadata->bits_per_slot);
	int64_t hash_bucket_index = hash >> qf->metadata->bits_per_slot;

	if (!is_occupied(qf, hash_bucket_index))
		return 0;

	int64_t runstart_index = hash_bucket_index == 0 ? 0 : run_end(qf,
																																hash_bucket_index-1)
		+ 1;
	if (runstart_index < hash_bucket_index)
		runstart_index = hash_bucket_index;

	/* printf("MC RUNSTART: %02lx RUNEND: %02lx\n", runstart_index, runend_index); */

	uint64_t current_remainder, current_count, current_end;
	do {
		current_end = decode_counter(qf, runstart_index, &current_remainder,
																 &current_count);
		if (current_remainder == hash_remainder)
			return current_count;
		runstart_index = current_end + 1;
	} while (!is_runend(qf, current_end));

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
cmpq $0x40, 0x38(%rax)
jne 0x268af
movq $-0x1, %rax
movq %rax, -0x70(%rbp)
jmp 0x268cb
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x38(%rax), %rcx
movl $0x1, %eax
shlq %cl, %rax
subq $0x1, %rax
movq %rax, -0x70(%rbp)
movq -0x68(%rbp), %rax
movq -0x70(%rbp), %rcx
andq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rsi
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
movb 0x38(%rcx), %dl
movb %dl, %cl
movq %rsi, %rdi
shrq %cl, %rdi
movq %rdi, -0x78(%rbp)
movb %dl, %cl
shrdq %cl, %rsi, %rax
movq -0x78(%rbp), %rcx
testb $0x40, %dl
cmovneq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x26e50
cmpl $0x0, %eax
jne 0x2692d
movq $0x0, -0x8(%rbp)
jmp 0x269cb
cmpq $0x0, -0x40(%rbp)
jne 0x2693c
xorl %eax, %eax
movq %rax, -0x80(%rbp)
jmp 0x26955
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
subq $0x1, %rsi
callq 0x26ea0
addq $0x1, %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x40(%rbp), %rax
jge 0x2696f
movq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x26971
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rsi
leaq -0x50(%rbp), %rdx
leaq -0x58(%rbp), %rcx
callq 0x27050
movq %rax, -0x60(%rbp)
movq -0x50(%rbp), %rax
cmpq -0x38(%rbp), %rax
jne 0x2699e
movq -0x58(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x269cb
movq -0x60(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x27380
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x26971
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: splatlab[P]debgr/threadsafe-gqf/gqf.c
// Function: qf_iterator
bool qf_iterator(const QF *qf, QFi *qfi, uint64_t position)
{
  if (position == 0xffffffffffffffff) {
    qfi->current = 0xffffffffffffffff;
    qfi->qf = qf;
    return false;
  }
	assert(position < qf->metadata->nslots);
	if (!is_occupied(qf, position)) {
		uint64_t block_index = position;
		uint64_t idx = bitselect(get_block(qf, block_index)->occupieds[0], 0);
		if (idx == 64) {
			while(idx == 64 && block_index < qf->metadata->nblocks) {
				block_index++;
				idx = bitselect(get_block(qf, block_index)->occupieds[0], 0);
			}
		}
		position = block_index * SLOTS_PER_BLOCK + idx;
	}

	qfi->qf = qf;
	qfi->num_clusters = 0;
	qfi->run = position;
	qfi->current = position == 0 ? 0 : run_end(qfi->qf, position-1) + 1;
	if (qfi->current < position)
		qfi->current = position;

#ifdef LOG_CLUSTER_LENGTH
	qfi->c_info = (cluster_data* )calloc(qf->metadata->nslots/32, sizeof(cluster_data));
	qfi->cur_start_index = position;
	qfi->cur_length = 1;
#endif

	if (qfi->current >= qf->metadata->nslots)
		return false;
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $-0x1, -0x20(%rbp)
jne 0x2740b
movq -0x18(%rbp), %rax
movq $-0x1, 0x10(%rax)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movb $0x0, -0x1(%rbp)
jmp 0x27548
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x26e50
cmpl $0x0, %eax
jne 0x274b5
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x27590
movq 0x1(%rax), %rdi
xorl %esi, %esi
callq 0x27560
movq %rax, -0x30(%rbp)
cmpq $0x40, -0x30(%rbp)
jne 0x274a5
jmp 0x2744e
xorl %eax, %eax
cmpq $0x40, -0x30(%rbp)
movb %al, -0x31(%rbp)
jne 0x27470
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
cmpq 0x50(%rcx), %rax
setb %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0x27479
jmp 0x274a3
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x27590
movq 0x1(%rax), %rdi
xorl %esi, %esi
callq 0x27560
movq %rax, -0x30(%rbp)
jmp 0x2744e
jmp 0x274a5
movq -0x28(%rbp), %rax
shlq $0x6, %rax
addq -0x30(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x24(%rax)
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
cmpq $0x0, -0x20(%rbp)
jne 0x274e6
xorl %eax, %eax
movq %rax, -0x40(%rbp)
jmp 0x27502
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rsi
subq $0x1, %rsi
callq 0x26ea0
addq $0x1, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
cmpq -0x20(%rbp), %rax
jae 0x27528
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
cmpq 0x10(%rcx), %rax
jb 0x27544
movb $0x0, -0x1(%rbp)
jmp 0x27548
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: splatlab[P]debgr/threadsafe-gqf/gqf.c
// Function: get_block(quotient_filter const*, unsigned long)
static inline qfblock * get_block(const QF *qf, uint64_t block_index)
{
	return (qfblock *)(((char *)qf->blocks) + block_index * (sizeof(qfblock) +
																													 SLOTS_PER_BLOCK *
																													 qf->metadata->bits_per_slot /
																													 8));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rdx
movq 0x8(%rdx), %rdx
movq 0x38(%rdx), %rdx
shlq $0x6, %rdx
shrq $0x3, %rdx
addq $0x11, %rdx
imulq %rdx, %rcx
addq %rcx, %rax
popq %rbp
retq
nopl (%rax)
// File: splatlab[P]debgr/threadsafe-gqf/gqf.c
// Function: qfi_get
int qfi_get(const QFi *qfi, uint64_t *key, uint64_t *value, uint64_t *count)
{
	assert(qfi->current < qfi->qf->metadata->nslots);

	uint64_t current_remainder, current_count;
	decode_counter(qfi->qf, qfi->current, &current_remainder, &current_count);

	*key = (qfi->run << qfi->qf->metadata->bits_per_slot) | current_remainder;
	*value = 0;   // for now we are not using value
	*count = current_count; 
	
	qfi->qf->metadata->ndistinct_elts++;
	qfi->qf->metadata->nelts += current_count;

	/*qfi->current = end_index;*/ 		//get should not change the current index
																		//of the iterator
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rsi
leaq -0x28(%rbp), %rdx
leaq -0x30(%rbp), %rcx
callq 0x27050
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
movq 0x8(%rcx), %rcx
movq 0x38(%rcx), %rcx
shlq %cl, %rax
movq %rax, %rcx
orq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movq 0x60(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x60(%rax)
movq -0x30(%rbp), %rcx
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
addq 0x58(%rax), %rcx
movq %rcx, 0x58(%rax)
xorl %eax, %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: splatlab[P]debgr/threadsafe-gqf/gqf.c
// Function: bitrank(unsigned long, int)
static inline int bitrank(uint64_t val, int pos) {
	val = val & ((2ULL << pos) - 1);
	asm("popcnt %[val], %[val]"
			: [val] "+r" (val)
			:
			: "cc");
	return val;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
movl $0x2, %edx
shlq %cl, %rdx
movq %rdx, %rcx
subq $0x1, %rcx
andq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popcntq %rax, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)
// File: splatlab[P]debgr/threadsafe-gqf/gqf.c
// Function: qf_inner_product
uint64_t qf_inner_product(QF *qfa, QF *qfb)
{
	uint64_t acc = 0;
	QFi qfi;
	QF *qf_mem, *qf_disk;

	// create the iterator on the larger QF.
	if (qfa->metadata->size > qfb->metadata->size) {
		qf_mem = qfb;
		qf_disk = qfa;
	} else {
		qf_mem = qfa;
		qf_disk = qfb;
	}

	qf_iterator(qf_disk, &qfi, 0);
	do {
		uint64_t key = 0, value = 0, count = 0;
		uint64_t count_mem;
		qfi_get(&qfi, &key, &value, &count);
		if ((count_mem = qf_count_key_value(qf_mem, key, 0)) > 0) {
			acc += count*count_mem;
		}
	} while (!qfi_next(&qfi));

	return acc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
cmpq (%rcx), %rax
jbe 0x27ef5
movq -0x10(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x58(%rbp)
jmp 0x27f05
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
leaq -0x48(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x273d0
movq $0x0, -0x60(%rbp)
movq $0x0, -0x68(%rbp)
movq $0x0, -0x70(%rbp)
leaq -0x48(%rbp), %rdi
leaq -0x60(%rbp), %rsi
leaq -0x68(%rbp), %rdx
leaq -0x70(%rbp), %rcx
callq 0x275d0
movq -0x50(%rbp), %rdi
movq -0x60(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x26860
movq %rax, -0x78(%rbp)
cmpq $0x0, %rax
jbe 0x27f6f
movq -0x70(%rbp), %rax
imulq -0x78(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
jmp 0x27f71
leaq -0x48(%rbp), %rdi
callq 0x27680
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x27f16
movq -0x18(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: splatlab[P]debgr/threadsafe-gqf/gqf.c
// Function: qf_spin_lock(int volatile*, bool)
static inline bool qf_spin_lock(volatile int *lock, bool flag_spin)
{
	if (!flag_spin) {
		return !__sync_lock_test_and_set(lock, 1);
	} else {
		while (__sync_lock_test_and_set(lock, 1))
			while (*lock);
		return true;
	}

	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %sil, %al
movq %rdi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0x28020
movq -0x10(%rbp), %rcx
movl $0x1, %eax
xchgl %eax, (%rcx)
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
andb $0x1, %al
movb %al, -0x1(%rbp)
jmp 0x28047
jmp 0x28022
movq -0x10(%rbp), %rcx
movl $0x1, %eax
xchgl %eax, (%rcx)
cmpl $0x0, %eax
je 0x28043
jmp 0x28034
movq -0x10(%rbp), %rax
movl (%rax), %eax
cmpl $0x0, %eax
je 0x28041
jmp 0x28034
jmp 0x28022
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
popq %rbp
retq
nop
// File: splatlab[P]debgr/threadsafe-gqf/gqf.c
// Function: set_slot(quotient_filter const*, unsigned long, unsigned long)
static inline void set_slot(const QF *qf, uint64_t index, uint64_t value)
{
	assert(index < qf->metadata->xnslots);
	/* Should use __uint128_t to support up to 64-bit remainders, but gcc seems to generate buggy code.  :/  */
	uint64_t *p = (uint64_t *)&get_block(qf, index /
																			 SLOTS_PER_BLOCK)->slots[(index %
																																SLOTS_PER_BLOCK)
																			 * qf->metadata->bits_per_slot / 8];
	uint64_t t = *p;
	uint64_t mask = BITMASK(qf->metadata->bits_per_slot);
	uint64_t v = value;
	int shift = ((index % SLOTS_PER_BLOCK) * qf->metadata->bits_per_slot) % 8;
	mask <<= shift;
	v <<= shift;
	t &= ~mask;
	t |= v;
	*p = t;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
shrq $0x6, %rsi
callq 0x27590
addq $0x11, %rax
movq -0x10(%rbp), %rcx
andq $0x3f, %rcx
movq -0x8(%rbp), %rdx
movq 0x8(%rdx), %rdx
imulq 0x38(%rdx), %rcx
shrq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
cmpq $0x40, 0x38(%rax)
jne 0x28110
movq $-0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x2812c
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x38(%rax), %rcx
movl $0x1, %eax
shlq %cl, %rax
subq $0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
andq $0x3f, %rax
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rcx
imulq 0x38(%rcx), %rax
andq $0x7, %rax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %ecx
movq -0x30(%rbp), %rax
movl %ecx, %ecx
shlq %cl, %rax
movq %rax, -0x30(%rbp)
movl -0x3c(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, %ecx
shlq %cl, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
xorq $-0x1, %rax
andq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x38(%rbp), %rax
orq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: splatlab[P]debgr/threadsafe-gqf/gqf.c
// Function: get_slot(quotient_filter const*, unsigned long)
static inline uint64_t get_slot(const QF *qf, uint64_t index)
{
	assert(index < qf->metadata->xnslots);
	/* Should use __uint128_t to support up to 64-bit remainders, but gcc seems to generate buggy code.  :/  */
	uint64_t *p = (uint64_t *)&get_block(qf, index /
																			 SLOTS_PER_BLOCK)->slots[(index %
																																SLOTS_PER_BLOCK)
																			 * qf->metadata->bits_per_slot / 8];
	return (uint64_t)(((*p) >> (((index % SLOTS_PER_BLOCK) * qf->metadata->bits_per_slot)
															% 8)) & BITMASK(qf->metadata->bits_per_slot));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
shrq $0x6, %rsi
callq 0x27590
addq $0x11, %rax
movq -0x10(%rbp), %rcx
andq $0x3f, %rcx
movq -0x8(%rbp), %rdx
movq 0x8(%rdx), %rdx
imulq 0x38(%rdx), %rcx
shrq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rcx
andq $0x3f, %rcx
movq -0x8(%rbp), %rdx
movq 0x8(%rdx), %rdx
imulq 0x38(%rdx), %rcx
andq $0x7, %rcx
shrq %cl, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
cmpq $0x40, 0x38(%rax)
jne 0x28238
movq $-0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x28254
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x38(%rax), %rcx
movl $0x1, %eax
shlq %cl, %rax
subq $0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
andq %rcx, %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: splatlab[P]debgr/threadsafe-gqf/gqf.c
// Function: find_first_empty_slot(quotient_filter*, unsigned long)
static inline uint64_t find_first_empty_slot(QF *qf, uint64_t from)
{
	do {
		/* while (!probably_is_empty(qf, from)) */
		/*   from++; */
		int t = offset_lower_bound(qf, from);
		assert(t>=0);
		if (t == 0)
			break;
		from = from + t;
	} while(1);
	return from;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x28790
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x28298
jmp 0x282af
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movb $0x1, %al
testb $0x1, %al
jne 0x28280
jmp 0x282af
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: splatlab[P]debgr/threadsafe-gqf/gqf.c
// Function: offset_lower_bound(quotient_filter const*, unsigned long)
static inline int offset_lower_bound(const QF *qf, uint64_t slot_index)
{
	const qfblock * b = get_block(qf, slot_index / SLOTS_PER_BLOCK);
	const uint64_t slot_offset = slot_index % SLOTS_PER_BLOCK;
	const uint64_t boffset = b->offset;
	const uint64_t occupieds = b->occupieds[0] & BITMASK(slot_offset+1);
	assert(SLOTS_PER_BLOCK == 64);
	if (boffset <= slot_offset) {
		const uint64_t runends = (b->runends[0] & BITMASK(slot_offset)) >> boffset;
		return popcnt(occupieds) - popcnt(runends);
	}
	return boffset - slot_offset + popcnt(occupieds);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
shrq $0x6, %rsi
callq 0x27590
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
andq $0x3f, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq 0x1(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
cmpq $0x40, %rax
jne 0x287f3
movq $-0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x2880b
movq -0x28(%rbp), %rcx
addq $0x1, %rcx
movl $0x1, %eax
shlq %cl, %rax
subq $0x1, %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rax
movq -0x50(%rbp), %rcx
andq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
ja 0x2888f
movq -0x20(%rbp), %rax
movq 0x9(%rax), %rax
movq %rax, -0x58(%rbp)
cmpq $0x40, -0x28(%rbp)
jne 0x28844
movq $-0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x28858
movq -0x28(%rbp), %rcx
movl $0x1, %eax
shlq %cl, %rax
subq $0x1, %rax
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rax
movq -0x60(%rbp), %rcx
andq %rcx, %rax
movq -0x30(%rbp), %rcx
shrq %cl, %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rdi
callq 0x288c0
movl %eax, -0x64(%rbp)
movq -0x40(%rbp), %rdi
callq 0x288c0
movl %eax, %ecx
movl -0x64(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x288b3
movq -0x30(%rbp), %rax
subq -0x28(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x38(%rbp), %rdi
callq 0x288c0
movl %eax, %ecx
movq -0x70(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)
// File: splatlab[P]debgr/threadsafe-gqf/gqf.c
// Function: shift_into_b(unsigned long, unsigned long, int, int, int)
static inline uint64_t shift_into_b(const uint64_t a, const uint64_t b,
																		const int bstart, const int bend,
																		const int amount)
{
	const uint64_t a_component = bstart == 0 ? (a >> (64 - amount)) : 0;
	const uint64_t b_shifted_mask = BITMASK(bend - bstart) << bstart;
	const uint64_t b_shifted = ((b_shifted_mask & b) << amount) & b_shifted_mask;
	const uint64_t b_mask = ~b_shifted_mask;
	return a_component | b_shifted | (b & b_mask);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x28913
movq -0x8(%rbp), %rax
movl $0x40, %ecx
subl -0x1c(%rbp), %ecx
movl %ecx, %ecx
shrq %cl, %rax
movq %rax, -0x48(%rbp)
jmp 0x2891b
xorl %eax, %eax
movq %rax, -0x48(%rbp)
jmp 0x2891b
movq -0x48(%rbp), %rax
movq %rax, -0x28(%rbp)
movl -0x18(%rbp), %eax
subl -0x14(%rbp), %eax
cmpl $0x40, %eax
jne 0x2893b
movq $-0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x28955
movl -0x18(%rbp), %eax
subl -0x14(%rbp), %eax
movl %eax, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
subq $0x1, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movl -0x14(%rbp), %ecx
shlq %cl, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
andq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
shlq %cl, %rax
andq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
xorq $-0x1, %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rax
orq -0x38(%rbp), %rax
movq -0x10(%rbp), %rcx
andq -0x40(%rbp), %rcx
orq %rcx, %rax
popq %rbp
retq
nopw (%rax,%rax)
// File: splatlab[P]debgr/threadsafe-gqf/gqf.c
// Function: shift_slots(quotient_filter*, long, unsigned long, unsigned long)
static inline void shift_slots(QF *qf, int64_t first, uint64_t last, uint64_t
															 distance)
{
	int64_t i;
	if (distance == 1)
		shift_remainders(qf, first, last+1);
	else
		for (i = last; i >= first; i--)
			set_slot(qf, i + distance, get_slot(qf, i));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
cmpq $0x1, -0x20(%rbp)
jne 0x29316
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
addq $0x1, %rdx
callq 0x282c0
jmp 0x29369
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x10(%rbp), %rax
jl 0x29367
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x281b0
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq %rax, %rdx
callq 0x280a0
movq -0x28(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x2931e
jmp 0x29369
addq $0x40, %rsp
popq %rbp
retq
nop
// File: splatlab[P]debgr/threadsafe-gqf/gqf.c
// Function: bitscanreverse(unsigned long)
static inline int64_t bitscanreverse(uint64_t val)
{
	if (val == 0) {
		return -1;
	} else {
		asm("bsr %[val], %[val]"
				: [val] "+r" (val)
				:
				: "cc");
		return val;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x299a9
movq $-0x1, -0x8(%rbp)
jmp 0x299bd
movq -0x10(%rbp), %rax
bsrq %rax, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: splatlab[P]debgr/threadsafe-gqf/gqf.c
// Function: popcntv(unsigned long, int)
static inline int popcntv(const uint64_t val, int ignore)
{
	if (ignore % 64)
		return popcnt (val & ~BITMASK(ignore % 64));
	else
		return popcnt(val);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl $0x40, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
je 0x29afc
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0x14(%rbp), %eax
movl $0x40, %ecx
cltd
idivl %ecx
cmpl $0x40, %edx
jne 0x29ac4
movq $-0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x29ae3
movl -0x14(%rbp), %eax
movl $0x40, %ecx
cltd
idivl %ecx
movl %edx, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
subq $0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rax
xorq $-0x1, %rax
andq %rax, %rdi
callq 0x288c0
movl %eax, -0x4(%rbp)
jmp 0x29b08
movq -0x10(%rbp), %rdi
callq 0x288c0
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: splatlab[P]debgr/threadsafe-gqf/gqf.c
// Function: select64(unsigned long, int)
static inline uint64_t _select64(uint64_t x, int k)
{
	if (k >= popcnt(x)) { return 64; }
	
	const uint64_t kOnesStep4  = 0x1111111111111111ULL;
	const uint64_t kOnesStep8  = 0x0101010101010101ULL;
	const uint64_t kMSBsStep8  = 0x80ULL * kOnesStep8;

	uint64_t s = x;
	s = s - ((s & 0xA * kOnesStep4) >> 1);
	s = (s & 0x3 * kOnesStep4) + ((s >> 2) & 0x3 * kOnesStep4);
	s = (s + (s >> 4)) & 0xF * kOnesStep8;
	uint64_t byteSums = s * kOnesStep8;

	uint64_t kStep8 = k * kOnesStep8;
	uint64_t geqKStep8 = (((kStep8 | kMSBsStep8) - byteSums) & kMSBsStep8);
	uint64_t place = popcnt(geqKStep8) * 8;
	uint64_t byteRank = k - (((byteSums << 8) >> place) & (uint64_t)(0xFF));
	return place + kSelectInByte[((x >> place) & 0xFF) | (byteRank << 8)];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x64(%rbp)
movq -0x10(%rbp), %rdi
callq 0x288c0
movl %eax, %ecx
movl -0x64(%rbp), %eax
cmpl %ecx, %eax
jl 0x29b54
movq $0x40, -0x8(%rbp)
jmp 0x29ca1
movabsq $0x1111111111111111, %rax # imm = 0x1111111111111111
movq %rax, -0x20(%rbp)
movabsq $0x101010101010101, %rax # imm = 0x101010101010101
movq %rax, -0x28(%rbp)
movabsq $-0x7f7f7f7f7f7f7f80, %rax # imm = 0x8080808080808080
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movabsq $-0x5555555555555556, %rcx # imm = 0xAAAAAAAAAAAAAAAA
andq -0x38(%rbp), %rcx
shrq %rcx
subq %rcx, %rax
movq %rax, -0x38(%rbp)
movabsq $0x3333333333333333, %rax # imm = 0x3333333333333333
andq -0x38(%rbp), %rax
movq -0x38(%rbp), %rcx
shrq $0x2, %rcx
movabsq $0x3333333333333333, %rdx # imm = 0x3333333333333333
andq %rdx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x38(%rbp), %rcx
shrq $0x4, %rcx
addq %rcx, %rax
movabsq $0xf0f0f0f0f0f0f0f, %rcx # imm = 0xF0F0F0F0F0F0F0F
andq %rcx, %rax
movq %rax, -0x38(%rbp)
movabsq $0x101010101010101, %rax # imm = 0x101010101010101
imulq -0x38(%rbp), %rax
movq %rax, -0x40(%rbp)
movslq -0x14(%rbp), %rax
movabsq $0x101010101010101, %rcx # imm = 0x101010101010101
imulq %rcx, %rax
movq %rax, -0x48(%rbp)
movabsq $-0x7f7f7f7f7f7f7f80, %rax # imm = 0x8080808080808080
orq -0x48(%rbp), %rax
subq -0x40(%rbp), %rax
movabsq $-0x7f7f7f7f7f7f7f80, %rcx # imm = 0x8080808080808080
andq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
callq 0x288c0
shll $0x3, %eax
cltq
movq %rax, -0x58(%rbp)
movslq -0x14(%rbp), %rax
movq -0x40(%rbp), %rdx
shlq $0x8, %rdx
movq -0x58(%rbp), %rcx
shrq %cl, %rdx
movq %rdx, %rcx
andq $0xff, %rcx
subq %rcx, %rax
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rax
movq -0x10(%rbp), %rdx
movq -0x58(%rbp), %rcx
shrq %cl, %rdx
andq $0xff, %rdx
movq -0x60(%rbp), %rcx
shlq $0x8, %rcx
orq %rcx, %rdx
leaq 0xeba(%rip), %rcx       # 0x2ab50
movzbl (%rcx,%rdx), %ecx
addq %rcx, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: ewhitebloom[P]fetch/src/././request/../encode/encode.cc
// Function: encode(std::vector<Param<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<Param<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>&)
string encode(vector < Param <string> >& params) {
  string result = "";
  for (auto& param : params) {
    result += encode(param);
  }
  return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x78(%rbp)
movq %rdi, %rax
movq %rax, -0x80(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x0, -0x11(%rbp)
leaq -0x12(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0x53a0
movq -0x78(%rbp), %rdi
movq -0x70(%rbp), %rdx
leaq 0x9777(%rip), %rsi      # 0x10185
callq 0x52f0
jmp 0x6a15
leaq -0x12(%rbp), %rdi
callq 0x5480
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x8640
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
callq 0x8670
movq %rax, -0x40(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x86a0
testb $0x1, %al
jne 0x6a53
jmp 0x6ace
leaq -0x38(%rbp), %rdi
callq 0x86e0
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rsi
leaq -0x68(%rbp), %rdi
callq 0x65e0
jmp 0x6a6f
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x5090
jmp 0x6a7e
leaq -0x68(%rbp), %rdi
callq 0x5498
leaq -0x38(%rbp), %rdi
callq 0x8700
jmp 0x6a40
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x12(%rbp), %rdi
callq 0x5480
jmp 0x6af7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x6aee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x5498
jmp 0x6aee
movb $0x1, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
jne 0x6ae1
movq -0x78(%rbp), %rdi
callq 0x5498
movq -0x80(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
movq -0x78(%rbp), %rdi
callq 0x5498
movq -0x20(%rbp), %rdi
callq 0x5270
// File: ewhitebloom[P]fetch/src/./fetch.cc
// Function: Fetch::fetch(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::vector<Param<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<Param<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>)
Response fetch(string url, string method, vector< Param<string> > params) {
    if (method == "GET") {
      return get::get(url);
    } else if (method == "POST") {
      return post::post(url, params);
    } else {
      return get::get(url);
    }
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rcx, -0x48(%rbp)
movq %rdx, -0x38(%rbp)
movq %rsi, -0x40(%rbp)
movq %rdi, %rax
movq -0x38(%rbp), %rdi
movq %rax, -0x30(%rbp)
movq %rax, %rdx
movq %rdx, -0x28(%rbp)
movq %rax, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdi, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
leaq 0x937d(%rip), %rsi      # 0x1018a
callq 0x8720
testb $0x1, %al
jne 0x6e18
jmp 0x6e27
movq -0x40(%rbp), %rsi
movq -0x30(%rbp), %rdi
callq 0x63a0
jmp 0x6e5d
movq -0x38(%rbp), %rdi
leaq 0x935c(%rip), %rsi      # 0x1018e
callq 0x8720
testb $0x1, %al
jne 0x6e3d
jmp 0x6e50
movq -0x48(%rbp), %rdx
movq -0x40(%rbp), %rsi
movq -0x30(%rbp), %rdi
callq 0x6b70
jmp 0x6e5d
movq -0x40(%rbp), %rsi
movq -0x30(%rbp), %rdi
callq 0x63a0
movq -0x28(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: ewhitebloom[P]fetch/src/main.cc
// Function: main
int main () {

  // Response res = fetch("https://www.google.com");
  //
  // cout << "Status: " << res.status << endl;
  //
  // for (auto& header : res.headers) {
  //   cout << header.header << ": " << header.value << endl;
  // }
  //
  // Response response = fetch("https://www.nytimes.com");
  //
  // for (auto& header : response.headers) {
  //   cout << header.header << ": " << header.value << endl;
  // }


  Response r = fetch("https://www.google.com");

  if (r.ok()) {
    cout << r.body << endl;
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movl $0x0, -0x4(%rbp)
leaq -0xa9(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
callq 0x53a0
movq -0xc8(%rbp), %rdx
leaq 0x92c0(%rip), %rsi      # 0x10193
leaq -0xa8(%rbp), %rdi
callq 0x52f0
jmp 0x6ee1
leaq -0x88(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x6da0
jmp 0x6ef6
leaq -0xa8(%rbp), %rdi
callq 0x5498
leaq -0xa9(%rbp), %rdi
callq 0x5480
leaq -0x88(%rbp), %rdi
callq 0x8750
movb %al, -0xc9(%rbp)
jmp 0x6f22
movb -0xc9(%rbp), %al
testb $0x1, %al
jne 0x6f31
jmp 0x6fc4
movq 0x12090(%rip), %rdi     # 0x18fc8
leaq -0x88(%rbp), %rsi
callq 0x5150
movq %rax, -0xd8(%rbp)
jmp 0x6f4d
movq -0xd8(%rbp), %rdi
movq 0x1208d(%rip), %rsi     # 0x18fe8
callq 0x53e0
jmp 0x6f62
jmp 0x6fc4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
jmp 0x6f96
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x5498
leaq -0xa9(%rbp), %rdi
callq 0x5480
jmp 0x6fe3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb8(%rbp)
movl %eax, -0xbc(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x8290
jmp 0x6fe3
movl $0x0, -0x4(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x8290
movl -0x4(%rbp), %eax
addq $0xe0, %rsp
popq %rbp
retq
movq -0xb8(%rbp), %rdi
callq 0x5270
nop
// File: dgboy2000[P]compress/compress.cpp
// Function: DATCompression::identity_compress(std::vector<int, std::allocator<int>>)
vector<int> DATCompression::identity_compress(vector<int> data) {
    vector<int> compressed;
    compressed.push_back(data[0]);
    compressed.push_back(data[1]);
    compressed.push_back(data[2]);
    
    vector<int>::iterator viter = data.begin();
    viter++;
    viter++;
    viter++;
    for (viter; viter != data.end(); ++viter) {
        int val = *viter;
        
        compressed.push_back(val / 256);
        compressed.push_back(val % 256);
    }
    
    return compressed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdx, -0x78(%rbp)
movq %rdi, -0x70(%rbp)
movq %rdi, %rax
movq %rax, -0x80(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movb $0x0, -0x19(%rbp)
callq 0x8d20
movq -0x78(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x8db0
movq -0x70(%rbp), %rdi
movq %rax, %rsi
callq 0x8d40
jmp 0x257a
movq -0x78(%rbp), %rdi
movl $0x1, %esi
callq 0x8db0
movq -0x70(%rbp), %rdi
movq %rax, %rsi
callq 0x8d40
jmp 0x2596
movq -0x78(%rbp), %rdi
movl $0x2, %esi
callq 0x8db0
movq -0x70(%rbp), %rdi
movq %rax, %rsi
callq 0x8d40
jmp 0x25b2
movq -0x78(%rbp), %rdi
callq 0x8dd0
movq %rax, -0x38(%rbp)
leaq -0x38(%rbp), %rdi
xorl %esi, %esi
callq 0x8e00
movq %rax, -0x40(%rbp)
leaq -0x38(%rbp), %rdi
xorl %esi, %esi
callq 0x8e00
movq %rax, -0x48(%rbp)
leaq -0x38(%rbp), %rdi
xorl %esi, %esi
callq 0x8e00
movq %rax, -0x50(%rbp)
movq -0x78(%rbp), %rdi
callq 0x8e80
movq %rax, -0x58(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x8e40
testb $0x1, %al
jne 0x260f
jmp 0x2695
leaq -0x38(%rbp), %rdi
callq 0x8eb0
movq -0x70(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
movl %eax, %ecx
addl $0xff, %ecx
testl %eax, %eax
cmovsl %ecx, %eax
sarl $0x8, %eax
movl %eax, -0x60(%rbp)
leaq -0x60(%rbp), %rsi
callq 0x8ed0
jmp 0x2642
movq -0x70(%rbp), %rdi
movl -0x5c(%rbp), %eax
movl %eax, %edx
addl $0xff, %edx
testl %eax, %eax
movl %eax, %ecx
cmovsl %edx, %ecx
andl $0xffffff00, %ecx       # imm = 0xFFFFFF00
subl %ecx, %eax
movl %eax, -0x64(%rbp)
leaq -0x64(%rbp), %rsi
callq 0x8ed0
jmp 0x266e
jmp 0x2670
leaq -0x38(%rbp), %rdi
callq 0x8f00
jmp 0x25ec
movq -0x70(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x8f20
jmp 0x26b5
movb $0x1, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
jne 0x26a8
movq -0x70(%rbp), %rdi
callq 0x8f20
movq -0x80(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x2380
nop
// File: dgboy2000[P]compress/compress.cpp
// Function: DATCompression::identity_decompress(std::vector<int, std::allocator<int>>)
vector<int> DATCompression::identity_decompress(vector<int> compressed) {
    vector<int> decompressed;
    decompressed.push_back(compressed[0]);
    decompressed.push_back(compressed[1]);
    decompressed.push_back(compressed[2]);
    
    vector<int>::iterator viter = compressed.begin();
    viter++;
    viter++;
    viter++;
    for (viter; viter != compressed.end(); ++viter) {
        int val = *viter;
        val = 256 * val + *(++viter);
        
        decompressed.push_back(val);
    }
    
    return decompressed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdx, -0x70(%rbp)
movq %rdi, -0x68(%rbp)
movq %rdi, %rax
movq %rax, -0x78(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movb $0x0, -0x19(%rbp)
callq 0x8d20
movq -0x70(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x8db0
movq -0x68(%rbp), %rdi
movq %rax, %rsi
callq 0x8d40
jmp 0x270a
movq -0x70(%rbp), %rdi
movl $0x1, %esi
callq 0x8db0
movq -0x68(%rbp), %rdi
movq %rax, %rsi
callq 0x8d40
jmp 0x2726
movq -0x70(%rbp), %rdi
movl $0x2, %esi
callq 0x8db0
movq -0x68(%rbp), %rdi
movq %rax, %rsi
callq 0x8d40
jmp 0x2742
movq -0x70(%rbp), %rdi
callq 0x8dd0
movq %rax, -0x38(%rbp)
leaq -0x38(%rbp), %rdi
xorl %esi, %esi
callq 0x8e00
movq %rax, -0x40(%rbp)
leaq -0x38(%rbp), %rdi
xorl %esi, %esi
callq 0x8e00
movq %rax, -0x48(%rbp)
leaq -0x38(%rbp), %rdi
xorl %esi, %esi
callq 0x8e00
movq %rax, -0x50(%rbp)
movq -0x70(%rbp), %rdi
callq 0x8e80
movq %rax, -0x58(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x8e40
testb $0x1, %al
jne 0x279c
jmp 0x280e
leaq -0x38(%rbp), %rdi
movq %rdi, -0x88(%rbp)
callq 0x8eb0
movq -0x88(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
shll $0x8, %eax
movl %eax, -0x7c(%rbp)
callq 0x8f00
movq %rax, %rdi
callq 0x8eb0
movq -0x68(%rbp), %rdi
movq %rax, %rcx
movl -0x7c(%rbp), %eax
movl (%rcx), %ecx
addl %ecx, %eax
movl %eax, -0x5c(%rbp)
leaq -0x5c(%rbp), %rsi
callq 0x8d40
jmp 0x27ea
jmp 0x27ec
leaq -0x38(%rbp), %rdi
callq 0x8f00
jmp 0x277c
movq -0x68(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x8f20
jmp 0x282e
movb $0x1, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
jne 0x2821
movq -0x68(%rbp), %rdi
callq 0x8f20
movq -0x78(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x2380
nopw (%rax,%rax)
// File: dgboy2000[P]compress/compress.cpp
// Function: DATCompression::run_length_encode(std::vector<int, std::allocator<int>>)
vector<int> DATCompression::run_length_encode(vector<int> data) {
    int n = data.size();
    vector<int> encoded;
    encoded.reserve(n); // Heuristic; reserve enough space for the data
    
    int i=0;
    while (i < n) {
        int run_int = data[i];
        int run_count = 1;
        ++i;
        while (i < n && data[i] == run_int && run_count < RUN_MAX) {
            ++run_count;
            ++i;
        }
        for (int j=0; j<run_count && j<RUN_MIN; ++j) encoded.push_back(run_int);
        if (run_count >= RUN_MIN) encoded.push_back(run_count - RUN_MIN);
    }
    
    return encoded;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdx, -0x58(%rbp)
movq %rdi, %rax
movq -0x58(%rbp), %rdi
movq %rax, -0x48(%rbp)
movq %rax, %rcx
movq %rcx, -0x50(%rbp)
movq %rax, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdi, -0x18(%rbp)
callq 0x90a0
movq -0x48(%rbp), %rdi
movl %eax, -0x1c(%rbp)
movb $0x0, -0x1d(%rbp)
callq 0x8d20
movq -0x48(%rbp), %rdi
movslq -0x1c(%rbp), %rsi
callq 0x9100
jmp 0x2ebe
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x2fc5
movq -0x58(%rbp), %rdi
movslq -0x30(%rbp), %rsi
callq 0x8db0
movl (%rax), %eax
movl %eax, -0x34(%rbp)
movl $0x1, -0x38(%rbp)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
movl -0x30(%rbp), %ecx
xorl %eax, %eax
cmpl -0x1c(%rbp), %ecx
movb %al, -0x59(%rbp)
jge 0x2f26
movq -0x58(%rbp), %rdi
movslq -0x30(%rbp), %rsi
callq 0x8db0
movl (%rax), %ecx
xorl %eax, %eax
cmpl -0x34(%rbp), %ecx
movb %al, -0x59(%rbp)
jne 0x2f26
cmpl $0x103, -0x38(%rbp)     # imm = 0x103
setl %al
movb %al, -0x59(%rbp)
movb -0x59(%rbp), %al
testb $0x1, %al
jne 0x2f2f
jmp 0x2f5d
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x2ef3
movq -0x48(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
callq 0x8f20
jmp 0x2fe2
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %ecx
xorl %eax, %eax
cmpl -0x38(%rbp), %ecx
movb %al, -0x5a(%rbp)
jge 0x2f7b
cmpl $0x4, -0x3c(%rbp)
setl %al
movb %al, -0x5a(%rbp)
movb -0x5a(%rbp), %al
testb $0x1, %al
jne 0x2f84
jmp 0x2fa0
movq -0x48(%rbp), %rdi
leaq -0x34(%rbp), %rsi
callq 0x8d40
jmp 0x2f93
jmp 0x2f95
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x2f64
cmpl $0x4, -0x38(%rbp)
jl 0x2fc0
movq -0x48(%rbp), %rdi
movl -0x38(%rbp), %eax
addl $-0x4, %eax
movl %eax, -0x40(%rbp)
leaq -0x40(%rbp), %rsi
callq 0x8ed0
jmp 0x2fbe
jmp 0x2fc0
jmp 0x2ec5
movb $0x1, -0x1d(%rbp)
testb $0x1, -0x1d(%rbp)
jne 0x2fd8
movq -0x48(%rbp), %rdi
callq 0x8f20
movq -0x50(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
movq -0x28(%rbp), %rdi
callq 0x2380
nopl (%rax,%rax)