// File: /workspace/github_cpp_makefile_star2_O3/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 0xcd5f(%rip), %xmm0     # 0x2a058
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 0xcd33(%rip), %xmm0     # 0x2a058
movl %ebx, 0x8(%rsp)
movl %ebx, %edi
callq 0x3410
movsd (%rsp), %xmm1
divsd %xmm0, %xmm1
cvttsd2si %xmm1, %r12d
movq %r13, %rdi
callq 0x1b8b4
testl %r12d, %r12d
jle 0x1d3f7
movq 0x40(%r13), %rcx
movl %r12d, %esi
leal 0x1(%r12), %edx
decq %rsi
movq %rsi, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
shrl %edx
shlq $0x3, %rdx
leal (%r15,%r15), %esi
movdqa 0xfe56(%rip), %xmm1     # 0x2d1d0
xorl %edi, %edi
movdqa 0xfe5c(%rip), %xmm2     # 0x2d1e0
pxor %xmm2, %xmm0
pcmpeqd %xmm3, %xmm3
movdqa 0xfe5c(%rip), %xmm4     # 0x2d1f0
xorl %r8d, %r8d
movdqa %xmm1, %xmm5
pxor %xmm2, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
movd %xmm5, %r9d
notl %r9d
testb $0x1, %r9b
je 0x1d3cf
movl %edi, (%rcx,%r8)
pxor %xmm3, %xmm5
pextrw $0x4, %xmm5, %r9d
testb $0x1, %r9b
je 0x1d3e8
leal (%r15,%rdi), %r9d
movl %r9d, 0x4(%rcx,%r8)
paddq %xmm4, %xmm1
addq $0x8, %r8
addl %esi, %edi
cmpq %r8, %rdx
jne 0x1d397
movslq %eax, %rbp
movl 0x8(%rsp), %eax
movslq %eax, %rbx
testl %eax, %eax
je 0x1d413
movq 0x28(%r13), %rax
movq -0x8(%rax,%rbx,8), %rdi
jmp 0x1d4cb
movq 0x1c6ce(%rip), %rsi     # 0x39ae8
movq %r14, %rdi
movl %r15d, %edx
movl %r12d, %ecx
callq 0x194c7
testb %al, %al
je 0x1d72b
movq 0x1c6b1(%rip), %rdi     # 0x39ae8
movq 0x1c68a(%rip), %rax     # 0x39ac8
movq %rbp, (%rsp)
imulq $0x158, %rbp, %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 0x196dd
testb %al, %al
je 0x1d74a
movl %r12d, %eax
imull %r15d, %eax
cltq
leaq (,%rax,8), %rcx
testl %eax, %eax
movq $-0x1, %rdi
cmovnsq %rcx, %rdi
callq 0x3030
movq %rax, %rbp
movq 0x1c64e(%rip), %rdi     # 0x39ae8
movq 0x1c627(%rip), %rax     # 0x39ac8
movq 0x10(%rsp), %rcx
movq 0x20(%rax,%rcx), %rax
movq (%rax), %rsi
movl %r15d, %edx
movl %r12d, %ecx
movq %rbp, %r8
callq 0x196dd
movq %rbp, %rdi
testb %al, %al
movq (%rsp), %rbp
je 0x1d769
movq 0x1c616(%rip), %rsi     # 0x39ae8
movq %rdi, (%rsp)
movl %r15d, %edx
movl %r12d, %ecx
callq 0x194c7
testb %al, %al
je 0x1d671
movq 0x1c5f8(%rip), %rdi     # 0x39ae8
movq 0x1c5d1(%rip), %rax     # 0x39ac8
imulq $0x158, %rbp, %rbp      # imm = 0x158
movq 0x50(%rax,%rbp), %rax
movq (%rax,%rbx,8), %rsi
movq 0x8(%r13), %rax
movq (%rax,%rbx,8), %r8
movl %r15d, %edx
movl %r12d, %ecx
callq 0x196dd
testb %al, %al
je 0x1d690
movq 0x1c5bf(%rip), %rdi     # 0x39ae8
movq 0x1c598(%rip), %rax     # 0x39ac8
movq 0x68(%rax,%rbp), %rax
movq (%rax,%rbx,8), %rsi
movq 0x10(%r13), %rax
movq (%rax,%rbx,8), %r8
movl %r15d, %edx
movl %r12d, %ecx
callq 0x196dd
testb %al, %al
je 0x1d6af
movq 0x1c58d(%rip), %rdi     # 0x39ae8
movq 0x1c566(%rip), %rax     # 0x39ac8
movq 0x80(%rax,%rbp), %rax
movq (%rax,%rbx,8), %rsi
movq 0x18(%r13), %rax
movq (%rax,%rbx,8), %r8
movl %r15d, %edx
movl %r12d, %ecx
callq 0x196dd
testb %al, %al
je 0x1d6ce
movq 0x1c558(%rip), %rdi     # 0x39ae8
movq 0x1c531(%rip), %rax     # 0x39ac8
movq 0x98(%rax,%rbp), %rax
movq (%rax,%rbx,8), %rsi
movq 0x20(%r13), %rax
movq (%rax,%rbx,8), %r8
movl %r15d, %edx
movl %r12d, %ecx
callq 0x196dd
testb %al, %al
je 0x1d6ed
movq 0x1c523(%rip), %rdi     # 0x39ae8
movq 0x1c4fc(%rip), %rax     # 0x39ac8
movq 0x38(%rax,%rbp), %rax
movq (%rax,%rbx,8), %rsi
movl %r15d, %edx
movl %r12d, %ecx
movq %r14, %r8
callq 0x196dd
testb %al, %al
je 0x1d70c
cmpl $0x2, %r12d
jl 0x1d63f
shrl %r12d
movq 0x28(%r13), %rax
movq (%rax,%rbx,8), %rax
leal (%r15,%r15), %ecx
movl %r15d, %edx
shrl $0x1f, %edx
addl %r15d, %edx
sarl %edx
xorl %esi, %esi
cmpl $0x2, %r15d
jl 0x1d637
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 0x1d622
incq %rsi
cmpq %r12, %rsi
jne 0x1d60d
cmpl $0x0, 0x8(%rsp)
movq (%rsp), %rdi
jne 0x1d662
testq %rdi, %rdi
je 0x1d662
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 0x10198(%rip), %rdi     # 0x2d810
leaq 0xfca3(%rip), %rsi      # 0x2d322
leaq 0x10042(%rip), %rcx     # 0x2d6c8
movl $0x4cc, %edx            # imm = 0x4CC
callq 0x31c0
leaq 0x101bc(%rip), %rdi     # 0x2d853
leaq 0xfc84(%rip), %rsi      # 0x2d322
leaq 0x10023(%rip), %rcx     # 0x2d6c8
movl $0x4ce, %edx            # imm = 0x4CE
callq 0x31c0
leaq 0x10221(%rip), %rdi     # 0x2d8d7
leaq 0xfc65(%rip), %rsi      # 0x2d322
leaq 0x10004(%rip), %rcx     # 0x2d6c8
movl $0x4cf, %edx            # imm = 0x4CF
callq 0x31c0
leaq 0x10286(%rip), %rdi     # 0x2d95b
leaq 0xfc46(%rip), %rsi      # 0x2d322
leaq 0xffe5(%rip), %rcx      # 0x2d6c8
movl $0x4d0, %edx            # imm = 0x4D0
callq 0x31c0
leaq 0x102eb(%rip), %rdi     # 0x2d9df
leaq 0xfc27(%rip), %rsi      # 0x2d322
leaq 0xffc6(%rip), %rcx      # 0x2d6c8
movl $0x4d1, %edx            # imm = 0x4D1
callq 0x31c0
leaq 0x10350(%rip), %rdi     # 0x2da63
leaq 0xfc08(%rip), %rsi      # 0x2d322
leaq 0xffa7(%rip), %rcx      # 0x2d6c8
movl $0x4d2, %edx            # imm = 0x4D2
callq 0x31c0
leaq 0xff58(%rip), %rdi      # 0x2d68a
leaq 0xfbe9(%rip), %rsi      # 0x2d322
leaq 0xff88(%rip), %rcx      # 0x2d6c8
movl $0x4c3, %edx            # imm = 0x4C3
callq 0x31c0
leaq 0xffbe(%rip), %rdi      # 0x2d70f
leaq 0xfbca(%rip), %rsi      # 0x2d322
leaq 0xff69(%rip), %rcx      # 0x2d6c8
movl $0x4c4, %edx            # imm = 0x4C4
callq 0x31c0
leaq 0x1001c(%rip), %rdi     # 0x2d78c
leaq 0xfbab(%rip), %rsi      # 0x2d322
leaq 0xff4a(%rip), %rcx      # 0x2d6c8
movl $0x4c8, %edx            # imm = 0x4C8
callq 0x31c0