// File: 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
subq $0x430, %rsp            # imm = 0x430
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x380(%rbp)
cmpl $0x14, -0xc(%rbp)
jne 0x9879
movq -0x380(%rbp), %rdi
addq $0x38, %rdi
leaq 0xae92(%rip), %rsi      # 0x1400b
callq 0x9ea0
testb $0x1, %al
jne 0x9187
jmp 0x9879
movq -0x380(%rbp), %rdi
addq $0x58, %rdi
leaq 0xae72(%rip), %rsi      # 0x1400b
callq 0x9ea0
testb $0x1, %al
jne 0x91a7
jmp 0x9879
movq -0x380(%rbp), %rdi
callq 0x106a0
movq %rax, -0x14(%rbp)
movl -0x10(%rbp), %esi
movl %esi, %eax
shrl $0x1f, %eax
addl %eax, %esi
sarl %esi
xorl %edi, %edi
callq 0x4c00
callq 0x4c30
movq -0x380(%rbp), %rdi
callq 0x106a0
movq %rax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %ecx, %eax
sarl %eax
movl %eax, -0x38c(%rbp)
leaq -0x41(%rbp), %rdi
movq %rdi, -0x388(%rbp)
callq 0x45f0
movq -0x388(%rbp), %rdx
leaq 0xaf5a(%rip), %rsi      # 0x14169
leaq -0x40(%rbp), %rdi
callq 0x4490
jmp 0x921a
leaq -0x40(%rbp), %rdi
callq 0xaeb0
movl %eax, -0x390(%rbp)
jmp 0x922b
movq -0x380(%rbp), %rdi
movl -0x38c(%rbp), %eax
movl -0x390(%rbp), %ecx
movl %ecx, %edx
shrl $0x1f, %edx
addl %edx, %ecx
sarl %ecx
subl %ecx, %eax
movl %eax, -0x39c(%rbp)
callq 0x106a0
movq %rax, -0x398(%rbp)
jmp 0x925d
movl -0x39c(%rbp), %edi
movq -0x398(%rbp), %rax
movq %rax, -0x5c(%rbp)
movslq -0x58(%rbp), %rax
imulq $0x55555556, %rax, %rcx # imm = 0x55555556
movq %rcx, %rax
shrq $0x3f, %rax
shrq $0x20, %rcx
movl %ecx, %esi
addl %eax, %esi
callq 0x4c00
jmp 0x928f
leaq -0x40(%rbp), %rdi
callq 0x4200
jmp 0x929a
leaq -0x41(%rbp), %rdi
callq 0x4400
movl $0x25, %edi
callq 0x4af0
leaq 0xaeb5(%rip), %rdi      # 0x14169
movq %rdi, -0x3b0(%rbp)
xorl %eax, %eax
callq 0x4070
movl $0x42, %edi
movl $0x2, %esi
callq 0x4c80
leaq -0x81(%rbp), %rdi
movq %rdi, -0x3a8(%rbp)
callq 0x45f0
movq -0x3b0(%rbp), %rsi
movq -0x3a8(%rbp), %rdx
leaq -0x80(%rbp), %rdi
callq 0x4490
jmp 0x92fd
leaq -0x80(%rbp), %rdi
callq 0xaeb0
movl %eax, -0x3b4(%rbp)
jmp 0x930e
movl -0x3b4(%rbp), %esi
movl $0x44, %edi
callq 0x4c80
jmp 0x9320
leaq -0x80(%rbp), %rdi
callq 0x4200
jmp 0x932b
leaq -0x81(%rbp), %rdi
callq 0x4400
movl $0x1f, %edi
callq 0x4af0
leaq -0xa8(%rbp), %rdi
movq %rdi, -0x3c0(%rbp)
callq 0x4a40
movq -0x380(%rbp), %rdi
movq -0x3c0(%rbp), %rsi
addq $0x38, %rdi
callq 0x4060
jmp 0x936d
leaq -0xa8(%rbp), %rdi
callq 0x4200
leaq -0xc9(%rbp), %rdi
movq %rdi, -0x3c8(%rbp)
callq 0x45f0
movq -0x3c8(%rbp), %rdx
leaq 0xad46(%rip), %rsi      # 0x140e0
leaq -0xc8(%rbp), %rdi
callq 0x4490
jmp 0x93a8
leaq -0xc8(%rbp), %rdi
callq 0x4d20
jmp 0x93b6
leaq -0xc8(%rbp), %rdi
callq 0x4200
jmp 0x93c4
leaq -0xc9(%rbp), %rdi
callq 0x4400
movq -0x380(%rbp), %rdi
callq 0x106a0
movq %rax, -0xd4(%rbp)
movl -0xd4(%rbp), %eax
movl %eax, %ecx
shrl $0x1f, %ecx
addl %ecx, %eax
sarl %eax
movl %eax, -0x3d4(%rbp)
leaq -0xf9(%rbp), %rdi
movq %rdi, -0x3d0(%rbp)
callq 0x45f0
movq -0x3d0(%rbp), %rdx
leaq 0xad61(%rip), %rsi      # 0x1417a
leaq -0xf8(%rbp), %rdi
callq 0x4490
jmp 0x9427
leaq -0xf8(%rbp), %rdi
callq 0xaeb0
movl %eax, -0x3d8(%rbp)
jmp 0x943b
movq -0x380(%rbp), %rdi
movl -0x3d4(%rbp), %eax
movl -0x3d8(%rbp), %ecx
movl %ecx, %edx
shrl $0x1f, %edx
addl %edx, %ecx
sarl %ecx
subl %ecx, %eax
movl %eax, -0x3e4(%rbp)
callq 0x106a0
movq %rax, -0x3e0(%rbp)
jmp 0x946d
movl -0x3e4(%rbp), %edi
movq -0x3e0(%rbp), %rax
movq %rax, -0x104(%rbp)
movl -0x100(%rbp), %eax
addl %eax, %eax
cltq
imulq $0x55555556, %rax, %rcx # imm = 0x55555556
movq %rcx, %rax
shrq $0x3f, %rax
shrq $0x20, %rcx
movl %ecx, %esi
addl %eax, %esi
callq 0x4c00
jmp 0x94a8
leaq -0xf8(%rbp), %rdi
callq 0x4200
jmp 0x94b6
leaq -0xf9(%rbp), %rdi
callq 0x4400
movl $0x25, %edi
callq 0x4af0
leaq 0xaca7(%rip), %rdi      # 0x1417a
movq %rdi, -0x3f8(%rbp)
xorl %eax, %eax
callq 0x4070
movl $0x42, %edi
movl $0x2, %esi
callq 0x4c80
leaq -0x129(%rbp), %rdi
movq %rdi, -0x3f0(%rbp)
callq 0x45f0
movq -0x3f8(%rbp), %rsi
movq -0x3f0(%rbp), %rdx
leaq -0x128(%rbp), %rdi
callq 0x4490
jmp 0x951f
leaq -0x128(%rbp), %rdi
callq 0xaeb0
movl %eax, -0x3fc(%rbp)
jmp 0x9533
movl -0x3fc(%rbp), %esi
movl $0x44, %edi
callq 0x4c80
jmp 0x9545
leaq -0x128(%rbp), %rdi
callq 0x4200
jmp 0x9553
leaq -0x129(%rbp), %rdi
callq 0x4400
movl $0x22, %edi
callq 0x4af0
leaq -0x150(%rbp), %rdi
movq %rdi, -0x408(%rbp)
callq 0x4a40
movq -0x380(%rbp), %rdi
movq -0x408(%rbp), %rsi
addq $0x58, %rdi
callq 0x4060
jmp 0x9595
leaq -0x150(%rbp), %rdi
callq 0x4200
leaq -0x171(%rbp), %rdi
movq %rdi, -0x410(%rbp)
callq 0x45f0
movq -0x410(%rbp), %rdx
leaq 0xab1e(%rip), %rsi      # 0x140e0
leaq -0x170(%rbp), %rdi
callq 0x4490
jmp 0x95d0
leaq -0x170(%rbp), %rdi
callq 0x4d20
jmp 0x95de
leaq -0x170(%rbp), %rdi
callq 0x4200
jmp 0x95ec
leaq -0x171(%rbp), %rdi
callq 0x4400
leaq 0x11d63(%rip), %rax     # 0x1b362
movb (%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
jne 0x9874
leaq 0xaad3(%rip), %rsi      # 0x140e9
leaq -0x378(%rbp), %rdi
movq %rdi, -0x420(%rbp)
movl $0x1, %edx
callq 0x4410
movq -0x380(%rbp), %rsi
movq -0x420(%rbp), %rdi
addq $0x38, %rsi
callq 0x4330
movq %rax, -0x418(%rbp)
jmp 0x964e
movq -0x418(%rbp), %rdi
movq 0x1196c(%rip), %rsi     # 0x1afc8
callq 0x43e0
movq %rax, -0x428(%rbp)
jmp 0x966a
movq -0x428(%rbp), %rdi
movq -0x380(%rbp), %rsi
addq $0x58, %rsi
callq 0x4330
movq %rax, -0x430(%rbp)
jmp 0x968a
movq -0x430(%rbp), %rdi
movq 0x11930(%rip), %rsi     # 0x1afc8
callq 0x43e0
jmp 0x969f
leaq -0x378(%rbp), %rdi
callq 0x44c0
jmp 0x96ad
leaq -0x378(%rbp), %rdi
callq 0x44e0
jmp 0x9874
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x96e5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x4200
jmp 0x96e3
jmp 0x96e5
leaq -0x41(%rbp), %rdi
callq 0x4400
jmp 0x99bd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x971a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x4200
jmp 0x9718
jmp 0x971a
leaq -0x81(%rbp), %rdi
callq 0x4400
jmp 0x99bd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0xa8(%rbp), %rdi
callq 0x4200
jmp 0x9745
jmp 0x99bd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x9774
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0xc8(%rbp), %rdi
callq 0x4200
jmp 0x9772
jmp 0x9774
leaq -0xc9(%rbp), %rdi
callq 0x4400
jmp 0x99bd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x97af
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0xf8(%rbp), %rdi
callq 0x4200
jmp 0x97ad
jmp 0x97af
leaq -0xf9(%rbp), %rdi
callq 0x4400
jmp 0x99bd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x97ea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x128(%rbp), %rdi
callq 0x4200
jmp 0x97e8
jmp 0x97ea
leaq -0x129(%rbp), %rdi
callq 0x4400
jmp 0x99bd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x150(%rbp), %rdi
callq 0x4200
jmp 0x9815
jmp 0x99bd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x9844
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x170(%rbp), %rdi
callq 0x4200
jmp 0x9842
jmp 0x9844
leaq -0x171(%rbp), %rdi
callq 0x4400
jmp 0x99bd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x378(%rbp), %rdi
callq 0x44e0
jmp 0x986f
jmp 0x99bd
jmp 0x99a5
cmpl $0x14, -0xc(%rbp)
jge 0x9990
movl -0xc(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x9990
movq -0x380(%rbp), %rdi
addq $0xd8, %rdi
leaq 0xa75f(%rip), %rsi      # 0x1400b
callq 0x9ea0
testb $0x1, %al
jne 0x98b7
jmp 0x98d6
movq -0x380(%rbp), %rdi
addq $0xd8, %rdi
leaq 0xa8c1(%rip), %rsi      # 0x1418d
callq 0x4480
jmp 0x998e
movq -0x380(%rbp), %rdi
addq $0xd8, %rdi
leaq 0xa8a2(%rip), %rsi      # 0x1418d
callq 0x9ea0
testb $0x1, %al
jne 0x98f6
jmp 0x9912
movq -0x380(%rbp), %rdi
addq $0xd8, %rdi
leaq 0xa881(%rip), %rsi      # 0x1418c
callq 0x4480
jmp 0x998c
movq -0x380(%rbp), %rdi
addq $0xd8, %rdi
leaq 0xa865(%rip), %rsi      # 0x1418c
callq 0x9ea0
testb $0x1, %al
jne 0x9932
jmp 0x994e
movq -0x380(%rbp), %rdi
addq $0xd8, %rdi
leaq 0xa844(%rip), %rsi      # 0x1418b
callq 0x4480
jmp 0x998a
movq -0x380(%rbp), %rdi
addq $0xd8, %rdi
leaq 0xa828(%rip), %rsi      # 0x1418b
callq 0x9ea0
testb $0x1, %al
jne 0x996e
jmp 0x9988
movq -0x380(%rbp), %rdi
addq $0xd8, %rdi
leaq 0xa688(%rip), %rsi      # 0x1400b
callq 0x4480
jmp 0x998a
jmp 0x998c
jmp 0x998e
jmp 0x99a3
cmpl $0x3c, -0xc(%rbp)
jle 0x99a1
movq -0x380(%rbp), %rax
movb $0x1, 0x30(%rax)
jmp 0x99a3
jmp 0x99a5
movq -0x380(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x10500
addq $0x430, %rsp            # imm = 0x430
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x45e0
movq %rax, %rdi
callq 0x4ec0
nop