// File: /workspace/github_c_makefile_star2_O0/zpole[P]IICV/vl/covdet.c
// Function: vl_covdet_extract_orientations
void
vl_covdet_extract_orientations (VlCovDet * self)
{
  vl_index i, j  ;
  vl_size numFeatures = vl_covdet_get_num_features(self) ;
  for (i = 0 ; i < (signed)numFeatures ; ++i) {
    vl_size numOrientations ;
    VlCovDetFeature feature = self->features[i] ;
    VlCovDetFeatureOrientation* orientations =
    vl_covdet_extract_orientations_for_frame(self, &numOrientations, feature.frame) ;

    for (j = 0 ; j < (signed)numOrientations ; ++j) {
      double A [2*2] = {
        feature.frame.a11,
        feature.frame.a21,
        feature.frame.a12,
        feature.frame.a22} ;
      double r1 = cos(orientations[j].angle) ;
      double r2 = sin(orientations[j].angle) ;
      VlCovDetFeature * oriented ;

      if (j == 0) {
        oriented = & self->features[i] ;
      } else {
        vl_covdet_append_feature(self, &feature) ;
        oriented = & self->features[self->numFeatures -1] ;
      }

      oriented->orientationScore = orientations[j].score ;
      oriented->frame.a11 = + A[0] * r1 + A[2] * r2 ;
      oriented->frame.a21 = + A[1] * r1 + A[3] * r2 ;
      oriented->frame.a12 = - A[0] * r2 + A[2] * r1 ;
      oriented->frame.a22 = - A[1] * r2 + A[3] * r1 ;
    }
  }
}

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0xa0(%rsp)
movq 0xa0(%rsp), %rdi
callq 0x9390
movq %rax, 0x88(%rsp)
movq $0x0, 0x98(%rsp)
movq 0x98(%rsp), %rax
movq 0x88(%rsp), %rcx
movslq %ecx, %rcx
cmpq %rcx, %rax
jge 0x12fae
movq 0xa0(%rsp), %rax
movq 0x50(%rax), %rsi
imulq $0x28, 0x98(%rsp), %rax
addq %rax, %rsi
leaq 0x58(%rsp), %rdi
movl $0x28, %edx
callq 0x9640
movq 0xa0(%rsp), %rdi
leaq 0x58(%rsp), %rax
leaq 0x80(%rsp), %rsi
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x9870
movq %rax, 0x50(%rsp)
movq $0x0, 0x90(%rsp)
movq 0x90(%rsp), %rax
movq 0x80(%rsp), %rcx
movslq %ecx, %rcx
cmpq %rcx, %rax
jge 0x12f93
movss 0x60(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x30(%rsp)
movss 0x68(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x38(%rsp)
movss 0x64(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x40(%rsp)
movss 0x6c(%rsp), %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x48(%rsp)
movq 0x50(%rsp), %rax
movq 0x90(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
callq 0x94e0
movsd %xmm0, 0x28(%rsp)
movq 0x50(%rsp), %rax
movq 0x90(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
callq 0x99e0
movsd %xmm0, 0x20(%rsp)
cmpq $0x0, 0x90(%rsp)
jne 0x12e33
movq 0xa0(%rsp), %rax
movq 0x50(%rax), %rax
imulq $0x28, 0x98(%rsp), %rcx
addq %rcx, %rax
movq %rax, 0x18(%rsp)
jmp 0x12e6d
movq 0xa0(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x9580
movq 0xa0(%rsp), %rax
movq 0x50(%rax), %rax
movq 0xa0(%rsp), %rcx
movq 0x58(%rcx), %rcx
subq $0x1, %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x18(%rsp)
movq 0x50(%rsp), %rax
movq 0x90(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd 0x8(%rax), %xmm0
cvtsd2ss %xmm0, %xmm0
movq 0x18(%rsp), %rax
movss %xmm0, 0x20(%rax)
movsd 0x30(%rsp), %xmm0
movsd 0x28(%rsp), %xmm2
movsd 0x40(%rsp), %xmm1
mulsd 0x20(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq 0x18(%rsp), %rax
movss %xmm0, 0x8(%rax)
movsd 0x38(%rsp), %xmm0
movsd 0x28(%rsp), %xmm2
movsd 0x48(%rsp), %xmm1
mulsd 0x20(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq 0x18(%rsp), %rax
movss %xmm0, 0x10(%rax)
movsd 0x30(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd 0x20(%rsp), %xmm2
movsd 0x40(%rsp), %xmm1
mulsd 0x28(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq 0x18(%rsp), %rax
movss %xmm0, 0xc(%rax)
movsd 0x38(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd 0x20(%rsp), %xmm2
movsd 0x48(%rsp), %xmm1
mulsd 0x28(%rsp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movq 0x18(%rsp), %rax
movss %xmm0, 0x14(%rax)
movq 0x90(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x90(%rsp)
jmp 0x12d67
jmp 0x12f95
movq 0x98(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x98(%rsp)
jmp 0x12ce0
addq $0xa8, %rsp
retq
nopw %cs:(%rax,%rax)