	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function insert_iommu_master
_insert_iommu_master:                   ## @insert_iommu_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	(%rdi), %rbx
	movq	(%rsi), %rdi
	callq	_list_empty
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_GFP_ATOMIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kzalloc
	movq	%rax, %rbx
	movl	8(%r14), %eax
	movl	%eax, 20(%rbx)
	leaq	16(%rbx), %rdi
	movq	(%r12), %rsi
	callq	_list_add
	movq	%rbx, (%r14)
LBB0_2:
	movslq	(%rbx), %rax
	movl	%eax, %ecx
	testq	%rax, %rax
	jle	LBB0_3
## %bb.4:
	movq	8(%rbx), %rsi
	movq	(%r15), %rdx
	movq	(%rdx), %rdi
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rdi, (%rsi,%rdx,8)
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%rdx
	cmpq	%rdx, %rcx
	jne	LBB0_5
	jmp	LBB0_7
LBB0_3:
	movq	(%r15), %rdx
	movq	(%rdx), %rdi
	movq	8(%rbx), %rsi
LBB0_7:
	incl	%ecx
	movl	%ecx, (%rbx)
	movq	%rdi, (%rsi,%rax,8)
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_warn                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_ATOMIC,4,2                 ## @GFP_ATOMIC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Stream ID 0x%hx repeated; ignoring\n"

	.no_dead_strip	_insert_iommu_master
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function insert_iommu_master
_insert_iommu_master:                   ; @insert_iommu_master
	.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	x21, x2
	mov	x22, x1
	mov	x20, x0
	ldr	x19, [x0]
	ldr	x0, [x1]
	bl	_list_empty
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _GFP_ATOMIC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_ATOMIC@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kzalloc
	mov	x19, x0
	ldr	w8, [x20, #8]
	str	w8, [x0, #20]
	add	x0, x0, #16
	ldr	x1, [x22]
	bl	_list_add
	str	x19, [x20]
LBB0_2:
	ldr	w8, [x19]
	cmp	w8, #0
	b.le	LBB0_6
; %bb.3:
	mov	x2, #0
	ldr	x9, [x19, #8]
	ldr	x10, [x21]
	ldr	x10, [x10]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x9, x2, lsl #3]
	cmp	x11, x10
	b.eq	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x2, x2, #1
	cmp	x8, x2
	b.ne	LBB0_4
	b	LBB0_7
LBB0_6:
	ldr	x9, [x21]
	ldr	x10, [x9]
	ldr	x9, [x19, #8]
LBB0_7:
	sxtw	x11, w8
	add	w8, w8, #1
	str	w8, [x19]
	str	x10, [x9, x11, lsl #3]
	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
LBB0_8:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
                                        ; kill: def $w2 killed $w2 killed $x2
	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	_dev_warn
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_ATOMIC,4,2                 ; @GFP_ATOMIC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Stream ID 0x%hx repeated; ignoring\n"

	.no_dead_strip	_insert_iommu_master
.subsections_via_symbols
