// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/value.c
// Function: value_to_str_debug
const char* value_to_str_debug(Value v) {
    static char str[UINT8_MAX + 1] = "";
    memset(str, 0, UINT8_MAX + 1);

    switch (v.type) {
        case VAL_BOOL:
            snprintf(str, UINT8_MAX, "boolean (%s)",
                     v.as.boolean ? "true" : "false");
            break;
        case VAL_NIL:
            snprintf(str, UINT8_MAX, "nil");
            break;
        case VAL_NUMBER:
            snprintf(str, UINT8_MAX, "number (%g)", v.as.number);
            break;
        case VAL_OBJ:
            switch (AS_OBJ(v)->type) {
                case OBJ_STRING:
                    snprintf(str, UINT8_MAX, "string (\"%.*s\")",
                             (int)AS_STRING(v)->len, AS_CSTRING(v));
                    break;
                case OBJ_FUNCTION:
                    snprintf(str, UINT8_MAX, "function (fn@%.*s)",
                             (int)AS_FN(v)->name_len, AS_FN(v)->name);
                    break;
                case OBJ_NATIVE:
                    snprintf(str, UINT8_MAX, "fn@<native>");
                    break;
            }
            break;
    }
    return str;
}

// Assembly:
subq $0x38, %rsp
movl %edi, 0x28(%rsp)
movq %rsi, 0x30(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, 0x9924(%rip)     # 0x10410
movaps %xmm0, 0x990d(%rip)     # 0x10400
movaps %xmm0, 0x98f6(%rip)     # 0x103f0
movaps %xmm0, 0x98df(%rip)     # 0x103e0
movaps %xmm0, 0x98c8(%rip)     # 0x103d0
movaps %xmm0, 0x98b1(%rip)     # 0x103c0
movaps %xmm0, 0x989a(%rip)     # 0x103b0
movaps %xmm0, 0x9883(%rip)     # 0x103a0
movaps %xmm0, 0x986c(%rip)     # 0x10390
movaps %xmm0, 0x9855(%rip)     # 0x10380
movaps %xmm0, 0x983e(%rip)     # 0x10370
movaps %xmm0, 0x9827(%rip)     # 0x10360
movaps %xmm0, 0x9810(%rip)     # 0x10350
movaps %xmm0, 0x97f9(%rip)     # 0x10340
movaps %xmm0, 0x97e2(%rip)     # 0x10330
movaps %xmm0, 0x97cb(%rip)     # 0x10320
movl 0x28(%rsp), %eax
movq %rax, 0x20(%rsp)
subq $0x3, %rax
ja 0x6c9c
movq 0x20(%rsp), %rax
leaq 0x52ec(%rip), %rcx      # 0xbe60
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb 0x30(%rsp), %dl
leaq 0x5313(%rip), %rcx      # 0xbe9b
leaq 0x5307(%rip), %rax      # 0xbe96
testb $0x1, %dl
cmovneq %rax, %rcx
leaq 0x9783(%rip), %rdi      # 0x10320
movl $0xff, %esi
leaq 0x5313(%rip), %rdx      # 0xbebc
movb $0x0, %al
callq 0x10c0
jmp 0x6c9c
leaq 0x9764(%rip), %rdi      # 0x10320
movl $0xff, %esi
leaq 0x52d9(%rip), %rdx      # 0xbea1
movb $0x0, %al
callq 0x10c0
jmp 0x6c9c
movsd 0x30(%rsp), %xmm0
leaq 0x973f(%rip), %rdi      # 0x10320
movl $0xff, %esi
leaq 0x52dc(%rip), %rdx      # 0xbec9
movb $0x1, %al
callq 0x10c0
jmp 0x6c9c
movq 0x30(%rsp), %rax
movl (%rax), %eax
movl %eax, 0xc(%rsp)
testl %eax, %eax
je 0x6c20
jmp 0x6c0a
movl 0xc(%rsp), %eax
subl $0x1, %eax
je 0x6c50
jmp 0x6c15
movl 0xc(%rsp), %eax
subl $0x2, %eax
je 0x6c80
jmp 0x6c9a
movq 0x30(%rsp), %rax
movq 0x10(%rax), %rax
movl %eax, %ecx
movq 0x30(%rsp), %r8
addq $0x18, %r8
leaq 0x96e5(%rip), %rdi      # 0x10320
movl $0xff, %esi
leaq 0x528e(%rip), %rdx      # 0xbed5
movb $0x0, %al
callq 0x10c0
jmp 0x6c9a
movq 0x30(%rsp), %rax
movq 0x30(%rax), %rax
movl %eax, %ecx
movq 0x30(%rsp), %r8
addq $0x38, %r8
leaq 0x96b5(%rip), %rdi      # 0x10320
movl $0xff, %esi
leaq 0x526e(%rip), %rdx      # 0xbee5
movb $0x0, %al
callq 0x10c0
jmp 0x6c9a
leaq 0x9699(%rip), %rdi      # 0x10320
movl $0xff, %esi
leaq 0x521d(%rip), %rdx      # 0xbeb0
movb $0x0, %al
callq 0x10c0
jmp 0x6c9c
leaq 0x967d(%rip), %rax      # 0x10320
addq $0x38, %rsp
retq
nopl (%rax,%rax)