// File: 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
subq $0xd0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
callq 0xb5b0
movq -0xb8(%rbp), %rax
leaq 0xd273(%rip), %rcx      # 0x1da48
addq $0x10, %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rdi
addq $0x68, %rdi
callq 0x13790
movl %eax, -0x1c(%rbp)
movslq -0x1c(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x18(%rbp), %rdi
addq $0x68, %rdi
callq 0x13790
movq %rax, %rcx
movq -0xb0(%rbp), %rax
cmpq %rcx, %rax
jne 0x10815
jmp 0x10834
leaq 0x6ffd(%rip), %rdi      # 0x17819
leaq 0x6c4d(%rip), %rsi      # 0x17470
movl $0x37b, %edx            # imm = 0x37B
leaq 0x70a3(%rip), %rcx      # 0x178d2
callq 0x3100
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl -0x1c(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jae 0x10950
movq -0x10(%rbp), %rdi
addq $0x68, %rdi
movl -0x20(%rbp), %eax
movl %eax, %esi
callq 0x13d30
movl 0x8(%rax), %ecx
movl %ecx, -0x28(%rbp)
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
addq $0x68, %rdi
movl -0x20(%rbp), %eax
incl %eax
movl %eax, %esi
callq 0x13d30
movl 0x8(%rax), %ecx
movl %ecx, -0x38(%rbp)
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rdi
addq $0x68, %rdi
movl -0x20(%rbp), %eax
movl %eax, %esi
callq 0x13d30
movl 0x8(%rax), %ecx
movl %ecx, -0x48(%rbp)
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rdi
addq $0x68, %rdi
movl -0x20(%rbp), %eax
incl %eax
movl %eax, %esi
callq 0x13d30
movl 0x8(%rax), %ecx
movl %ecx, -0x58(%rbp)
movq (%rax), %rax
movq %rax, -0x60(%rbp)
movl $0x98, %edi
callq 0x31b0
movq %rax, -0xc0(%rbp)
jmp 0x108df
movq -0xc0(%rbp), %rdi
leaq -0x30(%rbp), %rsi
leaq -0x40(%rbp), %rdx
leaq -0x50(%rbp), %rcx
leaq -0x60(%rbp), %r8
callq 0xe880
jmp 0x108fd
movq -0xc0(%rbp), %rsi
movq -0xb8(%rbp), %rdi
callq 0xb660
jmp 0x10912
jmp 0x10914
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x1083b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0x10a59
movq -0xc0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
callq 0x3190
jmp 0x10a59
movq -0x10(%rbp), %rdi
addq $0x68, %rdi
movl -0x1c(%rbp), %eax
decl %eax
movslq %eax, %rsi
callq 0x13d30
movl 0x8(%rax), %ecx
movl %ecx, -0x70(%rbp)
movq (%rax), %rax
movq %rax, -0x78(%rbp)
movq -0x10(%rbp), %rdi
addq $0x68, %rdi
xorl %eax, %eax
movl %eax, %esi
movq %rsi, -0xd0(%rbp)
callq 0x13d30
movl 0x8(%rax), %ecx
movl %ecx, -0x80(%rbp)
movq (%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x18(%rbp), %rdi
addq $0x68, %rdi
movl -0x1c(%rbp), %eax
decl %eax
movslq %eax, %rsi
callq 0x13d30
movq -0xd0(%rbp), %rsi
movl 0x8(%rax), %ecx
movl %ecx, -0x90(%rbp)
movq (%rax), %rax
movq %rax, -0x98(%rbp)
movq -0x18(%rbp), %rdi
addq $0x68, %rdi
callq 0x13d30
movl 0x8(%rax), %ecx
movl %ecx, -0xa0(%rbp)
movq (%rax), %rax
movq %rax, -0xa8(%rbp)
movl $0x98, %edi
callq 0x31b0
movq %rax, -0xc8(%rbp)
jmp 0x109fc
movq -0xc8(%rbp), %rdi
leaq -0x78(%rbp), %rsi
leaq -0x88(%rbp), %rdx
leaq -0x98(%rbp), %rcx
leaq -0xa8(%rbp), %r8
callq 0xe880
jmp 0x10a23
movq -0xc8(%rbp), %rsi
movq -0xb8(%rbp), %rdi
callq 0xb660
jmp 0x10a38
addq $0xd0, %rsp
popq %rbp
retq
movq -0xc8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
callq 0x3190
movq -0xb8(%rbp), %rdi
callq 0xb5f0
movq -0x68(%rbp), %rdi
callq 0x3280
nop