	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmw_resource_unreserve         ## -- Begin function vmw_resource_unreserve
	.p2align	4, 0x90
_vmw_resource_unreserve:                ## @vmw_resource_unreserve
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -64(%rbp)                  ## 8-byte Spill
	movq	%r8, %r12
	movl	%ecx, %r13d
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	24(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leaq	32(%rdi), %r15
	movq	%r15, %rdi
	callq	_list_empty
	testl	%eax, %eax
	je	LBB0_14
## %bb.1:
	testl	%r13d, %r13d
	je	LBB0_9
## %bb.2:
	movq	48(%rbx), %rax
	cmpq	%r12, %rax
	je	LBB0_8
## %bb.3:
	leaq	48(%rbx), %r13
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_vmw_resource_mob_detach
	movq	%r13, %rdi
	callq	_vmw_bo_unreference
LBB0_5:
	testq	%r12, %r12
	je	LBB0_7
## %bb.6:
	movq	%r12, %rdi
	callq	_vmw_bo_reference
	movq	%rax, 48(%rbx)
	movq	%rbx, %rdi
	callq	_vmw_resource_mob_attach
	jmp	LBB0_8
LBB0_7:
	movq	$0, (%r13)
LBB0_8:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, (%rbx)
LBB0_9:
	testl	%r14d, %r14d
	je	LBB0_11
## %bb.10:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 8(%rbx)
LBB0_11:
	movq	16(%rbx), %rax
	cmpl	$0, 8(%rax)
	je	LBB0_14
## %bb.12:
	cmpl	$-1, 12(%rbx)
	je	LBB0_14
## %bb.13:
	cmpq	$0, 40(%rbx)
	je	LBB0_15
LBB0_14:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	callq	_spin_lock
	movq	16(%rbx), %rax
	movq	24(%rbx), %rcx
	movq	(%rax), %rsi
	shlq	$2, %rsi
	addq	8(%rcx), %rsi
	movq	%r15, %rdi
	callq	_list_add_tail
	movq	%r14, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_vmw_resource_unreserve         ; -- Begin function vmw_resource_unreserve
	.p2align	2
_vmw_resource_unreserve:                ; @vmw_resource_unreserve
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x23, x5
	mov	x25, x4
	mov	x26, x3
	mov	x22, x2
	mov	x24, x1
	mov	x21, x0
	ldr	x19, [x0, #24]
	add	x20, x0, #32
	mov	x0, x20
	bl	_list_empty
	cbz	w0, LBB0_14
; %bb.1:
	cbz	w26, LBB0_9
; %bb.2:
	mov	x26, x21
	ldr	x8, [x26, #48]!
	cmp	x8, x25
	b.eq	LBB0_8
; %bb.3:
	cbz	x8, LBB0_5
; %bb.4:
	mov	x0, x21
	bl	_vmw_resource_mob_detach
	mov	x0, x26
	bl	_vmw_bo_unreference
LBB0_5:
	cbz	x25, LBB0_7
; %bb.6:
	mov	x0, x25
	bl	_vmw_bo_reference
	str	x0, [x21, #48]
	mov	x0, x21
	bl	_vmw_resource_mob_attach
	b	LBB0_8
LBB0_7:
	str	xzr, [x26]
LBB0_8:
	str	x23, [x21]
LBB0_9:
	cbz	w24, LBB0_11
; %bb.10:
	str	w22, [x21, #8]
LBB0_11:
	ldr	x8, [x21, #16]
	ldr	w8, [x8, #8]
	cbz	w8, LBB0_14
; %bb.12:
	ldr	w8, [x21, #12]
	cmn	w8, #1
	b.eq	LBB0_14
; %bb.13:
	ldr	x8, [x21, #40]
	cbz	x8, LBB0_15
LBB0_14:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_15:
	mov	x0, x19
	bl	_spin_lock
	ldp	x9, x8, [x21, #16]
	ldr	x8, [x8, #8]
	ldr	x9, [x9]
	add	x1, x8, x9, lsl #2
	mov	x0, x20
	bl	_list_add_tail
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_spin_unlock
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
