// File: /workspace/github_c_makefile_star2_O0/zpole[P]IICV/vl/sift.c
// Function: vl_sift_process_next_octave
VL_EXPORT
int
vl_sift_process_next_octave (VlSiftFilt *f)
{

  int s, h, w, s_best ;
  double sa, sb ;
  vl_sift_pix *octave, *pt ;

  /* shortcuts */
  vl_sift_pix *temp   = f-> temp ;
  int O               = f-> O ;
  int S               = f-> S ;
  int o_min           = f-> o_min ;
  int s_min           = f-> s_min ;
  int s_max           = f-> s_max ;
  double sigma0       = f-> sigma0 ;
  double sigmak       = f-> sigmak ;
  double dsigma0      = f-> dsigma0 ;

  /* is there another octave ? */
  if (f->o_cur == o_min + O - 1)
    return VL_ERR_EOF ;

  /* retrieve base */
  s_best = VL_MIN(s_min + S, s_max) ;
  w      = vl_sift_get_octave_width  (f) ;
  h      = vl_sift_get_octave_height (f) ;
  pt     = vl_sift_get_octave        (f, s_best) ;
  octave = vl_sift_get_octave        (f, s_min) ;

  /* next octave */
  copy_and_downsample (octave, pt, w, h, 1) ;

  f-> o_cur            += 1 ;
  f-> nkeys             = 0 ;
  w = f-> octave_width  = VL_SHIFT_LEFT(f->width,  - f->o_cur) ;
  h = f-> octave_height = VL_SHIFT_LEFT(f->height, - f->o_cur) ;

  sa = sigma0 * powf (sigmak, s_min     ) ;
  sb = sigma0 * powf (sigmak, s_best - S) ;

  if (sa > sb) {
    double sd = sqrt (sa*sa - sb*sb) ;
    _vl_sift_smooth (f, octave, temp, octave, w, h, sd) ;
  }

  /* ------------------------------------------------------------------
   *                                                        Fill octave
   * --------------------------------------------------------------- */

  for(s = s_min + 1 ; s <= s_max ; ++s) {
    double sd = dsigma0 * pow (sigmak, s) ;
    _vl_sift_smooth (f, vl_sift_get_octave(f, s), temp,
                     vl_sift_get_octave(f, s - 1), w, h, sd) ;
  }

  return VL_ERR_OK ;
}

