// File: /workspace/github_cpp_makefile_star2_O3/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, %rbx
movq $0x0, 0x18(%rdi)
callq 0x394e
movq %rax, 0x20(%rbx)
movl $0x60, %edi
callq 0x3260
movq %rax, %r14
leaq -0x78(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x5c31(%rip), %rsi      # 0xc1c9
leaq 0x5c32(%rip), %rdx      # 0xc1d1
leaq -0x88(%rbp), %rdi
callq 0x574e
leaq -0xa8(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x84ba
leaq -0xa8(%rbp), %rsi
movq %r14, %rdi
callq 0x4ef4
leaq -0x98(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x65e2
callq 0x3230
movq -0x88(%rbp), %rdi
cmpq %r15, %rdi
je 0x65f3
callq 0x3230
movq %rbx, %rdi
callq 0x9a66
movl %eax, %r15d
shrl $0x1f, %r15d
addl %eax, %r15d
sarl %r15d
movq %r14, %rdi
callq 0x9a66
leal 0x3(%rax), %ecx
testl %eax, %eax
cmovnsl %eax, %ecx
sarl $0x2, %ecx
subl %ecx, %r15d
addl $0x6, %r15d
btsq $0x21, %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x9a5c
movq %r14, %rdi
callq 0x9a66
movq %rax, %r15
movq %r14, %rdi
callq 0x9a66
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
andq %rax, %rcx
movl %r15d, %esi
orq %rcx, %rsi
movq %r14, %rdi
callq 0x9a70
movq %r14, %rdi
movl $0x23, %esi
callq 0x68e6
movq %rbx, %rdi
movq %r14, %rsi
callq 0x98fe
movl $0x60, %edi
callq 0x3260
movq %rax, %r14
leaq -0x38(%rbp), %r15
movq %r15, -0x10(%r15)
movq 0x38(%rbx), %rsi
movq 0x40(%rbx), %rdx
addq %rsi, %rdx
leaq -0x48(%rbp), %rdi
callq 0x3b60
leaq 0x5b2a(%rip), %rsi      # 0xc1d2
leaq -0x48(%rbp), %rdi
callq 0x3480
leaq -0x48(%rbp), %rsi
movq %r14, %rdi
callq 0x4ef4
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x66cb
callq 0x3230
movl 0x20(%rbx), %r13d
leaq -0x58(%rbp), %r12
movq %r12, -0x10(%r12)
movq 0x38(%rbx), %rsi
movq 0x40(%rbx), %rdx
addq %rsi, %rdx
leaq -0x68(%rbp), %r15
movq %r15, %rdi
callq 0x3b60
leaq 0x5adc(%rip), %rsi      # 0xc1d2
movq %r15, %rdi
callq 0x3480
leaq -0x68(%rbp), %rdi
callq 0x6d4e
movl %r13d, %esi
shrl $0x1f, %esi
addl %r13d, %esi
sarl %esi
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
subl %ecx, %esi
movl 0x24(%rbx), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %eax, %ecx
sarl %ecx
decl %ecx
shlq $0x20, %rcx
orq %rcx, %rsi
movq %r14, %rdi
callq 0x9a5c
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x6748
callq 0x3230
movq %r14, %rdi
movl $0x23, %esi
callq 0x68e6
movq %r14, %rdi
movl $0x25, %esi
callq 0x68fa
movq %rbx, %rdi
movq %r14, %rsi
callq 0x98fe
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x67d1
jmp 0x6783
movq %rax, %rbx
movq -0x48(%rbp), %rdi
jmp 0x67b2
jmp 0x67be
movq %rax, %rbx
leaq -0x98(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x67ab
callq 0x3230
jmp 0x67ab
movq %rax, %rbx
movq -0x88(%rbp), %rdi
cmpq %r15, %rdi
je 0x67c1
callq 0x3230
jmp 0x67c1
movq %rax, %rbx
movq %r14, %rdi
callq 0x3230
movq %rbx, %rdi
callq 0x3430
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
jne 0x67c4
jmp 0x67c9
nop