	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ttm_bo_add_mem_to_lru
_ttm_bo_add_mem_to_lru:                 ## @ttm_bo_add_mem_to_lru
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	32(%rdi), %r12
	movl	28(%rdi), %edi
	callq	_dma_resv_assert_held
	leaq	24(%rbx), %r14
	movq	%r14, %rdi
	callq	_list_empty
	testl	%eax, %eax
	je	LBB0_5
## %bb.1:
	movq	_TTM_PL_FLAG_NO_EVICT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	jne	LBB0_5
## %bb.2:
	movq	8(%r12), %r13
	movq	8(%r15), %r15
	shlq	$4, %r15
	movq	(%rbx), %rsi
	shlq	$2, %rsi
	addq	8(%r13,%r15), %rsi
	movq	%r14, %rdi
	callq	_list_add_tail
	leaq	8(%rbx), %r14
	movq	%r14, %rdi
	callq	_kref_get
	movq	_TTM_MEMTYPE_FLAG_FIXED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r13,%r15)
	je	LBB0_3
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	16(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	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_5
## %bb.6:
	movq	(%r12), %rax
	movq	(%rbx), %rsi
	addq	$12, %rbx
	shlq	$2, %rsi
	addq	(%rax), %rsi
	movq	%rbx, %rdi
	callq	_list_add_tail
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kref_get                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_TTM_PL_FLAG_NO_EVICT,4,2       ## @TTM_PL_FLAG_NO_EVICT
	.comm	_TTM_MEMTYPE_FLAG_FIXED,4,2     ## @TTM_MEMTYPE_FLAG_FIXED
	.comm	_TTM_PAGE_FLAG_SG,4,2           ## @TTM_PAGE_FLAG_SG
	.comm	_TTM_PAGE_FLAG_SWAPPED,4,2      ## @TTM_PAGE_FLAG_SWAPPED
	.no_dead_strip	_ttm_bo_add_mem_to_lru
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ttm_bo_add_mem_to_lru
_ttm_bo_add_mem_to_lru:                 ; @ttm_bo_add_mem_to_lru
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	x22, [x0, #32]
	ldr	w0, [x0, #28]
	bl	_dma_resv_assert_held
	add	x21, x19, #24
	mov	x0, x21
	bl	_list_empty
	cbz	w0, LBB0_3
; %bb.1:
	ldr	w8, [x20]
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.ne	LBB0_3
; %bb.2:
	ldr	x8, [x22, #8]
	ldr	x9, [x20, #8]
	add	x23, x8, x9, lsl #4
	ldr	x8, [x23, #8]
	mov	x20, x19
	ldr	x9, [x20], #8
	add	x1, x8, x9, lsl #2
	mov	x0, x21
	bl	_list_add_tail
	mov	x0, x20
	bl	_kref_get
	ldr	w8, [x23]
Lloh3:
	adrp	x9, _TTM_MEMTYPE_FLAG_FIXED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TTM_MEMTYPE_FLAG_FIXED@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
LBB0_3:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_4:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_3
; %bb.5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _TTM_PAGE_FLAG_SG@GOTPAGE
Lloh7:
	ldr	x9, [x9, _TTM_PAGE_FLAG_SG@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _TTM_PAGE_FLAG_SWAPPED@GOTPAGE
Lloh10:
	ldr	x10, [x10, _TTM_PAGE_FLAG_SWAPPED@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.ne	LBB0_3
; %bb.6:
	ldr	x8, [x22]
	ldr	x8, [x8]
	ldr	x9, [x19], #12
	add	x1, x8, x9, lsl #2
	mov	x0, x19
	bl	_list_add_tail
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_kref_get
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_TTM_PL_FLAG_NO_EVICT,4,2       ; @TTM_PL_FLAG_NO_EVICT
	.comm	_TTM_MEMTYPE_FLAG_FIXED,4,2     ; @TTM_MEMTYPE_FLAG_FIXED
	.comm	_TTM_PAGE_FLAG_SG,4,2           ; @TTM_PAGE_FLAG_SG
	.comm	_TTM_PAGE_FLAG_SWAPPED,4,2      ; @TTM_PAGE_FLAG_SWAPPED
	.no_dead_strip	_ttm_bo_add_mem_to_lru
.subsections_via_symbols
