	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_smmu_map
_tegra_smmu_map:                        ## @tegra_smmu_map
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %r13d
	movl	%edx, %r12d
	movq	%rsi, %r14
	callq	_to_smmu_as
	movq	%rax, %rbx
	leaq	-44(%rbp), %rdx
	movq	%rax, %rdi
	movq	%r14, %rsi
	callq	_as_get_pte
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	cmpq	$0, (%rax)
	jne	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_tegra_smmu_pte_get_use
LBB0_4:
	movl	%r12d, %edi
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	_SMMU_PTE_NONSECURE@GOTPCREL(%rip), %rax
	movq	_IOMMU_READ@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	movl	(%rcx), %ecx
	movl	$0, %r14d
	andl	%r13d, %ecx
	je	LBB0_6
## %bb.5:
	movq	_SMMU_PTE_READABLE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r14
LBB0_6:
	orq	(%rax), %r14
	movq	_IOMMU_WRITE@GOTPCREL(%rip), %rax
	movl	$0, %r12d
	andl	(%rax), %r13d
	je	LBB0_8
## %bb.7:
	movq	_SMMU_PTE_WRITABLE@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
LBB0_8:
	movl	-44(%rbp), %r13d
	callq	___phys_to_pfn
	orq	%rax, %r12
	orq	%r12, %r14
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	%r15, %rdx
	movl	%r13d, %ecx
	movq	%r14, %r8
	callq	_tegra_smmu_set_pte
	jmp	LBB0_9
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_SMMU_PTE_NONSECURE,8,3         ## @SMMU_PTE_NONSECURE
	.comm	_IOMMU_READ,4,2                 ## @IOMMU_READ
	.comm	_SMMU_PTE_READABLE,8,3          ## @SMMU_PTE_READABLE
	.comm	_IOMMU_WRITE,4,2                ## @IOMMU_WRITE
	.comm	_SMMU_PTE_WRITABLE,8,3          ## @SMMU_PTE_WRITABLE
	.no_dead_strip	_tegra_smmu_map
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_smmu_map
_tegra_smmu_map:                        ; @tegra_smmu_map
	.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	x22, x4
	mov	x20, x2
	mov	x19, x1
	bl	_to_smmu_as
	mov	x21, x0
	add	x2, sp, #12
	mov	x1, x19
	bl	_as_get_pte
	cbz	x0, LBB0_4
; %bb.1:
	mov	x23, x0
	ldr	x8, [x0]
	cbnz	x8, LBB0_3
; %bb.2:
	mov	x0, x21
	mov	x1, x19
	bl	_tegra_smmu_pte_get_use
LBB0_3:
Lloh0:
	adrp	x8, _SMMU_PTE_NONSECURE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SMMU_PTE_NONSECURE@GOTPAGEOFF]
Lloh2:
	adrp	x9, _IOMMU_READ@GOTPAGE
Lloh3:
	ldr	x9, [x9, _IOMMU_READ@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _SMMU_PTE_READABLE@GOTPAGE
Lloh7:
	ldr	x10, [x10, _SMMU_PTE_READABLE@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	tst	w9, w22
	csel	x9, xzr, x10, eq
	orr	x8, x9, x8
Lloh9:
	adrp	x9, _IOMMU_WRITE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _IOMMU_WRITE@GOTPAGEOFF]
Lloh11:
	adrp	x10, _SMMU_PTE_WRITABLE@GOTPAGE
Lloh12:
	ldr	x10, [x10, _SMMU_PTE_WRITABLE@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
Lloh14:
	ldr	x10, [x10]
	tst	w9, w22
	csel	x9, xzr, x10, eq
	orr	x24, x8, x9
	ldr	w22, [sp, #12]
	mov	x0, x20
	bl	___phys_to_pfn
	orr	x4, x24, x0
	mov	x0, x21
	mov	x1, x19
	mov	x2, x23
	mov	x3, x22
	bl	_tegra_smmu_set_pte
	mov	w0, #0
	b	LBB0_5
LBB0_4:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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	Lloh11, Lloh12, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh13
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_SMMU_PTE_NONSECURE,8,3         ; @SMMU_PTE_NONSECURE
	.comm	_IOMMU_READ,4,2                 ; @IOMMU_READ
	.comm	_SMMU_PTE_READABLE,8,3          ; @SMMU_PTE_READABLE
	.comm	_IOMMU_WRITE,4,2                ; @IOMMU_WRITE
	.comm	_SMMU_PTE_WRITABLE,8,3          ; @SMMU_PTE_WRITABLE
	.no_dead_strip	_tegra_smmu_map
.subsections_via_symbols
