// File: /workspace/github_cpp_makefile_star2_O1/therealgymmy[P]HelicopterGame/src/x_handler.cpp
// Function: XHandler::drawCredits()
void XHandler::drawCredits () {
    // border
    Display *display = xinfo_.display_;
    Pixmap   buffer  = xinfo_.buffer_;
    GC       black   = xinfo_.black_;
    GC       white   = xinfo_.white_;

    XFillRectangle(display, buffer, black,
             0,
             0,
             PLANE_W / attr::DrawableBase::ScaleX,
             PLANE_H / attr::DrawableBase::ScaleY);

    XFillRectangle(display, buffer, white,
             100 / attr::DrawableBase::ScaleX,
             100 / attr::DrawableBase::ScaleY,
             (PLANE_W - 200) / attr::DrawableBase::ScaleX,
             (PLANE_H - 200) / attr::DrawableBase::ScaleY);

    // output text
#define DrawString(x, y, str) \
    XDrawString(display, buffer, black, \
                x / attr::DrawableBase::ScaleX, \
                y / attr::DrawableBase::ScaleY, \
                str.c_str(), str.length())

    std::string name = "Hong Lu 234";
    std::string s1 = "Key Maps:";
    std::string s2 = "    Game Control";
    std::string s3 = "        Accelerate: a";
    std::string s4 = "        Slow down:  z";
    std::string s5 = "    Helicopter Control";
    std::string s6 = "        Up:    Up Key";
    std::string s7 = "        Down:  Down Key";
    std::string s8 = "        Left:  Left Key";
    std::string s9 = "        Right: Right Key";

    DrawString(500, 400, name);
    DrawString(500, 500, s1);
    DrawString(500, 600, s2);
    DrawString(500, 700, s3);
    DrawString(500, 800, s4);
    DrawString(500, 900, s5);
    DrawString(500, 1000, s6);
    DrawString(500, 1100, s7);
    DrawString(500, 1200, s8);
    DrawString(500, 1300, s9);

#undef DrawString
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq 0x8(%rdi), %rbx
movq 0xa8(%rdi), %r14
movq 0xb0(%rdi), %r15
movq 0xb8(%rdi), %r12
leaq 0x58c5(%rip), %r13      # 0x9208
movsd 0x26d5(%rip), %xmm0     # 0x6020
divsd (%r13), %xmm0
cvttsd2si %xmm0, %r9
leaq 0x58b3(%rip), %rbp      # 0x9210
movsd 0x26c3(%rip), %xmm0     # 0x6028
divsd (%rbp), %xmm0
cvttsd2si %xmm0, %rax
movl %eax, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x20f0
movsd (%r13), %xmm0
movsd 0x269d(%rip), %xmm1     # 0x6030
movapd %xmm1, %xmm2
divsd %xmm0, %xmm2
cvttsd2si %xmm2, %ecx
movsd (%rbp), %xmm2
divsd %xmm2, %xmm1
cvttsd2si %xmm1, %r8d
movsd 0x2683(%rip), %xmm1     # 0x6038
divsd %xmm0, %xmm1
cvttsd2si %xmm1, %r9
movsd 0x267a(%rip), %xmm0     # 0x6040
divsd %xmm2, %xmm0
cvttsd2si %xmm0, %rax
movl %eax, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x20f0
leaq 0x118(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x26ec(%rip), %rsi      # 0x60df
leaq 0x26f0(%rip), %rdx      # 0x60ea
leaq 0x108(%rsp), %rdi
callq 0x42fc
leaq 0xf8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x26d1(%rip), %rsi      # 0x60eb
leaq 0x26d3(%rip), %rdx      # 0x60f4
leaq 0xe8(%rsp), %rdi
callq 0x42fc
leaq 0xd8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x26b4(%rip), %rsi      # 0x60f5
leaq 0x26bd(%rip), %rdx      # 0x6105
leaq 0xc8(%rsp), %rdi
callq 0x42fc
leaq 0xb8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x269e(%rip), %rsi      # 0x6106
leaq 0x26ac(%rip), %rdx      # 0x611b
leaq 0xa8(%rsp), %rdi
callq 0x42fc
leaq 0x98(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x268d(%rip), %rsi      # 0x611c
leaq 0x269b(%rip), %rdx      # 0x6131
leaq 0x88(%rsp), %rdi
callq 0x42fc
leaq 0x78(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x267f(%rip), %rsi      # 0x6132
leaq 0x268e(%rip), %rdx      # 0x6148
leaq 0x68(%rsp), %rdi
callq 0x42fc
leaq 0x58(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x2675(%rip), %rsi      # 0x6149
leaq 0x2683(%rip), %rdx      # 0x615e
leaq 0x48(%rsp), %rdi
callq 0x42fc
leaq 0x38(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x266a(%rip), %rsi      # 0x615f
leaq 0x267a(%rip), %rdx      # 0x6176
leaq 0x28(%rsp), %rdi
callq 0x42fc
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x2661(%rip), %rsi      # 0x6177
leaq 0x2671(%rip), %rdx      # 0x618e
leaq 0x8(%rsp), %rdi
callq 0x42fc
leaq 0x138(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x2654(%rip), %rsi      # 0x618f
leaq 0x2665(%rip), %rdx      # 0x61a7
leaq 0x128(%rsp), %rdi
callq 0x42fc
movsd 0x24f1(%rip), %xmm0     # 0x6048
divsd (%r13), %xmm0
cvttsd2si %xmm0, %ecx
movsd 0x24e7(%rip), %xmm0     # 0x6050
divsd (%rbp), %xmm0
cvttsd2si %xmm0, %r8d
movq 0x108(%rsp), %r9
movl 0x110(%rsp), %eax
movl %eax, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x21e0
movsd 0x24ad(%rip), %xmm1     # 0x6048
movapd %xmm1, %xmm0
divsd (%r13), %xmm0
cvttsd2si %xmm0, %ecx
movapd %xmm1, %xmm0
divsd (%rbp), %xmm0
cvttsd2si %xmm0, %r8d
movq 0xe8(%rsp), %r9
movl 0xf0(%rsp), %eax
movl %eax, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x21e0
movsd 0x2469(%rip), %xmm0     # 0x6048
divsd (%r13), %xmm0
cvttsd2si %xmm0, %ecx
movsd 0x2467(%rip), %xmm0     # 0x6058
divsd (%rbp), %xmm0
cvttsd2si %xmm0, %r8d
movq 0xc8(%rsp), %r9
movl 0xd0(%rsp), %eax
movl %eax, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x21e0
movsd 0x2425(%rip), %xmm0     # 0x6048
divsd (%r13), %xmm0
cvttsd2si %xmm0, %ecx
movsd 0x242b(%rip), %xmm0     # 0x6060
divsd (%rbp), %xmm0
cvttsd2si %xmm0, %r8d
movq 0xa8(%rsp), %r9
movl 0xb0(%rsp), %eax
movl %eax, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x21e0
movsd 0x23e1(%rip), %xmm0     # 0x6048
divsd (%r13), %xmm0
cvttsd2si %xmm0, %ecx
movsd 0x23ef(%rip), %xmm0     # 0x6068
divsd (%rbp), %xmm0
cvttsd2si %xmm0, %r8d
movq 0x88(%rsp), %r9
movl 0x90(%rsp), %eax
movl %eax, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x21e0
movsd 0x239d(%rip), %xmm0     # 0x6048
divsd (%r13), %xmm0
cvttsd2si %xmm0, %ecx
movsd 0x23b3(%rip), %xmm0     # 0x6070
divsd (%rbp), %xmm0
cvttsd2si %xmm0, %r8d
movq 0x68(%rsp), %r9
movl 0x70(%rsp), %eax
movl %eax, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x21e0
movsd 0x235f(%rip), %xmm0     # 0x6048
divsd (%r13), %xmm0
cvttsd2si %xmm0, %ecx
movsd 0x237d(%rip), %xmm0     # 0x6078
divsd (%rbp), %xmm0
cvttsd2si %xmm0, %r8d
movq 0x48(%rsp), %r9
movl 0x50(%rsp), %eax
movl %eax, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x21e0
movsd 0x2321(%rip), %xmm0     # 0x6048
divsd (%r13), %xmm0
cvttsd2si %xmm0, %ecx
movsd 0x2347(%rip), %xmm0     # 0x6080
divsd (%rbp), %xmm0
cvttsd2si %xmm0, %r8d
movq 0x28(%rsp), %r9
movl 0x30(%rsp), %eax
movl %eax, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x21e0
movsd 0x22e3(%rip), %xmm0     # 0x6048
divsd (%r13), %xmm0
cvttsd2si %xmm0, %ecx
movsd 0x2311(%rip), %xmm0     # 0x6088
divsd (%rbp), %xmm0
cvttsd2si %xmm0, %r8d
movq 0x8(%rsp), %r9
movl 0x10(%rsp), %eax
movl %eax, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x21e0
movsd 0x22a5(%rip), %xmm0     # 0x6048
divsd (%r13), %xmm0
cvttsd2si %xmm0, %ecx
movsd 0x22db(%rip), %xmm0     # 0x6090
divsd (%rbp), %xmm0
cvttsd2si %xmm0, %r8d
movq 0x128(%rsp), %r9
movl 0x130(%rsp), %eax
movl %eax, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x21e0
movq 0x128(%rsp), %rdi
cmpq %r12, %rdi
je 0x3dfc
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
leaq 0x118(%rsp), %rbx
leaq 0xf8(%rsp), %r14
leaq 0xd8(%rsp), %r15
leaq 0xb8(%rsp), %r12
je 0x3e38
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x3e54
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x3e70
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x3e8c
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x3eb1
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0xa8(%rsp), %rdi
cmpq %r12, %rdi
je 0x3ece
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0xc8(%rsp), %rdi
cmpq %r15, %rdi
je 0x3eeb
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0xe8(%rsp), %rdi
cmpq %r14, %rdi
je 0x3f08
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0x108(%rsp), %rdi
cmpq %rbx, %rdi
je 0x3f25
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x2200
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x3f99
movq %rax, %rbx
jmp 0x3fb5
movq %rax, %rbx
jmp 0x3fd1
movq %rax, %rbx
jmp 0x3fed
movq %rax, %rbx
jmp 0x4009
movq %rax, %rbx
jmp 0x402e
movq %rax, %rbx
jmp 0x4053
movq %rax, %rbx
jmp 0x4078
movq %rax, %rbx
jmp 0x409d
movq %rax, %rbx
movq 0x128(%rsp), %rdi
cmpq %r12, %rdi
je 0x3f99
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x3fb5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x3fd1
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x3fed
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x4009
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x402e
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x4053
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x4078
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0x409d
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0x40c2
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rbx, %rdi
callq 0x2350