// File: /workspace/github_cpp_makefile_star2_O3/KJTang[P]SimpleCompiler/VirtualMachine.cpp
// Function: VirtualMachine::VirtualMachine(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
VirtualMachine::VirtualMachine(const std::string &code) {
    std::istringstream iss(code);
    int num = 0;
    while (iss>>num) {
        this->binCode.push_back(num);
    }
    int *global = new int[DATA_SEG_SIZE];
    this->data.push_back(global);
    bool *globalFlag = new bool[DATA_SEG_SIZE];
    memset(globalFlag, false, DATA_SEG_SIZE);
    this->dataFlag.push_back(globalFlag);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x18(%rdi), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x50(%rdi)
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movq $0x0, 0x60(%rdi)
movq %r14, %rdi
xorl %esi, %esi
callq 0xb2c6
leaq 0x68(%rbx), %rax
movq %rax, -0x40(%rbp)
leaq 0x80(%rbx), %rax
movq %rax, -0x38(%rbp)
leaq 0xa0(%rbx), %r13
xorps %xmm0, %xmm0
movups %xmm0, 0xe0(%rbx)
movups %xmm0, 0xd0(%rbx)
movups %xmm0, 0xc0(%rbx)
movups %xmm0, 0xb0(%rbx)
movups %xmm0, 0xa0(%rbx)
movups %xmm0, 0x68(%rbx)
movups %xmm0, 0x78(%rbx)
movups %xmm0, 0x88(%rbx)
movl $0x0, 0x98(%rbx)
movq %r13, %rdi
xorl %esi, %esi
callq 0xb2c6
leaq -0x1d0(%rbp), %rdi
movq %r15, %rsi
movl $0x8, %edx
callq 0x3310
leaq -0x2c(%rbp), %r15
movl $0x0, (%r15)
leaq -0x1d0(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x3140
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0xd0f2
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0xd0e5
movl -0x2c(%rbp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0xd0b3
movq %rbx, %rdi
movq %r15, %rdx
callq 0xdeb8
jmp 0xd0b3
movl $0x190, %edi            # imm = 0x190
callq 0x3030
movq %rax, -0x50(%rbp)
movq 0x70(%rbx), %rsi
cmpq 0x78(%rbx), %rsi
je 0xd114
movq %rax, (%rsi)
addq $0x8, 0x70(%rbx)
jmp 0xd121
leaq -0x50(%rbp), %rdx
movq -0x40(%rbp), %rdi
callq 0xdfd2
movl $0x64, %edi
callq 0x3030
movq %rax, -0x48(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, 0x50(%rax)
movups %xmm0, 0x40(%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movl $0x0, 0x60(%rax)
movq 0x88(%rbx), %rsi
cmpq 0x90(%rbx), %rsi
je 0xd16d
movq %rax, (%rsi)
addq $0x8, 0x88(%rbx)
jmp 0xd17a
leaq -0x48(%rbp), %rdx
movq -0x38(%rbp), %rdi
callq 0xe0ee
movq 0x6e3f(%rip), %rsi      # 0x13fc0
leaq -0x1d0(%rbp), %rdi
callq 0x3290
leaq -0x158(%rbp), %rdi
callq 0x30c0
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
jmp 0xd1e0
movq %rax, %r15
jmp 0xd1e8
movq %rax, %r15
jmp 0xd212
jmp 0xd1be
jmp 0xd1be
movq %rax, %r15
movq 0x6df8(%rip), %rsi      # 0x13fc0
leaq -0x1d0(%rbp), %rdi
callq 0x3290
leaq -0x158(%rbp), %rdi
callq 0x30c0
movq %r13, %rdi
callq 0x4e3c
movq -0x38(%rbp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0xd1f9
callq 0x31c0
movq -0x40(%rbp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0xd20a
callq 0x31c0
movq %r14, %rdi
callq 0x4e3c
movq (%rbx), %rdi
testq %rdi, %rdi
je 0xd21f
callq 0x31c0
movq %r15, %rdi
callq 0x3330
nop