// File: /workspace/github_c_makefile_star2_O2/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 0x26cc8
jnp 0x26dc6
movq %rcx, 0x10(%rsp)
movq 0x60(%rbx), %rdi
testq %rdi, %rdi
movsd %xmm1, (%rsp)
je 0x26ce5
callq 0x95b0
movsd (%rsp), %xmm1
movsd 0x652b(%rip), %xmm0     # 0x2d218
mulsd %xmm1, %xmm0
callq 0x9a40
maxsd 0x653a(%rip), %xmm0     # 0x2d238
cvttsd2si %xmm0, %rax
movq %rax, %rcx
subsd 0x6eba(%rip), %xmm0     # 0x2dbc8
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 0x95e0
cvtsd2ss (%rsp), %xmm0
movss %xmm0, 0xc(%rsp)
movq %rax, 0x60(%rbx)
xorpd %xmm1, %xmm1
xorl %r12d, %r12d
movq 0x70(%rbx), %r10
leaq (%r10,%r10), %rcx
cmpq %rcx, %r12
ja 0x26da1
movl %r12d, %eax
subl %r10d, %eax
cvtsi2ss %eax, %xmm0
divss 0xc(%rsp), %xmm0
mulss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
mulsd 0x6475(%rip), %xmm0     # 0x2d1f0
movss %xmm1, (%rsp)
callq 0x9ae0
movss (%rsp), %xmm1
cvtsd2ss %xmm0, %xmm0
movq 0x60(%rbx), %rax
movss %xmm0, (%rax,%r12,4)
addss %xmm0, %xmm1
incq %r12
jmp 0x26d4e
orq $0x1, %rcx
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x26dbf
movss (%rax,%rdx,4), %xmm0
divss %xmm1, %xmm0
movss %xmm0, (%rax,%rdx,4)
incq %rdx
jmp 0x26da7
movq 0x10(%rsp), %rcx
jmp 0x26dca
movq 0x70(%rbx), %r10
testq %r10, %r10
je 0x26e48
movq %r10, %rax
negq %rax
subq $0x8, %rsp
pushq $0x5
popq %r12
pushq $0x1
popq %r11
movq %r13, %rdi
movq %r15, %rsi
movq %rcx, %rdx
movq %r14, %rcx
movq %r15, %r8
movq %r14, %r9
pushq %r12
pushq %r11
pushq %r10
pushq %rax
pushq 0x60(%rbx)
callq 0x92c0
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
pushq $0x1
popq %r11
pushq %r11
pushq %rax
pushq %r10
pushq 0x60(%rbx)
callq 0x92c0
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 0x95d0