// File: /workspace/github_cpp_makefile_star2_O1/kebwi[P]Trifid/src/SteerablePyramid.cpp
// Function: SteerablePyramid::SoftThreshold(std::vector<double, std::allocator<double>>)
void SteerablePyramid::SoftThreshold(vector<Float_t> thresholds)
{
	assert(width_ > 0 && height_ > 0);
	
	assert(thresholds.size() == numLevels_ + 1);
	for (int i = 0; i < thresholds.size(); i++)
		assert(thresholds[0] >= 0);
	
	int totalPixels = width_ * height_;
	if (thresholds[0] > 0)
		for (int i = 0; i < totalPixels; i++)
		{
			if (fabs(h0Coeffs_[i]) < thresholds[0])
				h0Coeffs_[i] = 0;
			else if (h0Coeffs_[i] > 0)
				h0Coeffs_[i] -= thresholds[0];
			else if (h0Coeffs_[i] < 0)
				h0Coeffs_[i] += thresholds[0];
		}
	
	for (int i = 0; i < numLevels_; i++)
	{
		Float_t threshold = thresholds[i + 1];
		
		if (threshold == 0)
			continue;
		
		int totalPixels = (width_ * height_) / (int)(pow(4, i));
		for (int j = 0; j < totalPixels; j++)
		{
			if (fabs(b1Coeffs_[i][j]) < threshold)
				b1Coeffs_[i][j] = 0;
			else if (b1Coeffs_[i][j] > 0)
				b1Coeffs_[i][j] -= threshold;
			else if (b1Coeffs_[i][j] < 0)
				b1Coeffs_[i][j] += threshold;
				
			if (fabs(b2Coeffs_[i][j]) < threshold)
				b2Coeffs_[i][j] = 0;
			else if (b2Coeffs_[i][j] > 0)
				b2Coeffs_[i][j] -= threshold;
			else if (b2Coeffs_[i][j] < 0)
				b2Coeffs_[i][j] += threshold;
				
			if (fabs(b3Coeffs_[i][j]) < threshold)
				b3Coeffs_[i][j] = 0;
			else if (b3Coeffs_[i][j] > 0)
				b3Coeffs_[i][j] -= threshold;
			else if (b3Coeffs_[i][j] < 0)
				b3Coeffs_[i][j] += threshold;
				
			if (fabs(b4Coeffs_[i][j]) < threshold)
				b4Coeffs_[i][j] = 0;
			else if (b4Coeffs_[i][j] > 0)
				b4Coeffs_[i][j] -= threshold;
			else if (b4Coeffs_[i][j] < 0)
				b4Coeffs_[i][j] += threshold;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl 0x30(%rdi), %ecx
testl %ecx, %ecx
jle 0x1ed0d
movq %rsi, %rbx
movq %rdi, %r14
movl 0x34(%rdi), %esi
testl %esi, %esi
jle 0x1ed0d
movq (%rbx), %rax
movq 0x8(%rbx), %rdx
movq %rdx, %rdi
subq %rax, %rdi
sarq $0x3, %rdi
movslq 0x38(%r14), %r8
incq %r8
cmpq %r8, %rdi
jne 0x1ed2c
cmpq %rax, %rdx
je 0x1eb0d
movsd (%rax), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x1ed4b
movsd (%rax), %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
jbe 0x1eb78
imull %ecx, %esi
movq (%r14), %rcx
cmpl $0x2, %esi
movl $0x1, %edx
cmovgel %esi, %edx
xorl %esi, %esi
movapd 0xc4da(%rip), %xmm1     # 0x2b010
movsd (%rcx,%rsi,8), %xmm2
movapd %xmm2, %xmm5
andpd %xmm1, %xmm5
movsd (%rax), %xmm3
xorpd %xmm4, %xmm4
ucomisd %xmm5, %xmm3
ja 0x1eb6b
ucomisd %xmm0, %xmm2
jbe 0x1eb5d
subsd %xmm3, %xmm2
jmp 0x1eb67
ucomisd %xmm2, %xmm0
jbe 0x1eb70
addsd %xmm3, %xmm2
movapd %xmm2, %xmm4
movsd %xmm4, (%rcx,%rsi,8)
incq %rsi
cmpq %rsi, %rdx
jne 0x1eb36
cmpl $0x0, 0x38(%r14)
jle 0x1ed02
xorl %r15d, %r15d
xorpd %xmm3, %xmm3
movq (%rbx), %rax
movsd 0x8(%rax,%r15,8), %xmm1
ucomisd %xmm3, %xmm1
jne 0x1eba0
jnp 0x1ecf2
movl 0x34(%r14), %ebp
imull 0x30(%r14), %ebp
leal (%r15,%r15), %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movsd %xmm1, (%rsp)
callq 0x32a0
movsd (%rsp), %xmm5
movapd 0xc444(%rip), %xmm4     # 0x2b010
xorpd %xmm3, %xmm3
cvttsd2si %xmm0, %ecx
movl %ebp, %eax
cltd
idivl %ecx
testl %eax, %eax
jle 0x1ecf2
movq 0x8(%r14), %rcx
movq 0x10(%r14), %rdx
movq (%rcx,%r15,8), %rcx
movq (%rdx,%r15,8), %rdx
movq 0x18(%r14), %rsi
movq (%rsi,%r15,8), %rsi
movq 0x20(%r14), %rdi
movq (%rdi,%r15,8), %rdi
movl %eax, %eax
xorl %r8d, %r8d
movsd (%rcx,%r8,8), %xmm0
movapd %xmm0, %xmm2
andpd %xmm4, %xmm2
xorpd %xmm1, %xmm1
ucomisd %xmm2, %xmm5
ja 0x1ec38
ucomisd %xmm3, %xmm0
jbe 0x1ec2a
subsd %xmm5, %xmm0
jmp 0x1ec34
ucomisd %xmm0, %xmm3
jbe 0x1ec3e
addsd %xmm5, %xmm0
movapd %xmm0, %xmm1
movsd %xmm1, (%rcx,%r8,8)
movsd (%rdx,%r8,8), %xmm0
movapd %xmm0, %xmm2
andpd %xmm4, %xmm2
xorpd %xmm1, %xmm1
ucomisd %xmm2, %xmm5
ja 0x1ec70
ucomisd %xmm3, %xmm0
jbe 0x1ec62
subsd %xmm5, %xmm0
jmp 0x1ec6c
ucomisd %xmm0, %xmm3
jbe 0x1ec76
addsd %xmm5, %xmm0
movapd %xmm0, %xmm1
movsd %xmm1, (%rdx,%r8,8)
movsd (%rsi,%r8,8), %xmm0
movapd %xmm0, %xmm2
andpd %xmm4, %xmm2
xorpd %xmm1, %xmm1
ucomisd %xmm2, %xmm5
ja 0x1eca8
ucomisd %xmm3, %xmm0
jbe 0x1ec9a
subsd %xmm5, %xmm0
jmp 0x1eca4
ucomisd %xmm0, %xmm3
jbe 0x1ecae
addsd %xmm5, %xmm0
movapd %xmm0, %xmm1
movsd %xmm1, (%rsi,%r8,8)
movsd (%rdi,%r8,8), %xmm0
movapd %xmm0, %xmm2
andpd %xmm4, %xmm2
xorpd %xmm1, %xmm1
ucomisd %xmm2, %xmm5
ja 0x1ece0
ucomisd %xmm3, %xmm0
jbe 0x1ecd2
subsd %xmm5, %xmm0
jmp 0x1ecdc
ucomisd %xmm0, %xmm3
jbe 0x1ece6
addsd %xmm5, %xmm0
movapd %xmm0, %xmm1
movsd %xmm1, (%rdi,%r8,8)
incq %r8
cmpq %r8, %rax
jne 0x1ec06
incq %r15
movslq 0x38(%r14), %rax
cmpq %rax, %r15
jl 0x1eb8a
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10353(%rip), %rdi     # 0x2f067
leaq 0xf59f(%rip), %rsi      # 0x2e2ba
leaq 0x103e5(%rip), %rcx     # 0x2f107
movl $0x635, %edx            # imm = 0x635
callq 0x31c0
leaq 0x1040a(%rip), %rdi     # 0x2f13d
leaq 0xf580(%rip), %rsi      # 0x2e2ba
leaq 0x103c6(%rip), %rcx     # 0x2f107
movl $0x637, %edx            # imm = 0x637
callq 0x31c0
leaq 0x1040f(%rip), %rdi     # 0x2f161
leaq 0xf561(%rip), %rsi      # 0x2e2ba
leaq 0x103a7(%rip), %rcx     # 0x2f107
movl $0x639, %edx            # imm = 0x639
callq 0x31c0