// File: /workspace/github_cpp_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl %esi, %r14d
movq %rdi, %r12
movb $0x0, 0x8(%rdi)
xorps %xmm2, %xmm2
movups %xmm2, 0x20(%rdi)
andq $0x0, 0x30(%rdi)
leaq 0x867d(%rip), %rax      # 0xf8e8
movq %rax, (%rdi)
andq $0x0, -0xa0(%rbp)
movss %xmm0, -0x94(%rbp)
andq $0x0, -0x90(%rbp)
movl $0x3f800000, -0x98(%rbp) # imm = 0x3F800000
andl $0x0, -0x88(%rbp)
movss %xmm1, -0x84(%rbp)
andl $0x0, -0x80(%rbp)
movl $0x98, %edi
callq 0x31b0
movq %rax, %r15
movq %rax, %rdi
callq 0x6332
movl %r14d, %eax
cvtsi2ss %rax, %xmm0
movq %r12, -0x30(%rbp)
movq %r15, 0x38(%r12)
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0xb8(%rbp)
xorl %r12d, %r12d
leaq -0x70(%rbp), %r13
leaq -0x60(%rbp), %r15
cmpl %r12d, %r14d
je 0x73c5
movl %r12d, %eax
cvtsi2ss %rax, %xmm0
cvtss2sd %xmm0, %xmm0
mulsd 0x3f73(%rip), %xmm0     # 0xb270
divsd -0xb8(%rbp), %xmm0
addsd 0x3f6b(%rip), %xmm0     # 0xb278
cvtsd2ss %xmm0, %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x78(%rbp)
callq 0x3270
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x34(%rbp)
movsd -0x78(%rbp), %xmm0
callq 0x3050
movsd %xmm0, -0x78(%rbp)
movq -0x30(%rbp), %rax
movq 0x38(%rax), %rbx
movss -0x34(%rbp), %xmm0
leaq -0x94(%rbp), %rdi
callq 0x52f1
movlps %xmm0, -0x40(%rbp)
movss %xmm1, -0x38(%rbp)
leaq -0xa0(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x988e
cvtsd2ss -0x78(%rbp), %xmm2
movlps %xmm0, -0x50(%rbp)
movss %xmm1, -0x48(%rbp)
movaps %xmm2, %xmm0
leaq -0x88(%rbp), %rdi
callq 0x52f1
movlps %xmm0, -0x70(%rbp)
movss %xmm1, -0x68(%rbp)
leaq -0x50(%rbp), %rdi
movq %r13, %rsi
callq 0x988e
addq $0x68, %rbx
movss %xmm0, -0x60(%rbp)
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movss %xmm0, -0x5c(%rbp)
movss %xmm1, -0x58(%rbp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x9f14
incl %r12d
jmp 0x72e0
movss 0x3f3f(%rip), %xmm0     # 0xb30c
leaq -0x94(%rbp), %rdi
callq 0x52f1
leaq -0x40(%rbp), %rsi
movlps %xmm0, (%rsi)
movss %xmm1, 0x8(%rsi)
leaq -0xa0(%rbp), %rdi
callq 0x988e
movlps %xmm0, -0x50(%rbp)
movss %xmm1, -0x48(%rbp)
movss 0x3f0e(%rip), %xmm0     # 0xb310
leaq -0x88(%rbp), %rdi
callq 0x52f1
leaq -0x70(%rbp), %rsi
movlps %xmm0, (%rsi)
movss %xmm1, 0x8(%rsi)
leaq -0x50(%rbp), %rdi
callq 0x988e
movss %xmm0, -0x60(%rbp)
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movss %xmm0, -0x5c(%rbp)
movss %xmm1, -0x58(%rbp)
movss 0x3ece(%rip), %xmm0     # 0xb30c
leaq -0x94(%rbp), %rdi
callq 0x52f1
leaq -0x70(%rbp), %rsi
movlps %xmm0, (%rsi)
movss %xmm1, 0x8(%rsi)
leaq -0xa0(%rbp), %rdi
callq 0x988e
movlps %xmm0, -0x40(%rbp)
movss %xmm1, -0x38(%rbp)
movss 0x3ea1(%rip), %xmm0     # 0xb314
leaq -0x88(%rbp), %rdi
callq 0x52f1
leaq -0xb0(%rbp), %rsi
movlps %xmm0, (%rsi)
movss %xmm1, 0x8(%rsi)
leaq -0x40(%rbp), %rdi
callq 0x988e
leaq -0x50(%rbp), %rax
movss %xmm0, (%rax)
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
shrl %r14d
cvtsi2ss %r14d, %xmm2
movss %xmm2, -0x34(%rbp)
movss %xmm0, 0x4(%rax)
movss %xmm1, 0x8(%rax)
xorl %r15d, %r15d
leaq -0x60(%rbp), %r12
leaq -0x40(%rbp), %r13
movq -0x30(%rbp), %rax
movq 0x38(%rax), %rbx
cmpl %r15d, %r14d
je 0x754b
cvtsi2ss %r15d, %xmm0
divss -0x34(%rbp), %xmm0
movss %xmm0, -0x7c(%rbp)
leaq -0x50(%rbp), %rdi
movq %r12, %rsi
callq 0x530c
movlps %xmm0, -0xb0(%rbp)
movss %xmm1, -0xa8(%rbp)
leaq -0x7c(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x98f3
movlps %xmm0, -0x70(%rbp)
movss %xmm1, -0x68(%rbp)
movq %r12, %rdi
leaq -0x70(%rbp), %rsi
callq 0x988e
addq $0x68, %rbx
movss %xmm0, -0x40(%rbp)
shufps $0x55, %xmm0, %xmm0     # xmm0 = xmm0[1,1,1,1]
movss %xmm0, -0x3c(%rbp)
movss %xmm1, -0x38(%rbp)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x9f14
incl %r15d
jmp 0x74c5
movb $0x0, 0x3a(%rbx)
movw $0x101, 0x38(%rbx)      # imm = 0x101
movl $0x3bc49ba6, 0x3c(%rbx) # imm = 0x3BC49BA6
movabsq $0x3f80000000000000, %rax # imm = 0x3F80000000000000
movq %rax, 0x20(%rbx)
andl $0x0, 0x28(%rbx)
pushq $0x40
popq %rdi
movq -0x30(%rbp), %r12
callq 0x31b0
movsd -0x60(%rbp), %xmm0
movss -0x58(%rbp), %xmm1
movb $0x0, 0x8(%rax)
leaq 0x8199(%rip), %rbx      # 0xf728
movq %rbx, (%rax)
movsd %xmm0, 0x1c(%rax)
movss %xmm1, 0x24(%rax)
movsd 0x3d1c(%rip), %xmm0     # 0xb2c0
movsd %xmm0, 0x28(%rax)
andl $0x0, 0x30(%rax)
movl $0x3cf5c28f, 0x3c(%rax) # imm = 0x3CF5C28F
movq %rax, 0x40(%r12)
pushq $0x40
popq %rdi
callq 0x31b0
movsd -0x50(%rbp), %xmm0
movss -0x48(%rbp), %xmm1
movb $0x0, 0x8(%rax)
movq %rbx, (%rax)
movsd %xmm0, 0x1c(%rax)
movss %xmm1, 0x24(%rax)
movsd 0x3cdc(%rip), %xmm0     # 0xb2c0
movsd %xmm0, 0x28(%rax)
andl $0x0, 0x30(%rax)
movl $0x3cf5c28f, 0x3c(%rax) # imm = 0x3CF5C28F
movq %rax, 0x48(%r12)
movq 0x38(%r12), %rsi
movq %r12, %rdi
callq 0x664c
movq 0x40(%r12), %rsi
movq %r12, %rdi
callq 0x664c
movq 0x48(%r12), %rsi
movq %r12, %rdi
callq 0x664c
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r15, %rdi
callq 0x3190
jmp 0x7659
jmp 0x7649
jmp 0x7652
jmp 0x7652
jmp 0x7652
jmp 0x7652
movq %rax, %rbx
jmp 0x7659
jmp 0x7652
jmp 0x7652
movq %rax, %rbx
movq -0x30(%rbp), %r12
movq %r12, %rdi
callq 0x971e
movq %rbx, %rdi
callq 0x3250
nop