// File: carlos-urena[P]svg-gen/figures.cpp
// Function: FigurePSA_Base::initialize()
void FigurePSA_Base::initialize(  )
{

   const vec3 org    = vec3(0.0,0.0,0.0),
              ejex   = vec3(1.0,0.0,0.0),
              ejey   = vec3(0.0,1.0,0.0),
              ejez   = vec3(0.0,0.0,1.0),
              observ = vec3(1.2,0.6,1.0),
              lookat = vec3(0.0,0.0,0.0),
              vup    = vec3(0.0,1.0,0.0);

   cam = Camera( lookat, observ, vup );
   using namespace std ;
   cout << "FigurePSA_Base::initialize, flip_axes == " << flip_axes << endl ;

   // create objects
   auto * sphere_cap    = new SpherePolygon( *original_pol, true );
   auto * hor_plane_pol = new HorPlanePolygon( *sphere_cap, true );
   auto * hemisphere    = new Hemisphere( org, 1.0, (observ-lookat).normalized(), flip_axes ) ;

   sphere_cap->style.use_grad_fill = true ;
   sphere_cap->style.fill_opacity = 0.5 ;
   sphere_cap->style.grad_fill_name = "spherecapGradFill" ;

   auto * dashed_ellipse = new HorPlanePolygon( *original_pol, false );
   dashed_ellipse->style.draw_filled = false ;
   dashed_ellipse->style.draw_lines = true ;
   dashed_ellipse->style.dashed_lines = true ;
   objetos.add( dashed_ellipse );


   // add objects to set

   if ( draw_projectors )
   {
      auto * projectors    = new ExtrVertSegm( *sphere_cap, *hor_plane_pol, cam );
      objetos.add( projectors );
   }

   objetos.add( hemisphere );
   objetos.add( sphere_cap );
   objetos.add( hor_plane_pol );


}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1f0, %rsp            # imm = 0x1F0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x180(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
leaq -0x14(%rbp), %rdi
leaq -0x18(%rbp), %rsi
leaq -0x1c(%rbp), %rdx
leaq -0x20(%rbp), %rcx
callq 0x8c30
movl $0x3f800000, -0x30(%rbp) # imm = 0x3F800000
movl $0x0, -0x34(%rbp)
movl $0x0, -0x38(%rbp)
leaq -0x2c(%rbp), %rdi
leaq -0x30(%rbp), %rsi
leaq -0x34(%rbp), %rdx
leaq -0x38(%rbp), %rcx
callq 0x8c30
movl $0x0, -0x48(%rbp)
movl $0x3f800000, -0x4c(%rbp) # imm = 0x3F800000
movl $0x0, -0x50(%rbp)
leaq -0x44(%rbp), %rdi
leaq -0x48(%rbp), %rsi
leaq -0x4c(%rbp), %rdx
leaq -0x50(%rbp), %rcx
callq 0x8c30
movl $0x0, -0x60(%rbp)
movl $0x0, -0x64(%rbp)
movl $0x3f800000, -0x68(%rbp) # imm = 0x3F800000
leaq -0x5c(%rbp), %rdi
leaq -0x60(%rbp), %rsi
leaq -0x64(%rbp), %rdx
leaq -0x68(%rbp), %rcx
callq 0x8c30
movl $0x3f99999a, -0x78(%rbp) # imm = 0x3F99999A
movl $0x3f19999a, -0x7c(%rbp) # imm = 0x3F19999A
movl $0x3f800000, -0x80(%rbp) # imm = 0x3F800000
leaq -0x74(%rbp), %rdi
movq %rdi, -0x190(%rbp)
leaq -0x78(%rbp), %rsi
leaq -0x7c(%rbp), %rdx
leaq -0x80(%rbp), %rcx
callq 0x8c30
movl $0x0, -0x90(%rbp)
movl $0x0, -0x94(%rbp)
movl $0x0, -0x98(%rbp)
leaq -0x8c(%rbp), %rdi
movq %rdi, -0x198(%rbp)
leaq -0x90(%rbp), %rsi
leaq -0x94(%rbp), %rdx
leaq -0x98(%rbp), %rcx
callq 0x8c30
movl $0x0, -0xa8(%rbp)
movl $0x3f800000, -0xac(%rbp) # imm = 0x3F800000
movl $0x0, -0xb0(%rbp)
leaq -0xa4(%rbp), %rdi
movq %rdi, -0x188(%rbp)
leaq -0xa8(%rbp), %rsi
leaq -0xac(%rbp), %rdx
leaq -0xb0(%rbp), %rcx
callq 0x8c30
movq -0x198(%rbp), %rsi
movq -0x190(%rbp), %rdx
movq -0x188(%rbp), %rcx
leaq -0xe0(%rbp), %rdi
callq 0xa8f0
movq -0x180(%rbp), %rax
movups -0xe0(%rbp), %xmm0
movups -0xd0(%rbp), %xmm1
movups -0xc0(%rbp), %xmm2
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
movq 0x16882(%rip), %rdi     # 0x1dfc0
leaq 0xf90b(%rip), %rsi      # 0x17050
callq 0x31a0
movq %rax, %rdi
movq -0x180(%rbp), %rax
movzbl 0x6c(%rax), %esi
andl $0x1, %esi
callq 0x32a0
movq %rax, %rdi
movq 0x1683e(%rip), %rsi     # 0x1dfa8
callq 0x31c0
movl $0x98, %edi
callq 0x31b0
movq %rax, %rdi
movq -0x180(%rbp), %rax
movq %rdi, %rcx
movq %rcx, -0x178(%rbp)
movq 0xa0(%rax), %rsi
movl $0x1, %edx
callq 0x11400
jmp 0x77a0
movq -0x178(%rbp), %rax
movq %rax, -0xe8(%rbp)
movl $0x98, %edi
callq 0x31b0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x1a0(%rbp)
movq -0xe8(%rbp), %rsi
movl $0x1, %edx
callq 0x11720
jmp 0x77d8
movq -0x1a0(%rbp), %rax
movq %rax, -0x100(%rbp)
movl $0xf8, %edi
callq 0x31b0
movq %rax, -0x1c0(%rbp)
leaq -0x74(%rbp), %rdi
leaq -0x8c(%rbp), %rsi
callq 0x8d60
movss %xmm1, -0x1b4(%rbp)
movaps %xmm0, -0x1b0(%rbp)
jmp 0x7818
movss -0x1b4(%rbp), %xmm0
movaps -0x1b0(%rbp), %xmm1
movlpd %xmm1, -0x140(%rbp)
movss %xmm0, -0x138(%rbp)
movl -0x138(%rbp), %eax
movl %eax, -0x128(%rbp)
movq -0x140(%rbp), %rax
movq %rax, -0x130(%rbp)
leaq -0x130(%rbp), %rdi
callq 0x8ea0
movss %xmm1, -0x1d4(%rbp)
movaps %xmm0, -0x1d0(%rbp)
jmp 0x786e
movss -0x1d4(%rbp), %xmm0
movaps -0x1d0(%rbp), %xmm1
movlpd %xmm1, -0x150(%rbp)
movss %xmm0, -0x148(%rbp)
movl -0x148(%rbp), %eax
movl %eax, -0x118(%rbp)
movq -0x150(%rbp), %rax
movq %rax, -0x120(%rbp)
leaq -0x114(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x8e00
jmp 0x78bc
movq -0x1c0(%rbp), %rdi
movq -0x180(%rbp), %rax
movzbl 0x6c(%rax), %edx
movl -0x10c(%rbp), %eax
movl %eax, -0x158(%rbp)
movq -0x114(%rbp), %rax
movq %rax, -0x160(%rbp)
movsd -0x160(%rbp), %xmm1
movss -0x158(%rbp), %xmm2
andl $0x1, %edx
leaq -0x14(%rbp), %rsi
movss 0xf6fd(%rip), %xmm0     # 0x17004
callq 0xbc90
jmp 0x790e
movq -0x1c0(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0xe8(%rbp), %rax
movb $0x1, 0x45(%rax)
movq -0xe8(%rbp), %rax
movl $0x3f000000, 0x40(%rax) # imm = 0x3F000000
movq -0xe8(%rbp), %rdi
addq $0x48, %rdi
leaq 0xf733(%rip), %rsi      # 0x1707a
callq 0x31f0
movl $0x98, %edi
callq 0x31b0
movq %rax, %rdi
movq -0x180(%rbp), %rax
movq %rdi, %rcx
movq %rcx, -0x1e0(%rbp)
movq 0xa0(%rax), %rsi
xorl %edx, %edx
callq 0x11720
jmp 0x797a
movq -0x180(%rbp), %rdi
movq -0x1e0(%rbp), %rax
movq %rax, -0x168(%rbp)
movq -0x168(%rbp), %rax
movb $0x0, 0x3a(%rax)
movq -0x168(%rbp), %rax
movb $0x1, 0x38(%rax)
movq -0x168(%rbp), %rax
movb $0x1, 0x44(%rax)
addq $0x30, %rdi
movq -0x168(%rbp), %rsi
callq 0xb660
movq -0x180(%rbp), %rax
testb $0x1, 0x98(%rax)
je 0x7ada
movl $0x38, %edi
callq 0x31b0
movq -0x180(%rbp), %rcx
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x1e8(%rbp)
movq -0xe8(%rbp), %rsi
movq -0x100(%rbp), %rdx
callq 0x11a80
jmp 0x7a07
movq -0x180(%rbp), %rdi
movq -0x1e8(%rbp), %rax
movq %rax, -0x170(%rbp)
addq $0x30, %rdi
movq -0x170(%rbp), %rsi
callq 0xb660
jmp 0x7ada
movq -0x178(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf0(%rbp)
movl %eax, -0xf4(%rbp)
callq 0x3190
jmp 0x7b28
movq -0x1a0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf0(%rbp)
movl %eax, -0xf4(%rbp)
callq 0x3190
jmp 0x7b28
movq -0x1c0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf0(%rbp)
movl %eax, -0xf4(%rbp)
callq 0x3190
jmp 0x7b28
movq -0x1e0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf0(%rbp)
movl %eax, -0xf4(%rbp)
callq 0x3190
jmp 0x7b28
movq -0x1e8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf0(%rbp)
movl %eax, -0xf4(%rbp)
callq 0x3190
jmp 0x7b28
movq -0x180(%rbp), %rdi
addq $0x30, %rdi
movq -0x108(%rbp), %rsi
callq 0xb660
movq -0x180(%rbp), %rdi
addq $0x30, %rdi
movq -0xe8(%rbp), %rsi
callq 0xb660
movq -0x180(%rbp), %rdi
addq $0x30, %rdi
movq -0x100(%rbp), %rsi
callq 0xb660
addq $0x1f0, %rsp            # imm = 0x1F0
popq %rbp
retq
movq -0xf0(%rbp), %rdi
callq 0x3280
nopw %cs:(%rax,%rax)