// File: /workspace/github_cpp_makefile_star2_O1/xelia-it[P]mustache/src/mustache-light.cpp
// Function: mustache::Mustache::printVariable(bool)
void Mustache::printVariable(bool escape_html)
{
    const string& variable_name = tokens_.at(currentToken_);
    ensureValidIdentifier(variable_name);
    LOG(" ");
    LOG(variable_name);
    if (visible_) {
        json variable;
        try {
            variable = searchVariableInContext(variable_name);
        } catch(const std::out_of_range& ex) {
            variable = nullptr;
        } catch(const std::invalid_argument& ex) {
            variable = nullptr;
        }

        if (variable.is_primitive()) {
            if (variable.is_null()) {
                // OK
            } else if (variable.is_boolean()) {
                if (variable.get<bool>()) {
                    rendered_.append("true");
                }
            } else if (variable.is_string()) {
                string to_be_appended = variable.get<string>();
                if (escape_html) {
                    htmlEscape(to_be_appended);
                }
                rendered_.append(to_be_appended);
            } else {
                rendered_.append(variable.dump());
            }
        }
    }
    // else skip render invisible parts
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
movl %esi, %r14d
movq 0xe8(%rdi), %rsi
movq 0xd0(%rdi), %r15
movq 0xd8(%rdi), %rdx
subq %r15, %rdx
sarq $0x5, %rdx
cmpq %rsi, %rdx
jbe 0x1b89a
movq %rdi, %rbx
shlq $0x5, %rsi
addq %rsi, %r15
movq 0x227b2(%rip), %rdx     # 0x3dee8
movq %r15, %rsi
callq 0x182a0
cmpb $0x1, 0x148(%rbx)
jne 0x1b88d
leaq -0x30(%rbp), %r12
movb $0x0, (%r12)
movq $0x0, 0x8(%r12)
movq %r12, %rdi
movl $0x1, %esi
callq 0x17530
movq %r12, %rdi
movl $0x1, %esi
callq 0x17530
leaq -0x60(%rbp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x17c30
leaq -0x30(%rbp), %rdi
leaq -0x60(%rbp), %r15
movq %r15, %rsi
callq 0x17550
movq %r15, %rdi
callq 0x17d70
movzbl -0x30(%rbp), %eax
testl %eax, %eax
je 0x1b884
cmpl $0x3, %eax
je 0x1b840
cmpl $0x4, %eax
jne 0x1b7f4
leaq -0x50(%rbp), %rdx
movb $0x0, (%rdx)
movq 0x22732(%rip), %rdi     # 0x3def8
leaq -0x30(%rbp), %rsi
callq 0x17a40
cmpb $0x1, -0x50(%rbp)
jne 0x1b884
addq $0x90, %rbx
leaq 0x154fb(%rip), %rsi     # 0x30ce2
movq %rbx, %rdi
callq 0x18680
jmp 0x1b884
leal -0x9(%rax), %ecx
cmpb $-0x4, %cl
jb 0x1b884
cmpl $0x3, %eax
je 0x1b840
cmpl $0x4, %eax
je 0x1b7b8
leaq -0x50(%rbp), %rdi
leaq -0x30(%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x20, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x17a20
addq $0x90, %rbx
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq %rbx, %rdi
callq 0x172b0
jmp 0x1b872
leaq -0x50(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x18430
testb %r14b, %r14b
je 0x1b85b
leaq -0x50(%rbp), %rsi
callq 0x177b0
addq $0x90, %rbx
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq %rbx, %rdi
callq 0x172b0
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1b884
callq 0x17b00
leaq -0x30(%rbp), %rdi
callq 0x17d70
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x18e3f(%rip), %rdi     # 0x346e0
xorl %eax, %eax
callq 0x18110
jmp 0x1b8ae
jmp 0x1b8c5
jmp 0x1b8c5
movq %rax, %r15
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1b8c8
callq 0x17b00
jmp 0x1b8c8
movq %rax, %r15
leaq -0x30(%rbp), %rdi
callq 0x17d70
movq %r15, %rdi
callq 0x184b0
movq %rax, %r15
cmpl $0x2, %edx
jne 0x1b915
movq %r15, %rdi
callq 0x173f0
leaq -0x70(%rbp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x17e20
leaq -0x30(%rbp), %rdi
movq %r15, %rsi
callq 0x17550
movq %r15, %rdi
callq 0x17d70
callq 0x18320
jmp 0x1b79e
cmpl $0x1, %edx
jne 0x1b8c8
movq %r15, %rdi
callq 0x173f0
leaq -0x80(%rbp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x17e20
leaq -0x30(%rbp), %rdi
movq %r15, %rsi
callq 0x17550
movq %r15, %rdi
callq 0x17d70
callq 0x18320
jmp 0x1b79e
jmp 0x1b8c5
jmp 0x1b8c5