	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ttm_bo_vm_access
_ttm_bo_vm_access:                      ## @ttm_bo_vm_access
	.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
	testl	%ecx, %ecx
	jle	LBB0_2
## %bb.1:
	movl	%ecx, %r13d
	movq	%rsi, %rbx
	movslq	8(%rdi), %rax
	subq	%rax, %rbx
	movl	%ecx, %eax
	addq	%rbx, %rax
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shrq	%cl, %rax
	movq	(%rdi), %r15
	movslq	(%r15), %rcx
	cmpq	%rcx, %rax
	jbe	LBB0_3
LBB0_2:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_13
LBB0_3:
	movq	%rdx, %r12
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movq	%r15, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_ttm_bo_reserve
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.4:
	movl	24(%r15), %eax
	cmpl	$128, %eax
	je	LBB0_8
## %bb.5:
	cmpl	$129, %eax
	jne	LBB0_9
## %bb.6:
	movq	16(%r15), %rax
	movq	_TTM_PAGE_FLAG_SWAPPED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	andl	(%rax), %edi
	callq	_unlikely
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movq	16(%r15), %rdi
	callq	_ttm_tt_swapin
	movl	%eax, %r14d
	xorl	%edi, %edi
	testl	%eax, %eax
	setne	%dil
	callq	_unlikely
	testl	%eax, %eax
	jne	LBB0_13
LBB0_8:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	movl	%r13d, %ecx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	callq	_ttm_bo_vm_access_kmap
	movl	%eax, %r14d
	jmp	LBB0_12
LBB0_9:
	movq	8(%r15), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	movl	%r13d, %ecx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	callq	*%rax
	movl	%eax, %r14d
	jmp	LBB0_12
LBB0_11:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_12:
	movq	%r15, %rdi
	callq	_ttm_bo_unreserve
LBB0_13:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SHIFT,8,3                 ## @PAGE_SHIFT
	.comm	_EIO,4,2                        ## @EIO
	.comm	_TTM_PAGE_FLAG_SWAPPED,4,2      ## @TTM_PAGE_FLAG_SWAPPED
	.no_dead_strip	_ttm_bo_vm_access
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ttm_bo_vm_access
_ttm_bo_vm_access:                      ; @ttm_bo_vm_access
	.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
	cmp	w3, #1
	b.lt	LBB0_2
; %bb.1:
	mov	x21, x3
	ldrsw	x8, [x0, #8]
	sub	x23, x1, x8
	ldr	x19, [x0]
	add	x8, x23, w3, uxtw
Lloh0:
	adrp	x9, _PAGE_SHIFT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PAGE_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	lsr	x8, x8, x9
	ldrsw	x9, [x19]
	cmp	x8, x9
	b.ls	LBB0_3
LBB0_2:
Lloh3:
	adrp	x8, _EIO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w24, w8
	b	LBB0_13
LBB0_3:
	mov	x20, x4
	mov	x22, x2
	mov	x0, x19
	mov	w1, #1
	mov	w2, #0
	mov	x3, #0
	bl	_ttm_bo_reserve
	mov	x24, x0
	cbnz	w0, LBB0_13
; %bb.4:
	ldr	w8, [x19, #24]
	cmp	w8, #128
	b.eq	LBB0_8
; %bb.5:
	cmp	w8, #129
	b.ne	LBB0_9
; %bb.6:
	ldr	x8, [x19, #16]
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _TTM_PAGE_FLAG_SWAPPED@GOTPAGE
Lloh7:
	ldr	x9, [x9, _TTM_PAGE_FLAG_SWAPPED@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	and	w0, w9, w8
	bl	_unlikely
	cbz	w0, LBB0_8
; %bb.7:
	ldr	x0, [x19, #16]
	bl	_ttm_tt_swapin
	mov	x24, x0
	cmp	w0, #0
	cset	w0, ne
	bl	_unlikely
	cbnz	w0, LBB0_13
LBB0_8:
	mov	x0, x19
	mov	x1, x23
	mov	x2, x22
	mov	x3, x21
	mov	x4, x20
	bl	_ttm_bo_vm_access_kmap
	mov	x24, x0
	b	LBB0_12
LBB0_9:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	x8, [x8]
	cbz	x8, LBB0_11
; %bb.10:
	mov	x0, x19
	mov	x1, x23
	mov	x2, x22
	mov	x3, x21
	mov	x4, x20
	blr	x8
	mov	x24, x0
	b	LBB0_12
LBB0_11:
Lloh9:
	adrp	x8, _EIO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_12:
	mov	x0, x19
	bl	_ttm_bo_unreserve
LBB0_13:
	mov	x0, x24
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SHIFT,8,3                 ; @PAGE_SHIFT
	.comm	_EIO,4,2                        ; @EIO
	.comm	_TTM_PAGE_FLAG_SWAPPED,4,2      ; @TTM_PAGE_FLAG_SWAPPED
	.no_dead_strip	_ttm_bo_vm_access
.subsections_via_symbols
