// File: /workspace/github_c_makefile_star2_O1/mahrr[P]raven/src/object.c
// Function: object_print
void object_print(Value value) {
    switch (Obj_Type(value)) {
    case OBJ_STRING: {
        RavString *string = As_String(value);
        printf("%.*s", string->length, string->chars);
        break;
    }
    case OBJ_PAIR: {
        putchar('(');
        print_pair(As_Pair(value));
        putchar(')');
        break;
    }
    case OBJ_ARRAY: {
        print_array(As_Array(value));
        break;
    }
    case OBJ_MAP: {
        print_map(As_Map(value));
        break;
    }
    case OBJ_FUNCTION: {
        print_function(As_Function(value));
        break;
    }
    case OBJ_UPVALUE: {
        printf("<upvalue>");
        break;
    }
    case OBJ_CLOSURE: {
        print_function(As_Closure(value)->function);
        break;
    }
    case OBJ_CFUNCTION: {
        printf("<native @ %p>", As_CFunction(value)->func);
        break;
    }
    default:
        assert(!"invalid object type");
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movabsq $0x3ffffffffffff, %rbx  # imm = 0x3FFFFFFFFFFFF
andq %rdi, %rbx
movl (%rbx), %eax
cmpq $0x7, %rax
ja 0x588b
leaq 0x5f2e(%rip), %rcx      # 0xb5f8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x10(%rbx), %esi
movq 0x18(%rbx), %rdx
leaq 0x5f37(%rip), %rdi      # 0xb618
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x20b0
movq %rbx, %rdi
jmp 0x5878
movl $0x5b, %edi
callq 0x2040
movq 0x18(%rbx), %rax
cmpl $0x2, %eax
jl 0x5744
leaq 0x5fca(%rip), %r14      # 0xb6e2
xorl %r15d, %r15d
movq 0x10(%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0x5cd4
movq %r14, %rdi
xorl %eax, %eax
callq 0x20b0
incq %r15
movq 0x18(%rbx), %rax
leal -0x1(%rax), %ecx
movslq %ecx, %rcx
cmpq %rcx, %r15
jl 0x571b
testq %rax, %rax
je 0x5757
movq 0x10(%rbx), %rcx
movq -0x8(%rcx,%rax,8), %rdi
callq 0x5cd4
movl $0x5d, %edi
jmp 0x5845
movabsq $-0x4000000000000, %r14 # imm = 0xFFFC000000000000
movl $0x7b, %edi
callq 0x2040
movq 0x10(%rbx), %r12
movslq 0x1c(%rbx), %rax
movq %rax, (%rsp)
testq %rax, %rax
jle 0x57d7
movq (%rsp), %rbp
shlq $0x4, %rbp
leaq 0x5f54(%rip), %rbx      # 0xb6e9
leaq 0x5f46(%rip), %r15      # 0xb6e2
xorl %r13d, %r13d
movq (%r12,%r13), %rdi
testq %rdi, %rdi
je 0x57ce
orq %r14, %rdi
callq 0x569f
movq %rbx, %rdi
xorl %eax, %eax
callq 0x20b0
movq 0x8(%r12,%r13), %rdi
callq 0x5cd4
movq %r15, %rdi
xorl %eax, %eax
callq 0x20b0
addq $0x10, %r13
cmpq %r13, %rbp
jne 0x579f
movq (%rsp), %rbx
testl %ebx, %ebx
js 0x5807
shlq $0x4, %rbx
orq (%r12,%rbx), %r14
movq %r14, %rdi
callq 0x569f
leaq 0x5ef3(%rip), %rdi      # 0xb6e9
xorl %eax, %eax
callq 0x20b0
movq 0x8(%r12,%rbx), %rdi
callq 0x5cd4
movl $0x7d, %edi
jmp 0x5845
movq 0x10(%rbx), %rsi
leaq 0x5e0e(%rip), %rdi      # 0xb627
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x20b0
movl $0x28, %edi
callq 0x2040
movq %rbx, %rdi
callq 0x58aa
movl $0x29, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2040
leaq 0x5dbe(%rip), %rdi      # 0xb61d
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x20b0
movq 0x10(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x593a
leaq 0x5da3(%rip), %rdi      # 0xb635
leaq 0x5db3(%rip), %rsi      # 0xb64c
leaq 0x5db9(%rip), %rcx      # 0xb659
movl $0x108, %edx            # imm = 0x108
callq 0x20e0