	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_bo_unpin                ## -- Begin function radeon_bo_unpin
	.p2align	4, 0x90
_radeon_bo_unpin:                       ## @radeon_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	24(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	xorl	%r14d, %r14d
	decq	%rax
	movq	%rax, 24(%rbx)
	jne	LBB0_8
## %bb.3:
	leaq	8(%rbx), %rsi
	cmpl	$0, 8(%rbx)
	jle	LBB0_6
## %bb.4:
	movq	16(%rbx), %rax
	xorl	%ecx, %ecx
	movq	_TTM_PL_FLAG_NO_EVICT@GOTPCREL(%rip), %rdx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rdx), %edi
	notl	%edi
	andl	%edi, (%rax,%rcx,4)
	incq	%rcx
	movslq	(%rsi), %rdi
	cmpq	%rdi, %rcx
	jl	LBB0_5
LBB0_6:
	leaq	12(%rbx), %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_ttm_bo_validate
	movl	%eax, %r14d
	xorl	%edi, %edi
	testl	%eax, %eax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	(%rbx), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdx
	callq	_dev_err
	jmp	LBB0_8
LBB0_1:
	movq	(%rbx), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdx
	callq	_dev_warn
	xorl	%r14d, %r14d
LBB0_8:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%p unpin not necessary\n"

	.comm	_TTM_PL_FLAG_NO_EVICT,4,2       ## @TTM_PL_FLAG_NO_EVICT
L_.str.1:                               ## @.str.1
	.asciz	"%p validate failed for unpin\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_bo_unpin                ; -- Begin function radeon_bo_unpin
	.p2align	2
_radeon_bo_unpin:                       ; @radeon_bo_unpin
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x8, [x0, #24]
	cbz	x8, LBB0_3
; %bb.1:
	subs	x8, x8, #1
	str	x8, [x19, #24]
	b.eq	LBB0_4
; %bb.2:
	mov	w20, #0
	b	LBB0_9
LBB0_3:
	ldr	x8, [x19]
	ldr	w0, [x8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_dev_warn
	mov	w20, #0
	b	LBB0_9
LBB0_4:
	mov	x1, x19
	ldr	w8, [x1, #8]!
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.5:
	mov	x8, #0
	ldr	x9, [x19, #16]
Lloh2:
	adrp	x10, _TTM_PL_FLAG_NO_EVICT@GOTPAGE
Lloh3:
	ldr	x10, [x10, _TTM_PL_FLAG_NO_EVICT@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10]
	lsl	x12, x8, #2
	ldr	w13, [x9, x12]
	bic	w11, w13, w11
	str	w11, [x9, x12]
	add	x8, x8, #1
	ldrsw	x11, [x1]
	cmp	x8, x11
	b.lt	LBB0_6
LBB0_7:
	add	x0, x19, #12
	mov	w2, #0
	mov	w3, #0
	bl	_ttm_bo_validate
	mov	x20, x0
	cmp	w0, #0
	cset	w0, ne
	bl	_unlikely
	cbz	x0, LBB0_9
; %bb.8:
	ldr	x8, [x19]
	ldr	w0, [x8]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x19
	bl	_dev_err
LBB0_9:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%p unpin not necessary\n"

	.comm	_TTM_PL_FLAG_NO_EVICT,4,2       ; @TTM_PL_FLAG_NO_EVICT
l_.str.1:                               ; @.str.1
	.asciz	"%p validate failed for unpin\n"

.subsections_via_symbols
