LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/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 0x4eb9(%rip), %eax      # 0x8270
movl %eax, 0x4e8b(%rip)      # 0x8248
movq 0x4e44(%rip), %rax      # 0x8208
movq 0x4e35(%rip), %rcx      # 0x8200
subq %rcx, %rax
je 0x33fa
sarq $0x3, %rax
cmpq $0x1, %rax
adcq $0x0, %rax
xorl %edx, %edx
movq (%rcx,%rdx,8), %rsi
movl 0x88(%rsi), %edi
movl %edi, 0x84(%rsi)
movb $0x0, 0x7d(%rsi)
incq %rdx
cmpq %rdx, %rax
jne 0x33de
movq 0x4e5f(%rip), %rax      # 0x8260
movq 0x4e50(%rip), %rcx      # 0x8258
subq %rcx, %rax
je 0x346c
sarq $0x3, %rax
cmpq $0x1, %rax
adcq $0x0, %rax
xorl %edx, %edx
movq (%rcx,%rdx,8), %rsi
movw $0x0, 0x72(%rsi)
movq $0x0, 0x6a(%rsi)
movq 0x78(%rsi), %rdi
movq 0x80(%rsi), %r8
subq %rdi, %r8
je 0x3464
sarq $0x3, %r8
cmpq $0x1, %r8
adcq $0x0, %r8
xorl %r9d, %r9d
movq (%rdi,%r9,8), %r10
movslq 0x84(%r10), %r10
incl 0x6c(%rsi,%r10,4)
incq %r9
cmpq %r9, %r8
jne 0x344c
incq %rdx
cmpq %rax, %rdx
jne 0x341b
callq 0x3243
movq $0x0, 0x4dd0(%rip) # 0x824c
movq 0x4d85(%rip), %rax      # 0x8208
movq 0x4d76(%rip), %rcx      # 0x8200
subq %rcx, %rax
je 0x34bf
sarq $0x3, %rax
cmpq $0x1, %rax
adcq $0x0, %rax
xorl %edx, %edx
leaq 0x4da8(%rip), %rsi      # 0x824c
movq (%rcx,%rdx,8), %rdi
movl 0x78(%rdi), %r8d
movslq 0x84(%rdi), %rdi
addl %r8d, (%rsi,%rdi,4)
incq %rdx
cmpq %rdx, %rax
jne 0x34a4
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x4ca7(%rip), %esi      # 0x8174
leaq 0x1c73(%rip), %rdi      # 0x5147
xorl %eax, %eax
callq 0x2040
movl 0x4d67(%rip), %ebx      # 0x8248
movb $0x0, 0x4d94(%rip)      # 0x827c
callq 0x3581
testb %al, %al
je 0x354e
cmpb $0x1, 0x4d84(%rip)      # 0x827c
jne 0x34e8
movl 0x4d48(%rip), %eax      # 0x8248
movl 0x4d6a(%rip), %ecx      # 0x8270
addl $-0x14, %ecx
cmpl %ecx, %eax
jg 0x34e8
movl %eax, 0x4d5d(%rip)      # 0x8270
movq 0x4cee(%rip), %rax      # 0x8208
movq 0x4cdf(%rip), %rcx      # 0x8200
subq %rcx, %rax
je 0x34e8
sarq $0x3, %rax
cmpq $0x1, %rax
adcq $0x0, %rax
xorl %edx, %edx
movq (%rcx,%rdx,8), %rsi
movl 0x84(%rsi), %edi
movl %edi, 0x88(%rsi)
incq %rdx
cmpq %rdx, %rax
jne 0x3534
jmp 0x34e8
callq 0x33ad
movl 0x4c1b(%rip), %esi      # 0x8174
leaq 0x1c0a(%rip), %rdi      # 0x516a
xorl %eax, %eax
callq 0x2040
callq 0x3112
callq 0x36d0
cmpl 0x4cd1(%rip), %ebx      # 0x8248
setne %al
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x20d0
movq %rax, 0x4892(%rip)      # 0x8280
callq 0x20d0
movq %rax, 0x488e(%rip)      # 0x8288
cmpl $0x2, %r14d
jl 0x3a12
movq 0x8(%rbx), %rsi
leaq 0x4745(%rip), %rdi      # 0x8150
callq 0x2240
jmp 0x3a27
leaq 0x4737(%rip), %rbx      # 0x8150
movq %rbx, %rdi
callq 0x20a0
movw $0x31, (%rax,%rbx)
leaq 0x4722(%rip), %rbx      # 0x8150
movq %rbx, %rdi
callq 0x20a0
movw $0x2f, (%rax,%rbx)
callq 0x253c
callq 0x2bc5
callq 0x2fd3
leaq 0x1910(%rip), %rdi      # 0x5362
xorl %eax, %eax
callq 0x2040
callq 0x3112
movl 0x47e4(%rip), %eax      # 0x8248
movl %eax, 0x4806(%rip)      # 0x8270
movl %eax, 0x4804(%rip)      # 0x8274
callq 0x3243
callq 0x36d0
leaq 0x19c0(%rip), %rdi      # 0x5441
callq 0x21f0
callq 0x34c1
movl 0x46e3(%rip), %ecx      # 0x8174
cmpl $0x14, %ecx
setl %dl
andb %al, %dl
cmpb $0x1, %dl
jne 0x3aba
incl %ecx
movl %ecx, 0x46ce(%rip)      # 0x8174
callq 0x34c1
testb %al, %al
je 0x3aba
movl 0x46bf(%rip), %ecx      # 0x8174
cmpl $0x14, %ecx
jl 0x3a9e
leaq 0x19b1(%rip), %rdi      # 0x5472
callq 0x21f0
callq 0x309f
leaq 0x1899(%rip), %rdi      # 0x536b
xorl %eax, %eax
callq 0x2040
callq 0x3112
callq 0x3784
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x41e3
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
cmpb $0x0, 0x7c(%rdi)
jne 0x41d9
movl %esi, %r14d
movslq 0x84(%rbx), %rax
leaq (%rax,%rax,2), %rdi
shlq $0x4, %rdi
leaq 0x400d(%rip), %r15      # 0x81a0
addq %r15, %rdi
movq 0x90(%rbx), %rsi
callq 0x41e4
addl 0x80(%rbx), %r14d
movl %r14d, 0x80(%rbx)
movslq 0x84(%rbx), %rax
leaq (%rax,%rax,2), %rdi
shlq $0x4, %rdi
addq %r15, %rdi
leaq -0x28(%rbp), %rsi
movl %r14d, (%rsi)
movq %rbx, 0x8(%rsi)
callq 0x422a
movq %rax, 0x90(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x12b31(%rip), %xmm2    # 0x17008
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 0x2ffd
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1364e(%rip), %r15     # 0x17d98
leaq 0x189bf(%rip), %r12     # 0x1d110
leaq -0x2c(%rbp), %r13
movl $0x0, -0x2c(%rbp)
movl %r14d, %edi
movq %rbx, %rsi
movq %r15, %rdx
movq %r12, %rcx
movq %r13, %r8
callq 0x11a0
cmpl $0x73, %eax
jle 0x47a1
cmpl $0x74, %eax
je 0x47af
cmpl $0x77, %eax
jne 0x4755
movq 0x1884a(%rip), %rax     # 0x1cfd0
movq (%rax), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x1140
movl %eax, 0x18a5d(%rip)     # 0x1d1f8
testl %eax, %eax
jg 0x4755
jmp 0x47ec
cmpl $0x69, %eax
jne 0x47d4
movb $0x1, 0x18a47(%rip)     # 0x1d1f4
jmp 0x4755
movb $0x1, 0x18a3f(%rip)     # 0x1d1f5
movq 0x18813(%rip), %rax     # 0x1cfd0
movq (%rax), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x1140
movl %eax, 0x1892e(%rip)     # 0x1d100
jmp 0x4755
cmpl $-0x1, %eax
jne 0x4755
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x14d10(%rip), %rdi     # 0x19503
callq 0x1160
movl $0x1, %edi
callq 0x1100
// File: /workspace/github_cpp_makefile_star2_O1/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 %r12
pushq %rbx
movq %rsi, %r14
movl %edi, %ebx
callq 0x472f
movq 0x185e0(%rip), %rax     # 0x1cfe0
movslq (%rax), %rax
cmpl %eax, %ebx
jle 0x4a26
leaq (%r14,%rax,8), %r15
subl %eax, %ebx
xorl %r14d, %r14d
xorl %r12d, %r12d
movq (%r15,%r12,8), %rdi
callq 0x4802
incq %r12
cmpl %r12d, %ebx
jne 0x4a13
jmp 0x4a38
leaq 0x14af7(%rip), %rdi     # 0x19524
callq 0x1160
movl $0x1, %r14d
movl %r14d, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x133a4
cmpl $0x6, %edi
jae 0x133c3
movaps %xmm0, %xmm1
movl %edi, %eax
shlq $0x4, %rax
ucomiss 0x3ca8(%rip), %xmm0     # 0x17008
leaq 0x99e9(%rip), %rcx      # 0x1cd50
movq 0x8(%rax,%rcx), %rax
ja 0x13383
movaps %xmm1, %xmm0
movss %xmm1, -0x4(%rbp)
callq *%rax
addss %xmm0, %xmm0
divss -0x4(%rbp), %xmm0
jmp 0x13395
movss 0x3c7d(%rip), %xmm0     # 0x17008
divss %xmm1, %xmm0
callq *%rax
addss %xmm0, %xmm0
callq 0x1080
cvttss2si %xmm0, %eax
addq $0x10, %rsp
popq %rbp
retq
leaq 0x558e(%rip), %rdi      # 0x18939
leaq 0x54c6(%rip), %rsi      # 0x18878
leaq 0x55ef(%rip), %rcx      # 0x189a8
movl $0x36b, %edx            # imm = 0x36B
callq 0x1090
leaq 0x558a(%rip), %rdi      # 0x18954
leaq 0x54a7(%rip), %rsi      # 0x18878
leaq 0x55d0(%rip), %rcx      # 0x189a8
movl $0x36c, %edx            # imm = 0x36C
callq 0x1090
// File: /workspace/github_cpp_makefile_star2_O1/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 0x3c15(%rip), %xmm2     # 0x17008
ucomiss %xmm1, %xmm2
jb 0x13446
movss 0x3c0c(%rip), %xmm4     # 0x1700c
movaps %xmm1, %xmm5
mulss %xmm4, %xmm5
movaps %xmm5, %xmm3
andps 0x3d0f(%rip), %xmm0     # 0x17120
addss %xmm4, %xmm3
xorps %xmm2, %xmm2
ucomiss %xmm3, %xmm0
jae 0x13442
subss %xmm5, %xmm4
subss %xmm0, %xmm3
divss %xmm1, %xmm3
cmpnless %xmm4, %xmm0
andps %xmm0, %xmm3
movss 0x3bcf(%rip), %xmm1     # 0x17008
andnps %xmm1, %xmm0
orps %xmm3, %xmm0
movaps %xmm0, %xmm2
movaps %xmm2, %xmm0
retq
pushq %rbp
movq %rsp, %rbp
leaq 0x558e(%rip), %rdi      # 0x189df
leaq 0x5420(%rip), %rsi      # 0x18878
leaq 0x558b(%rip), %rcx      # 0x189ea
movl $0x2f1, %edx            # imm = 0x2F1
callq 0x1090
// File: /workspace/github_cpp_makefile_star2_O1/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 0x3c36(%rip), %xmm2     # 0x17120
andps %xmm0, %xmm2
movss 0x3b13(%rip), %xmm0     # 0x17008
ucomiss %xmm2, %xmm0
jbe 0x13528
mulss %xmm1, %xmm1
movss 0x3b1e(%rip), %xmm0     # 0x17024
mulss %xmm2, %xmm0
addss 0x3b26(%rip), %xmm0     # 0x17038
mulss %xmm1, %xmm0
addss 0x3b1e(%rip), %xmm0     # 0x1703c
divss 0x3b06(%rip), %xmm0     # 0x1702c
jmp 0x13563
xorps %xmm0, %xmm0
movss 0x3af5(%rip), %xmm1     # 0x17028
ucomiss %xmm2, %xmm1
jbe 0x13563
movss 0x3aec(%rip), %xmm1     # 0x1702c
movaps %xmm1, %xmm0
subss %xmm2, %xmm0
mulss %xmm2, %xmm0
addss 0x3add(%rip), %xmm0     # 0x17030
mulss %xmm2, %xmm0
addss 0x3ad5(%rip), %xmm0     # 0x17034
divss %xmm1, %xmm0
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x3ba2(%rip), %xmm0     # 0x17120
movss 0x3a82(%rip), %xmm1     # 0x17008
ucomiss %xmm0, %xmm1
jbe 0x135ad
movss 0x3ab1(%rip), %xmm2     # 0x17044
mulss %xmm0, %xmm2
addss 0x3aa9(%rip), %xmm2     # 0x17048
mulss %xmm0, %xmm0
mulss %xmm2, %xmm0
subss %xmm0, %xmm1
jmp 0x135e2
movss 0x3a73(%rip), %xmm1     # 0x17028
ucomiss %xmm0, %xmm1
jbe 0x135e7
movss 0x3a4a(%rip), %xmm2     # 0x1700c
mulss %xmm0, %xmm2
addss 0x3a72(%rip), %xmm2     # 0x17040
mulss %xmm0, %xmm2
addss 0x3a62(%rip), %xmm2     # 0x1703c
mulss %xmm0, %xmm2
subss %xmm2, %xmm1
movaps %xmm1, %xmm0
jmp 0x135ea
xorps %xmm0, %xmm0
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x3b26(%rip), %xmm2     # 0x17120
andps %xmm0, %xmm2
movss 0x3a03(%rip), %xmm0     # 0x17008
ucomiss %xmm2, %xmm0
jbe 0x13630
mulss %xmm1, %xmm1
movss 0x3a4a(%rip), %xmm0     # 0x17060
mulss %xmm2, %xmm0
addss 0x3a42(%rip), %xmm0     # 0x17064
mulss %xmm1, %xmm0
addss 0x3a3a(%rip), %xmm0     # 0x17068
jmp 0x1366c
xorps %xmm0, %xmm0
movss 0x39ed(%rip), %xmm1     # 0x17028
ucomiss %xmm2, %xmm1
jbe 0x13674
movss 0x3a04(%rip), %xmm0     # 0x1704c
mulss %xmm2, %xmm0
addss 0x39fc(%rip), %xmm0     # 0x17050
mulss %xmm2, %xmm0
addss 0x39f4(%rip), %xmm0     # 0x17054
mulss %xmm2, %xmm0
addss 0x39ec(%rip), %xmm0     # 0x17058
divss 0x39e8(%rip), %xmm0     # 0x1705c
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x14154
movss 0x44(%rbx), %xmm0
movss %xmm0, -0x14(%rbp)
movq %rbx, %rdi
movl %r14d, %esi
callq 0x15535
movss -0x14(%rbp), %xmm0
movq %rbx, %rdi
movq %rax, %rsi
addq $0x10, %rsp
ucomiss 0x2ec8(%rip), %xmm0     # 0x17008
ja 0x1414b
popq %rbx
popq %r14
popq %rbp
jmp 0x155de
popq %rbx
popq %r14
popq %rbp
jmp 0x150ba
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1558b
movl 0xd0(%r14), %eax
addl %ecx, %eax
subl 0xcc(%r14), %eax
incl %eax
cltd
idivl 0xb4(%r14)
cmpl %ecx, %edx
jne 0x1559f
leaq 0x3d10(%rip), %rdi      # 0x19283
leaq 0x32fe(%rip), %rsi      # 0x18878
leaq 0x3d3b(%rip), %rcx      # 0x192bc
movl $0x58c, %edx            # imm = 0x58C
callq 0x1090
movl $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 0x1070
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_O1/lukewagner[P]asmjs2wasm/src/cashew/parser.h
// Function: cashew::Parser<asmjs_ast::Node*, Builder>::dump(char const*, char*)
static void dump(const char *where, char* curr) {
    /*
    printf("%s:\n=============\n", where);
    for (int i = 0; i < allSize; i++) printf("%c", allSource[i] ? allSource[i] : '?');
    printf("\n");
    for (int i = 0; i < (curr - allSource); i++) printf(" ");
    printf("^\n=============\n");
    */
    fprintf(stderr, "%s:\n==========\n", where);
    int newlinesLeft = 2;
    int charsLeft = 200;
    while (*curr) {
      if (*curr == '\n') {
        newlinesLeft--;
        if (newlinesLeft == 0) break;
      }
      charsLeft--;
      if (charsLeft == 0) break;
      fprintf(stderr, "%c", *curr++);
    }
    fprintf(stderr, "\n\n");
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %rdx
movq 0xaceb(%rip), %r14      # 0xcfc0
movq (%r14), %rdi
leaq 0x5fdf(%rip), %rsi      # 0x82be
xorl %r15d, %r15d
xorl %eax, %eax
callq 0x2200
pushq $0x2
popq %rbp
pushq $0x1
popq %r12
movzbl (%rbx,%r15), %eax
cmpl $0xa, %eax
je 0x2300
testl %eax, %eax
jne 0x2308
jmp 0x2321
cmpl $0x1, %ebp
movl %r12d, %ebp
je 0x2321
cmpl $0xc7, %r15d
je 0x2321
movsbl %al, %edi
movq (%r14), %rsi
callq 0x21b0
incq %r15
jmp 0x22f0
movq (%r14), %rcx
leaq 0x5fa3(%rip), %rdi      # 0x82ce
pushq $0x2
popq %rsi
pushq $0x1
popq %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x22a0
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq 0xa1f4(%rip), %rax      # 0xcfd0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
leaq (%rax,%rcx), %rdi
movl $0x5, 0x1c(%rax,%rcx)
movl 0x20(%rax,%rcx), %esi
callq 0x2250
movq 0xa1b9(%rip), %rax      # 0xcfb8
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
leaq (%rax,%rcx), %rdi
movl $0x5, 0x1c(%rax,%rcx)
movl 0x20(%rax,%rcx), %esi
callq 0x2250
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq $0x0, -0x8(%r15)
movb $0x0, (%r15)
movq 0xa199(%rip), %rdi      # 0xcfd0
movq %rsp, %rsi
xorl %edx, %edx
callq 0x2290
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rdi
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
movq $0x0, 0x20(%rdi)
movq %rsp, %rsi
callq 0x3000
leaq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0x6bac
movq 0xa144(%rip), %rdi      # 0xcfb8
movq %rax, %rsi
callq 0x6bc0
leaq 0x20(%rsp), %rdi
callq 0x2fb0
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2e9c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2190
xorl %eax, %eax
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x2eb2
movq %rdx, %r14
movq %rax, %rbx
jmp 0x2ec2
movq %rdx, %r14
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x2fb0
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2ee0
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2190
jmp 0x2ee0
movq %rdx, %r14
movq %rax, %rbx
cmpl $0x2, %r14d
jne 0x2f2b
movq %rbx, %rdi
callq 0x2080
movq %rax, %rbx
movq 0xa0f0(%rip), %rdi      # 0xcfe8
leaq 0x5105(%rip), %rsi      # 0x8004
movl $0x1b, %edx
callq 0x21a0
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
movq 0xa0cf(%rip), %rdi      # 0xcfe8
movq %rax, %rsi
callq 0x2170
movq %rax, %rdi
callq 0x20a0
jmp 0x2f74
cmpl $0x1, %r14d
jne 0x2f95
movq %rbx, %rdi
callq 0x2080
movq %rax, %rbx
movq 0xa0a5(%rip), %rdi      # 0xcfe8
leaq 0x50ba(%rip), %rsi      # 0x8004
movl $0x1b, %edx
callq 0x21a0
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
movq 0xa084(%rip), %rdi      # 0xcfe8
movq %rax, %rsi
callq 0x2170
movq %rax, %rdi
callq 0x20a0
callq 0x2240
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x2e9e
movq %rax, %rbx
callq 0x2240
jmp 0x2f95
movq %rax, %rbx
callq 0x2240
movq %rbx, %rdi
callq 0x2270
movq %rax, %rdi
callq 0x2fa5
// File: /workspace/github_cpp_makefile_star2_O1/lukewagner[P]asmjs2wasm/src/parser.cpp
// Function: parser::parse_asmjs(memory::Pool&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
Func&
parser::parse_asmjs(memory::Pool& pool, const string& chars)
{
  // cashew needs to be able to mutate the chars
  vector<char> mutable_chars(chars.begin(), chars.end());

  cashew::Parser<Node*, Builder> parser(pool);
  Node* top_level = parser.parseToplevel(mutable_chars.data());

  List<Node>& top = top_level->as<Block>().stmts;
  if (top.compute_length() != 1 || !top.first().is<Func>())
    throw runtime_error("expecting single top-level asm.js module function");

  Func& func = top.first().as<Func>();
  List<Node>& body = func.body.stmts;
  if (body.empty() || !body.first().is<String>() || !body.first().as<String>().str.equals("use asm"))
    throw runtime_error("expecting single top-level asm.js module function");

  return func;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
movq %rsp, %rdi
leaq 0x18(%rsp), %rcx
movq %rax, %rsi
callq 0x3190
leaq 0x18(%rsp), %rdi
movq %rbx, %rsi
callq 0x31d2
movq (%rsp), %rsi
leaq 0x18(%rsp), %rdi
callq 0x3214
cmpl $0xe, 0x8(%rax)
jne 0x312d
addq $0x10, %rax
movl $0x2, %ecx
movq %rax, %rdx
movq (%rdx), %rdx
decl %ecx
testq %rdx, %rdx
jne 0x3055
testl %ecx, %ecx
jne 0x30fb
movq (%rax), %rbx
cmpl $0x17, 0x8(%rbx)
jne 0x30fb
movq 0x28(%rbx), %rcx
movq 0x10(%rcx), %rax
cmpq 0x18(%rcx), %rax
je 0x30c7
cmpl $0x2, 0x8(%rax)
jne 0x30c7
movq 0x10(%rax), %rdi
leaq 0x506f(%rip), %rsi      # 0x8102
callq 0x21f0
testl %eax, %eax
jne 0x30c7
leaq 0x18(%rsp), %rdi
callq 0x3276
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x30bc
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x2190
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r14
retq
movl $0x10, %edi
callq 0x20b0
movq %rax, %r14
leaq 0x4ff5(%rip), %rsi      # 0x80d0
movq %rax, %rdi
callq 0x2070
movq 0x9f06(%rip), %rsi      # 0xcff0
movq 0x9ebf(%rip), %rdx      # 0xcfb0
movq %r14, %rdi
callq 0x2260
jmp 0x312d
movl $0x10, %edi
callq 0x20b0
movq %rax, %r14
leaq 0x4fc1(%rip), %rsi      # 0x80d0
movq %rax, %rdi
callq 0x2070
movq 0x9ed2(%rip), %rsi      # 0xcff0
movq 0x9e8b(%rip), %rdx      # 0xcfb0
movq %r14, %rdi
callq 0x2260
leaq 0x4fd6(%rip), %rdi      # 0x810a
leaq 0x4fd7(%rip), %rsi      # 0x8112
leaq 0x500f(%rip), %rcx      # 0x8151
movl $0x1f, %edx
callq 0x2100
jmp 0x3157
jmp 0x315c
jmp 0x3157
movq %rax, %rbx
jmp 0x3171
movq %rax, %rbx
jmp 0x3167
movq %rax, %rbx
movq %r14, %rdi
callq 0x2110
leaq 0x18(%rsp), %rdi
callq 0x3276
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x3187
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x2190
movq %rbx, %rdi
callq 0x2270
nop
// File: /workspace/github_cpp_makefile_star2_O1/lukewagner[P]asmjs2wasm/src/cashew/parser.h
// Function: cashew::Parser<asmjs_ast::Node*, Builder>::parseBlock(char*&, asmjs_ast::Node*, char const*, cashew::IString, cashew::IString)
NodeRef parseBlock(char*& src, NodeRef block=nullptr, const char* seps=";", IString keywordSep1=IString(), IString keywordSep2=IString()) {
    //dump("parseBlock", src);
    if (!block) block = builder.makeBlock();
    while (*src) {
      src = skipSpace(src);
      if (*src == 0) break;
      if (*src == ';') {
        src++; // skip a statement in this block
        continue;
      }
      if (hasChar(seps, *src)) break;
      if (!!keywordSep1) {
        Frag next(src);
        if (next.type == KEYWORD && next.str == keywordSep1) break;
      }
      if (!!keywordSep2) {
        Frag next(src);
        if (next.type == KEYWORD && next.str == keywordSep2) break;
      }
      NodeRef element = parseElementOrStatement(src, seps);
      builder.appendToBlock(block, element);
    }
    return block;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r9, %rbx
movq %r8, %r14
movq %rcx, %r15
movq %rdx, %rbp
movq %rsi, %r12
movq %rdi, %r13
testq %rdx, %rdx
jne 0x35af
movq 0x28(%r13), %rdi
movl $0x20, %esi
callq 0x3cb4
movq %rax, %rbp
movq $0x0, (%rax)
movl $0xe, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movq (%r12), %rdi
cmpb $0x0, (%rdi)
je 0x3674
leaq 0x28(%r13), %rax
movq %rax, 0x10(%rsp)
callq 0x3686
movq %rax, (%r12)
movzbl (%rax), %ecx
cmpl $0x3b, %ecx
je 0x3660
testl %ecx, %ecx
je 0x3674
movq %r15, %rdx
movb (%rdx), %sil
cmpb %cl, %sil
je 0x35f5
incq %rdx
testb %sil, %sil
jne 0x35e5
testb %sil, %sil
jne 0x3674
testq %r14, %r14
je 0x361d
cmpb $0x0, (%r14)
je 0x361d
movq %rsp, %rdi
movq %rax, %rsi
callq 0x3700
cmpl $0x0, 0xc(%rsp)
jne 0x361d
cmpq %r14, (%rsp)
je 0x3674
testq %rbx, %rbx
je 0x3640
cmpb $0x0, (%rbx)
je 0x3640
movq (%r12), %rsi
movq %rsp, %rdi
callq 0x3700
cmpl $0x0, 0xc(%rsp)
jne 0x3640
cmpq %rbx, (%rsp)
je 0x3674
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x3be6
movq 0x10(%rsp), %rdi
movq %rbp, %rsi
movq %rax, %rdx
callq 0x3c62
jmp 0x3667
incq %rax
movq %rax, (%r12)
movq (%r12), %rdi
cmpb $0x0, (%rdi)
jne 0x35c5
movq %rbp, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/lukewagner[P]asmjs2wasm/src/cashew/parser.h
// Function: cashew::Parser<asmjs_ast::Node*, Builder>::skipSpace(char*)
static char* skipSpace(char* curr) {
    while (*curr) {
      if (isSpace(*curr)) {
        curr++;
        continue;
      }
      if (curr[0] == '/' && curr[1] == '/') {
        curr += 2;
        while (*curr && *curr != '\n') curr++;
        if (*curr) curr++;
        continue;
      }
      if (curr[0] == '/' && curr[1] == '*') {
        curr += 2;
        while (*curr && (curr[0] != '*' || curr[1] != '/')) curr++;
        curr += 2;
        continue;
      }
      break;
    }
    return curr;
  }

// Assembly:
movq %rdi, %rax
movabsq $0x100002600, %rcx      # imm = 0x100002600
movzbl (%rax), %edx
cmpq $0x20, %rdx
ja 0x36ac
btq %rdx, %rcx
jae 0x36a7
incq %rax
jmp 0x3693
testq %rdx, %rdx
je 0x36fe
cmpb $0x2f, %dl
jne 0x36fe
cmpb $0x2f, 0x1(%rax)
jne 0x36cc
addq $0x2, %rax
movzbl (%rax), %edx
testl %edx, %edx
je 0x36f5
cmpl $0xa, %edx
je 0x36f5
incq %rax
jmp 0x36bb
cmpb $0x2f, %dl
jne 0x36fe
cmpb $0x2a, 0x1(%rax)
jne 0x36fe
addq $0x4, %rax
movzbl -0x2(%rax), %edx
cmpl $0x2a, %edx
je 0x36ea
testl %edx, %edx
jne 0x36f0
jmp 0x3693
cmpb $0x2f, -0x1(%rax)
je 0x3693
incq %rax
jmp 0x36db
cmpb $0x1, %dl
sbbq $-0x1, %rax
jmp 0x3693
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/lukewagner[P]asmjs2wasm/src/cashew/parser.h
// Function: cashew::Parser<asmjs_ast::Node*, Builder>::parseElementOrStatement(char*&, char const*)
NodeRef parseElementOrStatement(char*& src, const char *seps) {
    src = skipSpace(src);
    if (*src == ';') {
      src++;
      return builder.makeBlock(); // we don't need the brackets here, but oh well
    }
    NodeRef ret = parseElement(src, seps);
    src = skipSpace(src);
    if (*src == ';') {
      ret = builder.makeStatement(ret);
      src++;
    }
    return ret;
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movq (%rsi), %rdi
callq 0x3686
movq %rax, (%rbx)
cmpb $0x3b, (%rax)
jne 0x3c32
incq %rax
movq %rax, (%rbx)
movq 0x28(%r14), %rdi
movl $0x20, %esi
callq 0x3cb4
movq %rax, %r14
movq $0x0, (%rax)
movl $0xe, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
jmp 0x3c59
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x4490
movq %rax, %r14
movq (%rbx), %rdi
callq 0x3686
movq %rax, (%rbx)
cmpb $0x3b, (%rax)
jne 0x3c59
incq %rax
movq %rax, (%rbx)
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/lukewagner[P]asmjs2wasm/src/memory.h
// Function: memory::Pool::alloc(unsigned long)
void* alloc(size_t bytes)
  {
    if (remain_ < bytes) {
      remain_ = std::max<size_t>(bytes, 64 * 1024);
      allocs_.emplace_back(new uint8_t[remain_]);
      free_ = allocs_.back().get();
    }

    uint8_t* ret = free_;
    free_ += bytes;
    remain_ -= bytes;
    return ret;
  }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpq %rsi, 0x20(%rdi)
jae 0x3cf7
cmpq $0x10001, %rbx          # imm = 0x10001
movl $0x10000, %edi          # imm = 0x10000
cmovaeq %rbx, %rdi
movq %rdi, 0x20(%r14)
callq 0x2030
movq %rsp, %rsi
movq %rax, (%rsi)
movq %r14, %rdi
callq 0x3d10
movq 0x8(%r14), %rax
movq -0x8(%rax), %rax
movq %rax, 0x18(%r14)
movq 0x18(%r14), %rax
leaq (%rax,%rbx), %rcx
movq %rcx, 0x18(%r14)
subq %rbx, 0x20(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/lukewagner[P]asmjs2wasm/src/cashew/istring.h
// Function: cashew::IString::set(char const*, bool)
void set(const char *s, bool reuse=true) {
    typedef std::unordered_set<const char *, CStringHash, CStringEqual> StringSet;
    static StringSet* strings = new StringSet();

    if (reuse) {
      auto result = strings->insert(s); // if already present, does nothing
      str = *(result.first);
    } else {
      auto existing = strings->find(s);
      if (existing == strings->end()) {
        char *copy = (char*)malloc(strlen(s)+1); // XXX leaked
        strcpy(copy, s);
        s = copy;
      } else {
        s = *existing;
      }
      strings->insert(s);
      str = s;
    }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %edx, %ebp
movq %rdi, %rbx
movq %rsi, (%rsp)
movb 0x92f9(%rip), %al       # 0xd1a8
testb %al, %al
je 0x3f43
movq 0x92e2(%rip), %rdi      # 0xd1a0
testb %bpl, %bpl
je 0x3edc
leaq 0x8(%rsp), %rdx
movq %rdi, (%rdx)
movq %rsp, %rsi
callq 0x3fc4
movq %rax, %r14
addq $0x8, %r14
jmp 0x3f30
movq %rsp, %r14
movq %r14, %rsi
callq 0x430c
testq %rax, %rax
je 0x3ef2
movq 0x8(%rax), %r15
jmp 0x3f15
movq (%rsp), %r12
movq %r12, %rdi
callq 0x2090
leaq 0x1(%rax), %rdi
callq 0x21e0
movq %rax, %r15
movq %rax, %rdi
movq %r12, %rsi
callq 0x2160
movq %r15, (%rsp)
movq 0x9280(%rip), %rdi      # 0xd1a0
leaq 0x8(%rsp), %rdx
movq %rdi, (%rdx)
movq %r14, %rsi
callq 0x3fc4
movq (%r14), %rax
movq %rax, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x925e(%rip), %rdi      # 0xd1a8
callq 0x2280
testl %eax, %eax
je 0x3eb7
movl $0x38, %edi
callq 0x2180
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movaps %xmm0, 0x20(%rax)
movaps %xmm0, 0x10(%rax)
movq $0x0, 0x30(%rax)
movq %rax, %rcx
addq $0x30, %rcx
movq %rcx, (%rax)
movq $0x1, 0x8(%rax)
movl $0x3f800000, 0x20(%rax) # imm = 0x3F800000
movups %xmm0, 0x28(%rax)
movq %rax, 0x9205(%rip)      # 0xd1a0
leaq 0x9206(%rip), %rdi      # 0xd1a8
callq 0x20f0
jmp 0x3eb7
movq %rax, %rbx
leaq 0x91f2(%rip), %rdi      # 0xd1a8
callq 0x20e0
movq %rbx, %rdi
callq 0x2270
nop
// File: /workspace/github_cpp_makefile_star2_O1/lukewagner[P]asmjs2wasm/src/cashew/parser.h
// Function: cashew::Parser<asmjs_ast::Node*, Builder>::parseElement(char*&, char const*)
NodeRef parseElement(char*& src, const char* seps=";") {
    //dump("parseElement", src);
    src = skipSpace(src);
    Frag frag(src);
    src += frag.size;
    switch (frag.type) {
      case KEYWORD: {
        return parseAfterKeyword(frag, src, seps);
      }
      case IDENT:
      case STRING:
      case INT:
      case DOUBLE: {
        src = skipSpace(src);
        if (frag.type == IDENT) return parseAfterIdent(frag, src, seps);
        else return parseExpression(parseFrag(frag), src, seps);
      }
      case SEPARATOR: {
        if (frag.str == OPEN_PAREN) return parseExpression(parseAfterParen(src), src, seps);
        if (frag.str == OPEN_BRACE) return parseExpression(parseAfterBrace(src), src, seps);
        if (frag.str == OPEN_CURLY) return parseExpression(parseAfterCurly(src), src, seps);
        assert(0);
      }
      case OPERATOR: {
        return parseExpression(frag.str, src, seps);
      }
      default: /* dump("parseElement", src); printf("bad frag type: %d\n", frag.type); */ assert(0);
    }
    return nullptr;
  }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movq (%rsi), %rdi
callq 0x3686
movq %rax, (%r14)
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %rax, %rsi
callq 0x3700
movslq 0x8(%r12), %rdi
addq (%r14), %rdi
movq %rdi, (%r14)
movl 0xc(%r12), %eax
cmpq $0x6, %rax
ja 0x45b3
leaq 0x3bc4(%rip), %rcx      # 0x80a4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
callq 0x3686
movq %rax, (%r14)
cmpl $0x2, 0x14(%rsp)
jne 0x450d
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x47f2
jmp 0x4551
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
callq 0x519c
movq %r15, %rdi
movl $0x1, %esi
movq %rax, %rdx
jmp 0x4546
leaq 0x8(%rsp), %rsi
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x45f2
jmp 0x4551
movq 0x8(%rsp), %rdx
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rcx
movq %rbx, %r8
callq 0x4968
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x8(%rsp), %rax
leaq 0x8e57(%rip), %rcx      # 0xd3c0
cmpq (%rcx), %rax
je 0x4593
leaq 0x8e53(%rip), %rcx      # 0xd3c8
cmpq (%rcx), %rax
je 0x45a3
leaq 0x8e4f(%rip), %rcx      # 0xd3d0
cmpq (%rcx), %rax
jne 0x45d2
movq %r15, %rdi
movq %r14, %rsi
callq 0x5458
jmp 0x451a
movq %r15, %rdi
movq %r14, %rsi
callq 0x5282
jmp 0x451a
movq %r15, %rdi
movq %r14, %rsi
callq 0x5352
jmp 0x451a
leaq 0x44ee(%rip), %rdi      # 0x8aa8
leaq 0x3c36(%rip), %rsi      # 0x81f7
leaq 0x3d09(%rip), %rcx      # 0x82d1
movl $0x138, %edx            # imm = 0x138
callq 0x2100
leaq 0x44cf(%rip), %rdi      # 0x8aa8
leaq 0x3c17(%rip), %rsi      # 0x81f7
leaq 0x3cea(%rip), %rcx      # 0x82d1
movl $0x133, %edx            # imm = 0x133
callq 0x2100
nop
// File: /workspace/github_cpp_makefile_star2_O1/lukewagner[P]asmjs2wasm/src/cashew/parser.h
// Function: cashew::Parser<asmjs_ast::Node*, Builder>::parseAfterIdent(cashew::Parser<asmjs_ast::Node*, Builder>::Frag&, char*&, char const*)
NodeRef parseAfterIdent(Frag& frag, char*& src, const char* seps) {
    assert(!isSpace(*src));
    if (*src == '(') return parseExpression(parseCall(parseFrag(frag), src), src, seps);
    if (*src == '[') return parseExpression(parseIndexing(parseFrag(frag), src), src, seps);
    if (*src == ':' && expressionPartsStack.back().size() == 0) {
      src++;
      src = skipSpace(src);
      NodeRef inner;
      if (*src == '{') { // context lets us know this is not an object, but a block
        inner = parseBracketedBlock(src);
      } else {
        inner = parseElement(src, seps);
      }
      return builder.makeLabel(frag.str, inner);
    }
    if (*src == '.') return parseExpression(parseDotting(parseFrag(frag), src), src, seps);
    return parseExpression(parseFrag(frag), src, seps);
  }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %rbx
movq (%rdx), %rdi
movb (%rdi), %cl
movzbl %cl, %eax
cmpl $0x2d, %eax
jg 0x483f
cmpl $0x27, %eax
jle 0x4897
cmpl $0x28, %eax
jne 0x48b5
movq %rbx, %rdi
movq %r12, %rsi
callq 0x519c
movq %rbx, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x6484
jmp 0x48c0
cmpl $0x2e, %eax
je 0x487c
cmpl $0x3a, %eax
je 0x4869
cmpl $0x5b, %eax
jne 0x48b5
movq %rbx, %rdi
movq %r12, %rsi
callq 0x519c
movq %rbx, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x65ee
jmp 0x48c0
movq 0x8(%rbx), %rax
movq -0x10(%rax), %rdx
cmpq -0x18(%rax), %rdx
je 0x48e1
cmpb $0x2e, %cl
jne 0x48b5
movq %rbx, %rdi
movq %r12, %rsi
callq 0x519c
movq %rbx, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x6716
jmp 0x48c0
leal -0x9(%rax), %ecx
cmpl $0x2, %ecx
jb 0x4948
cmpl $0xd, %eax
je 0x4948
cmpl $0x20, %eax
je 0x4948
movq %rbx, %rdi
movq %r12, %rsi
callq 0x519c
movq %rbx, %rdi
movl $0x1, %esi
movq %rax, %rdx
movq %r15, %rcx
movq %r14, %r8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x4968
incq %rdi
movq %rdi, (%r15)
callq 0x3686
movq %rax, (%r15)
cmpb $0x7b, (%rax)
jne 0x4903
movq %rbx, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x60aa
jmp 0x4911
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x4490
movq %rax, %r14
movq (%r12), %r15
movq 0x28(%rbx), %rdi
movl $0x20, %esi
callq 0x3cb4
movq $0x0, (%rax)
movl $0x13, 0x8(%rax)
movq %r15, 0x10(%rax)
movq %r14, 0x18(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x3899(%rip), %rdi      # 0x81e8
leaq 0x38a1(%rip), %rsi      # 0x81f7
leaq 0x400d(%rip), %rcx      # 0x896a
movl $0x20b, %edx            # imm = 0x20B
callq 0x2100
nop
// File: /workspace/github_cpp_makefile_star2_O1/lukewagner[P]asmjs2wasm/src/cashew/parser.h
// Function: cashew::Parser<asmjs_ast::Node*, Builder>::parseFrag(cashew::Parser<asmjs_ast::Node*, Builder>::Frag&)
NodeRef parseFrag(Frag& frag) {
    switch (frag.type) {
      case IDENT:  return builder.makeName(frag.str);
      case STRING: return builder.makeString(frag.str);
      case INT:    return builder.makeInt(uint32_t(frag.num));
      case DOUBLE: return builder.makeDouble(frag.num);
      default: assert(0);
    }
    return nullptr;
  }

// Assembly:
pushq %rbx
subq $0x10, %rsp
movl 0xc(%rsi), %eax
addl $-0x2, %eax
cmpl $0x3, %eax
ja 0x5263
leaq 0x2f09(%rip), %rcx      # 0x80c0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%rsi), %rbx
movq 0x28(%rdi), %rdi
movl $0x18, %esi
callq 0x3cb4
movq $0x0, (%rax)
movl $0x5, 0x8(%rax)
jmp 0x5259
cvttsd2si (%rsi), %rbx
movq 0x28(%rdi), %rdi
movl $0x10, %esi
callq 0x3cb4
movq $0x0, (%rax)
movl $0x1, 0x8(%rax)
movl %ebx, 0xc(%rax)
jmp 0x525d
movsd (%rsi), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x28(%rdi), %rdi
movl $0x18, %esi
callq 0x3cb4
movq $0x0, (%rax)
movl $0x0, 0x8(%rax)
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x10(%rax)
jmp 0x525d
movq (%rsi), %rbx
movq 0x28(%rdi), %rdi
movl $0x18, %esi
callq 0x3cb4
movq $0x0, (%rax)
movl $0x2, 0x8(%rax)
movq %rbx, 0x10(%rax)
addq $0x10, %rsp
popq %rbx
retq
leaq 0x383e(%rip), %rdi      # 0x8aa8
leaq 0x2f86(%rip), %rsi      # 0x81f7
leaq 0x3b97(%rip), %rcx      # 0x8e0f
movl $0x143, %edx            # imm = 0x143
callq 0x2100
// File: /workspace/github_cpp_makefile_star2_O1/lukewagner[P]asmjs2wasm/src/cashew/parser.h
// Function: cashew::Parser<asmjs_ast::Node*, Builder>::parseAfterParen(char*&)
NodeRef parseAfterParen(char*& src) {
    expressionPartsStack.resize(expressionPartsStack.size()+1);
    src = skipSpace(src);
    NodeRef ret = parseElement(src, ")");
    src = skipSpace(src);
    assert(*src == ')');
    src++;
    assert(expressionPartsStack.back().size() == 0);
    expressionPartsStack.pop_back();
    return ret;
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %rax
subq (%rdi), %rax
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rsi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rsi
incq %rsi
callq 0x3324
movq (%r14), %rdi
callq 0x3686
movq %rax, (%r14)
leaq 0x2e50(%rip), %rdx      # 0x8110
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4490
movq %rax, %r15
movq (%r14), %rdi
callq 0x3686
movq %rax, (%r14)
cmpb $0x29, (%rax)
jne 0x5314
incq %rax
movq %rax, (%r14)
movq 0x8(%rbx), %rax
movq -0x18(%rax), %rdi
cmpq %rdi, -0x10(%rax)
jne 0x5333
leaq -0x18(%rax), %rcx
movq %rcx, 0x8(%rbx)
testq %rdi, %rdi
je 0x530b
movq -0x8(%rax), %rsi
subq %rdi, %rsi
callq 0x2190
movq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq
leaq 0x31b2(%rip), %rdi      # 0x84cd
leaq 0x2ed5(%rip), %rsi      # 0x81f7
leaq 0x3b5d(%rip), %rcx      # 0x8e86
movl $0x24f, %edx            # imm = 0x24F
callq 0x2100
leaq 0x3748(%rip), %rdi      # 0x8a82
leaq 0x2eb6(%rip), %rsi      # 0x81f7
leaq 0x3b3e(%rip), %rcx      # 0x8e86
movl $0x251, %edx            # imm = 0x251
callq 0x2100
// File: /workspace/github_cpp_makefile_star2_O1/lukewagner[P]asmjs2wasm/src/cashew/parser.h
// Function: cashew::Parser<asmjs_ast::Node*, Builder>::parseAfterBrace(char*&)
NodeRef parseAfterBrace(char*& src) {
    expressionPartsStack.resize(expressionPartsStack.size()+1);
    NodeRef ret = builder.makeArray();
    while (1) {
      src = skipSpace(src);
      assert(*src);
      if (*src == ']') break;
      NodeRef element = parseElement(src, ",]");
      builder.appendToArray(ret, element);
      src = skipSpace(src);
      if (*src == ',') {
        src++;
        continue;
      } else assert(*src == ']');
    }
    assert(*src == ']');
    src++;
    return ret;
  }

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rax
subq (%rdi), %rax
sarq $0x3, %rax
movabsq $-0x5555555555555555, %rsi # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rsi
incq %rsi
callq 0x3324
leaq 0x28(%r14), %r15
movq 0x28(%r14), %rdi
movl $0x20, %esi
callq 0x3cb4
movq %rax, %r12
movq $0x0, (%rax)
movl $0x3, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
leaq 0x3bd4(%rip), %r13      # 0x8f87
movq (%rbx), %rdi
callq 0x3686
movq %rax, (%rbx)
movzbl (%rax), %ecx
cmpl $0x5d, %ecx
je 0x5406
testl %ecx, %ecx
je 0x5419
movq %r14, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x4490
movq %r15, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x6aec
movq (%rbx), %rdi
callq 0x3686
movq %rax, (%rbx)
movzbl (%rax), %ecx
cmpl $0x5d, %ecx
je 0x53b3
cmpl $0x2c, %ecx
jne 0x5438
incq %rax
movq %rax, (%rbx)
jmp 0x53b3
incq %rax
movq %rax, (%rbx)
movq %r12, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x3ae4(%rip), %rdi      # 0x8f04
leaq 0x2dd0(%rip), %rsi      # 0x81f7
leaq 0x3adb(%rip), %rcx      # 0x8f09
movl $0x25b, %edx            # imm = 0x25B
callq 0x2100
leaq 0x36fc(%rip), %rdi      # 0x8b3b
leaq 0x2db1(%rip), %rsi      # 0x81f7
leaq 0x3abc(%rip), %rcx      # 0x8f09
movl $0x263, %edx            # imm = 0x263
callq 0x2100
nop