	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iommu_group_get_for_dev        ## -- Begin function iommu_group_get_for_dev
	.p2align	4, 0x90
_iommu_group_get_for_dev:               ## @iommu_group_get_for_dev
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movq	(%rax), %rbx
	callq	_iommu_group_get
	movq	%rax, %r13
	testq	%rax, %rax
	je	LBB0_2
LBB0_1:
	movq	%r13, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	testq	%rbx, %rbx
	je	LBB0_4
## %bb.3:
	movq	%r14, %rdi
	callq	*(%rbx)
	movq	%rax, %r13
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_WARN_ON_ONCE
	testq	%rax, %rax
	je	LBB0_5
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_5:
	movq	%r13, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_1
## %bb.6:
	cmpq	$0, 8(%r13)
	jne	LBB0_18
## %bb.7:
	movq	(%r14), %rdi
	movq	_iommu_def_domain_type@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	callq	___iommu_domain_alloc
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_13
## %bb.8:
	movq	_IOMMU_DOMAIN_DMA@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	cmpq	%rsi, (%r12)
	je	LBB0_12
## %bb.10:
	movq	(%r14), %rdi
	callq	___iommu_domain_alloc
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	%rax, %r15
	movq	(%r12), %rdx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_warn
	jmp	LBB0_13
LBB0_12:
	xorl	%r15d, %r15d
LBB0_13:
	movq	%r15, 8(%r13)
	cmpq	$0, (%r13)
	jne	LBB0_15
## %bb.14:
	movq	%r15, (%r13)
LBB0_15:
	testq	%r15, %r15
	je	LBB0_18
## %bb.16:
	movq	_iommu_dma_strict@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jne	LBB0_18
## %bb.17:
	movl	$1, -44(%rbp)
	movq	_DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	callq	_iommu_domain_set_attr
LBB0_18:
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_iommu_group_add_device
	testl	%eax, %eax
	je	LBB0_1
## %bb.19:
	movl	%eax, %r14d
	movq	%r13, %rdi
	callq	_iommu_group_put
	movl	%r14d, %edi
	callq	_ERR_PTR
	movq	%rax, %r13
	jmp	LBB0_1
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_iommu_def_domain_type,8,3      ## @iommu_def_domain_type
	.comm	_IOMMU_DOMAIN_DMA,8,3           ## @IOMMU_DOMAIN_DMA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to allocate default IOMMU domain of type %u; falling back to IOMMU_DOMAIN_DMA"

	.comm	_iommu_dma_strict,4,2           ## @iommu_dma_strict
	.comm	_DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE,4,2 ## @DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_iommu_group_get_for_dev        ; -- Begin function iommu_group_get_for_dev
	.p2align	2
_iommu_group_get_for_dev:               ; @iommu_group_get_for_dev
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x20, x0
	ldr	x8, [x0]
	ldr	x21, [x8]
	bl	_iommu_group_get
	mov	x19, x0
	cbz	x0, LBB0_2
LBB0_1:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_2:
	cbz	x21, LBB0_4
; %bb.3:
	ldr	x8, [x21]
	mov	x0, x20
	blr	x8
	mov	x19, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_WARN_ON_ONCE
	cbz	x0, LBB0_5
LBB0_4:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	b	_ERR_PTR
LBB0_5:
	mov	x0, x19
	bl	_IS_ERR
	cbnz	x0, LBB0_1
; %bb.6:
	ldr	x8, [x19, #8]
	cbnz	x8, LBB0_17
; %bb.7:
	ldr	x0, [x20]
Lloh3:
	adrp	x22, _iommu_def_domain_type@GOTPAGE
Lloh4:
	ldr	x22, [x22, _iommu_def_domain_type@GOTPAGEOFF]
	ldr	x1, [x22]
	bl	___iommu_domain_alloc
	mov	x21, x0
	cbnz	x0, LBB0_12
; %bb.8:
	ldr	x8, [x22]
Lloh5:
	adrp	x9, _IOMMU_DOMAIN_DMA@GOTPAGE
Lloh6:
	ldr	x9, [x9, _IOMMU_DOMAIN_DMA@GOTPAGEOFF]
Lloh7:
	ldr	x1, [x9]
	cmp	x8, x1
	b.ne	LBB0_10
; %bb.9:
	mov	x21, #0
	b	LBB0_12
LBB0_10:
	ldr	x0, [x20]
	bl	___iommu_domain_alloc
	mov	x21, x0
	cbz	x0, LBB0_12
; %bb.11:
	ldr	x2, [x22]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_warn
LBB0_12:
	str	x21, [x19, #8]
	ldr	x8, [x19]
	cbnz	x8, LBB0_14
; %bb.13:
	str	x21, [x19]
LBB0_14:
	cbz	x21, LBB0_17
; %bb.15:
Lloh10:
	adrp	x8, _iommu_dma_strict@GOTPAGE
Lloh11:
	ldr	x8, [x8, _iommu_dma_strict@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	cbnz	w8, LBB0_17
; %bb.16:
	mov	w8, #1
	str	w8, [sp, #12]
Lloh13:
	adrp	x8, _DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x21
	bl	_iommu_domain_set_attr
LBB0_17:
	mov	x0, x19
	mov	x1, x20
	bl	_iommu_group_add_device
	cbz	w0, LBB0_1
; %bb.18:
	mov	x20, x0
	mov	x0, x19
	bl	_iommu_group_put
	mov	x0, x20
	bl	_ERR_PTR
	mov	x19, x0
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_iommu_def_domain_type,8,3      ; @iommu_def_domain_type
	.comm	_IOMMU_DOMAIN_DMA,8,3           ; @IOMMU_DOMAIN_DMA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to allocate default IOMMU domain of type %u; falling back to IOMMU_DOMAIN_DMA"

	.comm	_iommu_dma_strict,4,2           ; @iommu_dma_strict
	.comm	_DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE,4,2 ; @DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE
.subsections_via_symbols
