// File: /workspace/github_c_makefile_star2_O3/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
movq %rdi, %rbx
movabsq $0x3ffffffffffff, %r15  # imm = 0x3FFFFFFFFFFFF
andq %r15, %rbx
movl (%rbx), %eax
cmpq $0x7, %rax
ja 0x5632
leaq 0x6227(%rip), %rcx      # 0xb618
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x10(%rbx), %esi
movq 0x18(%rbx), %rdx
leaq 0x6250(%rip), %rdi      # 0xb658
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x20b0
movq 0x10(%rbx), %rdi
jmp 0x55f4
movl $0x5b, %edi
callq 0x2040
movq 0x18(%rbx), %rax
cmpl $0x2, %eax
jl 0x546c
leaq 0x62e2(%rip), %r14      # 0xb722
xorl %r15d, %r15d
movq 0x10(%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0x59b8
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 0x5443
testq %rax, %rax
je 0x547f
movq 0x10(%rbx), %rcx
movq -0x8(%rcx,%rax,8), %rdi
callq 0x59b8
movl $0x5d, %edi
jmp 0x561f
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 0x54ff
movq (%rsp), %rbp
shlq $0x4, %rbp
leaq 0x626c(%rip), %rbx      # 0xb729
leaq 0x625e(%rip), %r15      # 0xb722
xorl %r13d, %r13d
movq (%r12,%r13), %rdi
testq %rdi, %rdi
je 0x54f6
orq %r14, %rdi
callq 0x53c3
movq %rbx, %rdi
xorl %eax, %eax
callq 0x20b0
movq 0x8(%r12,%r13), %rdi
callq 0x59b8
movq %r15, %rdi
xorl %eax, %eax
callq 0x20b0
addq $0x10, %r13
cmpq %r13, %rbp
jne 0x54c7
movq (%rsp), %rbx
testl %ebx, %ebx
js 0x552f
shlq $0x4, %rbx
orq (%r12,%rbx), %r14
movq %r14, %rdi
callq 0x53c3
leaq 0x620b(%rip), %rdi      # 0xb729
xorl %eax, %eax
callq 0x20b0
movq 0x8(%r12,%rbx), %rdi
callq 0x59b8
movl $0x7d, %edi
jmp 0x561f
movq 0x10(%rbx), %rsi
leaq 0x6123(%rip), %rdi      # 0xb667
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x20b0
movabsq $0x7ffc000000000001, %r12 # imm = 0x7FFC000000000001
movl $0x28, %edi
callq 0x2040
movq 0x10(%rbx), %rdi
callq 0x59b8
movq 0x18(%rbx), %rax
cmpq %r12, %rax
je 0x561a
addq $0x18, %rbx
movabsq $-0x4000000000000, %r13 # imm = 0xFFFC000000000000
decq %r13
leaq 0x6187(%rip), %r14      # 0xb722
cmpq %r13, %rax
jbe 0x5604
andq %r15, %rax
cmpl $0x1, (%rax)
jne 0x5604
movq %r14, %rdi
xorl %eax, %eax
callq 0x20b0
movq (%rbx), %rbx
andq %r15, %rbx
movq 0x10(%rbx), %rdi
callq 0x59b8
movq 0x18(%rbx), %rax
addq $0x18, %rbx
cmpq %r12, %rax
jne 0x559b
jmp 0x561a
leaq 0x6086(%rip), %rdi      # 0xb65d
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x20b0
movq 0x10(%rbx), %rax
movq 0x10(%rax), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5651
leaq 0x611a(%rip), %rdi      # 0xb725
xorl %eax, %eax
callq 0x20b0
movq (%rbx), %rdi
callq 0x59b8
movl $0x29, %edi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2040
leaq 0x603c(%rip), %rdi      # 0xb675
leaq 0x604c(%rip), %rsi      # 0xb68c
leaq 0x6052(%rip), %rcx      # 0xb699
movl $0x108, %edx            # imm = 0x108
callq 0x20e0