// File: /workspace/github_cpp_makefile_star2_O2/therealgymmy[P]HelicopterGame/src/helicopter.cpp
// Function: Helicopter::draw(XInfo*)
void Helicopter::draw (XInfo *xinfo) {
    if (blink_ > 0) {
        --blink_;
        if (!(blink_ & 0x8)) {
            return;
        }
    }
    end_.draw<attr::BLACK>(xinfo,
                           x_ / Draw::ScaleX,
                           (y_ + (HeliHead::h() - HeliEnd::h()) / 2) / Draw::ScaleY);

    mid_.draw<attr::WHITE>(xinfo,
                           (x_ + HeliEnd::w()) / Draw::ScaleX,
                           (y_ + (HeliHead::h() - HeliMid::h()) / 2) / Draw::ScaleY);

    head_.draw<attr::WHITE>(xinfo,
                            (x_ + HeliEnd::w() + HeliMid::w()) / Draw::ScaleX,
                            y_ / Draw::ScaleY);

    top_.draw<attr::WHITE>(xinfo,
                           (x_ + HeliEnd::w() + HeliMid::w() - (HeliTop::w() - HeliHead::w()) / 2) / Draw::ScaleX,
                           (y_ - HeliTop::h()) / Draw::ScaleY);

    headin_.draw<attr::GREEN>(xinfo,
                              (x_ + HeliEnd::w() + HeliMid::w() + (HeliHead::w() - HeliHeadIn::w()) / 2) / Draw::ScaleX,
                              (y_ + (HeliHead::h() - HeliHeadIn::h()) / 2) / Draw::ScaleY);

    endin_.draw<attr::RED>(xinfo,
                           (x_ + (HeliEnd::w() - HeliEndIn::w()) / 2) / Draw::ScaleX,
                           (y_ + (HeliHead::h() - HeliEndIn::h()) / 2) / Draw::ScaleY);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0x24(%rdi), %eax
testl %eax, %eax
jle 0x40df
decl %eax
movl %eax, 0x24(%r14)
testb $0x8, %al
jne 0x40df
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
cvtsi2sdl 0x14(%r14), %xmm0
leaq 0x510c(%rip), %r15      # 0x91f8
divsd (%r15), %xmm0
leaq 0x1e(%r14), %rdi
cvttsd2si %xmm0, %edx
movl 0x18(%r14), %eax
addl $0x3c, %eax
cvtsi2sd %eax, %xmm0
leaq 0x50f5(%rip), %r12      # 0x9200
divsd (%r12), %xmm0
cvttsd2si %xmm0, %ecx
movq %rbx, %rsi
callq 0x43c6
leaq 0x1d(%r14), %rdi
movl 0x14(%r14), %eax
addl $0x50, %eax
cvtsi2sd %eax, %xmm0
divsd (%r15), %xmm0
cvttsd2si %xmm0, %edx
movl 0x18(%r14), %eax
addl $0x5a, %eax
cvtsi2sd %eax, %xmm0
divsd (%r12), %xmm0
cvttsd2si %xmm0, %ecx
movq %rbx, %rsi
callq 0x4424
leaq 0x1c(%r14), %rdi
movl $0xc8, %eax
addl 0x14(%r14), %eax
cvtsi2sd %eax, %xmm0
divsd (%r15), %xmm0
cvttsd2si %xmm0, %edx
cvtsi2sdl 0x18(%r14), %xmm0
divsd (%r12), %xmm0
cvttsd2si %xmm0, %ecx
movq %rbx, %rsi
callq 0x4478
leaq 0x1f(%r14), %rdi
movl $0x8c, %eax
addl 0x14(%r14), %eax
cvtsi2sd %eax, %xmm0
divsd (%r15), %xmm0
cvttsd2si %xmm0, %edx
movl 0x18(%r14), %eax
addl $-0x14, %eax
cvtsi2sd %eax, %xmm0
divsd (%r12), %xmm0
cvttsd2si %xmm0, %ecx
movq %rbx, %rsi
callq 0x44da
leaq 0x20(%r14), %rdi
movl $0xd2, %eax
addl 0x14(%r14), %eax
cvtsi2sd %eax, %xmm0
divsd (%r15), %xmm0
cvttsd2si %xmm0, %edx
movl 0x18(%r14), %eax
addl $0xa, %eax
cvtsi2sd %eax, %xmm0
divsd (%r12), %xmm0
cvttsd2si %xmm0, %ecx
movq %rbx, %rsi
callq 0x452e
leaq 0x21(%r14), %rdi
movl 0x14(%r14), %eax
addl $0xa, %eax
cvtsi2sd %eax, %xmm0
divsd (%r15), %xmm0
cvttsd2si %xmm0, %edx
movl 0x18(%r14), %eax
addl $0x46, %eax
cvtsi2sd %eax, %xmm0
divsd (%r12), %xmm0
cvttsd2si %xmm0, %ecx
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x4590