// File: /workspace/github_cpp_makefile_star2_O3/carlos-urena[P]svg-gen/svgobjects.cpp
// Function: JoiningQuads::JoiningQuads(Polygon const&, Polygon const&)
JoiningQuads::JoiningQuads( const Polygon & p1, const Polygon & p2 )
{
  const int n = p1.points3D.size() ;
  assert( n == p2.points3D.size() );

  for( unsigned i = 0 ; i < n-1 ; i++ )
  {
      // crear poligono y popularlo y añadirlo
      const vec3
        p00 = p1.points3D[i], p01 = p1.points3D[i+1],
        p10 = p2.points3D[i], p11 = p2.points3D[i+1] ;
      add( new PolQuad( p00, p01, p10, p11 ) );
  }
  // añadir cierre
  const vec3
    p00 = p1.points3D[n-1], p01 = p1.points3D[0],
    p10 = p2.points3D[n-1], p11 = p2.points3D[0] ;
  add( new PolQuad( p00, p01, p10, p11 ) );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r14
movq %rsi, %r15
movb $0x0, 0x8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
movq $0x0, 0x30(%rdi)
leaq 0x782f(%rip), %rax      # 0x11a70
movq %rdi, -0x30(%rbp)
movq %rax, (%rdi)
movq 0x68(%rsi), %rax
movq 0x70(%rsi), %r8
subq %rax, %r8
sarq $0x2, %r8
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rdx, %r8
movslq %r8d, %rsi
movq 0x68(%r14), %rcx
movq 0x70(%r14), %rdi
subq %rcx, %rdi
sarq $0x2, %rdi
imulq %rdx, %rdi
cmpq %rdi, %rsi
jne 0xa3b6
decl %r8d
je 0xa333
movq %r8, -0x78(%rbp)
movl %r8d, %eax
shlq $0x2, %rax
leaq (%rax,%rax,2), %rbx
xorl %r12d, %r12d
movq 0x68(%r15), %rax
movl 0x8(%rax,%r12), %ecx
movl %ecx, -0x68(%rbp)
movq (%rax,%r12), %rcx
movq %rcx, -0x70(%rbp)
movl 0x14(%rax,%r12), %ecx
movl %ecx, -0x58(%rbp)
movq 0xc(%rax,%r12), %rax
movq %rax, -0x60(%rbp)
movq 0x68(%r14), %rax
movl 0x8(%rax,%r12), %ecx
movl %ecx, -0x48(%rbp)
movq (%rax,%r12), %rcx
movq %rcx, -0x50(%rbp)
movl 0x14(%rax,%r12), %ecx
movl %ecx, -0x38(%rbp)
movq 0xc(%rax,%r12), %rax
movq %rax, -0x40(%rbp)
movl $0x98, %edi
callq 0x31d0
movq %rax, %r13
movq %rax, %rdi
leaq -0x70(%rbp), %rsi
leaq -0x60(%rbp), %rdx
leaq -0x50(%rbp), %rcx
leaq -0x40(%rbp), %r8
callq 0x94ae
movq -0x30(%rbp), %rdi
movq %r13, %rsi
callq 0x7554
addq $0xc, %r12
cmpq %r12, %rbx
jne 0xa29f
movq 0x68(%r15), %rax
movq 0x68(%r14), %rcx
movq -0x78(%rbp), %r8
movslq %r8d, %rdx
shlq $0x2, %rdx
leaq (%rdx,%rdx,2), %rdx
movl 0x8(%rax,%rdx), %esi
movl %esi, -0x68(%rbp)
movq (%rax,%rdx), %rsi
movq %rsi, -0x70(%rbp)
movl 0x8(%rax), %esi
movl %esi, -0x58(%rbp)
movq (%rax), %rax
movq %rax, -0x60(%rbp)
movl 0x8(%rcx,%rdx), %eax
movl %eax, -0x48(%rbp)
movq (%rcx,%rdx), %rax
movq %rax, -0x50(%rbp)
movl 0x8(%rcx), %eax
movl %eax, -0x38(%rbp)
movq (%rcx), %rax
movq %rax, -0x40(%rbp)
movl $0x98, %edi
callq 0x31d0
movq %rax, %r14
leaq -0x70(%rbp), %rsi
leaq -0x60(%rbp), %rdx
leaq -0x50(%rbp), %rcx
leaq -0x40(%rbp), %r8
movq %rax, %rdi
callq 0x94ae
movq -0x30(%rbp), %rdi
movq %r14, %rsi
callq 0x7554
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x349c(%rip), %rdi      # 0xd859
leaq 0x30ec(%rip), %rsi      # 0xd4b0
leaq 0x3547(%rip), %rcx      # 0xd912
movl $0x37b, %edx            # imm = 0x37B
callq 0x3120
movq %rax, %rbx
movq %r14, %rdi
jmp 0xa3e5
jmp 0xa3ec
movq %rax, %rbx
movq %r13, %rdi
callq 0x31a0
jmp 0xa3ef
movq %rax, %rbx
leaq 0x739a(%rip), %rax      # 0x11790
movq -0x30(%rbp), %rcx
movq %rax, (%rcx)
movq 0x20(%rcx), %rdi
testq %rdi, %rdi
je 0xa40b
callq 0x31a0
movq %rbx, %rdi
callq 0x32b0
nop