// File: /workspace/github_c_makefile_star2_O3/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 0x2b90a
jnp 0x2ba16
movq %rcx, 0x10(%rsp)
movq 0x60(%rbx), %rdi
testq %rdi, %rdi
movsd %xmm1, (%rsp)
je 0x2b927
callq 0x9580
movsd (%rsp), %xmm1
movsd 0x6921(%rip), %xmm0     # 0x32250
mulsd %xmm1, %xmm0
callq 0x99c0
maxsd 0x6930(%rip), %xmm0     # 0x32270
cvttsd2si %xmm0, %rax
movq %rax, %rcx
subsd 0x72c0(%rip), %xmm0     # 0x32c10
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 0x686a(%rip), %xmm0     # 0x32228
callq 0x9a60
movss (%rsp), %xmm1
cvtsd2ss %xmm0, %xmm0
movq 0x60(%rbx), %rcx
movss %xmm0, (%rcx,%r12,4)
addss %xmm0, %xmm1
leaq 0x1(%r12), %rdx
movq 0x70(%rbx), %rax
leaq (%rax,%rax), %rsi
cmpq %rsi, %r12
movq %rdx, %r12
jb 0x2b997
leaq 0x1(,%rax,2), %rdx
xorl %esi, %esi
movss (%rcx,%rsi,4), %xmm0
divss %xmm1, %xmm0
movss %xmm0, (%rcx,%rsi,4)
incq %rsi
cmpq %rsi, %rdx
jne 0x2b9f9
movq 0x10(%rsp), %rcx
jmp 0x2ba1a
movq 0x70(%rbx), %rax
testq %rax, %rax
je 0x2ba9e
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