	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ttm_bo_cleanup_refs
_ttm_bo_cleanup_refs:                   ## @ttm_bo_cleanup_refs
	.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
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %r13d
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	movq	%rdi, %rbx
	movq	24(%rdi), %rax
	movq	(%rax), %r12
	addq	$20, %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_list_empty
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	(%rbx), %r14
	jmp	LBB0_3
LBB0_2:
	leaq	8(%rbx), %r14
LBB0_3:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_dma_resv_test_signaled_rcu
	movq	_EBUSY@GOTPCREL(%rip), %rdx
	xorl	%ecx, %ecx
	xorl	%r15d, %r15d
	subl	(%rdx), %r15d
	testq	%rax, %rax
	cmovnel	%ecx, %r15d
	testl	%r13d, %r13d
	jne	LBB0_14
## %bb.4:
	testl	%r15d, %r15d
	je	LBB0_14
## %bb.5:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_7
## %bb.6:
	movq	(%rbx), %rdi
	callq	_dma_resv_unlock
LBB0_7:
	movq	%r12, %rdi
	callq	_spin_unlock
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %ecx
	shll	$5, %ecx
	subl	%eax, %ecx
	subl	%eax, %ecx
	movq	%r14, %rdi
	movl	$1, %esi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	callq	_dma_resv_wait_timeout_rcu
	testq	%rax, %rax
	js	LBB0_8
## %bb.9:
	je	LBB0_10
## %bb.11:
	movq	%r12, %rdi
	callq	_spin_lock
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_15
## %bb.12:
	movq	(%rbx), %rdi
	callq	_dma_resv_trylock
	testl	%eax, %eax
	jne	LBB0_15
## %bb.13:
	movq	%r12, %rdi
	callq	_spin_unlock
	xorl	%r15d, %r15d
	jmp	LBB0_21
LBB0_14:
	testl	%r15d, %r15d
	jne	LBB0_16
LBB0_15:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_list_empty
	movl	%eax, %edi
	callq	_unlikely
	xorl	%r15d, %r15d
	testq	%rax, %rax
	je	LBB0_19
LBB0_16:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_18
## %bb.17:
	movq	(%rbx), %rdi
	callq	_dma_resv_unlock
LBB0_18:
	movq	%r12, %rdi
	callq	_spin_unlock
	jmp	LBB0_21
LBB0_8:
	movq	%rax, %r15
	jmp	LBB0_21
LBB0_19:
	movq	%rbx, %rdi
	callq	_ttm_bo_del_from_lru
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_list_del_init
	leaq	16(%rbx), %rdi
	movq	_ttm_bo_ref_bug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kref_put
	movq	%r12, %rdi
	callq	_spin_unlock
	movq	%rbx, %rdi
	callq	_ttm_bo_cleanup_memtype_use
	xorl	%r15d, %r15d
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_21
## %bb.20:
	movq	(%rbx), %rdi
	callq	_dma_resv_unlock
	jmp	LBB0_21
LBB0_10:
	xorl	%r15d, %r15d
	movq	_EBUSY@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
LBB0_21:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_HZ,4,2                         ## @HZ
	.comm	_ttm_bo_ref_bug,4,2             ## @ttm_bo_ref_bug
	.no_dead_strip	_ttm_bo_cleanup_refs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ttm_bo_cleanup_refs
_ttm_bo_cleanup_refs:                   ; @ttm_bo_cleanup_refs
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x3
	mov	x26, x2
	mov	x23, x1
	mov	x19, x0
	ldr	x8, [x0, #24]
	ldr	x20, [x8]
	add	x22, x0, #20
	mov	x0, x22
	bl	_list_empty
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
	ldr	x25, [x19]
	b	LBB0_3
LBB0_2:
	add	x25, x19, #8
LBB0_3:
	mov	x0, x25
	mov	w1, #1
	bl	_dma_resv_test_signaled_rcu
Lloh0:
	adrp	x27, _EBUSY@GOTPAGE
Lloh1:
	ldr	x27, [x27, _EBUSY@GOTPAGEOFF]
	ldr	w8, [x27]
	cmp	x0, #0
	csneg	w24, wzr, w8, ne
	cbnz	w26, LBB0_12
; %bb.4:
	cbz	w24, LBB0_12
; %bb.5:
	cbz	w21, LBB0_7
; %bb.6:
	ldr	x0, [x19]
	bl	_dma_resv_unlock
LBB0_7:
	mov	x0, x20
	bl	_spin_unlock
Lloh2:
	adrp	x8, _HZ@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	mov	w9, #30
	mul	w3, w8, w9
	mov	x0, x25
	mov	w1, #1
	mov	x2, x23
	bl	_dma_resv_wait_timeout_rcu
	mov	x24, x0
	tbnz	x0, #63, LBB0_22
; %bb.8:
	cbz	x24, LBB0_21
; %bb.9:
	mov	x0, x20
	bl	_spin_lock
	cbz	w21, LBB0_13
; %bb.10:
	ldr	x0, [x19]
	bl	_dma_resv_trylock
	cbnz	w0, LBB0_13
; %bb.11:
	mov	x0, x20
	bl	_spin_unlock
	b	LBB0_20
LBB0_12:
	cbnz	w24, LBB0_15
LBB0_13:
	mov	x0, x22
	bl	_list_empty
	bl	_unlikely
	cbz	x0, LBB0_18
; %bb.14:
	mov	w24, #0
LBB0_15:
	cbz	w21, LBB0_17
; %bb.16:
	ldr	x0, [x19]
	bl	_dma_resv_unlock
LBB0_17:
	mov	x0, x20
	bl	_spin_unlock
	b	LBB0_22
LBB0_18:
	mov	x0, x19
	bl	_ttm_bo_del_from_lru
	mov	x0, x22
	bl	_list_del_init
	add	x0, x19, #16
Lloh5:
	adrp	x8, _ttm_bo_ref_bug@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ttm_bo_ref_bug@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_kref_put
	mov	x0, x20
	bl	_spin_unlock
	mov	x0, x19
	bl	_ttm_bo_cleanup_memtype_use
	cbz	w21, LBB0_20
; %bb.19:
	ldr	x0, [x19]
	bl	_dma_resv_unlock
LBB0_20:
	mov	w24, #0
	b	LBB0_22
LBB0_21:
	ldr	w8, [x27]
	neg	w24, w8
LBB0_22:
	mov	x0, x24
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_HZ,4,2                         ; @HZ
	.comm	_ttm_bo_ref_bug,4,2             ; @ttm_bo_ref_bug
	.no_dead_strip	_ttm_bo_cleanup_refs
.subsections_via_symbols
