// File: tkaczenko[P]asteroids-clone/src/Ship.cpp
// Function: Ship::trace()
void Ship::trace()
{
    cosA = cos(angle);
    sinA = sin(angle);

    int i = 0;
    for (; i < 5; i++) {
        ship[i] = baseFormula(coefArr[i][0], coefArr[i][1], coefArr[i][2], coefArr[i][3]);
    }
    i = 5;
    for (int j = 0; j < 3; j++) {
        thruster[j] = baseFormula(coefArr[i][0], coefArr[i][1], coefArr[i][2], coefArr[i][3]);
        i++;
    }
    for (int j = 0; j < 2; j++) {
        colPoints[j].x = ship[j].x;
        colPoints[j].y = ship[j].y;
        colPoints[j].w = 2;
        colPoints[j].h = 2;
    }
    colPoints[2].x = ship[3].x;
    colPoints[2].y = ship[3].y;
    colPoints[2].w = 2;
    colPoints[2].h = 2;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movss 0x18(%rax), %xmm0
callq 0x7e80
movq -0x30(%rbp), %rax
movss %xmm0, 0x24(%rax)
movss 0x18(%rax), %xmm0
callq 0x7ea0
movq -0x30(%rbp), %rax
movss %xmm0, 0x28(%rax)
movl $0x0, -0xc(%rbp)
cmpl $0x5, -0xc(%rbp)
jge 0x7482
movq -0x30(%rbp), %rdi
movq 0x30(%rdi), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movq 0x30(%rdi), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
addq $0x4, %rdx
movq 0x30(%rdi), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
addq $0x8, %rcx
movq 0x30(%rdi), %rax
movslq -0xc(%rbp), %r8
movq (%rax,%r8,8), %r8
addq $0xc, %r8
callq 0x75d0
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, -0x14(%rbp)
movq 0x70(%rax), %rax
movslq -0xc(%rbp), %rcx
movq -0x14(%rbp), %rdx
movq %rdx, (%rax,%rcx,8)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x7411
movl $0x5, -0xc(%rbp)
movl $0x0, -0x18(%rbp)
cmpl $0x3, -0x18(%rbp)
jge 0x750a
movq -0x30(%rbp), %rdi
movq 0x30(%rdi), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movq 0x30(%rdi), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
addq $0x4, %rdx
movq 0x30(%rdi), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
addq $0x8, %rcx
movq 0x30(%rdi), %rax
movslq -0xc(%rbp), %r8
movq (%rax,%r8,8), %r8
addq $0xc, %r8
callq 0x75d0
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, -0x20(%rbp)
movq 0x78(%rax), %rax
movslq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rdx
movq %rdx, (%rax,%rcx,8)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x7490
movl $0x0, -0x24(%rbp)
cmpl $0x2, -0x24(%rbp)
jge 0x758c
movq -0x30(%rbp), %rax
movq 0x70(%rax), %rcx
movslq -0x24(%rbp), %rdx
movl (%rcx,%rdx,8), %edx
movq 0x38(%rax), %rcx
movslq -0x24(%rbp), %rsi
shlq $0x4, %rsi
addq %rsi, %rcx
movl %edx, (%rcx)
movq 0x70(%rax), %rcx
movslq -0x24(%rbp), %rdx
movl 0x4(%rcx,%rdx,8), %edx
movq 0x38(%rax), %rcx
movslq -0x24(%rbp), %rsi
shlq $0x4, %rsi
addq %rsi, %rcx
movl %edx, 0x4(%rcx)
movq 0x38(%rax), %rcx
movslq -0x24(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movl $0x2, 0x8(%rcx)
movq 0x38(%rax), %rax
movslq -0x24(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movl $0x2, 0xc(%rax)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x7511
movq -0x30(%rbp), %rax
movq 0x70(%rax), %rcx
movl 0x18(%rcx), %edx
movq 0x38(%rax), %rcx
movl %edx, 0x20(%rcx)
movq 0x70(%rax), %rcx
movl 0x1c(%rcx), %edx
movq 0x38(%rax), %rcx
movl %edx, 0x24(%rcx)
movq 0x38(%rax), %rcx
movl $0x2, 0x28(%rcx)
movq 0x38(%rax), %rax
movl $0x2, 0x2c(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)