	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tegra_smmu_add_device
_tegra_smmu_add_device:                 ## @tegra_smmu_add_device
	.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
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %r12
	leaq	L_.str(%rip), %rsi
	leaq	L_.str.1(%rip), %rdx
	leaq	-48(%rbp), %r8
	movq	%r12, %rdi
	xorl	%ecx, %ecx
	callq	_of_parse_phandle_with_args
	testq	%rax, %rax
	jne	LBB0_7
## %bb.1:
	movl	$1, %ebx
	leaq	L_.str.1(%rip), %r14
	leaq	-48(%rbp), %r15
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	-48(%rbp), %edi
	callq	_tegra_smmu_find
	testq	%rax, %rax
	jne	LBB0_3
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	-48(%rbp), %edi
	callq	_of_node_put
	movq	%r12, %rdi
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdx
	movl	%ebx, %ecx
	movq	%r15, %r8
	callq	_of_parse_phandle_with_args
	incl	%ebx
	testq	%rax, %rax
	je	LBB0_2
LBB0_7:
	movq	_ENODEV@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
LBB0_3:
	movq	%rax, %r13
	leaq	-48(%rbp), %rdx
	movq	%rax, %rdi
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_tegra_smmu_configure
	movl	%eax, %ebx
	movl	-48(%rbp), %edi
	callq	_of_node_put
	testl	%ebx, %ebx
	js	LBB0_9
## %bb.4:
	movq	%r13, (%r14)
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_iommu_device_link
	movq	%r14, %rdi
	callq	_iommu_group_get_for_dev
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	movq	%rbx, %rdi
	testq	%rax, %rax
	je	LBB0_8
## %bb.5:
	callq	_PTR_ERR
	movl	%eax, %ebx
	jmp	LBB0_9
LBB0_8:
	callq	_iommu_group_put
	xorl	%ebx, %ebx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"iommus"

L_.str.1:                               ## @.str.1
	.asciz	"#iommu-cells"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_tegra_smmu_add_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tegra_smmu_add_device
_tegra_smmu_add_device:                 ; @tegra_smmu_add_device
	.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, x0
	ldr	x20, [x0, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
Lloh2:
	adrp	x2, l_.str.1@PAGE
Lloh3:
	add	x2, x2, l_.str.1@PAGEOFF
	add	x4, sp, #8
	mov	x0, x20
	mov	w3, #0
	bl	_of_parse_phandle_with_args
	cbnz	x0, LBB0_4
; %bb.1:
	mov	w21, #1
Lloh4:
	adrp	x22, l_.str@PAGE
Lloh5:
	add	x22, x22, l_.str@PAGEOFF
Lloh6:
	adrp	x23, l_.str.1@PAGE
Lloh7:
	add	x23, x23, l_.str.1@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [sp, #8]
	bl	_tegra_smmu_find
	cbnz	x0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [sp, #8]
	bl	_of_node_put
	add	x4, sp, #8
	mov	x0, x20
	mov	x1, x22
	mov	x2, x23
	mov	x3, x21
	bl	_of_parse_phandle_with_args
	add	w21, w21, #1
	cbz	x0, LBB0_2
LBB0_4:
Lloh8:
	adrp	x8, _ENODEV@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_5:
	mov	x0, x20
	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
LBB0_6:
	mov	x24, x0
	add	x2, sp, #8
	mov	x1, x19
	bl	_tegra_smmu_configure
	mov	x20, x0
	ldr	w0, [sp, #8]
	bl	_of_node_put
	tbnz	w20, #31, LBB0_5
; %bb.7:
	str	x24, [x19]
	mov	x0, x24
	mov	x1, x19
	bl	_iommu_device_link
	mov	x0, x19
	bl	_iommu_group_get_for_dev
	mov	x19, x0
	bl	_IS_ERR
	cbz	x0, LBB0_9
; %bb.8:
	mov	x0, x19
	bl	_PTR_ERR
	mov	x20, x0
	b	LBB0_5
LBB0_9:
	mov	x0, x19
	bl	_iommu_group_put
	mov	w20, #0
	b	LBB0_5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"iommus"

l_.str.1:                               ; @.str.1
	.asciz	"#iommu-cells"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_tegra_smmu_add_device
.subsections_via_symbols
