// File: /workspace/github_cpp_makefile_star2_O1/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 0x395e
movq %rax, 0x20(%rbx)
movl $0x60, %edi
callq 0x3270
movq %rax, %r14
leaq -0x78(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x5c2d(%rip), %rsi      # 0xc1c9
leaq 0x5c2e(%rip), %rdx      # 0xc1d1
leaq -0x88(%rbp), %rdi
callq 0x5744
leaq -0xa8(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x84aa
leaq -0xa8(%rbp), %rsi
movq %r14, %rdi
callq 0x4ee6
leaq -0x98(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x65e6
callq 0x3240
movq -0x88(%rbp), %rdi
cmpq %r15, %rdi
je 0x65f7
callq 0x3240
movq %rbx, %rdi
callq 0x9a56
movl %eax, %r15d
shrl $0x1f, %r15d
addl %eax, %r15d
sarl %r15d
movq %r14, %rdi
callq 0x9a56
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 0x9a4c
movq %r14, %rdi
callq 0x9a56
movq %rax, %r15
movq %r14, %rdi
callq 0x9a56
movabsq $-0x100000000, %rcx     # imm = 0xFFFFFFFF00000000
andq %rax, %rcx
movl %r15d, %esi
orq %rcx, %rsi
movq %r14, %rdi
callq 0x9a60
movq %r14, %rdi
movl $0x23, %esi
callq 0x68ea
movq %rbx, %rdi
movq %r14, %rsi
callq 0x98f2
movl $0x60, %edi
callq 0x3270
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 0x3b70
leaq 0x5b26(%rip), %rsi      # 0xc1d2
leaq -0x48(%rbp), %rdi
callq 0x3490
leaq -0x48(%rbp), %rsi
movq %r14, %rdi
callq 0x4ee6
movq -0x48(%rbp), %rdi
cmpq %r15, %rdi
je 0x66cf
callq 0x3240
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 0x3b70
leaq 0x5ad8(%rip), %rsi      # 0xc1d2
movq %r15, %rdi
callq 0x3490
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 0x9a4c
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
je 0x674c
callq 0x3240
movq %r14, %rdi
movl $0x23, %esi
callq 0x68ea
movq %r14, %rdi
movl $0x25, %esi
callq 0x68fe
movq %rbx, %rdi
movq %r14, %rsi
callq 0x98f2
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x67d5
jmp 0x6787
movq %rax, %rbx
movq -0x48(%rbp), %rdi
jmp 0x67b6
jmp 0x67c2
movq %rax, %rbx
leaq -0x98(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x67af
callq 0x3240
jmp 0x67af
movq %rax, %rbx
movq -0x88(%rbp), %rdi
cmpq %r15, %rdi
je 0x67c5
callq 0x3240
jmp 0x67c5
movq %rax, %rbx
movq %r14, %rdi
callq 0x3240
movq %rbx, %rdi
callq 0x3440
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r12, %rdi
jne 0x67c8
jmp 0x67cd
nop