	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_bo_kmap
_tegra_bo_kmap:                         ## @tegra_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %ebx
	callq	_host1x_to_tegra_bo
	movq	(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_1
## %bb.3:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	imull	(%rax), %ebx
	addq	%rbx, %rcx
	movq	%rcx, %rax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_1:
	movq	16(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_2
## %bb.4:
	movl	(%rcx), %edi
	movl	%ebx, %esi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_dma_buf_kmap                   ## TAILCALL
LBB0_2:
	movl	%ebx, %ebx
	addq	8(%rax), %rbx
	movq	_VM_MAP@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_PAGE_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_pgprot_writecombine
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	%r14d, %edx
	movl	%eax, %ecx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_vmap                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_VM_MAP,4,2                     ## @VM_MAP
	.comm	_PAGE_KERNEL,4,2                ## @PAGE_KERNEL
	.no_dead_strip	_tegra_bo_kmap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_bo_kmap
_tegra_bo_kmap:                         ; @tegra_bo_kmap
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	bl	_host1x_to_tegra_bo
	ldr	x8, [x0]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x9, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PAGE_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	mul	w9, w9, w19
	add	x0, x8, x9
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_2:
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	w0, [x8]
	mov	x1, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_dma_buf_kmap
LBB0_4:
	ldr	x8, [x0, #8]
	add	x19, x8, w19, uxtw
Lloh3:
	adrp	x8, _VM_MAP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VM_MAP@GOTPAGEOFF]
Lloh5:
	ldr	w20, [x8]
Lloh6:
	adrp	x8, _PAGE_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PAGE_KERNEL@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_pgprot_writecombine
	mov	x3, x0
	mov	x0, x19
	mov	w1, #1
	mov	x2, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_vmap
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_VM_MAP,4,2                     ; @VM_MAP
	.comm	_PAGE_KERNEL,4,2                ; @PAGE_KERNEL
	.no_dead_strip	_tegra_bo_kmap
.subsections_via_symbols
