// File: /workspace/github_cpp_makefile_star2_O3/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 0x58bf(%rip), %r13      # 0x9208
movsd 0x26cf(%rip), %xmm0     # 0x6020
divsd (%r13), %xmm0
cvttsd2si %xmm0, %r9
leaq 0x58ad(%rip), %rbp      # 0x9210
movsd 0x26bd(%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 0x2697(%rip), %xmm1     # 0x6030
movapd %xmm1, %xmm2
divsd %xmm0, %xmm2
cvttsd2si %xmm2, %ecx
movsd (%rbp), %xmm2
divsd %xmm2, %xmm1
cvttsd2si %xmm1, %r8d
movsd 0x267d(%rip), %xmm1     # 0x6038
divsd %xmm0, %xmm1
cvttsd2si %xmm1, %r9
movsd 0x2674(%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 0x26e6(%rip), %rsi      # 0x60df
leaq 0x26ea(%rip), %rdx      # 0x60ea
leaq 0x108(%rsp), %rdi
callq 0x4302
leaq 0xf8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x26cb(%rip), %rsi      # 0x60eb
leaq 0x26cd(%rip), %rdx      # 0x60f4
leaq 0xe8(%rsp), %rdi
callq 0x4302
leaq 0xd8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x26ae(%rip), %rsi      # 0x60f5
leaq 0x26b7(%rip), %rdx      # 0x6105
leaq 0xc8(%rsp), %rdi
callq 0x4302
leaq 0xb8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x2698(%rip), %rsi      # 0x6106
leaq 0x26a6(%rip), %rdx      # 0x611b
leaq 0xa8(%rsp), %rdi
callq 0x4302
leaq 0x98(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x2687(%rip), %rsi      # 0x611c
leaq 0x2695(%rip), %rdx      # 0x6131
leaq 0x88(%rsp), %rdi
callq 0x4302
leaq 0x78(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x2679(%rip), %rsi      # 0x6132
leaq 0x2688(%rip), %rdx      # 0x6148
leaq 0x68(%rsp), %rdi
callq 0x4302
leaq 0x58(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x266f(%rip), %rsi      # 0x6149
leaq 0x267d(%rip), %rdx      # 0x615e
leaq 0x48(%rsp), %rdi
callq 0x4302
leaq 0x38(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x2664(%rip), %rsi      # 0x615f
leaq 0x2674(%rip), %rdx      # 0x6176
leaq 0x28(%rsp), %rdi
callq 0x4302
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x265b(%rip), %rsi      # 0x6177
leaq 0x266b(%rip), %rdx      # 0x618e
leaq 0x8(%rsp), %rdi
callq 0x4302
leaq 0x138(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x264e(%rip), %rsi      # 0x618f
leaq 0x265f(%rip), %rdx      # 0x61a7
leaq 0x128(%rsp), %rdi
callq 0x4302
movsd 0x24eb(%rip), %xmm0     # 0x6048
divsd (%r13), %xmm0
cvttsd2si %xmm0, %ecx
movsd 0x24e1(%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 0x24a7(%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 0x2463(%rip), %xmm0     # 0x6048
divsd (%r13), %xmm0
cvttsd2si %xmm0, %ecx
movsd 0x2461(%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 0x241f(%rip), %xmm0     # 0x6048
divsd (%r13), %xmm0
cvttsd2si %xmm0, %ecx
movsd 0x2425(%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 0x23db(%rip), %xmm0     # 0x6048
divsd (%r13), %xmm0
cvttsd2si %xmm0, %ecx
movsd 0x23e9(%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 0x2397(%rip), %xmm0     # 0x6048
divsd (%r13), %xmm0
cvttsd2si %xmm0, %ecx
movsd 0x23ad(%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 0x2359(%rip), %xmm0     # 0x6048
divsd (%r13), %xmm0
cvttsd2si %xmm0, %ecx
movsd 0x2377(%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 0x231b(%rip), %xmm0     # 0x6048
divsd (%r13), %xmm0
cvttsd2si %xmm0, %ecx
movsd 0x2341(%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 0x22dd(%rip), %xmm0     # 0x6048
divsd (%r13), %xmm0
cvttsd2si %xmm0, %ecx
movsd 0x230b(%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 0x229f(%rip), %xmm0     # 0x6048
divsd (%r13), %xmm0
cvttsd2si %xmm0, %ecx
movsd 0x22d5(%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 0x3e02
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 0x3e3e
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x3e5a
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x3e76
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x3e92
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x3eb7
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0xa8(%rsp), %rdi
cmpq %r12, %rdi
je 0x3ed4
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0xc8(%rsp), %rdi
cmpq %r15, %rdi
je 0x3ef1
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0xe8(%rsp), %rdi
cmpq %r14, %rdi
je 0x3f0e
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0x108(%rsp), %rdi
cmpq %rbx, %rdi
je 0x3f2b
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 0x3f9f
movq %rax, %rbx
jmp 0x3fbb
movq %rax, %rbx
jmp 0x3fd7
movq %rax, %rbx
jmp 0x3ff3
movq %rax, %rbx
jmp 0x400f
movq %rax, %rbx
jmp 0x4034
movq %rax, %rbx
jmp 0x4059
movq %rax, %rbx
jmp 0x407e
movq %rax, %rbx
jmp 0x40a3
movq %rax, %rbx
movq 0x128(%rsp), %rdi
cmpq %r12, %rdi
je 0x3f9f
movq 0x138(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x3fbb
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x3fd7
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x3ff3
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x400f
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x4034
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x4059
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x407e
movq 0xd8(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0x40a3
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x2200
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0x40c8
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x2200
movq %rbx, %rdi
callq 0x2350