// File: /workspace/github_cpp_makefile_star2_O3/DCTewi[P]Truthtable-Calculator/functions.cpp
// Function: getResultOf(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::map<char, int, std::less<char>, std::allocator<std::pair<char const, int>>>&)
bool getResultOf(const std::string &expr, std::map<char, int> &valueof)
{
    // Cache
    std::stack<bool> s;
    for (int i = 0; i < static_cast<int>(expr.size()); i++)
    {
        const char &now = expr[i];
        // Variables
        if (isalpha(now))
        {
            s.push(valueof[now]);
        }
        // Operators
        else if (now == '!')
        {
            if (s.size() < 1)
            {
                throw std::overflow_error("Illegal Expression!");
            }
            bool top = s.top(); s.pop();
            s.push(!top);
        }
        else if (now == '&' || now == '*')
        {
            if (s.size() < 2)
            {
                throw std::overflow_error("Illegal Expression!");
            }
            bool a = s.top(); s.pop();
            bool b = s.top(); s.pop();
            s.push(a && b);
        }
        else if (now == '|' || now == '+')
        {
            if (s.size() < 2)
            {
                throw std::overflow_error("Illegal Expression!");
            }
            bool a = s.top(); s.pop();
            bool b = s.top(); s.pop();
            s.push(a || b);
        }
        else if (now == '-')
        {
            if (s.size() < 2)
            {
                throw std::overflow_error("Illegal Expression!");
            }
            bool a = s.top(); s.pop();
            bool b = s.top(); s.pop();
            s.push((!a) || b);
        }
        else if (now == '=')
        {
            if (s.size() < 2)
            {
                throw std::overflow_error("Illegal Expression!");
            }
            bool a = s.top(); s.pop();
            bool b = s.top(); s.pop();
            s.push(a == b);
        }
    }
    if (s.size() == 1)
    {
        return s.top();
    }
    else
    {
        throw std::overflow_error("Illegal Expression!");
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdi
movaps %xmm0, 0x40(%rdi)
movaps %xmm0, 0x30(%rdi)
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
xorl %esi, %esi
callq 0x4e40
cmpl $0x0, 0x8(%r14)
jle 0x36b8
leaq 0xf(%rsp), %r12
xorl %r15d, %r15d
movq (%r14), %r13
movsbl (%r13,%r15), %ebp
movl %ebp, %edi
callq 0x2210
testl %eax, %eax
je 0x316a
addq %r15, %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x4428
cmpl $0x0, (%rax)
setne 0xf(%rsp)
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x51c0
incq %r15
movslq 0x8(%r14), %rax
cmpq %rax, %r15
jl 0x3122
jmp 0x36b8
movzbl %bpl, %eax
cmpl $0x3c, %eax
jg 0x323a
leal -0x26(%rax), %ecx
cmpl $0x7, %ecx
ja 0x32f3
leaq 0x2e7a(%rip), %rdx      # 0x6004
movslq (%rdx,%rcx,4), %rax
addq %rdx, %rax
jmpq *%rax
movq 0x58(%rsp), %rcx
movq %rcx, %rdx
subq 0x38(%rsp), %rdx
shrq $0x3, %rdx
cmpq $0x1, %rcx
adcq $-0x1, %rdx
shlq $0x9, %rdx
movq 0x40(%rsp), %rax
movq 0x48(%rsp), %rdi
movq %rax, %rsi
subq %rdi, %rsi
addq 0x30(%rsp), %rsi
addq %rdx, %rsi
subq 0x20(%rsp), %rsi
cmpq $0x1, %rsi
jbe 0x3724
cmpq %rdi, %rax
je 0x349f
movb -0x1(%rax), %bpl
decq %rax
movq %rax, 0x40(%rsp)
cmpq %rdi, %rax
jne 0x34df
movq -0x8(%rcx), %rax
movb 0x1ff(%rax), %r13b
movl $0x200, %esi            # imm = 0x200
callq 0x2180
movq 0x58(%rsp), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x58(%rsp)
movq -0x8(%rax), %rax
movq %rax, 0x48(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0x50(%rsp)
movl $0x1ff, %ecx            # imm = 0x1FF
addq %rcx, %rax
jmp 0x34e6
cmpl $0x3d, %eax
je 0x33f8
cmpl $0x7c, %eax
jne 0x3159
movq 0x58(%rsp), %rcx
movq %rcx, %rdx
subq 0x38(%rsp), %rdx
shrq $0x3, %rdx
cmpq $0x1, %rcx
adcq $-0x1, %rdx
shlq $0x9, %rdx
movq 0x40(%rsp), %rax
movq 0x48(%rsp), %rdi
movq %rax, %rsi
subq %rdi, %rsi
addq 0x30(%rsp), %rsi
addq %rdx, %rsi
subq 0x20(%rsp), %rsi
cmpq $0x1, %rsi
jbe 0x3745
cmpq %rdi, %rax
je 0x3510
movb -0x1(%rax), %bpl
decq %rax
movq %rax, 0x40(%rsp)
cmpq %rdi, %rax
jne 0x3550
movq -0x8(%rcx), %rax
movb 0x1ff(%rax), %r13b
movl $0x200, %esi            # imm = 0x200
callq 0x2180
movq 0x58(%rsp), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x58(%rsp)
movq -0x8(%rax), %rax
movq %rax, 0x48(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0x50(%rsp)
movl $0x1ff, %ecx            # imm = 0x1FF
addq %rcx, %rax
jmp 0x3557
cmpl $0x21, %eax
jne 0x3159
movq 0x58(%rsp), %rcx
movq %rcx, %rdx
subq 0x38(%rsp), %rdx
shrq $0x3, %rdx
cmpq $0x1, %rcx
adcq $-0x1, %rdx
movq 0x40(%rsp), %rax
movq 0x48(%rsp), %rdi
movq %rax, %rsi
subq %rdi, %rsi
addq 0x30(%rsp), %rsi
shlq $0x9, %rdx
addq %rdx, %rsi
cmpq 0x20(%rsp), %rsi
je 0x37d4
cmpq %rdi, %rax
je 0x3658
movb -0x1(%rax), %bpl
decq %rax
jmp 0x3698
movq 0x58(%rsp), %rcx
movq %rcx, %rdx
subq 0x38(%rsp), %rdx
shrq $0x3, %rdx
cmpq $0x1, %rcx
adcq $-0x1, %rdx
shlq $0x9, %rdx
movq 0x40(%rsp), %rax
movq 0x48(%rsp), %rdi
movq %rax, %rsi
subq %rdi, %rsi
addq 0x30(%rsp), %rsi
addq %rdx, %rsi
subq 0x20(%rsp), %rsi
cmpq $0x1, %rsi
jbe 0x3798
cmpq %rdi, %rax
je 0x3581
movb -0x1(%rax), %bpl
decq %rax
movq %rax, 0x40(%rsp)
cmpq %rdi, %rax
jne 0x35c1
movq -0x8(%rcx), %rax
movb 0x1ff(%rax), %r13b
movl $0x200, %esi            # imm = 0x200
callq 0x2180
movq 0x58(%rsp), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x58(%rsp)
movq -0x8(%rax), %rax
movq %rax, 0x48(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0x50(%rsp)
movl $0x1ff, %ecx            # imm = 0x1FF
addq %rcx, %rax
jmp 0x35c8
movq 0x58(%rsp), %rcx
movq %rcx, %rdx
subq 0x38(%rsp), %rdx
shrq $0x3, %rdx
cmpq $0x1, %rcx
adcq $-0x1, %rdx
shlq $0x9, %rdx
movq 0x40(%rsp), %rax
movq 0x48(%rsp), %rdi
movq %rax, %rsi
subq %rdi, %rsi
addq 0x30(%rsp), %rsi
addq %rdx, %rsi
subq 0x20(%rsp), %rsi
cmpq $0x1, %rsi
jbe 0x37b6
cmpq %rdi, %rax
je 0x35f2
movb -0x1(%rax), %bpl
decq %rax
movq %rax, 0x40(%rsp)
cmpq %rdi, %rax
jne 0x3632
movq -0x8(%rcx), %rax
movb 0x1ff(%rax), %r13b
movl $0x200, %esi            # imm = 0x200
callq 0x2180
movq 0x58(%rsp), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x58(%rsp)
movq -0x8(%rax), %rax
movq %rax, 0x48(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0x50(%rsp)
movl $0x1ff, %ecx            # imm = 0x1FF
addq %rcx, %rax
jmp 0x3639
movq -0x8(%rcx), %rax
movb 0x1ff(%rax), %bpl
movl $0x200, %esi            # imm = 0x200
callq 0x2180
movq 0x58(%rsp), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x58(%rsp)
movq -0x8(%rax), %rax
movq %rax, 0x48(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0x50(%rsp)
movl $0x1ff, %ecx            # imm = 0x1FF
addq %rcx, %rax
movb -0x1(%rax), %r13b
decq %rax
movq %rax, 0x40(%rsp)
movzbl %r13b, %eax
testb %bpl, %bpl
movl $0x0, %ecx
cmovel %ecx, %eax
movb %al, 0xf(%rsp)
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x51c0
jmp 0x3159
movq -0x8(%rcx), %rax
movb 0x1ff(%rax), %bpl
movl $0x200, %esi            # imm = 0x200
callq 0x2180
movq 0x58(%rsp), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x58(%rsp)
movq -0x8(%rax), %rax
movq %rax, 0x48(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0x50(%rsp)
movl $0x1ff, %ecx            # imm = 0x1FF
addq %rcx, %rax
movb -0x1(%rax), %r13b
decq %rax
movq %rax, 0x40(%rsp)
movzbl %r13b, %eax
testb %bpl, %bpl
movl $0x1, %ecx
cmovnel %ecx, %eax
movb %al, 0xf(%rsp)
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x51c0
jmp 0x3159
movq -0x8(%rcx), %rax
movb 0x1ff(%rax), %bpl
movl $0x200, %esi            # imm = 0x200
callq 0x2180
movq 0x58(%rsp), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x58(%rsp)
movq -0x8(%rax), %rax
movq %rax, 0x48(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0x50(%rsp)
movl $0x1ff, %ecx            # imm = 0x1FF
addq %rcx, %rax
movb -0x1(%rax), %r13b
decq %rax
movq %rax, 0x40(%rsp)
movzbl %r13b, %eax
testb %bpl, %bpl
movl $0x1, %ecx
cmovel %ecx, %eax
movb %al, 0xf(%rsp)
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x51c0
jmp 0x3159
movq -0x8(%rcx), %rax
movb 0x1ff(%rax), %bpl
movl $0x200, %esi            # imm = 0x200
callq 0x2180
movq 0x58(%rsp), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x58(%rsp)
movq -0x8(%rax), %rax
movq %rax, 0x48(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0x50(%rsp)
movl $0x1ff, %ecx            # imm = 0x1FF
addq %rcx, %rax
movb -0x1(%rax), %r13b
decq %rax
movq %rax, 0x40(%rsp)
cmpb %r13b, %bpl
sete 0xf(%rsp)
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x51c0
jmp 0x3159
movq -0x8(%rcx), %rax
movb 0x1ff(%rax), %bpl
movl $0x200, %esi            # imm = 0x200
callq 0x2180
movq 0x58(%rsp), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x58(%rsp)
movq -0x8(%rax), %rax
movq %rax, 0x48(%rsp)
leaq 0x200(%rax), %rcx
movq %rcx, 0x50(%rsp)
movl $0x1ff, %ecx            # imm = 0x1FF
addq %rcx, %rax
movq %rax, 0x40(%rsp)
xorb $0x1, %bpl
movb %bpl, 0xf(%rsp)
leaq 0x10(%rsp), %rdi
movq %r12, %rsi
callq 0x51c0
jmp 0x3159
movq 0x58(%rsp), %rax
movq %rax, %rsi
subq 0x38(%rsp), %rsi
shrq $0x3, %rsi
cmpq $0x1, %rax
adcq $-0x1, %rsi
shlq $0x9, %rsi
movq 0x40(%rsp), %rcx
movq 0x48(%rsp), %rdx
movq %rcx, %rdi
subq %rdx, %rdi
addq 0x30(%rsp), %rdi
addq %rsi, %rdi
subq 0x20(%rsp), %rdi
cmpq $0x1, %rdi
jne 0x3766
cmpq %rdx, %rcx
jne 0x3706
movl $0x200, %ecx            # imm = 0x200
addq -0x8(%rax), %rcx
movb -0x1(%rcx), %bl
leaq 0x10(%rsp), %rdi
callq 0x4854
movl %ebx, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x20b0
movq %rax, %rbx
leaq 0x2956(%rip), %rsi      # 0x608e
movq %rax, %rdi
callq 0x2050
jmp 0x37f0
movl $0x10, %edi
callq 0x20b0
movq %rax, %rbx
leaq 0x2935(%rip), %rsi      # 0x608e
movq %rax, %rdi
callq 0x2050
jmp 0x37f0
movl $0x10, %edi
callq 0x20b0
movq %rax, %rbx
leaq 0x2914(%rip), %rsi      # 0x608e
movq %rax, %rdi
callq 0x2050
movq 0x582f(%rip), %rsi      # 0x8fb8
movq 0x5820(%rip), %rdx      # 0x8fb0
movq %rbx, %rdi
callq 0x2240
movl $0x10, %edi
callq 0x20b0
movq %rax, %rbx
leaq 0x28e2(%rip), %rsi      # 0x608e
movq %rax, %rdi
callq 0x2050
jmp 0x37f0
movl $0x10, %edi
callq 0x20b0
movq %rax, %rbx
leaq 0x28c4(%rip), %rsi      # 0x608e
movq %rax, %rdi
callq 0x2050
jmp 0x37f0
movl $0x10, %edi
callq 0x20b0
movq %rax, %rbx
leaq 0x28a6(%rip), %rsi      # 0x608e
movq %rax, %rdi
callq 0x2050
movq 0x57c1(%rip), %rsi      # 0x8fb8
movq 0x57b2(%rip), %rdx      # 0x8fb0
movq %rbx, %rdi
callq 0x2240
jmp 0x3816
jmp 0x3816
jmp 0x3816
jmp 0x382b
jmp 0x3816
jmp 0x382b
jmp 0x382b
jmp 0x3816
movq %rax, %r14
movq %rbx, %rdi
callq 0x2110
jmp 0x382e
jmp 0x382b
jmp 0x382b
jmp 0x382b
jmp 0x382b
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x4854
movq %r14, %rdi
callq 0x2270