// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
subq $0x68, %rsp
movl %esi, %r14d
movq %rdi, %rbx
addq $0xd0, %rdi
movq 0xe8(%rbx), %rsi
callq 0x25490
movq %rax, %r15
movq 0x226ca(%rip), %rdx     # 0x4bef0
movq %rax, %rsi
callq 0x26ff0
cmpb $0x1, 0x148(%rbx)
jne 0x29920
leaq -0x28(%rbp), %rdi
xorl %esi, %esi
callq 0x26800
leaq -0x58(%rbp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x264e0
leaq -0x28(%rbp), %rdi
leaq -0x58(%rbp), %r15
movq %r15, %rsi
callq 0x259c0
movq %r15, %rdi
callq 0x26730
movzbl -0x28(%rbp), %eax
testl %eax, %eax
je 0x29917
cmpl $0x3, %eax
je 0x298ac
cmpl $0x4, %eax
jne 0x298dc
leaq -0x28(%rbp), %rdi
callq 0x25530
testb %al, %al
je 0x29917
addq $0x90, %rbx
leaq 0x13425(%rip), %rsi     # 0x3ccc7
movq %rbx, %rdi
callq 0x27600
jmp 0x29917
leaq -0x48(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x27210
testb %r14b, %r14b
je 0x298c7
leaq -0x48(%rbp), %rsi
callq 0x25da0
addq $0x90, %rbx
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
callq 0x276c0
jmp 0x2990e
addb $-0x5, %al
cmpb $0x4, %al
jae 0x29917
leaq -0x48(%rbp), %rdi
leaq -0x28(%rbp), %rsi
pushq $-0x1
popq %rdx
pushq $0x20
popq %rcx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x26180
addq $0x90, %rbx
leaq -0x48(%rbp), %rsi
movq %rbx, %rdi
callq 0x276c0
leaq -0x48(%rbp), %rdi
callq 0x27788
leaq -0x28(%rbp), %rdi
callq 0x26730
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x29931
jmp 0x2993f
jmp 0x2993f
movq %rax, %r15
leaq -0x48(%rbp), %rdi
callq 0x27788
jmp 0x29942
movq %rax, %r15
leaq -0x28(%rbp), %rdi
callq 0x26730
movq %r15, %rdi
callq 0x27310
movq %rax, %r15
cmpl $0x2, %edx
jne 0x2998f
movq %r15, %rdi
callq 0x25700
leaq -0x68(%rbp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x26800
leaq -0x28(%rbp), %rdi
movq %r15, %rsi
callq 0x259c0
movq %r15, %rdi
callq 0x26730
callq 0x270b0
jmp 0x2986d
cmpl $0x1, %edx
jne 0x29942
movq %r15, %rdi
callq 0x25700
leaq -0x78(%rbp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x26800
leaq -0x28(%rbp), %rdi
movq %r15, %rsi
callq 0x259c0
movq %r15, %rdi
callq 0x26730
callq 0x270b0
jmp 0x2986d
jmp 0x2993f
jmp 0x2993f