// File: /workspace/github_cpp_makefile_star2_O1/MatthewZMD[P]TetrisDual/interface.cc
// Function: Interface::execFunc(std::istream&, int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Interface::execFunc(std::istream& in, int step, std::string cmd) {
    if (cmd == "left") {
        g->left(in, step);
    }
    else if (cmd == "right") {
        g->right(in, step);
    }
    else if (cmd == "down") {
        g->down(step);
    }
    else if (cmd == "clockwise") {
        g->rotate(true, step);
    }
    else if (cmd == "counterclockwise") {
        g->rotate(false, step);
    }
    else if (cmd == "drop") {
        g->drop(in, step);
    }
    else if (cmd == "levelup") {
        g->levelup(step);
    }
    else if (cmd == "leveldown") {
        g->leveldown(step);
    }
    else if (cmd == "norandom") {
        std::string file;
        in >> file;
        g->norandom(file);
    }
    else if (cmd == "random") {
        g->random();
    }
    else if (cmd == "sequence") {
        std::string file;
        in >> file;

        std::ifstream fin;
        fin.open(file.c_str());

        while(cmdInterface(fin));

        fin.close();
    }
    else if (cmd == "restart") {
        std::cout << "Restarting your life..." << std::endl;
        g = std::make_shared<Game>(file1, file2, startLevel, isTextOnly);
        std::cout << *(g->display) << std::endl;
    }
    else if (cmd == "I" || cmd == "J" || cmd == "L" || cmd == "O" || cmd == "S" || cmd == "Z" || cmd == "T") {
        g->replaceBlock(cmd);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x280, %rsp            # imm = 0x280
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0xc65b(%rip), %rsi      # 0x131c0
movq %rcx, %rdi
callq 0x50d0
testl %eax, %eax
je 0x6d42
leaq 0xc649(%rip), %rsi      # 0x131c5
movq %r14, %rdi
callq 0x50d0
testl %eax, %eax
je 0x6d5f
leaq 0xc65b(%rip), %rsi      # 0x131ee
movq %r14, %rdi
callq 0x50d0
testl %eax, %eax
je 0x6d7c
leaq 0xc628(%rip), %rsi      # 0x131d2
movq %r14, %rdi
callq 0x50d0
testl %eax, %eax
je 0x6d96
leaq 0xc60a(%rip), %rsi      # 0x131cb
movq %r14, %rdi
callq 0x50d0
testl %eax, %eax
je 0x6da1
leaq 0xc604(%rip), %rsi      # 0x131dc
movq %r14, %rdi
callq 0x50d0
testl %eax, %eax
je 0x6dbd
leaq 0xc5f2(%rip), %rsi      # 0x131e1
movq %r14, %rdi
callq 0x50d0
testl %eax, %eax
je 0x6dda
leaq 0xc5e3(%rip), %rsi      # 0x131e9
movq %r14, %rdi
callq 0x50d0
testl %eax, %eax
je 0x6df4
leaq 0xc5d6(%rip), %rsi      # 0x131f3
movq %r14, %rdi
callq 0x50d0
testl %eax, %eax
je 0x6e0e
leaq 0xc5c1(%rip), %rsi      # 0x131f5
movq %r14, %rdi
callq 0x50d0
testl %eax, %eax
je 0x6e96
leaq 0xc5b1(%rip), %rsi      # 0x131fc
movq %r14, %rdi
callq 0x50d0
testl %eax, %eax
je 0x6eae
leaq 0xc5a3(%rip), %rsi      # 0x13205
movq %r14, %rdi
callq 0x50d0
testl %eax, %eax
je 0x6f40
leaq 0xccd3(%rip), %rsi      # 0x1394c
movq %r14, %rdi
callq 0x50d0
testl %eax, %eax
je 0x6cfb
leaq 0xccc4(%rip), %rsi      # 0x13950
movq %r14, %rdi
callq 0x50d0
testl %eax, %eax
je 0x6cfb
leaq 0xcc9d(%rip), %rsi      # 0x1393c
movq %r14, %rdi
callq 0x50d0
testl %eax, %eax
je 0x6cfb
leaq 0xcc8d(%rip), %rsi      # 0x1393f
movq %r14, %rdi
callq 0x50d0
testl %eax, %eax
je 0x6cfb
leaq 0xcc7e(%rip), %rsi      # 0x13943
movq %r14, %rdi
callq 0x50d0
testl %eax, %eax
je 0x6cfb
leaq 0xcc80(%rip), %rsi      # 0x13958
movq %r14, %rdi
callq 0x50d0
testl %eax, %eax
je 0x6cfb
leaq 0xcc70(%rip), %rsi      # 0x1395b
movq %r14, %rdi
callq 0x50d0
testl %eax, %eax
jne 0x6f30
movq 0x60(%rbx), %rbx
leaq 0x60(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x50(%rsp), %r14
movq %r14, %rdi
callq 0x6230
movq %rbx, %rdi
movq %r14, %rsi
callq 0xced2
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0x6f30
movq 0x60(%rsp), %rsi
jmp 0x6f28
movq 0x60(%rbx), %rdi
movq %r15, %rsi
movl %ebp, %edx
addq $0x280, %rsp            # imm = 0x280
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xc842
movq 0x60(%rbx), %rdi
movq %r15, %rsi
movl %ebp, %edx
addq $0x280, %rsp            # imm = 0x280
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xcb94
movq 0x60(%rbx), %rdi
movl %ebp, %esi
addq $0x280, %rsp            # imm = 0x280
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xcc26
movq 0x60(%rbx), %rdi
movl $0x1, %esi
jmp 0x6da7
movq 0x60(%rbx), %rdi
xorl %esi, %esi
movl %ebp, %edx
addq $0x280, %rsp            # imm = 0x280
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xcc44
movq 0x60(%rbx), %rdi
movq %r15, %rsi
movl %ebp, %edx
addq $0x280, %rsp            # imm = 0x280
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xcc66
movq 0x60(%rbx), %rdi
movl %ebp, %esi
addq $0x280, %rsp            # imm = 0x280
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xcd6c
movq 0x60(%rbx), %rdi
movl %ebp, %esi
addq $0x280, %rsp            # imm = 0x280
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xcda8
leaq 0x80(%rsp), %r14
movq %r14, -0x10(%r14)
movq $0x0, -0x8(%r14)
movb $0x0, (%r14)
leaq 0x70(%rsp), %rsi
movq %r15, %rdi
callq 0x5360
movq 0x60(%rbx), %rbx
leaq 0x40(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
addq %rsi, %rdx
leaq 0x30(%rsp), %rdi
callq 0x6230
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0xcde4
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x6e7b
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x52e0
movq 0x70(%rsp), %rdi
cmpq %r14, %rdi
je 0x6f30
movq 0x80(%rsp), %rsi
jmp 0x6f28
movq 0x60(%rbx), %rdi
addq $0x280, %rsp            # imm = 0x280
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xceb4
leaq 0x20(%rsp), %r12
movq %r12, -0x10(%r12)
movq $0x0, -0x8(%r12)
movb $0x0, (%r12)
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x5360
leaq 0x70(%rsp), %rdi
callq 0x5310
movq 0x10(%rsp), %rsi
leaq 0x70(%rsp), %rdi
movl $0x8, %edx
callq 0x5200
leaq 0x70(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x7060
testb %al, %al
jne 0x6ef6
leaq 0x70(%rsp), %rdi
callq 0x5070
leaq 0x70(%rsp), %rdi
callq 0x5090
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x6f30
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x52e0
addq $0x280, %rsp            # imm = 0x280
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x15069(%rip), %r14     # 0x1bfb0
leaq 0xc2bf(%rip), %rsi      # 0x1320d
movl $0x17, %edx
movq %r14, %rdi
callq 0x5320
movq %r14, %rdi
callq 0x5170
leaq 0x18(%rbx), %rcx
leaq 0x38(%rbx), %r8
leaq 0x58(%rbx), %r9
leaq 0x5c(%rbx), %rax
leaq 0x78(%rsp), %rdi
movq $0x0, -0x8(%rdi)
movq %rax, (%rsp)
leaq 0x70(%rsp), %r14
leaq 0x10(%rsp), %rdx
movq %r14, %rsi
callq 0x7396
movaps (%r14), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, (%r14)
movq 0x68(%rbx), %rdi
movups %xmm0, 0x60(%rbx)
testq %rdi, %rdi
je 0x6fb3
callq 0x5f3e
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0x6fc2
callq 0x5f3e
movq 0x60(%rbx), %rax
movq 0x20(%rax), %rsi
movq 0x14fdf(%rip), %rdi     # 0x1bfb0
callq 0xf390
movq %rax, %rdi
callq 0x5170
jmp 0x6f30
jmp 0x6fe5
movq %rax, %rbx
jmp 0x7040
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0x7057
movq 0x60(%rsp), %rsi
jmp 0x704f
jmp 0x7033
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x701f
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x52e0
jmp 0x701f
movq %rax, %rbx
movq 0x70(%rsp), %rdi
cmpq %r14, %rdi
je 0x7057
movq 0x80(%rsp), %rsi
jmp 0x704f
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x5090
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x7057
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x52e0
movq %rbx, %rdi
callq 0x54e0
nop