	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_bo_unpin               ## -- Begin function nouveau_bo_unpin
	.p2align	4, 0x90
_nouveau_bo_unpin:                      ## @nouveau_bo_unpin
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	8(%rdi), %r14
	movl	20(%rdi), %edi
	callq	_nouveau_bdev
	movq	%rax, %r15
	xorl	%r12d, %r12d
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_ttm_bo_reserve
	testl	%eax, %eax
	jne	LBB0_9
## %bb.1:
	decq	(%rbx)
	jne	LBB0_8
## %bb.2:
	movl	16(%rbx), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_nouveau_bo_placement_set
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_nouveau_bo_validate
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_8
## %bb.3:
	movl	(%r14), %eax
	cmpl	$129, %eax
	je	LBB0_6
## %bb.4:
	cmpl	$128, %eax
	jne	LBB0_7
## %bb.5:
	addq	$4, %r15
LBB0_6:
	movl	12(%rbx), %eax
	addl	%eax, (%r15)
LBB0_7:
	xorl	%r12d, %r12d
LBB0_8:
	movq	%r14, %rdi
	callq	_ttm_bo_unreserve
	movl	%r12d, %eax
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nouveau_bo_unpin               ; -- Begin function nouveau_bo_unpin
	.p2align	2
_nouveau_bo_unpin:                      ; @nouveau_bo_unpin
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x0
	add	x19, x0, #8
	ldr	w0, [x0, #20]
	bl	_nouveau_bdev
	mov	x21, x0
	mov	x0, x19
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
	mov	w4, #0
	bl	_ttm_bo_reserve
	mov	x22, x0
	cbnz	w0, LBB0_9
; %bb.1:
	ldr	x8, [x20]
	subs	x8, x8, #1
	str	x8, [x20]
	b.eq	LBB0_3
LBB0_2:
	mov	w22, #0
	b	LBB0_8
LBB0_3:
	ldr	w1, [x20, #16]
	mov	x0, x20
	mov	w2, #0
	bl	_nouveau_bo_placement_set
	mov	x0, x20
	mov	w1, #0
	mov	w2, #0
	bl	_nouveau_bo_validate
	mov	x22, x0
	cbnz	w0, LBB0_8
; %bb.4:
	ldr	w8, [x19]
	cmp	w8, #129
	b.eq	LBB0_7
; %bb.5:
	cmp	w8, #128
	b.ne	LBB0_2
; %bb.6:
	add	x21, x21, #4
LBB0_7:
	mov	w22, #0
	ldr	w8, [x20, #12]
	ldr	w9, [x21]
	add	w8, w9, w8
	str	w8, [x21]
LBB0_8:
	mov	x0, x19
	bl	_ttm_bo_unreserve
LBB0_9:
	mov	x0, x22
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
