// File: /workspace/github_cpp_makefile_star2_O3/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 0xc631(%rip), %rsi      # 0x131c0
movq %rcx, %rdi
callq 0x50d0
testl %eax, %eax
je 0x6d6c
leaq 0xc61f(%rip), %rsi      # 0x131c5
movq %r14, %rdi
callq 0x50d0
testl %eax, %eax
je 0x6d89
leaq 0xc631(%rip), %rsi      # 0x131ee
movq %r14, %rdi
callq 0x50d0
testl %eax, %eax
je 0x6da6
leaq 0xc5fe(%rip), %rsi      # 0x131d2
movq %r14, %rdi
callq 0x50d0
testl %eax, %eax
je 0x6dc0
leaq 0xc5e0(%rip), %rsi      # 0x131cb
movq %r14, %rdi
callq 0x50d0
testl %eax, %eax
je 0x6dcb
leaq 0xc5da(%rip), %rsi      # 0x131dc
movq %r14, %rdi
callq 0x50d0
testl %eax, %eax
je 0x6de7
leaq 0xc5c8(%rip), %rsi      # 0x131e1
movq %r14, %rdi
callq 0x50d0
testl %eax, %eax
je 0x6e04
leaq 0xc5b9(%rip), %rsi      # 0x131e9
movq %r14, %rdi
callq 0x50d0
testl %eax, %eax
je 0x6e1e
leaq 0xc5ac(%rip), %rsi      # 0x131f3
movq %r14, %rdi
callq 0x50d0
testl %eax, %eax
je 0x6e38
leaq 0xc597(%rip), %rsi      # 0x131f5
movq %r14, %rdi
callq 0x50d0
testl %eax, %eax
je 0x6ec0
leaq 0xc587(%rip), %rsi      # 0x131fc
movq %r14, %rdi
callq 0x50d0
testl %eax, %eax
je 0x6ed8
leaq 0xc579(%rip), %rsi      # 0x13205
movq %r14, %rdi
callq 0x50d0
testl %eax, %eax
je 0x6f6a
leaq 0xccbd(%rip), %rsi      # 0x13960
movq %r14, %rdi
callq 0x50d0
testl %eax, %eax
je 0x6d25
leaq 0xccae(%rip), %rsi      # 0x13964
movq %r14, %rdi
callq 0x50d0
testl %eax, %eax
je 0x6d25
leaq 0xcc87(%rip), %rsi      # 0x13950
movq %r14, %rdi
callq 0x50d0
testl %eax, %eax
je 0x6d25
leaq 0xcc77(%rip), %rsi      # 0x13953
movq %r14, %rdi
callq 0x50d0
testl %eax, %eax
je 0x6d25
leaq 0xcc68(%rip), %rsi      # 0x13957
movq %r14, %rdi
callq 0x50d0
testl %eax, %eax
je 0x6d25
leaq 0xcc6a(%rip), %rsi      # 0x1396c
movq %r14, %rdi
callq 0x50d0
testl %eax, %eax
je 0x6d25
leaq 0xcc5a(%rip), %rsi      # 0x1396f
movq %r14, %rdi
callq 0x50d0
testl %eax, %eax
jne 0x6f5a
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 0x6248
movq %rbx, %rdi
movq %r14, %rsi
callq 0xcc84
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0x6f5a
movq 0x60(%rsp), %rsi
jmp 0x6f52
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 0xc5f4
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 0xc946
movq 0x60(%rbx), %rdi
movl %ebp, %esi
addq $0x280, %rsp            # imm = 0x280
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xc9d8
movq 0x60(%rbx), %rdi
movl $0x1, %esi
jmp 0x6dd1
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 0xc9f6
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 0xca18
movq 0x60(%rbx), %rdi
movl %ebp, %esi
addq $0x280, %rsp            # imm = 0x280
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xcb1e
movq 0x60(%rbx), %rdi
movl %ebp, %esi
addq $0x280, %rsp            # imm = 0x280
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xcb5a
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 0x6248
leaq 0x30(%rsp), %rsi
movq %rbx, %rdi
callq 0xcb96
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x6ea5
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x52e0
movq 0x70(%rsp), %rdi
cmpq %r14, %rdi
je 0x6f5a
movq 0x80(%rsp), %rsi
jmp 0x6f52
movq 0x60(%rbx), %rdi
addq $0x280, %rsp            # imm = 0x280
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xcc66
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 0x708a
testb %al, %al
jne 0x6f20
leaq 0x70(%rsp), %rdi
callq 0x5070
leaq 0x70(%rsp), %rdi
callq 0x5090
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x6f5a
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 0x1503f(%rip), %r14     # 0x1bfb0
leaq 0xc295(%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 0x73c6
movaps (%r14), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, (%r14)
movq 0x68(%rbx), %rdi
movups %xmm0, 0x60(%rbx)
testq %rdi, %rdi
je 0x6fec
callq 0x5f5e
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0x6fec
callq 0x5f5e
movq 0x60(%rbx), %rax
movq 0x20(%rax), %rsi
movq 0x14fb5(%rip), %rdi     # 0x1bfb0
callq 0xf0e4
movq %rax, %rdi
callq 0x5170
jmp 0x6f5a
jmp 0x700f
movq %rax, %rbx
jmp 0x706a
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r15, %rdi
je 0x7081
movq 0x60(%rsp), %rsi
jmp 0x7079
jmp 0x705d
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x7049
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x52e0
jmp 0x7049
movq %rax, %rbx
movq 0x70(%rsp), %rdi
cmpq %r14, %rdi
je 0x7081
movq 0x80(%rsp), %rsi
jmp 0x7079
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x5090
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
je 0x7081
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x52e0
movq %rbx, %rdi
callq 0x54e0
nop