	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ttm_bo_kmap_ttm
_ttm_bo_kmap_ttm:                       ## @ttm_bo_kmap_ttm
	.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	%rcx, %r14
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %r13
	movq	(%rdi), %rbx
	xorl	%edi, %edi
	testq	%rbx, %rbx
	sete	%dil
	callq	_BUG_ON
	movq	(%rbx), %rax
	movq	_tt_unpopulated@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	16(%rbx), %rax
	movq	(%rax), %rax
	movq	%rbx, %rdi
	callq	*(%rax)
	movl	%eax, %ecx
	testl	%eax, %eax
	jne	LBB0_9
LBB0_2:
	movl	8(%r13), %edi
	movq	_TTM_PL_FLAG_CACHED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpq	$1, %r15
	jne	LBB0_5
## %bb.3:
	movl	%eax, %ecx
	andl	%edi, %ecx
	je	LBB0_5
## %bb.4:
	movq	_ttm_bo_map_kmap@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r14)
	movq	8(%rbx), %rax
	movl	(%rax,%r12,4), %edi
	movl	%edi, 8(%r14)
	callq	_kmap
	jmp	LBB0_8
LBB0_5:
	movq	_PAGE_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%edi, %eax
	jne	LBB0_7
## %bb.6:
	movl	%ecx, %esi
	callq	_ttm_io_prot
	movl	%eax, %ecx
LBB0_7:
	movq	_ttm_bo_map_vmap@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r14)
	shlq	$2, %r12
	addq	8(%rbx), %r12
	movq	%r12, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_vmap
LBB0_8:
	movl	%eax, (%r14)
	movq	_ENOMEM@GOTPCREL(%rip), %rdx
	xorl	%ecx, %ecx
	subl	(%rdx), %ecx
	xorl	%edx, %edx
	testl	%eax, %eax
	cmovnel	%edx, %ecx
LBB0_9:
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_tt_unpopulated,8,3             ## @tt_unpopulated
	.comm	_TTM_PL_FLAG_CACHED,4,2         ## @TTM_PL_FLAG_CACHED
	.comm	_ttm_bo_map_kmap,4,2            ## @ttm_bo_map_kmap
	.comm	_PAGE_KERNEL,4,2                ## @PAGE_KERNEL
	.comm	_ttm_bo_map_vmap,4,2            ## @ttm_bo_map_vmap
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_ttm_bo_kmap_ttm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ttm_bo_kmap_ttm
_ttm_bo_kmap_ttm:                       ; @ttm_bo_kmap_ttm
	.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	x19, x3
	mov	x21, x2
	mov	x20, x1
	mov	x23, x0
	ldr	x22, [x0]
	cmp	x22, #0
	cset	w0, eq
	bl	_BUG_ON
	ldr	x8, [x22]
Lloh0:
	adrp	x9, _tt_unpopulated@GOTPAGE
Lloh1:
	ldr	x9, [x9, _tt_unpopulated@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldr	x8, [x22, #16]
	ldr	x8, [x8]
	ldr	x8, [x8]
	mov	x0, x22
	blr	x8
	cbnz	w0, LBB0_9
LBB0_2:
	ldr	w0, [x23, #8]
Lloh3:
	adrp	x8, _TTM_PL_FLAG_CACHED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TTM_PL_FLAG_CACHED@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w8, w8, w0
	cmp	x21, #1
	b.ne	LBB0_5
; %bb.3:
	cbz	w8, LBB0_5
; %bb.4:
Lloh6:
	adrp	x8, _ttm_bo_map_kmap@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ttm_bo_map_kmap@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x19, #4]
	ldr	x8, [x22, #8]
	ldr	w0, [x8, x20, lsl #2]
	str	w0, [x19, #8]
	bl	_kmap
	b	LBB0_8
LBB0_5:
Lloh9:
	adrp	x9, _PAGE_KERNEL@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PAGE_KERNEL@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x9]
	cbnz	w8, LBB0_7
; %bb.6:
	mov	x1, x3
	bl	_ttm_io_prot
	mov	x3, x0
LBB0_7:
Lloh12:
	adrp	x8, _ttm_bo_map_vmap@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ttm_bo_map_vmap@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [x19, #4]
	ldr	x8, [x22, #8]
	add	x0, x8, x20, lsl #2
	mov	x1, x21
	mov	w2, #0
	bl	_vmap
LBB0_8:
	str	w0, [x19]
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmp	w0, #0
	csneg	w0, wzr, w8, ne
LBB0_9:
	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
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_tt_unpopulated,8,3             ; @tt_unpopulated
	.comm	_TTM_PL_FLAG_CACHED,4,2         ; @TTM_PL_FLAG_CACHED
	.comm	_ttm_bo_map_kmap,4,2            ; @ttm_bo_map_kmap
	.comm	_PAGE_KERNEL,4,2                ; @PAGE_KERNEL
	.comm	_ttm_bo_map_vmap,4,2            ; @ttm_bo_map_vmap
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_ttm_bo_kmap_ttm
.subsections_via_symbols
