	.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, %rbx
	movq	$0, -48(%rbp)
	movq	(%rdi), %r13
	xorl	%edi, %edi
	testq	%r13, %r13
	sete	%dil
	callq	_BUG_ON
	leaq	-48(%rbp), %rsi
	movq	%r13, %rdi
	callq	_ttm_tt_populate
	movl	%eax, %ecx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.1:
	movl	8(%rbx), %edi
	cmpq	$1, %r15
	jne	LBB0_4
## %bb.2:
	movq	_TTM_PL_FLAG_CACHED@GOTPCREL(%rip), %rax
	testl	%edi, (%rax)
	je	LBB0_4
## %bb.3:
	movq	_ttm_bo_map_kmap@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r14)
	movq	(%r13), %rax
	movl	(%rax,%r12,4), %edi
	movl	%edi, 8(%r14)
	callq	_kmap
	jmp	LBB0_5
LBB0_4:
	movq	_PAGE_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ttm_io_prot
	movq	_ttm_bo_map_vmap@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 4(%r14)
	shlq	$2, %r12
	addq	(%r13), %r12
	movq	%r12, %rdi
	movq	%r15, %rsi
	xorl	%edx, %edx
	movl	%eax, %ecx
	callq	_vmap
LBB0_5:
	movl	%eax, (%r14)
	movq	_ENOMEM@GOTPCREL(%rip), %rdx
	xorl	%ecx, %ecx
	subl	(%rdx), %ecx
	xorl	%edx, %edx
	testl	%eax, %eax
	cmovnel	%edx, %ecx
LBB0_6:
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.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:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	str	xzr, [sp, #8]
	ldr	x22, [x0]
	cmp	x22, #0
	cset	w0, eq
	bl	_BUG_ON
	add	x1, sp, #8
	mov	x0, x22
	bl	_ttm_tt_populate
	cbnz	w0, LBB0_6
; %bb.1:
	ldr	w0, [x23, #8]
	cmp	x21, #1
	b.ne	LBB0_4
; %bb.2:
Lloh0:
	adrp	x8, _TTM_PL_FLAG_CACHED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TTM_PL_FLAG_CACHED@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.3:
Lloh3:
	adrp	x8, _ttm_bo_map_kmap@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ttm_bo_map_kmap@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x19, #4]
	ldr	x8, [x22]
	ldr	w0, [x8, x20, lsl #2]
	str	w0, [x19, #8]
	bl	_kmap
	b	LBB0_5
LBB0_4:
Lloh6:
	adrp	x8, _PAGE_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PAGE_KERNEL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_ttm_io_prot
	mov	x3, x0
Lloh9:
	adrp	x8, _ttm_bo_map_vmap@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ttm_bo_map_vmap@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [x19, #4]
	ldr	x8, [x22]
	add	x0, x8, x20, lsl #2
	mov	x1, x21
	mov	w2, #0
	bl	_vmap
LBB0_5:
	str	w0, [x19]
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w0, #0
	csneg	w0, wzr, w8, ne
LBB0_6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.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
