// File: /workspace/github_c_makefile_star2_O1/zpole[P]IICV/vl/sift.c
// Function: vl_sift_smooth
static void
_vl_sift_smooth (VlSiftFilt * self,
                 vl_sift_pix * outputImage,
                 vl_sift_pix * tempImage,
                 vl_sift_pix const * inputImage,
                 vl_size width,
                 vl_size height,
                 double sigma)
{
  /* prepare Gaussian filter */
  if (self->gaussFilterSigma != sigma) {
    vl_uindex j ;
    vl_sift_pix acc = 0 ;
    if (self->gaussFilter) vl_free (self->gaussFilter) ;
    self->gaussFilterWidth = VL_MAX(ceil(4.0 * sigma), 1) ;
    self->gaussFilterSigma = sigma ;
    self->gaussFilter = vl_malloc (sizeof(vl_sift_pix) * (2 * self->gaussFilterWidth + 1)) ;

    for (j = 0 ; j < 2 * self->gaussFilterWidth + 1 ; ++j) {
      vl_sift_pix d = ((vl_sift_pix)((signed)j - (signed)self->gaussFilterWidth)) / ((vl_sift_pix)sigma) ;
      self->gaussFilter[j] = (vl_sift_pix) exp (- 0.5 * (d*d)) ;
      acc += self->gaussFilter[j] ;
    }
    for (j = 0 ; j < 2 * self->gaussFilterWidth + 1 ; ++j) {
      self->gaussFilter[j] /= acc ;
    }
  }

  if (self->gaussFilterWidth == 0) {
    memcpy (outputImage, inputImage, sizeof(vl_sift_pix) * width * height) ;
    return ;
  }

  vl_imconvcol_vf (tempImage, height,
                   inputImage, width, height, width,
                   self->gaussFilter,
                   - self->gaussFilterWidth, self->gaussFilterWidth,
                   1, VL_PAD_BY_CONTINUITY | VL_TRANSPOSE) ;

  vl_imconvcol_vf (outputImage, width,
                   tempImage, height, width, height,
                   self->gaussFilter,
                   - self->gaussFilterWidth, self->gaussFilterWidth,
                   1, VL_PAD_BY_CONTINUITY | VL_TRANSPOSE) ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movapd %xmm0, %xmm1
movq %r9, %r15
movq %r8, %r14
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %rbx
movsd 0x68(%rdi), %xmm0
ucomisd %xmm1, %xmm0
jne 0x2bb96
jnp 0x2bca4
movq %rcx, 0x10(%rsp)
movq 0x60(%rbx), %rdi
testq %rdi, %rdi
movsd %xmm1, (%rsp)
je 0x2bbb3
callq 0x9580
movsd (%rsp), %xmm1
movsd 0x7685(%rip), %xmm0     # 0x33240
mulsd %xmm1, %xmm0
callq 0x99c0
maxsd 0x7694(%rip), %xmm0     # 0x33260
cvttsd2si %xmm0, %rax
movq %rax, %rcx
subsd 0x8044(%rip), %xmm0     # 0x33c20
sarq $0x3f, %rcx
cvttsd2si %xmm0, %rdx
andq %rcx, %rdx
orq %rax, %rdx
movq %rdx, 0x70(%rbx)
movsd (%rsp), %xmm0
movsd %xmm0, 0x68(%rbx)
leaq 0x4(,%rdx,8), %rdi
callq 0x95b0
movq %rax, 0x60(%rbx)
xorps %xmm0, %xmm0
cvtsd2ss (%rsp), %xmm0
movss %xmm0, 0xc(%rsp)
movq 0x70(%rbx), %rax
xorpd %xmm1, %xmm1
xorl %r12d, %r12d
movss %xmm1, (%rsp)
movl %r12d, %ecx
subl %eax, %ecx
xorps %xmm0, %xmm0
cvtsi2ss %ecx, %xmm0
divss 0xc(%rsp), %xmm0
mulss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
mulsd 0x75ce(%rip), %xmm0     # 0x33218
callq 0x9a60
movss (%rsp), %xmm1
cvtsd2ss %xmm0, %xmm0
movq 0x60(%rbx), %rax
movss %xmm0, (%rax,%r12,4)
addss %xmm0, %xmm1
leaq 0x1(%r12), %rcx
movq 0x70(%rbx), %rax
leaq (%rax,%rax), %rdx
cmpq %rdx, %r12
movq %rcx, %r12
jb 0x2bc23
movq 0x60(%rbx), %rsi
leaq 0x1(,%rax,2), %rax
xorl %edx, %edx
movq 0x10(%rsp), %rcx
movss (%rsi,%rdx,4), %xmm0
divss %xmm1, %xmm0
movss %xmm0, (%rsi,%rdx,4)
incq %rdx
cmpq %rdx, %rax
jne 0x2bc8e
movq 0x70(%rbx), %rax
testq %rax, %rax
je 0x2bd2c
movq %rax, %r10
negq %r10
subq $0x8, %rsp
movl $0x5, %r12d
movl $0x1, %r11d
movq %r13, %rdi
movq %r15, %rsi
movq %rcx, %rdx
movq %r14, %rcx
movq %r15, %r8
movq %r14, %r9
pushq %r12
pushq %r11
pushq %rax
pushq %r10
pushq 0x60(%rbx)
callq 0x92b0
addq $0x30, %rsp
movq 0x70(%rbx), %rax
movq %rax, %r10
negq %r10
subq $0x8, %rsp
movq %rbp, %rdi
movq %r14, %rsi
movq %r13, %rdx
movq %r15, %rcx
movq %r14, %r8
movq %r15, %r9
pushq %r12
movl $0x1, %r11d
pushq %r11
pushq %rax
pushq %r10
pushq 0x60(%rbx)
callq 0x92b0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
imulq %r15, %r14
shlq $0x2, %r14
movq %rbp, %rdi
movq %rcx, %rsi
movq %r14, %rdx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x95a0