// Assembly:
subq $0xc8, %rsp
movq %rdi, 0xb8(%rsp)
movq 0xb8(%rsp), %rax
movq 0x40(%rax), %rax
movq %rax, 0x80(%rsp)
movq 0xb8(%rsp), %rax
movl 0x28(%rax), %eax
movl %eax, 0x7c(%rsp)
movq 0xb8(%rsp), %rax
movl 0x2c(%rax), %eax
movl %eax, 0x78(%rsp)
movq 0xb8(%rsp), %rax
movl 0x30(%rax), %eax
movl %eax, 0x74(%rsp)
movq 0xb8(%rsp), %rax
movl 0x34(%rax), %eax
movl %eax, 0x70(%rsp)
movq 0xb8(%rsp), %rax
movl 0x38(%rax), %eax
movl %eax, 0x6c(%rsp)
movq 0xb8(%rsp), %rax
movsd 0x8(%rax), %xmm0
movsd %xmm0, 0x60(%rsp)
movq 0xb8(%rsp), %rax
movsd 0x10(%rax), %xmm0
movsd %xmm0, 0x58(%rsp)
movq 0xb8(%rsp), %rax
movsd 0x18(%rax), %xmm0
movsd %xmm0, 0x50(%rsp)
movq 0xb8(%rsp), %rax
movl 0x3c(%rax), %eax
movl 0x74(%rsp), %ecx
addl 0x7c(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x4cf11
movl $0x5, 0xc4(%rsp)
jmp 0x4d2c5
movl 0x70(%rsp), %eax
addl 0x78(%rsp), %eax
cmpl 0x6c(%rsp), %eax
jge 0x4cf2d
movl 0x70(%rsp), %eax
addl 0x78(%rsp), %eax
movl %eax, 0x3c(%rsp)
jmp 0x4cf35
movl 0x6c(%rsp), %eax
movl %eax, 0x3c(%rsp)
movl 0x3c(%rsp), %eax
movl %eax, 0xa8(%rsp)
movq 0xb8(%rsp), %rdi
callq 0x4d2e0
movl %eax, 0xac(%rsp)
movq 0xb8(%rsp), %rdi
callq 0x4d2f0
movl %eax, 0xb0(%rsp)
movq 0xb8(%rsp), %rdi
movl 0xa8(%rsp), %esi
callq 0x4c860
movq %rax, 0x88(%rsp)
movq 0xb8(%rsp), %rdi
movl 0x70(%rsp), %esi
callq 0x4c860
movq %rax, 0x90(%rsp)
movq 0x90(%rsp), %rdi
movq 0x88(%rsp), %rsi
movl 0xac(%rsp), %edx
movl 0xb0(%rsp), %ecx
movl $0x1, %r8d
callq 0x4ca50
movq 0xb8(%rsp), %rax
movl 0x3c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x3c(%rax)
movq 0xb8(%rsp), %rax
movl $0x0, 0x80(%rax)
movq 0xb8(%rsp), %rcx
xorl %eax, %eax
subl 0x3c(%rcx), %eax
cmpl $0x0, %eax
jl 0x4d01b
movq 0xb8(%rsp), %rax
movl 0x20(%rax), %eax
movq 0xb8(%rsp), %rdx
xorl %ecx, %ecx
subl 0x3c(%rdx), %ecx
shll %cl, %eax
movl %eax, 0x38(%rsp)
jmp 0x4d03d
movq 0xb8(%rsp), %rax
movl 0x20(%rax), %eax
movq 0xb8(%rsp), %rcx
xorl %edx, %edx
subl 0x3c(%rcx), %edx
xorl %ecx, %ecx
subl %edx, %ecx
sarl %cl, %eax
movl %eax, 0x38(%rsp)
movl 0x38(%rsp), %eax
movq 0xb8(%rsp), %rcx
movl %eax, 0x58(%rcx)
movl %eax, 0xac(%rsp)
movq 0xb8(%rsp), %rcx
xorl %eax, %eax
subl 0x3c(%rcx), %eax
cmpl $0x0, %eax
jl 0x4d085
movq 0xb8(%rsp), %rax
movl 0x24(%rax), %eax
movq 0xb8(%rsp), %rdx
xorl %ecx, %ecx
subl 0x3c(%rdx), %ecx
shll %cl, %eax
movl %eax, 0x34(%rsp)
jmp 0x4d0a7
movq 0xb8(%rsp), %rax
movl 0x24(%rax), %eax
movq 0xb8(%rsp), %rcx
xorl %edx, %edx
subl 0x3c(%rcx), %edx
xorl %ecx, %ecx
subl %edx, %ecx
sarl %cl, %eax
movl %eax, 0x34(%rsp)
movl 0x34(%rsp), %eax
movq 0xb8(%rsp), %rcx
movl %eax, 0x5c(%rcx)
movl %eax, 0xb0(%rsp)
movsd 0x60(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x58(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
cvtsi2ssl 0x70(%rsp), %xmm1
callq 0x9890
movaps %xmm0, %xmm1
movsd 0x20(%rsp), %xmm0
cvtss2sd %xmm1, %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, 0xa0(%rsp)
movsd 0x60(%rsp), %xmm0
movsd %xmm0, 0x28(%rsp)
movsd 0x58(%rsp), %xmm0
cvtsd2ss %xmm0, %xmm0
movl 0xa8(%rsp), %eax
subl 0x78(%rsp), %eax
cvtsi2ss %eax, %xmm1
callq 0x9890
movaps %xmm0, %xmm1
movsd 0x28(%rsp), %xmm0
cvtss2sd %xmm1, %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, 0x98(%rsp)
movsd 0xa0(%rsp), %xmm0
ucomisd 0x98(%rsp), %xmm0
jbe 0x4d1dd
movsd 0xa0(%rsp), %xmm0
movsd 0xa0(%rsp), %xmm2
movsd 0x98(%rsp), %xmm1
mulsd 0x98(%rsp), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
callq 0x9b20
movsd %xmm0, 0x48(%rsp)
movq 0xb8(%rsp), %rdi
movq 0x90(%rsp), %rsi
movq 0x80(%rsp), %rdx
movq 0x90(%rsp), %rcx
movslq 0xac(%rsp), %r8
movslq 0xb0(%rsp), %r9
movsd 0x48(%rsp), %xmm0
callq 0x4cb20
movl 0x70(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xb4(%rsp)
movl 0xb4(%rsp), %eax
cmpl 0x6c(%rsp), %eax
jg 0x4d2ba
movsd 0x50(%rsp), %xmm0
movsd %xmm0, (%rsp)
movsd 0x58(%rsp), %xmm0
cvtsi2sdl 0xb4(%rsp), %xmm1
callq 0x92b0
movaps %xmm0, %xmm1
movsd (%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x40(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0xb8(%rsp), %rdi
movl 0xb4(%rsp), %esi
callq 0x4c860
movq %rax, 0x10(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0xb8(%rsp), %rdi
movl 0xb4(%rsp), %esi
subl $0x1, %esi
callq 0x4c860
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %rax, %rcx
movslq 0xac(%rsp), %r8
movslq 0xb0(%rsp), %r9
movsd 0x40(%rsp), %xmm0
callq 0x4cb20
movl 0xb4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xb4(%rsp)
jmp 0x4d1eb
movl $0x0, 0xc4(%rsp)
movl 0xc4(%rsp), %eax
addq $0xc8, %rsp
retq
nopw %cs:(%rax,%rax)