	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ttm_bo_move_to_lru_tail        ## -- Begin function ttm_bo_move_to_lru_tail
	.p2align	4, 0x90
_ttm_bo_move_to_lru_tail:               ## @ttm_bo_move_to_lru_tail
	.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	%rsi, %r14
	movq	%rdi, %rbx
	movl	24(%rdi), %edi
	callq	_dma_resv_assert_held
	movq	%rbx, %rdi
	callq	_ttm_bo_del_from_lru
	movq	%rbx, %rdi
	callq	_ttm_bo_add_to_lru
	testq	%r14, %r14
	je	LBB0_9
## %bb.1:
	movq	_TTM_PL_FLAG_NO_EVICT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 16(%rbx)
	je	LBB0_2
LBB0_9:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_2:
	movl	20(%rbx), %eax
	cmpl	$128, %eax
	je	LBB0_5
## %bb.3:
	cmpl	$129, %eax
	jne	LBB0_7
## %bb.4:
	leaq	16(%r14), %rax
	jmp	LBB0_6
LBB0_5:
	leaq	8(%r14), %rax
LBB0_6:
	movq	(%rbx), %rdi
	shlq	$2, %rdi
	addq	(%rax), %rdi
	movq	%rbx, %rsi
	callq	_ttm_bo_bulk_move_set_pos
LBB0_7:
	movq	8(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	_TTM_PAGE_FLAG_SG@GOTPCREL(%rip), %rcx
	movq	_TTM_PAGE_FLAG_SWAPPED@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	testl	%edx, (%rax)
	jne	LBB0_9
## %bb.10:
	movq	(%rbx), %rdi
	shlq	$2, %rdi
	addq	(%r14), %rdi
	movq	%rbx, %rsi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_ttm_bo_bulk_move_set_pos       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_TTM_PL_FLAG_NO_EVICT,4,2       ## @TTM_PL_FLAG_NO_EVICT
	.comm	_TTM_PAGE_FLAG_SG,4,2           ## @TTM_PAGE_FLAG_SG
	.comm	_TTM_PAGE_FLAG_SWAPPED,4,2      ## @TTM_PAGE_FLAG_SWAPPED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ttm_bo_move_to_lru_tail        ; -- Begin function ttm_bo_move_to_lru_tail
	.p2align	2
_ttm_bo_move_to_lru_tail:               ; @ttm_bo_move_to_lru_tail
	.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	x20, x1
	mov	x19, x0
	ldr	w0, [x0, #24]
	bl	_dma_resv_assert_held
	mov	x0, x19
	bl	_ttm_bo_del_from_lru
	mov	x0, x19
	bl	_ttm_bo_add_to_lru
	cbz	x20, LBB0_2
; %bb.1:
	ldr	w8, [x19, #16]
Lloh0:
	adrp	x9, _TTM_PL_FLAG_NO_EVICT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TTM_PL_FLAG_NO_EVICT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
LBB0_2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_3:
	ldr	w8, [x19, #20]
	cmp	w8, #128
	b.eq	LBB0_6
; %bb.4:
	cmp	w8, #129
	b.ne	LBB0_8
; %bb.5:
	add	x8, x20, #16
	b	LBB0_7
LBB0_6:
	add	x8, x20, #8
LBB0_7:
	ldr	x8, [x8]
	ldr	x9, [x19]
	add	x0, x8, x9, lsl #2
	mov	x1, x19
	bl	_ttm_bo_bulk_move_set_pos
LBB0_8:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_2
; %bb.9:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _TTM_PAGE_FLAG_SG@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TTM_PAGE_FLAG_SG@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _TTM_PAGE_FLAG_SWAPPED@GOTPAGE
Lloh7:
	ldr	x10, [x10, _TTM_PAGE_FLAG_SWAPPED@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.ne	LBB0_2
; %bb.10:
	ldr	x8, [x20]
	ldr	x9, [x19]
	add	x0, x8, x9, lsl #2
	mov	x1, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ttm_bo_bulk_move_set_pos
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_TTM_PL_FLAG_NO_EVICT,4,2       ; @TTM_PL_FLAG_NO_EVICT
	.comm	_TTM_PAGE_FLAG_SG,4,2           ; @TTM_PAGE_FLAG_SG
	.comm	_TTM_PAGE_FLAG_SWAPPED,4,2      ; @TTM_PAGE_FLAG_SWAPPED
.subsections_via_symbols
