LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/jorbs[P]stellar-keypair-tool/keypair.cpp
// Function: encode[abi:cxx11](VersionByte const&, std::vector<unsigned char, std::allocator<unsigned char>>&)
std::string encode(const VersionByte &versionByte, std::vector<uint8_t> &data) {
  std::vector<uint8_t> bytes;

  bytes.push_back(versionByte);
  bytes.insert(bytes.end(), data.begin(), data.end());

  uint16_t crc = crc16((char *) bytes.data(), bytes.size());

  bytes.emplace_back(static_cast<uint8_t>(crc & 0xFF));
  bytes.emplace_back(static_cast<uint8_t>((crc >> 8) & 0xFF));

  return bn::encode_b32(bytes);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdx, %r14
movq %rdi, %r15
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdi
andq $0x0, 0x10(%rdi)
movaps %xmm0, (%rdi)
movb (%rsi), %al
leaq 0xf(%rsp), %rsi
movb %al, (%rsi)
callq 0x2b18
leaq 0x10(%rsp), %rdi
movq 0x8(%rdi), %rsi
movq (%r14), %rdx
movq 0x8(%r14), %rcx
callq 0x2af8
movq 0x10(%rsp), %rdi
movl 0x18(%rsp), %esi
subl %edi, %esi
callq 0x3534
movl %eax, %ebx
leaq 0xf(%rsp), %rsi
movb %bl, (%rsi)
leaq 0x10(%rsp), %rdi
callq 0x2b18
movb %bh, 0xf(%rsp)
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rsi
callq 0x2b18
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x2b4b
leaq 0x10(%rsp), %rdi
callq 0x2e9e
movq %r15, %rax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x257a
jmp 0x257a
jmp 0x257a
jmp 0x257a
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2e9e
movq %rbx, %rdi
callq 0x2280
// File: /workspace/github_cpp_makefile_star2_O2/jorbs[P]stellar-keypair-tool/keypair.cpp
// Function: process(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool (*)(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&))
void process(const std::string &term, bool (*matches)(const std::string &input, const std::string &suffix)) {
  std::vector<uint8_t> pk(crypto_sign_PUBLICKEYBYTES);
  std::vector<uint8_t> sk(crypto_sign_SECRETKEYBYTES);

  for (;!found; count++) {
    crypto_sign_keypair(pk.data(), sk.data());

    std::string encodedPk = encode(PUBLIC_KEY, pk);

    if (matches(encodedPk, term)) {
      std::vector<uint8_t> seed(crypto_sign_SEEDBYTES);

      crypto_sign_ed25519_sk_to_seed(seed.data(), sk.data());

      if (!found) {
        found = true;
        std::cout << "FOUND!\n\n"
                  << encodedPk << std::endl
                  << encode(SEED, seed) << "\n\n\a";
      }

      break;
    }
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x90, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x58(%rsp), %rdi
pushq $0x20
popq %rsi
leaq 0x70(%rsp), %rdx
callq 0x2bb2
leaq 0x40(%rsp), %rdi
pushq $0x40
popq %rsi
leaq 0x70(%rsp), %rdx
callq 0x2bb2
leaq 0x70(%rsp), %r15
leaq 0x8(%rsp), %r12
leaq 0x58(%rsp), %r13
movb 0x4bb0(%rip), %al       # 0x71c0
testb $0x1, %al
jne 0x2706
movq 0x58(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x2130
movb $0x30, 0x8(%rsp)
movq %r15, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x24d6
movq %r15, %rdi
movq %r14, %rsi
callq *%rbx
testb %al, %al
jne 0x2657
movq %r15, %rdi
callq 0x22f8
lock
incl 0x4b6f(%rip)            # 0x71c4
jmp 0x260a
leaq 0x28(%rsp), %rdi
pushq $0x20
popq %rsi
leaq 0x8(%rsp), %rdx
callq 0x2bb2
movq 0x28(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x2200
movb 0x4b42(%rip), %al       # 0x71c0
testb $0x1, %al
jne 0x26f2
movb $0x1, %al
xchgb %al, 0x4b36(%rip)       # 0x71c0
movq 0x493f(%rip), %rdi      # 0x6fd0
leaq 0x1a2e(%rip), %rsi      # 0x40c6
callq 0x2180
leaq 0x70(%rsp), %rsi
movq %rax, %rdi
callq 0x2160
movq %rax, %rdi
callq 0x20b0
movq %rax, %rbx
leaq 0x7(%rsp), %rsi
movb $-0x70, (%rsi)
leaq 0x8(%rsp), %rdi
leaq 0x28(%rsp), %rdx
callq 0x24d6
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x2160
leaq 0x19ef(%rip), %rsi      # 0x40cf
movq %rax, %rdi
callq 0x2180
leaq 0x8(%rsp), %rdi
callq 0x22f8
leaq 0x28(%rsp), %rdi
callq 0x2e9e
leaq 0x70(%rsp), %rdi
callq 0x22f8
leaq 0x40(%rsp), %rdi
callq 0x2e9e
leaq 0x58(%rsp), %rdi
callq 0x2e9e
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x2743
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x22f8
jmp 0x2746
jmp 0x2754
movq %rax, %rbx
jmp 0x2770
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x2e9e
jmp 0x2757
jmp 0x2763
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x22f8
jmp 0x2766
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x2e9e
leaq 0x58(%rsp), %rdi
callq 0x2e9e
movq %rbx, %rdi
callq 0x2280
// File: /workspace/github_cpp_makefile_star2_O2/jorbs[P]stellar-keypair-tool/./lib/basen.h
// Function: std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> bn::encode_b32<std::vector<unsigned char, std::allocator<unsigned char>>>(std::vector<unsigned char, std::allocator<unsigned char>> const&)
inline
std::string encode_b32(T const& v)
{
    std::string res;
    res.reserve(encoded_size64(v.size()*sizeof(typename T::value_type)) + 1);
    encode_b32(v.begin(), v.end(), std::back_inserter(res));
    return res;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
movq 0x8(%rsi), %rax
subq (%rsi), %rax
addq $0x2, %rax
pushq $0x3
popq %rcx
xorl %edx, %edx
divq %rcx
leaq 0x1(,%rax,4), %rsi
callq 0x2230
movq (%r14), %rdi
movq 0x8(%r14), %rsi
movq %rbx, %rdx
callq 0x317c
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x22f8
movq %r14, %rdi
callq 0x2280
// File: /workspace/github_cpp_makefile_star2_O2/jorbs[P]stellar-keypair-tool/./lib/basen.h
// Function: bn::impl::extract_partial_bits(char, unsigned int, unsigned int)
inline char extract_partial_bits(char value, unsigned int start_bit, unsigned int bits_count)
{
    assert(start_bit + bits_count < 8);
    char t1 = value >> (8 - bits_count - start_bit);
    char t2 = t1 & ~(-1 << bits_count);
    return t2;
}

// Assembly:
addl %edx, %esi
cmpl $0x8, %esi
jae 0x327d
movsbl %dil, %edi
movb $0x8, %cl
subb %sil, %cl
sarl %cl, %edi
pushq $-0x1
popq %rax
movl %edx, %ecx
shll %cl, %eax
notl %eax
andl %edi, %eax
retq
pushq %rax
leaq 0xf5a(%rip), %rdi       # 0x41df
leaq 0xf6e(%rip), %rsi       # 0x41fa
leaq 0xf75(%rip), %rcx       # 0x4208
movl $0xff, %edx
callq 0x20f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/jorbs[P]stellar-keypair-tool/./lib/basen.h
// Function: bn::impl::extract_overlapping_bits(char, char, unsigned int, unsigned int)
inline char extract_overlapping_bits(char previous, char next, unsigned int start_bit, unsigned int bits_count)
{
    assert(start_bit + bits_count < 16);
    int bits_count_in_previous = 8 - start_bit;
    int bits_count_in_next = bits_count - bits_count_in_previous;
    char t1 = (previous << bits_count_in_next) & 0xFF;
    char t2 = next >> (8 - bits_count_in_next) & ~(-1 << bits_count_in_next);
    return (t1 | t2) & ~(-1 << bits_count);
}

// Assembly:
addl %ecx, %edx
cmpl $0x10, %edx
jae 0x3308
movl %ecx, %r8d
movzbl %dil, %r9d
leal -0x8(%rdx), %edi
movl %edi, %ecx
shll %cl, %r9d
movsbl %sil, %esi
movb $0x10, %cl
subb %dl, %cl
sarl %cl, %esi
pushq $-0x1
popq %rax
movl %eax, %edx
movl %edi, %ecx
shll %cl, %edx
notl %edx
andl %esi, %edx
movl %r8d, %ecx
shll %cl, %eax
orl %r9d, %edx
notl %eax
andl %edx, %eax
retq
pushq %rax
leaq 0xf8b(%rip), %rdi       # 0x429b
leaq 0xee3(%rip), %rsi       # 0x41fa
leaq 0xf99(%rip), %rcx       # 0x42b7
movl $0x107, %edx            # imm = 0x107
callq 0x20f0
// File: /workspace/github_cpp_makefile_star2_O2/jorbs[P]stellar-keypair-tool/lib/crc16.cpp
// Function: crc16(char const*, int)
uint16_t crc16(const char *buf, int len) {
    int counter;
    uint16_t crc = 0;
    for (counter = 0; counter < len; counter++)
            crc = ((crc<<8) & uint16_t(0xFFFF)) ^
        crc16tab[((crc>>8) ^ *buf++) & uint16_t(0x00FF)];
    return crc;
}

// Assembly:
xorl %ecx, %ecx
testl %esi, %esi
cmovlel %ecx, %esi
leaq 0xeae(%rip), %rdx       # 0x43f0
xorl %eax, %eax
cmpl %ecx, %esi
je 0x3565
movzwl %ax, %r8d
shll $0x8, %eax
shrl $0x8, %r8d
movzbl (%rdi,%rcx), %r9d
xorl %r8d, %r9d
xorw (%rdx,%r9,2), %ax
incq %rcx
jmp 0x3544
retq
// File: /workspace/github_cpp_makefile_star2_O2/searsm8[P]FM_Partitioning/fmpart.cpp
// Function: initialPartition()
void initialPartition()
{
	srand(time(0)); //use current time for random seed				
	int index;
	
	//randomly move cells into other partition until approximately half area in each
	while((float)partition_area[1] / (float)(partition_area[0] + partition_area[1]) < .5 )
	{
		//select a random cell to move to partition 1
		index = rand() % cells.size();
		if(cells[index]->partition == 0)
		{	
			cells[index]->partition = 1;
			cells[index]->best_partition = 1;
			partition_area[0] -= cells[index]->area;
			partition_area[1] += cells[index]->area;		
		}
	}
	
	printf("\nInitial Partition:\n");		
	printPartitionAreas();		
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
xorl %edi, %edi
callq 0x2140
movl %eax, %edi
callq 0x2160
movabsq $0x100000001, %rbx      # imm = 0x100000001
movl 0x559c(%rip), %eax      # 0x8260
cvtsi2ss %eax, %xmm0
addl 0x558e(%rip), %eax      # 0x825c
cvtsi2ss %eax, %xmm1
divss %xmm1, %xmm0
movss 0x2342(%rip), %xmm1     # 0x5020
ucomiss %xmm0, %xmm1
jbe 0x2d2c
callq 0x2060
cltq
movq 0x5527(%rip), %rcx      # 0x8218
movq 0x5518(%rip), %rsi      # 0x8210
subq %rsi, %rcx
sarq $0x3, %rcx
xorl %edx, %edx
divq %rcx
movslq %edx, %rax
movq (%rsi,%rax,8), %rax
cmpl $0x0, 0x84(%rax)
jne 0x2cbe
movq %rbx, 0x84(%rax)
movl 0x78(%rax), %eax
subl %eax, 0x5538(%rip)      # 0x825c
addl %eax, 0x5536(%rip)      # 0x8260
jmp 0x2cbe
leaq 0x26b4(%rip), %rdi      # 0x53e7
callq 0x2210
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2d43
// File: /workspace/github_cpp_makefile_star2_O2/searsm8[P]FM_Partitioning/fmpart.cpp
// Function: findCutsize()
void findCutsize()
{
	cut_size = 0;	
	
	//loop through each net. If there is at least one cell in each partition, add 1 to cutsize	
	for(int i = 0; i < nets.size(); i++)
	{		
		nets[i]->partition_count[0] = 0;
		nets[i]->partition_count[1] = 0;
		
		for(int j = 0; j < nets[i]->cell_list.size(); j++)
		{
			//count how many cells in each partition on this net
			nets[i]->partition_count[nets[i]->cell_list[j]->partition]++;			
		}
		
		if(nets[i]->partition_count[0] > 0 && nets[i]->partition_count[1] > 0)
			cut_size++;
	}				
	printf("Cutsize: %d\n", cut_size);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
andl $0x0, 0x549a(%rip)      # 0x8258
movq 0x54ab(%rip), %rax      # 0x8270
movq 0x549c(%rip), %rcx      # 0x8268
subq %rcx, %rax
sarq $0x3, %rax
xorl %edx, %edx
cmpq %rdx, %rax
jbe 0x2e29
movq (%rcx,%rdx,8), %rsi
andq $0x0, 0x6c(%rsi)
movq 0x78(%rsi), %rdi
movq 0x80(%rsi), %r8
subq %rdi, %r8
sarq $0x3, %r8
xorl %r9d, %r9d
cmpq %r9, %r8
jbe 0x2e12
movq (%rdi,%r9,8), %r10
movslq 0x84(%r10), %r10
incl 0x6c(%rsi,%r10,4)
incq %r9
jmp 0x2df8
cmpl $0x0, 0x6c(%rsi)
jle 0x2e24
cmpl $0x0, 0x70(%rsi)
jle 0x2e24
incl 0x5434(%rip)            # 0x8258
incq %rdx
jmp 0x2dd5
movl 0x5429(%rip), %esi      # 0x8258
leaq 0x2304(%rip), %rdi      # 0x513a
xorl %eax, %eax
popq %rbp
jmp 0x2040
// File: /workspace/github_cpp_makefile_star2_O2/searsm8[P]FM_Partitioning/fmpart.cpp
// Function: printCutsize()
int printCutsize()  //finds and returns the cutsize from scratch
{
	int my_cut_size = 0;
	int my_partition_count[2];	
	
	//loop through each net. If there is at least one cell in each partition, add 1 to cutsize	
	for(int i = 0; i < nets.size(); i++)
	{		
		my_partition_count[0] = 0;
		my_partition_count[1] = 0;
		
		for(int j = 0; j < nets[i]->cell_list.size(); j++)
		{
			//count how many cells in each partition on this net
			my_partition_count[nets[i]->cell_list[j]->partition]++;			
		}

		if(my_partition_count[0] && my_partition_count[1])
			my_cut_size++;
	}		
		
	return my_cut_size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x5427(%rip), %rcx      # 0x8270
movq 0x5418(%rip), %rdx      # 0x8268
subq %rdx, %rcx
sarq $0x3, %rcx
xorl %esi, %esi
xorl %eax, %eax
cmpq %rcx, %rsi
je 0x2eb6
andq $0x0, -0x8(%rbp)
movq (%rdx,%rsi,8), %r8
movq 0x78(%r8), %rdi
movq 0x80(%r8), %r8
subq %rdi, %r8
sarq $0x3, %r8
xorl %r9d, %r9d
cmpq %r9, %r8
je 0x2e98
movq (%rdi,%r9,8), %r10
movslq 0x84(%r10), %r10
incl -0x8(%rbp,%r10,4)
incq %r9
jmp 0x2e7e
cmpl $0x0, -0x8(%rbp)
setne %dil
cmpl $0x0, -0x4(%rbp)
setne %r8b
andb %dil, %r8b
movzbl %r8b, %edi
addl %edi, %eax
incq %rsi
jmp 0x2e5b
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/searsm8[P]FM_Partitioning/fmpart.cpp
// Function: computeGains()
void computeGains()
{
	gain_bucket[0].clear();
	gain_bucket[1].clear();
	
	//look through all cells, compute gain for each cell 
	for(int i = 0; i < cells.size(); i++)
	{	
		cells[i]->gain = 0;
		
			
		//for each net the cell is in, check if there is any gain for that net
		for (int j = 0; j < cells[i]->net_list.size(); j++)
		{	
			NET* current_net = cells[i]->net_list[j];				
						
			//if there is exactly one cell in the "From" partition, increase gain
			if(current_net->partition_count[cells[i]->partition] == 1)
			{	
				cells[i]->gain++;
				current_net->critical = true;
			}
			
			//if there is exactly zero cells in the "To" partition, decrease gain
			if(current_net->partition_count[!cells[i]->partition] == 0)
			{	
				cells[i]->gain--;
				current_net->critical = true;
			}			
		}
		
		//add this cell to a gain bucket, and initialize gain_itr				
		cells[i]->gain_itr = gain_bucket[cells[i]->partition].insert(pair <int, CELL*> (cells[i]->gain,  cells[i]));	
	} 			
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
leaq 0x52e4(%rip), %rbx      # 0x81b0
movq %rbx, %rdi
callq 0x4a92
leaq 0x5305(%rip), %rdi      # 0x81e0
callq 0x4a92
xorl %r15d, %r15d
movq 0x5326(%rip), %rcx      # 0x8210
leaq -0x28(%rbp), %r14
movq 0x5323(%rip), %rax      # 0x8218
subq %rcx, %rax
sarq $0x3, %rax
cmpq %r15, %rax
jbe 0x2fb5
movq (%rcx,%r15,8), %rax
andl $0x0, 0x80(%rax)
movq 0x98(%rax), %rcx
movq 0xa0(%rax), %rdx
subq %rcx, %rdx
sarq $0x3, %rdx
xorl %esi, %esi
xorl %edi, %edi
cmpq %rdi, %rdx
jbe 0x2f7e
movq (%rcx,%rdi,8), %r8
movslq 0x84(%rax), %r9
cmpl $0x1, 0x6c(%r8,%r9,4)
jne 0x2f54
movl 0x80(%rax), %esi
incl %esi
movl %esi, 0x80(%rax)
movb $0x1, 0x69(%r8)
xorl %r10d, %r10d
testl %r9d, %r9d
sete %r10b
cmpl $0x0, 0x6c(%r8,%r10,4)
jne 0x2f79
movl 0x80(%rax), %esi
decl %esi
movl %esi, 0x80(%rax)
movb $0x1, 0x69(%r8)
incq %rdi
jmp 0x2f29
movslq 0x84(%rax), %rcx
imulq $0x30, %rcx, %rdi
addq %rbx, %rdi
movl %esi, -0x28(%rbp)
movq %rax, -0x20(%rbp)
movq %r14, %rsi
callq 0x3dc4
movq 0x526e(%rip), %rcx      # 0x8210
movq (%rcx,%r15,8), %rdx
movq %rax, 0x90(%rdx)
incq %r15
jmp 0x2eee
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/searsm8[P]FM_Partitioning/fmpart.cpp
// Function: saveBestSolution()
void saveBestSolution()
{	
	//keep track of the best solution found
	min_cut_size = cut_size;
			
	for(int i = 0; i < cells.size(); i++)
		cells[i]->best_partition = cells[i]->partition;
				
	//printf("SAVED new best solution: (cutsize = %d)\n", cut_size);	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x528e(%rip), %eax      # 0x8258
movl %eax, 0x52b0(%rip)      # 0x8280
movq 0x5241(%rip), %rax      # 0x8218
movq 0x5232(%rip), %rcx      # 0x8210
subq %rcx, %rax
sarq $0x3, %rax
xorl %edx, %edx
cmpq %rdx, %rax
jbe 0x3001
movq (%rcx,%rdx,8), %rsi
movl 0x84(%rsi), %edi
movl %edi, 0x88(%rsi)
incq %rdx
jmp 0x2fe7
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/searsm8[P]FM_Partitioning/fmpart.cpp
// Function: recallBestSolution()
void recallBestSolution()
{
	cut_size = min_cut_size;
	
	//reset the cells partitions to the best solution
	//unlock all cells
	for(int i = 0; i < cells.size(); i++)
	{
		cells[i]->partition = cells[i]->best_partition;
		cells[i]->locked = false;		
	}				

	//reset the partition counts for the best solution
	for(int i = 0; i < nets.size(); i++)
	{	
		//reset nets	
		nets[i]->partition_count[0] = 0;
		nets[i]->partition_count[1] = 0;
		
		nets[i]->has_locked[0] = 0; 
		nets[i]->has_locked[1] = 0;
		
		for(int j = 0; j < nets[i]->cell_list.size(); j++)
		{
			//count how many cells in each partition on this net
			nets[i]->partition_count[nets[i]->cell_list[j]->partition]++;			
		}		
	}
	
	//recalculate the gains for the best solution
	computeGains(); 
	
	//set the partition areas to the best solution
	partition_area[0] = 0;
	partition_area[1] = 0;
	
	for(int i = 0; i < cells.size(); i++)
	{		
		partition_area[cells[i]->partition] += cells[i]->area;
	}	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x5273(%rip), %eax      # 0x8280
movl %eax, 0x5245(%rip)      # 0x8258
movq 0x51fe(%rip), %rax      # 0x8218
movq 0x51ef(%rip), %rcx      # 0x8210
subq %rcx, %rax
sarq $0x3, %rax
xorl %edx, %edx
cmpq %rdx, %rax
jbe 0x3048
movq (%rcx,%rdx,8), %rsi
movl 0x88(%rsi), %edi
movl %edi, 0x84(%rsi)
movb $0x0, 0x7d(%rsi)
incq %rdx
jmp 0x302a
movq 0x5221(%rip), %rax      # 0x8270
movq 0x5212(%rip), %rcx      # 0x8268
subq %rcx, %rax
sarq $0x3, %rax
xorl %edx, %edx
cmpq %rax, %rdx
je 0x30a6
movq (%rcx,%rdx,8), %rsi
andw $0x0, 0x72(%rsi)
andq $0x0, 0x6a(%rsi)
movq 0x78(%rsi), %rdi
movq 0x80(%rsi), %r8
subq %rdi, %r8
sarq $0x3, %r8
xorl %r9d, %r9d
cmpq %r9, %r8
je 0x30a1
movq (%rdi,%r9,8), %r10
movslq 0x84(%r10), %r10
incl 0x6c(%rsi,%r10,4)
incq %r9
jmp 0x3087
incq %rdx
jmp 0x305f
callq 0x2eb8
andq $0x0, 0x51a9(%rip)      # 0x825c
movq 0x515e(%rip), %rax      # 0x8218
movq 0x514f(%rip), %rcx      # 0x8210
subq %rcx, %rax
sarq $0x3, %rax
xorl %edx, %edx
leaq 0x518b(%rip), %rsi      # 0x825c
cmpq %rdx, %rax
jbe 0x30ee
movq (%rcx,%rdx,8), %rdi
movl 0x78(%rdi), %r8d
movslq 0x84(%rdi), %rdi
addl %r8d, (%rsi,%rdi,4)
incq %rdx
jmp 0x30d1
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/searsm8[P]FM_Partitioning/fmpart.cpp
// Function: FMPartitionPass()
bool FMPartitionPass()
{
	printf("\n****BEGIN PARTITION PASS #%d****\n", pass_count);
	
	int starting_cut_size = cut_size;
	int swap_count = 0;
	positive_gains_exhausted = false; //true after the initial gain bucket has been exhausted of positive gains
					//used to prevent updating the best_partition too often	
	int saves_performed = 0;
	
	//perform moves until no legal moves remain
	while(performNextMove())
	{		
		swap_count++;
		
		//if a solution with better cut_size was found AND all positive gains have been exhausted
		if(positive_gains_exhausted && cut_size <= min_cut_size-20)
		{
			saveBestSolution();
			saves_performed++;
		}				
	} 	
		    	
	//revert back to the best solution that was found this pass
	recallBestSolution();
		
	printf("****PASS %d COMPLETE: ", pass_count);
	findCutsize();
	printTimestamp();
	
	if(starting_cut_size == cut_size) //if no improvement was made i.e. stuck in local minimum
		return false;
	else return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movl 0x5088(%rip), %esi      # 0x8184
leaq 0x2044(%rip), %rdi      # 0x5147
xorl %eax, %eax
callq 0x2040
movl 0x5148(%rip), %ebx      # 0x8258
movb $0x0, 0x5175(%rip)      # 0x828c
callq 0x3174
testb %al, %al
je 0x3141
cmpb $0x1, 0x5165(%rip)      # 0x828c
jne 0x3117
movl 0x5151(%rip), %eax      # 0x8280
addl $-0x14, %eax
cmpl %eax, 0x5120(%rip)      # 0x8258
jg 0x3117
callq 0x2fc0
jmp 0x3117
callq 0x3003
movl 0x5038(%rip), %esi      # 0x8184
leaq 0x2017(%rip), %rdi      # 0x516a
xorl %eax, %eax
callq 0x2040
callq 0x2db3
callq 0x32bd
cmpl 0x50ee(%rip), %ebx      # 0x8258
setne %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/searsm8[P]FM_Partitioning/fmpart.cpp
// Function: main
int main(int argc, char *argv[])
{	
	start_time = std::clock();
	timestamp = std::clock();
	
	//add the example number from the argument to the filepath	
	if(argc > 1) strcat(file_path, argv[1]);
	else strcat(file_path, "1"); //defaults to example 1
	strcat(file_path, "/");
	
	readCellsFile();
	readNetsFile();
	initialPartition();
	
	printf("Initial ");
	findCutsize();
	min_cut_size = cut_size; //initialize min_cut_size
	initial_partition_cut_size = cut_size; //remember the initial cut_size
	
	computeGains();	
	printTimestamp();
	printf("************************************************\n");
		
	int max_num_passes = 20;
	
	//perform passes until local minimum is found, or max_num_passes is exceeded
	while(FMPartitionPass() && pass_count < max_num_passes)
	{
		pass_count++;		
	}		
		
	printf("\n************************************************\nFinal partition areas:\n");
	printPartitionAreas();
	
	printf("Final ");
	findCutsize();
	
	printToFile();	
	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movl %edi, %r14d
callq 0x20e0
movq %rax, 0x4cdc(%rip)      # 0x8290
callq 0x20e0
movq %rax, 0x4cd8(%rip)      # 0x8298
cmpl $0x2, %r14d
jl 0x35d8
movq 0x8(%rbx), %rsi
leaq 0x4b8f(%rip), %rdi      # 0x8160
callq 0x2260
jmp 0x35ed
leaq 0x4b81(%rip), %rbx      # 0x8160
movq %rbx, %rdi
callq 0x20a0
movw $0x31, (%rax,%rbx)
leaq 0x4b6c(%rip), %rbx      # 0x8160
movq %rbx, %rdi
callq 0x20a0
movw $0x2f, (%rax,%rbx)
callq 0x24dc
callq 0x29d4
callq 0x2ca0
leaq 0x1d4a(%rip), %rdi      # 0x5362
xorl %eax, %eax
callq 0x2040
callq 0x2db3
movl 0x4c2e(%rip), %eax      # 0x8258
movl %eax, 0x4c50(%rip)      # 0x8280
movl %eax, 0x4c4e(%rip)      # 0x8284
callq 0x2eb8
callq 0x32bd
leaq 0x1dfa(%rip), %rdi      # 0x5441
callq 0x2210
callq 0x30f0
testb %al, %al
je 0x366a
movl 0x4b29(%rip), %eax      # 0x8184
cmpl $0x13, %eax
jg 0x366a
incl %eax
movl %eax, 0x4b1c(%rip)      # 0x8184
jmp 0x364c
leaq 0x1e01(%rip), %rdi      # 0x5472
callq 0x2210
callq 0x2d43
leaq 0x1ce9(%rip), %rdi      # 0x536b
xorl %eax, %eax
callq 0x2040
callq 0x2db3
callq 0x3371
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/searsm8[P]FM_Partitioning/fmpart.cpp
// Function: CELL::updateGain(int)
void updateGain(int gain_change)
	{		
		//if the cell is locked, do nothing. Only update free cells.
		//because locked cells are no longer considered for this pass
		if(locked || fixed) return;
		
		//remove the old entry in gain bucket
		gain_bucket[partition].erase(gain_itr);
		
		gain += gain_change;
						
		//add the new entry to gain bucket, and set new gain_itr
		gain_itr = gain_bucket[partition].insert(pair <int, CELL*> (gain, this));		
	}

// Assembly:
cmpb $0x0, 0x7d(%rdi)
jne 0x3ce5
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
cmpb $0x0, 0x7c(%rdi)
jne 0x3cdb
movl %esi, %r14d
movslq 0x84(%rbx), %rax
imulq $0x30, %rax, %rdi
leaq 0x4517(%rip), %r15      # 0x81b0
addq %r15, %rdi
movq 0x90(%rbx), %rsi
callq 0x3ce6
addl 0x80(%rbx), %r14d
movl %r14d, 0x80(%rbx)
movslq 0x84(%rbx), %rax
imulq $0x30, %rax, %rdi
addq %r15, %rdi
leaq -0x28(%rbp), %rsi
movl %r14d, (%rsi)
movq %rbx, 0x8(%rsi)
callq 0x3dc4
movq %rax, 0x90(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/lunasorcery[P]brailify/./stb/stb_image_resize.h
// Function: stbir_resize_subpixel
STBIRDEF int stbir_resize_subpixel(const void *input_pixels , int input_w , int input_h , int input_stride_in_bytes,
                                         void *output_pixels, int output_w, int output_h, int output_stride_in_bytes,
                                   stbir_datatype datatype,
                                   int num_channels, int alpha_channel, int flags,
                                   stbir_edge edge_mode_horizontal, stbir_edge edge_mode_vertical, 
                                   stbir_filter filter_horizontal,  stbir_filter filter_vertical,
                                   stbir_colorspace space, void *alloc_context,
                                   float x_scale, float y_scale,
                                   float x_offset, float y_offset)
{
    float transform[4];
    transform[0] = x_scale;
    transform[1] = y_scale;
    transform[2] = x_offset;
    transform[3] = y_offset;
    return stbir__resize_arbitrary(alloc_context, input_pixels, input_w, input_h, input_stride_in_bytes,
        output_pixels, output_w, output_h, output_stride_in_bytes,
        0,0,1,1,transform,num_channels,alpha_channel,flags, datatype, filter_horizontal, filter_vertical,
        edge_mode_horizontal, edge_mode_vertical, space);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl 0x38(%rbp), %r14d
movl 0x20(%rbp), %r12d
leaq -0x40(%rbp), %r15
movss %xmm0, (%r15)
movss %xmm1, 0x4(%r15)
movss %xmm2, 0x8(%r15)
movss %xmm3, 0xc(%r15)
movl 0x50(%rbp), %r13d
movl 0x58(%rbp), %ebx
movl 0x40(%rbp), %r11d
movl 0x48(%rbp), %r10d
movl 0x60(%rbp), %eax
movss 0xbf91(%rip), %xmm2     # 0x10008
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
movaps %xmm2, %xmm3
pushq %rax
pushq %r10
pushq %r11
pushq %rbx
pushq %r13
pushq %r12
pushq %r14
movl 0x30(%rbp), %eax
pushq %rax
movl 0x28(%rbp), %eax
pushq %rax
pushq %r15
movl 0x18(%rbp), %eax
pushq %rax
movl 0x10(%rbp), %eax
pushq %rax
callq 0x2e2d
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/lunasorcery[P]brailify/main.cpp
// Function: getPixel(rgba8888_t*, int, int, int, int)
float getPixel(rgba8888_t* data, int w, int h, int x, int y)
{
	if (x < 0 || y < 0 || x >= w || y >= h) {
		return -1;
	}

	rgba8888_t const pixel = data[(y*w)+x];

	uint8_t const r8 = flagInvert ? (255-pixel.r) : pixel.r;
	uint8_t const g8 = flagInvert ? (255-pixel.g) : pixel.g;
	uint8_t const b8 = flagInvert ? (255-pixel.b) : pixel.b;

	float const a = pixel.a / 255.f;

	if (useThreshold) {
		float const luma = ((0.2126 * r8) + (0.7152 * g8) + (0.0722 * b8)) * a;
		return luma - threshold;
	} else {
		float const r = powf(r8 / 255.f, kgamma);
		float const g = powf(g8 / 255.f, kgamma);
		float const b = powf(b8 / 255.f, kgamma);
		float const luma = ((0.2126 * r) + (0.7152 * g) + (0.0722 * b)) * a;
		float const ditherThreshold = (ditherTable[(y % ditherHeight) * ditherWidth + (x % ditherWidth)] + .5f) * ditherScale;
		return luma - ditherThreshold;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movss 0xbee7(%rip), %xmm0     # 0x1000c
cmpl %edx, %r8d
jge 0x42a7
movl %ecx, %r14d
cmpl %esi, %ecx
jge 0x42a7
movl %r8d, %ebx
movl %r8d, %eax
orl %r14d, %eax
js 0x42a7
imull %ebx, %esi
addl %r14d, %esi
xorl %r15d, %r15d
subb 0x120ac(%rip), %r15b    # 0x16204
movb (%rdi,%rsi,4), %al
xorb %r15b, %al
movb 0x1(%rdi,%rsi,4), %r12b
xorb %r15b, %r12b
xorb 0x2(%rdi,%rsi,4), %r15b
movzbl 0x3(%rdi,%rsi,4), %ecx
cvtsi2ss %ecx, %xmm3
divss 0xbe88(%rip), %xmm3     # 0x10004
cmpb $0x1, 0x12082(%rip)     # 0x16205
jne 0x41d9
movzbl %al, %eax
cvtsi2sd %eax, %xmm0
movzbl %r12b, %eax
cvtsi2sd %eax, %xmm1
mulsd 0xcab4(%rip), %xmm1     # 0x10c50
mulsd 0xcab4(%rip), %xmm0     # 0x10c58
movzbl %r15b, %eax
cvtsi2sd %eax, %xmm2
addsd %xmm1, %xmm0
mulsd 0xcaa8(%rip), %xmm2     # 0x10c60
addsd %xmm0, %xmm2
cvtss2sd %xmm3, %xmm0
mulsd %xmm2, %xmm0
cvtsd2ss %xmm0, %xmm0
cvtsi2ssl 0x11f40(%rip), %xmm1 # 0x16110
subss %xmm1, %xmm0
jmp 0x42a7
movzbl %al, %eax
cvtsi2ss %eax, %xmm0
divss 0xbe1c(%rip), %xmm0     # 0x10004
movss 0xbe20(%rip), %xmm1     # 0x10010
movss %xmm3, -0x2c(%rbp)
callq 0x1190
movss %xmm0, -0x28(%rbp)
movzbl %r12b, %eax
cvtsi2ss %eax, %xmm0
divss 0xbdf5(%rip), %xmm0     # 0x10004
movss 0xbdf9(%rip), %xmm1     # 0x10010
callq 0x1190
movss %xmm0, -0x24(%rbp)
movzbl %r15b, %eax
cvtsi2ss %eax, %xmm0
divss 0xbdd3(%rip), %xmm0     # 0x10004
movss 0xbdd7(%rip), %xmm1     # 0x10010
callq 0x1190
cvtss2sd -0x28(%rbp), %xmm1
cvtss2sd -0x24(%rbp), %xmm2
mulsd 0xca00(%rip), %xmm2     # 0x10c50
mulsd 0xca00(%rip), %xmm1     # 0x10c58
cvtss2sd %xmm0, %xmm0
mulsd 0xc9fc(%rip), %xmm0     # 0x10c60
addsd %xmm2, %xmm1
addsd %xmm1, %xmm0
cvtss2sd -0x2c(%rbp), %xmm1
mulsd %xmm0, %xmm1
andl $0x7, %ebx
andl $0x7, %r14d
leal (%r14,%rbx,8), %eax
leaq 0xc039(%rip), %rcx      # 0x102c0
movsbl (%rax,%rcx), %eax
cvtsi2ss %eax, %xmm0
cvtsd2ss %xmm1, %xmm1
addss 0xbd79(%rip), %xmm0     # 0x10014
mulss 0xbd75(%rip), %xmm0     # 0x10018
addss %xmm1, %xmm0
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/lunasorcery[P]brailify/main.cpp
// Function: parseCommandLine(int, char**)
void parseCommandLine(int argc, char** argv)
{
	while (1) {
		static struct option long_options[] = {
			{ "invert",          no_argument, 0, 'i' },
			{ "width",     required_argument, 0, 'w' },
			{ "threshold", required_argument, 0, 't' },
			{ 0, 0, 0, 0 }
		};

		int option_index = 0;
		int c = getopt_long(argc, argv, "iw:t:", long_options, &option_index);

		if (c == -1)
			break;

		switch (c) {
			case 'i': {
				flagInvert = true;
				break;
			}
			case 'w': {
				resizeWidth = strtol(optarg, nullptr, 10);
				if (resizeWidth <= 0) {
					printf("Width must be greater than zero.\n");
					exit(1);
				}
				break;
			}
			case 't': {
				useThreshold = true;
				threshold = strtol(optarg, nullptr, 10);
				break;
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %r14d
leaq 0xc9e9(%rip), %r15      # 0x10cb8
leaq 0x11e4a(%rip), %r12     # 0x16120
leaq -0x2c(%rbp), %r13
andl $0x0, -0x2c(%rbp)
movl %r14d, %edi
movq %rbx, %rsi
movq %r15, %rdx
movq %r12, %rcx
movq %r13, %r8
callq 0x11b0
cmpl $0x69, %eax
je 0x432b
cmpl $0x74, %eax
je 0x4308
cmpl $0x77, %eax
je 0x4334
cmpl $-0x1, %eax
jne 0x42da
jmp 0x4366
movb $0x1, 0x11ef6(%rip)     # 0x16205
movq 0x11cba(%rip), %rax     # 0x15fd0
movq (%rax), %rdi
xorl %esi, %esi
pushq $0xa
popq %rdx
callq 0x1150
movl %eax, 0x11de7(%rip)     # 0x16110
jmp 0x42da
movb $0x1, 0x11ed2(%rip)     # 0x16204
jmp 0x42da
movq 0x11c95(%rip), %rax     # 0x15fd0
movq (%rax), %rdi
xorl %esi, %esi
pushq $0xa
popq %rdx
callq 0x1150
movl %eax, 0x11eba(%rip)     # 0x16208
testl %eax, %eax
jg 0x42da
leaq 0xe094(%rip), %rdi      # 0x123ed
callq 0x1170
pushq $0x1
popq %rdi
callq 0x1110
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/lunasorcery[P]brailify/main.cpp
// Function: main
int main(int argc, char** argv)
{
	parseCommandLine(argc, argv);

	if (optind >= argc) {
		printf("No filepath provided.\n");
		return 1;
	}

	for (int i = optind; i < argc; ++i) {
		processFile(argv[i]);
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %r14d
callq 0x42b4
movq 0x11aab(%rip), %rax     # 0x15fe0
movslq (%rax), %r15
cmpl %r14d, %r15d
jge 0x4557
movslq %r14d, %r14
cmpq %r14, %r15
jge 0x4553
movq (%rbx,%r15,8), %rdi
callq 0x4375
incq %r15
jmp 0x4540
xorl %eax, %eax
jmp 0x4566
leaq 0xdeb0(%rip), %rdi      # 0x1240e
callq 0x1170
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/lunasorcery[P]brailify/./stb/stb_image_resize.h
// Function: stbir__get_filter_pixel_width(stbir_filter, float)
static int stbir__get_filter_pixel_width(stbir_filter filter, float scale)
{
    STBIR_ASSERT(filter != 0);
    STBIR_ASSERT(filter < STBIR__ARRAY_SIZE(stbir__filter_info_table));

    if (stbir__use_upsampling(scale))
        return (int)ceil(stbir__filter_info_table[filter].support(1/scale) * 2);
    else
        return (int)ceil(stbir__filter_info_table[filter].support(scale) * 2 / scale);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
testl %edi, %edi
je 0xcbe5
cmpl $0x6, %edi
jae 0xcc04
movaps %xmm0, %xmm1
movl %edi, %eax
shlq $0x4, %rax
ucomiss 0x3467(%rip), %xmm0     # 0x10008
leaq 0x91a8(%rip), %rcx      # 0x15d50
movq 0x8(%rax,%rcx), %rax
ja 0xcbc4
movaps %xmm1, %xmm0
movss %xmm1, -0x4(%rbp)
callq *%rax
addss %xmm0, %xmm0
divss -0x4(%rbp), %xmm0
jmp 0xcbd6
movss 0x343c(%rip), %xmm0     # 0x10008
divss %xmm1, %xmm0
callq *%rax
addss %xmm0, %xmm0
callq 0x1070
cvttss2si %xmm0, %eax
addq $0x10, %rsp
popq %rbp
retq
leaq 0x4c69(%rip), %rdi      # 0x11855
leaq 0x4ba1(%rip), %rsi      # 0x11794
leaq 0x4cca(%rip), %rcx      # 0x118c4
movl $0x36b, %edx            # imm = 0x36B
callq 0x1080
leaq 0x4c65(%rip), %rdi      # 0x11870
leaq 0x4b82(%rip), %rsi      # 0x11794
leaq 0x4cab(%rip), %rcx      # 0x118c4
movl $0x36c, %edx            # imm = 0x36C
callq 0x1080
// File: /workspace/github_cpp_makefile_star2_O2/lunasorcery[P]brailify/./stb/stb_image_resize.h
// Function: stbir__filter_trapezoid(float, float)
static float stbir__filter_trapezoid(float x, float scale)
{
    float halfscale = scale / 2;
    float t = 0.5f + halfscale;
    STBIR_ASSERT(scale <= 1);

    x = (float)fabs(x);

    if (x >= t)
        return 0;
    else
    {
        float r = 0.5f - halfscale;
        if (x <= r)
            return 1;
        else
            return (t - x) / scale;
    }
}

// Assembly:
movss 0x33b2(%rip), %xmm2     # 0x10008
ucomiss %xmm1, %xmm2
jb 0xcca9
movss 0x33b1(%rip), %xmm4     # 0x10014
movaps %xmm1, %xmm5
mulss %xmm4, %xmm5
movaps %xmm5, %xmm3
andps 0x345c(%rip), %xmm0     # 0x100d0
addss %xmm4, %xmm3
xorps %xmm2, %xmm2
ucomiss %xmm3, %xmm0
jae 0xcca5
subss %xmm5, %xmm4
subss %xmm0, %xmm3
divss %xmm1, %xmm3
cmpnless %xmm4, %xmm0
andps %xmm0, %xmm3
movss 0x336c(%rip), %xmm1     # 0x10008
andnps %xmm1, %xmm0
orps %xmm3, %xmm0
movaps %xmm0, %xmm2
movaps %xmm2, %xmm0
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x4c47(%rip), %rdi      # 0x118fb
leaq 0x4ad9(%rip), %rsi      # 0x11794
leaq 0x4c44(%rip), %rcx      # 0x11906
movl $0x2f1, %edx            # imm = 0x2F1
callq 0x1080
// File: /workspace/github_cpp_makefile_star2_O2/lunasorcery[P]brailify/./stb/stb_image_resize.h
// Function: stbir__filter_cubic(float, float)
static float stbir__filter_cubic(float x, float s)
{
    STBIR__UNUSED_PARAM(s);

    x = (float)fabs(x);

    if (x < 1.0f)
        return (4 + x*x*(3*x - 6))/6;
    else if (x < 2.0f)
        return (8 + x*(-12 + x*(6 - x)))/6;

    return (0.0f);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movaps %xmm0, %xmm1
movaps 0x3383(%rip), %xmm2     # 0x100d0
andps %xmm0, %xmm2
movss 0x32b0(%rip), %xmm0     # 0x10008
ucomiss %xmm2, %xmm0
jbe 0xcd8b
mulss %xmm1, %xmm1
movss 0x32bb(%rip), %xmm0     # 0x10024
mulss %xmm2, %xmm0
addss 0x32c3(%rip), %xmm0     # 0x10038
mulss %xmm1, %xmm0
addss 0x32bb(%rip), %xmm0     # 0x1003c
divss 0x32a3(%rip), %xmm0     # 0x1002c
jmp 0xcdc6
xorps %xmm0, %xmm0
movss 0x3292(%rip), %xmm1     # 0x10028
ucomiss %xmm2, %xmm1
jbe 0xcdc6
movss 0x3289(%rip), %xmm1     # 0x1002c
movaps %xmm1, %xmm0
subss %xmm2, %xmm0
mulss %xmm2, %xmm0
addss 0x327a(%rip), %xmm0     # 0x10030
mulss %xmm2, %xmm0
addss 0x3272(%rip), %xmm0     # 0x10034
divss %xmm1, %xmm0
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/lunasorcery[P]brailify/./stb/stb_image_resize.h
// Function: stbir__filter_catmullrom(float, float)
static float stbir__filter_catmullrom(float x, float s)
{
    STBIR__UNUSED_PARAM(s);

    x = (float)fabs(x);

    if (x < 1.0f)
        return 1 - x*x*(2.5f - 1.5f*x);
    else if (x < 2.0f)
        return 2 - x*(4 + x*(0.5f*x - 2.5f));

    return (0.0f);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
andps 0x32ef(%rip), %xmm0     # 0x100d0
movss 0x321f(%rip), %xmm1     # 0x10008
ucomiss %xmm0, %xmm1
jbe 0xce10
movss 0x324e(%rip), %xmm2     # 0x10044
mulss %xmm0, %xmm2
addss 0x3246(%rip), %xmm2     # 0x10048
mulss %xmm0, %xmm0
mulss %xmm2, %xmm0
subss %xmm0, %xmm1
jmp 0xce45
movss 0x3210(%rip), %xmm1     # 0x10028
ucomiss %xmm0, %xmm1
jbe 0xce4a
movss 0x31ef(%rip), %xmm2     # 0x10014
mulss %xmm0, %xmm2
addss 0x320f(%rip), %xmm2     # 0x10040
mulss %xmm0, %xmm2
addss 0x31ff(%rip), %xmm2     # 0x1003c
mulss %xmm0, %xmm2
subss %xmm2, %xmm1
movaps %xmm1, %xmm0
jmp 0xce4d
xorps %xmm0, %xmm0
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/lunasorcery[P]brailify/./stb/stb_image_resize.h
// Function: stbir__filter_mitchell(float, float)
static float stbir__filter_mitchell(float x, float s)
{
    STBIR__UNUSED_PARAM(s);

    x = (float)fabs(x);

    if (x < 1.0f)
        return (16 + x*x*(21 * x - 36))/18;
    else if (x < 2.0f)
        return (32 + x*(-60 + x*(36 - 7*x)))/18;

    return (0.0f);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movaps %xmm0, %xmm1
movaps 0x3273(%rip), %xmm2     # 0x100d0
andps %xmm0, %xmm2
movss 0x31a0(%rip), %xmm0     # 0x10008
ucomiss %xmm2, %xmm0
jbe 0xce93
mulss %xmm1, %xmm1
movss 0x31e7(%rip), %xmm0     # 0x10060
mulss %xmm2, %xmm0
addss 0x31df(%rip), %xmm0     # 0x10064
mulss %xmm1, %xmm0
addss 0x31d7(%rip), %xmm0     # 0x10068
jmp 0xcecf
xorps %xmm0, %xmm0
movss 0x318a(%rip), %xmm1     # 0x10028
ucomiss %xmm2, %xmm1
jbe 0xced7
movss 0x31a1(%rip), %xmm0     # 0x1004c
mulss %xmm2, %xmm0
addss 0x3199(%rip), %xmm0     # 0x10050
mulss %xmm2, %xmm0
addss 0x3191(%rip), %xmm0     # 0x10054
mulss %xmm2, %xmm0
addss 0x3189(%rip), %xmm0     # 0x10058
divss 0x3185(%rip), %xmm0     # 0x1005c
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/lunasorcery[P]brailify/./stb/stb_image_resize.h
// Function: stbir__calculate_sample_range_upsample(int, float, float, float, int*, int*, float*)
static void stbir__calculate_sample_range_upsample(int n, float out_filter_radius, float scale_ratio, float out_shift, int* in_first_pixel, int* in_last_pixel, float* in_center_of_out)
{
    float out_pixel_center = (float)n + 0.5f;
    float out_pixel_influence_lowerbound = out_pixel_center - out_filter_radius;
    float out_pixel_influence_upperbound = out_pixel_center + out_filter_radius;

    float in_pixel_influence_lowerbound = (out_pixel_influence_lowerbound + out_shift) / scale_ratio;
    float in_pixel_influence_upperbound = (out_pixel_influence_upperbound + out_shift) / scale_ratio;

    *in_center_of_out = (out_pixel_center + out_shift) / scale_ratio;
    *in_first_pixel = (int)(floor(in_pixel_influence_lowerbound + 0.5));
    *in_last_pixel = (int)(floor(in_pixel_influence_upperbound - 0.5));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
cvtsi2ss %edi, %xmm3
addss 0x28b2(%rip), %xmm3     # 0x10014
movaps %xmm3, %xmm4
subss %xmm0, %xmm4
addss %xmm3, %xmm0
addss %xmm2, %xmm4
divss %xmm1, %xmm4
addss %xmm2, %xmm0
divss %xmm1, %xmm0
movss %xmm0, -0x14(%rbp)
addss %xmm2, %xmm3
divss %xmm1, %xmm3
movss %xmm3, (%rcx)
cvtss2sd %xmm4, %xmm0
addsd 0x34d6(%rip), %xmm0     # 0x10c70
callq 0x11c0
cvttsd2si %xmm0, %eax
movl %eax, (%r14)
cvtss2sd -0x14(%rbp), %xmm0
addsd 0x34c5(%rip), %xmm0     # 0x10c78
callq 0x11c0
cvttsd2si %xmm0, %eax
movl %eax, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/lunasorcery[P]brailify/./stb/stb_image_resize.h
// Function: stbir__calculate_sample_range_downsample(int, float, float, float, int*, int*, float*)
static void stbir__calculate_sample_range_downsample(int n, float in_pixels_radius, float scale_ratio, float out_shift, int* out_first_pixel, int* out_last_pixel, float* out_center_of_in)
{
    float in_pixel_center = (float)n + 0.5f;
    float in_pixel_influence_lowerbound = in_pixel_center - in_pixels_radius;
    float in_pixel_influence_upperbound = in_pixel_center + in_pixels_radius;

    float out_pixel_influence_lowerbound = in_pixel_influence_lowerbound * scale_ratio - out_shift;
    float out_pixel_influence_upperbound = in_pixel_influence_upperbound * scale_ratio - out_shift;

    *out_center_of_in = in_pixel_center * scale_ratio - out_shift;
    *out_first_pixel = (int)(floor(out_pixel_influence_lowerbound + 0.5));
    *out_last_pixel = (int)(floor(out_pixel_influence_upperbound - 0.5));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
cvtsi2ss %edi, %xmm3
addss 0x2830(%rip), %xmm3     # 0x10014
movaps %xmm3, %xmm4
subss %xmm0, %xmm4
addss %xmm3, %xmm0
mulss %xmm1, %xmm4
subss %xmm2, %xmm4
mulss %xmm1, %xmm0
subss %xmm2, %xmm0
movss %xmm0, -0x14(%rbp)
mulss %xmm1, %xmm3
subss %xmm2, %xmm3
movss %xmm3, (%rcx)
cvtss2sd %xmm4, %xmm0
addsd 0x3454(%rip), %xmm0     # 0x10c70
callq 0x11c0
cvttsd2si %xmm0, %eax
movl %eax, (%r14)
cvtss2sd -0x14(%rbp), %xmm0
addsd 0x3443(%rip), %xmm0     # 0x10c78
callq 0x11c0
cvttsd2si %xmm0, %eax
movl %eax, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/lunasorcery[P]brailify/./stb/stb_image_resize.h
// Function: stbir__decode_and_resample_upsample(stbir__info*, int)
static void stbir__decode_and_resample_upsample(stbir__info* stbir_info, int n)
{
    // Decode the nth scanline from the source image into the decode buffer.
    stbir__decode_scanline(stbir_info, n);

    // Now resample it into the ring buffer.
    if (stbir__use_width_upsampling(stbir_info))
        stbir__resample_horizontal_upsample(stbir_info, n, stbir__add_empty_ring_buffer_entry(stbir_info, n));
    else
        stbir__resample_horizontal_downsample(stbir_info, n, stbir__add_empty_ring_buffer_entry(stbir_info, n));

    // Now it's sitting in the ring buffer ready to be used as source for the vertical sampling.
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movl %esi, %r14d
movq %rdi, %rbx
callq 0xd89e
movss 0x44(%rbx), %xmm0
movss %xmm0, -0x14(%rbp)
movq %rbx, %rdi
movl %r14d, %esi
callq 0xe617
movss -0x14(%rbp), %xmm0
movq %rbx, %rdi
movq %rax, %rsi
addq $0x10, %rsp
ucomiss 0x277e(%rip), %xmm0     # 0x10008
ja 0xd895
popq %rbx
popq %r14
popq %rbp
jmp 0xe6bd
popq %rbx
popq %r14
popq %rbp
jmp 0xe1dc
// File: /workspace/github_cpp_makefile_star2_O2/lunasorcery[P]brailify/./stb/stb_image_resize.h
// Function: stbir__add_empty_ring_buffer_entry(stbir__info*, int)
static float* stbir__add_empty_ring_buffer_entry(stbir__info* stbir_info, int n)
{
    int ring_buffer_index;
    float* ring_buffer;

    if (stbir_info->ring_buffer_begin_index < 0)
    {
        ring_buffer_index = stbir_info->ring_buffer_begin_index = 0;
        stbir_info->ring_buffer_first_scanline = n;
    }
    else
    {
        ring_buffer_index = (stbir_info->ring_buffer_begin_index + (stbir_info->ring_buffer_last_scanline - stbir_info->ring_buffer_first_scanline) + 1) % stbir_info->vertical_filter_pixel_width;
        STBIR_ASSERT(ring_buffer_index != stbir_info->ring_buffer_begin_index);
    }

    ring_buffer = stbir__get_ring_buffer_entry(stbir_info->ring_buffer, ring_buffer_index, stbir_info->ring_buffer_length_bytes / sizeof(float));
    memset(ring_buffer, 0, stbir_info->ring_buffer_length_bytes);

    stbir_info->ring_buffer_last_scanline = n;

    return ring_buffer;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl 0xd4(%rdi), %ecx
testl %ecx, %ecx
js 0xe66d
movl 0xd0(%r14), %eax
addl %ecx, %eax
subl 0xcc(%r14), %eax
incl %eax
cltd
idivl 0xb4(%r14)
cmpl %ecx, %edx
jne 0xe67e
leaq 0x3b18(%rip), %rdi      # 0x1216d
leaq 0x3138(%rip), %rsi      # 0x11794
leaq 0x3b43(%rip), %rcx      # 0x121a6
movl $0x58c, %edx            # imm = 0x58C
callq 0x1080
andl $0x0, 0xd4(%r14)
movl %ebx, 0xcc(%r14)
xorl %edx, %edx
movslq 0xc8(%r14), %rax
movl %eax, %ecx
sarl $0x2, %ecx
imull %edx, %ecx
movslq %ecx, %r15
shlq $0x2, %r15
addq 0xd8(%r14), %r15
movq %r15, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x1060
movl %ebx, 0xd0(%r14)
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/lunasorcery[P]brailify/./stb/stb_image_resize.h
// Function: stbir__edge_wrap(stbir_edge, int, int)
stbir__inline static int stbir__edge_wrap(stbir_edge edge, int n, int max)
{
    // avoid per-pixel switch
    if (n >= 0 && n < max)
        return n;
    return stbir__edge_wrap_slow(edge, n, max);
}

// Assembly:
movl %edx, %ecx
testl %esi, %esi
setns %al
cmpl %edx, %esi
setl %dl
testb %dl, %al
je 0xeb29
movl %esi, %eax
retq
decl %edi
cmpl $0x3, %edi
ja 0xeb89
xorl %eax, %eax
leaq 0x174b(%rip), %rdx      # 0x10284
movslq (%rdx,%rdi,4), %rdi
addq %rdx, %rdi
jmpq *%rdi
testl %esi, %esi
js 0xeb72
leal -0x1(%rcx), %eax
cmpl %ecx, %esi
cmovll %esi, %eax
retq
testl %esi, %esi
js 0xeb73
cmpl %ecx, %esi
jl 0xeb26
leal (%rcx,%rcx), %eax
xorl %edx, %edx
cmpl %esi, %eax
notl %esi
leal (%rsi,%rcx,2), %eax
cmovlel %edx, %eax
retq
movl %esi, %eax
cltd
idivl %ecx
movl %edx, %eax
testl %esi, %esi
js 0xeb7b
retq
cmpl %ecx, %esi
jge 0xeb84
negl %esi
jmp 0xeb26
addl %eax, %ecx
testl %eax, %eax
cmovel %eax, %ecx
jmp 0xeb86
decl %ecx
movl %ecx, %eax
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x3470(%rip), %rdi      # 0x12004
leaq 0x2bf9(%rip), %rsi      # 0x11794
leaq 0x347d(%rip), %rcx      # 0x1201f
movl $0x3d9, %edx            # imm = 0x3D9
callq 0x1080
// File: /workspace/github_cpp_makefile_star2_O2/lukewagner[P]asmjs2wasm/src/main.cpp
// Function: main
int
main(int argc, char** argv)
try
{
  cin.exceptions(ios::failbit | ios::badbit);
  cout.exceptions(ios::failbit | ios::badbit);

  string chars;
  getline(cin, chars, '\0');

  memory::Pool pool;
  const asmjs_ast::Func& asmjs = parser::parse_asmjs(pool, chars);
  const wasm_ast::Module& wasm = emitter::emit_wasm(pool, asmjs);

  cout << wasm;

  return 0;
}
catch(const ios::failure& err)
{
  cerr << "Failed with runtime error: " << err.what() << endl;
  return -1;
}
catch(const runtime_error& err)
{
  cerr << "Failed with runtime error: " << err.what() << endl;
  return -1;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq 0xb466(%rip), %rdi      # 0xdfd0
movq (%rdi), %rax
addq -0x18(%rax), %rdi
pushq $0x5
popq %rsi
callq 0x2050
movq 0xb438(%rip), %rdi      # 0xdfb8
movq (%rdi), %rax
addq -0x18(%rax), %rdi
pushq $0x5
popq %rsi
callq 0x2050
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq 0xb429(%rip), %rdi      # 0xdfd0
movq %rsp, %rsi
xorl %edx, %edx
callq 0x2280
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rdi
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
andq $0x0, 0x20(%rdi)
movq %rsp, %rsi
callq 0x2d98
leaq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0x6b38
movq 0xb3d7(%rip), %rdi      # 0xdfb8
movq %rax, %rsi
callq 0x6b48
leaq 0x20(%rsp), %rdi
callq 0x2cf2
movq %rsp, %rdi
callq 0x20b0
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r14
retq
jmp 0x2c0f
movq %rdx, %r14
movq %rax, %rbx
jmp 0x2c1f
movq %rdx, %r14
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x2cf2
movq %rsp, %rdi
callq 0x20b0
jmp 0x2c2f
movq %rdx, %r14
movq %rax, %rbx
cmpl $0x2, %r14d
jne 0x2c74
movq %rbx, %rdi
callq 0x2090
movq %rax, %rbx
movq 0xb3a1(%rip), %rdi      # 0xdfe8
leaq 0x53b6(%rip), %rsi      # 0x8004
callq 0x2180
movq %rax, %r14
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
movq %r14, %rdi
movq %rax, %rsi
callq 0x2180
movq %rax, %rdi
callq 0x20c0
jmp 0x2cb7
cmpl $0x1, %r14d
jne 0x2cd6
movq %rbx, %rdi
callq 0x2090
movq %rax, %rbx
movq 0xb35c(%rip), %rdi      # 0xdfe8
leaq 0x5371(%rip), %rsi      # 0x8004
callq 0x2180
movq %rax, %r14
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
movq %r14, %rdi
movq %rax, %rsi
callq 0x2180
movq %rax, %rdi
callq 0x20c0
callq 0x2240
pushq $-0x1
popq %rax
jmp 0x2bfd
movq %rax, %rbx
callq 0x2240
jmp 0x2cd6
movq %rax, %rbx
callq 0x2240
movq %rbx, %rdi
callq 0x2260
movq %rax, %rdi
callq 0x2ce6