	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ttm_bo_cleanup_refs_or_queue
_ttm_bo_cleanup_refs_or_queue:          ## @ttm_bo_cleanup_refs_or_queue
	.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	%rdi, %rbx
	movq	24(%rdi), %rdi
	movq	32(%rbx), %r14
	movq	16(%r14), %r12
	movq	$0, -64(%rbp)
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_spin_lock
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$1, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_ttm_bo_reserve_nolru
	movl	%eax, %r15d
	leaq	8(%r14), %r13
	movq	%r13, %rdi
	callq	_spin_lock
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	$1, %ecx
	callq	_ttm_bo_wait
	movq	16(%rbx), %rdi
	testl	%r15d, %r15d
	je	LBB0_1
## %bb.3:
	testq	%rdi, %rdi
	jne	LBB0_5
## %bb.4:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_spin_unlock
	xorl	%r12d, %r12d
	jmp	LBB0_7
LBB0_1:
	testq	%rdi, %rdi
	je	LBB0_2
LBB0_5:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	callq	*16(%r12)
	movq	%rax, %r12
	movq	%rax, -64(%rbp)
	movq	%r13, %rdi
	callq	_spin_unlock
	testl	%r15d, %r15d
	jne	LBB0_7
## %bb.6:
	leaq	12(%rbx), %rdi
	xorl	%esi, %esi
	callq	_atomic_set
	leaq	8(%rbx), %rdi
	callq	_wake_up_all
LBB0_7:
	leaq	4(%rbx), %rdi
	callq	_kref_get
	leaq	4(%r14), %rsi
	movq	%rbx, %rdi
	callq	_list_add_tail
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock
	testq	%r12, %r12
	je	LBB0_9
## %bb.8:
	movq	%r12, %rdi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	callq	*8(%rbx)
	leaq	-64(%rbp), %rdi
	callq	*(%rbx)
LBB0_9:
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	$1, %esi
	cmpl	$100, %eax
	jl	LBB0_11
## %bb.10:
	cltq
	imulq	$1374389535, %rax, %rsi         ## imm = 0x51EB851F
	movq	%rsi, %rax
	shrq	$63, %rax
	sarq	$37, %rsi
	addl	%eax, %esi
LBB0_11:
	movq	%r14, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_schedule_delayed_work
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%r13, %rdi
	callq	_spin_unlock
	movq	%rbx, %rdi
	callq	_ttm_bo_del_from_lru
	movl	%eax, %r14d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock
	movq	%rbx, %rdi
	callq	_ttm_bo_cleanup_memtype_use
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	$1, %edx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ttm_bo_list_ref_sub            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_HZ,4,2                         ## @HZ
	.no_dead_strip	_ttm_bo_cleanup_refs_or_queue
.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_or_queue
_ttm_bo_cleanup_refs_or_queue:          ; @ttm_bo_cleanup_refs_or_queue
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x20, x0
	ldp	x21, x19, [x0, #24]
	ldr	x25, [x19, #16]
	str	xzr, [sp, #8]
	mov	x0, x21
	bl	_spin_lock
	mov	x0, x20
	mov	w1, #0
	mov	w2, #1
	mov	w3, #0
	mov	w4, #0
	bl	_ttm_bo_reserve_nolru
	mov	x24, x0
	add	x23, x19, #8
	mov	x0, x23
	bl	_spin_lock
	mov	x0, x20
	mov	w1, #0
	mov	w2, #0
	mov	w3, #1
	bl	_ttm_bo_wait
	ldr	x0, [x20, #16]
	cbz	w24, LBB0_3
; %bb.1:
	cbnz	x0, LBB0_4
; %bb.2:
	mov	x0, x23
	bl	_spin_unlock
	mov	x22, #0
	b	LBB0_6
LBB0_3:
	cbz	x0, LBB0_9
LBB0_4:
	ldr	x8, [x25, #16]
	blr	x8
	mov	x22, x0
	str	x0, [sp, #8]
	mov	x0, x23
	bl	_spin_unlock
	cbnz	w24, LBB0_6
; %bb.5:
	add	x0, x20, #12
	mov	w1, #0
	bl	_atomic_set
	add	x0, x20, #8
	bl	_wake_up_all
LBB0_6:
	add	x0, x20, #4
	bl	_kref_get
	add	x1, x19, #4
	mov	x0, x20
	bl	_list_add_tail
	mov	x0, x21
	bl	_spin_unlock
	cbz	x22, LBB0_8
; %bb.7:
	ldr	x8, [x25, #8]
	mov	x0, x22
	blr	x8
	ldr	x8, [x25]
	add	x0, sp, #8
	blr	x8
LBB0_8:
Lloh0:
	adrp	x8, _HZ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh2:
	ldrsw	x8, [x8]
	mov	w9, #34079
	movk	w9, #20971, lsl #16
	mul	x9, x8, x9
	lsr	x10, x9, #63
	asr	x9, x9, #37
	add	w9, w9, w10
	cmp	w8, #100
	csinc	w1, w9, wzr, ge
	mov	x0, x19
	bl	_schedule_delayed_work
	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
	add	sp, sp, #96
	ret
LBB0_9:
	mov	x0, x23
	bl	_spin_unlock
	mov	x0, x20
	bl	_ttm_bo_del_from_lru
	mov	x19, x0
	mov	x0, x21
	bl	_spin_unlock
	mov	x0, x20
	bl	_ttm_bo_cleanup_memtype_use
	mov	x0, x20
	mov	x1, x19
	mov	w2, #1
	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
	add	sp, sp, #96
	b	_ttm_bo_list_ref_sub
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_HZ,4,2                         ; @HZ
	.no_dead_strip	_ttm_bo_cleanup_refs_or_queue
.subsections_via_symbols
