// File: 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
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x90(%rbp)
movl $0xc0, %edi
callq 0x9550
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x88(%rbp)
callq 0x5e600
jmp 0x6183c
movq -0x90(%rbp), %rax
movq -0x88(%rbp), %rcx
movq %rcx, -0x18(%rbp)
movq 0x57313(%rip), %rcx     # 0xb8b68
addq $0x1, %rcx
movq %rcx, 0x57308(%rip)     # 0xb8b68
movq 0x57331(%rip), %rcx     # 0xb8b98
addq $0x1, %rcx
movq %rcx, 0x57326(%rip)     # 0xb8b98
movq -0x18(%rbp), %rcx
movl $0x3, 0xc(%rcx)
cmpl $0x0, 0x90(%rax)
jne 0x618c0
movq -0x90(%rbp), %rdi
callq 0x615a0
movsd %xmm0, -0x38(%rbp)
movsd %xmm1, -0x30(%rbp)
jmp 0x618c0
movq -0x88(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
movl $0xc0, %esi
callq 0x9560
jmp 0x61b0f
movq -0x90(%rbp), %rsi
movq -0x10(%rbp), %rdi
addq $0x80, %rsi
callq 0x63e00
movq -0x90(%rbp), %rsi
movsd %xmm0, -0x48(%rbp)
movsd %xmm1, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq -0x48(%rbp), %rcx
movq %rcx, 0xb0(%rax)
movq -0x40(%rbp), %rcx
movq %rcx, 0xb8(%rax)
addq $0x10, %rsi
movq -0x18(%rbp), %rdi
addq $0x10, %rdi
callq 0x642a0
movq -0x18(%rbp), %rdi
addq $0x10, %rdi
callq 0x5add0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x8(%rax)
movl $0x0, -0x4c(%rbp)
movq -0x90(%rbp), %rcx
movl -0x4c(%rbp), %eax
cmpl 0x8(%rcx), %eax
jge 0x619b9
movq -0x18(%rbp), %rax
movsd 0xb0(%rax), %xmm0
movsd %xmm0, -0xa0(%rbp)
movq -0x18(%rbp), %rdi
addq $0x10, %rdi
movslq -0x4c(%rbp), %rsi
callq 0x63990
movsd -0xa0(%rbp), %xmm0
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
movq -0x18(%rbp), %rax
movsd 0xb8(%rax), %xmm0
movsd %xmm0, -0x98(%rbp)
movq -0x18(%rbp), %rdi
addq $0x10, %rdi
movslq -0x4c(%rbp), %rsi
callq 0x63990
movsd -0x98(%rbp), %xmm0
addsd 0x8(%rax), %xmm0
movsd %xmm0, 0x8(%rax)
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x61930
movq -0x90(%rbp), %rsi
addq $0x40, %rsi
movq -0x18(%rbp), %rdi
addq $0x40, %rdi
callq 0x644f0
movq -0x90(%rbp), %rdi
movsd 0x78(%rdi), %xmm0
movq -0x18(%rbp), %rax
movsd %xmm0, 0x78(%rax)
addq $0x80, %rdi
movq -0x18(%rbp), %rsi
addq $0xb0, %rsi
callq 0x63d60
movq -0x90(%rbp), %rdi
movsd %xmm0, -0x60(%rbp)
movsd %xmm1, -0x58(%rbp)
movq -0x18(%rbp), %rax
movq -0x60(%rbp), %rcx
movq %rcx, 0x80(%rax)
movq -0x58(%rbp), %rcx
movq %rcx, 0x88(%rax)
movsd 0xa8(%rdi), %xmm0
movq -0x18(%rbp), %rax
movsd %xmm0, 0xa8(%rax)
movq -0x18(%rbp), %rax
movl $0x1, 0x90(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x9c(%rax)
movl 0x98(%rdi), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x98(%rax)
movl 0x94(%rdi), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x94(%rax)
addq $0x58, %rdi
movq -0x18(%rbp), %rsi
addq $0xb0, %rsi
callq 0x63d60
movq -0x90(%rbp), %rdi
movsd %xmm0, -0x70(%rbp)
movsd %xmm1, -0x68(%rbp)
movq -0x18(%rbp), %rax
movq -0x70(%rbp), %rcx
movq %rcx, 0x58(%rax)
movq -0x68(%rbp), %rcx
movq %rcx, 0x60(%rax)
addq $0x58, %rdi
addq $0x10, %rdi
movq -0x18(%rbp), %rsi
addq $0xb0, %rsi
callq 0x63d60
movq -0x90(%rbp), %rax
movsd %xmm0, -0x80(%rbp)
movsd %xmm1, -0x78(%rbp)
movq -0x18(%rbp), %rcx
movq -0x80(%rbp), %rdx
movq %rdx, 0x68(%rcx)
movq -0x78(%rbp), %rdx
movq %rdx, 0x70(%rcx)
movsd 0xa0(%rax), %xmm0
movq -0x18(%rbp), %rax
movsd %xmm0, 0xa0(%rax)
movq -0x18(%rbp), %rax
addq $0xa0, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x9960
nopl (%rax,%rax)