// File: Diggie-Bro[P]StreamCode/test/hello_world_var.cpp
// Function: main
int main() {
    Importer importer; importer.importIOModule();
    struct Variables varname {
        Types(VARIABLE),
        "name",
    };
    struct Variables varvalue {
        Types(STRING),
        "dummy",
    };
    struct Variables print_perf_param {
        Types(VARIABLE),
        "name"
    };

    vector<struct Variables> var_name; 
    var_name.push_back(varname); var_name.push_back(varvalue);

    vector<struct Variables> print_proc_param;
    print_proc_param.push_back(print_perf_param);
    
    struct PerformFunction print_perf {
        CALLFUNC,
        NULL,
        "print",
        print_proc_param,
    };

    struct PerformFunction assignVar_name {
        ASSIGN,
        &print_perf, 
        "",
        var_name,
    };

    Process print_proc {
        NULL,
        "",
        vector<struct Variables> (0),
        vector<struct Variables> (0),
        &assignVar_name,
    };

    Stream main_strm {
        NULL,
        StreamType(UNIT),
        &print_proc,
        "main",
    };

    StreamCode code {
        &main_strm,
        &importer,
        "hello_world.strmcode",
    };

    Executor exec_ = {
        code
    };

    exec_.executeCode();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x390, %rsp            # imm = 0x390
leaq -0x58(%rbp), %rdi
movq %rdi, -0x2e0(%rbp)
callq 0x3320
movq -0x2e0(%rbp), %rdi
callq 0x3340
jmp 0x2779
movl $0x5, -0x90(%rbp)
leaq -0x88(%rbp), %rax
movq %rax, -0x2f0(%rbp)
leaq -0x91(%rbp), %rdi
movq %rdi, -0x2e8(%rbp)
callq 0x2300
movq -0x2f0(%rbp), %rdi
movq -0x2e8(%rbp), %rdx
leaq 0x6870(%rip), %rsi      # 0x9029
callq 0x2260
jmp 0x27c0
leaq -0x91(%rbp), %rdi
callq 0x21f0
movl $0x2, -0xc0(%rbp)
leaq -0xb8(%rbp), %rax
movq %rax, -0x300(%rbp)
leaq -0xc1(%rbp), %rdi
movq %rdi, -0x2f8(%rbp)
callq 0x2300
movq -0x300(%rbp), %rdi
movq -0x2f8(%rbp), %rdx
leaq 0x6822(%rip), %rsi      # 0x902e
callq 0x2260
jmp 0x2813
leaq -0xc1(%rbp), %rdi
callq 0x21f0
movl $0x5, -0xf0(%rbp)
leaq -0xe8(%rbp), %rax
movq %rax, -0x310(%rbp)
leaq -0xf1(%rbp), %rdi
movq %rdi, -0x308(%rbp)
callq 0x2300
movq -0x310(%rbp), %rdi
movq -0x308(%rbp), %rdx
leaq 0x67ca(%rip), %rsi      # 0x9029
callq 0x2260
jmp 0x2866
leaq -0xf1(%rbp), %rdi
callq 0x21f0
leaq -0x110(%rbp), %rdi
movq %rdi, -0x318(%rbp)
callq 0x3380
movq -0x318(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x33a0
jmp 0x289a
leaq -0x110(%rbp), %rdi
leaq -0xc0(%rbp), %rsi
callq 0x33a0
jmp 0x28af
leaq -0x128(%rbp), %rdi
movq %rdi, -0x320(%rbp)
callq 0x3380
movq -0x320(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0x33a0
jmp 0x28d7
movl $0x1, -0x170(%rbp)
movq $0x0, -0x168(%rbp)
leaq -0x160(%rbp), %rax
movq %rax, -0x330(%rbp)
leaq -0x171(%rbp), %rdi
movq %rdi, -0x328(%rbp)
callq 0x2300
movq -0x330(%rbp), %rdi
movq -0x328(%rbp), %rdx
leaq 0x6701(%rip), %rsi      # 0x9023
callq 0x2260
jmp 0x2929
leaq -0x140(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0x3410
jmp 0x293e
leaq -0x171(%rbp), %rdi
callq 0x21f0
movl $0x0, -0x1c0(%rbp)
leaq -0x170(%rbp), %rax
movq %rax, -0x1b8(%rbp)
leaq -0x1b0(%rbp), %rax
movq %rax, -0x340(%rbp)
leaq -0x1c1(%rbp), %rdi
movq %rdi, -0x338(%rbp)
callq 0x2300
movq -0x340(%rbp), %rdi
movq -0x338(%rbp), %rdx
leaq 0x678c(%rip), %rsi      # 0x9124
callq 0x2260
jmp 0x299f
leaq -0x190(%rbp), %rdi
leaq -0x110(%rbp), %rsi
callq 0x3410
jmp 0x29b4
leaq -0x1c1(%rbp), %rdi
callq 0x21f0
movq $0x0, -0x228(%rbp)
leaq -0x220(%rbp), %rax
movq %rax, -0x350(%rbp)
leaq -0x229(%rbp), %rdi
movq %rdi, -0x348(%rbp)
callq 0x2300
movq -0x350(%rbp), %rdi
movq -0x348(%rbp), %rdx
leaq 0x6723(%rip), %rsi      # 0x9124
callq 0x2260
jmp 0x2a08
movb $0x1, -0x22d(%rbp)
leaq -0x200(%rbp), %rax
movq %rax, -0x360(%rbp)
leaq -0x22a(%rbp), %rdi
movq %rdi, -0x358(%rbp)
callq 0x3500
movq -0x360(%rbp), %rdi
movq -0x358(%rbp), %rdx
xorl %eax, %eax
movl %eax, %esi
callq 0x3520
jmp 0x2a49
movb $0x1, -0x22c(%rbp)
leaq -0x1e8(%rbp), %rax
movq %rax, -0x370(%rbp)
leaq -0x22b(%rbp), %rdi
movq %rdi, -0x368(%rbp)
callq 0x3500
movq -0x370(%rbp), %rdi
movq -0x368(%rbp), %rdx
xorl %eax, %eax
movl %eax, %esi
callq 0x3520
jmp 0x2a8a
leaq -0x1c0(%rbp), %rax
movq %rax, -0x1d0(%rbp)
movb $0x0, -0x22c(%rbp)
movb $0x0, -0x22d(%rbp)
leaq -0x22b(%rbp), %rdi
callq 0x3590
leaq -0x22a(%rbp), %rdi
callq 0x3590
leaq -0x229(%rbp), %rdi
callq 0x21f0
movq $0x0, -0x268(%rbp)
movl $0x0, -0x260(%rbp)
leaq -0x228(%rbp), %rax
movq %rax, -0x258(%rbp)
leaq -0x250(%rbp), %rax
movq %rax, -0x380(%rbp)
leaq -0x269(%rbp), %rdi
movq %rdi, -0x378(%rbp)
callq 0x2300
movq -0x380(%rbp), %rdi
movq -0x378(%rbp), %rdx
leaq 0x6511(%rip), %rsi      # 0x9034
callq 0x2260
jmp 0x2b2a
leaq -0x269(%rbp), %rdi
callq 0x21f0
leaq -0x268(%rbp), %rax
movq %rax, -0x2a0(%rbp)
leaq -0x58(%rbp), %rax
movq %rax, -0x298(%rbp)
leaq -0x290(%rbp), %rax
movq %rax, -0x390(%rbp)
leaq -0x2a1(%rbp), %rdi
movq %rdi, -0x388(%rbp)
callq 0x2300
movq -0x390(%rbp), %rdi
movq -0x388(%rbp), %rdx
leaq 0x64b4(%rip), %rsi      # 0x9039
callq 0x2260
jmp 0x2b8c
leaq -0x2a1(%rbp), %rdi
callq 0x21f0
leaq -0x2d8(%rbp), %rdi
leaq -0x2a0(%rbp), %rsi
callq 0x3610
jmp 0x2bad
leaq -0x2d8(%rbp), %rdi
callq 0x3650
jmp 0x2bbb
leaq -0x2d8(%rbp), %rdi
callq 0x3bd0
leaq -0x2a0(%rbp), %rdi
callq 0x3bf0
leaq -0x268(%rbp), %rdi
callq 0x3c10
leaq -0x228(%rbp), %rdi
callq 0x3c30
leaq -0x1c0(%rbp), %rdi
callq 0x3c70
leaq -0x170(%rbp), %rdi
callq 0x3c70
leaq -0x128(%rbp), %rdi
callq 0x35b0
leaq -0x110(%rbp), %rdi
callq 0x35b0
leaq -0xf0(%rbp), %rdi
callq 0x32e0
leaq -0xc0(%rbp), %rdi
callq 0x32e0
leaq -0x90(%rbp), %rdi
callq 0x32e0
leaq -0x58(%rbp), %rdi
callq 0x3ca0
xorl %eax, %eax
addq $0x390, %rsp            # imm = 0x390
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x2e9d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x91(%rbp), %rdi
callq 0x21f0
jmp 0x2e9d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xc1(%rbp), %rdi
callq 0x21f0
jmp 0x2e91
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xf1(%rbp), %rdi
callq 0x21f0
jmp 0x2e85
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x2e6d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x2e61
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x2d03
movq -0x330(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
callq 0x2120
leaq -0x171(%rbp), %rdi
callq 0x21f0
jmp 0x2e61
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x2d3a
movq -0x340(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
callq 0x2120
leaq -0x1c1(%rbp), %rdi
callq 0x21f0
jmp 0x2e55
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x2dbd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x2d98
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x22b(%rbp), %rdi
callq 0x3590
testb $0x1, -0x22c(%rbp)
jne 0x2d8a
jmp 0x2d96
movq -0x360(%rbp), %rdi
callq 0x35b0
jmp 0x2d98
leaq -0x22a(%rbp), %rdi
callq 0x3590
testb $0x1, -0x22d(%rbp)
jne 0x2daf
jmp 0x2dbb
movq -0x350(%rbp), %rdi
callq 0x2120
jmp 0x2dbd
leaq -0x229(%rbp), %rdi
callq 0x21f0
jmp 0x2e49
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x269(%rbp), %rdi
callq 0x21f0
jmp 0x2e3d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x2a1(%rbp), %rdi
callq 0x21f0
jmp 0x2e31
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x2e25
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x2d8(%rbp), %rdi
callq 0x3bd0
leaq -0x2a0(%rbp), %rdi
callq 0x3bf0
leaq -0x268(%rbp), %rdi
callq 0x3c10
leaq -0x228(%rbp), %rdi
callq 0x3c30
leaq -0x1c0(%rbp), %rdi
callq 0x3c70
leaq -0x170(%rbp), %rdi
callq 0x3c70
leaq -0x128(%rbp), %rdi
callq 0x35b0
leaq -0x110(%rbp), %rdi
callq 0x35b0
leaq -0xf0(%rbp), %rdi
callq 0x32e0
leaq -0xc0(%rbp), %rdi
callq 0x32e0
leaq -0x90(%rbp), %rdi
callq 0x32e0
leaq -0x58(%rbp), %rdi
callq 0x3ca0
movq -0x60(%rbp), %rdi
callq 0x22f0
nop