// File: /workspace/github_cpp_makefile_star2_O1/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
movq %rdi, %rbx
leaq 0x10(%rdi), %r13
movq %r13, (%rdi)
leaq 0x2712(%rip), %rsi      # 0xdc4c
leaq 0x271b(%rip), %rdx      # 0xdc5c
callq 0x6382
movzbl 0x20(%r15), %eax
cmpq $0x5, %rax
ja 0xb7e2
leaq 0x26d8(%rip), %rcx      # 0xdc34
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x26f1(%rip), %rsi      # 0xdc5d
movq %rbx, %rdi
callq 0x53b0
movq %rax, 0x30(%rsp)
movq %r15, %rdi
callq 0x6f71
movl (%rax), %r15d
movl %r15d, %ebp
negl %ebp
cmovsl %r15d, %ebp
movl $0x1, %r12d
cmpl $0xa, %ebp
jb 0xb7fc
movl $0x4, %r12d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0xb7f3
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0xb7f9
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0xb7fc
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r12d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0xb5a9
addl $-0x3, %r12d
jmp 0xb7fc
leaq 0x26a3(%rip), %rsi      # 0xdc95
movq %rbx, %rdi
callq 0x53b0
movq %rax, %r14
movq %r15, %rdi
callq 0x7175
vmovsd (%rax), %xmm0
movq 0x8998(%rip), %rsi      # 0x13fa8
leaq 0x26ae(%rip), %rcx      # 0xdcc5
leaq 0x10(%rsp), %rdi
movl $0x148, %edx            # imm = 0x148
movb $0x1, %al
callq 0xb970
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %r14, %rdi
callq 0x5090
jmp 0xb7d2
leaq 0x2632(%rip), %rsi      # 0xdc78
movq %rbx, %rdi
callq 0x53b0
movq %rax, %r14
movq %r15, %rdi
callq 0x7077
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 0xb903
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %r14, %rdi
callq 0x5090
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
jne 0xb84c
jmp 0xb859
leaq 0x25d3(%rip), %rsi      # 0xdc86
movq %rbx, %rdi
callq 0x53b0
movq %rax, %r14
movq %r15, %rdi
callq 0x70f6
vcvtss2sd (%rax), %xmm0, %xmm0
movq 0x88d7(%rip), %rsi      # 0x13fa8
leaq 0x25ed(%rip), %rcx      # 0xdcc5
leaq 0x10(%rsp), %rdi
movl $0x3a, %edx
movb $0x1, %al
callq 0xb970
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %r14, %rdi
callq 0x5090
jmp 0xb7d2
leaq 0x2563(%rip), %rsi      # 0xdc6a
movq %rbx, %rdi
callq 0x53b0
movq %rax, %r14
movq %r13, 0x8(%rsp)
movq %r15, %rdi
callq 0x7003
movsbl (%rax), %r13d
movl %r13d, %ebp
negl %ebp
cmovsl %r13d, %ebp
cmpl $0x64, %ebp
movl $0x3, %eax
sbbl $0x0, %eax
cmpl $0xa, %ebp
movl $0x1, %r15d
cmovael %eax, %r15d
shrl $0x1f, %r13d
leal (%r15,%r13), %esi
leaq 0x20(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x10(%rsp), %rdi
movl $0x2d, %edx
callq 0x5290
movl %r13d, %edi
addq 0x10(%rsp), %rdi
movl %r15d, %esi
movl %ebp, %edx
callq 0xb903
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %r14, %rdi
callq 0x5090
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
movq 0x8(%rsp), %r13
jne 0xb84c
jmp 0xb859
leaq 0x24fd(%rip), %rsi      # 0xdca5
movq %rbx, %rdi
callq 0x53b0
movq %rax, %r14
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0xb4ee
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %r14, %rdi
callq 0x5090
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0xb84c
jmp 0xb859
leaq 0x24cc(%rip), %rsi      # 0xdcb5
movq %rbx, %rdi
callq 0x53b0
jmp 0xb859
addl $-0x2, %r12d
jmp 0xb7fc
decl %r12d
shrl $0x1f, %r15d
leal (%r12,%r15), %esi
leaq 0x20(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x10(%rsp), %rdi
movl $0x2d, %edx
callq 0x5290
addq 0x10(%rsp), %r15
movq %r15, %rdi
movl %r12d, %esi
movl %ebp, %edx
callq 0xb903
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x30(%rsp), %rdi
callq 0x5090
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
je 0xb859
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x5230
leaq 0x17bd(%rip), %rsi      # 0xd01d
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 %r13, 0x8(%rsp)
movq %rax, %r15
movq 0x10(%rsp), %rdi
cmpq %r14, %rdi
jne 0xb8be
jmp 0xb8e1
jmp 0xb897
jmp 0xb8a8
movq %r13, 0x8(%rsp)
movq %rax, %r15
movq 0x10(%rsp), %rdi
cmpq %r12, %rdi
jne 0xb8be
jmp 0xb8e1
jmp 0xb8a8
movq %r13, 0x8(%rsp)
movq %rax, %r15
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb8e1
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x5230
jmp 0xb8e1
jmp 0xb8d9
jmp 0xb8d9
jmp 0xb8de
jmp 0xb8d9
jmp 0xb8d9
jmp 0xb8d9
movq %r13, 0x8(%rsp)
movq %rax, %r15
movq (%rbx), %rdi
cmpq 0x8(%rsp), %rdi
je 0xb8fb
movq 0x8(%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x5230
movq %r15, %rdi
callq 0x5390