// File: /workspace/github_cpp_makefile_star2_O1/kebwi[P]Trifid/src/SteerablePyramid.cpp
// Function: SteerablePyramid::DoOneStepWaveletAnalysisUsingFT(double*, int)
void SteerablePyramid::DoOneStepWaveletAnalysisUsingFT(Float_t* pixelValues, int level)
{
	int horDim = width_ / pow(2, level);
	int verDim = height_ / pow(2, level);
	
	int filterIndex = getFilterFTIndex();
	
	for (int i = 0; i < verDim; i++)
		yLookup_[i] = i * horDim;
	
	Float_t *l0OriginalCoeffs = NULL;
	
	if (level == 0)
	{
		assert(doFourierAnalysis(pixelValues, scratch_2D_B_, horDim, verDim));
		assert(multiplyFourierTransformsAndInvert(scratch_2D_B_, skFiltersFTs[filterIndex].filtersFTs[0][level], horDim, verDim, h0Coeffs_));
		
		l0OriginalCoeffs = new Float_t[horDim * verDim];
		assert(l0OriginalCoeffs);
		assert(multiplyFourierTransformsAndInvert(scratch_2D_B_, skFiltersFTs[filterIndex].filtersFTs[1][level], horDim, verDim, l0OriginalCoeffs));
	}
	else l0OriginalCoeffs = l1Coeffs_[level - 1];
	
	assert(doFourierAnalysis(l0OriginalCoeffs, scratch_2D_B_, horDim, verDim));
	
	assert(multiplyFourierTransformsAndInvert(scratch_2D_B_, skFiltersFTs[filterIndex].filtersFTs[3][level], horDim, verDim, b1Coeffs_[level]));
	assert(multiplyFourierTransformsAndInvert(scratch_2D_B_, skFiltersFTs[filterIndex].filtersFTs[4][level], horDim, verDim, b2Coeffs_[level]));
	assert(multiplyFourierTransformsAndInvert(scratch_2D_B_, skFiltersFTs[filterIndex].filtersFTs[5][level], horDim, verDim, b3Coeffs_[level]));
	assert(multiplyFourierTransformsAndInvert(scratch_2D_B_, skFiltersFTs[filterIndex].filtersFTs[6][level], horDim, verDim, b4Coeffs_[level]));
	assert(multiplyFourierTransformsAndInvert(scratch_2D_B_, skFiltersFTs[filterIndex].filtersFTs[2][level], horDim, verDim, pixelValues));
	
	const Float_t *pixelPtr;
	Float_t *coeffPtr = l1Coeffs_[level];
	for (int y = 0; y < verDim / 2; y++)
	{
		pixelPtr = &pixelValues[(y * 2) * horDim];
		for (int x = 0; x < horDim / 2; x++)
		{
			*coeffPtr++ = *pixelPtr;
			pixelPtr += 2;
		}
	}
	
	if (level == 0)
		delete [] l0OriginalCoeffs;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r13
cvtsi2sdl 0x30(%rdi), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0xd8f1(%rip), %xmm0     # 0x2b058
movl %edx, %edi
callq 0x3410
movsd 0x8(%rsp), %xmm1
divsd %xmm0, %xmm1
cvttsd2si %xmm1, %r15d
xorps %xmm0, %xmm0
cvtsi2sdl 0x34(%r13), %xmm0
movsd %xmm0, (%rsp)
movsd 0xd8c5(%rip), %xmm0     # 0x2b058
movl %ebx, 0x8(%rsp)
movl %ebx, %edi
callq 0x3410
movsd (%rsp), %xmm1
divsd %xmm0, %xmm1
cvttsd2si %xmm1, %r12d
movq %r13, %rdi
callq 0x1bdac
testl %r12d, %r12d
jle 0x1d7d2
movq 0x40(%r13), %rcx
movl %r12d, %edx
xorl %esi, %esi
xorl %edi, %edi
movl %esi, (%rcx,%rdi,4)
incq %rdi
addl %r15d, %esi
cmpq %rdi, %rdx
jne 0x1d7c4
movslq %eax, %rbx
movl 0x8(%rsp), %eax
movslq %eax, %rbp
testl %eax, %eax
je 0x1d7ee
movq 0x28(%r13), %rax
movq -0x8(%rax,%rbp,8), %rdi
jmp 0x1d8a6
movq 0x1c2f3(%rip), %rsi     # 0x39ae8
movq %r14, %rdi
movl %r15d, %edx
movl %r12d, %ecx
callq 0x1995b
testb %al, %al
je 0x1db06
movq 0x1c2d6(%rip), %rdi     # 0x39ae8
movq 0x1c2af(%rip), %rax     # 0x39ac8
movq %rbx, (%rsp)
imulq $0x158, %rbx, %rcx      # imm = 0x158
movq %rcx, 0x10(%rsp)
movq 0x8(%rax,%rcx), %rax
movq (%rax), %rsi
movq (%r13), %r8
movl %r15d, %edx
movl %r12d, %ecx
callq 0x19b7e
testb %al, %al
je 0x1db25
movl %r12d, %eax
imull %r15d, %eax
cltq
leaq (,%rax,8), %rcx
testl %eax, %eax
movq $-0x1, %rdi
cmovnsq %rcx, %rdi
callq 0x3030
movq %rax, %rbx
movq 0x1c273(%rip), %rdi     # 0x39ae8
movq 0x1c24c(%rip), %rax     # 0x39ac8
movq 0x10(%rsp), %rcx
movq 0x20(%rax,%rcx), %rax
movq (%rax), %rsi
movl %r15d, %edx
movl %r12d, %ecx
movq %rbx, %r8
callq 0x19b7e
movq %rbx, %rdi
testb %al, %al
movq (%rsp), %rbx
je 0x1db44
movq 0x1c23b(%rip), %rsi     # 0x39ae8
movq %rdi, (%rsp)
movl %r15d, %edx
movl %r12d, %ecx
callq 0x1995b
testb %al, %al
je 0x1da4c
movq 0x1c21d(%rip), %rdi     # 0x39ae8
movq 0x1c1f6(%rip), %rax     # 0x39ac8
imulq $0x158, %rbx, %rbx      # imm = 0x158
movq 0x50(%rax,%rbx), %rax
movq (%rax,%rbp,8), %rsi
movq 0x8(%r13), %rax
movq (%rax,%rbp,8), %r8
movl %r15d, %edx
movl %r12d, %ecx
callq 0x19b7e
testb %al, %al
je 0x1da6b
movq 0x1c1e4(%rip), %rdi     # 0x39ae8
movq 0x1c1bd(%rip), %rax     # 0x39ac8
movq 0x68(%rax,%rbx), %rax
movq (%rax,%rbp,8), %rsi
movq 0x10(%r13), %rax
movq (%rax,%rbp,8), %r8
movl %r15d, %edx
movl %r12d, %ecx
callq 0x19b7e
testb %al, %al
je 0x1da8a
movq 0x1c1b2(%rip), %rdi     # 0x39ae8
movq 0x1c18b(%rip), %rax     # 0x39ac8
movq 0x80(%rax,%rbx), %rax
movq (%rax,%rbp,8), %rsi
movq 0x18(%r13), %rax
movq (%rax,%rbp,8), %r8
movl %r15d, %edx
movl %r12d, %ecx
callq 0x19b7e
testb %al, %al
je 0x1daa9
movq 0x1c17d(%rip), %rdi     # 0x39ae8
movq 0x1c156(%rip), %rax     # 0x39ac8
movq 0x98(%rax,%rbx), %rax
movq (%rax,%rbp,8), %rsi
movq 0x20(%r13), %rax
movq (%rax,%rbp,8), %r8
movl %r15d, %edx
movl %r12d, %ecx
callq 0x19b7e
testb %al, %al
je 0x1dac8
movq 0x1c148(%rip), %rdi     # 0x39ae8
movq 0x1c121(%rip), %rax     # 0x39ac8
movq 0x38(%rax,%rbx), %rax
movq (%rax,%rbp,8), %rsi
movl %r15d, %edx
movl %r12d, %ecx
movq %r14, %r8
callq 0x19b7e
testb %al, %al
je 0x1dae7
cmpl $0x2, %r12d
jl 0x1da1a
shrl %r12d
movq 0x28(%r13), %rax
movq (%rax,%rbp,8), %rax
leal (%r15,%r15), %ecx
movl %r15d, %edx
shrl $0x1f, %edx
addl %r15d, %edx
sarl %edx
xorl %esi, %esi
cmpl $0x2, %r15d
jl 0x1da12
movl %ecx, %edi
imull %esi, %edi
movslq %edi, %rdi
leaq (%r14,%rdi,8), %rdi
movl %edx, %r8d
movsd (%rdi), %xmm0
movsd %xmm0, (%rax)
addq $0x8, %rax
addq $0x10, %rdi
decl %r8d
jne 0x1d9fd
incq %rsi
cmpq %r12, %rsi
jne 0x1d9e8
cmpl $0x0, 0x8(%rsp)
movq (%rsp), %rdi
jne 0x1da3d
testq %rdi, %rdi
je 0x1da3d
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x33c0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10d55(%rip), %rdi     # 0x2e7a8
leaq 0x10860(%rip), %rsi     # 0x2e2ba
leaq 0x10bff(%rip), %rcx     # 0x2e660
movl $0x4cc, %edx            # imm = 0x4CC
callq 0x31c0
leaq 0x10d79(%rip), %rdi     # 0x2e7eb
leaq 0x10841(%rip), %rsi     # 0x2e2ba
leaq 0x10be0(%rip), %rcx     # 0x2e660
movl $0x4ce, %edx            # imm = 0x4CE
callq 0x31c0
leaq 0x10dde(%rip), %rdi     # 0x2e86f
leaq 0x10822(%rip), %rsi     # 0x2e2ba
leaq 0x10bc1(%rip), %rcx     # 0x2e660
movl $0x4cf, %edx            # imm = 0x4CF
callq 0x31c0
leaq 0x10e43(%rip), %rdi     # 0x2e8f3
leaq 0x10803(%rip), %rsi     # 0x2e2ba
leaq 0x10ba2(%rip), %rcx     # 0x2e660
movl $0x4d0, %edx            # imm = 0x4D0
callq 0x31c0
leaq 0x10ea8(%rip), %rdi     # 0x2e977
leaq 0x107e4(%rip), %rsi     # 0x2e2ba
leaq 0x10b83(%rip), %rcx     # 0x2e660
movl $0x4d1, %edx            # imm = 0x4D1
callq 0x31c0
leaq 0x10f0d(%rip), %rdi     # 0x2e9fb
leaq 0x107c5(%rip), %rsi     # 0x2e2ba
leaq 0x10b64(%rip), %rcx     # 0x2e660
movl $0x4d2, %edx            # imm = 0x4D2
callq 0x31c0
leaq 0x10b15(%rip), %rdi     # 0x2e622
leaq 0x107a6(%rip), %rsi     # 0x2e2ba
leaq 0x10b45(%rip), %rcx     # 0x2e660
movl $0x4c3, %edx            # imm = 0x4C3
callq 0x31c0
leaq 0x10b7b(%rip), %rdi     # 0x2e6a7
leaq 0x10787(%rip), %rsi     # 0x2e2ba
leaq 0x10b26(%rip), %rcx     # 0x2e660
movl $0x4c4, %edx            # imm = 0x4C4
callq 0x31c0
leaq 0x10bd9(%rip), %rdi     # 0x2e724
leaq 0x10768(%rip), %rsi     # 0x2e2ba
leaq 0x10b07(%rip), %rcx     # 0x2e660
movl $0x4c8, %edx            # imm = 0x4C8
callq 0x31c0
nop