// File: /workspace/github_c_makefile_star2_O2/mattn[P]orelang/ore.c
// Function: ore_value_unref
void
ore_value_unref(ore_value v) {
  switch (v.t) {
    case ORE_TYPE_STRING:
      if (verbose)
        printf("unref str %d %s\n", v.v.s->ref, v.v.s->p);
      if (--v.v.s->ref <= 0)
        ore_value_real_free(v);
      break;
    case ORE_TYPE_ARRAY:
      if (verbose)
        printf("unref array %d %p\n", v.v.a->ref, v.v.a->p);
      if (--v.v.a->ref <= 0)
        ore_value_real_free(v);
      break;
    case ORE_TYPE_HASH:
      if (verbose)
        printf("unref hash %d %p\n", v.v.h->ref, v.v.h->p);
      if (--v.v.h->ref <= 0)
        ore_value_real_free(v);
      break;
    case ORE_TYPE_REGEXP:
      if (verbose)
        printf("unref regexp %d %p\n", v.v.r->ref, v.v.r->p);
      if (--v.v.r->ref <= 0)
        ore_value_real_free(v);
      break;
    case ORE_TYPE_ENV:
      if (verbose)
        printf("unref env %d %p\n", v.v.e->ref, v.v.e->p);
      if (--v.v.e->ref <= 0)
        ore_value_real_free(v);
      break;
    case ORE_TYPE_OBJECT:
      if (verbose)
        printf("unref object %d %p\n", v.v.o->ref, v.v.o);
      if (--v.v.o->ref <= 0)
        ore_value_real_free(v);
      break;
    default: 
      break;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x78, %rsp
movl 0xa0(%rsp), %ecx
addl $-0x4, %ecx
cmpl $0x9, %ecx
ja 0xa418
leaq 0xa0(%rsp), %rax
leaq 0x66c0(%rip), %rdx      # 0x10800
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
cmpl $0x0, 0xe0b8(%rip)      # 0x18208
movq 0x8(%rax), %rbx
je 0xa16a
movl 0xc(%rbx), %esi
movq (%rbx), %rdx
leaq 0x6874(%rip), %rdi      # 0x109d7
xorl %eax, %eax
callq 0x20e0
movl 0xc(%rbx), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rbx)
cmpl $0x2, %eax
jge 0xa418
cmpl $0x0, 0xe085(%rip)      # 0x18208
je 0xa357
movq (%rbx), %rsi
leaq 0x7d22(%rip), %rdi      # 0x11eb5
jmp 0xa350
cmpl $0x0, 0xe069(%rip)      # 0x18208
movq 0x8(%rax), %rbx
je 0xa1b9
movl 0x8(%rbx), %esi
movq (%rbx), %rdx
leaq 0x6849(%rip), %rdi      # 0x109fb
xorl %eax, %eax
callq 0x20e0
movl 0x8(%rbx), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x8(%rbx)
cmpl $0x2, %eax
jge 0xa418
cmpl $0x0, 0xe036(%rip)      # 0x18208
je 0xa1e5
movq (%rbx), %rsi
leaq 0x7cf3(%rip), %rdi      # 0x11ed1
xorl %eax, %eax
callq 0x20e0
movq (%rbx), %rdi
callq 0xcf51
jmp 0xa410
cmpl $0x0, 0xe00f(%rip)      # 0x18208
movq 0x8(%rax), %rbx
je 0xa213
movl 0x18(%rbx), %esi
leaq 0x6829(%rip), %rdi      # 0x10a32
movq %rbx, %rdx
xorl %eax, %eax
callq 0x20e0
movl 0x18(%rbx), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x18(%rbx)
cmpl $0x2, %eax
jge 0xa418
cmpl $0x0, 0xdfdc(%rip)      # 0x18208
je 0xa23f
leaq 0x7cc7(%rip), %rdi      # 0x11efc
movq %rbx, %rsi
xorl %eax, %eax
callq 0x20e0
movq 0x10(%rbx), %rsi
leaq 0x7cc2(%rip), %rdx      # 0x11f0c
leaq 0x28(%rsp), %r14
movq %r14, %rdi
callq 0xa61d
cmpl $0x8, (%r14)
jne 0xa410
movq 0x10(%rbx), %rsi
movq 0x48(%rsp), %rax
movq %rax, 0x20(%rsp)
movups 0x28(%rsp), %xmm0
movups 0x38(%rsp), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
leaq 0x50(%rsp), %rdi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0xadac
jmp 0xa410
cmpl $0x0, 0xdf6c(%rip)      # 0x18208
movq 0x8(%rax), %rbx
je 0xa2b6
movl 0x8(%rbx), %esi
movq (%rbx), %rdx
leaq 0x6739(%rip), %rdi      # 0x109e8
xorl %eax, %eax
callq 0x20e0
movl 0x8(%rbx), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x8(%rbx)
cmpl $0x2, %eax
jge 0xa418
cmpl $0x0, 0xdf39(%rip)      # 0x18208
je 0xa2e2
movq (%rbx), %rsi
leaq 0x7be7(%rip), %rdi      # 0x11ec2
xorl %eax, %eax
callq 0x20e0
movq (%rbx), %r14
movq %r14, %r15
movq (%r15), %r15
movq 0x8(%r14), %r12
movq 0x10(%r14), %rdi
movq %r15, %rsi
callq 0xe16e
cmpq %r12, %r15
je 0xa3b6
addq $0x28, %r15
jmp 0xa2e8
cmpl $0x0, 0xdef7(%rip)      # 0x18208
movq 0x8(%rax), %rbx
je 0xa32b
movl 0xc(%rbx), %esi
movq (%rbx), %rdx
leaq 0x66e9(%rip), %rdi      # 0x10a0d
xorl %eax, %eax
callq 0x20e0
movl 0xc(%rbx), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rbx)
cmpl $0x2, %eax
jge 0xa418
cmpl $0x0, 0xdec4(%rip)      # 0x18208
je 0xa357
movq (%rbx), %rsi
leaq 0x7b8f(%rip), %rdi      # 0x11edf
xorl %eax, %eax
callq 0x20e0
movq (%rbx), %rdi
jmp 0xa40b
cmpl $0x0, 0xdea2(%rip)      # 0x18208
movq 0x8(%rax), %rbx
je 0xa380
movl 0x8(%rbx), %esi
movq (%rbx), %rdx
leaq 0x66a8(%rip), %rdi      # 0x10a21
xorl %eax, %eax
callq 0x20e0
movl 0x8(%rbx), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x8(%rbx)
cmpl $0x2, %eax
jge 0xa418
cmpl $0x0, 0xde6f(%rip)      # 0x18208
je 0xa3ac
movq (%rbx), %rsi
leaq 0x7b4a(%rip), %rdi      # 0x11eef
xorl %eax, %eax
callq 0x20e0
movq (%rbx), %rdi
callq 0xcf07
jmp 0xa418
movq 0x10(%r14), %r15
xorl %r12d, %r12d
movq 0x18(%r15), %rdi
cmpq 0x8(%r15), %r12
jae 0xa3fb
movq (%rdi,%r12,8), %rax
movq 0x20(%rax), %rcx
movq %rcx, 0x20(%rsp)
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
callq 0xa113
movq 0x18(%r15), %rax
movq (%rax,%r12,8), %rdi
callq 0x22c0
incq %r12
jmp 0xa3bd
callq 0x22c0
movq %r15, %rdi
callq 0x22c0
movq %r14, %rdi
callq 0x22c0
movq %rbx, %rdi
callq 0x22c0
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq