// File: /workspace/github_cpp_makefile_star2_O3/Jacobious52[P]Tanks/Game.cpp
// Function: Game::Game(bool, float, int)
Game(bool skip, float game_time, int rain)
        : _skip_intro(skip)
    {
        ConsoleTools::play_music("music.wav");

        // clear computer.txt for writing
        if (DebugView::shared_view()->show == true)
        {
            std::ofstream file("computer.txt");
            file << "Computer 1" << std::endl << "Computer 2" << std::endl;
            file.close();
        }

        // write the seed of this game for replay
        if (ConsoleTools::replay == false)
        {
            std::ofstream file("replay.txt");
            int t = time(0);
            file << t << std::endl;
            file.close();
            srand(t);
        }
        else
        {
            printf("seed: ");
            srand(ConsoleTools::get_input<int>("int: ", Point<int>(StringTools::string_width("seed: "), 0)));
        }

        // load texture map file
        TextureTools::load_texture_file("textures.txt");

        // setup intro view
        intro_view = new IntroView();
        current_view = intro_view;
        intro_view->tag = rain;

        // switch to gameview straight away
        if (_skip_intro == true)
        {
            game_view = new GameView("Default 1", "Default 2");
            game_view->tag = rain;
            current_view = game_view;
            current_view->draw();
        }

        // : create timer and link to self
        timer = Timer(game_time, true);
        timer.set_delegate(this);

        tick_time = 0;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2d8, %rsp            # imm = 0x2D8
movl %edx, %r15d
movss %xmm0, -0x2c(%rbp)
movq %rdi, %r14
leaq 0x67c8(%rip), %rax      # 0x10d88
movq %rax, (%rdi)
leaq 0x28(%rdi), %rax
movq %rax, -0x38(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rdi)
movw $0x0, 0x40(%rdi)
movb %sil, 0x4c(%rdi)
leaq -0xe8(%rbp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x1da9(%rip), %rsi      # 0xc397
leaq 0x1dab(%rip), %rdx      # 0xc3a0
leaq -0xf8(%rbp), %rdi
callq 0x574e
leaq -0xf8(%rbp), %rdi
callq 0x399e
movq -0xf8(%rbp), %rdi
cmpq %rbx, %rdi
je 0xa61e
callq 0x3230
callq 0x4d8a
cmpb $0x1, 0x31(%rax)
jne 0xa6e6
leaq 0x1ab7(%rip), %rsi      # 0xc0eb
leaq -0x2f8(%rbp), %rdi
movl $0x10, %edx
callq 0x32a0
leaq 0x1d55(%rip), %rsi      # 0xc3a1
leaq -0x2f8(%rbp), %r12
movl $0xa, %edx
movq %r12, %rdi
callq 0x32c0
movq -0x2f8(%rbp), %rax
addq -0x18(%rax), %r12
movq %r12, %rdi
movl $0xa, %esi
callq 0x3250
movsbl %al, %esi
leaq -0x2f8(%rbp), %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3180
movq %rax, %r12
leaq 0x1d13(%rip), %rsi      # 0xc3ac
movl $0xa, %edx
movq %rax, %rdi
callq 0x32c0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3250
movsbl %al, %esi
movq %r12, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3180
leaq -0x2f8(%rbp), %rdi
callq 0x3320
leaq -0x2f8(%rbp), %rdi
callq 0x3340
leaq 0x6b85(%rip), %rax      # 0x11272
cmpb $0x0, (%rax)
je 0xa798
leaq 0x1cba(%rip), %rdi      # 0xc3b7
xorl %eax, %eax
callq 0x3060
leaq -0xc8(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x1ca7(%rip), %rsi      # 0xc3be
leaq 0x1ca5(%rip), %rdx      # 0xc3c3
leaq -0xd8(%rbp), %rdi
callq 0x574e
leaq -0xa8(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0x1c7b(%rip), %rsi      # 0xc3b7
leaq 0x1c7a(%rip), %rdx      # 0xc3bd
leaq -0xb8(%rbp), %rdi
callq 0x574e
leaq -0xb8(%rbp), %rdi
callq 0x6d4e
movl %eax, %esi
leaq -0xd8(%rbp), %rdi
callq 0xaa8a
movl %eax, %edi
callq 0x3240
movq -0xb8(%rbp), %rdi
cmpq %r13, %rdi
je 0xa781
callq 0x3230
movq -0xd8(%rbp), %rdi
cmpq %r12, %rdi
je 0xa813
callq 0x3230
jmp 0xa813
leaq 0x196a(%rip), %rsi      # 0xc109
leaq -0x2f8(%rbp), %rdi
movl $0x10, %edx
callq 0x32a0
xorl %edi, %edi
callq 0x3220
movq %rax, %r12
leaq -0x2f8(%rbp), %rdi
movl %r12d, %esi
callq 0x3410
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x3250
movsbl %al, %esi
movq %r13, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3180
leaq -0x2f8(%rbp), %rdi
callq 0x3320
movl %r12d, %edi
callq 0x3240
leaq -0x2f8(%rbp), %rdi
callq 0x3340
leaq -0x88(%rbp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x1b9f(%rip), %rsi      # 0xc3c4
leaq 0x1ba4(%rip), %rdx      # 0xc3d0
leaq -0x98(%rbp), %rdi
callq 0x574e
leaq -0x98(%rbp), %rdi
callq 0x815a
movq -0x98(%rbp), %rdi
cmpq %rbx, %rdi
je 0xa855
callq 0x3230
movl $0xf8, %edi
callq 0x3260
movq %rax, %r12
movq %rax, %rdi
callq 0xab56
movq %r12, 0x10(%r14)
movq %r12, 0x8(%r14)
movl %r15d, 0x8(%r12)
cmpb $0x1, 0x4c(%r14)
jne 0xa90f
movl $0x88, %edi
callq 0x3260
movq %rax, %r12
leaq -0x68(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0x1b33(%rip), %rsi      # 0xc3d1
leaq 0x1b35(%rip), %rdx      # 0xc3da
leaq -0x78(%rbp), %rdi
callq 0x574e
leaq -0x48(%rbp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x1b1e(%rip), %rsi      # 0xc3db
leaq 0x1b20(%rip), %rdx      # 0xc3e4
leaq -0x58(%rbp), %rdi
callq 0x574e
leaq -0x78(%rbp), %rsi
leaq -0x58(%rbp), %rdx
movq %r12, %rdi
callq 0xac64
movq %r12, 0x18(%r14)
movq -0x58(%rbp), %rdi
cmpq %rbx, %rdi
je 0xa8ef
callq 0x3230
movq -0x78(%rbp), %rdi
cmpq %r13, %rdi
je 0xa8fd
callq 0x3230
movq 0x18(%r14), %rdi
movl %r15d, 0x8(%rdi)
movq %rdi, 0x8(%r14)
movq (%rdi), %rax
callq *0x18(%rax)
cvtss2sd -0x2c(%rbp), %xmm0
xorl %eax, %eax
movq %rax, 0x28(%r14)
movsd %xmm0, 0x30(%r14)
movq %rax, 0x38(%r14)
movw $0x1, 0x40(%r14)
movq -0x38(%rbp), %rdi
movq %r14, %rsi
callq 0x8bd8
movl $0x0, 0x48(%r14)
addq $0x2d8, %rsp            # imm = 0x2D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq -0x58(%rbp), %rdi
cmpq %rbx, %rdi
je 0xa967
callq 0x3230
jmp 0xa967
movq %rax, %r14
movq -0x78(%rbp), %rdi
cmpq %r13, %rdi
je 0xa985
callq 0x3230
jmp 0xa985
jmp 0xa982
movq %rax, %r14
jmp 0xa9c1
jmp 0xa9e5
jmp 0xa9e5
movq %rax, %r14
movq %r12, %rdi
jmp 0xa9cd
movq %rax, %r14
movq -0x98(%rbp), %rdi
jmp 0xa9a4
jmp 0xa9e5
jmp 0xa9e5
movq %rax, %r14
movq -0xf8(%rbp), %rdi
cmpq %rbx, %rdi
jne 0xa9cd
jmp 0xa9f9
jmp 0xa9e5
movq %rax, %r14
movq -0xb8(%rbp), %rdi
cmpq %r13, %rdi
je 0xa9c1
callq 0x3230
movq -0xd8(%rbp), %rdi
cmpq %r12, %rdi
je 0xa9f9
callq 0x3230
jmp 0xa9f9
movq %rax, %r14
leaq -0x2f8(%rbp), %rdi
callq 0x3340
jmp 0xa9f9
movq %rax, %r14
jmp 0xa9f9
movq %rax, %r14
leaq -0x2f8(%rbp), %rdi
callq 0x3340
movq -0x38(%rbp), %rax
movq $0x0, (%rax)
movq %r14, %rdi
callq 0x3430
movq %rax, %rdi
callq 0x3ac6