// File: /workspace/github_cpp_makefile_star2_O1/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 0x76df(%rip), %rax      # 0x11a70
movq %rdi, -0x30(%rbp)
movq %rax, (%rdi)
movq 0x70(%rsi), %rsi
subq 0x68(%r15), %rsi
sarq $0x2, %rsi
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rsi
movq 0x70(%rdx), %rcx
subq 0x68(%rdx), %rcx
movslq %esi, %rdx
sarq $0x2, %rcx
imulq %rax, %rcx
cmpq %rcx, %rdx
jne 0xa4fc
decl %esi
movq %rsi, -0x78(%rbp)
je 0xa470
movl -0x78(%rbp), %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 0x95ae
movq -0x30(%rbp), %rdi
movq %r13, %rsi
callq 0x7568
addq $0xc, %r12
cmpq %r12, %rbx
jne 0xa3e8
movslq -0x78(%rbp), %rax
movq 0x68(%r15), %rcx
shlq $0x2, %rax
leaq (%rax,%rax,2), %rax
movl 0x8(%rcx,%rax), %edx
movl %edx, -0x68(%rbp)
movq (%rcx,%rax), %rdx
movq %rdx, -0x70(%rbp)
movl 0x8(%rcx), %edx
movl %edx, -0x58(%rbp)
movq (%rcx), %rcx
movq %rcx, -0x60(%rbp)
movq 0x68(%r14), %rcx
movl 0x8(%rcx,%rax), %edx
movl %edx, -0x48(%rbp)
movq (%rcx,%rax), %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 0x95ae
movq -0x30(%rbp), %rdi
movq %r14, %rsi
callq 0x7568
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3356(%rip), %rdi      # 0xd859
leaq 0x2fa6(%rip), %rsi      # 0xd4b0
leaq 0x3401(%rip), %rcx      # 0xd912
movl $0x37b, %edx            # imm = 0x37B
callq 0x3120
movq %rax, %rbx
movq %r14, %rdi
jmp 0xa52b
jmp 0xa532
movq %rax, %rbx
movq %r13, %rdi
callq 0x31a0
jmp 0xa535
movq %rax, %rbx
leaq 0x7254(%rip), %rax      # 0x11790
movq -0x30(%rbp), %rcx
movq %rax, (%rcx)
movq 0x20(%rcx), %rdi
testq %rdi, %rdi
je 0xa551
callq 0x31a0
movq %rbx, %rdi
callq 0x32b0
nop