// File: /workspace/github_cpp_makefile_star2_O3/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 0x1b972
movq %rdi, %rbx
shlq $0x5, %rsi
addq %rsi, %r15
movq 0x216c6(%rip), %rdx     # 0x3cee8
movq %r15, %rsi
callq 0x18280
cmpb $0x1, 0x148(%rbx)
jne 0x1b965
leaq -0x30(%rbp), %r12
movb $0x0, (%r12)
movq $0x0, 0x8(%r12)
movq %r12, %rdi
movl $0x1, %esi
callq 0x17520
movq %r12, %rdi
movl $0x1, %esi
callq 0x17520
leaq -0x60(%rbp), %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x17c10
leaq -0x30(%rbp), %rdi
leaq -0x60(%rbp), %r15
movq %r15, %rsi
callq 0x17540
movq %r15, %rdi
callq 0x17d50
movzbl -0x30(%rbp), %eax
testl %eax, %eax
je 0x1b95c
cmpl $0x3, %eax
je 0x1b8dc
cmpl $0x4, %eax
jne 0x1b910
leaq -0x50(%rbp), %rdx
movb $0x0, (%rdx)
movq 0x2164a(%rip), %rdi     # 0x3cef8
leaq -0x30(%rbp), %rsi
callq 0x17a20
cmpb $0x1, -0x50(%rbp)
jne 0x1b95c
addq $0x90, %rbx
leaq 0x14407(%rip), %rsi     # 0x2fcd6
movq %rbx, %rdi
callq 0x18660
jmp 0x1b95c
leaq -0x50(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x18410
testb %r14b, %r14b
je 0x1b8f7
leaq -0x50(%rbp), %rsi
callq 0x177a0
addq $0x90, %rbx
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq %rbx, %rdi
callq 0x172b0
jmp 0x1b94a
addb $-0x5, %al
cmpb $0x4, %al
jae 0x1b95c
leaq -0x50(%rbp), %rdi
leaq -0x30(%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
movl $0x20, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
callq 0x17a00
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 0x1b95c
callq 0x17ae0
leaq -0x30(%rbp), %rdi
callq 0x17d50
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x17d5b(%rip), %rdi     # 0x336d4
xorl %eax, %eax
callq 0x180f0
jmp 0x1b986
jmp 0x1b99d
jmp 0x1b99d
movq %rax, %r15
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1b9a0
callq 0x17ae0
jmp 0x1b9a0
movq %rax, %r15
leaq -0x30(%rbp), %rdi
callq 0x17d50
movq %r15, %rdi
callq 0x18490
movq %rax, %r15
cmpl $0x2, %edx
jne 0x1b9ed
movq %r15, %rdi
callq 0x173f0
leaq -0x70(%rbp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x17e00
leaq -0x30(%rbp), %rdi
movq %r15, %rsi
callq 0x17540
movq %r15, %rdi
callq 0x17d50
callq 0x18300
jmp 0x1b88a
cmpl $0x1, %edx
jne 0x1b9a0
movq %r15, %rdi
callq 0x173f0
leaq -0x80(%rbp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x17e00
leaq -0x30(%rbp), %rdi
movq %r15, %rsi
callq 0x17540
movq %r15, %rdi
callq 0x17d50
callq 0x18300
jmp 0x1b88a
jmp 0x1b99d
jmp 0x1b99d