// File: /workspace/github_cpp_makefile_star2_O1/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 0x32e52(%rip), %rsi     # 0x38004
leaq 0x32e56(%rip), %rdx     # 0x3800f
leaq 0x8(%rsp), %rdi
callq 0x54fc
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 0x5206
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42a0
testb $0x5, %bpl
je 0x5213
xorl %ebx, %ebx
jmp 0x5397
leaq 0x32df6(%rip), %rsi     # 0x38010
leaq 0x48(%rsp), %r15
movq %r15, %rdi
movq %r14, %rdx
callq 0x5474
leaq 0x3423a(%rip), %rsi     # 0x3946b
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 0x5260
movq %rdx, 0x28(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x38(%rsp)
jmp 0x5267
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 0x52b2
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x52ba
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 0x32d48(%rip), %rsi     # 0x38025
callq 0x4510
leaq 0x78(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x5309
movq %rdx, 0x68(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x78(%rsp)
jmp 0x5310
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 0x533f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x5356
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x42a0
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5371
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 0x5397
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 0x542c
movq 0x78(%rsp), %rsi
jmp 0x541f
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x53dc
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42a0
jmp 0x53dc
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x53f8
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x42a0
jmp 0x53f8
movq %rax, %rbx
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x542c
movq 0x58(%rsp), %rsi
jmp 0x541f
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x542c
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42a0
jmp 0x542c
movq %rax, %rbx
movq %rbx, %rdi
callq 0x44c0