	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ttm_bo_kmap                    ## -- Begin function ttm_bo_kmap
	.p2align	4, 0x90
_ttm_bo_kmap:                           ## @ttm_bo_kmap
	.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	8(%rdi), %rbx
	movq	24(%rdi), %rax
	shlq	$2, %rbx
	addq	(%rax), %rbx
	movq	$0, 8(%rcx)
	movq	%rdi, (%rcx)
	movq	(%rdi), %rax
	cmpq	%rdx, %rax
	jb	LBB0_1
## %bb.3:
	cmpq	%rsi, %rax
	jae	LBB0_4
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_2:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%rcx, %r12
	movq	%rdx, %r14
	movq	%rdi, %r13
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	leaq	8(%rdi), %r15
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_ttm_mem_io_lock
	movq	24(%r13), %rdi
	movq	%r15, %rsi
	callq	_ttm_mem_io_reserve
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_ttm_mem_io_unlock
	testl	%r15d, %r15d
	jne	LBB0_2
## %bb.5:
	cmpl	$0, 16(%r13)
	je	LBB0_7
## %bb.6:
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	shlq	%cl, %rsi
	shlq	%cl, %r14
	movq	%r13, %rdi
	movq	%r14, %rdx
	movq	%r12, %rcx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ttm_bo_ioremap                 ## TAILCALL
LBB0_7:
	movq	%r13, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%r14, %rdx
	movq	%r12, %rcx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ttm_bo_kmap_ttm                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PAGE_SHIFT,8,3                 ## @PAGE_SHIFT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ttm_bo_kmap                    ; -- Begin function ttm_bo_kmap
	.p2align	2
_ttm_bo_kmap:                           ; @ttm_bo_kmap
	.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
	ldr	x8, [x0, #24]
	ldr	x8, [x8]
	mov	x23, x0
	ldr	x9, [x23, #8]!
	stp	x0, xzr, [x3]
	ldr	x10, [x0]
	cmp	x10, x2
	b.lo	LBB0_2
; %bb.1:
	mov	x22, x1
	cmp	x10, x1
	b.hs	LBB0_4
LBB0_2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_3:
	mov	x0, x23
	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:
	mov	x19, x3
	mov	x20, x2
	mov	x21, x0
	add	x24, x8, x9, lsl #2
	mov	x0, x24
	mov	w1, #0
	bl	_ttm_mem_io_lock
	ldr	x0, [x21, #24]
	mov	x1, x23
	bl	_ttm_mem_io_reserve
	mov	x23, x0
	mov	x0, x24
	bl	_ttm_mem_io_unlock
	cbnz	w23, LBB0_3
; %bb.5:
	ldr	w8, [x21, #16]
	cbz	w8, LBB0_7
; %bb.6:
Lloh3:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	lsl	x1, x22, x8
	lsl	x2, x20, x8
	mov	x0, x21
	mov	x3, x19
	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	_ttm_bo_ioremap
LBB0_7:
	mov	x0, x21
	mov	x1, x22
	mov	x2, x20
	mov	x3, x19
	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	_ttm_bo_kmap_ttm
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PAGE_SHIFT,8,3                 ; @PAGE_SHIFT
.subsections_via_symbols
