// File: xelia-it[P]mustache/src/mustache-light.cpp
// Function: mustache::Mustache::produceMessage()
void Mustache::produceMessage() {
        LOG_START("");
        LOG_END("MESSAGE := ");
        LOG_START("");

        if (IS_TOKEN_EMPTY()) {
                LOG_END("  (empty)");

                return;
        }
        if (IS_TOKEN(TOKEN_START_VARIABLE)) {
                LOG_END("  VARIABLE");
                CONSUME_TOKEN();
                produceVariable();
                CONSUME_TOKEN();
                produceMessage();

                return;
        }
        if (IS_TOKEN(TOKEN_START_VARIABLE_UNESCAPED)) {
                LOG_END("  VARIABLE UNESCAPED");
                CONSUME_TOKEN();
                produceVariableUnescaped();
                CONSUME_TOKEN();
                produceMessage();

                return;
        }
        if (IS_TOKEN(TOKEN_START_COMMENT)) {
                LOG_END("  COMMENT");
                CONSUME_TOKEN();
                produceComment();
                CONSUME_TOKEN();
                produceMessage();

                return;
        }
        if (IS_TOKEN(TOKEN_START_BEGIN_SECTION) || IS_TOKEN(TOKEN_START_IF) ||
            IS_TOKEN(TOKEN_START_UNLESS) || IS_TOKEN(TOKEN_START_EXISTS_TEST)) {
                LOG_END("  SECTION");
                CONSUME_TOKEN();
                produceSection();
                CONSUME_TOKEN();
                produceMessage();
                return;
        }
        if (IS_TOKEN(TOKEN_START_END_SECTION)) {
                //        if (stack_.size() == 1) {
                //            error("Unexpected end of block '" + TOKEN_START_END_SECTION + "'");
                //        }
                // If we are in a block do not throw error.. simply return
                return;
        }
        if (IS_TOKEN(TOKEN_START_PARTIAL) || IS_TOKEN(TOKEN_START_TEMPLATE)) {
                LOG_END("  PARTIAL");
                CONSUME_TOKEN();
                producePartial();
                produceMessage();
                return;
        }
        if (IS_TOKEN(TOKEN_END)) {
                error("Unexpected end of variable '" + TOKEN_END + "'");
                return;
        }

        LOG_END("  (text)");
        if (visible_) {
                rendered_.append(tokens_.at(currentToken_));
        }
        CONSUME_TOKEN();
        produceMessage();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x68(%rbp)
movq 0xe8(%rdi), %rax
movq %rax, -0x60(%rbp)
addq $0xd0, %rdi
callq 0x6dab0
movq %rax, %rcx
movq -0x60(%rbp), %rax
cmpq %rcx, %rax
jne 0x7012f
jmp 0x70514
movq -0x68(%rbp), %rax
movq %rax, %rdi
addq $0xd0, %rdi
movq 0xe8(%rax), %rsi
callq 0x67da0
movq %rax, %rdi
movq 0x55d4d(%rip), %rsi     # 0xc5ea0
callq 0x68f40
testb $0x1, %al
jne 0x7015e
jmp 0x70199
movq -0x68(%rbp), %rdi
movq 0xe8(%rdi), %rax
addq $0x1, %rax
movq %rax, 0xe8(%rdi)
callq 0x6db40
movq -0x68(%rbp), %rdi
movq 0xe8(%rdi), %rax
addq $0x1, %rax
movq %rax, 0xe8(%rdi)
callq 0x68c10
jmp 0x70514
movq -0x68(%rbp), %rax
movq %rax, %rdi
addq $0xd0, %rdi
movq 0xe8(%rax), %rsi
callq 0x67da0
movq %rax, %rdi
movq 0x55d53(%rip), %rsi     # 0xc5f10
callq 0x68f40
testb $0x1, %al
jne 0x701c8
jmp 0x70203
movq -0x68(%rbp), %rdi
movq 0xe8(%rdi), %rax
addq $0x1, %rax
movq %rax, 0xe8(%rdi)
callq 0x67760
movq -0x68(%rbp), %rdi
movq 0xe8(%rdi), %rax
addq $0x1, %rax
movq %rax, 0xe8(%rdi)
callq 0x68c10
jmp 0x70514
movq -0x68(%rbp), %rax
movq %rax, %rdi
addq $0xd0, %rdi
movq 0xe8(%rax), %rsi
callq 0x67da0
movq %rax, %rdi
movq 0x55d31(%rip), %rsi     # 0xc5f58
callq 0x68f40
testb $0x1, %al
jne 0x70232
jmp 0x7026d
movq -0x68(%rbp), %rdi
movq 0xe8(%rdi), %rax
addq $0x1, %rax
movq %rax, 0xe8(%rdi)
callq 0x69f50
movq -0x68(%rbp), %rdi
movq 0xe8(%rdi), %rax
addq $0x1, %rax
movq %rax, 0xe8(%rdi)
callq 0x68c10
jmp 0x70514
movq -0x68(%rbp), %rax
movq %rax, %rdi
addq $0xd0, %rdi
movq 0xe8(%rax), %rsi
callq 0x67da0
movq %rax, %rdi
movq 0x55ca7(%rip), %rsi     # 0xc5f38
callq 0x68f40
testb $0x1, %al
jne 0x70327
movq -0x68(%rbp), %rax
movq %rax, %rdi
addq $0xd0, %rdi
movq 0xe8(%rax), %rsi
callq 0x67da0
movq %rax, %rdi
movq 0x55ce6(%rip), %rsi     # 0xc5fa8
callq 0x68f40
testb $0x1, %al
jne 0x70327
movq -0x68(%rbp), %rax
movq %rax, %rdi
addq $0xd0, %rdi
movq 0xe8(%rax), %rsi
callq 0x67da0
movq %rax, %rdi
movq 0x55b69(%rip), %rsi     # 0xc5e58
callq 0x68f40
testb $0x1, %al
jne 0x70327
movq -0x68(%rbp), %rax
movq %rax, %rdi
addq $0xd0, %rdi
movq 0xe8(%rax), %rsi
callq 0x67da0
movq %rax, %rdi
movq 0x55bdc(%rip), %rsi     # 0xc5ef8
callq 0x68f40
testb $0x1, %al
jne 0x70327
jmp 0x70362
movq -0x68(%rbp), %rdi
movq 0xe8(%rdi), %rax
addq $0x1, %rax
movq %rax, 0xe8(%rdi)
callq 0x6b850
movq -0x68(%rbp), %rdi
movq 0xe8(%rdi), %rax
addq $0x1, %rax
movq %rax, 0xe8(%rdi)
callq 0x68c10
jmp 0x70514
movq -0x68(%rbp), %rax
movq %rax, %rdi
addq $0xd0, %rdi
movq 0xe8(%rax), %rsi
callq 0x67da0
movq %rax, %rdi
movq 0x55c2a(%rip), %rsi     # 0xc5fb0
callq 0x68f40
testb $0x1, %al
jne 0x70391
jmp 0x70396
jmp 0x70514
movq -0x68(%rbp), %rax
movq %rax, %rdi
addq $0xd0, %rdi
movq 0xe8(%rax), %rsi
callq 0x67da0
movq %rax, %rdi
movq 0x55bae(%rip), %rsi     # 0xc5f68
callq 0x68f40
testb $0x1, %al
jne 0x703f2
movq -0x68(%rbp), %rax
movq %rax, %rdi
addq $0xd0, %rdi
movq 0xe8(%rax), %rsi
callq 0x67da0
movq %rax, %rdi
movq 0x55ac9(%rip), %rsi     # 0xc5eb0
callq 0x68f40
testb $0x1, %al
jne 0x703f2
jmp 0x7041b
movq -0x68(%rbp), %rdi
movq 0xe8(%rdi), %rax
addq $0x1, %rax
movq %rax, 0xe8(%rdi)
callq 0x69900
movq -0x68(%rbp), %rdi
callq 0x68c10
jmp 0x70514
movq -0x68(%rbp), %rax
movq %rax, %rdi
addq $0xd0, %rdi
movq 0xe8(%rax), %rsi
callq 0x67da0
movq %rax, %rdi
movq 0x559e9(%rip), %rsi     # 0xc5e28
callq 0x68f40
testb $0x1, %al
jne 0x7044a
jmp 0x704b8
leaq 0x39244(%rip), %rsi     # 0xa9695
movq 0x559d0(%rip), %rdx     # 0xc5e28
leaq -0x48(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0x6a3b0
movq -0x70(%rbp), %rsi
leaq 0x3b5f1(%rip), %rdx     # 0xaba61
leaq -0x28(%rbp), %rdi
callq 0x678d0
jmp 0x7047b
movq -0x68(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x6ba10
jmp 0x7048a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x704ad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x6e458
leaq -0x48(%rbp), %rdi
callq 0x6e458
jmp 0x7051d
movq -0x68(%rbp), %rax
testb $0x1, 0x148(%rax)
je 0x704f9
movq -0x68(%rbp), %rax
movq %rax, %rcx
addq $0x90, %rcx
movq %rcx, -0x78(%rbp)
movq %rax, %rdi
addq $0xd0, %rdi
movq 0xe8(%rax), %rsi
callq 0x67da0
movq -0x78(%rbp), %rdi
movq %rax, %rsi
callq 0x6e220
movq -0x68(%rbp), %rdi
movq 0xe8(%rdi), %rax
addq $0x1, %rax
movq %rax, 0xe8(%rdi)
callq 0x68c10
addq $0x80, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x6d7b0
nopw %cs:(%rax,%rax)