// File: WayfireWM[P]wf-utils/wayfire/lexer/symbol.cpp
// Function: wf::to_string[abi:cxx11](wf::symbol_t const&)
std::string to_string(const symbol_t &s)
{
    std::string out = "Symbol [";
    switch (s.type)
    {
    case symbol_t::type_t::END:
        out.append("END");
        break;
    case symbol_t::type_t::IDENTIFIER:
        out.append("Identifier: ").append(get_string(s.value));
        break;
    case symbol_t::type_t::LITERAL:
        out.append("Literal: [");
        out.append(to_string(s.value));
        out.append("]");
        break;
    case symbol_t::type_t::OPERATOR:
        out.append("Operator: ").append(get_string(s.value));
        break;
    case symbol_t::type_t::KEYWORD:
        out.append("Keyword: ").append(get_string(s.value));
        break;
    case symbol_t::type_t::STRUCTURAL:
        out.append("Structural: ").append(get_string(s.value));
        break;
    case symbol_t::type_t::SIGNAL:
        out.append("Signal: ").append(get_string(s.value));
        break;
    }
    out.append("]");
    return out;
}

// Assembly:
subq $0x138, %rsp            # imm = 0x138
movq %rdi, 0x40(%rsp)
movq %rdi, %rax
movq %rax, 0x38(%rsp)
movq %rdi, 0x130(%rsp)
movq %rsi, 0x128(%rsp)
movb $0x0, 0x127(%rsp)
leaq 0x126(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0x6500
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rdx
leaq 0xcd38(%rip), %rsi      # 0x1f5c7
callq 0x8280
jmp 0x12896
leaq 0x126(%rsp), %rdi
callq 0x6360
movq 0x128(%rsp), %rax
movl (%rax), %eax
movq %rax, 0x30(%rsp)
subq $0x6, %rax
ja 0x12c12
movq 0x30(%rsp), %rax
leaq 0xcc5c(%rip), %rcx      # 0x1f524
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
leaq 0x126(%rsp), %rdi
callq 0x6360
jmp 0x12c58
movq 0x40(%rsp), %rdi
leaq 0xcccd(%rip), %rsi      # 0x1f5d0
callq 0x6540
jmp 0x1290a
jmp 0x12c12
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
jmp 0x12c4e
movq 0x40(%rsp), %rdi
leaq 0xcca0(%rip), %rsi      # 0x1f5d4
callq 0x6540
movq %rax, 0x28(%rsp)
jmp 0x12940
movq 0x128(%rsp), %rsi
addq $0x8, %rsi
leaq 0xf0(%rsp), %rdi
callq 0x1bea0
jmp 0x1295b
movq 0x28(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
callq 0x6560
jmp 0x1296f
leaq 0xf0(%rsp), %rdi
callq 0x61d0
jmp 0x12c12
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
leaq 0xf0(%rsp), %rdi
callq 0x61d0
jmp 0x12c4e
movq 0x40(%rsp), %rdi
leaq 0xcc2e(%rip), %rsi      # 0x1f5e1
callq 0x6540
jmp 0x129ba
movq 0x128(%rsp), %rsi
addq $0x8, %rsi
leaq 0xd0(%rsp), %rdi
callq 0x1bef0
jmp 0x129d5
movq 0x40(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x6560
jmp 0x129e9
leaq 0xd0(%rsp), %rdi
callq 0x61d0
movq 0x40(%rsp), %rdi
leaq 0xc61b(%rip), %rsi      # 0x1f01d
callq 0x6540
jmp 0x12a09
jmp 0x12c12
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
leaq 0xd0(%rsp), %rdi
callq 0x61d0
jmp 0x12c4e
movq 0x40(%rsp), %rdi
leaq 0xcbac(%rip), %rsi      # 0x1f5ec
callq 0x6540
movq %rax, 0x20(%rsp)
jmp 0x12a4c
movq 0x128(%rsp), %rsi
addq $0x8, %rsi
leaq 0xb0(%rsp), %rdi
callq 0x1bea0
jmp 0x12a67
movq 0x20(%rsp), %rdi
leaq 0xb0(%rsp), %rsi
callq 0x6560
jmp 0x12a7b
leaq 0xb0(%rsp), %rdi
callq 0x61d0
jmp 0x12c12
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0x61d0
jmp 0x12c4e
movq 0x40(%rsp), %rdi
leaq 0xcb38(%rip), %rsi      # 0x1f5f7
callq 0x6540
movq %rax, 0x18(%rsp)
jmp 0x12acb
movq 0x128(%rsp), %rsi
addq $0x8, %rsi
leaq 0x90(%rsp), %rdi
callq 0x1bea0
jmp 0x12ae6
movq 0x18(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x6560
jmp 0x12afa
leaq 0x90(%rsp), %rdi
callq 0x61d0
jmp 0x12c12
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
leaq 0x90(%rsp), %rdi
callq 0x61d0
jmp 0x12c4e
movq 0x40(%rsp), %rdi
leaq 0xcac3(%rip), %rsi      # 0x1f601
callq 0x6540
movq %rax, 0x10(%rsp)
jmp 0x12b4a
movq 0x128(%rsp), %rsi
addq $0x8, %rsi
leaq 0x70(%rsp), %rdi
callq 0x1bea0
jmp 0x12b62
movq 0x10(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x6560
jmp 0x12b73
leaq 0x70(%rsp), %rdi
callq 0x61d0
jmp 0x12c12
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x61d0
jmp 0x12c4e
movq 0x40(%rsp), %rdi
leaq 0xca5d(%rip), %rsi      # 0x1f60e
callq 0x6540
movq %rax, 0x8(%rsp)
jmp 0x12bbd
movq 0x128(%rsp), %rsi
addq $0x8, %rsi
leaq 0x50(%rsp), %rdi
callq 0x1bea0
jmp 0x12bd5
movq 0x8(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x6560
jmp 0x12be6
leaq 0x50(%rsp), %rdi
callq 0x61d0
jmp 0x12c12
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x118(%rsp)
movl %eax, 0x114(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x61d0
jmp 0x12c4e
movq 0x40(%rsp), %rdi
leaq 0xc3ff(%rip), %rsi      # 0x1f01d
callq 0x6540
jmp 0x12c25
movb $0x1, 0x127(%rsp)
testb $0x1, 0x127(%rsp)
jne 0x12c41
movq 0x40(%rsp), %rdi
callq 0x61d0
movq 0x38(%rsp), %rax
addq $0x138, %rsp            # imm = 0x138
retq
movq 0x40(%rsp), %rdi
callq 0x61d0
movq 0x118(%rsp), %rdi
callq 0x64f0
nopw %cs:(%rax,%rax)
nop