LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: rishabh-battulwar[P]imageprocessing/./include/colorspace.h
// Function: Xyz2Luv(double*, double*, double*, double, double, double)
void Xyz2Luv(num *L, num *u, num *v, num X, num Y, num Z)
{	
	num u1, v1, Denom;
	

	if((Denom = X + 15*Y + 3*Z) > 0)
	{
		u1 = (4*X) / Denom;
		v1 = (9*Y) / Denom;
	}
	else
		u1 = v1 = 0;

	Y /= WHITEPOINT_Y;
	Y = LABF(Y);
	*L = 116*Y - 16;
	*u = 13*(*L)*(u1 - WHITEPOINT_U);
	*v = 13*(*L)*(v1 - WHITEPOINT_V);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movsd %xmm0, -0x20(%rbp)
movsd %xmm1, -0x28(%rbp)
movsd %xmm2, -0x30(%rbp)
movsd -0x20(%rbp), %xmm0
movsd -0x28(%rbp), %xmm1
movsd 0x11bd3(%rip), %xmm2    # 0x1c3d8
mulsd %xmm2, %xmm1
addsd %xmm0, %xmm1
movsd -0x30(%rbp), %xmm0
movsd 0x11a5e(%rip), %xmm2    # 0x1c278
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x48(%rbp)
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0xa860
movsd 0x11a00(%rip), %xmm0    # 0x1c238
mulsd -0x20(%rbp), %xmm0
divsd -0x48(%rbp), %xmm0
movsd %xmm0, -0x38(%rbp)
movsd 0x11b91(%rip), %xmm0    # 0x1c3e0
mulsd -0x28(%rbp), %xmm0
divsd -0x48(%rbp), %xmm0
movsd %xmm0, -0x40(%rbp)
jmp 0xa870
xorps %xmm0, %xmm0
movsd %xmm0, -0x40(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x38(%rbp)
movsd -0x28(%rbp), %xmm0
movsd 0x119eb(%rip), %xmm1    # 0x1c268
divsd %xmm1, %xmm0
movsd %xmm0, -0x28(%rbp)
movsd -0x28(%rbp), %xmm0
movsd 0x11ae5(%rip), %xmm1    # 0x1c378
ucomisd %xmm1, %xmm0
jb 0xa8b2
movsd -0x28(%rbp), %xmm0
movsd 0x11afa(%rip), %xmm1    # 0x1c3a0
callq 0x2350
movsd %xmm0, -0x50(%rbp)
jmp 0xa8d4
movsd -0x28(%rbp), %xmm0
movsd 0x11ad1(%rip), %xmm1    # 0x1c390
mulsd %xmm1, %xmm0
movsd 0x11acd(%rip), %xmm1    # 0x1c398
addsd %xmm1, %xmm0
movsd %xmm0, -0x50(%rbp)
movsd -0x50(%rbp), %xmm0
movsd %xmm0, -0x28(%rbp)
movsd -0x28(%rbp), %xmm0
movsd 0x11acd(%rip), %xmm1    # 0x1c3b8
mulsd %xmm1, %xmm0
movsd 0x11ac9(%rip), %xmm1    # 0x1c3c0
addsd %xmm1, %xmm0
movq -0x8(%rbp), %rax
movsd %xmm0, (%rax)
movq -0x8(%rbp), %rax
movsd 0x11ae1(%rip), %xmm0    # 0x1c3f0
mulsd (%rax), %xmm0
movsd -0x38(%rbp), %xmm1
movsd 0x11ad8(%rip), %xmm2    # 0x1c3f8
subsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movq -0x10(%rbp), %rax
movsd %xmm0, (%rax)
movq -0x8(%rbp), %rax
movsd 0x11ab4(%rip), %xmm0    # 0x1c3f0
mulsd (%rax), %xmm0
movsd -0x40(%rbp), %xmm1
movsd 0x11a9b(%rip), %xmm2    # 0x1c3e8
subsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movq -0x18(%rbp), %rax
movsd %xmm0, (%rax)
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rishabh-battulwar[P]imageprocessing/./include/colorspace.h
// Function: Luv2Xyz(double*, double*, double*, double, double, double)
void Luv2Xyz(num *X, num *Y, num *Z, num L, num u, num v)
{
	*Y = (L + 16)/116;
	*Y = WHITEPOINT_Y*LABINVF(*Y);
	
	if(L != 0)
	{
		u /= L;
		v /= L;
	}
	
	u = u/13 + WHITEPOINT_U;
	v = v/13 + WHITEPOINT_V;
	*X = (*Y) * ((9*u)/(4*v));
	*Z = (*Y) * ((3 - 0.75*u)/v - 5);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movsd %xmm0, -0x20(%rbp)
movsd %xmm1, -0x28(%rbp)
movsd %xmm2, -0x30(%rbp)
movsd 0x11719(%rip), %xmm0    # 0x1c0b0
addsd -0x20(%rbp), %xmm0
movsd 0x11a14(%rip), %xmm1    # 0x1c3b8
divsd %xmm1, %xmm0
movq -0x10(%rbp), %rax
movsd %xmm0, (%rax)
movq -0x10(%rbp), %rax
movsd (%rax), %xmm0
movsd 0x11a08(%rip), %xmm1    # 0x1c3c8
ucomisd %xmm1, %xmm0
jb 0xa9e5
movq -0x10(%rbp), %rax
movsd (%rax), %xmm0
movq -0x10(%rbp), %rax
mulsd (%rax), %xmm0
movq -0x10(%rbp), %rax
mulsd (%rax), %xmm0
movsd %xmm0, -0x38(%rbp)
jmp 0xaa0a
movq -0x10(%rbp), %rax
movsd (%rax), %xmm1
movsd 0x119a3(%rip), %xmm0    # 0x1c398
subsd %xmm0, %xmm1
movsd 0x119cf(%rip), %xmm0    # 0x1c3d0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x38(%rbp)
movsd -0x38(%rbp), %xmm1
movsd 0x11851(%rip), %xmm0    # 0x1c268
mulsd %xmm1, %xmm0
movq -0x10(%rbp), %rax
movsd %xmm0, (%rax)
movsd -0x20(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xaa35
jp 0xaa35
jmp 0xaa5b
movsd -0x20(%rbp), %xmm1
movsd -0x28(%rbp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x28(%rbp)
movsd -0x20(%rbp), %xmm1
movsd -0x30(%rbp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
movsd -0x28(%rbp), %xmm0
movsd 0x11988(%rip), %xmm1    # 0x1c3f0
divsd %xmm1, %xmm0
movsd 0x11984(%rip), %xmm1    # 0x1c3f8
addsd %xmm1, %xmm0
movsd %xmm0, -0x28(%rbp)
movsd -0x30(%rbp), %xmm0
movsd 0x11966(%rip), %xmm1    # 0x1c3f0
divsd %xmm1, %xmm0
movsd 0x11952(%rip), %xmm1    # 0x1c3e8
addsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
movq -0x10(%rbp), %rax
movsd (%rax), %xmm0
movsd 0x11931(%rip), %xmm1    # 0x1c3e0
mulsd -0x28(%rbp), %xmm1
movsd 0x1177c(%rip), %xmm2    # 0x1c238
mulsd -0x30(%rbp), %xmm2
divsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movq -0x8(%rbp), %rax
movsd %xmm0, (%rax)
movq -0x10(%rbp), %rax
movsd (%rax), %xmm0
movsd -0x28(%rbp), %xmm1
movsd 0x11922(%rip), %xmm2    # 0x1c408
mulsd %xmm2, %xmm1
movsd 0x11786(%rip), %xmm2    # 0x1c278
addsd %xmm2, %xmm1
divsd -0x30(%rbp), %xmm1
movsd 0x118fd(%rip), %xmm2    # 0x1c400
subsd %xmm2, %xmm1
mulsd %xmm1, %xmm0
movq -0x18(%rbp), %rax
movsd %xmm0, (%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rishabh-battulwar[P]imageprocessing/./include/colorspace.h
// Function: Xyz2Lch(double*, double*, double*, double, double, double)
void Xyz2Lch(num *L, num *C, num *H, num X, num Y, num Z)
{
	num a, b;
	
	
	Xyz2Lab(L, &a, &b, X, Y, Z);
	*C = sqrt(a*a + b*b);
	*H = atan2(b, a)*180.0/M_PI;
	
	if(*H < 0)
		*H += 360;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movsd %xmm0, -0x20(%rbp)
movsd %xmm1, -0x28(%rbp)
movsd %xmm2, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movsd -0x20(%rbp), %xmm0
movsd -0x28(%rbp), %xmm1
movsd -0x30(%rbp), %xmm2
leaq -0x38(%rbp), %rsi
leaq -0x40(%rbp), %rdx
callq 0xa440
movsd -0x38(%rbp), %xmm0
movsd -0x38(%rbp), %xmm2
movsd -0x40(%rbp), %xmm1
mulsd -0x40(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0x2150
movq -0x10(%rbp), %rax
movsd %xmm0, (%rax)
movsd -0x40(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
callq 0x2060
movsd 0x11875(%rip), %xmm1    # 0x1c418
mulsd %xmm1, %xmm0
movsd 0x11861(%rip), %xmm1    # 0x1c410
divsd %xmm1, %xmm0
movq -0x18(%rbp), %rax
movsd %xmm0, (%rax)
movq -0x18(%rbp), %rax
xorps %xmm0, %xmm0
ucomisd (%rax), %xmm0
jbe 0xabdc
movq -0x18(%rbp), %rax
movsd 0x11684(%rip), %xmm0    # 0x1c258
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rishabh-battulwar[P]imageprocessing/./include/colorspace.h
// Function: ApplyColorTransform(colortransform, double*, double*, double*, double, double, double)
void ApplyColorTransform(colortransform Trans, 
	num *D0, num *D1, num *D2, num S0, num S1, num S2)
{
	switch(Trans.NumStages)
	{
	case 1:
		Trans.Fun[0](D0, D1, D2, S0, S1, S2);
		break;
	case 2:
		{
			num T0, T1, T2;
			Trans.Fun[0](&T0, &T1, &T2, S0, S1, S2);
			Trans.Fun[1](D0, D1, D2, T0, T1, T2);
		}
		break;
	default:
		*D0 = S0;
		*D1 = S1;
		*D2 = S2;
		break;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movsd %xmm0, -0x20(%rbp)
movsd %xmm1, -0x28(%rbp)
movsd %xmm2, -0x30(%rbp)
movl (%rax), %eax
movl %eax, -0x4c(%rbp)
subl $0x1, %eax
je 0xb971
jmp 0xb967
movl -0x4c(%rbp), %eax
subl $0x2, %eax
je 0xb998
jmp 0xb9e4
movq -0x58(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movsd -0x20(%rbp), %xmm0
movsd -0x28(%rbp), %xmm1
movsd -0x30(%rbp), %xmm2
callq *%rax
jmp 0xba0b
movq -0x58(%rbp), %rax
movq 0x8(%rax), %rax
movsd -0x20(%rbp), %xmm0
movsd -0x28(%rbp), %xmm1
movsd -0x30(%rbp), %xmm2
leaq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %rsi
leaq -0x48(%rbp), %rdx
callq *%rax
movq -0x58(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movsd -0x38(%rbp), %xmm0
movsd -0x40(%rbp), %xmm1
movsd -0x48(%rbp), %xmm2
callq *%rax
jmp 0xba0b
movsd -0x20(%rbp), %xmm0
movq -0x8(%rbp), %rax
movsd %xmm0, (%rax)
movsd -0x28(%rbp), %xmm0
movq -0x10(%rbp), %rax
movsd %xmm0, (%rax)
movsd -0x30(%rbp), %xmm0
movq -0x18(%rbp), %rax
movsd %xmm0, (%rax)
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rishabh-battulwar[P]imageprocessing/./include/ImageProc.h
// Function: ImageProc::oil_painting(char const*, char const*, int, int, int)
void ImageProc::oil_painting(const char *infile, const char *outfile, int width, int height, int window_size)
{
	Image img_orig("color", width, height);
	Image img_oil("color", width, height);

	img_orig.read_image(infile, img_orig.cols, img_orig.rows);
	oil_paint_filter(img_orig, img_oil, window_size);

	img_oil.write_image(outfile, img_oil.cols, img_oil.rows);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
leaq 0xfc1e(%rip), %rsi      # 0x1c5e8
movq %rsi, -0x78(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x7eb0
movq -0x78(%rbp), %rsi
movl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
leaq -0x60(%rbp), %rdi
callq 0x7eb0
jmp 0xc9ec
movq -0x8(%rbp), %rsi
movl -0x38(%rbp), %edx
movl -0x34(%rbp), %ecx
leaq -0x40(%rbp), %rdi
callq 0x7f70
jmp 0xca01
movl -0x1c(%rbp), %edx
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0xca80
jmp 0xca13
movq -0x10(%rbp), %rsi
movl -0x58(%rbp), %edx
movl -0x54(%rbp), %ecx
leaq -0x60(%rbp), %rdi
callq 0x8150
jmp 0xca28
leaq -0x60(%rbp), %rdi
callq 0x1b2c0
leaq -0x40(%rbp), %rdi
callq 0x1b2c0
addq $0x80, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0xca66
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x1b2c0
leaq -0x40(%rbp), %rdi
callq 0x1b2c0
movq -0x68(%rbp), %rdi
callq 0x2360
nopl (%rax,%rax)
// File: rishabh-battulwar[P]imageprocessing/./include/ImageProc.h
// Function: ImageProc::film_special_effect(char const*, char const*, int, int)
void ImageProc::film_special_effect(const char *infile, const char *outfile, int width, int height)
{
	Image img_orig("color", width, height);
	Image img_film("color", width, height);

	img_orig.read_image(infile, img_orig.cols, img_orig.rows);
	film_effect_filter(img_orig, img_film);

	img_film.write_image(outfile, img_film.cols, img_film.rows);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
leaq 0xf6d5(%rip), %rsi      # 0x1c5e8
movq %rsi, -0x70(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x7eb0
movq -0x70(%rbp), %rsi
movl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
leaq -0x58(%rbp), %rdi
callq 0x7eb0
jmp 0xcf35
movq -0x8(%rbp), %rsi
movl -0x30(%rbp), %edx
movl -0x2c(%rbp), %ecx
leaq -0x38(%rbp), %rdi
callq 0x7f70
jmp 0xcf4a
leaq -0x38(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0xcfc0
jmp 0xcf59
movq -0x10(%rbp), %rsi
movl -0x50(%rbp), %edx
movl -0x4c(%rbp), %ecx
leaq -0x58(%rbp), %rdi
callq 0x8150
jmp 0xcf6e
leaq -0x58(%rbp), %rdi
callq 0x1b2c0
leaq -0x38(%rbp), %rdi
callq 0x1b2c0
addq $0x70, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0xcfa9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x1b2c0
leaq -0x38(%rbp), %rdi
callq 0x1b2c0
movq -0x60(%rbp), %rdi
callq 0x2360
nopl (%rax,%rax)
// File: rishabh-battulwar[P]imageprocessing/./include/ImageProc.h
// Function: ImageProc::get_PSNR(Image&, Image&)
float ImageProc::get_PSNR(Image &img_orig, Image &img_modified)
{
	float MSE = get_MSE(img_orig, img_modified);
	float Max = 255.0;
	float PSNR = 10.0*log10(pow(Max,2.0)/MSE);
	return PSNR;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0xf250
movss %xmm0, -0x14(%rbp)
movss 0xe042(%rip), %xmm0     # 0x1c5cc
movss %xmm0, -0x18(%rbp)
movss -0x18(%rbp), %xmm0
movsd 0xdca4(%rip), %xmm1     # 0x1c240
callq 0x1b310
movss -0x14(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
divsd %xmm1, %xmm0
callq 0x20f0
movaps %xmm0, %xmm1
movsd 0xdf1a(%rip), %xmm0     # 0x1c4d8
mulsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x1c(%rbp)
movss -0x1c(%rbp), %xmm0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rishabh-battulwar[P]imageprocessing/./include/ImageProc.h
// Function: ImageProc::mergesort(int*, int, int)
void ImageProc::mergesort(int *a, int low, int high)
{
	int mid;
	if (low < high)
	{
		mid = (low + high) / 2;
		mergesort(a, low, mid);
		mergesort(a, mid + 1, high);
		merge(a, low, high, mid);
	}
	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0xf18e
movl -0xc(%rbp), %eax
addl -0x10(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x14(%rbp), %edx
callq 0xf130
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
addl $0x1, %esi
movl -0x10(%rbp), %edx
callq 0xf130
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
movl -0x14(%rbp), %ecx
callq 0xf350
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rishabh-battulwar[P]imageprocessing/./include/ImageProc.h
// Function: ImageProc::get_median(int*, int)
int ImageProc::get_median(int *sorted_array, int size)
{
	// Middle or average of middle values in the sorted array.
	int median = 0.0;
	if ((size % 2) == 0) {
		median = (int)((sorted_array[size / 2] + sorted_array[(size / 2) - 1]) / 2.0);
	}
	else {
		median = sorted_array[size / 2];
	}

	return median;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movl -0xc(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0xf21a
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0xc(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rcx
movl -0xc(%rbp), %eax
movl $0x2, %esi
cltd
idivl %esi
movl %eax, %edx
movl -0x14(%rbp), %eax
subl $0x1, %edx
movslq %edx, %rdx
addl (%rcx,%rdx,4), %eax
cvtsi2sd %eax, %xmm0
movsd 0xd033(%rip), %xmm1     # 0x1c240
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x10(%rbp)
jmp 0xf23c
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movl -0xc(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rishabh-battulwar[P]imageprocessing/./include/ImageProc.h
// Function: ImageProc::get_MSE(Image&, Image&)
float ImageProc::get_MSE(Image &img_orig, Image &img_modified)
{
	float sum = 0.0, MSE;
	for(int i = 0; i < img_orig.rows; i++)
		for(int j = 0; j < img_orig.cols; j++)
			sum += pow((img_modified.getvalue(i,j,0) - img_orig.getvalue(i,j,0)),2);

	MSE = sum / (img_modified.rows * img_modified.cols);
	std::cout << MSE << std::endl;
	return MSE;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x14(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jge 0xf2f6
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0xf2e6
movq -0x10(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl -0x20(%rbp), %edx
xorl %ecx, %ecx
callq 0x83b0
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %esi
movl -0x20(%rbp), %edx
xorl %ecx, %ecx
callq 0x83b0
movl -0x24(%rbp), %edi
subl %eax, %edi
movl $0x2, %esi
callq 0x1b340
movaps %xmm0, %xmm1
movss -0x14(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x14(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0xf282
jmp 0xf2e8
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xf26f
movss -0x14(%rbp), %xmm0
movq -0x10(%rbp), %rax
movl 0xc(%rax), %eax
movq -0x10(%rbp), %rcx
imull 0x8(%rcx), %eax
cvtsi2ss %eax, %xmm1
divss %xmm1, %xmm0
movss %xmm0, -0x18(%rbp)
movss -0x18(%rbp), %xmm0
movq 0x11ca5(%rip), %rdi     # 0x20fc8
callq 0x2140
movq %rax, %rdi
movq 0x11c86(%rip), %rsi     # 0x20fb8
callq 0x21e0
movss -0x18(%rbp), %xmm0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rishabh-battulwar[P]imageprocessing/./include/ImageProc.h
// Function: ImageProc::merge(int*, int, int, int)
void ImageProc::merge(int *a, int low, int high, int mid)
{
	int i, j, k, c[50];
	i = low;
	k = low;
	j = mid + 1;
	while (i <= mid && j <= high)
	{
		if (a[i] < a[j])
		{
			c[k] = a[i];
			k++;	i++;
		}
		else
		{
			c[k] = a[j];
			k++;	j++;
		}
	}
	while (i <= mid)
	{
		c[k] = a[i];
		k++;	i++;
	}
	while (j <= high)
	{
		c[k] = a[j];
		k++;	j++;
	}
	for (i = low; i < k; i++)
	{
		a[i] = c[i];
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movl -0x18(%rbp), %ecx
xorl %eax, %eax
cmpl -0x14(%rbp), %ecx
movb %al, -0xf1(%rbp)
jg 0xf39c
movl -0x1c(%rbp), %eax
cmpl -0x10(%rbp), %eax
setle %al
movb %al, -0xf1(%rbp)
movb -0xf1(%rbp), %al
testb $0x1, %al
jne 0xf3a8
jmp 0xf417
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x8(%rbp), %rcx
movslq -0x1c(%rbp), %rdx
cmpl (%rcx,%rdx,4), %eax
jge 0xf3ea
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %ecx
movslq -0x20(%rbp), %rax
movl %ecx, -0xf0(%rbp,%rax,4)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xf412
movq -0x8(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl (%rax,%rcx,4), %ecx
movslq -0x20(%rbp), %rax
movl %ecx, -0xf0(%rbp,%rax,4)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xf37d
jmp 0xf419
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jg 0xf44b
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %ecx
movslq -0x20(%rbp), %rax
movl %ecx, -0xf0(%rbp,%rax,4)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xf419
jmp 0xf44d
movl -0x1c(%rbp), %eax
cmpl -0x10(%rbp), %eax
jg 0xf47f
movq -0x8(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movl (%rax,%rcx,4), %ecx
movslq -0x20(%rbp), %rax
movl %ecx, -0xf0(%rbp,%rax,4)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0xf44d
movl -0xc(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0xf4ae
movslq -0x18(%rbp), %rax
movl -0xf0(%rbp,%rax,4), %edx
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xf485
addq $0x80, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: rishabh-battulwar[P]imageprocessing/./include/ImageProc.h
// Function: ImageProc::apply_non_local_mean(char const*, char const*, int, int, int, int, int, int)
void ImageProc::apply_non_local_mean(const char *infile, const char *outfile, int width, int height, int window_size, int region_size, int sigma, int h)
{
	Image img_orig("color", width, height);
	Image img_modified("color", width, height);
	img_orig.read_image(infile, img_orig.cols, img_orig.rows);

	non_local_mean(img_orig, img_modified, window_size, region_size, sigma, h);

	img_modified.write_image(outfile, img_modified.cols, img_modified.rows);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movl %r9d, -0x20(%rbp)
movl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
leaq 0xc644(%rip), %rsi      # 0x1c5e8
movq %rsi, -0x78(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x7eb0
movq -0x78(%rbp), %rsi
movl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
leaq -0x60(%rbp), %rdi
callq 0x7eb0
jmp 0xffc6
movq -0x8(%rbp), %rsi
movl -0x38(%rbp), %edx
movl -0x34(%rbp), %ecx
leaq -0x40(%rbp), %rdi
callq 0x7f70
jmp 0xffdb
movl -0x1c(%rbp), %edx
movl -0x20(%rbp), %ecx
movl 0x10(%rbp), %r8d
movl 0x18(%rbp), %r9d
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x10060
jmp 0xfff8
movq -0x10(%rbp), %rsi
movl -0x58(%rbp), %edx
movl -0x54(%rbp), %ecx
leaq -0x60(%rbp), %rdi
callq 0x8150
jmp 0x1000d
leaq -0x60(%rbp), %rdi
callq 0x1b2c0
leaq -0x40(%rbp), %rdi
callq 0x1b2c0
addq $0x80, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x1004b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x1b2c0
leaq -0x40(%rbp), %rdi
callq 0x1b2c0
movq -0x68(%rbp), %rdi
callq 0x2360
nopl (%rax)
// File: rishabh-battulwar[P]imageprocessing/./include/ImageProc.h
// Function: ImageProc::apply_sobel_operator(char const*, char const*, int, int, int)
void ImageProc::apply_sobel_operator(const char *infile, const char *outfile, int width, int height, int percentage)
{
	Image img_orig("bw", width, height);
	Image img_edge_map("bw", width, height);


	img_orig.read_image(infile, img_orig.cols, img_orig.rows);

	sobel_edge_detector(img_orig, img_edge_map, percentage);

	img_edge_map.write_image(outfile, img_edge_map.cols, img_edge_map.rows);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
leaq 0xc93a(%rip), %rsi      # 0x1d5d4
movq %rsi, -0x78(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x7eb0
movq -0x78(%rbp), %rsi
movl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
leaq -0x60(%rbp), %rdi
callq 0x7eb0
jmp 0x10cbc
movq -0x8(%rbp), %rsi
movl -0x38(%rbp), %edx
movl -0x34(%rbp), %ecx
leaq -0x40(%rbp), %rdi
callq 0x7f70
jmp 0x10cd1
movl -0x1c(%rbp), %edx
leaq -0x40(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x10d50
jmp 0x10ce3
movq -0x10(%rbp), %rsi
movl -0x58(%rbp), %edx
movl -0x54(%rbp), %ecx
leaq -0x60(%rbp), %rdi
callq 0x8150
jmp 0x10cf8
leaq -0x60(%rbp), %rdi
callq 0x1b2c0
leaq -0x40(%rbp), %rdi
callq 0x1b2c0
addq $0x80, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x10d36
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x1b2c0
leaq -0x40(%rbp), %rdi
callq 0x1b2c0
movq -0x68(%rbp), %rdi
callq 0x2360
nopl (%rax,%rax)
// File: rishabh-battulwar[P]imageprocessing/./include/ImageProc.h
// Function: ImageProc::func_gradient(int**, Image&, int, int, int, int)
int ImageProc::func_gradient(int **operator_mask, Image &img_orig, int x, int y, int z, int window_size)
{
	int result = 0;
	for(int m = -window_size/2, p = 0; m <= window_size/2; m++, p++)
		for(int n = -window_size/2, q = 0; n <= window_size/2; n++, q++)
		{
			result += img_orig.getvalue((x+m),(y+n),z) * operator_mask[p][q];
		}

	return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movl %r9d, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
xorl %eax, %eax
subl -0x20(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x38(%rbp)
movl -0x20(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x38(%rbp), %eax
cmpl %ecx, %eax
jg 0x11e9a
xorl %eax, %eax
subl -0x20(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x20(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x3c(%rbp), %eax
cmpl %ecx, %eax
jg 0x11e81
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
addl -0x28(%rbp), %esi
movl -0x18(%rbp), %edx
addl -0x30(%rbp), %edx
movl -0x1c(%rbp), %ecx
callq 0x83b0
movq -0x8(%rbp), %rcx
movslq -0x2c(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movslq -0x34(%rbp), %rdx
imull (%rcx,%rdx,4), %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x11e21
jmp 0x11e83
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x11dec
movl -0x24(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rishabh-battulwar[P]imageprocessing/./include/ImageProc.h
// Function: ImageProc::get_histogram(Image&, int*)
void ImageProc::get_histogram(Image &img_orig, int histogram_bins[256])
{
	for(int i = 0; i < 256; i++)
	{
		histogram_bins[i] = 0;
	}

	for(int i = 0; i < img_orig.rows; i++)
		for(int j = 0; j < img_orig.cols; j++)
			if((img_orig.getvalue(i,j,0) >= 0) && (img_orig.getvalue(i,j,0) < 256))
				histogram_bins[img_orig.getvalue(i,j,0)]++;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0x100, -0x14(%rbp)     # imm = 0x100
jge 0x11eea
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl $0x0, (%rax,%rcx,4)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x11ec7
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jge 0x11f8a
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x11f7a
movq -0x8(%rbp), %rdi
movl -0x18(%rbp), %esi
movl -0x1c(%rbp), %edx
xorl %ecx, %ecx
callq 0x83b0
cmpl $0x0, %eax
jl 0x11f6d
movq -0x8(%rbp), %rdi
movl -0x18(%rbp), %esi
movl -0x1c(%rbp), %edx
xorl %ecx, %ecx
callq 0x83b0
cmpl $0x100, %eax            # imm = 0x100
jge 0x11f6d
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movl -0x18(%rbp), %esi
movl -0x1c(%rbp), %edx
xorl %ecx, %ecx
callq 0x83b0
movl %eax, %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
movl (%rax,%rcx,4), %edx
addl $0x1, %edx
movl %edx, (%rax,%rcx,4)
jmp 0x11f6f
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x11f08
jmp 0x11f7c
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x11ef1
addq $0x30, %rsp
popq %rbp
retq
// File: rishabh-battulwar[P]imageprocessing/./include/ImageProc.h
// Function: ImageProc::apply_LoG_operator(char const*, char const*, int, int)
void ImageProc::apply_LoG_operator(const char *infile, const char *outfile, int width, int height)
{
	Image img_orig("bw", width, height);
	Image img_modified("bw", width, height);
	img_orig.read_image(infile, img_orig.cols, img_orig.rows);

	LoG_edge_detector(img_orig, img_modified);

	img_modified.write_image(outfile, img_modified.cols, img_modified.rows);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
leaq 0xb5c1(%rip), %rsi      # 0x1d5d4
movq %rsi, -0x70(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x7eb0
movq -0x70(%rbp), %rsi
movl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
leaq -0x58(%rbp), %rdi
callq 0x7eb0
jmp 0x12035
movq -0x8(%rbp), %rsi
movl -0x30(%rbp), %edx
movl -0x2c(%rbp), %ecx
leaq -0x38(%rbp), %rdi
callq 0x7f70
jmp 0x1204a
leaq -0x38(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x120c0
jmp 0x12059
movq -0x10(%rbp), %rsi
movl -0x50(%rbp), %edx
movl -0x4c(%rbp), %ecx
leaq -0x58(%rbp), %rdi
callq 0x8150
jmp 0x1206e
leaq -0x58(%rbp), %rdi
callq 0x1b2c0
leaq -0x38(%rbp), %rdi
callq 0x1b2c0
addq $0x70, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x120a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x1b2c0
leaq -0x38(%rbp), %rdi
callq 0x1b2c0
movq -0x60(%rbp), %rdi
callq 0x2360
nopl (%rax,%rax)
// File: rishabh-battulwar[P]imageprocessing/./include/ImageProc.h
// Function: ImageProc::func_gradient_float(float**, Image&, int, int, int, int)
float ImageProc::func_gradient_float(float **operator_mask, Image &img_orig, int x, int y, int z, int window_size)
{
	float result = 0.0;
	for(int m = -window_size/2, p = 0; m <= window_size/2; m++, p++)
		for(int n = -window_size/2, q = 0; n <= window_size/2; n++, q++)
		{
			result += (1.0 * img_orig.getvalue((x+m),(y+n),z) * operator_mask[p][q]);
		}

	return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movl %r9d, -0x20(%rbp)
xorps %xmm0, %xmm0
movss %xmm0, -0x24(%rbp)
xorl %eax, %eax
subl -0x20(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x28(%rbp), %eax
movl %eax, -0x38(%rbp)
movl -0x20(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x38(%rbp), %eax
cmpl %ecx, %eax
jg 0x12f57
xorl %eax, %eax
subl -0x20(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x30(%rbp), %eax
movl %eax, -0x3c(%rbp)
movl -0x20(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x3c(%rbp), %eax
cmpl %ecx, %eax
jg 0x12f3e
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
addl -0x28(%rbp), %esi
movl -0x18(%rbp), %edx
addl -0x30(%rbp), %edx
movl -0x1c(%rbp), %ecx
callq 0x83b0
cvtsi2sd %eax, %xmm1
movsd 0x9378(%rip), %xmm0     # 0x1c268
mulsd %xmm1, %xmm0
movq -0x8(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movslq -0x34(%rbp), %rcx
movss (%rax,%rcx,4), %xmm1
cvtss2sd %xmm1, %xmm2
movss -0x24(%rbp), %xmm1
cvtss2sd %xmm1, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x24(%rbp)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x12eb2
jmp 0x12f40
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x12e7d
movss -0x24(%rbp), %xmm0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rishabh-battulwar[P]imageprocessing/./include/ImageProc.h
// Function: ImageProc::halftone_fixed_thresh(Image&, Image&)
void ImageProc::halftone_fixed_thresh(Image &img_orig, Image &img_modified)
{
	for(int i = 0; i < img_modified.rows; i++)
		for(int j = 0; j < img_modified.cols; j++)
			for(int k = 0; k < img_modified.channels; k++)
				if(img_orig.getvalue(i,j,k) <= 127)	img_modified.setvalue(i,j,k,0  );
				else								img_modified.setvalue(i,j,k,255);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jge 0x134fd
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x134ed
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jge 0x134e0
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
movl -0x1c(%rbp), %ecx
callq 0x83b0
cmpl $0x7f, %eax
jg 0x134bb
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
movl -0x1c(%rbp), %ecx
xorl %r8d, %r8d
callq 0x83f0
jmp 0x134d3
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
movl -0x1c(%rbp), %ecx
movl $0xff, %r8d
callq 0x83f0
jmp 0x134d5
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x13481
jmp 0x134e2
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x1346e
jmp 0x134ef
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x13457
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rishabh-battulwar[P]imageprocessing/./include/ImageProc.h
// Function: ImageProc::halftone_random_thresh(Image&, Image&)
void ImageProc::halftone_random_thresh(Image &img_orig, Image &img_modified)
{
	srand(time(0));
	for(int i = 0; i < img_modified.rows; i++)
		for(int j = 0; j < img_modified.cols; j++)
			for(int k = 0; k < img_modified.channels; k++)
				if(img_orig.getvalue(i,j,k) <= rand() % 255)	img_modified.setvalue(i,j,k,0  );
				else											img_modified.setvalue(i,j,k,255);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x2190
movl %eax, %edi
callq 0x21b0
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jge 0x135f6
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x135e6
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x10(%rcx), %eax
jge 0x135d6
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
movl -0x1c(%rbp), %ecx
callq 0x83b0
movl %eax, -0x20(%rbp)
callq 0x2090
movl $0xff, %ecx
cltd
idivl %ecx
movl -0x20(%rbp), %eax
cmpl %edx, %eax
jg 0x135b1
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
movl -0x1c(%rbp), %ecx
xorl %r8d, %r8d
callq 0x83f0
jmp 0x135c9
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
movl -0x1c(%rbp), %ecx
movl $0xff, %r8d
callq 0x83f0
jmp 0x135cb
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x13565
jmp 0x135d8
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x1354e
jmp 0x135e8
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x13537
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: rishabh-battulwar[P]imageprocessing/./include/ImageProc.h
// Function: ImageProc::color_halftoning(char const*, char const*, int, int)
void ImageProc::color_halftoning(const char *infile, const char *outfile, int width, int height)
{
	Image img_orig("color", width, height);
	Image img_modified("color", width, height);
	img_orig.read_image(infile, img_orig.cols, img_orig.rows);

	error_diffusion(img_orig, img_modified);
	//mbvq_error_diffusion(img_orig, img_modified);

	img_modified.write_image(outfile, img_modified.cols, img_modified.rows);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
leaq 0x8322(%rip), %rsi      # 0x1c5e8
movq %rsi, -0x70(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x7eb0
movq -0x70(%rbp), %rsi
movl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
leaq -0x58(%rbp), %rdi
callq 0x7eb0
jmp 0x142e8
movq -0x8(%rbp), %rsi
movl -0x30(%rbp), %edx
movl -0x2c(%rbp), %ecx
leaq -0x38(%rbp), %rdi
callq 0x7f70
jmp 0x142fd
leaq -0x38(%rbp), %rdi
leaq -0x58(%rbp), %rsi
movq %rsi, -0x78(%rbp)
callq 0x13950
movq -0x78(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x50(%rbp), %edx
movl -0x4c(%rbp), %ecx
callq 0x8150
jmp 0x14323
leaq -0x58(%rbp), %rdi
callq 0x1b2c0
leaq -0x38(%rbp), %rdi
callq 0x1b2c0
addq $0x80, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x14361
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x1b2c0
leaq -0x38(%rbp), %rdi
callq 0x1b2c0
movq -0x60(%rbp), %rdi
callq 0x2360
nopw %cs:(%rax,%rax)
// File: rishabh-battulwar[P]imageprocessing/./include/ImageProc.h
// Function: ImageProc::rgb2cielab(Image&, Image&)
void ImageProc::rgb2cielab(Image &img_orig, Image &img_modified)
{
	double L,A,B,r,g,b;
	for(int i = 0; i < img_orig.rows; i++)
		for(int j = 0; j < img_orig.cols; j++)
		{
			r = (double)(img_orig.getvalue(i,j,0)/255.0);
			g = (double)(img_orig.getvalue(i,j,1)/255.0);
			b = (double)(img_orig.getvalue(i,j,2)/255.0);
			Rgb2Lab(&L,&A,&B,r,g,b);
			//std::cout << L << " " << A << " " << B <<std::endl;
			img_modified.setvalue(i,j,0,(unsigned char)(L));
			img_modified.setvalue(i,j,1,(unsigned char)(A));
			img_modified.setvalue(i,j,2,(unsigned char)(B));
			//std::cout << img_modified.getvalue(i,j,0) << " " << img_modified.getvalue(i,j,1) << " " << img_modified.getvalue(i,j,2)<<std::endl;
		}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jge 0x1702c
movl $0x0, -0x48(%rbp)
movl -0x48(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x1701c
movq -0x8(%rbp), %rdi
movl -0x44(%rbp), %esi
movl -0x48(%rbp), %edx
xorl %ecx, %ecx
movl %ecx, -0x50(%rbp)
callq 0x83b0
cvtsi2sd %eax, %xmm0
movsd 0x558a(%rip), %xmm1     # 0x1c4c8
movsd %xmm1, -0x58(%rbp)
divsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movl -0x44(%rbp), %esi
movl -0x48(%rbp), %edx
movl $0x1, %ecx
movl %ecx, -0x4c(%rbp)
callq 0x83b0
movsd -0x58(%rbp), %xmm1
cvtsi2sd %eax, %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movl -0x44(%rbp), %esi
movl -0x48(%rbp), %edx
movl $0x2, %ecx
callq 0x83b0
movsd -0x58(%rbp), %xmm1
cvtsi2sd %eax, %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x40(%rbp)
movsd -0x30(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
movsd -0x40(%rbp), %xmm2
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
leaq -0x28(%rbp), %rdx
callq 0xae90
movl -0x50(%rbp), %ecx
movq -0x10(%rbp), %rdi
movl -0x44(%rbp), %esi
movl -0x48(%rbp), %edx
cvttsd2si -0x18(%rbp), %eax
movzbl %al, %r8d
callq 0x83f0
movl -0x4c(%rbp), %ecx
movq -0x10(%rbp), %rdi
movl -0x44(%rbp), %esi
movl -0x48(%rbp), %edx
cvttsd2si -0x20(%rbp), %eax
movzbl %al, %r8d
callq 0x83f0
movq -0x10(%rbp), %rdi
movl -0x44(%rbp), %esi
movl -0x48(%rbp), %edx
cvttsd2si -0x28(%rbp), %eax
movzbl %al, %r8d
movl $0x2, %ecx
callq 0x83f0
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x16f0e
jmp 0x1701e
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x16ef7
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: rishabh-battulwar[P]imageprocessing/./include/ImageProc.h
// Function: ImageProc::apply_binarization(char const*, char const*, int, int)
void ImageProc::apply_binarization(const char* infile, const char *outfile, int width, int height)
{
	Image img_orig_bw("bw", width, height);
	Image img_binary("bw", width, height);

	img_orig_bw.read_image(infile, img_orig_bw.cols, img_orig_bw.rows);
	//unsharp_mask(img_orig_bw, img_unsharp_masked);
	otsu_th(img_orig_bw, img_binary);
	img_binary.write_image(outfile, img_binary.cols, img_binary.rows);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
leaq 0x3811(%rip), %rsi      # 0x1d5d4
movq %rsi, -0x70(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x7eb0
movq -0x70(%rbp), %rsi
movl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
leaq -0x58(%rbp), %rdi
callq 0x7eb0
jmp 0x19de5
movq -0x8(%rbp), %rsi
movl -0x30(%rbp), %edx
movl -0x2c(%rbp), %ecx
leaq -0x38(%rbp), %rdi
callq 0x7f70
jmp 0x19dfa
leaq -0x38(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x17590
jmp 0x19e09
movq -0x10(%rbp), %rsi
movl -0x50(%rbp), %edx
movl -0x4c(%rbp), %ecx
leaq -0x58(%rbp), %rdi
callq 0x8150
jmp 0x19e1e
leaq -0x58(%rbp), %rdi
callq 0x1b2c0
leaq -0x38(%rbp), %rdi
callq 0x1b2c0
addq $0x70, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x19e59
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x1b2c0
leaq -0x38(%rbp), %rdi
callq 0x1b2c0
movq -0x60(%rbp), %rdi
callq 0x2360
nopl (%rax,%rax)
// File: ctz[P]openssl-bench/bench.cc
// Function: usage()
static int usage() {
  puts("usage: bench [--threads N] [--rsa|--ecdsa] "
       "<handshake|handshake-resume|handshake-ticket> <suite>");
  puts("usage: bench [--threads N] bulk <suite> <plaintext-size>");
  puts("usage: bench memory <count>");
  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0xa611(%rip), %rdi      # 0xe0ac
callq 0x34f0
leaq 0xa666(%rip), %rdi      # 0xe10d
callq 0x34f0
leaq 0xa693(%rip), %rdi      # 0xe146
callq 0x34f0
movl $0x1, %eax
popq %rbp
retq
nop
// File: ctz[P]openssl-bench/bench.cc
// Function: rounds_for_bulk_test(unsigned long)
static size_t rounds_for_bulk_test(const size_t plaintext_size) {

  const size_t total_data = apply_work_multiplier(
      plaintext_size < 8192 ? (64 * 1024 * 1024) : (1024 * 1024 * 1024));
  const size_t rounds = total_data / plaintext_size;
  return rounds;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdx
movl $0x40000000, %eax       # imm = 0x40000000
movl $0x4000000, %ecx        # imm = 0x4000000
cmpq $0x2000, %rdx           # imm = 0x2000
cmovbl %ecx, %eax
movslq %eax, %rdi
callq 0x5340
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq -0x8(%rbp)
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: ctz[P]openssl-bench/bench.cc
// Function: apply_work_multiplier(unsigned long)
static size_t apply_work_multiplier(size_t work) {
  const char *multiplier = getenv("BENCH_MULTIPLIER");
  if (multiplier) {
    return size_t(work * atof(multiplier));
  }
  return work;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
leaq 0x8ffa(%rip), %rdi      # 0xe34d
callq 0x3400
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x53d0
movaps 0x8ca6(%rip), %xmm1     # 0xe010
movq -0x10(%rbp), %xmm0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x8ca5(%rip), %xmm1     # 0xe020
subpd %xmm1, %xmm0
movaps %xmm0, %xmm1
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm1, %xmm0
movsd %xmm0, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x3420
movaps %xmm0, %xmm1
movsd -0x20(%rbp), %xmm0
mulsd %xmm1, %xmm0
movaps %xmm0, %xmm1
cvttsd2si %xmm1, %rax
movq %rax, %rdx
sarq $0x3f, %rdx
movsd 0x8c7d(%rip), %xmm1     # 0xe038
subsd %xmm1, %xmm0
cvttsd2si %xmm0, %rcx
andq %rdx, %rcx
orq %rcx, %rax
movq %rax, -0x8(%rbp)
jmp 0x53d8
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: ctz[P]openssl-bench/bench.cc
// Function: get_time()
static double get_time() {
  timeval tv;
  gettimeofday(&tv, NULL);

  double v = tv.tv_sec;
  v += double(tv.tv_usec) / 1.e6;
  return v;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x3540
cvtsi2sdq -0x10(%rbp), %xmm0
movsd %xmm0, -0x18(%rbp)
cvtsi2sdq -0x8(%rbp), %xmm0
movsd 0x8c22(%rip), %xmm1     # 0xe040
divsd %xmm1, %xmm0
addsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x18(%rbp)
movsd -0x18(%rbp), %xmm0
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: ctz[P]openssl-bench/bench.cc
// Function: chkerr(int)
static bool chkerr(int err) {
  if (err == SSL_ERROR_SYSCALL || err == SSL_ERROR_SSL) {
    ERR_print_errors_fp(stdout);
    puts("error");
    exit(1);
    return true;
  }
  return err == 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
cmpl $0x5, -0x4(%rbp)
je 0x5457
cmpl $0x1, -0x4(%rbp)
jne 0x547c
movq 0x10b6a(%rip), %rax     # 0x15fc8
movq (%rax), %rdi
callq 0x31b0
leaq 0x8f0b(%rip), %rdi      # 0xe378
callq 0x34f0
movl $0x1, %edi
callq 0x33f0
cmpl $0x0, -0x4(%rbp)
sete %al
andb $0x1, %al
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: ctz[P]openssl-bench/bench.cc
// Function: do_handshake_step(Conn&, Conn&)
static bool do_handshake_step(Conn &client, Conn &server) {
  bool s_connected = server.accept();
  bool c_connected = client.connect();

  if (s_connected && c_connected) {
    return false;
  }

  client.transfer_to(server);
  server.transfer_to(client);
  return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0xaa10
andb $0x1, %al
movb %al, -0x19(%rbp)
movq -0x10(%rbp), %rdi
callq 0xaa50
andb $0x1, %al
movb %al, -0x1a(%rbp)
testb $0x1, -0x19(%rbp)
je 0x54ce
testb $0x1, -0x1a(%rbp)
je 0x54ce
movb $0x0, -0x1(%rbp)
jmp 0x54ec
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x7b80
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x7b80
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: ctz[P]openssl-bench/bench.cc
// Function: new_session_cb(ssl_st*, ssl_session_st*)
static int new_session_cb(SSL *ssl, SSL_SESSION *sess) {
  Conn *conn = (Conn *)SSL_get_app_data(ssl);
  if (conn) {
    return conn->save_one_session(sess);
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
xorl %esi, %esi
callq 0x3120
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x5e98
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xbda0
movl %eax, -0x4(%rbp)
jmp 0x5e9f
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: ctz[P]openssl-bench/bench.cc
// Function: Context::set_ciphers(char const*)
void set_ciphers(const char *ciphers) {
    if (!strcmp(ciphers, "TLS_AES_128_GCM_SHA256") ||
        !strcmp(ciphers, "TLS_AES_256_GCM_SHA384") ||
        !strcmp(ciphers, "TLS_CHACHA20_POLY1305_SHA256")) {
      set_version(TLS1_3_VERSION, TLS1_3_VERSION);
#ifndef BORINGSSL
      SSL_CTX_set_ciphersuites(m_ctx, ciphers);
#else
      // boringssl does not have any direct way to configure TLS1.3 cipher
      // suites. however, it does have "compliance policies" which give limited
      // control over their order, and a configuration switch for pretending
      // hardware-accelerated AES is absent -- which prioritises chacha.
      //
      // So we can arrange for one ciphersuite, as follows:
      //
      // - TLS_CHACHA20_POLY1305_SHA256:
      // `SSL_CTX_set_aes_hw_override_for_testing(ctx, false)`
      // - TLS_AES_128_GCM_SHA256: the default
      // - TLS_AES_256_GCM_SHA384: `SSL_CTX_set_compliance_policy(ctx,
      // ssl_compliance_policy_cnsa_202407)`
      if (!strcmp(ciphers, "TLS_AES_256_GCM_SHA384")) {
        SSL_CTX_set_compliance_policy(m_ctx, ssl_compliance_policy_cnsa_202407);
      } else if (!strcmp(ciphers, "TLS_CHACHA20_POLY1305_SHA256")) {
        bssl::SSL_CTX_set_aes_hw_override_for_testing(m_ctx, false);
      } else {
        assert(!strcmp(ciphers, "TLS_AES_128_GCM_SHA256"));
      }
#endif
    } else {
      set_version(TLS1_2_VERSION, TLS1_2_VERSION);
      SSL_CTX_set_cipher_list(m_ctx, ciphers);
    }
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x820f(%rip), %rsi      # 0xe162
callq 0x3490
cmpl $0x0, %eax
je 0x5f87
movq -0x10(%rbp), %rdi
leaq 0x8211(%rip), %rsi      # 0xe179
callq 0x3490
cmpl $0x0, %eax
je 0x5f87
movq -0x10(%rbp), %rdi
leaq 0x8213(%rip), %rsi      # 0xe190
callq 0x3490
cmpl $0x0, %eax
jne 0x5fa9
movq -0x18(%rbp), %rdi
movl $0x304, %edx            # imm = 0x304
movl %edx, %esi
callq 0x6200
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x33e0
jmp 0x5fc9
movq -0x18(%rbp), %rdi
movl $0x303, %edx            # imm = 0x303
movl %edx, %esi
callq 0x6200
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x32f0
addq $0x20, %rsp
popq %rbp
retq
nop