// File: /workspace/github_cpp_makefile_star2_O3/Jacobious52[P]Tanks/GameView.cpp
// Function: GameView::_get_input()
void GameView::_get_input()
{
    // choose tank depending on turn
    Tank *current_tank = (turn == false) ? _tank1 : _tank2;
    float angle_offset = (turn == false) ? 0: M_PI;
    turn = !turn;

    _input_box->draw();

    // draw tank name
    ConsoleTools::set_color(current_tank->get_fcolor(), ConsoleTools::endc);
    ConsoleTools::set_cursor(_input_box->get_position().x + 1, _input_box->get_position().y + 1);
    printf("%s", current_tank->get_name().c_str());

    // draw input text stuff
    ConsoleTools::set_cursor(_input_box->get_position().x + 1, _input_box->get_position().y + 3);
    printf("power: ");
    ConsoleTools::set_cursor(_input_box->get_position().x + 1, _input_box->get_position().y + 4);
    printf("angle: ");

    // write to input file
    if (DebugView::shared_view()->show == true)
    {
        std::ofstream file("computer.txt", std::ios::app);
        file << (rand() % 7) + 1 << " " << (rand() % 80) << std::endl;
        file.close();
    }

    // get power input
    ConsoleTools::move_cursor(ConsoleTools::up, 1);
    float p = ConsoleTools::get_input<float>("float! ",
        Point<int>(_input_box->get_position().x + 1, _input_box->get_position().y + 3));
    ConsoleTools::play_music("beep.wav");

    // get angle input
    ConsoleTools::set_cursor(_input_box->get_position().x + StringTools::string_width("angle: ") + 1, _input_box->get_position().y + 4);
    float a = ConsoleTools::get_input<float>("float! ",
        Point<int>(_input_box->get_position().x + 1, _input_box->get_position().y + 4));

    // write power and angle to replay file
    if (ConsoleTools::replay == false)
    {
        std::ofstream file("replay.txt", std::ios::app);
        file << p << " " << a << std::endl;
        file.close();
    }

    DebugView::shared_view()->watch("power", p);
    DebugView::shared_view()->watch("angle", a);

    if (a == -1 && p == -1)
    {
        _should_remove_from_parent = true;
        return;
    }

    // create new bulelt and fire
    // bullet already deleted by update loop
    _bullet = new Bullet(current_tank->get_position(), std::abs(angle_offset - a*(M_PI/180)), MIN(p, 10.0), _terrain);
    _bullet->fire();
    add_child(_bullet);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2d8, %rsp            # imm = 0x2D8
movq %rdi, %rbx
movzbl 0x60(%rdi), %eax
movq 0x40(%rdi,%rax,8), %r14
movq %rax, -0x38(%rbp)
xorb $0x1, %al
movb %al, 0x60(%rdi)
movq 0x58(%rdi), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
movq %r14, %rdi
callq 0x68dc
movl %eax, %edi
xorl %esi, %esi
callq 0x386e
movq 0x58(%rbx), %rdi
callq 0x9a52
leal 0x1(%rax), %r15d
movq 0x58(%rbx), %rdi
callq 0x9a52
shrq $0x20, %rax
leal 0x1(%rax), %esi
movl %r15d, %edi
callq 0x38ec
leaq -0x300(%rbp), %r15
movq %r15, %rdi
movq %r14, -0x40(%rbp)
movq %r14, %rsi
callq 0x9c02
movq (%r15), %rsi
leaq 0x7ec0(%rip), %rdi      # 0xc1bb
xorl %eax, %eax
callq 0x3060
movq (%r15), %rdi
leaq -0x2f0(%rbp), %rax
cmpq %rax, %rdi
je 0x4316
callq 0x3230
movq 0x58(%rbx), %rdi
callq 0x9a52
leal 0x1(%rax), %r15d
movq 0x58(%rbx), %rdi
callq 0x9a52
shrq $0x20, %rax
leal 0x3(%rax), %esi
movl %r15d, %edi
callq 0x38ec
leaq 0x7d99(%rip), %rdi      # 0xc0db
xorl %eax, %eax
callq 0x3060
movq 0x58(%rbx), %rdi
callq 0x9a52
leal 0x1(%rax), %r15d
movq 0x58(%rbx), %rdi
callq 0x9a52
shrq $0x20, %rax
leal 0x4(%rax), %esi
movl %r15d, %edi
callq 0x38ec
leaq 0x7d6e(%rip), %rdi      # 0xc0e3
xorl %eax, %eax
callq 0x3060
callq 0x4d8a
cmpb $0x1, 0x31(%rax)
jne 0x445f
leaq 0x7d59(%rip), %rsi      # 0xc0eb
leaq -0x300(%rbp), %r15
movq %r15, %rdi
movl $0x1, %edx
callq 0x32a0
callq 0x30d0
cltq
imulq $-0x6db6db6d, %rax, %rcx # imm = 0x92492493
shrq $0x20, %rcx
addl %eax, %ecx
movl %ecx, %edx
shrl $0x1f, %edx
sarl $0x2, %ecx
addl %edx, %ecx
leal (,%rcx,8), %edx
subl %edx, %ecx
leal (%rax,%rcx), %esi
incl %esi
movq %r15, %rdi
callq 0x3410
movq %rax, %r15
leaq 0x7ce9(%rip), %rsi      # 0xc0cd
movl $0x1, %edx
movq %rax, %rdi
callq 0x32c0
callq 0x30d0
movslq %eax, %rsi
imulq $0x66666667, %rsi, %rax # imm = 0x66666667
movq %rax, %rcx
shrq $0x3f, %rcx
sarq $0x25, %rax
addl %ecx, %eax
shll $0x4, %eax
leal (%rax,%rax,4), %eax
subl %eax, %esi
movq %r15, %rdi
callq 0x3410
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3250
movsbl %al, %esi
movq %r15, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3180
leaq -0x300(%rbp), %rdi
callq 0x3320
leaq -0x300(%rbp), %rdi
callq 0x3340
movl $0x41, %edi
movl $0x1, %esi
callq 0x3936
leaq -0x70(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x7c7a(%rip), %rsi      # 0xc0f8
leaq 0x7c7a(%rip), %rdx      # 0xc0ff
leaq -0x80(%rbp), %rdi
callq 0x574e
movq 0x58(%rbx), %rdi
callq 0x9a52
movq %rax, %r15
movq 0x58(%rbx), %rdi
callq 0x9a52
movabsq $-0x100000000, %r13     # imm = 0xFFFFFFFF00000000
incl %r15d
andq %r13, %rax
orq %rax, %r15
movabsq $0x300000000, %rsi      # imm = 0x300000000
addq %r15, %rsi
leaq -0x80(%rbp), %rdi
callq 0x50ac
movss %xmm0, -0x30(%rbp)
movq -0x80(%rbp), %rdi
cmpq %r12, %rdi
je 0x44df
callq 0x3230
leaq -0xf0(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x7c0f(%rip), %rsi      # 0xc100
leaq 0x7c10(%rip), %rdx      # 0xc108
leaq -0x100(%rbp), %r15
movq %r15, %rdi
callq 0x574e
movq %r15, %rdi
callq 0x399e
movq -0x100(%rbp), %rdi
cmpq %r14, %rdi
je 0x4520
callq 0x3230
movq 0x58(%rbx), %rdi
callq 0x9a52
movq %rax, %r15
leaq -0xd0(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x7ba5(%rip), %rsi      # 0xc0e3
leaq 0x7ba5(%rip), %rdx      # 0xc0ea
leaq -0xe0(%rbp), %r12
movq %r12, %rdi
callq 0x574e
movq %r12, %rdi
callq 0x6d4e
movl %eax, %r12d
movq 0x58(%rbx), %rdi
callq 0x9a52
leal (%r15,%r12), %edi
incl %edi
shrq $0x20, %rax
addl $0x4, %eax
movl %eax, %esi
callq 0x38ec
movq -0xe0(%rbp), %rdi
cmpq %r14, %rdi
je 0x458d
callq 0x3230
leaq -0x50(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x7b5b(%rip), %rsi      # 0xc0f8
leaq 0x7b5b(%rip), %rdx      # 0xc0ff
leaq -0x60(%rbp), %rdi
callq 0x574e
movq 0x58(%rbx), %rdi
callq 0x9a52
movq %rax, %r15
movq 0x58(%rbx), %rdi
callq 0x9a52
incl %r15d
andq %r13, %rax
movabsq $0x400000000, %rcx      # imm = 0x400000000
addq %rax, %rcx
orq %rcx, %r15
leaq -0x60(%rbp), %rdi
movq %r15, %rsi
callq 0x50ac
movss %xmm0, -0x2c(%rbp)
movq -0x60(%rbp), %rdi
cmpq %r12, %rdi
je 0x45f7
callq 0x3230
leaq 0xcc74(%rip), %rax      # 0x11272
cmpb $0x0, (%rax)
jne 0x469b
leaq 0x7afb(%rip), %rsi      # 0xc109
leaq -0x300(%rbp), %r15
movq %r15, %rdi
movl $0x1, %edx
callq 0x32a0
xorps %xmm0, %xmm0
cvtss2sd -0x30(%rbp), %xmm0
movq %r15, %rdi
callq 0x33b0
movq %rax, %r15
leaq 0x7a91(%rip), %rsi      # 0xc0cd
movl $0x1, %edx
movq %rax, %rdi
callq 0x32c0
xorps %xmm0, %xmm0
cvtss2sd -0x2c(%rbp), %xmm0
movq %r15, %rdi
callq 0x33b0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3250
movsbl %al, %esi
movq %r15, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3180
leaq -0x300(%rbp), %rdi
callq 0x3320
leaq -0x300(%rbp), %rdi
callq 0x3340
callq 0x4d8a
movq %rax, %r15
leaq -0xb0(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x7a5f(%rip), %rsi      # 0xc114
leaq 0x7a5d(%rip), %rdx      # 0xc119
leaq -0xc0(%rbp), %r12
movq %r12, %rdi
callq 0x574e
movq %r15, %rdi
movq %r12, %rsi
movss -0x30(%rbp), %xmm0
callq 0x9ca8
movq -0xc0(%rbp), %rdi
cmpq %r14, %rdi
je 0x46ec
callq 0x3230
callq 0x4d8a
movq %rax, %r15
leaq -0x90(%rbp), %r14
movq %r14, -0x10(%r14)
leaq 0x7a14(%rip), %rsi      # 0xc11a
leaq 0x7a12(%rip), %rdx      # 0xc11f
leaq -0xa0(%rbp), %r12
movq %r12, %rdi
callq 0x574e
movq %r15, %rdi
movq %r12, %rsi
movss -0x2c(%rbp), %xmm0
callq 0x9ca8
movq -0xa0(%rbp), %rdi
cmpq %r14, %rdi
je 0x473d
callq 0x3230
movss -0x30(%rbp), %xmm0
ucomiss 0x793b(%rip), %xmm0     # 0xc084
jne 0x4763
jp 0x4763
movss -0x2c(%rbp), %xmm0
ucomiss 0x792b(%rip), %xmm0     # 0xc084
jne 0x4763
jp 0x4763
movb $0x1, 0x30(%rbx)
jmp 0x47dd
movl $0x88, %edi
callq 0x3260
movq %rax, %r15
movq -0x40(%rbp), %rdi
callq 0x9a52
xorps %xmm0, %xmm0
cmpb $0x0, -0x38(%rbp)
je 0x478a
movsd 0x7906(%rip), %xmm0     # 0xc090
cvtss2sd -0x2c(%rbp), %xmm1
mulsd 0x7901(%rip), %xmm1     # 0xc098
addsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsd2ss %xmm1, %xmm0
andps 0x78f7(%rip), %xmm0     # 0xc0a0
movss -0x30(%rbp), %xmm1
minss 0x78d2(%rip), %xmm1     # 0xc088
movq 0x38(%rbx), %rdx
movq %r15, %rdi
movq %rax, %rsi
callq 0x4fce
movq %r15, 0x50(%rbx)
movq %r15, %rdi
callq 0x8c92
movq 0x50(%rbx), %rsi
movq %rbx, %rdi
callq 0x98fe
addq $0x2d8, %rsp            # imm = 0x2D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r15, %rdi
jmp 0x4852
movq %rax, %rbx
movq -0xa0(%rbp), %rdi
jmp 0x483f
movq %rax, %rbx
movq -0xc0(%rbp), %rdi
jmp 0x483f
movq %rax, %rbx
movq -0x100(%rbp), %rdi
jmp 0x483f
movq %rax, %rbx
leaq -0x300(%rbp), %rdi
callq 0x3340
jmp 0x4868
movq %rax, %rbx
movq -0x60(%rbp), %rdi
jmp 0x484d
movq %rax, %rbx
movq -0xe0(%rbp), %rdi
cmpq %r14, %rdi
jne 0x4852
jmp 0x4868
movq %rax, %rbx
movq -0x80(%rbp), %rdi
cmpq %r12, %rdi
je 0x4868
callq 0x3230
jmp 0x4868
movq %rax, %rbx
leaq -0x300(%rbp), %rdi
callq 0x3340
movq %rbx, %rdi
callq 0x3430
movq %rax, %rdi
callq 0x3ac6