	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qcom_iommu_add_device
_qcom_iommu_add_device:                 ## @qcom_iommu_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_dev_iommu_fwspec_get
	movl	%eax, %edi
	callq	_to_iommu
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	8(%rax), %rsi
	movq	_DL_FLAG_PM_RUNTIME@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_device_link_add
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%r14, %rdi
	callq	_iommu_group_get_for_dev
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_ERR_OR_NULL
	movq	%r15, %rdi
	testq	%rax, %rax
	je	LBB0_5
## %bb.7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR_OR_ZERO                ## TAILCALL
LBB0_3:
	movq	8(%rbx), %rbx
	movq	%rbx, %rdi
	callq	_dev_name
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_dev_name
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	movl	%eax, %ecx
	callq	_dev_err
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_5:
	callq	_iommu_group_put
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_iommu_device_link
	xorl	%eax, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_DL_FLAG_PM_RUNTIME,4,2         ## @DL_FLAG_PM_RUNTIME
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to create device link between %s and %s\n"

	.no_dead_strip	_qcom_iommu_add_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qcom_iommu_add_device
_qcom_iommu_add_device:                 ; @qcom_iommu_add_device
	.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
	mov	x19, x0
	bl	_dev_iommu_fwspec_get
	bl	_to_iommu
	cbz	x0, LBB0_5
; %bb.1:
	mov	x20, x0
	ldr	x1, [x0, #8]
Lloh0:
	adrp	x8, _DL_FLAG_PM_RUNTIME@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DL_FLAG_PM_RUNTIME@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_device_link_add
	cbz	x0, LBB0_4
; %bb.2:
	mov	x0, x19
	bl	_iommu_group_get_for_dev
	mov	x21, x0
	bl	_IS_ERR_OR_NULL
	cbz	x0, LBB0_6
; %bb.3:
	mov	x0, x21
	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
	b	_PTR_ERR_OR_ZERO
LBB0_4:
	ldr	x20, [x20, #8]
	mov	x0, x20
	bl	_dev_name
	mov	x21, x0
	mov	x0, x19
	bl	_dev_name
	mov	x3, x0
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_dev_err
LBB0_5:
Lloh5:
	adrp	x8, _ENODEV@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_6:
	mov	x0, x21
	bl	_iommu_group_put
	mov	x0, x20
	mov	x1, x19
	bl	_iommu_device_link
	mov	w0, #0
LBB0_7:
	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 AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_DL_FLAG_PM_RUNTIME,4,2         ; @DL_FLAG_PM_RUNTIME
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to create device link between %s and %s\n"

	.no_dead_strip	_qcom_iommu_add_device
.subsections_via_symbols
