	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_smmu_domain_alloc
_tegra_smmu_domain_alloc:               ## @tegra_smmu_domain_alloc
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_IOMMU_DOMAIN_UNMANAGED@GOTPCREL(%rip), %rax
	cmpl	%edi, (%rax)
	jne	LBB0_11
## %bb.1:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movl	$48, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_11
## %bb.2:
	movq	%rax, %rbx
	movq	_SMMU_PD_READABLE@GOTPCREL(%rip), %rax
	movq	_SMMU_PD_WRITABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_SMMU_PD_NONSECURE@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, (%rbx)
	movq	___GFP_DMA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	orl	(%r14), %edi
	movq	___GFP_ZERO@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	callq	_alloc_page
	movl	%eax, 24(%rbx)
	testl	%eax, %eax
	je	LBB0_10
## %bb.3:
	movq	_SMMU_NUM_PDE@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	movl	(%r14), %edx
	movl	$4, %esi
	callq	_kcalloc
	movq	%rax, 32(%rbx)
	testq	%rax, %rax
	je	LBB0_9
## %bb.4:
	movl	(%r15), %edi
	movl	(%r14), %edx
	movl	$1, %esi
	callq	_kcalloc
	movq	%rax, 40(%rbx)
	testq	%rax, %rax
	je	LBB0_8
## %bb.5:
	movq	%rbx, %rax
	addq	$8, %rax
	movq	$0, 16(%rbx)
	movabsq	$8589934591, %rcx               ## imm = 0x1FFFFFFFF
	movq	%rcx, 8(%rbx)
	jmp	LBB0_12
LBB0_8:
	movq	32(%rbx), %rdi
	callq	_kfree
LBB0_9:
	movl	24(%rbx), %edi
	callq	___free_page
LBB0_10:
	movq	%rbx, %rdi
	callq	_kfree
LBB0_11:
	xorl	%eax, %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IOMMU_DOMAIN_UNMANAGED,4,2     ## @IOMMU_DOMAIN_UNMANAGED
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_SMMU_PD_READABLE,4,2           ## @SMMU_PD_READABLE
	.comm	_SMMU_PD_WRITABLE,4,2           ## @SMMU_PD_WRITABLE
	.comm	_SMMU_PD_NONSECURE,4,2          ## @SMMU_PD_NONSECURE
	.comm	___GFP_DMA,4,2                  ## @__GFP_DMA
	.comm	___GFP_ZERO,4,2                 ## @__GFP_ZERO
	.comm	_SMMU_NUM_PDE,4,2               ## @SMMU_NUM_PDE
	.no_dead_strip	_tegra_smmu_domain_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function tegra_smmu_domain_alloc
lCPI0_0:
	.long	4294967295                      ; 0xffffffff
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_tegra_smmu_domain_alloc:               ; @tegra_smmu_domain_alloc
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
Lloh0:
	adrp	x8, _IOMMU_DOMAIN_UNMANAGED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IOMMU_DOMAIN_UNMANAGED@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w0
	b.ne	LBB0_9
; %bb.1:
Lloh3:
	adrp	x20, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x20, [x20, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	w0, #48
	bl	_kzalloc
	mov	x19, x0
	cbz	x0, LBB0_10
; %bb.2:
Lloh5:
	adrp	x8, _SMMU_PD_READABLE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SMMU_PD_READABLE@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _SMMU_PD_WRITABLE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _SMMU_PD_WRITABLE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh11:
	adrp	x9, _SMMU_PD_NONSECURE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _SMMU_PD_NONSECURE@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w8, w9
	str	w8, [x19]
	ldr	w8, [x20]
Lloh14:
	adrp	x9, ___GFP_DMA@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___GFP_DMA@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh17:
	adrp	x9, ___GFP_ZERO@GOTPAGE
Lloh18:
	ldr	x9, [x9, ___GFP_ZERO@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w0, w8, w9
	bl	_alloc_page
	str	w0, [x19, #24]
	cbz	w0, LBB0_8
; %bb.3:
Lloh20:
	adrp	x21, _SMMU_NUM_PDE@GOTPAGE
Lloh21:
	ldr	x21, [x21, _SMMU_NUM_PDE@GOTPAGEOFF]
	ldr	w0, [x21]
	ldr	w2, [x20]
	mov	w1, #4
	bl	_kcalloc
	str	x0, [x19, #32]
	cbz	x0, LBB0_7
; %bb.4:
	ldr	w0, [x21]
	ldr	w2, [x20]
	mov	w1, #1
	bl	_kcalloc
	str	x0, [x19, #40]
	cbz	x0, LBB0_6
; %bb.5:
Lloh22:
	adrp	x8, lCPI0_0@PAGE
Lloh23:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x19, #8]!
	str	xzr, [x19, #8]
	b	LBB0_10
LBB0_6:
	ldr	x0, [x19, #32]
	bl	_kfree
LBB0_7:
	ldr	w0, [x19, #24]
	bl	___free_page
LBB0_8:
	mov	x0, x19
	bl	_kfree
LBB0_9:
	mov	x19, #0
LBB0_10:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdr	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_IOMMU_DOMAIN_UNMANAGED,4,2     ; @IOMMU_DOMAIN_UNMANAGED
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_SMMU_PD_READABLE,4,2           ; @SMMU_PD_READABLE
	.comm	_SMMU_PD_WRITABLE,4,2           ; @SMMU_PD_WRITABLE
	.comm	_SMMU_PD_NONSECURE,4,2          ; @SMMU_PD_NONSECURE
	.comm	___GFP_DMA,4,2                  ; @__GFP_DMA
	.comm	___GFP_ZERO,4,2                 ; @__GFP_ZERO
	.comm	_SMMU_NUM_PDE,4,2               ; @SMMU_NUM_PDE
	.no_dead_strip	_tegra_smmu_domain_alloc
.subsections_via_symbols
