LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: kebwi[P]Trifid/src/FourierTransform.cpp
// Function: embedImageInPow2Bounds(Image3ChnlReal const&, int, int, Image3ChnlReal&, int&, int&)
bool embedImageInPow2Bounds(const Image3ChnlReal &img, int newWidth, int newHeight, Image3ChnlReal &imgOut, int &offsetX, int &offsetY)
{
	if (!assertValidDims(newWidth, newHeight))
		return false;
	
	imgOut.resize(newWidth, newHeight);
	int width = img.width(), height = img.height();
	offsetX = (newWidth - width) / 2;
	offsetY = (newHeight - height) / 2;
	
	//By default, an embedded odd-length signal will be positioned such that the center pixel
	//resides at lower right, but I prefer that it be at upper left, so shift it by one.
	if (width % 2 == 1)
		offsetX++;
	if (height % 2 == 1)
		offsetY++;
	
	for (int c = 0; c < 3; c++)
		for (int y = 0; y < height; y++)
			for (int x = 0; x < width; x++)
				(*imgOut[c])(x + offsetX, y + offsetY) = (*img[c])(x, y);
	
	return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movl -0x14(%rbp), %edi
movl -0x18(%rbp), %esi
callq 0x26640
testb $0x1, %al
jne 0x27ce6
movb $0x0, -0x1(%rbp)
jmp 0x27e20
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
movq (%rdi), %rax
callq *0x28(%rax)
movq -0x10(%rbp), %rdi
callq 0xedd0
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rdi
callq 0xedf0
movl %eax, -0x38(%rbp)
movl -0x14(%rbp), %eax
subl -0x34(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movl -0x18(%rbp), %eax
subl -0x38(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
movl -0x34(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
cmpl $0x1, %edx
jne 0x27d55
movq -0x28(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movl -0x38(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
cmpl $0x1, %edx
jne 0x27d70
movq -0x30(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movl $0x0, -0x3c(%rbp)
cmpl $0x3, -0x3c(%rbp)
jge 0x27e1c
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
cmpl -0x38(%rbp), %eax
jge 0x27e0c
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
cmpl -0x34(%rbp), %eax
jge 0x27dfc
movq -0x10(%rbp), %rdi
movl -0x3c(%rbp), %esi
callq 0x25920
movq %rax, %rdi
movl -0x44(%rbp), %esi
movl -0x40(%rbp), %edx
callq 0x1d980
movsd (%rax), %xmm0
movsd %xmm0, -0x50(%rbp)
movq -0x20(%rbp), %rdi
movl -0x3c(%rbp), %esi
callq 0xef40
movq %rax, %rdi
movl -0x44(%rbp), %esi
movq -0x28(%rbp), %rax
addl (%rax), %esi
movl -0x40(%rbp), %edx
movq -0x30(%rbp), %rax
addl (%rax), %edx
callq 0x16fd0
movsd -0x50(%rbp), %xmm0
movsd %xmm0, (%rax)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x27d97
jmp 0x27dfe
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x27d88
jmp 0x27e0e
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x27d77
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: kebwi[P]Trifid/src/FourierTransform.cpp
// Function: cropImage(ImageReal const&, int, int, int, int, ImageReal&)
void cropImage(const ImageReal &img, int newWidth, int newHeight, int offsetX, int offsetY, ImageReal &imgOut)
{
	int width = img.width(), height = img.height();
	assert(offsetX + newWidth <= width && offsetY + newHeight <= height);
	
	imgOut.resize(newWidth, newHeight);
	
	for (int y = 0; y < newHeight; y++)
		for (int x = 0; x < newWidth; x++)
			imgOut(x, y) = img(x + offsetX, y + offsetY);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl %r8d, -0x18(%rbp)
movq %r9, -0x20(%rbp)
movq -0x8(%rbp), %rdi
callq 0xedd0
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rdi
callq 0xedf0
movl %eax, -0x28(%rbp)
movl -0x14(%rbp), %ecx
addl -0xc(%rbp), %ecx
xorl %eax, %eax
cmpl -0x24(%rbp), %ecx
movb %al, -0x31(%rbp)
jg 0x27e84
movl -0x18(%rbp), %eax
addl -0x10(%rbp), %eax
cmpl -0x28(%rbp), %eax
setle %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0x27e8d
jmp 0x27e8f
jmp 0x27eae
leaq 0x23ecc(%rip), %rdi     # 0x4bd62
leaq 0x23db2(%rip), %rsi     # 0x4bc4f
movl $0x134, %edx            # imm = 0x134
leaq 0x23ef6(%rip), %rcx     # 0x4bd9f
callq 0x4240
movq -0x20(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
movq (%rdi), %rax
callq *0x28(%rax)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x27f2a
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x27f1d
movq -0x8(%rbp), %rdi
movl -0x30(%rbp), %esi
addl -0x14(%rbp), %esi
movl -0x2c(%rbp), %edx
addl -0x18(%rbp), %edx
callq 0x1d980
movsd (%rax), %xmm0
movsd %xmm0, -0x40(%rbp)
movq -0x20(%rbp), %rdi
movl -0x30(%rbp), %esi
movl -0x2c(%rbp), %edx
callq 0x16fd0
movsd -0x40(%rbp), %xmm0
movsd %xmm0, (%rax)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x27ed4
jmp 0x27f1f
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x27ec5
addq $0x40, %rsp
popq %rbp
retq
// File: kebwi[P]Trifid/src/FourierTransform.cpp
// Function: cropImage(Image3ChnlReal const&, int, int, int, int, Image3ChnlReal&)
void cropImage(const Image3ChnlReal &img, int newWidth, int newHeight, int offsetX, int offsetY, Image3ChnlReal &imgOut)
{
	int width = img.width(), height = img.height();
	assert(offsetX + newWidth <= width && offsetY + newHeight <= height);
	
	imgOut.resize(newWidth, newHeight);
	
	for (int c = 0; c < 3; c++)
		for (int y = 0; y < newHeight; y++)
			for (int x = 0; x < newWidth; x++)
				(*imgOut[c])(x, y) = (*img[c])(x + offsetX, y + offsetY);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movl %r8d, -0x18(%rbp)
movq %r9, -0x20(%rbp)
movq -0x8(%rbp), %rdi
callq 0xedd0
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rdi
callq 0xedf0
movl %eax, -0x28(%rbp)
movl -0x14(%rbp), %ecx
addl -0xc(%rbp), %ecx
xorl %eax, %eax
cmpl -0x24(%rbp), %ecx
movb %al, -0x35(%rbp)
jg 0x27f84
movl -0x18(%rbp), %eax
addl -0x10(%rbp), %eax
cmpl -0x28(%rbp), %eax
setle %al
movb %al, -0x35(%rbp)
movb -0x35(%rbp), %al
testb $0x1, %al
jne 0x27f8d
jmp 0x27f8f
jmp 0x27fae
leaq 0x23dcc(%rip), %rdi     # 0x4bd62
leaq 0x23cb2(%rip), %rsi     # 0x4bc4f
movl $0x140, %edx            # imm = 0x140
leaq 0x23e39(%rip), %rcx     # 0x4bde2
callq 0x4240
movq -0x20(%rbp), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
movq (%rdi), %rax
callq *0x28(%rax)
movl $0x0, -0x2c(%rbp)
cmpl $0x3, -0x2c(%rbp)
jge 0x28061
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x28051
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x28044
movq -0x8(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0x25920
movq %rax, %rdi
movl -0x34(%rbp), %esi
addl -0x14(%rbp), %esi
movl -0x30(%rbp), %edx
addl -0x18(%rbp), %edx
callq 0x1d980
movsd (%rax), %xmm0
movsd %xmm0, -0x40(%rbp)
movq -0x20(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0xef40
movq %rax, %rdi
movl -0x34(%rbp), %esi
movl -0x30(%rbp), %edx
callq 0x16fd0
movsd -0x40(%rbp), %xmm0
movsd %xmm0, (%rax)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x27fe5
jmp 0x28046
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x27fd6
jmp 0x28053
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x27fc5
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: kebwi[P]Trifid/src/FourierTransform.cpp
// Function: shiftImage(ImageReal const&, int, int, ImageReal&)
void shiftImage(const ImageReal &img, int shiftX, int shiftY, ImageReal &imgOut)
{
	assert(&img != &imgOut);
	
	if (shiftX < 0)
		shiftX += img.width();
	shiftX %= img.width();
	if (shiftY < 0)
		shiftY += img.height();
	shiftY %= img.height();
	
	imgOut.resize(img.width(), img.height());
	int width = img.width(), height = img.height();
	
	int xx, yy;
	for (int y = 0; y < height; y++)
	{
		yy = (y + shiftY) % height;
		for (int x = 0; x < width; x++)
		{
			xx = (x + shiftX) % width;
			imgOut(x, y) = img(xx, yy);
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq -0x8(%rbp), %rax
cmpq -0x18(%rbp), %rax
je 0x28092
jmp 0x280b1
leaq 0x23d96(%rip), %rdi     # 0x4be2f
leaq 0x23baf(%rip), %rsi     # 0x4bc4f
movl $0x14c, %edx            # imm = 0x14C
leaq 0x23d93(%rip), %rcx     # 0x4be3f
callq 0x4240
cmpl $0x0, -0xc(%rbp)
jge 0x280c6
movq -0x8(%rbp), %rdi
callq 0xedd0
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
callq 0xedd0
movl %eax, %ecx
movl -0xc(%rbp), %eax
cltd
idivl %ecx
movl %edx, -0xc(%rbp)
cmpl $0x0, -0x10(%rbp)
jge 0x280ef
movq -0x8(%rbp), %rdi
callq 0xedf0
addl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0xedf0
movl %eax, %ecx
movl -0x10(%rbp), %eax
cltd
idivl %ecx
movl %edx, -0x10(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
callq 0xedd0
movl %eax, -0x34(%rbp)
movq -0x8(%rbp), %rdi
callq 0xedf0
movq -0x40(%rbp), %rdi
movl -0x34(%rbp), %esi
movl %eax, %edx
movq (%rdi), %rax
callq *0x28(%rax)
movq -0x8(%rbp), %rdi
callq 0xedd0
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
callq 0xedf0
movl %eax, -0x20(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x281c7
movl -0x2c(%rbp), %eax
addl -0x10(%rbp), %eax
cltd
idivl -0x20(%rbp)
movl %edx, -0x28(%rbp)
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x281ba
movl -0x30(%rbp), %eax
addl -0xc(%rbp), %eax
cltd
idivl -0x1c(%rbp)
movl %edx, -0x24(%rbp)
movq -0x8(%rbp), %rdi
movl -0x24(%rbp), %esi
movl -0x28(%rbp), %edx
callq 0x1d980
movsd (%rax), %xmm0
movsd %xmm0, -0x48(%rbp)
movq -0x18(%rbp), %rdi
movl -0x30(%rbp), %esi
movl -0x2c(%rbp), %edx
callq 0x16fd0
movsd -0x48(%rbp), %xmm0
movsd %xmm0, (%rax)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x2816a
jmp 0x281bc
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x2814e
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: kebwi[P]Trifid/src/FourierTransform.cpp
// Function: shiftImage(Image3ChnlReal const&, int, int, Image3ChnlReal&)
void shiftImage(const Image3ChnlReal &img, int shiftX, int shiftY, Image3ChnlReal &imgOut)
{
	assert(&img != &imgOut);
	
	if (shiftX < 0)
		shiftX += img.width();
	shiftX %= img.width();
	if (shiftY < 0)
		shiftY += img.height();
	shiftY %= img.height();
	
	imgOut.resize(img.width(), img.height());
	int width = img.width(), height = img.height();
	
	int xx, yy;
	for (int c = 0; c < 3; c++)
		for (int y = 0; y < height; y++)
		{
			yy = (y + shiftY) % height;
			for (int x = 0; x < width; x++)
			{
				xx = (x + shiftX) % width;
				(*imgOut[c])(x, y) = (*img[c])(xx, yy);
			}
		}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq -0x8(%rbp), %rax
cmpq -0x18(%rbp), %rax
je 0x281f2
jmp 0x28211
leaq 0x23c36(%rip), %rdi     # 0x4be2f
leaq 0x23a4f(%rip), %rsi     # 0x4bc4f
movl $0x166, %edx            # imm = 0x166
leaq 0x23c6d(%rip), %rcx     # 0x4be79
callq 0x4240
cmpl $0x0, -0xc(%rbp)
jge 0x28226
movq -0x8(%rbp), %rdi
callq 0xedd0
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
callq 0xedd0
movl %eax, %ecx
movl -0xc(%rbp), %eax
cltd
idivl %ecx
movl %edx, -0xc(%rbp)
cmpl $0x0, -0x10(%rbp)
jge 0x2824f
movq -0x8(%rbp), %rdi
callq 0xedf0
addl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0xedf0
movl %eax, %ecx
movl -0x10(%rbp), %eax
cltd
idivl %ecx
movl %edx, -0x10(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rdi
callq 0xedd0
movl %eax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
callq 0xedf0
movq -0x40(%rbp), %rdi
movl -0x38(%rbp), %esi
movl %eax, %edx
movq (%rdi), %rax
callq *0x28(%rax)
movq -0x8(%rbp), %rdi
callq 0xedd0
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
callq 0xedf0
movl %eax, -0x20(%rbp)
movl $0x0, -0x2c(%rbp)
cmpl $0x3, -0x2c(%rbp)
jge 0x28365
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x20(%rbp), %eax
jge 0x28355
movl -0x30(%rbp), %eax
addl -0x10(%rbp), %eax
cltd
idivl -0x20(%rbp)
movl %edx, -0x28(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x28345
movl -0x34(%rbp), %eax
addl -0xc(%rbp), %eax
cltd
idivl -0x1c(%rbp)
movl %edx, -0x24(%rbp)
movq -0x8(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0x25920
movq %rax, %rdi
movl -0x24(%rbp), %esi
movl -0x28(%rbp), %edx
callq 0x1d980
movsd (%rax), %xmm0
movsd %xmm0, -0x48(%rbp)
movq -0x18(%rbp), %rdi
movl -0x2c(%rbp), %esi
callq 0xef40
movq %rax, %rdi
movl -0x34(%rbp), %esi
movl -0x30(%rbp), %edx
callq 0x16fd0
movsd -0x48(%rbp), %xmm0
movsd %xmm0, (%rax)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x282df
jmp 0x28347
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x282bf
jmp 0x28357
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x282ae
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: kebwi[P]Trifid/src/SteerablePyramid.cpp
// Function: SteerablePyramid::CreateScratch()
void SteerablePyramid::CreateScratch()
{
	//Note that scratch_2D_A_ will be memory leaked when the last instance of SteerablePyramid is deleted!!!
	//Reasonably simple to fix, but this is just a dinky little experimental program.  Tsk tsk.
	if (scratchSize_ < width_ * height_)
	{
		if (scratch_2D_A_)
			delete [] scratch_2D_A_;
		if (scratch_2D_B_)
			delete [] scratch_2D_B_;
		
		scratchSize_ = width_ * height_;
		
		scratch_2D_A_ = new Float_t[scratchSize_];
		assert(scratch_2D_A_);
		scratch_2D_B_ = new Float_t[scratchSize_];
		assert(scratch_2D_B_);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdx
movq %rdx, -0x10(%rbp)
movl 0x33566(%rip), %eax     # 0x5cbc0
movl 0x30(%rdx), %ecx
imull 0x34(%rdx), %ecx
cmpl %ecx, %eax
jge 0x2977c
cmpq $0x0, 0x3353f(%rip)     # 0x5cbb0
je 0x2968f
movq 0x33536(%rip), %rax     # 0x5cbb0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x2968d
movq -0x18(%rbp), %rdi
callq 0x44d0
jmp 0x2968f
cmpq $0x0, 0x33521(%rip)     # 0x5cbb8
je 0x296b5
movq 0x33518(%rip), %rax     # 0x5cbb8
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x296b3
movq -0x20(%rbp), %rdi
callq 0x44d0
jmp 0x296b5
movq -0x10(%rbp), %rcx
movl 0x30(%rcx), %eax
imull 0x34(%rcx), %eax
movl %eax, 0x334fa(%rip)     # 0x5cbc0
movslq 0x334f3(%rip), %rax     # 0x5cbc0
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x4030
movq %rax, 0x334bb(%rip)     # 0x5cbb0
cmpq $0x0, 0x334b3(%rip)     # 0x5cbb0
je 0x29701
jmp 0x29720
leaq 0x22e29(%rip), %rdi     # 0x4c531
leaq 0x22c47(%rip), %rsi     # 0x4c356
movl $0x1a9, %edx            # imm = 0x1A9
leaq 0x22e24(%rip), %rcx     # 0x4c53f
callq 0x4240
movslq 0x33499(%rip), %rax     # 0x5cbc0
movl $0x8, %ecx
mulq %rcx
movq %rax, %rdi
seto %cl
movq $-0x1, %rax
testb $0x1, %cl
cmovneq %rax, %rdi
callq 0x4030
movq %rax, 0x33469(%rip)     # 0x5cbb8
cmpq $0x0, 0x33461(%rip)     # 0x5cbb8
je 0x2975b
jmp 0x2977a
leaq 0x22e04(%rip), %rdi     # 0x4c566
leaq 0x22bed(%rip), %rsi     # 0x4c356
movl $0x1ab, %edx            # imm = 0x1AB
leaq 0x22dca(%rip), %rcx     # 0x4c53f
callq 0x4240
jmp 0x2977c
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: kebwi[P]Trifid/src/SteerablePyramid.cpp
// Function: SteerablePyramid::GetFilters(std::vector<std::vector<double, std::allocator<double>>, std::allocator<std::vector<double, std::allocator<double>>>>&)
void SteerablePyramid::GetFilters(vector<vector<Float_t> > &filters)
{
	InitFilters();
	
	filters.clear();
	filters.resize(7);
	
	for (int i = 0; i < 7; i++)
	{
		filters[i].resize(skFilterDims[i] * skFilterDims[i]);
		for (int j = 0; j < skFilterDims[i] * skFilterDims[i]; j++)
			filters[i][j] = skFilters[i][j];
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
callq 0x29430
movq -0x8(%rbp), %rdi
callq 0x32e50
movq -0x8(%rbp), %rdi
movl $0x7, %esi
callq 0x32e70
movl $0x0, -0xc(%rbp)
cmpl $0x7, -0xc(%rbp)
jge 0x2ba53
movq -0x8(%rbp), %rdi
movslq -0xc(%rbp), %rsi
callq 0xeec0
movq %rax, %rdi
movslq -0xc(%rbp), %rcx
leaq 0x3121c(%rip), %rax     # 0x5cbd0
movl (%rax,%rcx,4), %eax
movslq -0xc(%rbp), %rdx
leaq 0x3120e(%rip), %rcx     # 0x5cbd0
imull (%rcx,%rdx,4), %eax
movslq %eax, %rsi
callq 0xe5e0
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
movslq -0xc(%rbp), %rdx
leaq 0x311ed(%rip), %rcx     # 0x5cbd0
movl (%rcx,%rdx,4), %ecx
movslq -0xc(%rbp), %rsi
leaq 0x311df(%rip), %rdx     # 0x5cbd0
imull (%rdx,%rsi,4), %ecx
cmpl %ecx, %eax
jge 0x2ba43
movslq -0xc(%rbp), %rcx
leaq 0x311ec(%rip), %rax     # 0x5cbf0
movq (%rax,%rcx,8), %rax
movslq -0x10(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movslq -0xc(%rbp), %rsi
callq 0xeec0
movq %rax, %rdi
movslq -0x10(%rbp), %rsi
callq 0xe670
movsd -0x18(%rbp), %xmm0
movsd %xmm0, (%rax)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x2b9d5
jmp 0x2ba45
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x2b98f
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: kebwi[P]Trifid/src/SteerablePyramid.cpp
// Function: SteerablePyramid::DetermineNumLevels()
void SteerablePyramid::DetermineNumLevels()
{
	numLevels_ = 0;
	int shorterDim = min(width_, height_);
	while (shorterDim > skFilterDims[2])	//Limit is determined by the dimensions of the L1 filter (probably 17x17)
	{
		numLevels_++;
		shorterDim /= 2;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rsi
movq %rsi, -0x18(%rbp)
movl $0x0, 0x38(%rsi)
movq %rsi, %rdi
addq $0x30, %rdi
addq $0x34, %rsi
callq 0x32f00
movl (%rax), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl 0x3113f(%rip), %eax     # 0x5cbd8
jle 0x2bab8
movq -0x18(%rbp), %rax
movl 0x38(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x38(%rax)
movl -0xc(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0xc(%rbp)
jmp 0x2ba90
addq $0x20, %rsp
popq %rbp
retq
nop
// File: kebwi[P]Trifid/src/SteerablePyramid.cpp
// Function: SteerablePyramid::SetAllZero()
void SteerablePyramid::SetAllZero()
{
	for (int i = 0; i < numLevels_; i++)
	{
		int horDim = width_ / pow(2, i);
		int verDim = height_ / pow(2, i);
		int totalPixels = horDim * verDim;
		int totalBytes = totalPixels * sizeof(Float_t);
		
		if (i == 0)
			memset(h0Coeffs_, 0, totalBytes);
		memset(b1Coeffs_[i], 0, totalBytes);
		memset(b2Coeffs_[i], 0, totalBytes);
		memset(b3Coeffs_[i], 0, totalBytes);
		memset(b4Coeffs_[i], 0, totalBytes);
		memset(l1Coeffs_[i], 0, totalBytes / 4);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x28(%rbp), %rcx
movl -0xc(%rbp), %eax
cmpl 0x38(%rcx), %eax
jge 0x2bc33
movq -0x28(%rbp), %rax
cvtsi2sdl 0x30(%rax), %xmm0
movsd %xmm0, -0x38(%rbp)
movl -0xc(%rbp), %esi
movl $0x2, %edi
callq 0x1d7f0
movq -0x28(%rbp), %rax
movaps %xmm0, %xmm1
movsd -0x38(%rbp), %xmm0
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
movl %ecx, -0x10(%rbp)
cvtsi2sdl 0x34(%rax), %xmm0
movsd %xmm0, -0x30(%rbp)
movl -0xc(%rbp), %esi
movl $0x2, %edi
callq 0x1d7f0
movaps %xmm0, %xmm1
movsd -0x30(%rbp), %xmm0
divsd %xmm1, %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x14(%rbp)
movl -0x10(%rbp), %eax
imull -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
movslq -0x18(%rbp), %rax
shlq $0x3, %rax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x2bb94
movq -0x28(%rbp), %rax
movq (%rax), %rdi
movslq -0x1c(%rbp), %rdx
xorl %esi, %esi
callq 0x41e0
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq -0x1c(%rbp), %rdx
xorl %esi, %esi
callq 0x41e0
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq -0x1c(%rbp), %rdx
xorl %esi, %esi
callq 0x41e0
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq -0x1c(%rbp), %rdx
xorl %esi, %esi
callq 0x41e0
movq -0x28(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movslq -0x1c(%rbp), %rdx
xorl %esi, %esi
callq 0x41e0
movq -0x28(%rbp), %rax
movq 0x28(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl -0x1c(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movslq %eax, %rdx
xorl %esi, %esi
callq 0x41e0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x2bafb
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: kebwi[P]Trifid/src/SteerablePyramid.cpp
// Function: SteerablePyramid::AccumulateHistograms(double*, int, int, std::vector<int, std::allocator<int>>&, double)
void SteerablePyramid::AccumulateHistograms(Float_t *coeffs, int horDim, int verDim, vector<int> &histogram, Float_t binSpan)
{
	int numBins = histogram.size();
	
	int totalPixels = horDim * verDim;
	int bin;
	for (int i = 0; i < totalPixels; i++)
	{
		bin = fabs(coeffs[i]) / binSpan;
		if (bin >= numBins)
		{
			cout << "Out of bounds histogram: "
					<< fabs(coeffs[i]) << "   "
					<< binSpan << "   "
					<< fabs(coeffs[i]) / binSpan
					<< "   "
					<< bin << "   "
					<< numBins << endl;
			bin = numBins - 1;
		}
		histogram[bin]++;
	}
}

// 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)
movq %r8, -0x20(%rbp)
movsd %xmm0, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x33300
movl %eax, -0x2c(%rbp)
movl -0x14(%rbp), %eax
imull -0x18(%rbp), %eax
movl %eax, -0x30(%rbp)
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
cmpl -0x30(%rbp), %eax
jge 0x32a39
movq -0x10(%rbp), %rax
movslq -0x38(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movaps 0x16714(%rip), %xmm1    # 0x49040
pand %xmm1, %xmm0
divsd -0x28(%rbp), %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jl 0x32a17
movq 0x27681(%rip), %rdi     # 0x59fd0
leaq 0x1abbd(%rip), %rsi     # 0x4d513
callq 0x4390
movq %rax, %rdi
movq -0x10(%rbp), %rax
movslq -0x38(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movaps 0x166ce(%rip), %xmm1    # 0x49040
pand %xmm1, %xmm0
callq 0x4670
movq %rax, %rdi
leaq 0x17027(%rip), %rsi     # 0x499ac
callq 0x4390
movq %rax, %rdi
movsd -0x28(%rbp), %xmm0
callq 0x4670
movq %rax, %rdi
leaq 0x1700b(%rip), %rsi     # 0x499ac
callq 0x4390
movq %rax, %rdi
movq -0x10(%rbp), %rax
movslq -0x38(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movaps 0x16683(%rip), %xmm1    # 0x49040
pand %xmm1, %xmm0
divsd -0x28(%rbp), %xmm0
callq 0x4670
movq %rax, %rdi
leaq 0x16fd7(%rip), %rsi     # 0x499ac
callq 0x4390
movq %rax, %rdi
movl -0x34(%rbp), %esi
callq 0x4600
movq %rax, %rdi
leaq 0x16fbd(%rip), %rsi     # 0x499ac
callq 0x4390
movq %rax, %rdi
movl -0x2c(%rbp), %esi
callq 0x4600
movq %rax, %rdi
movq 0x275af(%rip), %rsi     # 0x59fb8
callq 0x43d0
movl -0x2c(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x34(%rbp)
movq -0x20(%rbp), %rdi
movslq -0x34(%rbp), %rsi
callq 0x33280
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x3290c
addq $0x40, %rsp
popq %rbp
retq
nop
// File: kebwi[P]Trifid/src/SteerablePyramid.cpp
// Function: FilterFT::~FilterFT()
~FilterFT()
	
	{
		for (int i = 0; i < 7; i++)
			for (int j = 0; j < filtersFTs[i].size(); j++)
			{
				assert(filtersFTs[i][j]);
				delete [] filtersFTs[i][j];
				delete [] filtersInvFTs[i][j];
			}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x7, -0xc(%rbp)
jge 0x32dd6
movl $0x0, -0x10(%rbp)
movq -0x18(%rbp), %rdi
movslq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
addq $0x8, %rdi
movslq -0xc(%rbp), %rax
imulq $0x18, %rax, %rax
addq %rax, %rdi
callq 0x336e0
movq %rax, %rcx
movq -0x20(%rbp), %rax
cmpq %rcx, %rax
jae 0x32dc6
movq -0x18(%rbp), %rdi
addq $0x8, %rdi
movslq -0xc(%rbp), %rax
imulq $0x18, %rax, %rax
addq %rax, %rdi
movslq -0x10(%rbp), %rsi
callq 0x32c90
cmpq $0x0, (%rax)
je 0x32d30
jmp 0x32d4f
leaq 0x1a826(%rip), %rdi     # 0x4d55d
leaq 0x19618(%rip), %rsi     # 0x4c356
movl $0x37, %edx
leaq 0x1a824(%rip), %rcx     # 0x4d56e
callq 0x4240
movq -0x18(%rbp), %rdi
addq $0x8, %rdi
movslq -0xc(%rbp), %rax
imulq $0x18, %rax, %rax
addq %rax, %rdi
movslq -0x10(%rbp), %rsi
callq 0x32c90
movq (%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x32d81
movq -0x28(%rbp), %rdi
callq 0x44d0
movq -0x18(%rbp), %rdi
addq $0xb0, %rdi
movslq -0xc(%rbp), %rax
imulq $0x18, %rax, %rax
addq %rax, %rdi
movslq -0x10(%rbp), %rsi
callq 0x32c90
movq (%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
je 0x32db6
movq -0x30(%rbp), %rdi
callq 0x44d0
jmp 0x32db8
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x32cdc
jmp 0x32dc8
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x32ccb
movq -0x18(%rbp), %rax
addq $0xb0, %rax
movq %rax, -0x40(%rbp)
addq $0xa8, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
addq $-0x18, %rdi
movq %rdi, -0x48(%rbp)
callq 0x34180
movq -0x40(%rbp), %rcx
movq -0x48(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x38(%rbp)
jne 0x32dee
movq -0x18(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x58(%rbp)
addq $0xa8, %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
addq $-0x18, %rdi
movq %rdi, -0x60(%rbp)
callq 0x34180
movq -0x58(%rbp), %rcx
movq -0x60(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x50(%rbp)
jne 0x32e26
addq $0x60, %rsp
popq %rbp
retq
nop
// File: kebwi[P]Trifid/src/ImagePairStats.cpp
// Function: calc1ChnlME(ImageReal const&, ImageReal const&)
Float_t calc1ChnlME(const ImageReal &img1, const ImageReal &img2)
{
	assert(img1.width() > 0 && img1.height() > 0);
	assert(img1.width() == img2.width() && img1.height() == img2.height());
	
	Float_t mse = 0;
	
	int width = img1.width(), height = img1.height();
	int numNonborderPixels = 0;
	for (int y = skEdgeSkip; y < height - skEdgeSkip; y++)
		for (int x = skEdgeSkip; x < width - skEdgeSkip; x++)
		{
			mse += fabs(img2(x, y) - img1(x, y));
			numNonborderPixels++;
		}
	
	assert(mse >= 0);
	
	mse /= (Float_t)numNonborderPixels;
	
	return mse;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0xedd0
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x2d(%rbp)
jle 0x370f7
movq -0x8(%rbp), %rdi
callq 0xedf0
cmpl $0x0, %eax
setg %al
movb %al, -0x2d(%rbp)
movb -0x2d(%rbp), %al
testb $0x1, %al
jne 0x37100
jmp 0x37102
jmp 0x37121
leaq 0x1647b(%rip), %rdi     # 0x4d584
leaq 0x1649a(%rip), %rsi     # 0x4d5aa
movl $0x37, %edx
leaq 0x164ea(%rip), %rcx     # 0x4d606
callq 0x4240
movq -0x8(%rbp), %rdi
callq 0xedd0
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rdi
callq 0xedd0
movl -0x34(%rbp), %ecx
movl %eax, %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x2e(%rbp)
jne 0x37166
movq -0x8(%rbp), %rdi
callq 0xedf0
movl %eax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
callq 0xedf0
movl %eax, %ecx
movl -0x38(%rbp), %eax
cmpl %ecx, %eax
sete %al
movb %al, -0x2e(%rbp)
movb -0x2e(%rbp), %al
testb $0x1, %al
jne 0x3716f
jmp 0x37171
jmp 0x37190
leaq 0x149ae(%rip), %rdi     # 0x4bb26
leaq 0x1642b(%rip), %rsi     # 0x4d5aa
movl $0x38, %edx
leaq 0x1647b(%rip), %rcx     # 0x4d606
callq 0x4240
xorps %xmm0, %xmm0
movsd %xmm0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0xedd0
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
callq 0xedf0
movl %eax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
movl -0x20(%rbp), %ecx
subl $0x0, %ecx
cmpl %ecx, %eax
jge 0x37248
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movl -0x1c(%rbp), %ecx
subl $0x0, %ecx
cmpl %ecx, %eax
jge 0x37238
movq -0x10(%rbp), %rdi
movl -0x2c(%rbp), %esi
movl -0x28(%rbp), %edx
callq 0x1d980
movsd (%rax), %xmm0
movsd %xmm0, -0x40(%rbp)
movq -0x8(%rbp), %rdi
movl -0x2c(%rbp), %esi
movl -0x28(%rbp), %edx
callq 0x1d980
movsd -0x40(%rbp), %xmm0
subsd (%rax), %xmm0
movaps 0x11e2a(%rip), %xmm1    # 0x49040
pand %xmm1, %xmm0
addsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x18(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x371d2
jmp 0x3723a
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x371be
movsd -0x18(%rbp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x37258
jmp 0x37277
leaq 0x163e1(%rip), %rdi     # 0x4d640
leaq 0x16344(%rip), %rsi     # 0x4d5aa
movl $0x45, %edx
leaq 0x16394(%rip), %rcx     # 0x4d606
callq 0x4240
cvtsi2sdl -0x24(%rbp), %xmm1
movsd -0x18(%rbp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rbp)
movsd -0x18(%rbp), %xmm0
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: kebwi[P]Trifid/src/ImagePairStats.cpp
// Function: calc1ChnlMSE_PSNR(ImageReal const&, ImageReal const&, double&, double&)
void calc1ChnlMSE_PSNR(const ImageReal &img1, const ImageReal &img2,
						Float_t &mse, Float_t &psnr)
{
	assert(img1.width() > 0 && img1.height() > 0);
	assert(img1.width() == img2.width() && img1.height() == img2.height());
	
	mse = calc1ChnlMSE(img1, img2);
	
	assert(mse > 0);
	
	//It is assumed that ImageReals are in the range [0-1] and therefore maxPixelValue is 1.0
	Float_t maxPixelValue = 1.0;
	psnr = 20.0 * log10(maxPixelValue / sqrt(mse));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rdi
callq 0xedd0
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x29(%rbp)
jle 0x3797f
movq -0x8(%rbp), %rdi
callq 0xedf0
cmpl $0x0, %eax
setg %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0x37988
jmp 0x3798a
jmp 0x379a9
leaq 0x15bf3(%rip), %rdi     # 0x4d584
leaq 0x15c12(%rip), %rsi     # 0x4d5aa
movl $0x96, %edx
leaq 0x15d74(%rip), %rcx     # 0x4d718
callq 0x4240
movq -0x8(%rbp), %rdi
callq 0xedd0
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
callq 0xedd0
movl -0x30(%rbp), %ecx
movl %eax, %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x2a(%rbp)
jne 0x379ee
movq -0x8(%rbp), %rdi
callq 0xedf0
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rdi
callq 0xedf0
movl %eax, %ecx
movl -0x34(%rbp), %eax
cmpl %ecx, %eax
sete %al
movb %al, -0x2a(%rbp)
movb -0x2a(%rbp), %al
testb $0x1, %al
jne 0x379f7
jmp 0x379f9
jmp 0x37a18
leaq 0x14126(%rip), %rdi     # 0x4bb26
leaq 0x15ba3(%rip), %rsi     # 0x4d5aa
movl $0x97, %edx
leaq 0x15d05(%rip), %rcx     # 0x4d718
callq 0x4240
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x372a0
movq -0x18(%rbp), %rax
movsd %xmm0, (%rax)
movq -0x18(%rbp), %rax
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x37a40
jmp 0x37a5f
leaq 0x15d24(%rip), %rdi     # 0x4d76b
leaq 0x15b5c(%rip), %rsi     # 0x4d5aa
movl $0x9b, %edx
leaq 0x15cbe(%rip), %rcx     # 0x4d718
callq 0x4240
movsd 0x115b9(%rip), %xmm0    # 0x49020
movsd %xmm0, -0x28(%rbp)
movsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x40(%rbp)
movq -0x18(%rbp), %rax
movsd (%rax), %xmm0
callq 0x42c0
movaps %xmm0, %xmm1
movsd -0x40(%rbp), %xmm0
divsd %xmm1, %xmm0
callq 0x41c0
movaps %xmm0, %xmm1
movsd 0x13231(%rip), %xmm0    # 0x4acd0
mulsd %xmm1, %xmm0
movq -0x20(%rbp), %rax
movsd %xmm0, (%rax)
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: kebwi[P]Trifid/src/ImagePairStats.cpp
// Function: calcRGB_MSE_PSNR(Image3ChnlReal const&, Image3ChnlReal const&, double&, double&)
void calcRGB_MSE_PSNR(const Image3ChnlReal &img1, const Image3ChnlReal &img2,
						Float_t &mse, Float_t &psnr)
{
	assert(img1.width() > 0 && img1.height() > 0);
	assert(img1.width() == img2.width() && img1.height() == img2.height());
	
	mse = calcRGB_MSE(img1, img2);
	
	assert(mse > 0);
	
	//It is assumed that ImageReals are in the range [0-1] and therefore maxPixelValue is 1.0
	Float_t maxPixelValue = 1.0;
	psnr = 20.0 * log10(maxPixelValue / sqrt(mse));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rdi
callq 0xedd0
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x29(%rbp)
jle 0x37aff
movq -0x8(%rbp), %rdi
callq 0xedf0
cmpl $0x0, %eax
setg %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0x37b08
jmp 0x37b0a
jmp 0x37b29
leaq 0x15a73(%rip), %rdi     # 0x4d584
leaq 0x15a92(%rip), %rsi     # 0x4d5aa
movl $0xa5, %edx
leaq 0x15c4f(%rip), %rcx     # 0x4d773
callq 0x4240
movq -0x8(%rbp), %rdi
callq 0xedd0
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
callq 0xedd0
movl -0x30(%rbp), %ecx
movl %eax, %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x2a(%rbp)
jne 0x37b6e
movq -0x8(%rbp), %rdi
callq 0xedf0
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rdi
callq 0xedf0
movl %eax, %ecx
movl -0x34(%rbp), %eax
cmpl %ecx, %eax
sete %al
movb %al, -0x2a(%rbp)
movb -0x2a(%rbp), %al
testb $0x1, %al
jne 0x37b77
jmp 0x37b79
jmp 0x37b98
leaq 0x13fa6(%rip), %rdi     # 0x4bb26
leaq 0x15a23(%rip), %rsi     # 0x4d5aa
movl $0xa6, %edx
leaq 0x15be0(%rip), %rcx     # 0x4d773
callq 0x4240
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x376d0
movq -0x18(%rbp), %rax
movsd %xmm0, (%rax)
movq -0x18(%rbp), %rax
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x37bc0
jmp 0x37bdf
leaq 0x15ba4(%rip), %rdi     # 0x4d76b
leaq 0x159dc(%rip), %rsi     # 0x4d5aa
movl $0xaa, %edx
leaq 0x15b99(%rip), %rcx     # 0x4d773
callq 0x4240
movsd 0x11439(%rip), %xmm0    # 0x49020
movsd %xmm0, -0x28(%rbp)
movsd -0x28(%rbp), %xmm0
movsd %xmm0, -0x40(%rbp)
movq -0x18(%rbp), %rax
movsd (%rax), %xmm0
callq 0x42c0
movaps %xmm0, %xmm1
movsd -0x40(%rbp), %xmm0
divsd %xmm1, %xmm0
callq 0x41c0
movaps %xmm0, %xmm1
movsd 0x130b1(%rip), %xmm0    # 0x4acd0
mulsd %xmm1, %xmm0
movq -0x20(%rbp), %rax
movsd %xmm0, (%rax)
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: kebwi[P]Trifid/src/ImagePairStats.cpp
// Function: calculate1ChnlPsnrScore(ImageReal const&, ImageReal const&)
Float_t calculate1ChnlPsnrScore(const ImageReal &imgOri, const ImageReal &img)
{
	assert(imgOri.width() == img.width() && imgOri.height() == img.height());
	
	Float_t mse, psnr;
	calc1ChnlMSE_PSNR(imgOri, img, mse, psnr);
	return psnr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0xedd0
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0xedd0
movl -0x28(%rbp), %ecx
movl %eax, %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x21(%rbp)
jne 0x37c95
movq -0x8(%rbp), %rdi
callq 0xedf0
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rdi
callq 0xedf0
movl %eax, %ecx
movl -0x2c(%rbp), %eax
cmpl %ecx, %eax
sete %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0x37c9e
jmp 0x37ca0
jmp 0x37cbf
leaq 0x15b28(%rip), %rdi     # 0x4d7cf
leaq 0x158fc(%rip), %rsi     # 0x4d5aa
movl $0xb3, %edx
leaq 0x15b56(%rip), %rcx     # 0x4d810
callq 0x4240
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x18(%rbp), %rdx
leaq -0x20(%rbp), %rcx
callq 0x37940
movsd -0x20(%rbp), %xmm0
addq $0x30, %rsp
popq %rbp
retq
nop
// File: kebwi[P]Trifid/src/ImagePairStats.cpp
// Function: calculateRgbPsnrScore(Image3ChnlReal const&, Image3ChnlReal const&)
Float_t calculateRgbPsnrScore(const Image3ChnlReal &imgOri, const Image3ChnlReal &img)
{
	assert(imgOri.width() == img.width() && imgOri.height() == img.height());
	
	Float_t mse, psnr;
	calcRGB_MSE_PSNR(imgOri, img, mse, psnr);
	return psnr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
callq 0xedd0
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0xedd0
movl -0x28(%rbp), %ecx
movl %eax, %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0x21(%rbp)
jne 0x37d35
movq -0x8(%rbp), %rdi
callq 0xedf0
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rdi
callq 0xedf0
movl %eax, %ecx
movl -0x2c(%rbp), %eax
cmpl %ecx, %eax
sete %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0x37d3e
jmp 0x37d40
jmp 0x37d5f
leaq 0x15a88(%rip), %rdi     # 0x4d7cf
leaq 0x1585c(%rip), %rsi     # 0x4d5aa
movl $0xbc, %edx
leaq 0x15afc(%rip), %rcx     # 0x4d856
callq 0x4240
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x18(%rbp), %rdx
leaq -0x20(%rbp), %rcx
callq 0x37ac0
movsd -0x20(%rbp), %xmm0
addq $0x30, %rsp
popq %rbp
retq
nop
// File: kebwi[P]Trifid/src/Random.cpp
// Function: RandStdNorm()
Float_t RandStdNorm()
{
	//Standard normal distribution
	
	//Box-Muller
	//http://en.wikipedia.org/wiki/Normal_distribution
	
	//Float_t a = RandZeroFloat(1.0);
	//Float_t b = RandZeroFloat(1.0);
	//Float_t c = sqrt(-2 * log(a)) * cos(2 * Pi * b);
	//return c;
	
	//return sqrt(-2.0 * log(RandZeroFloat(1.0))) * cos(PiTimes2 * RandZeroFloat(1.0));
	
	//================================================================================
	
	//Polar form of Box-Muller
	//http://www.taygeta.com/random/gaussian.html
	
	Float_t x1, x2, w, y1;
	static Float_t y2;
	static bool use_last = false;

	if (use_last)	//Use value from previous call
	{
		y1 = y2;
		use_last = false;
	}
	else
	{
		do
		{
			x1 = 2.0 * RandZeroFloat(1.0) - 1.0;
			x2 = 2.0 * RandZeroFloat(1.0) - 1.0;
			w = x1 * x1 + x2 * x2;
		} while ( w >= 1.0 );
		
		w = sqrt( (-2.0 * log( w ) ) / w );
		y1 = x1 * w;
		y2 = x2 * w;
		use_last = true;
	}

	return y1;//(y1 * stddev + mean);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
testb $0x1, 0x24d31(%rip)     # 0x5ccb0
je 0x37f9a
movsd 0x24d1f(%rip), %xmm0    # 0x5cca8
movsd %xmm0, -0x20(%rbp)
movb $0x0, 0x24d1b(%rip)     # 0x5ccb0
jmp 0x38064
jmp 0x37f9c
movsd 0x1107c(%rip), %xmm0    # 0x49020
callq 0x37ee0
addsd %xmm0, %xmm0
movsd 0x11083(%rip), %xmm1    # 0x49038
addsd %xmm1, %xmm0
movsd %xmm0, -0x8(%rbp)
movsd 0x1105a(%rip), %xmm0    # 0x49020
callq 0x37ee0
addsd %xmm0, %xmm0
movsd 0x11061(%rip), %xmm1    # 0x49038
addsd %xmm1, %xmm0
movsd %xmm0, -0x10(%rbp)
movsd -0x8(%rbp), %xmm0
movsd -0x8(%rbp), %xmm2
movsd -0x10(%rbp), %xmm1
mulsd -0x10(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rbp)
movsd -0x18(%rbp), %xmm0
movsd 0x11012(%rip), %xmm1    # 0x49020
ucomisd %xmm1, %xmm0
jae 0x37f9c
movsd -0x18(%rbp), %xmm0
callq 0x42e0
movaps %xmm0, %xmm1
movsd 0x158cf(%rip), %xmm0    # 0x4d8f8
mulsd %xmm1, %xmm0
divsd -0x18(%rbp), %xmm0
callq 0x42c0
movsd %xmm0, -0x18(%rbp)
movsd -0x8(%rbp), %xmm0
mulsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
movsd -0x10(%rbp), %xmm0
mulsd -0x18(%rbp), %xmm0
movsd %xmm0, 0x24c4b(%rip)    # 0x5cca8
movb $0x1, 0x24c4c(%rip)     # 0x5ccb0
movsd -0x20(%rbp), %xmm0
addq $0x20, %rsp
popq %rbp
retq
nop
// File: kebwi[P]Trifid/src/Bayer.cpp
// Function: determineBayerColor(int, int)
Color determineBayerColor(int x, int y)
{
	if (x < 0)	//A flag for nonBayer images
		return R;
	
	int x2 = x % 2, y2 = y % 2;
	
	Color color = gBayerPattern[y2 * 2 + x2];
	
	return color;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x0, -0x8(%rbp)
jge 0x380b9
movl $0x0, -0x4(%rbp)
jmp 0x380f3
movl -0x8(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %edx, -0x10(%rbp)
movl -0xc(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %edx, -0x14(%rbp)
movq 0x22304(%rip), %rax     # 0x5a3e0
movl -0x14(%rbp), %ecx
shll %ecx
addl -0x10(%rbp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax,%rax)
// File: kebwi[P]Trifid/src/Bayer.cpp
// Function: determineBlockCorner(int, int)
BlockCorner determineBlockCorner(int x, int y)
{
	int x2 = x % 2, y2 = y % 2;
	
	if (x2 == 0 && y2 == 0)
		return UL;
	if (x2 == 1 && y2 == 0)
		return UR;
	if (x2 == 0 && y2 == 1)
		return LL;
	//if (x2 == 1 && y2 == 1)
		return LR;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl -0x8(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %edx, -0x10(%rbp)
movl -0xc(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %edx, -0x14(%rbp)
cmpl $0x0, -0x10(%rbp)
jne 0x3813b
cmpl $0x0, -0x14(%rbp)
jne 0x3813b
movl $0x0, -0x4(%rbp)
jmp 0x3816c
cmpl $0x1, -0x10(%rbp)
jne 0x38150
cmpl $0x0, -0x14(%rbp)
jne 0x38150
movl $0x1, -0x4(%rbp)
jmp 0x3816c
cmpl $0x0, -0x10(%rbp)
jne 0x38165
cmpl $0x1, -0x14(%rbp)
jne 0x38165
movl $0x2, -0x4(%rbp)
jmp 0x3816c
movl $0x3, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: kebwi[P]Trifid/src/Bayer.cpp
// Function: determineBlockCoord(Color, int&, int&)
void determineBlockCoord(Color color, int &x, int &y)
{
	assert(color != G);
	if (color == R)
	{
		if (gBayerPattern == kRGGB || gBayerPattern == kGRBG)
			y = 0;
		else y = 1;
		
		if (gBayerPattern == kRGGB || gBayerPattern == kGBRG)
			x = 0;
		else x = 1;
	}
	else //if (color == B)
	{
		if (gBayerPattern == kBGGR || gBayerPattern == kGBRG)
			y = 0;
		else y = 1;
		
		if (gBayerPattern == kBGGR || gBayerPattern == kGRBG)
			x = 0;
		else x = 1;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpl $0x1, -0x4(%rbp)
je 0x3819b
jmp 0x381ba
leaq 0x1575e(%rip), %rdi     # 0x4d900
leaq 0x15762(%rip), %rsi     # 0x4d90b
movl $0x36, %edx
leaq 0x15760(%rip), %rcx     # 0x4d915
callq 0x4240
cmpl $0x0, -0x4(%rbp)
jne 0x3822e
leaq 0x221d9(%rip), %rax     # 0x5a3a0
cmpq %rax, 0x22212(%rip)     # 0x5a3e0
je 0x381e0
leaq 0x221e9(%rip), %rax     # 0x5a3c0
cmpq %rax, 0x22202(%rip)     # 0x5a3e0
jne 0x381ec
movq -0x18(%rbp), %rax
movl $0x0, (%rax)
jmp 0x381f6
movq -0x18(%rbp), %rax
movl $0x1, (%rax)
leaq 0x221a3(%rip), %rax     # 0x5a3a0
cmpq %rax, 0x221dc(%rip)     # 0x5a3e0
je 0x38216
leaq 0x221c3(%rip), %rax     # 0x5a3d0
cmpq %rax, 0x221cc(%rip)     # 0x5a3e0
jne 0x38222
movq -0x10(%rbp), %rax
movl $0x0, (%rax)
jmp 0x3822c
movq -0x10(%rbp), %rax
movl $0x1, (%rax)
jmp 0x3829c
leaq 0x2217b(%rip), %rax     # 0x5a3b0
cmpq %rax, 0x221a4(%rip)     # 0x5a3e0
je 0x3824e
leaq 0x2218b(%rip), %rax     # 0x5a3d0
cmpq %rax, 0x22194(%rip)     # 0x5a3e0
jne 0x3825a
movq -0x18(%rbp), %rax
movl $0x0, (%rax)
jmp 0x38264
movq -0x18(%rbp), %rax
movl $0x1, (%rax)
leaq 0x22145(%rip), %rax     # 0x5a3b0
cmpq %rax, 0x2216e(%rip)     # 0x5a3e0
je 0x38284
leaq 0x22145(%rip), %rax     # 0x5a3c0
cmpq %rax, 0x2215e(%rip)     # 0x5a3e0
jne 0x38290
movq -0x10(%rbp), %rax
movl $0x0, (%rax)
jmp 0x3829a
movq -0x10(%rbp), %rax
movl $0x1, (%rax)
jmp 0x3829c
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: kebwi[P]Trifid/src/FFT/fft2d.cpp
// Function: fft2dInit(long, long)
int fft2dInit(long M2, long M){
	// init for fft2d, ifft2d, rfft2d, and rifft2d
	// malloc storage for 4 columns of 2d ffts then call fftinit for both row and column ffts sizes
/* INPUTS */
/* M = log2 of number of columns */
/* M2 = log2 of number of rows */
/*       of 2d matrix to be fourier transformed */
/* OUTPUTS */
/* private storage for columns of 2d ffts	*/
/* calls fftInit for cosine and bit reversed tables	*/
int theError = 1;
if ((M2 >= 0) && (M2 < 8*sizeof(long))){
	theError = 0;
	if (Array2d[M2] == 0){
		Array2d[M2] = (Float_t *) malloc( 4*2*POW2(M2)*sizeof(Float_t) );
		if (Array2d[M2] == 0)
			theError = 2;
		else{
			theError = fftInit(M2);
		}
	}
	if (theError == 0)
		theError = fftInit(M);
}
return theError;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x1, -0x14(%rbp)
cmpq $0x0, -0x8(%rbp)
jl 0x3856e
cmpq $0x40, -0x8(%rbp)
jae 0x3856e
movl $0x0, -0x14(%rbp)
movq -0x8(%rbp), %rcx
leaq 0x247c1(%rip), %rax     # 0x5ccc0
cmpq $0x0, (%rax,%rcx,8)
jne 0x3855a
movq -0x8(%rbp), %rcx
movl $0x1, %edi
shlq %cl, %rdi
shlq $0x3, %rdi
shlq $0x3, %rdi
callq 0x44e0
movq %rax, %rdx
movq -0x8(%rbp), %rcx
leaq 0x24793(%rip), %rax     # 0x5ccc0
movq %rdx, (%rax,%rcx,8)
movq -0x8(%rbp), %rcx
leaq 0x24784(%rip), %rax     # 0x5ccc0
cmpq $0x0, (%rax,%rcx,8)
jne 0x3854c
movl $0x2, -0x14(%rbp)
jmp 0x38558
movq -0x8(%rbp), %rdi
callq 0x3a490
movl %eax, -0x14(%rbp)
jmp 0x3855a
cmpl $0x0, -0x14(%rbp)
jne 0x3856c
movq -0x10(%rbp), %rdi
callq 0x3a490
movl %eax, -0x14(%rbp)
jmp 0x3856e
movl -0x14(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: kebwi[P]Trifid/src/FFT/fft2d.cpp
// Function: fft2dFree()
void fft2dFree(){
// free storage for columns of 2d ffts and call fftFree to free all BRLow and Utbl storage
long i1;
for (i1=8*sizeof(long)-1; i1>=0; i1--){
	if (Array2d[i1] != 0){
		free(Array2d[i1]);
		Array2d[i1] = 0;
	};
};
fftFree();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq $0x3f, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jl 0x385e0
movq -0x8(%rbp), %rcx
leaq 0x2471e(%rip), %rax     # 0x5ccc0
cmpq $0x0, (%rax,%rcx,8)
je 0x385d0
movq -0x8(%rbp), %rcx
leaq 0x2470c(%rip), %rax     # 0x5ccc0
movq (%rax,%rcx,8), %rdi
callq 0x4450
movq -0x8(%rbp), %rcx
leaq 0x246f8(%rip), %rax     # 0x5ccc0
movq $0x0, (%rax,%rcx,8)
jmp 0x385d2
movq -0x8(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x38590
callq 0x3a6f0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: kebwi[P]Trifid/src/FFT/fft2d.cpp
// Function: fft3dInit(long, long, long)
int fft3dInit(long L, long M2, long M){
	// init for fft3d, ifft3d
	// malloc storage for 4 columns and 4 pages of 3d ffts
	// then call fftinit for page, row and column ffts sizes
//* M = log2 of number of columns */
/* M2 = log2 of number of rows */
/* L = log2 of number of pages */
/*       of 3d matrix to be fourier transformed */
/* OUTPUTS */
/* private storage for columns and pages of 3d ffts	*/
/* calls fftInit for cosine and bit reversed tables	*/
int theError = 1;
if ((L >= 0) && (L < 8*sizeof(long))){
	theError = 0;
	if (Array2d[L] == 0){
		Array2d[L] = (Float_t *) malloc( 4*2*POW2(L)*sizeof(Float_t) );
		if (Array2d[L] == 0)
			theError = 2;
		else{
			theError = fftInit(L);
		}
	}
	if (theError == 0){
		if (Array2d[M2] == 0){
			Array2d[M2] = (Float_t *) malloc( 4*2*POW2(M2)*sizeof(Float_t) );
			if (Array2d[M2] == 0)
				theError = 2;
			else{
				theError = fftInit(M2);
			}
		}
	}
	if (theError == 0)
		theError = fftInit(M);
}
return theError;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x1, -0x1c(%rbp)
cmpq $0x0, -0x8(%rbp)
jl 0x38b90
cmpq $0x40, -0x8(%rbp)
jae 0x38b90
movl $0x0, -0x1c(%rbp)
movq -0x8(%rbp), %rcx
leaq 0x2420d(%rip), %rax     # 0x5ccc0
cmpq $0x0, (%rax,%rcx,8)
jne 0x38b0e
movq -0x8(%rbp), %rcx
movl $0x1, %edi
shlq %cl, %rdi
shlq $0x3, %rdi
shlq $0x3, %rdi
callq 0x44e0
movq %rax, %rdx
movq -0x8(%rbp), %rcx
leaq 0x241df(%rip), %rax     # 0x5ccc0
movq %rdx, (%rax,%rcx,8)
movq -0x8(%rbp), %rcx
leaq 0x241d0(%rip), %rax     # 0x5ccc0
cmpq $0x0, (%rax,%rcx,8)
jne 0x38b00
movl $0x2, -0x1c(%rbp)
jmp 0x38b0c
movq -0x8(%rbp), %rdi
callq 0x3a490
movl %eax, -0x1c(%rbp)
jmp 0x38b0e
cmpl $0x0, -0x1c(%rbp)
jne 0x38b7c
movq -0x10(%rbp), %rcx
leaq 0x241a1(%rip), %rax     # 0x5ccc0
cmpq $0x0, (%rax,%rcx,8)
jne 0x38b7a
movq -0x10(%rbp), %rcx
movl $0x1, %edi
shlq %cl, %rdi
shlq $0x3, %rdi
shlq $0x3, %rdi
callq 0x44e0
movq %rax, %rdx
movq -0x10(%rbp), %rcx
leaq 0x24173(%rip), %rax     # 0x5ccc0
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rbp), %rcx
leaq 0x24164(%rip), %rax     # 0x5ccc0
cmpq $0x0, (%rax,%rcx,8)
jne 0x38b6c
movl $0x2, -0x1c(%rbp)
jmp 0x38b78
movq -0x10(%rbp), %rdi
callq 0x3a490
movl %eax, -0x1c(%rbp)
jmp 0x38b7a
jmp 0x38b7c
cmpl $0x0, -0x1c(%rbp)
jne 0x38b8e
movq -0x18(%rbp), %rdi
callq 0x3a490
movl %eax, -0x1c(%rbp)
jmp 0x38b90
movl -0x1c(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: kebwi[P]Trifid/src/FFT/fftext.cpp
// Function: fftFree()
void fftFree(){
// release storage for all private cosine and bit reversed tables
long i1;
for (i1=8*sizeof(long)/2-1; i1>=0; i1--){
	if (BRLowArray[i1] != 0){
		free(BRLowArray[i1]);
		BRLowArray[i1] = 0;
	};
};
for (i1=8*sizeof(long)-1; i1>=0; i1--){
	if (UtblArray[i1] != 0){
		free(UtblArray[i1]);
		UtblArray[i1] = 0;
	};
};
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq $0x1f, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jl 0x3a750
movq -0x8(%rbp), %rcx
leaq 0x229ae(%rip), %rax     # 0x5d0c0
cmpq $0x0, (%rax,%rcx,8)
je 0x3a740
movq -0x8(%rbp), %rcx
leaq 0x2299c(%rip), %rax     # 0x5d0c0
movq (%rax,%rcx,8), %rdi
callq 0x4450
movq -0x8(%rbp), %rcx
leaq 0x22988(%rip), %rax     # 0x5d0c0
movq $0x0, (%rax,%rcx,8)
jmp 0x3a742
movq -0x8(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x3a700
movq $0x3f, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jl 0x3a7a8
movq -0x8(%rbp), %rcx
leaq 0x22756(%rip), %rax     # 0x5cec0
cmpq $0x0, (%rax,%rcx,8)
je 0x3a798
movq -0x8(%rbp), %rcx
leaq 0x22744(%rip), %rax     # 0x5cec0
movq (%rax,%rcx,8), %rdi
callq 0x4450
movq -0x8(%rbp), %rcx
leaq 0x22730(%rip), %rax     # 0x5cec0
movq $0x0, (%rax,%rcx,8)
jmp 0x3a79a
movq -0x8(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x3a758
addq $0x10, %rsp
popq %rbp
retq
nop