	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function arm_smmu_register_legacy_master
_arm_smmu_register_legacy_master:       ## @arm_smmu_register_legacy_master
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r12
	leaq	-72(%rbp), %rax
	movq	%rax, -48(%rbp)
	callq	_dev_get_dev_node
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_9
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_of_find_property
	testl	%eax, %eax
	je	LBB0_9
## %bb.2:
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	movq	%rbx, -56(%rbp)
	movq	___find_legacy_master_phandle@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_arm_smmu_driver@GOTPCREL(%rip), %rdi
	xorl	%r13d, %r13d
	leaq	-48(%rbp), %rdx
	xorl	%esi, %esi
	callq	_driver_for_each_device
	movl	%eax, %r15d
	movq	-48(%rbp), %r14
	movq	%rbx, %rdi
	callq	_of_node_put
	testl	%r15d, %r15d
	je	LBB0_13
## %bb.3:
	js	LBB0_14
## %bb.4:
	movq	%r12, %rdi
	callq	_dev_is_pci
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%r12, %rdi
	callq	_to_pci_dev
	movq	___arm_smmu_get_pci_sid@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	-84(%rbp), %rbx
	movl	%eax, %edi
	movq	%rbx, %rdx
	callq	_pci_for_each_dma_alias
	movq	%rbx, -64(%rbp)
	movl	$1, -72(%rbp)
LBB0_6:
	movq	(%r14), %rsi
	movq	_arm_smmu_ops@GOTPCREL(%rip), %rdx
	movq	%r12, %rdi
	callq	_iommu_fwspec_init
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.7:
	movl	-72(%rbp), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$4, %esi
	callq	_kcalloc
	testq	%rax, %rax
	je	LBB0_15
## %bb.8:
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	_dev_get_drvdata
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	movl	-72(%rbp), %edx
	leaq	-72(%rbp), %rdi
	movq	%r15, %rsi
	callq	_of_phandle_iterator_args
	movl	-72(%rbp), %edx
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_iommu_fwspec_add_ids
	movl	%eax, %r13d
	movq	%r15, %rdi
	callq	_kfree
	jmp	LBB0_12
LBB0_9:
	movq	%rbx, %rdi
	callq	_of_node_put
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_10:
	xorl	%r13d, %r13d
LBB0_11:
	subl	(%rax), %r13d
LBB0_12:
	movl	%r13d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_14:
	movl	%r15d, %r13d
	jmp	LBB0_12
LBB0_15:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"#stream-id-cells"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_arm_smmu_driver,4,2            ## @arm_smmu_driver
	.comm	___find_legacy_master_phandle,4,2 ## @__find_legacy_master_phandle
	.comm	___arm_smmu_get_pci_sid,4,2     ## @__arm_smmu_get_pci_sid
	.comm	_arm_smmu_ops,4,2               ## @arm_smmu_ops
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_arm_smmu_register_legacy_master
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function arm_smmu_register_legacy_master
_arm_smmu_register_legacy_master:       ; @arm_smmu_register_legacy_master
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x1
	mov	x19, x0
	add	x8, sp, #24
	str	x8, [sp, #16]
	bl	_dev_get_dev_node
	mov	x23, x0
	cbz	x0, LBB0_9
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	mov	x2, #0
	bl	_of_find_property
	cbz	w0, LBB0_9
; %bb.2:
	str	x23, [sp, #40]
Lloh2:
	adrp	x8, ___find_legacy_master_phandle@GOTPAGE
Lloh3:
	ldr	x8, [x8, ___find_legacy_master_phandle@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
Lloh5:
	adrp	x0, _arm_smmu_driver@GOTPAGE
Lloh6:
	ldr	x0, [x0, _arm_smmu_driver@GOTPAGEOFF]
	add	x2, sp, #16
	mov	x1, #0
	bl	_driver_for_each_device
	mov	x22, x0
	ldr	x21, [sp, #16]
	mov	x0, x23
	bl	_of_node_put
	cbz	w22, LBB0_10
; %bb.3:
	tbnz	w22, #31, LBB0_12
; %bb.4:
	mov	x0, x19
	bl	_dev_is_pci
	cbz	x0, LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_to_pci_dev
Lloh7:
	adrp	x8, ___arm_smmu_get_pci_sid@GOTPAGE
Lloh8:
	ldr	x8, [x8, ___arm_smmu_get_pci_sid@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	add	x22, sp, #12
	add	x2, sp, #12
	bl	_pci_for_each_dma_alias
	str	x22, [sp, #32]
	mov	w8, #1
	str	w8, [sp, #24]
LBB0_6:
	ldr	x1, [x21]
Lloh10:
	adrp	x2, _arm_smmu_ops@GOTPAGE
Lloh11:
	ldr	x2, [x2, _arm_smmu_ops@GOTPAGEOFF]
	mov	x0, x19
	bl	_iommu_fwspec_init
	mov	x22, x0
	cbnz	w0, LBB0_12
; %bb.7:
	ldr	w0, [sp, #24]
Lloh12:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	w1, #4
	bl	_kcalloc
	cbz	x0, LBB0_13
; %bb.8:
	mov	x23, x0
	mov	x0, x21
	bl	_dev_get_drvdata
	str	x0, [x20]
	ldr	w2, [sp, #24]
	add	x0, sp, #24
	mov	x1, x23
	bl	_of_phandle_iterator_args
	ldr	w2, [sp, #24]
	mov	x0, x19
	mov	x1, x23
	bl	_iommu_fwspec_add_ids
	mov	x22, x0
	mov	x0, x23
	bl	_kfree
	b	LBB0_12
LBB0_9:
	mov	x0, x23
	bl	_of_node_put
LBB0_10:
Lloh15:
	adrp	x8, _ENODEV@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_12:
	mov	x0, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_13:
Lloh17:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_11
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"#stream-id-cells"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_arm_smmu_driver,4,2            ; @arm_smmu_driver
	.comm	___find_legacy_master_phandle,4,2 ; @__find_legacy_master_phandle
	.comm	___arm_smmu_get_pci_sid,4,2     ; @__arm_smmu_get_pci_sid
	.comm	_arm_smmu_ops,4,2               ; @arm_smmu_ops
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_arm_smmu_register_legacy_master
.subsections_via_symbols
