// File: /workspace/github_cpp_makefile_star2_O2/Jacobious52[P]Tanks/IntroView.cpp
// Function: IntroView::update(int)
void IntroView::update(int t)
{
    // get player's name's after sometime
    if (t == 20 && player1 == "" && player2 == "")
    {
        ConsoleTools::set_cursor(0, get_size().y/2);
        ConsoleTools::clear_line();

        // get player 1
        ConsoleTools::set_cursor(get_size().x/2 - StringTools::string_width("Name of Player 1")/2, get_size().y/3);
        ConsoleTools::set_fcolor(ConsoleTools::white);
        printf("Name of Player 1");
        ConsoleTools::move_cursor(ConsoleTools::down, 2);
        ConsoleTools::move_cursor(ConsoleTools::left, StringTools::string_width("Name of Player 1"));
        ConsoleTools::set_fcolor(ConsoleTools::red);
        player1 = ConsoleTools::get_line();
        ConsoleTools::play_music("beep.wav");

        // get player 2
        ConsoleTools::set_cursor(get_size().x/2 - StringTools::string_width("Name of Player 2")/2, 2*get_size().y/3);
        ConsoleTools::set_fcolor(ConsoleTools::white);
        printf("Name of Player 2");
        ConsoleTools::move_cursor(ConsoleTools::down, 2);
        ConsoleTools::move_cursor(ConsoleTools::left, StringTools::string_width("Name of Player 2"));
        ConsoleTools::set_fcolor(ConsoleTools::blue);
        player2 = ConsoleTools::get_line();
        ConsoleTools::play_music("beep.wav");

        // write to replay file
        if (ConsoleTools::replay == false)
        {
            std::ofstream file("replay.txt", std::ios::app);
            file << player1 << std::endl << player2 << std::endl;
            file.close();
        }

    }
    else if (t < 20 && t % 4 == 0)
    {
        // increment the loader
        if (_load_num_string == "")
        {
            _load_num_string = ".";
        }
        else if (_load_num_string == ".")
        {
            _load_num_string = "..";
        }
        else if (_load_num_string == "..")
        {
            _load_num_string = "...";
        }
        else if (_load_num_string == "...")
        {
            _load_num_string = "";
        }
    }
    else if (t > 60)
    {
        _should_remove_from_parent = true;
    }

    // update children
    View::update(t);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2c8, %rsp            # imm = 0x2C8
movl %esi, %ebx
movq %rdi, %r14
cmpl $0x14, %esi
jne 0x5b4b
leaq 0x38(%r14), %r12
leaq 0x57c4(%rip), %rsi      # 0xb00b
movq %r12, %rdi
callq 0x5f62
testb %al, %al
je 0x5b4b
leaq 0x58(%r14), %r15
leaq 0x57a9(%rip), %rsi      # 0xb00b
movq %r15, %rdi
callq 0x5f62
testb %al, %al
je 0x5b4b
movq %r15, -0x30(%rbp)
movq %r14, %rdi
callq 0x8d2e
shrq $0x20, %rax
pushq $0x2
popq %r15
cltd
idivl %r15d
xorl %edi, %edi
movl %eax, %esi
callq 0x390e
callq 0x3924
movq %r14, %rdi
callq 0x8d2e
cltd
idivl %r15d
movl %eax, %r13d
leaq 0x58a5(%rip), %rsi      # 0xb153
leaq -0xf0(%rbp), %rdi
leaq -0x2f0(%rbp), %rdx
callq 0x3120
leaq -0xf0(%rbp), %rdi
callq 0x6758
movl %eax, %r15d
movq %r14, %rdi
callq 0x8d2e
movq %rax, %rcx
pushq $-0x2
popq %rsi
movl %r15d, %eax
cltd
idivl %esi
addl %eax, %r13d
shrq $0x20, %rcx
pushq $0x3
popq %rsi
movl %ecx, %eax
cltd
idivl %esi
movl %r13d, %edi
movl %eax, %esi
callq 0x390e
leaq -0xf0(%rbp), %rdi
callq 0x3340
pushq $0x25
popq %rdi
callq 0x386e
leaq 0x583b(%rip), %r15      # 0xb153
movq %r15, %rdi
xorl %eax, %eax
callq 0x3050
pushq $0x42
popq %rdi
pushq $0x2
popq %r13
movl %r13d, %esi
callq 0x3958
leaq -0xd0(%rbp), %rdi
leaq -0x2f0(%rbp), %rdx
movq %r15, %rsi
callq 0x3120
leaq -0xd0(%rbp), %rdi
callq 0x6758
pushq $0x44
popq %rdi
movl %eax, %esi
callq 0x3958
leaq -0xd0(%rbp), %rdi
callq 0x3340
pushq $0x1f
popq %rdi
callq 0x386e
leaq -0x2f0(%rbp), %r15
movq %r15, %rdi
callq 0x380c
movq %r12, %rdi
movq %r15, %rsi
callq 0x3180
leaq -0x2f0(%rbp), %rdi
callq 0x3340
leaq 0x5732(%rip), %rsi      # 0xb0d0
leaq -0xb0(%rbp), %rdi
leaq -0x2f0(%rbp), %rdx
callq 0x3120
leaq -0xb0(%rbp), %rdi
callq 0x39be
leaq -0xb0(%rbp), %rdi
callq 0x3340
movq %r14, %rdi
callq 0x8d2e
cltd
idivl %r13d
movl %eax, %r13d
leaq 0x5785(%rip), %rsi      # 0xb164
leaq -0x90(%rbp), %rdi
leaq -0x2f0(%rbp), %rdx
callq 0x3120
leaq -0x90(%rbp), %rdi
callq 0x6758
movl %eax, %r15d
movq %r14, %rdi
callq 0x8d2e
movq %rax, %rcx
movl %r15d, %eax
cltd
pushq $-0x2
popq %rsi
idivl %esi
addl %eax, %r13d
shrq $0x1f, %rcx
andl $-0x2, %ecx
movl %ecx, %eax
cltd
pushq $0x3
popq %rcx
idivl %ecx
movl %r13d, %edi
movl %eax, %esi
callq 0x390e
leaq -0x90(%rbp), %rdi
callq 0x3340
pushq $0x25
popq %rdi
callq 0x386e
leaq 0x5718(%rip), %r15      # 0xb164
movq %r15, %rdi
xorl %eax, %eax
callq 0x3050
pushq $0x42
popq %rdi
pushq $0x2
popq %rsi
callq 0x3958
leaq -0x70(%rbp), %rdi
leaq -0x2f0(%rbp), %rdx
movq %r15, %rsi
callq 0x3120
leaq -0x70(%rbp), %rdi
callq 0x6758
pushq $0x44
popq %rdi
movl %eax, %esi
callq 0x3958
leaq -0x70(%rbp), %rdi
callq 0x3340
pushq $0x22
popq %rdi
callq 0x386e
leaq -0x2f0(%rbp), %r15
movq %r15, %rdi
callq 0x380c
movq -0x30(%rbp), %rdi
movq %r15, %rsi
callq 0x3180
leaq -0x2f0(%rbp), %rdi
callq 0x3340
leaq 0x560a(%rip), %rsi      # 0xb0d0
leaq -0x50(%rbp), %rdi
leaq -0x2f0(%rbp), %rdx
callq 0x3120
leaq -0x50(%rbp), %rdi
callq 0x39be
leaq -0x50(%rbp), %rdi
callq 0x3340
leaq 0xb7ab(%rip), %rax      # 0x1129a
cmpb $0x0, (%rax)
jne 0x5bc9
leaq 0x55da(%rip), %rsi      # 0xb0d9
pushq $0x1
popq %rdx
movq %r15, %rdi
callq 0x3310
movq %r15, %rdi
movq %r12, %rsi
callq 0x3270
movq %rax, %rdi
callq 0x3150
movq %rax, %rdi
movq -0x30(%rbp), %rsi
callq 0x3270
movq %rax, %rdi
callq 0x3150
leaq -0x2f0(%rbp), %rdi
callq 0x3390
leaq -0x2f0(%rbp), %rdi
callq 0x33b0
jmp 0x5bc9
cmpl $0x14, %ebx
setge %al
testb $0x3, %bl
setne %cl
orb %al, %cl
jne 0x5bbf
leaq 0xd8(%r14), %r15
leaq 0x54a2(%rip), %rsi      # 0xb00b
movq %r15, %rdi
callq 0x5f62
leaq 0x55ff(%rip), %rsi      # 0xb177
testb %al, %al
jne 0x5bb5
movq %r15, %rdi
callq 0x5f62
leaq 0x55eb(%rip), %rsi      # 0xb176
testb %al, %al
jne 0x5bb5
movq %r15, %rdi
callq 0x5f62
leaq 0x55d7(%rip), %rsi      # 0xb175
testb %al, %al
jne 0x5bb5
movq %r15, %rdi
callq 0x5f62
testb %al, %al
je 0x5bc9
leaq 0x5456(%rip), %rsi      # 0xb00b
movq %r15, %rdi
callq 0x34b0
jmp 0x5bc9
cmpl $0x3d, %ebx
jl 0x5bc9
movb $0x1, 0x30(%r14)
movq %r14, %rdi
movl %ebx, %esi
callq 0x8c7c
addq $0x2c8, %rsp            # imm = 0x2C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x3340
jmp 0x5c63
movq %rax, %rbx
leaq -0x2f0(%rbp), %rdi
callq 0x3340
jmp 0x5c63
movq %rax, %rbx
leaq -0xb0(%rbp), %rdi
callq 0x3340
jmp 0x5c63
movq %rax, %rbx
leaq -0x2f0(%rbp), %rdi
callq 0x3340
jmp 0x5c63
movq %rax, %rbx
leaq -0x2f0(%rbp), %rdi
callq 0x33b0
jmp 0x5c63
jmp 0x5c60
jmp 0x5c60
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x3340
jmp 0x5c63
jmp 0x5c60
jmp 0x5c60
jmp 0x5c60
movq %rax, %rbx
leaq -0xd0(%rbp), %rdi
callq 0x3340
jmp 0x5c63
movq %rax, %rbx
movq %rbx, %rdi
callq 0x3450
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x3340
jmp 0x5c63
movq %rax, %rbx
leaq -0xf0(%rbp), %rdi
callq 0x3340
jmp 0x5c63
movq %rax, %rdi
callq 0x3aae
nop