// File: /workspace/github_c_makefile_star2_O0/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:
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movq %rdx, 0x60(%rsp)
movq %rcx, 0x58(%rsp)
movq %r8, 0x50(%rsp)
movq %r9, 0x48(%rsp)
movsd %xmm0, 0x40(%rsp)
movq 0x70(%rsp), %rax
movsd 0x68(%rax), %xmm0
ucomisd 0x40(%rsp), %xmm0
jne 0x4cb61
jp 0x4cb61
jmp 0x4cd4a
xorps %xmm0, %xmm0
movss %xmm0, 0x34(%rsp)
movq 0x70(%rsp), %rax
cmpq $0x0, 0x60(%rax)
je 0x4cb84
movq 0x70(%rsp), %rax
movq 0x60(%rax), %rdi
callq 0x9620
movsd 0xc58c(%rip), %xmm0     # 0x59118
mulsd 0x40(%rsp), %xmm0
callq 0x9b70
movsd 0xc539(%rip), %xmm1     # 0x590d8
ucomisd %xmm1, %xmm0
jbe 0x4cbc0
movsd 0xc56b(%rip), %xmm0     # 0x59118
mulsd 0x40(%rsp), %xmm0
callq 0x9b70
movsd %xmm0, 0x28(%rsp)
jmp 0x4cbd0
movsd 0xc510(%rip), %xmm0     # 0x590d8
movsd %xmm0, 0x28(%rsp)
jmp 0x4cbd0
movsd 0x28(%rsp), %xmm0
movsd 0xce12(%rip), %xmm2     # 0x599f0
movaps %xmm0, %xmm1
subsd %xmm2, %xmm1
cvttsd2si %xmm1, %rax
cvttsd2si %xmm0, %rcx
movq %rcx, %rdx
sarq $0x3f, %rdx
andq %rdx, %rax
orq %rax, %rcx
movq 0x70(%rsp), %rax
movq %rcx, 0x70(%rax)
movsd 0x40(%rsp), %xmm0
movq 0x70(%rsp), %rax
movsd %xmm0, 0x68(%rax)
movq 0x70(%rsp), %rax
movq 0x70(%rax), %rdi
shlq %rdi
addq $0x1, %rdi
shlq $0x2, %rdi
callq 0x9660
movq %rax, %rcx
movq 0x70(%rsp), %rax
movq %rcx, 0x60(%rax)
movq $0x0, 0x38(%rsp)
movq 0x38(%rsp), %rax
movq 0x70(%rsp), %rcx
movq 0x70(%rcx), %rcx
shlq %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jae 0x4ccf3
movq 0x38(%rsp), %rax
movq 0x70(%rsp), %rcx
movq 0x70(%rcx), %rcx
subl %ecx, %eax
cvtsi2ss %eax, %xmm0
movsd 0x40(%rsp), %xmm1
cvtsd2ss %xmm1, %xmm1
divss %xmm1, %xmm0
movss %xmm0, 0x30(%rsp)
movss 0x30(%rsp), %xmm0
mulss 0x30(%rsp), %xmm0
cvtss2sd %xmm0, %xmm1
movsd 0xc447(%rip), %xmm0     # 0x590e8
mulsd %xmm1, %xmm0
callq 0x9c10
cvtsd2ss %xmm0, %xmm0
movq 0x70(%rsp), %rax
movq 0x60(%rax), %rax
movq 0x38(%rsp), %rcx
movss %xmm0, (%rax,%rcx,4)
movq 0x70(%rsp), %rax
movq 0x60(%rax), %rax
movq 0x38(%rsp), %rcx
movss (%rax,%rcx,4), %xmm0
addss 0x34(%rsp), %xmm0
movss %xmm0, 0x34(%rsp)
movq 0x38(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x38(%rsp)
jmp 0x4cc43
movq $0x0, 0x38(%rsp)
movq 0x38(%rsp), %rax
movq 0x70(%rsp), %rcx
movq 0x70(%rcx), %rcx
shlq %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jae 0x4cd48
movss 0x34(%rsp), %xmm1
movq 0x70(%rsp), %rax
movq 0x60(%rax), %rax
movq 0x38(%rsp), %rcx
movss (%rax,%rcx,4), %xmm0
divss %xmm1, %xmm0
movss %xmm0, (%rax,%rcx,4)
movq 0x38(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x38(%rsp)
jmp 0x4ccfc
jmp 0x4cd4a
movq 0x70(%rsp), %rax
cmpq $0x0, 0x70(%rax)
jne 0x4cd79
movq 0x68(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq 0x50(%rsp), %rdx
shlq $0x2, %rdx
imulq 0x48(%rsp), %rdx
callq 0x9640
jmp 0x4ce37
movq 0x60(%rsp), %rdi
movq 0x48(%rsp), %rsi
movq 0x58(%rsp), %rdx
movq 0x50(%rsp), %rcx
movq 0x48(%rsp), %r8
movq 0x50(%rsp), %r9
movq 0x70(%rsp), %rax
movq 0x60(%rax), %r11
movq 0x70(%rsp), %rax
xorl %r10d, %r10d
subq 0x70(%rax), %r10
movq 0x70(%rsp), %rax
movq 0x70(%rax), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movl $0x1, 0x18(%rsp)
movl $0x5, 0x20(%rsp)
callq 0x92f0
movq 0x68(%rsp), %rdi
movq 0x50(%rsp), %rsi
movq 0x60(%rsp), %rdx
movq 0x48(%rsp), %rcx
movq 0x50(%rsp), %r8
movq 0x48(%rsp), %r9
movq 0x70(%rsp), %rax
movq 0x60(%rax), %r11
movq 0x70(%rsp), %rax
xorl %r10d, %r10d
subq 0x70(%rax), %r10
movq 0x70(%rsp), %rax
movq 0x70(%rax), %rax
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movl $0x1, 0x18(%rsp)
movl $0x5, 0x20(%rsp)
callq 0x92f0
addq $0x78, %rsp
retq
nopl (%rax)