// File: /workspace/github_cpp_makefile_star2_O1/thierry7100[P]CutOptim/src/Geometry.cpp
// Function: Polygon::Translate(Point const*)
Polygon *Polygon::Translate(const Point *pT)
{
Polygon *Translated = new Polygon;

    nbTranslatedPoly++;
    nbCreatedTranslatedPoly++;
    Translated->TypePoly = TranslatedPoly;
    if ( poly_centroid_ok == 0 ) getCentroid();
    Translated->pt_Translation = *pT - poly_centroid;
    Translated->_Vertices = _Vertices;          //      Copy vertice vector
    Translated->nVertices = Translated->_Vertices.size();
    for ( int i = 0; i < nVertices; i++)
    {
        Translated->_Vertices[i].x += Translated->pt_Translation.x;
        Translated->_Vertices[i].y += Translated->pt_Translation.y;
    }
    Translated->_Angles = _Angles;
    Translated->poly_area = poly_area;
    Translated->poly_centroid = poly_centroid + Translated->pt_Translation;
    Translated->angle_rotation = angle_rotation;
    Translated->poly_centroid_ok = 1;
    Translated->poly_changed = 0;
    Translated->poly_closed = poly_closed;
    Translated->poly_clockwise = poly_clockwise;
    Translated->BoundingBox.A = BoundingBox.A + Translated->pt_Translation;
    Translated->BoundingBox.B = BoundingBox.B + Translated->pt_Translation;
    Translated->precision = precision;
    return Translated;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
movl $0xc0, %edi
callq 0x7430
movq %rax, %r14
leaq 0x297fe(%rip), %rax     # 0x51ca0
movq %rax, (%r14)
leaq 0x10(%r14), %r12
xorl %ebp, %ebp
movl %ebp, 0x8(%r14)
movl $0x8c, %edx
movq %r12, %rdi
xorl %esi, %esi
callq 0x7270
xorps %xmm0, %xmm0
movups %xmm0, 0xb0(%r14)
movl $0x1, 0x9c(%r14)
incq 0x2a525(%rip)           # 0x52a00
movq $0x0, 0xa8(%r14)
incq 0x2a543(%rip)           # 0x52a30
movabsq $0x3f1a36e2eb1c432d, %rax # imm = 0x3F1A36E2EB1C432D
incq 0x2a51a(%rip)           # 0x52a18
movq %rax, 0xa0(%r14)
incq 0x2a53c(%rip)           # 0x52a48
movl %ebp, 0xc(%r14)
movl $0x3, 0xc(%r14)
cmpl %ebp, 0x90(%rbx)
jne 0x28528
movq %rbx, %rdi
callq 0x283b4
movsd (%r15), %xmm0
movsd 0x8(%r15), %xmm1
subsd 0x80(%rbx), %xmm0
subsd 0x88(%rbx), %xmm1
movsd %xmm0, 0xb0(%r14)
movsd %xmm1, 0xb8(%r14)
leaq 0x10(%rbx), %rsi
movq %r12, %rdi
callq 0x29d7a
movq 0x10(%r14), %rax
movq 0x18(%r14), %rcx
subq %rax, %rcx
shrq $0x4, %rcx
movl %ecx, 0x8(%r14)
movslq 0x8(%rbx), %rcx
testq %rcx, %rcx
jle 0x285b4
shlq $0x4, %rcx
xorl %edx, %edx
movsd 0xb0(%r14), %xmm0
addsd (%rax,%rdx), %xmm0
movsd %xmm0, (%rax,%rdx)
movsd 0xb8(%r14), %xmm0
addsd 0x8(%rax,%rdx), %xmm0
movsd %xmm0, 0x8(%rax,%rdx)
addq $0x10, %rdx
cmpq %rdx, %rcx
jne 0x28583
leaq 0x40(%rbx), %rsi
movq %r14, %rdi
addq $0x40, %rdi
callq 0x29e66
movsd 0x78(%rbx), %xmm0
movsd %xmm0, 0x78(%r14)
movsd 0xb0(%r14), %xmm0
movsd 0xb8(%r14), %xmm1
movsd 0x80(%rbx), %xmm2
addsd %xmm0, %xmm2
movsd 0x88(%rbx), %xmm3
addsd %xmm1, %xmm3
movsd %xmm2, 0x80(%r14)
movsd %xmm3, 0x88(%r14)
movsd 0xa8(%rbx), %xmm2
movsd %xmm2, 0xa8(%r14)
movl $0x1, 0x90(%r14)
movl $0x0, 0x9c(%r14)
movl 0x98(%rbx), %eax
movl %eax, 0x98(%r14)
movl 0x94(%rbx), %eax
movl %eax, 0x94(%r14)
movsd 0x58(%rbx), %xmm2
addsd %xmm0, %xmm2
movsd 0x60(%rbx), %xmm3
addsd %xmm1, %xmm3
movsd %xmm2, 0x58(%r14)
movsd %xmm3, 0x60(%r14)
addsd 0x68(%rbx), %xmm0
addsd 0x70(%rbx), %xmm1
movsd %xmm0, 0x68(%r14)
movsd %xmm1, 0x70(%r14)
movsd 0xa0(%rbx), %xmm0
movsd %xmm0, 0xa0(%r14)
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop