// File: /workspace/github_cpp_makefile_star2_O3/WayfireWM[P]wf-utils/wayfire/variant.cpp
// Function: wf::to_string(std::variant<int, char, bool, float, double, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>> const&)
std::string to_string(const variant_t &v)
{
    std::string out = "variant: [type: ";
    if (is_int(v))
    {
        out.append("int, value: ").append(std::to_string(get_int(v)));
    }
    else if (is_char(v))
    {
        out.append("char, value: ").append(std::to_string(get_char(v)));
    }
    else if (is_bool(v))
    {
        out.append("bool, value: ").append(std::to_string(static_cast<unsigned int>(get_bool(v))));
    }
    else if (is_float(v))
    {
        out.append("float, value: ").append(std::to_string(get_float(v)));
    }
    else if (is_double(v))
    {
        out.append("double, value: ").append(std::to_string(get_double(v)));
    }
    else if (is_string(v))
    {
        out.append("string, value: ").append(get_string(v));
    }
    else
    {
        out.append("invalid. WTF?!?");
    }

    out.append("]");
    return out;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r15
leaq 0x10(%rdi), %r13
leaq 0x18a2(%rip), %rsi      # 0xcc34
leaq 0x18ab(%rip), %rdx      # 0xcc44
movq %rdi, %rbx
movq %r13, (%rdi)
callq 0x6386
movzbl 0x20(%r15), %eax
cmpq $0x5, %rax
ja 0xb637
leaq 0x1862(%rip), %rcx      # 0xcc1c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x187b(%rip), %rsi      # 0xcc45
movq %rbx, %rdi
callq 0x53b0
movq %rax, 0x30(%rsp)
movq %r15, %rdi
callq 0x6f7b
movl (%rax), %r15d
movl $0x1, %r12d
movl %r15d, %ebp
negl %ebp
cmovsl %r15d, %ebp
cmpl $0xa, %ebp
jb 0xb651
movl $0x4, %r12d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0xb648
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0xb64e
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0xb651
movl %ecx, %edx
imulq %rax, %rdx
addl $0x4, %r12d
shrq $0x2d, %rdx
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0xb407
addl $-0x3, %r12d
jmp 0xb651
leaq 0x182d(%rip), %rsi      # 0xcc7d
movq %rbx, %rdi
callq 0x53b0
movq %r15, %rdi
movq %rax, %r14
callq 0x717f
vmovsd (%rax), %xmm0
movq 0x7b3a(%rip), %rsi      # 0x12fa8
leaq 0x1838(%rip), %rcx      # 0xccad
leaq 0x10(%rsp), %rdi
movl $0x148, %edx            # imm = 0x148
movb $0x1, %al
callq 0xb7c5
movq 0x18(%rsp), %rdx
movq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x5090
jmp 0xb627
leaq 0x17bc(%rip), %rsi      # 0xcc60
movq %rbx, %rdi
callq 0x53b0
movq %r15, %rdi
movq %rax, %r14
callq 0x7081
movzbl (%rax), %ebp
leaq 0x20(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x10(%rsp), %rdi
movl $0x1, %esi
xorl %edx, %edx
callq 0x5290
movq 0x10(%rsp), %rdi
movl 0x18(%rsp), %esi
movl %ebp, %edx
callq 0xb758
movq 0x18(%rsp), %rdx
movq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x5090
movq 0x10(%rsp), %rdi
jmp 0xb5e8
leaq 0x1766(%rip), %rsi      # 0xcc6e
movq %rbx, %rdi
callq 0x53b0
movq %r15, %rdi
movq %rax, %r14
callq 0x7100
vcvtss2sd (%rax), %xmm0, %xmm0
movq 0x7a82(%rip), %rsi      # 0x12fa8
leaq 0x1780(%rip), %rcx      # 0xccad
leaq 0x10(%rsp), %rdi
movl $0x3a, %edx
movb $0x1, %al
callq 0xb7c5
movq 0x18(%rsp), %rdx
movq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x5090
jmp 0xb627
leaq 0x16f6(%rip), %rsi      # 0xcc52
movq %rbx, %rdi
callq 0x53b0
movq %r15, %rdi
movq %rax, %r14
movq %r13, 0x8(%rsp)
callq 0x700d
movsbl (%rax), %r13d
movl $0x3, %eax
movl $0x1, %r15d
leaq 0x20(%rsp), %r12
movq %r12, -0x10(%r12)
movl %r13d, %ebp
negl %ebp
cmovsl %r13d, %ebp
cmpl $0x64, %ebp
sbbl $0x0, %eax
cmpl $0xa, %ebp
cmovael %eax, %r15d
shrl $0x1f, %r13d
leal (%r15,%r13), %esi
leaq 0x10(%rsp), %rdi
movl $0x2d, %edx
callq 0x5290
movl %r13d, %edi
addq 0x10(%rsp), %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0xb758
movq 0x18(%rsp), %rdx
movq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x5090
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %r13
cmpq %r12, %rdi
jne 0xb6a1
jmp 0xb6ae
leaq 0x1690(%rip), %rsi      # 0xcc8d
movq %rbx, %rdi
callq 0x53b0
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
movq %rax, %r14
callq 0xb34c
movq 0x18(%rsp), %rdx
movq 0x10(%rsp), %rsi
movq %r14, %rdi
callq 0x5090
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0xb6a1
jmp 0xb6ae
leaq 0x165f(%rip), %rsi      # 0xcc9d
movq %rbx, %rdi
callq 0x53b0
jmp 0xb6ae
addl $-0x2, %r12d
jmp 0xb651
decl %r12d
shrl $0x1f, %r15d
leaq 0x20(%rsp), %r14
leal (%r12,%r15), %esi
movq %r14, -0x10(%r14)
leaq 0x10(%rsp), %rdi
movl $0x2d, %edx
callq 0x5290
addq 0x10(%rsp), %r15
movl %r12d, %esi
movl %ebp, %edx
movq %r15, %rdi
callq 0xb758
movq 0x18(%rsp), %rdx
movq 0x10(%rsp), %rsi
movq 0x30(%rsp), %rdi
callq 0x5090
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0xb6ae
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x5230
leaq 0x968(%rip), %rsi       # 0xc01d
movq %rbx, %rdi
callq 0x53b0
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rsp), %rdi
movq %r13, 0x8(%rsp)
movq %rax, %r15
cmpq %r14, %rdi
jne 0xb713
jmp 0xb736
jmp 0xb6ec
jmp 0xb6fd
movq %r13, 0x8(%rsp)
movq 0x10(%rsp), %rdi
movq %rax, %r15
cmpq %r12, %rdi
jne 0xb713
jmp 0xb736
jmp 0xb6fd
leaq 0x20(%rsp), %rcx
movq %r13, 0x8(%rsp)
movq %rax, %r15
movq -0x10(%rcx), %rdi
cmpq %rcx, %rdi
je 0xb736
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x5230
jmp 0xb736
jmp 0xb72e
jmp 0xb72e
jmp 0xb733
jmp 0xb72e
jmp 0xb72e
jmp 0xb72e
movq %r13, 0x8(%rsp)
movq %rax, %r15
movq (%rbx), %rdi
cmpq 0x8(%rsp), %rdi
je 0xb750
movq 0x8(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x5230
movq %r15, %rdi
callq 0x5390