// File: /workspace/github_cpp_makefile_star2_O3/Merulo[P]CompilerJFTT/src/External/EmulatorRunner.cpp
// Function: EmulatorRunner::emulate(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool EmulatorRunner::emulate(std::string tmpFileName, std::string resultFileName)
{
    if (!fileExists("emulator.py"))
    {
        return false;
    }

    std::string command = "python3 emulator.py " + tmpFileName + " " + resultFileName + "> /dev/null 2> /dev/null";
    int v = system(command.c_str());
    return v == 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x270, %rsp            # imm = 0x270
movq %rdx, %rbx
movq %rsi, %r14
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x31f82(%rip), %rsi     # 0x37004
leaq 0x31f86(%rip), %rdx     # 0x3700f
leaq 0x8(%rsp), %rdi
callq 0x53cc
movq 0x8(%rsp), %rsi
leaq 0x68(%rsp), %rdi
movl $0x8, %edx
callq 0x44e0
leaq 0x68(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
movl 0x88(%rsp,%rax), %ebp
callq 0x40a0
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x50d6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42a0
testb $0x5, %bpl
je 0x50e3
xorl %ebx, %ebx
jmp 0x5267
leaq 0x31f26(%rip), %rsi     # 0x37010
leaq 0x48(%rsp), %r15
movq %r15, %rdi
movq %r14, %rdx
callq 0x5344
leaq 0x3336a(%rip), %rsi     # 0x3846b
movq %r15, %rdi
callq 0x4510
leaq 0x38(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x5130
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x5137
movups (%rcx), %xmm0
movups %xmm0, (%r14)
movq 0x8(%rax), %rdx
leaq 0x28(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
callq 0x40f0
movq %r12, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x5182
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x518a
movups (%rcx), %xmm0
movups %xmm0, (%r12)
movq 0x8(%rax), %rdx
leaq 0x8(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x31e78(%rip), %rsi     # 0x37025
callq 0x4510
leaq 0x78(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x51d9
movq %rdx, 0x68(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x78(%rsp)
jmp 0x51e0
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x70(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x520f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x5226
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x42a0
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5241
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x68(%rsp), %rdi
callq 0x4240
testl %eax, %eax
sete %bl
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x5267
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x42a0
movl %ebx, %eax
addq $0x270, %rsp            # imm = 0x270
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x68(%rsp), %rdi
cmpq %r15, %rdi
je 0x52fc
movq 0x78(%rsp), %rsi
jmp 0x52ef
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x52ac
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42a0
jmp 0x52ac
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x52c8
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x42a0
jmp 0x52c8
movq %rax, %rbx
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x52fc
movq 0x58(%rsp), %rsi
jmp 0x52ef
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x52fc
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42a0
jmp 0x52fc
movq %rax, %rbx
movq %rbx, %rdi
callq 0x44c0