// File: /workspace/github_cpp_makefile_star2_O3/carlos-urena[P]svg-gen/svgobjects.cpp
// Function: EllipseSectorZ::EllipseSectorZ(unsigned int, float, float)
EllipseSectorZ::EllipseSectorZ( unsigned n, real lonX, real lonY )
{
  const vec3 center = vec3(0.0,0.0,1.0),
              eje1  = vec3(lonX,0.0,0.0),
              eje2  = vec3(0.0,lonY,0.0) ;

  constexpr double alpha0 = 0.6*pi,
                   alpha1 = -alpha0 ;

  ppol = new Polygon();

  // arco de elipse
  for( unsigned i= 0 ; i < n ; i++ )
  {
    const real ang = alpha0 + (alpha1-alpha0)*real(i)/real(n) ;
    const real c = cos(double(ang)),
               s = sin(double(ang));
    ppol->points3D.push_back( center + c*eje1 + s*eje2 ) ;
  }
  // linea recta a trozos desde alpha1 y vuelta a alpha0
  const vec3 p0 = center+real(cos(alpha1))*eje1 + real(sin(alpha1))*eje2 ,
             p1 = center+real(cos(alpha0))*eje1 + real(sin(alpha0))*eje2 ;

  const unsigned nl = n/2 ;
  for( unsigned i= 0 ; i< nl ; i++ )
  {
    ppol->points3D.push_back( p0 + (real(i)/real(nl))*(p1-p0)) ;
  }
  // style del polígono
  ppol->style.draw_filled = false ;
  ppol->style.draw_lines = true ;
  ppol->style.close_lines = true ;
  ppol->style.lines_width = 0.006 ;
  ppol->style.lines_color  = vec3( 0.0, 1.0, 0.0 );

  // create points
  const vec3 colpoint = vec3(0.0, 1.0, 0.0);
  ppun0 = new Point( p0, colpoint );
  ppun1 = new Point( p1, colpoint );

  // add objects
  add( ppol );
  add( ppun0 );
  add( ppun1 );

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xa0, %rsp
movl %esi, %r14d
movq %rdi, %rbx
movb $0x0, 0x8(%rdi)
xorps %xmm2, %xmm2
movups %xmm2, 0x20(%rdi)
xorl %eax, %eax
movq %rax, 0x30(%rdi)
leaq 0x911c(%rip), %rcx      # 0x118f0
movq %rcx, (%rdi)
movq %rax, -0xb4(%rbp)
movl $0x3f800000, -0xac(%rbp) # imm = 0x3F800000
movss %xmm0, -0xa8(%rbp)
movq %rax, -0xa4(%rbp)
movl %eax, -0x9c(%rbp)
movss %xmm1, -0x98(%rbp)
movl %eax, -0x94(%rbp)
movl $0x98, %edi
callq 0x31d0
movq %rax, %r15
movb $0x0, 0x8(%rax)
leaq 0x8f3d(%rip), %rax      # 0x11760
movq %rax, (%r15)
movq %r15, %rdi
addq $0x20, %rdi
callq 0x6c64
xorps %xmm0, %xmm0
movups %xmm0, 0x88(%r15)
movups %xmm0, 0x78(%r15)
movups %xmm0, 0x68(%r15)
movq %r15, 0x38(%rbx)
testl %r14d, %r14d
je 0x89cd
movl %r14d, %eax
xorps %xmm0, %xmm0
cvtsi2ss %rax, %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x78(%rbp)
xorl %r12d, %r12d
leaq -0x60(%rbp), %r15
movl %r12d, %eax
xorps %xmm0, %xmm0
cvtsi2ss %rax, %xmm0
cvtss2sd %xmm0, %xmm0
mulsd 0x4972(%rip), %xmm0     # 0xd1f8
divsd -0x78(%rbp), %xmm0
addsd 0x496d(%rip), %xmm0     # 0xd200
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x80(%rbp)
callq 0x32e0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x64(%rbp)
movsd -0x80(%rbp), %xmm0
callq 0x3060
movss -0x64(%rbp), %xmm2
movq 0x38(%rbx), %rdi
xorl %eax, %eax
movss -0xa8(%rbp,%rax,4), %xmm1
mulss %xmm2, %xmm1
movss %xmm1, -0x30(%rbp,%rax,4)
incq %rax
cmpq $0x3, %rax
jne 0x88c3
cvtsd2ss %xmm0, %xmm0
movsd -0x30(%rbp), %xmm1
movss -0x28(%rbp), %xmm2
movsd %xmm1, -0x40(%rbp)
movss %xmm2, -0x38(%rbp)
xorl %eax, %eax
movss -0xb4(%rbp,%rax,4), %xmm1
addss -0x40(%rbp,%rax,4), %xmm1
movss %xmm1, -0x30(%rbp,%rax,4)
incq %rax
cmpq $0x3, %rax
jne 0x88f9
movsd -0x30(%rbp), %xmm1
movss -0x28(%rbp), %xmm2
movsd %xmm1, -0x70(%rbp)
movss %xmm2, -0x68(%rbp)
xorl %eax, %eax
movss -0x9c(%rbp,%rax,4), %xmm1
mulss %xmm0, %xmm1
movss %xmm1, -0x30(%rbp,%rax,4)
incq %rax
cmpq $0x3, %rax
jne 0x892d
movsd -0x30(%rbp), %xmm0
movss -0x28(%rbp), %xmm1
movsd %xmm0, -0x50(%rbp)
movss %xmm1, -0x48(%rbp)
xorl %eax, %eax
movss -0x70(%rbp,%rax,4), %xmm0
addss -0x50(%rbp,%rax,4), %xmm0
movss %xmm0, -0x30(%rbp,%rax,4)
incq %rax
cmpq $0x3, %rax
jne 0x895f
movsd -0x30(%rbp), %xmm0
movss -0x28(%rbp), %xmm1
movss %xmm0, -0x60(%rbp)
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movss %xmm0, -0x5c(%rbp)
movss %xmm1, -0x58(%rbp)
movq 0x70(%rdi), %rsi
cmpq 0x78(%rdi), %rsi
je 0x89b5
movl -0x58(%rbp), %eax
movl %eax, 0x8(%rsi)
movq -0x60(%rbp), %rax
movq %rax, (%rsi)
addq $0xc, 0x70(%rdi)
jmp 0x89c1
addq $0x68, %rdi
movq %r15, %rdx
callq 0xc244
incl %r12d
cmpl %r14d, %r12d
jne 0x886f
xorl %eax, %eax
movss 0x48c5(%rip), %xmm0     # 0xd29c
movss -0xa8(%rbp,%rax,4), %xmm1
mulss %xmm0, %xmm1
movss %xmm1, -0x30(%rbp,%rax,4)
incq %rax
cmpq $0x3, %rax
jne 0x89d7
movsd -0x30(%rbp), %xmm1
movss -0x28(%rbp), %xmm2
movsd %xmm1, -0x40(%rbp)
movss %xmm2, -0x38(%rbp)
xorl %eax, %eax
movss -0xb4(%rbp,%rax,4), %xmm1
addss -0x40(%rbp,%rax,4), %xmm1
movss %xmm1, -0x30(%rbp,%rax,4)
incq %rax
cmpq $0x3, %rax
jne 0x8a09
movsd -0x30(%rbp), %xmm1
movss -0x28(%rbp), %xmm2
movsd %xmm1, -0x70(%rbp)
movss %xmm2, -0x68(%rbp)
xorl %eax, %eax
movss 0x485b(%rip), %xmm1     # 0xd2a0
movss -0x9c(%rbp,%rax,4), %xmm2
mulss %xmm1, %xmm2
movss %xmm2, -0x30(%rbp,%rax,4)
incq %rax
cmpq $0x3, %rax
jne 0x8a45
movsd -0x30(%rbp), %xmm1
movss -0x28(%rbp), %xmm2
movsd %xmm1, -0x50(%rbp)
movss %xmm2, -0x48(%rbp)
xorl %eax, %eax
movss -0x70(%rbp,%rax,4), %xmm1
addss -0x50(%rbp,%rax,4), %xmm1
movss %xmm1, -0x30(%rbp,%rax,4)
incq %rax
cmpq $0x3, %rax
jne 0x8a77
movsd -0x30(%rbp), %xmm1
movss -0x28(%rbp), %xmm2
movss %xmm1, -0x60(%rbp)
shufps $0x55, %xmm1, %xmm1     # xmm1 = xmm1[1,1,1,1]
movss %xmm1, -0x5c(%rbp)
movss %xmm2, -0x64(%rbp)
movss %xmm2, -0x58(%rbp)
xorl %eax, %eax
movss -0xa8(%rbp,%rax,4), %xmm1
mulss %xmm0, %xmm1
movss %xmm1, -0x30(%rbp,%rax,4)
incq %rax
cmpq $0x3, %rax
jne 0x8ab6
movsd -0x30(%rbp), %xmm0
movss -0x28(%rbp), %xmm1
movsd %xmm0, -0x50(%rbp)
movss %xmm1, -0x48(%rbp)
xorl %eax, %eax
movss -0xb4(%rbp,%rax,4), %xmm0
addss -0x50(%rbp,%rax,4), %xmm0
movss %xmm0, -0x30(%rbp,%rax,4)
incq %rax
cmpq $0x3, %rax
jne 0x8ae8
movsd -0x30(%rbp), %xmm0
movss -0x28(%rbp), %xmm1
movsd %xmm0, -0x40(%rbp)
movss %xmm1, -0x38(%rbp)
xorl %eax, %eax
movss 0x4780(%rip), %xmm0     # 0xd2a4
movss -0x9c(%rbp,%rax,4), %xmm1
mulss %xmm0, %xmm1
movss %xmm1, -0x30(%rbp,%rax,4)
incq %rax
cmpq $0x3, %rax
jne 0x8b24
movsd -0x30(%rbp), %xmm0
movss -0x28(%rbp), %xmm1
movsd %xmm0, -0x90(%rbp)
movss %xmm1, -0x88(%rbp)
xorl %eax, %eax
movss -0x40(%rbp,%rax,4), %xmm0
addss -0x90(%rbp,%rax,4), %xmm0
movss %xmm0, -0x30(%rbp,%rax,4)
incq %rax
cmpq $0x3, %rax
jne 0x8b5c
movsd -0x30(%rbp), %xmm0
movss -0x28(%rbp), %xmm1
movss %xmm0, -0x70(%rbp)
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movss %xmm0, -0x6c(%rbp)
movss %xmm1, -0x78(%rbp)
movss %xmm1, -0x68(%rbp)
cmpl $0x2, %r14d
jb 0x8ca8
shrl %r14d
cvtsi2ss %r14d, %xmm3
xorl %r12d, %r12d
leaq -0x40(%rbp), %r15
movss %xmm3, -0x80(%rbp)
movq 0x38(%rbx), %rdi
xorps %xmm0, %xmm0
cvtsi2ss %r12d, %xmm0
xorl %eax, %eax
movss -0x70(%rbp,%rax,4), %xmm1
subss -0x60(%rbp,%rax,4), %xmm1
movss %xmm1, -0x30(%rbp,%rax,4)
incq %rax
cmpq $0x3, %rax
jne 0x8bc8
divss %xmm3, %xmm0
movsd -0x30(%rbp), %xmm1
movss -0x28(%rbp), %xmm2
movsd %xmm1, -0x90(%rbp)
movss %xmm2, -0x88(%rbp)
xorl %eax, %eax
movss -0x90(%rbp,%rax,4), %xmm1
mulss %xmm0, %xmm1
movss %xmm1, -0x30(%rbp,%rax,4)
incq %rax
cmpq $0x3, %rax
jne 0x8c03
movsd -0x30(%rbp), %xmm0
movss -0x28(%rbp), %xmm1
movsd %xmm0, -0x50(%rbp)
movss %xmm1, -0x48(%rbp)
xorl %eax, %eax
movss -0x60(%rbp,%rax,4), %xmm0
addss -0x50(%rbp,%rax,4), %xmm0
movss %xmm0, -0x30(%rbp,%rax,4)
incq %rax
cmpq $0x3, %rax
jne 0x8c35
movsd -0x30(%rbp), %xmm0
movss -0x28(%rbp), %xmm1
movss %xmm0, -0x40(%rbp)
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movss %xmm0, -0x3c(%rbp)
movss %xmm1, -0x38(%rbp)
movq 0x70(%rdi), %rsi
cmpq 0x78(%rdi), %rsi
je 0x8c8b
movl -0x38(%rbp), %eax
movl %eax, 0x8(%rsi)
movq -0x40(%rbp), %rax
movq %rax, (%rsi)
addq $0xc, 0x70(%rdi)
jmp 0x8c9c
addq $0x68, %rdi
movq %r15, %rdx
callq 0xc244
movss -0x80(%rbp), %xmm3
incl %r12d
cmpl %r14d, %r12d
jne 0x8bba
movq 0x38(%rbx), %rax
movb $0x0, 0x3a(%rax)
movw $0x101, 0x38(%rax)      # imm = 0x101
movl $0x3bc49ba6, 0x3c(%rax) # imm = 0x3BC49BA6
movabsq $0x3f80000000000000, %rcx # imm = 0x3F80000000000000
movq %rcx, 0x20(%rax)
movl $0x0, 0x28(%rax)
movl $0x40, %edi
callq 0x31d0
movsd -0x60(%rbp), %xmm0
movb $0x0, 0x8(%rax)
leaq 0x8a44(%rip), %r14      # 0x11730
movq %r14, (%rax)
movsd %xmm0, 0x1c(%rax)
movss -0x64(%rbp), %xmm0
movss %xmm0, 0x24(%rax)
movsd 0x454a(%rip), %xmm0     # 0xd250
movsd %xmm0, 0x28(%rax)
movl $0x0, 0x30(%rax)
movl $0x3cf5c28f, 0x3c(%rax) # imm = 0x3CF5C28F
movq %rax, 0x40(%rbx)
movl $0x40, %edi
callq 0x31d0
movsd -0x70(%rbp), %xmm0
movb $0x0, 0x8(%rax)
movq %r14, (%rax)
movsd %xmm0, 0x1c(%rax)
movss -0x78(%rbp), %xmm0
movss %xmm0, 0x24(%rax)
movsd 0x4506(%rip), %xmm0     # 0xd250
movsd %xmm0, 0x28(%rax)
movl $0x0, 0x30(%rax)
movl $0x3cf5c28f, 0x3c(%rax) # imm = 0x3CF5C28F
movq %rax, 0x48(%rbx)
movq 0x38(%rbx), %rsi
movq %rbx, %rdi
callq 0x7554
movq 0x40(%rbx), %rsi
movq %rbx, %rdi
callq 0x7554
movq 0x48(%rbx), %rsi
movq %rbx, %rdi
callq 0x7554
addq $0xa0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %r15, %rdi
callq 0x31a0
jmp 0x8dab
jmp 0x8da8
jmp 0x8da8
jmp 0x8da8
movq %rax, %r14
leaq 0x89de(%rip), %rax      # 0x11790
movq %rax, (%rbx)
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x8dc3
callq 0x31a0
movq %r14, %rdi
callq 0x32b0
nop