// File: /workspace/github_cpp_makefile_star2_O2/Jacobious52[P]Tanks/EndView.cpp
// Function: EndView::_init()
void EndView::_init()
{
    _position = Point<int>::zero();
    _size = ConsoleTools::get_terminal_size();

    // game over text
    Sprite *game_over_text = new Sprite(TextureTools::get_texture("gameover"));
    game_over_text->set_position(Point<int>(get_size().x/2 - game_over_text->get_size().x/4 + 6, 2));
    game_over_text->set_size(Point<int>(game_over_text->get_size().x, game_over_text->get_size().y));
    game_over_text->set_fcolor(ConsoleTools::magneta);
    add_child(game_over_text);

    // winner name text
    Sprite *winner_text = new Sprite(_winner + " Wins!");
    winner_text->set_position(Point<int>(_size.x/2 - StringTools::string_width(_winner + " Wins!")/2, (_size.y/2)-1));
    winner_text->set_fcolor(ConsoleTools::magneta);
    winner_text->set_bcolor(ConsoleTools::white);
    add_child(winner_text);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %r14
andq $0x0, 0x18(%rdi)
callq 0x3970
movq %rax, 0x20(%r14)
pushq $0x60
popq %rdi
callq 0x32d0
movq %rax, %rbx
leaq 0x5126(%rip), %rsi      # 0xb199
leaq -0x70(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x3120
movb $0x1, %r15b
leaq -0x90(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x79ee
leaq -0x90(%rbp), %rsi
movq %rbx, %rdi
callq 0x4be2
xorl %r15d, %r15d
leaq -0x90(%rbp), %rdi
callq 0x3340
leaq -0x70(%rbp), %rdi
callq 0x3340
movq %r14, %rdi
callq 0x8d2e
pushq $0x2
popq %rcx
cltd
idivl %ecx
movl %eax, %r15d
movq %rbx, %rdi
callq 0x8d2e
pushq $-0x4
popq %rcx
cltd
idivl %ecx
leal (%r15,%rax), %esi
addl $0x6, %esi
btsq $0x21, %rsi
movq %rbx, %rdi
callq 0x8d24
movq %rbx, %rdi
callq 0x8d2e
movq %rax, %r15
movq %rbx, %rdi
callq 0x8d2e
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
andq %rax, %rcx
movl %r15d, %esi
orq %rcx, %rsi
movq %rbx, %rdi
callq 0x8d38
pushq $0x23
popq %rsi
movq %rbx, %rdi
callq 0x637a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8c32
pushq $0x60
popq %rdi
callq 0x32d0
movq %rax, %rbx
leaq 0x38(%r14), %r15
leaq 0x505b(%rip), %rdx      # 0xb1a2
leaq -0x50(%rbp), %rdi
movq %r15, %rsi
callq 0x3abc
leaq -0x50(%rbp), %rsi
movq %rbx, %rdi
callq 0x4be2
leaq -0x50(%rbp), %rdi
callq 0x3340
movl 0x20(%r14), %r12d
leaq 0x502f(%rip), %rdx      # 0xb1a2
leaq -0xb0(%rbp), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x3abc
movq %r13, %rdi
callq 0x6758
movl %eax, %ecx
movl %r12d, %eax
cltd
pushq $0x2
popq %r8
idivl %r8d
movl %eax, %esi
pushq $-0x2
popq %rdi
movl %ecx, %eax
cltd
idivl %edi
addl %eax, %esi
movl 0x24(%r14), %eax
cltd
idivl %r8d
decl %eax
shlq $0x20, %rax
orq %rax, %rsi
movq %rbx, %rdi
callq 0x8d24
leaq -0xb0(%rbp), %rdi
callq 0x3340
pushq $0x23
popq %rsi
movq %rbx, %rdi
callq 0x637a
pushq $0x25
popq %rsi
movq %rbx, %rdi
callq 0x638e
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8c32
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq -0x50(%rbp), %rdi
callq 0x3340
jmp 0x6249
jmp 0x6222
movq %rax, %r14
leaq -0x90(%rbp), %rdi
callq 0x3340
movb $0x1, %r15b
jmp 0x623b
movq %rax, %r14
jmp 0x6249
movq %rax, %r14
leaq -0xb0(%rbp), %rdi
callq 0x3340
jmp 0x6251
movq %rax, %r14
leaq -0x70(%rbp), %rdi
callq 0x3340
testb %r15b, %r15b
je 0x6251
movq %rbx, %rdi
callq 0x32a0
movq %r14, %rdi
callq 0x3450
movq %rax, %rdi
callq 0x3aae
nop