// File: /workspace/github_cpp_makefile_star2_O1/xelia-it[P]mustache/mustache-interactive.cpp
// Function: main
int main(int argc, char *argv[]) {
    string view = "basic/empty";
    string context = "basic/empty";

    if (argc == 1) {
        // OK
    } else if (argc == 2) {
        view = argv[1];
    } else if (argc == 3) {
        view = argv[1];
        context = argv[2];
    } else {
        std::cerr << "Usage: test-mustache view context" << endl;
    }

    cout << "Open view: " << view << endl;
    cout << "Open context file: " << context << endl;

    Mustache m("./test/fixtures/");
    string rendered;

    std::chrono::steady_clock::time_point begin = std::chrono::steady_clock::now();
    rendered = m.render(m.fileRead(view), m.fileRead(context, "json"));
    std::chrono::steady_clock::time_point end= std::chrono::steady_clock::now();

    cout << "Rendered:" << endl
            << "------------------------------------------------------" << endl
            << rendered << endl
            << "------------------------------------------------------" << endl;
    string error = m.error();
    if (error.size() > 0) {
        cout << "Error:" << endl
                << error << endl
                << "------------------------------------------------------" << endl;
    }
    cout << "Elapsed = " << std::chrono::duration_cast<std::chrono::microseconds>(end - begin).count() << " us" << endl;

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x238, %rsp            # imm = 0x238
movq %rsi, -0x50(%rbp)
movl %edi, %r15d
leaq -0x60(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0xd0e(%rip), %r13       # 0x3004
leaq 0xd12(%rip), %rbx       # 0x300f
leaq -0x70(%rbp), %r12
movq %r12, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x297a
leaq -0xa0(%rbp), %rax
movq %rax, -0x10(%rax)
leaq -0xb0(%rbp), %r14
movq %r14, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x297a
cmpl $0x1, %r15d
je 0x23f0
cmpl $0x2, %r15d
je 0x2378
cmpl $0x3, %r15d
jne 0x23aa
movq -0x50(%rbp), %rax
movq 0x8(%rax), %rbx
leaq -0x70(%rbp), %r15
movq 0x8(%r15), %r12
movq %rbx, %rdi
callq 0x2040
movl $0x10, %r13d
movq %r15, %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %rbx, %rcx
movq %rax, %r8
callq 0x2120
jmp 0x2381
movl $0x8, %r13d
movq %r12, %r14
movq -0x50(%rbp), %rax
movq (%rax,%r13), %rbx
movq 0x8(%r14), %r15
movq %rbx, %rdi
callq 0x2040
movq %r14, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %rbx, %rcx
movq %rax, %r8
callq 0x2120
jmp 0x23f0
movq 0x2c3f(%rip), %rbx      # 0x4ff0
leaq 0xc58(%rip), %rsi       # 0x3010
movl $0x21, %edx
movq %rbx, %rdi
callq 0x20c0
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x20b0
movsbl %al, %esi
movq 0x2c0d(%rip), %rdi      # 0x4ff0
callq 0x2030
movq %rax, %rdi
callq 0x2050
movq 0x2bd9(%rip), %rdi      # 0x4fd0
leaq 0xc34(%rip), %rsi       # 0x3032
movl $0xb, %edx
callq 0x20c0
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
movq 0x2bb9(%rip), %rdi      # 0x4fd0
callq 0x20c0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x20b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2050
movq 0x2b83(%rip), %rdi      # 0x4fd0
leaq 0xbea(%rip), %rsi       # 0x303e
movl $0x13, %edx
callq 0x20c0
movq -0xb0(%rbp), %rsi
movq -0xa8(%rbp), %rdx
movq 0x2b5d(%rip), %rdi      # 0x4fd0
callq 0x20c0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x20b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2050
leaq -0x38(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0xba0(%rip), %rsi       # 0x3052
leaq 0xba9(%rip), %rdx       # 0x3062
leaq -0x48(%rbp), %rdi
callq 0x297a
leaq -0x260(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x2170
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x24e0
callq 0x2090
movq %r12, -0x48(%rbp)
movq $0x0, -0x40(%rbp)
movb $0x0, -0x38(%rbp)
callq 0x20f0
movq %rax, %rbx
leaq -0x110(%rbp), %rdi
leaq -0x260(%rbp), %rsi
leaq -0x70(%rbp), %rdx
callq 0x2130
leaq -0xc0(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0xb42(%rip), %rsi       # 0x3063
leaq 0xb3f(%rip), %rdx       # 0x3067
leaq -0xd0(%rbp), %rdi
callq 0x297a
leaq -0xf0(%rbp), %rdi
leaq -0x260(%rbp), %rsi
leaq -0xb0(%rbp), %rdx
leaq -0xd0(%rbp), %rcx
callq 0x20d0
leaq -0x90(%rbp), %rdi
leaq -0x260(%rbp), %rsi
leaq -0x110(%rbp), %rdx
leaq -0xf0(%rbp), %rcx
callq 0x2100
leaq -0x48(%rbp), %rdi
leaq -0x90(%rbp), %r14
movq %r14, %rsi
callq 0x20e0
movq (%r14), %rdi
leaq -0x80(%rbp), %r13
cmpq %r13, %rdi
je 0x259a
callq 0x2090
leaq -0xe0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x25af
callq 0x2090
movq -0xd0(%rbp), %rdi
cmpq %r15, %rdi
je 0x25c0
callq 0x2090
leaq -0x100(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x25d5
callq 0x2090
callq 0x20f0
movq %rax, %r14
movq 0x29ec(%rip), %r15      # 0x4fd0
leaq 0xa7d(%rip), %rsi       # 0x3068
movl $0x9, %edx
movq %r15, %rdi
callq 0x20c0
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x20b0
movsbl %al, %esi
movq 0x29ba(%rip), %rdi      # 0x4fd0
callq 0x2030
movq %rax, %rdi
callq 0x2050
movq %rax, %r15
leaq 0xa45(%rip), %rsi       # 0x3072
movl $0x36, %edx
movq %rax, %rdi
callq 0x20c0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x20b0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2050
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq %rax, %rdi
callq 0x20c0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x20b0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2050
movq %rax, %r15
leaq 0x9cd(%rip), %rsi       # 0x3072
movl $0x36, %edx
movq %rax, %rdi
callq 0x20c0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x20b0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2050
leaq -0x90(%rbp), %rdi
leaq -0x260(%rbp), %rsi
callq 0x2140
cmpq $0x0, -0x88(%rbp)
je 0x27be
movq 0x28cf(%rip), %r15      # 0x4fd0
leaq 0x9a1(%rip), %rsi       # 0x30a9
movl $0x6, %edx
movq %r15, %rdi
callq 0x20c0
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x20b0
movsbl %al, %esi
movq 0x289d(%rip), %rdi      # 0x4fd0
callq 0x2030
movq %rax, %rdi
callq 0x2050
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
movq %rax, %rdi
callq 0x20c0
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x20b0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2050
movq %rax, %r15
leaq 0x8e8(%rip), %rsi       # 0x3072
movl $0x36, %edx
movq %rax, %rdi
callq 0x20c0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x20b0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2050
movq 0x280b(%rip), %rdi      # 0x4fd0
leaq 0x8e4(%rip), %rsi       # 0x30b0
movl $0xa, %edx
callq 0x20c0
subq %rbx, %r14
movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF
movq %r14, %rax
imulq %rcx
movq %rdx, %rsi
shrq $0x3f, %rsi
sarq $0x7, %rdx
addq %rdx, %rsi
movq 0x27d2(%rip), %rdi      # 0x4fd0
callq 0x20a0
movq %rax, %rbx
leaq 0x8ae(%rip), %rsi       # 0x30bb
movl $0x3, %edx
movq %rax, %rdi
callq 0x20c0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x20b0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2050
movq -0x90(%rbp), %rdi
cmpq %r13, %rdi
je 0x2852
callq 0x2090
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x2860
callq 0x2090
leaq -0x260(%rbp), %rdi
callq 0x2180
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x2884
callq 0x2090
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x2896
callq 0x2090
xorl %eax, %eax
addq $0x238, %rsp            # imm = 0x238
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x292a
movq %rax, %rbx
leaq -0xe0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x28c9
callq 0x2090
jmp 0x28c9
movq %rax, %rbx
movq -0xd0(%rbp), %rdi
cmpq %r15, %rdi
je 0x28df
callq 0x2090
jmp 0x28df
movq %rax, %rbx
leaq -0x100(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x291e
jmp 0x292d
jmp 0x292a
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x2947
callq 0x2090
jmp 0x2947
jmp 0x2925
movq %rax, %rbx
jmp 0x295f
jmp 0x290f
movq %rax, %rbx
movq -0x90(%rbp), %rdi
cmpq %r13, %rdi
je 0x292d
callq 0x2090
jmp 0x292d
movq %rax, %rbx
jmp 0x2947
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r12, %rdi
je 0x293b
callq 0x2090
leaq -0x260(%rbp), %rdi
callq 0x2180
movq -0xb0(%rbp), %rdi
leaq -0xa0(%rbp), %rax
cmpq %rax, %rdi
je 0x295f
callq 0x2090
movq -0x70(%rbp), %rdi
leaq -0x60(%rbp), %rax
cmpq %rax, %rdi
je 0x2971
callq 0x2090
movq %rbx, %rdi
callq 0x2150
nop