	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ttm_bo_mmap                    ## -- Begin function ttm_bo_mmap
	.p2align	4, 0x90
_ttm_bo_mmap:                           ## @ttm_bo_mmap
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	%rdx, %rdi
	callq	_read_lock
	movl	(%r14), %edx
	movl	32(%r14), %esi
	subl	4(%r14), %edx
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %edx
	movq	%rbx, %rdi
	callq	_ttm_bo_vm_lookup_rb
	movq	%rax, %r12
	movq	%rax, -40(%rbp)
	xorl	%edi, %edi
	testq	%rax, %rax
	setne	%dil
	callq	_likely
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	callq	_ttm_bo_reference
LBB0_2:
	movq	%rbx, %rdi
	callq	_read_unlock
	xorl	%edi, %edi
	testq	%r12, %r12
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_4:
	movq	(%r12), %rax
	movq	(%rax), %rbx
	xorl	%edi, %edi
	cmpq	$0, (%rbx)
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movq	_EPERM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_6
LBB0_7:
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	*(%rbx)
	movl	%eax, %ebx
	xorl	%edi, %edi
	testl	%eax, %eax
	setne	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_8
LBB0_6:
	leaq	-40(%rbp), %rdi
	callq	_ttm_bo_unref
LBB0_9:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_ttm_bo_vm_ops@GOTPCREL(%rip), %rax
	movq	%rax, 24(%r14)
	movq	%r12, 16(%r14)
	movq	_VM_RESERVED@GOTPCREL(%rip), %rax
	movq	_VM_IO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_VM_MIXEDMAP@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	_VM_DONTEXPAND@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	orl	%ecx, 8(%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not find buffer object to map\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EPERM,4,2                      ## @EPERM
	.comm	_ttm_bo_vm_ops,4,2              ## @ttm_bo_vm_ops
	.comm	_VM_RESERVED,4,2                ## @VM_RESERVED
	.comm	_VM_IO,4,2                      ## @VM_IO
	.comm	_VM_MIXEDMAP,4,2                ## @VM_MIXEDMAP
	.comm	_VM_DONTEXPAND,4,2              ## @VM_DONTEXPAND
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ttm_bo_mmap                    ; -- Begin function ttm_bo_mmap
	.p2align	2
_ttm_bo_mmap:                           ; @ttm_bo_mmap
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x22, x2
	mov	x19, x1
	mov	x20, x0
	mov	x0, x2
	bl	_read_lock
	ldr	w1, [x19, #32]
	ldp	w8, w9, [x19]
	sub	w8, w8, w9
Lloh0:
	adrp	x9, _PAGE_SHIFT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PAGE_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	asr	w2, w8, w9
	mov	x0, x22
	bl	_ttm_bo_vm_lookup_rb
	mov	x21, x0
	str	x0, [sp, #8]
	cmp	x0, #0
	cset	w0, ne
	bl	_likely
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x21
	bl	_ttm_bo_reference
LBB0_2:
	mov	x0, x22
	bl	_read_unlock
	cmp	x21, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_4
; %bb.3:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_8
LBB0_4:
	ldr	x8, [x21]
	ldr	x22, [x8]
	ldr	x8, [x22]
	cmp	x8, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_6
; %bb.5:
Lloh8:
	adrp	x8, _EPERM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EPERM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_7
LBB0_6:
	ldr	x8, [x22]
	mov	x0, x21
	mov	x1, x20
	blr	x8
	mov	x20, x0
	cmp	w0, #0
	cset	w0, ne
	bl	_unlikely
	cbz	x0, LBB0_9
LBB0_7:
	add	x0, sp, #8
	bl	_ttm_bo_unref
LBB0_8:
	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
	add	sp, sp, #64
	ret
LBB0_9:
	mov	w20, #0
Lloh11:
	adrp	x8, _ttm_bo_vm_ops@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ttm_bo_vm_ops@GOTPAGEOFF]
	stp	x21, x8, [x19, #16]
Lloh13:
	adrp	x8, _VM_RESERVED@GOTPAGE
Lloh14:
	ldr	x8, [x8, _VM_RESERVED@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _VM_IO@GOTPAGE
Lloh17:
	ldr	x9, [x9, _VM_IO@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh19:
	adrp	x9, _VM_MIXEDMAP@GOTPAGE
Lloh20:
	ldr	x9, [x9, _VM_MIXEDMAP@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
Lloh22:
	adrp	x10, _VM_DONTEXPAND@GOTPAGE
Lloh23:
	ldr	x10, [x10, _VM_DONTEXPAND@GOTPAGEOFF]
	orr	w8, w8, w9
Lloh24:
	ldr	w9, [x10]
	orr	w8, w8, w9
	ldr	w9, [x19, #8]
	orr	w8, w8, w9
	str	w8, [x19, #8]
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not find buffer object to map\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EPERM,4,2                      ; @EPERM
	.comm	_ttm_bo_vm_ops,4,2              ; @ttm_bo_vm_ops
	.comm	_VM_RESERVED,4,2                ; @VM_RESERVED
	.comm	_VM_IO,4,2                      ; @VM_IO
	.comm	_VM_MIXEDMAP,4,2                ; @VM_MIXEDMAP
	.comm	_VM_DONTEXPAND,4,2              ; @VM_DONTEXPAND
.subsections_via_symbols
