// File: /workspace/github_c_makefile_star2_O0/zpole[P]IICV/vl/covdet.c
// Function: vl_covdet_check_frame_inside
vl_bool
_vl_covdet_check_frame_inside (VlCovDet * self, VlFrameOrientedEllipse frame, double margin)
{
  double extent = margin ;
  double A [2*2] = {frame.a11, frame.a21, frame.a12, frame.a22} ;
  double T[2] = {frame.x, frame.y} ;
  double x0 = +VL_INFINITY_D ;
  double x1 = -VL_INFINITY_D ;
  double y0 = +VL_INFINITY_D ;
  double y1 = -VL_INFINITY_D ;
  double boxx [4] = {extent, extent, -extent, -extent} ;
  double boxy [4] = {-extent, extent, extent, -extent} ;
  VlScaleSpaceGeometry geom = vl_scalespace_get_geometry(self->gss) ;
  int i ;
  for (i = 0 ; i < 4 ; ++i) {
    double x = A[0] * boxx[i] + A[2] * boxy[i] + T[0] ;
    double y = A[1] * boxx[i] + A[3] * boxy[i] + T[1] ;
    x0 = VL_MIN(x0, x) ;
    x1 = VL_MAX(x1, x) ;
    y0 = VL_MIN(y0, y) ;
    y1 = VL_MAX(y1, y) ;
  }

  return
  0 <= x0 && x1 <= geom.width-1 &&
  0 <= y0 && y1 <= geom.height-1 ;
}

// Assembly:
subq $0x138, %rsp            # imm = 0x138
leaq 0x140(%rsp), %rax
movq %rdi, 0x130(%rsp)
movsd %xmm0, 0x128(%rsp)
movsd 0x128(%rsp), %xmm0
movsd %xmm0, 0x120(%rsp)
movss 0x8(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x100(%rsp)
movss 0x10(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x108(%rsp)
movss 0xc(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x110(%rsp)
movss 0x14(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x118(%rsp)
movss (%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0xf0(%rsp)
movss 0x4(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0xf8(%rsp)
movsd 0x45afb(%rip), %xmm0    # 0x591a0
movsd %xmm0, 0xe8(%rsp)
movsd 0x45aea(%rip), %xmm0    # 0x591a0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, 0xe0(%rsp)
movsd 0x45ac2(%rip), %xmm0    # 0x591a0
movsd %xmm0, 0xd8(%rsp)
movsd 0x45ab1(%rip), %xmm0    # 0x591a0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, 0xd0(%rsp)
movsd 0x120(%rsp), %xmm0
movsd %xmm0, 0xb0(%rsp)
movsd 0x120(%rsp), %xmm0
movsd %xmm0, 0xb8(%rsp)
movsd 0x120(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, 0xc0(%rsp)
movsd 0x120(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, 0xc8(%rsp)
movsd 0x120(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, 0x90(%rsp)
movsd 0x120(%rsp), %xmm0
movsd %xmm0, 0x98(%rsp)
movsd 0x120(%rsp), %xmm0
movsd %xmm0, 0xa0(%rsp)
movsd 0x120(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, 0xa8(%rsp)
movq 0x130(%rsp), %rax
movq (%rax), %rsi
leaq 0x48(%rsp), %rdi
callq 0x9a40
movl $0x0, 0x44(%rsp)
cmpl $0x4, 0x44(%rsp)
jge 0x139b9
movsd 0x100(%rsp), %xmm0
movslq 0x44(%rsp), %rax
movsd 0xb0(%rsp,%rax,8), %xmm2
movsd 0x110(%rsp), %xmm1
movslq 0x44(%rsp), %rax
mulsd 0x90(%rsp,%rax,8), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
addsd 0xf0(%rsp), %xmm0
movsd %xmm0, 0x38(%rsp)
movsd 0x108(%rsp), %xmm0
movslq 0x44(%rsp), %rax
movsd 0xb0(%rsp,%rax,8), %xmm2
movsd 0x118(%rsp), %xmm1
movslq 0x44(%rsp), %rax
mulsd 0x90(%rsp,%rax,8), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
addsd 0xf8(%rsp), %xmm0
movsd %xmm0, 0x30(%rsp)
movsd 0xe8(%rsp), %xmm1
movsd 0x38(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x138d3
movsd 0xe8(%rsp), %xmm0
movsd %xmm0, 0x28(%rsp)
jmp 0x138df
movsd 0x38(%rsp), %xmm0
movsd %xmm0, 0x28(%rsp)
movsd 0x28(%rsp), %xmm0
movsd %xmm0, 0xe8(%rsp)
movsd 0xe0(%rsp), %xmm0
ucomisd 0x38(%rsp), %xmm0
jbe 0x13910
movsd 0xe0(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
jmp 0x1391c
movsd 0x38(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x20(%rsp), %xmm0
movsd %xmm0, 0xe0(%rsp)
movsd 0xd8(%rsp), %xmm1
movsd 0x30(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x13951
movsd 0xd8(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
jmp 0x1395d
movsd 0x30(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0x18(%rsp), %xmm0
movsd %xmm0, 0xd8(%rsp)
movsd 0xd0(%rsp), %xmm0
ucomisd 0x30(%rsp), %xmm0
jbe 0x1398e
movsd 0xd0(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
jmp 0x1399a
movsd 0x30(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0xd0(%rsp)
movl 0x44(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x44(%rsp)
jmp 0x13818
movsd 0xe8(%rsp), %xmm0
xorl %eax, %eax
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
movb %al, 0xf(%rsp)
jb 0x13a74
movsd 0xe0(%rsp), %xmm1
movq 0x48(%rsp), %rax
decq %rax
movq %rax, %xmm0
movaps 0x4576e(%rip), %xmm2    # 0x59160
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
movapd 0x45772(%rip), %xmm2    # 0x59170
subpd %xmm2, %xmm0
movaps %xmm0, %xmm2
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm2, %xmm0
xorl %eax, %eax
ucomisd %xmm1, %xmm0
movb %al, 0xf(%rsp)
jb 0x13a74
movsd 0xd8(%rsp), %xmm0
xorl %eax, %eax
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
movb %al, 0xf(%rsp)
jb 0x13a74
movsd 0xd0(%rsp), %xmm1
movq 0x50(%rsp), %rax
decq %rax
movq %rax, %xmm0
movaps 0x45712(%rip), %xmm2    # 0x59160
punpckldq %xmm2, %xmm0    # xmm0 = xmm0[0],xmm2[0],xmm0[1],xmm2[1]
movapd 0x45716(%rip), %xmm2    # 0x59170
subpd %xmm2, %xmm0
movaps %xmm0, %xmm2
unpckhpd %xmm0, %xmm0            # xmm0 = xmm0[1,1]
addsd %xmm2, %xmm0
ucomisd %xmm1, %xmm0
setae %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
addq $0x138, %rsp            # imm = 0x138
retq
nopw %cs:(%rax,%rax)