// File: /workspace/github_c_makefile_star2_O0/zpole[P]IICV/vl/imopv.c
// Function: vl_imconvcol_vf
VL_EXPORT void
VL_XCAT(vl_imconvcol_v, SFX)
(T* dst, vl_size dst_stride,
 T const* src,
 vl_size src_width, vl_size src_height, vl_size src_stride,
 T const* filt, vl_index filt_begin, vl_index filt_end,
 int step, unsigned int flags)
{
  vl_index x = 0 ;
  vl_index y ;
  vl_index dheight = (src_height - 1) / step + 1 ;
  vl_bool transp = flags & VL_TRANSPOSE ;
  vl_bool zeropad = (flags & VL_PAD_MASK) == VL_PAD_BY_ZERO ;

  /* dispatch to accelerated version */
#ifndef VL_DISABLE_SSE2
  if (vl_cpu_has_sse2() && vl_get_simd_enabled()) {
    VL_XCAT3(_vl_imconvcol_v,SFX,_sse2)
    (dst,dst_stride,
     src,src_width,src_height,src_stride,
     filt,filt_begin,filt_end,
     step,flags) ;
    return ;
  }
#endif

  /* let filt point to the last sample of the filter */
  filt += filt_end - filt_begin ;

  while (x < (signed)src_width) {
    /* Calculate dest[x,y] = sum_p image[x,p] filt[y - p]
     * where supp(filt) = [filt_begin, filt_end] = [fb,fe].
     *
     * CHUNK_A: y - fe <= p < 0
     *          completes VL_MAX(fe - y, 0) samples
     * CHUNK_B: VL_MAX(y - fe, 0) <= p < VL_MIN(y - fb, height - 1)
     *          completes fe - VL_MAX(fb, height - y) + 1 samples
     * CHUNK_C: completes all samples
     */
    T const *filti ;
    vl_index stop ;

    for (y = 0 ; y < (signed)src_height ; y += step) {
      T acc = 0 ;
      T v = 0, c ;
      T const* srci ;

      filti = filt ;
      stop = filt_end - y ;
      srci = src + x - stop * src_stride ;

      if (stop > 0) {
        if (zeropad) {
          v = 0 ;
        } else {
          v = *(src + x) ;
        }
        while (filti > filt - stop) {
          c = *filti-- ;
          acc += v * c ;
          srci += src_stride ;
        }
      }

      stop = filt_end - VL_MAX(filt_begin, y - (signed)src_height + 1) + 1 ;
      while (filti > filt - stop) {
        v = *srci ;
        c = *filti-- ;
        acc += v * c ;
        srci += src_stride ;
      }

      if (zeropad) v = 0 ;

      stop = filt_end - filt_begin + 1 ;
      while (filti > filt - stop) {
        c = *filti-- ;
        acc += v * c ;
      }

      if (transp) {
        *dst = acc ; dst += 1 ;
      } else {
        *dst = acc ; dst += dst_stride ;
      }
    } /* next y */
    if (transp) {
      dst += 1 * dst_stride - dheight * 1 ;
    } else {
      dst += 1 * 1 - dheight * dst_stride ;
    }
    x += 1 ;
  } /* next x */
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xb8, %rsp
movl 0xf0(%rsp), %eax
movl 0xe8(%rsp), %eax
movq 0xe0(%rsp), %rax
movq 0xd8(%rsp), %rax
movq 0xd0(%rsp), %rax
movq %rdi, 0xb0(%rsp)
movq %rsi, 0xa8(%rsp)
movq %rdx, 0xa0(%rsp)
movq %rcx, 0x98(%rsp)
movq %r8, 0x90(%rsp)
movq %r9, 0x88(%rsp)
movq $0x0, 0x80(%rsp)
movq 0x90(%rsp), %rax
subq $0x1, %rax
movslq 0xe8(%rsp), %rcx
xorl %edx, %edx
divq %rcx
addq $0x1, %rax
movq %rax, 0x70(%rsp)
movl 0xf0(%rsp), %eax
andl $0x4, %eax
movl %eax, 0x6c(%rsp)
movl 0xf0(%rsp), %eax
andl $0x3, %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x68(%rsp)
callq 0x96f0
cmpl $0x0, %eax
je 0x25655
callq 0x9240
cmpl $0x0, %eax
je 0x25655
movq 0xb0(%rsp), %rdi
movq 0xa8(%rsp), %rsi
movq 0xa0(%rsp), %rdx
movq 0x98(%rsp), %rcx
movq 0x90(%rsp), %r8
movq 0x88(%rsp), %r9
movq 0xd0(%rsp), %r14
movq 0xd8(%rsp), %rbx
movq 0xe0(%rsp), %r11
movl 0xe8(%rsp), %r10d
movl 0xf0(%rsp), %eax
movq %r14, (%rsp)
movq %rbx, 0x8(%rsp)
movq %r11, 0x10(%rsp)
movl %r10d, 0x18(%rsp)
movl %eax, 0x20(%rsp)
callq 0x9bb0
jmp 0x25a39
movq 0xe0(%rsp), %rax
subq 0xd8(%rsp), %rax
shlq $0x2, %rax
addq 0xd0(%rsp), %rax
movq %rax, 0xd0(%rsp)
movq 0x80(%rsp), %rax
movq 0x98(%rsp), %rcx
movslq %ecx, %rcx
cmpq %rcx, %rax
jge 0x25a39
movq $0x0, 0x78(%rsp)
movq 0x78(%rsp), %rax
movq 0x90(%rsp), %rcx
movslq %ecx, %rcx
cmpq %rcx, %rax
jge 0x259c1
xorps %xmm0, %xmm0
movss %xmm0, 0x54(%rsp)
xorps %xmm0, %xmm0
movss %xmm0, 0x50(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0xe0(%rsp), %rax
subq 0x78(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0xa0(%rsp), %rax
movq 0x80(%rsp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq 0x58(%rsp), %rdx
imulq 0x88(%rsp), %rdx
xorl %ecx, %ecx
subq %rdx, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, 0x40(%rsp)
cmpq $0x0, 0x58(%rsp)
jle 0x257ce
cmpl $0x0, 0x68(%rsp)
je 0x2573c
xorps %xmm0, %xmm0
movss %xmm0, 0x50(%rsp)
jmp 0x25757
movq 0xa0(%rsp), %rax
movq 0x80(%rsp), %rcx
movss (%rax,%rcx,4), %xmm0
movss %xmm0, 0x50(%rsp)
jmp 0x25759
movq 0x60(%rsp), %rax
movq 0xd0(%rsp), %rcx
xorl %edx, %edx
subq 0x58(%rsp), %rdx
shlq $0x2, %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
jbe 0x257cc
movq 0x60(%rsp), %rax
movq %rax, %rcx
addq $-0x4, %rcx
movq %rcx, 0x60(%rsp)
movss (%rax), %xmm0
movss %xmm0, 0x4c(%rsp)
movss 0x50(%rsp), %xmm0
movss 0x4c(%rsp), %xmm2
movss 0x54(%rsp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0x54(%rsp)
movq 0x88(%rsp), %rax
shlq $0x2, %rax
addq 0x40(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0x25759
jmp 0x257ce
movq 0xe0(%rsp), %rax
movq %rax, 0x38(%rsp)
movq 0xd8(%rsp), %rax
movq 0x78(%rsp), %rcx
movq 0x90(%rsp), %rdx
movslq %edx, %rdx
subq %rdx, %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
jle 0x2580e
movq 0xd8(%rsp), %rax
movq %rax, 0x30(%rsp)
jmp 0x2582a
movq 0x78(%rsp), %rax
movq 0x90(%rsp), %rcx
movslq %ecx, %rcx
subq %rcx, %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
movq 0x38(%rsp), %rax
movq 0x30(%rsp), %rcx
subq %rcx, %rax
addq $0x1, %rax
movq %rax, 0x58(%rsp)
movq 0x60(%rsp), %rax
movq 0xd0(%rsp), %rcx
xorl %edx, %edx
subq 0x58(%rsp), %rdx
shlq $0x2, %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
jbe 0x258c5
movq 0x40(%rsp), %rax
movss (%rax), %xmm0
movss %xmm0, 0x50(%rsp)
movq 0x60(%rsp), %rax
movq %rax, %rcx
addq $-0x4, %rcx
movq %rcx, 0x60(%rsp)
movss (%rax), %xmm0
movss %xmm0, 0x4c(%rsp)
movss 0x50(%rsp), %xmm0
movss 0x4c(%rsp), %xmm2
movss 0x54(%rsp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0x54(%rsp)
movq 0x88(%rsp), %rax
shlq $0x2, %rax
addq 0x40(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0x25840
cmpl $0x0, 0x68(%rsp)
je 0x258d5
xorps %xmm0, %xmm0
movss %xmm0, 0x50(%rsp)
movq 0xe0(%rsp), %rax
subq 0xd8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x58(%rsp)
movq 0x60(%rsp), %rax
movq 0xd0(%rsp), %rcx
xorl %edx, %edx
subq 0x58(%rsp), %rdx
shlq $0x2, %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
jbe 0x2594b
movq 0x60(%rsp), %rax
movq %rax, %rcx
addq $-0x4, %rcx
movq %rcx, 0x60(%rsp)
movss (%rax), %xmm0
movss %xmm0, 0x4c(%rsp)
movss 0x50(%rsp), %xmm0
movss 0x4c(%rsp), %xmm2
movss 0x54(%rsp), %xmm1
mulss %xmm2, %xmm0
addss %xmm1, %xmm0
movss %xmm0, 0x54(%rsp)
jmp 0x258ee
cmpl $0x0, 0x6c(%rsp)
je 0x2597a
movss 0x54(%rsp), %xmm0
movq 0xb0(%rsp), %rax
movss %xmm0, (%rax)
movq 0xb0(%rsp), %rax
addq $0x4, %rax
movq %rax, 0xb0(%rsp)
jmp 0x259a8
movss 0x54(%rsp), %xmm0
movq 0xb0(%rsp), %rax
movss %xmm0, (%rax)
movq 0xa8(%rsp), %rax
shlq $0x2, %rax
addq 0xb0(%rsp), %rax
movq %rax, 0xb0(%rsp)
jmp 0x259aa
movslq 0xe8(%rsp), %rax
addq 0x78(%rsp), %rax
movq %rax, 0x78(%rsp)
jmp 0x2569e
cmpl $0x0, 0x6c(%rsp)
je 0x259f6
movq 0xa8(%rsp), %rax
shlq $0x0, %rax
movq 0x70(%rsp), %rcx
shlq $0x0, %rcx
subq %rcx, %rax
shlq $0x2, %rax
addq 0xb0(%rsp), %rax
movq %rax, 0xb0(%rsp)
jmp 0x25a20
movq 0x70(%rsp), %rcx
imulq 0xa8(%rsp), %rcx
movl $0x1, %eax
subq %rcx, %rax
shlq $0x2, %rax
addq 0xb0(%rsp), %rax
movq %rax, 0xb0(%rsp)
movq 0x80(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x80(%rsp)
jmp 0x25679
addq $0xb8, %rsp
popq %rbx
popq %r14
retq
nopw %cs:(%rax,%rax)