LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
movq (%rdi), %r13
movq 0x10(%rdi), %rsi
leaq 0x10(%rsp), %rbp
leaq 0x8(%rsp), %rcx
movq %r13, %rdi
movq %rbp, %rdx
callq 0x126cd
movq 0x8(%r12), %rax
movq 0x8(%r13), %rdx
movb 0x38(%rdx), %cl
shlq %cl, %rax
orq (%rbp), %rax
movq %rax, (%r15)
movq $0x0, (%r14)
leaq 0x8(%rsp), %rax
movq (%rax), %rax
movq %rax, (%rbx)
incq 0x60(%rdx)
addq %rax, 0x58(%rdx)
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq 0x8(%rdi), %rax
movq (%rax), %rax
movq 0x8(%rsi), %rcx
cmpq (%rcx), %rax
movq %rdi, %rbx
cmovaq %rsi, %rbx
cmovbeq %rsi, %rdi
xorl %r14d, %r14d
leaq 0x18(%rsp), %r15
movq %r15, %rsi
xorl %edx, %edx
callq 0x12995
leaq 0x10(%rsp), %r12
leaq 0x8(%rsp), %r13
movq 0x18(%rsp), %rbp
movq 0x28(%rsp), %rsi
movq %rbp, %rdi
movq %r12, %rdx
movq %r13, %rcx
callq 0x126cd
movq 0x20(%rsp), %rsi
movq 0x8(%rbp), %rax
movb 0x38(%rax), %cl
shlq %cl, %rsi
orq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rbp
incq 0x60(%rax)
addq %rbp, 0x58(%rax)
movq %rbx, %rdi
callq 0x1232e
imulq %rbp, %rax
addq %rax, %r14
movq %r15, %rdi
callq 0x12c5d
testl %eax, %eax
je 0x1346c
movq %r14, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
movq %rsi, %rax
shrq $0x6, %rax
movq 0x8(%rdi), %rcx
movq 0x38(%rcx), %rcx
movabsq $0x3ffffffffffffff, %rdx # imm = 0x3FFFFFFFFFFFFFF
andq %rcx, %rdx
leaq 0x11(,%rdx,8), %rdx
imulq %rax, %rdx
addq 0x10(%rdi), %rdx
andl $0x3f, %esi
imulq %rcx, %rsi
movq %rsi, %rax
shrq $0x3, %rax
movq 0x11(%rax,%rdx), %rax
movq $-0x1, %rdx
movq $-0x1, %rdi
shlq %cl, %rdi
cmpq $0x40, %rcx
notq %rdi
cmoveq %rdx, %rdi
andb $0x7, %sil
movl %esi, %ecx
shrq %cl, %rax
andq %rdi, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %r8
cmpq $0x1, %rcx
jne 0x13c1f
movabsq $0x1ffffffffffffff8, %rdx # imm = 0x1FFFFFFFFFFFFFF8
addq $0x2, %r8
movq 0x8(%rdi), %rbx
movq 0x38(%rbx), %rax
imulq %rax, %r8
movq %r8, %rcx
shrq $0x6, %rcx
imulq %rax, %rsi
movq %rsi, %r14
shrq $0x6, %r14
andl $0x3f, %r8d
cmpq %r14, %rcx
movq %rdi, -0x8(%rsp)
jne 0x13cf1
movq %rcx, %r9
movq %rdx, %rdi
jmp 0x13d91
cmpq %rsi, %r8
jl 0x13e04
movq %rcx, %rax
movabsq $0x1ffffffffffffff8, %r9 # imm = 0x1FFFFFFFFFFFFFF8
movq 0x8(%rdi), %r10
movq 0x10(%rdi), %r11
addq $0x11, %r11
movq $-0x1, %rbx
movq %r8, %rcx
shrq $0x6, %rcx
movq 0x38(%r10), %rdx
leaq (,%rdx,8), %r14
andq %r9, %r14
addq $0x11, %r14
imulq %r14, %rcx
addq %r11, %rcx
movl %r8d, %edi
andl $0x3f, %edi
imulq %rdx, %rdi
movq %rdi, %r15
shrq $0x3, %r15
movq (%r15,%rcx), %r15
movq $-0x1, %r12
movl %edx, %ecx
shlq %cl, %r12
cmpq $0x40, %rdx
notq %r12
cmoveq %rbx, %r12
andb $0x7, %dil
movl %edi, %ecx
shrq %cl, %r15
leaq (%rax,%r8), %rcx
andq %r12, %r15
movl %ecx, %edi
andl $0x3f, %edi
imulq %rdx, %rdi
imull %ecx, %edx
movq %rcx, %r13
shrq $0x6, %r13
imulq %r14, %r13
addq %r11, %r13
shrq $0x3, %rdi
andb $0x7, %dl
movl %edx, %ecx
shlq %cl, %r12
shlq %cl, %r15
notq %r12
andq (%rdi,%r13), %r12
orq %r15, %r12
movq %r12, (%rdi,%r13)
leaq -0x1(%r8), %rcx
cmpq %rsi, %r8
movq %rcx, %r8
jg 0x13c48
jmp 0x13e04
movq 0x10(%rdi), %r15
addq $0x11, %r15
movq $-0x1, %r12
movq %rdx, %rdi
leaq -0x1(%rcx), %r9
movq 0x38(%rbx), %r10
movq %r9, %rax
xorl %edx, %edx
divq %r10
leaq (,%r10,8), %rbp
andq %rdi, %rbp
addq $0x11, %rbp
imulq %rbp, %rax
addq %r15, %rax
movq (%rax,%rdx,8), %r13
movq %rcx, %rax
xorl %edx, %edx
divq %r10
imulq %rbp, %rax
addq %r15, %rax
movq $-0x1, %rbp
movl %r8d, %ecx
shlq %cl, %rbp
cmpl $0x40, %r8d
notq %rbp
cmoveq %r12, %rbp
movl %r10d, %ecx
negb %cl
shrq %cl, %r13
movq (%rax,%rdx,8), %r11
movq %r11, %r8
andq %rbp, %r8
movl %r10d, %ecx
shlq %cl, %r8
andq %rbp, %r8
notq %rbp
andq %r11, %rbp
orq %r13, %rbp
orq %r8, %rbp
movq %rbp, (%rax,%rdx,8)
movl $0x40, %r8d
movq %r9, %rcx
cmpq %r9, %r14
jne 0x13d03
movq 0x38(%rbx), %r10
movq %r9, %rax
xorl %edx, %edx
divq %r10
leaq (,%r10,8), %rcx
andq %rdi, %rcx
movl %esi, %edi
addq $0x11, %rcx
imulq %rcx, %rax
movq -0x8(%rsp), %rcx
addq 0x10(%rcx), %rax
andl $0x3f, %edi
subl %edi, %r8d
movq $-0x1, %rdi
movq $-0x1, %r9
movl %r8d, %ecx
shlq %cl, %r9
cmpl $0x40, %r8d
notq %r9
cmoveq %rdi, %r9
movl %esi, %ecx
shlq %cl, %r9
movq 0x11(%rax,%rdx,8), %rsi
movq %rsi, %rdi
andq %r9, %rdi
movl %r10d, %ecx
shlq %cl, %rdi
xorq %rsi, %rdi
andq %r9, %rdi
xorq %rsi, %rdi
movq %rdi, 0x11(%rax,%rdx,8)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, -0x30(%rbp)
movq %rax, (%rdi)
leaq 0x3a0e(%rip), %rdx      # 0x9181
movq %rdx, %rsi
callq 0x668a
movq (%r15), %r14
movq 0x8(%r15), %r12
cmpq %r12, %r14
je 0x57c1
leaq -0x40(%rbp), %r13
leaq -0x50(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x4ef5
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq %rbx, %rdi
callq 0x41d0
movq -0x50(%rbp), %rdi
cmpq %r13, %rdi
je 0x57b8
callq 0x4130
addq $0x40, %r14
cmpq %r12, %r14
jne 0x578f
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x57e9
movq %rax, %r14
movq -0x50(%rbp), %rdi
cmpq %r13, %rdi
je 0x57e9
callq 0x4130
movq (%rbx), %rdi
cmpq -0x30(%rbp), %rdi
je 0x57f7
callq 0x4130
movq %r14, %rdi
callq 0x4180
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x3712(%rip), %rsi      # 0x9186
movq %rdx, %rdi
callq 0x4240
testl %eax, %eax
je 0x5a93
leaq 0x3703(%rip), %rsi      # 0x918a
movq %r12, %rdi
callq 0x4240
testl %eax, %eax
je 0x5aa0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4cc2
jmp 0x5aae
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x5844
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r14
pushq %rbx
subq $0xa0, %rsp
leaq -0x20(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x36a0(%rip), %rsi      # 0x918f
leaq 0x36af(%rip), %rdx      # 0x91a5
leaq -0x30(%rbp), %rbx
movq %rbx, %rdi
callq 0x668a
leaq -0xb0(%rbp), %rdi
movq %rbx, %rsi
callq 0x4cc2
movq -0x30(%rbp), %rdi
cmpq %r14, %rdi
je 0x5b1f
callq 0x4130
cmpl $0xc8, -0x90(%rbp)
jne 0x5b6f
movq -0xb0(%rbp), %rsi
movq -0xa8(%rbp), %rdx
movq 0x8490(%rip), %rdi      # 0xdfd0
callq 0x4280
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x42c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4140
movq %rax, %rdi
callq 0x4120
leaq -0x48(%rbp), %rbx
movq %rbx, %rdi
callq 0x5e2a
movq -0x20(%rbx), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0x5b8d
callq 0x4130
leaq -0x78(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5b9f
callq 0x4130
leaq -0xa0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5bb4
callq 0x4130
xorl %eax, %eax
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq -0x30(%rbp), %rdi
cmpq %r14, %rdi
je 0x5be4
callq 0x4130
jmp 0x5be4
movq %rax, %rbx
leaq -0xb0(%rbp), %rdi
callq 0x5e5e
movq %rbx, %rdi
callq 0x4180
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rdx), %rdx
movq 0x8(%rdi), %rsi
testq %rsi, %rsi
je 0x2465
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x246d
movq %rbx, %rdi
callq 0x62c2
movq (%r14), %rdx
addq $0x4, %rdx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x248c
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x2494
movq %rbx, %rdi
callq 0x62c2
movq (%r14), %rdx
addq $0x8, %rdx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x24b3
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x24bb
movq %rbx, %rdi
callq 0x62c2
movq (%r14), %r13
addq $0xc, %r13
cmpq 0x8(%r14), %r13
je 0x2541
movq %rsp, %r12
movl (%r13), %ebp
leal 0xff(%rbp), %r15d
testl %ebp, %ebp
cmovnsl %ebp, %r15d
movl %r15d, %eax
sarl $0x8, %eax
movl %eax, 0x4(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x24fc
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x2509
movq %rbx, %rdi
leaq 0x4(%rsp), %rdx
callq 0x63e2
andl $0xffffff00, %r15d      # imm = 0xFFFFFF00
subl %r15d, %ebp
movl %ebp, (%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x252c
movl %ebp, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x2537
movq %rbx, %rdi
movq %r12, %rdx
callq 0x63e2
addq $0x4, %r13
cmpq 0x8(%r14), %r13
jne 0x24cb
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2557
jmp 0x2557
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x256e
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x21b0
movq %r14, %rdi
callq 0x22c0
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rdx), %rdx
movq 0x8(%rdi), %rsi
testq %rsi, %rsi
je 0x25ac
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x25b4
movq %rbx, %rdi
callq 0x62c2
movq (%r14), %rdx
addq $0x4, %rdx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x25d3
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x25db
movq %rbx, %rdi
callq 0x62c2
movq (%r14), %rdx
addq $0x8, %rdx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x25fa
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x2602
movq %rbx, %rdi
callq 0x62c2
movq (%r14), %r12
addq $0xc, %r12
cmpq 0x8(%r14), %r12
je 0x2653
leaq 0x4(%rsp), %r15
movl (%r12), %eax
movl %eax, 0x4(%rsp)
shll $0x8, %eax
addl 0x4(%r12), %eax
movl %eax, 0x4(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x263e
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x2649
movq %rbx, %rdi
movq %r15, %rdx
callq 0x62c2
addq $0x8, %r12
cmpq 0x8(%r14), %r12
jne 0x2614
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x2664
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x267b
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x21b0
movq %r14, %rdi
callq 0x22c0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq 0x8(%rdx), %r13
movq %rdx, 0x10(%rsp)
subq (%rdx), %r13
shrq $0x2, %r13
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movslq %r13d, %rsi
callq 0x60a4
testl %r13d, %r13d
jle 0x2dc8
movl %r13d, %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq %rax, 0x8(%rsp)
xorl %eax, %eax
movq %rsp, %r15
movslq %eax, %rsi
movq 0x10(%rsp), %rcx
movq (%rcx), %rdx
movl (%rdx,%rsi,4), %ecx
movl %ecx, (%rsp)
leal 0x1(%rsi), %ebp
movl $0x1, %r12d
cmpl %r13d, %ebp
jge 0x2d4b
leaq (%rdx,%rsi,4), %rdx
movl %r13d, %r12d
subl %esi, %r12d
movq 0x8(%rsp), %rdi
subq %rsi, %rdi
movl $0x1, %esi
cmpl %ecx, (%rdx,%rsi,4)
jne 0x2d44
cmpl $0x102, %esi            # imm = 0x102
ja 0x2d44
incq %rsi
cmpq %rsi, %rdi
jne 0x2d2a
movl %r13d, %ebp
jmp 0x2d4b
addl %esi, %eax
movl %esi, %r12d
movl %eax, %ebp
cmpl $0x4, %r12d
movl $0x4, %r14d
cmovbl %r12d, %r14d
cmpl $0x1, %r14d
adcl $0x0, %r14d
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x2d7a
movl (%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x2d85
movq %rbx, %rdi
movq %r15, %rdx
callq 0x62c2
decl %r14d
jne 0x2d61
cmpl $0x3, %r12d
jbe 0x2dbd
addl $-0x4, %r12d
movl %r12d, 0x4(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x2db0
movl %r12d, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x2dbd
movq %rbx, %rdi
leaq 0x4(%rsp), %rdx
callq 0x63e2
movl %ebp, %eax
cmpl %r13d, %ebp
jl 0x2cf4
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2dde
jmp 0x2dde
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x2df5
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x21b0
movq %r14, %rdi
callq 0x22c0
nop
// File: /workspace/github_cpp_makefile_star2_O1/dgboy2000[P]compress/compress.cpp
// Function: DATCompression::burrows_wheeler_encode(std::vector<int, std::allocator<int>>)
vector<int> DATCompression::burrows_wheeler_encode(vector<int> data) {
    int n = data.size();
    SuffixArray sa(&data);
    
    vector<int> bwt;
    bwt.resize(n+4);
    vector<int>::iterator bwt_iter = bwt.begin();
    
    long int dollar_ind;
    *(bwt_iter++) = data.back();
    
    for (int i=0; i<n; ++i) {
        if (sa[i] == 0) {
            *(bwt_iter++) = 0;
            dollar_ind = i + 1;
        }
        else *(bwt_iter++) = data[sa[i] - 1];
    }
    
    *(bwt_iter++) = dollar_ind / (256*256);
    *(bwt_iter++) = (dollar_ind / 256) % 256;
    *(bwt_iter++) = dollar_ind % 256;
    
    return bwt;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdx, %r14
movq %rdi, %rbx
movq 0x8(%rdx), %r15
subq (%rdx), %r15
leaq 0x8(%rsp), %rdi
movq %rdx, %rsi
callq 0x53ea
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
movq %r15, %rax
shlq $0x1e, %rax
movabsq $0x400000000, %rsi      # imm = 0x400000000
addq %rax, %rsi
sarq $0x20, %rsi
movq %rbx, %rdi
callq 0x613a
shrq $0x2, %r15
movq (%rbx), %rdx
movq 0x8(%r14), %rax
movl -0x4(%rax), %eax
movl %eax, (%rdx)
leaq 0x4(%rdx), %rcx
testl %r15d, %r15d
jle 0x2eb5
movq 0x10(%rsp), %rdx
andl $0x7fffffff, %r15d      # imm = 0x7FFFFFFF
negq %r15
movl $0x1, %esi
movslq -0x4(%rdx,%rsi,4), %rdi
testq %rdi, %rdi
je 0x2e92
movq (%r14), %r8
movl -0x4(%r8,%rdi,4), %edi
movl %edi, (%rcx)
jmp 0x2e9b
movl $0x0, (%rcx)
movq %rsi, %rax
addq $0x4, %rcx
leaq (%r15,%rsi), %rdi
incq %rdi
incq %rsi
cmpq $0x1, %rdi
jne 0x2e7c
leaq -0x4(%rcx), %rdx
jmp 0x2eb5
leaq 0xffff(%rax), %rsi
leaq 0xff(%rax), %rdi
testq %rax, %rax
cmovnsq %rax, %rsi
cmovnsq %rax, %rdi
shrq $0x10, %rsi
movl %esi, (%rcx)
sarq $0x8, %rdi
leal 0xff(%rdi), %ecx
testq %rdi, %rdi
cmovnsl %edi, %ecx
andl $0xffffff00, %ecx       # imm = 0xFFFFFF00
movl %edi, %esi
subl %ecx, %esi
movl %esi, 0x8(%rdx)
shll $0x8, %edi
subl %edi, %eax
movl %eax, 0xc(%rdx)
movq 0x10(%rsp), %rdi
callq 0x21f0
movq 0x18(%rsp), %rdi
callq 0x21f0
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x2f31
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x21b0
movq 0x10(%rsp), %rdi
callq 0x21f0
movq 0x18(%rsp), %rdi
callq 0x21f0
movq %r14, %rdi
callq 0x22c0
nop
// File: /workspace/github_cpp_makefile_star2_O1/dgboy2000[P]compress/compress.cpp
// Function: DATCompression::golomb_decompress(std::vector<int, std::allocator<int>>)
vector<int> DATCompression::golomb_decompress(vector<int> compressed)
{
  vector<int> decompressed;
  int temp, q = 0, r = 0, power = 1, nr = 0;
  char status = 'q';

  for(int i = 0; i < compressed.size(); i++)
  {
    temp = compressed[i];
    for(int j = 0; j < 8; j++)
    {
      if(status == 'q')
      {
        if((temp & 0x80) == 0x80)
          q++;
        else
          status = 'r', r = 0, power = 1, nr = 0;
      }
      else
      {
        if((temp & 0x80) == 0x80)
          r += power;
        nr++, power *= 2;
        if(nr == int(log(golomb_n) / log(2.0) + 1e-8))
        {
          status = 'q';
          decompressed.push_back(q * golomb_n + r);
          q = 0;
        }
      }
      temp <<= 1;
    }
  }

  return decompressed;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, 0x30(%rsp)
xorpd %xmm0, %xmm0
movupd %xmm0, (%rdi)
movq %rdi, 0x10(%rsp)
movq $0x0, 0x10(%rdi)
movq (%rdx), %rax
movq %rdx, 0x20(%rsp)
cmpq %rax, 0x8(%rdx)
je 0x3f41
movl $0x1, %esi
xorl %edx, %edx
movb $0x71, %r8b
movl $0x0, 0xc(%rsp)
xorl %ebp, %ebp
xorl %r12d, %r12d
movq 0x30(%rsp), %r14
movq %rdx, 0x28(%rsp)
movl (%rax,%rdx,4), %r15d
movl $0x8, %ebx
cmpb $0x71, %r8b
je 0x3ee0
movb %r8b, 0x7(%rsp)
movsbl %r15b, %eax
sarl $0x7, %eax
andl %esi, %eax
addl %eax, %ebp
movl 0xc(%rsp), %r13d
incl %r13d
addl %esi, %esi
movl %esi, 0x8(%rsp)
xorps %xmm0, %xmm0
cvtsi2sdl (%r14), %xmm0
callq 0x2160
divsd 0x4175(%rip), %xmm0     # 0x8008
addsd 0x4175(%rip), %xmm0     # 0x8010
cvttsd2si %xmm0, %eax
movl %r13d, 0xc(%rsp)
cmpl %eax, %r13d
jne 0x3ed5
imull (%r14), %r12d
addl %ebp, %r12d
movl %r12d, 0x1c(%rsp)
movq 0x10(%rsp), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x3efe
movl %r12d, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rdi)
movl 0x8(%rsp), %esi
jmp 0x3f0c
movl 0x8(%rsp), %esi
movb 0x7(%rsp), %r8b
jmp 0x3f12
testb %r15b, %r15b
js 0x3ef9
movb $0x72, %r8b
movl $0x1, %esi
xorl %ebp, %ebp
movl $0x0, 0xc(%rsp)
jmp 0x3f12
incl %r12d
jmp 0x3f12
leaq 0x1c(%rsp), %rdx
callq 0x63e2
movl 0x8(%rsp), %esi
movb $0x71, %r8b
xorl %r12d, %r12d
addl %r15d, %r15d
decl %ebx
jne 0x3e56
movq 0x28(%rsp), %rdx
incq %rdx
movq 0x20(%rsp), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %rdx, %rcx
ja 0x3e48
movq 0x10(%rsp), %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq 0x10(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x3f76
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rsi
subq %rdi, %rsi
callq 0x21b0
movq %r14, %rdi
callq 0x22c0
// File: /workspace/github_cpp_makefile_star2_O1/dgboy2000[P]compress/compress.cpp
// Function: DATCompression::run_length_decode(std::vector<int, std::allocator<int>>)
vector<int> DATCompression::run_length_decode(vector<int> encoded) {
    int n = encoded.size();
    vector<int> decoded;
    decoded.reserve(n); // Heuristic; reserve some space for the data

    vector<int>::iterator viter = encoded.begin(), data_end = encoded.end();
    while (viter != data_end) {
        int run_int = *(viter++);
        int run_count = 1;
        while (*viter == run_int && run_count < RUN_MIN && viter != data_end) {
            ++viter;
            ++run_count;
        }
        if (run_count == RUN_MIN) run_count += *(viter++);
        for (int i=0; i<run_count; ++i) decoded.push_back(run_int);
    }
    
    return decoded;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rdi, %rbx
movq 0x8(%rdx), %rax
subq (%rdx), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
shrq $0x2, %rax
movslq %eax, %rsi
callq 0x60a4
movq (%r14), %r12
movq 0x8(%r14), %r15
cmpq %r15, %r12
je 0x402f
leaq 0xc(%rsp), %r14
movl (%r12), %ecx
movl %ecx, 0xc(%rsp)
addq $0x4, %r12
xorl %eax, %eax
movq %r12, %rdx
movq %rdx, %rsi
incl %eax
movl (%rdx), %ebp
addq $0x4, %rdx
cmpq %r15, %rsi
je 0x3fec
cmpl %ecx, %ebp
jne 0x3fec
cmpl $0x4, %eax
jb 0x3fd3
addl $0x4, %ebp
leaq -0x4(%rdx), %r12
cmpl $0x4, %eax
cmoveq %rdx, %r12
cmovnel %eax, %ebp
testl %ebp, %ebp
jle 0x402a
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x401b
movl 0xc(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x4026
movq %rbx, %rdi
movq %r14, %rdx
callq 0x62c2
decl %ebp
jne 0x4001
cmpq %r15, %r12
jne 0x3fc2
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4041
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x4058
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x21b0
movq %r14, %rdi
callq 0x22c0
// File: /workspace/github_cpp_makefile_star2_O1/dgboy2000[P]compress/compress.cpp
// Function: DATCompression::frame_diff_decompress(std::vector<int, std::allocator<int>>)
vector<int> DATCompression::frame_diff_decompress(vector<int> compressed)
{
  vector<int> decompressed;
  int x = compressed[0], y = compressed[1], l = compressed[2], q, r;

  decompressed.push_back(x);
  decompressed.push_back(y);
  decompressed.push_back(l);

  for(int x_ind = 0; x_ind < x; x_ind++)
    for(int y_ind = 0; y_ind < y; y_ind++)
    {
      q = compressed[3 + 2 * (x_ind * y + y_ind)];
      r = compressed[3 + 2 * (x_ind * y + y_ind) + 1];
      decompressed.push_back(q * 256 + r);
    }

  return decompressed;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rdx), %rcx
movl (%rcx), %eax
movl %eax, 0x4(%rsp)
movl 0x4(%rcx), %edx
movl %edx, (%rsp)
movl 0x8(%rcx), %ecx
movl %ecx, 0x8(%rsp)
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x44ba
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x44c7
leaq 0x4(%rsp), %rdx
movq %rbx, %rdi
callq 0x62c2
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x44e0
movl (%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x44eb
movq %rsp, %rdx
movq %rbx, %rdi
callq 0x62c2
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x4505
movl 0x8(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x4512
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x62c2
cmpl $0x0, 0x4(%rsp)
jle 0x457b
xorl %ebp, %ebp
leaq 0xc(%rsp), %r15
movl (%rsp), %eax
testl %eax, %eax
jle 0x4573
xorl %r12d, %r12d
imull %ebp, %eax
addl %r12d, %eax
addl %eax, %eax
movq (%r14), %rcx
movslq %eax, %rdx
movl 0xc(%rcx,%rdx,4), %eax
shll $0x8, %eax
addl 0x10(%rcx,%rdx,4), %eax
movl %eax, 0xc(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x455d
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x4568
movq %rbx, %rdi
movq %r15, %rdx
callq 0x63e2
incl %r12d
movl (%rsp), %eax
cmpl %eax, %r12d
jl 0x452a
incl %ebp
cmpl 0x4(%rsp), %ebp
jl 0x4520
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x458d
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x45a4
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x21b0
movq %r14, %rdi
callq 0x22c0
// File: /workspace/github_cpp_makefile_star2_O1/dgboy2000[P]compress/compress.cpp
// Function: DATCompression::compute_diffs(std::vector<int, std::allocator<int>>)
vector<int> DATCompression::compute_diffs(vector<int> data) {
    vector<int> diffs;
    
    int x = data[0];
    int y = data[1];
    int L = data[2];
    
    vector<int>::iterator viter = data.begin();
    viter++;
    viter++;
    viter++;
    
    for (int x_ind=0; x_ind < x; ++x_ind) {
        for (int y_ind=0; y_ind < y; ++y_ind) {
            int val = data[3 + L * (x_ind*y + y_ind)];
                        
            for (int L_ind=1; L_ind < L; ++L_ind) {
                int diff = data[3 + L * (x_ind*y + y_ind) + L_ind] - val;
                val = diff + val;
                diffs.push_back(diff);
            }
        }
    }
    
    return diffs;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq (%rdx), %rax
movslq (%rax), %rcx
movq %rcx, 0x28(%rsp)
testq %rcx, %rcx
jle 0x4b2b
movq %rdx, %r14
movslq 0x4(%rax), %rcx
movslq 0x8(%rax), %rax
movq %rax, 0x20(%rsp)
movl %eax, %edx
movq %rcx, %rax
movq %rcx, 0x10(%rsp)
imull %edx, %eax
movl %eax, 0x18(%rsp)
movq %rdx, 0x40(%rsp)
decq %rdx
movq %rdx, 0x30(%rsp)
movl $0x3, (%rsp)
movq $0x0, 0x8(%rsp)
cmpl $0x0, 0x10(%rsp)
jle 0x4b09
movq 0x8(%rsp), %rax
imulq 0x10(%rsp), %rax
movq %rax, 0x38(%rsp)
movl (%rsp), %eax
movl %eax, 0x4(%rsp)
xorl %r13d, %r13d
cmpl $0x2, 0x20(%rsp)
jl 0x4af3
movl 0x4(%rsp), %ebp
incq %rbp
movq (%r14), %rax
movq 0x38(%rsp), %rcx
addq %r13, %rcx
imulq 0x20(%rsp), %rcx
movl 0xc(%rax,%rcx,4), %r12d
movq 0x30(%rsp), %r15
movl %r12d, %ecx
movq (%r14), %rax
movl (%rax,%rbp,4), %r12d
movl %r12d, %eax
subl %ecx, %eax
movl %eax, 0x1c(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x4ade
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x4aeb
movq %rbx, %rdi
leaq 0x1c(%rsp), %rdx
callq 0x62c2
incq %rbp
decq %r15
jne 0x4ab5
incq %r13
movl 0x4(%rsp), %eax
addl 0x40(%rsp), %eax
movl %eax, 0x4(%rsp)
cmpq 0x10(%rsp), %r13
jne 0x4a8c
movq 0x8(%rsp), %rcx
incq %rcx
movl (%rsp), %eax
addl 0x18(%rsp), %eax
movl %eax, (%rsp)
movq %rcx, 0x8(%rsp)
cmpq 0x28(%rsp), %rcx
jne 0x4a67
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x4b54
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x21b0
movq %r14, %rdi
callq 0x22c0
// File: /workspace/github_cpp_makefile_star2_O1/dgboy2000[P]compress/compress.cpp
// Function: DATCompression::encode_positive(std::vector<int, std::allocator<int>>)
vector<int> DATCompression::encode_positive(vector<int> nonpositive) {
    vector<int> positive;
    positive.reserve(nonpositive.size());
    
    for (vector<int>::iterator viter = nonpositive.begin(); viter != nonpositive.end(); ++viter) {
        int val = *viter;
        if (val == 0) positive.push_back(0);
        else if (val > 0) positive.push_back(2*val - 1);
        else positive.push_back(-2*val);
    }
    return positive;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0x8(%rdx), %rsi
subq (%rdx), %rsi
sarq $0x2, %rsi
callq 0x60a4
movq (%r14), %rbp
cmpq 0x8(%r14), %rbp
je 0x4c35
leaq 0x14(%rsp), %r15
leaq 0x10(%rsp), %r12
leaq 0xc(%rsp), %r13
movl (%rbp), %eax
testl %eax, %eax
je 0x4bcc
jle 0x4be6
leal -0x1(,%rax,2), %eax
movl %eax, 0x10(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x4c0e
movl %eax, (%rsi)
jmp 0x4bfa
movl $0x0, 0x14(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x4c1b
movl $0x0, (%rsi)
jmp 0x4bfa
addl %eax, %eax
negl %eax
movl %eax, 0xc(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x4c28
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
addq $0x4, %rbp
cmpq 0x8(%r14), %rbp
jne 0x4baa
jmp 0x4c35
movq %rbx, %rdi
movq %r12, %rdx
callq 0x63e2
jmp 0x4c02
movq %rbx, %rdi
movq %r15, %rdx
callq 0x63e2
jmp 0x4c02
movq %rbx, %rdi
movq %r13, %rdx
callq 0x63e2
jmp 0x4c02
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4c4d
jmp 0x4c4d
jmp 0x4c4d
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x4c64
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x21b0
movq %r14, %rdi
callq 0x22c0
// File: /workspace/github_cpp_makefile_star2_O1/dgboy2000[P]compress/compress.cpp
// Function: DATCompression::decode_positive(std::vector<int, std::allocator<int>>)
vector<int> DATCompression::decode_positive(vector<int> positive) {
    vector<int> nonpositive;
    nonpositive.reserve(positive.size());
    
    for (vector<int>::iterator viter = positive.begin(); viter != positive.end(); ++viter) {
        int val = *viter;
        if (val % 2 == 1) nonpositive.push_back((val+1) / 2);
        else nonpositive.push_back(-val/2);
    }
    return nonpositive;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0x8(%rdx), %rsi
subq (%rdx), %rsi
sarq $0x2, %rsi
callq 0x60a4
movq (%r14), %r13
cmpq 0x8(%r14), %r13
je 0x4d1e
leaq 0xc(%rsp), %r15
leaq 0x8(%rsp), %r12
movl (%r13), %eax
movl %eax, %ecx
andl $0x80000001, %ecx       # imm = 0x80000001
cmpl $0x1, %ecx
jne 0x4cd7
incl %eax
shrl %eax
movl %eax, 0xc(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x4cfc
movl %eax, (%rsi)
jmp 0x4cf2
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
negl %ecx
movl %ecx, 0x8(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x4d09
movl %ecx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x4d14
movq %rbx, %rdi
movq %r15, %rdx
callq 0x63e2
jmp 0x4d14
movq %rbx, %rdi
movq %r12, %rdx
callq 0x63e2
addq $0x4, %r13
cmpq 0x8(%r14), %r13
jne 0x4cb0
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x4d33
jmp 0x4d33
movq %rax, %r14
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x4d4a
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x21b0
movq %r14, %rdi
callq 0x22c0
// File: /workspace/github_cpp_makefile_star2_O1/dgboy2000[P]compress/compress.cpp
// Function: DATCompression::run_length_encode(int*, int)
int *DATCompression::run_length_encode(int *data, int n) {
    vector<int> encoded;
    int *rle;
    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);
    }
    
    rle = (int *) calloc(encoded.size()+1, sizeof(encoded));
    rle[0] = n;
    copy(encoded.begin(), encoded.end(), rle+1);
    
    return rle;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, %r12d
movq %rsi, %r14
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movslq %edx, %rsi
callq 0x60a4
testl %r12d, %r12d
jle 0x4e5b
movl %r12d, %r13d
xorl %ebp, %ebp
leaq 0x10(%rsp), %r15
movl %r12d, 0x30(%rsp)
movslq %ebp, %rdx
movl (%r14,%rdx,4), %eax
movl %eax, 0xc(%rsp)
leal 0x1(%rdx), %ebp
movl $0x1, %ebx
cmpl %r12d, %ebp
jge 0x4dd7
leaq 0x1(%rdx), %rbp
movl %r12d, %ecx
subl %edx, %ecx
cmpl %eax, (%r14,%rbp,4)
jne 0x4dd7
cmpl $0x102, %ebx            # imm = 0x102
ja 0x4dd7
incl %ebx
incq %rbp
cmpq %rbp, %r13
jne 0x4dba
movl %ecx, %ebx
movl %r13d, %ebp
cmpl $0x4, %ebx
movl $0x4, %r12d
cmovbl %ebx, %r12d
cmpl $0x1, %r12d
adcl $0x0, %r12d
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x4e09
movl 0xc(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x4e16
movq %r15, %rdi
leaq 0xc(%rsp), %rdx
callq 0x62c2
decl %r12d
jne 0x4dec
cmpl $0x3, %ebx
movl 0x30(%rsp), %r12d
jbe 0x4e52
addl $-0x4, %ebx
movl %ebx, 0x34(%rsp)
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x4e45
movl %ebx, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x4e52
movq %r15, %rdi
leaq 0x34(%rsp), %rdx
callq 0x63e2
cmpl %r12d, %ebp
jl 0x4d99
movq 0x10(%rsp), %r14
movl %r12d, %ebx
movq 0x18(%rsp), %r12
movq %r12, %rdi
subq %r14, %rdi
sarq $0x2, %rdi
incq %rdi
movl $0x18, %esi
callq 0x2110
movq %rax, %r15
movl %ebx, (%rax)
subq %r14, %r12
je 0x4e98
leaq 0x4(%r15), %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x2170
testq %r14, %r14
je 0x4ead
movq 0x20(%rsp), %rsi
subq %r14, %rsi
movq %r14, %rdi
callq 0x21b0
movq %r15, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4ec3
jmp 0x4ec3
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x4edd
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21b0
movq %rbx, %rdi
callq 0x22c0
nop
// File: /workspace/github_cpp_makefile_star2_O1/dgboy2000[P]compress/compress.cpp
// Function: DATCompression::run_length_decode(int*)
int *DATCompression::run_length_decode(int *encoded) {
    int n = encoded[0];
    int *decoded = (int *) calloc(n, sizeof(int));

    int cur_ind = 1;
    int total_count = 0;
    while (total_count < n) {
        int run_int = encoded[cur_ind++];
        int run_count = 1;
        while (encoded[cur_ind] == run_int && run_count < RUN_MIN) {
            ++cur_ind;
            ++run_count;
        }
        if (run_count == RUN_MIN) run_count += encoded[cur_ind++];
        for (int i=0; i<run_count; ++i) decoded[total_count++] = run_int;
    }
    
    return decoded;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movslq (%rsi), %r14
movl $0x4, %esi
movq %r14, %rdi
callq 0x2110
testq %r14, %r14
jle 0x4f6f
leaq 0x4(%rbx), %rcx
xorl %edx, %edx
movl $0x1, %edi
movslq %edi, %r8
movl (%rbx,%r8,4), %esi
leaq (%rcx,%r8,4), %r11
xorl %r10d, %r10d
xorl %edi, %edi
movl (%r11,%r10,4), %r9d
incq %r10
decq %rdi
cmpl %esi, %r9d
jne 0x4f32
cmpl $0x4, %r10d
jb 0x4f1d
subq %rdi, %r8
leaq 0x1(%r8), %rdi
addl $0x4, %r9d
cmpl $0x4, %r10d
cmovneq %r8, %rdi
cmovnel %r10d, %r9d
testl %r9d, %r9d
jle 0x4f6a
movslq %edx, %r8
leaq (%rax,%r8,4), %r8
movl %r9d, %r9d
xorl %r10d, %r10d
movl %esi, (%r8,%r10,4)
incq %r10
cmpl %r10d, %r9d
jne 0x4f5b
addl %r10d, %edx
cmpl %r14d, %edx
jl 0x4f0d
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/dgboy2000[P]compress/compress.cpp
// Function: DATCompression::burrows_wheeler_encode(int*, int)
int *DATCompression::burrows_wheeler_encode(int *data, int n) {
    SuffixArray sa(data, n);
    
    int *bwt = (int *) calloc(n+4, sizeof(int));
    long int dollar_ind;
    bwt[0] = data[n-1];
    
    for (int i=0; i<n; ++i) {
        if (sa[i] == 0) {
            bwt[i+1] = INT_MIN;
            dollar_ind = i + 1;
        }
        else bwt[i+1] = data[sa[i] - 1];
    }
    
    bwt[n+1] = dollar_ind / (256*256);
    bwt[n+2] = (dollar_ind / 256) % 256;
    bwt[n+3] = dollar_ind % 256;
    
    return bwt;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %r15d
movq %rsi, %r14
movq %rsp, %rbx
movl %edx, (%rbx)
leal 0x3(%r15), %eax
movslq %eax, %rdi
movl $0x4, %esi
callq 0x2110
movq %rax, 0x10(%rbx)
movslq %r15d, %r12
leaq (,%r12,4), %rdx
movq %rax, %rdi
movq %r14, %rsi
callq 0x2170
movq %rbx, %rdi
callq 0x544a
leal 0x4(%r12), %eax
movslq %eax, %rdi
movl $0x4, %esi
callq 0x2110
movq %rax, %rbx
movl -0x4(%r14,%r12,4), %eax
movl %eax, (%rbx)
testl %r12d, %r12d
jle 0x5022
movq 0x8(%rsp), %rcx
movl %r15d, %edx
negq %rdx
movl $0x1, %esi
movslq -0x4(%rcx,%rsi,4), %rdi
testq %rdi, %rdi
je 0x5006
movl -0x4(%r14,%rdi,4), %edi
movl %edi, (%rbx,%rsi,4)
jmp 0x5010
movl $0x80000000, (%rbx,%rsi,4) # imm = 0x80000000
movq %rsi, %rax
leaq (%rdx,%rsi), %rdi
incq %rdi
incq %rsi
cmpq $0x1, %rdi
jne 0x4ff2
jmp 0x5022
leaq 0xffff(%rax), %rcx
leaq 0xff(%rax), %rdx
testq %rax, %rax
cmovnsq %rax, %rcx
cmovnsq %rax, %rdx
shrq $0x10, %rcx
movl %ecx, 0x4(%rbx,%r12,4)
sarq $0x8, %rdx
leal 0xff(%rdx), %ecx
testq %rdx, %rdx
cmovnsl %edx, %ecx
andl $0xffffff00, %ecx       # imm = 0xFFFFFF00
movl %edx, %esi
subl %ecx, %esi
movl %esi, 0x8(%rbx,%r12,4)
shll $0x8, %edx
subl %edx, %eax
movl %eax, 0xc(%rbx,%r12,4)
movq 0x8(%rsp), %rdi
callq 0x21f0
movq 0x10(%rsp), %rdi
callq 0x21f0
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/dgboy2000[P]compress/compress.cpp
// Function: DATCompression::burrows_wheeler_decode(int*, int)
int *DATCompression::burrows_wheeler_decode(int *data, int n) {
    long int dollar_pos = 256*256*data[n+1] + 256*data[n+2] + data[n+3];
    int bwt_size = n + 1;
    
    pair<int,int> *f = (pair<int,int> *) calloc(bwt_size, sizeof(pair<int,int>));
    int *t = (int *) calloc(bwt_size, sizeof(int));
    int *s = (int *) calloc(n, sizeof(int));
    
    for (int i=0; i<bwt_size; ++i) f[i] = pair<int,int>(data[i], i);
    stable_sort(f, f + bwt_size, pair_comparator);
    
    for (int i=0; i<bwt_size; ++i) t[f[i].second] = i;
    free(f);
    
    int last_t = dollar_pos;
    for (int i=1; i<=n; ++i) {
        last_t = t[last_t];
        s[n-i] = data[last_t];
    }
    free(t);
    
    return s;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, %ebx
movq %rsi, %r14
movslq %edx, %r12
leaq 0x1(%r12), %r15
movl 0x4(%rsi,%r12,4), %eax
movl 0x8(%rsi,%r12,4), %ebp
shll $0x10, %eax
shll $0x8, %ebp
addl %eax, %ebp
addl 0xc(%rsi,%r12,4), %ebp
movl $0x8, %esi
movq %r15, %rdi
callq 0x2110
movq %rax, %r13
movl $0x4, %esi
movq %r15, 0x18(%rsp)
movq %r15, %rdi
callq 0x2110
movq %rax, %r15
movl $0x4, %esi
movq %r12, %rdi
callq 0x2110
movq %rax, 0x10(%rsp)
testl %r12d, %r12d
js 0x5125
leal 0x1(%rbx), %eax
xorl %ecx, %ecx
movl (%r14,%rcx,4), %edx
movl %edx, (%r13,%rcx,8)
movl %ecx, 0x4(%r13,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0x510f
movq 0x18(%rsp), %rcx
testl %ecx, %ecx
je 0x51ac
leaq (,%rcx,8), %rax
addq %r13, %rax
movq %rax, 0x8(%rsp)
leaq 0x1(%rcx), %rax
shrq $0x3f, %rax
leaq (%rcx,%rax), %rdx
incq %rdx
sarq %rdx
leaq 0x20(%rsp), %r12
movq %r12, %rdi
movq %r13, %rsi
callq 0x6606
movq 0x10(%r12), %rdx
testq %rdx, %rdx
je 0x5185
movq 0x28(%rsp), %rcx
leaq -0xe0(%rip), %r8        # 0x5096
movq %r13, %rdi
movq 0x8(%rsp), %rsi
callq 0x66f9
jmp 0x5199
leaq -0xf6(%rip), %rdx       # 0x5096
movq %r13, %rdi
movq 0x8(%rsp), %rsi
callq 0x6676
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdi
shlq $0x3, %rsi
callq 0x21b0
testl %ebx, %ebx
js 0x51c6
leal 0x1(%rbx), %eax
xorl %ecx, %ecx
movslq 0x4(%r13,%rcx,8), %rdx
movl %ecx, (%r15,%rdx,4)
incq %rcx
cmpq %rcx, %rax
jne 0x51b5
movq %r13, %rdi
callq 0x21f0
testl %ebx, %ebx
movq 0x10(%rsp), %r12
jle 0x51ff
movl %ebx, %eax
incl %ebx
leaq (%r12,%rax,4), %rax
negq %rbx
movq $-0x1, %rcx
movslq %ebp, %rdx
movslq (%r15,%rdx,4), %rbp
movl (%r14,%rbp,4), %edx
movl %edx, (%rax,%rcx,4)
decq %rcx
cmpq %rcx, %rbx
jne 0x51e9
movq %r15, %rdi
callq 0x21f0
movq %r12, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdi
shlq $0x3, %rsi
callq 0x21b0
movq %rbx, %rdi
callq 0x22c0
nop
// File: /workspace/github_cpp_makefile_star2_O1/dgboy2000[P]compress/compress.cpp
// Function: DATCompression::compute_diff_statistics(std::vector<int, std::allocator<int>>)
vector<int> DATCompression::compute_diff_statistics(vector<int> data) {
    vector<int> diffs = compute_diffs(data);
    map<int, int> diff_counts;

    for (vector<int>::iterator viter = diffs.begin(); viter < diffs.end(); ++viter) {
        int val = *viter;
        if (diff_counts.count(val) == 0) diff_counts[val] = 0;
        ++diff_counts[val];
    }
    
    cout << "Counts of each difference in the data:" << endl;
    for (map<int, int>::iterator miter = diff_counts.begin(); miter != diff_counts.end(); ++miter) {
        printf("%d: %d\n", (*miter).first, (*miter).second);
    }
    
    return diffs;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %rdx, %rsi
callq 0x6024
movq %rbx, %rdi
movq %r15, %rdx
callq 0x49f6
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x527a
movq 0x18(%rsp), %rsi
subq %rdi, %rsi
callq 0x21b0
leaq 0x28(%rsp), %r12
movl $0x0, (%r12)
xorl %eax, %eax
movq %rax, 0x8(%r12)
movq %r12, 0x10(%r12)
movq %r12, 0x18(%r12)
movq %rax, 0x20(%r12)
movq (%rbx), %r13
cmpq 0x8(%rbx), %r13
jae 0x531e
leaq 0x20(%rsp), %r14
leaq 0x4(%rsp), %r15
movl (%r13), %eax
movl %eax, 0x4(%rsp)
movq 0x30(%rsp), %rdx
movq %r12, %rcx
testq %rdx, %rdx
je 0x52df
movq %r12, %rcx
xorl %esi, %esi
cmpl %eax, 0x20(%rdx)
setl %sil
cmovgeq %rdx, %rcx
movq 0x10(%rdx,%rsi,8), %rdx
testq %rdx, %rdx
jne 0x52c8
movq %r12, %rdx
cmpq %r12, %rcx
je 0x52f1
cmpl 0x20(%rcx), %eax
cmovlq %r12, %rcx
movq %rcx, %rdx
cmpq %r12, %rdx
jne 0x5307
movq %r14, %rdi
movq %r15, %rsi
callq 0x616c
movl $0x0, (%rax)
movq %r14, %rdi
movq %r15, %rsi
callq 0x616c
incl (%rax)
addq $0x4, %r13
cmpq 0x8(%rbx), %r13
jb 0x52b0
movq 0x5cb3(%rip), %r14      # 0xafd8
leaq 0x2d7a(%rip), %rsi      # 0x80a6
movl $0x26, %edx
movq %r14, %rdi
callq 0x21e0
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x2190
movsbl %al, %esi
movq 0x5c81(%rip), %rdi      # 0xafd8
callq 0x2040
movq %rax, %rdi
callq 0x2120
movq 0x38(%rsp), %r14
cmpq %r12, %r14
je 0x5397
leaq 0x2d58(%rip), %r15      # 0x80cd
movl 0x20(%r14), %esi
movl 0x24(%r14), %edx
movq %r15, %rdi
xorl %eax, %eax
callq 0x2050
movq %r14, %rdi
callq 0x2130
movq %rax, %r14
cmpq %r12, %rax
jne 0x5375
leaq 0x20(%rsp), %rdi
callq 0x6256
movq %rbx, %rax
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movq 0x8(%rsp), %rdi
movq %r15, %rbx
jmp 0x53d1
jmp 0x53c1
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x6256
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x53e2
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x21b0
movq %r14, %rdi
callq 0x22c0
// File: /workspace/github_cpp_makefile_star2_O1/dgboy2000[P]compress/compress.cpp
// Function: SuffixArray::SuffixArray(std::vector<int, std::allocator<int>>*)
SuffixArray::SuffixArray(vector<int> *data) {
    n = data->size();    
    s = (int *) calloc(n + 3, sizeof(int));

    copy(data->begin(), data->end(), s);
    
    prepareSuffixArray();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq 0x8(%rsi), %rax
subq (%rsi), %rax
movq %rdi, %rbx
movq %rax, %rcx
shrq $0x2, %rcx
movl %ecx, (%rdi)
shlq $0x1e, %rax
movabsq $0x300000000, %rdi      # imm = 0x300000000
addq %rax, %rdi
sarq $0x20, %rdi
movl $0x4, %esi
callq 0x2110
movq %rax, 0x10(%rbx)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
subq %rsi, %rdx
je 0x543b
movq %rax, %rdi
callq 0x2280
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x544a
// File: /workspace/github_cpp_makefile_star2_O1/dgboy2000[P]compress/compress.cpp
// Function: SuffixArray::prepareSuffixArray()
void SuffixArray::prepareSuffixArray() {
    // Add 3 trailing zeroes for skew algorithm
    int i;
    int *cur_data_elt = s + n;
    *cur_data_elt = 0; ++cur_data_elt;
    *cur_data_elt = 0; ++cur_data_elt;
    *cur_data_elt = 0; ++cur_data_elt;
    
    sa = (int *) calloc(n, sizeof(int));
    
    // Suffix array computation requires values in [1,256] instead of [0,255]
    for (i=0; i<n; ++i) ++s[i];
    doSuffixArrayComputation(s, sa, n, 256);
    for (i=0; i<n; ++i) --s[i];
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %r14
movslq (%rdi), %rax
movq $0x0, (%r14,%rax,4)
movl $0x0, 0x8(%r14,%rax,4)
movslq (%rdi), %r15
movl $0x4, %esi
movq %r15, %rdi
callq 0x2110
movq %rax, 0x8(%rbx)
testq %r15, %r15
jle 0x5494
xorl %ecx, %ecx
incl (%r14,%rcx,4)
incq %rcx
movslq (%rbx), %r15
cmpq %r15, %rcx
jl 0x5485
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
movl %r15d, %ecx
movl $0x100, %r8d            # imm = 0x100
callq 0x550c
cmpl $0x0, (%rbx)
jle 0x54c4
movq 0x10(%rbx), %rax
xorl %ecx, %ecx
decl (%rax,%rcx,4)
incq %rcx
movslq (%rbx), %rdx
cmpq %rdx, %rcx
jl 0x54b6
popq %rbx
popq %r14
popq %r15
retq