	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function iommu_alloc_msi_intr
LCPI0_0:
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	1                               ## 0x1
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
	.byte	0                               ## 0x0
LCPI0_1:
	.quad	2                               ## 0x2
	.quad	2                               ## 0x2
LCPI0_2:
	.quad	4                               ## 0x4
	.quad	4                               ## 0x4
LCPI0_3:
	.quad	8                               ## 0x8
	.quad	8                               ## 0x8
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_iommu_alloc_msi_intr
	.p2align	4, 0x90
_iommu_alloc_msi_intr:                  ## @iommu_alloc_msi_intr
	.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	%rdx, %r14
	movq	%rsi, %r15
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_dmar_ir_find
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	cmpl	$0, 4(%rax)
	je	LBB0_2
## %bb.5:
	movl	(%rax), %edi
	movq	_M_FIRSTFIT@GOTPCREL(%rip), %rax
	movq	_M_NOWAIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	leaq	-32(%rbp), %rcx
	movq	%r14, %rsi
	callq	_vmem_alloc
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %ebx
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	cmpl	(%rax), %ebx
	setne	%dil
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	jmp	LBB0_19
LBB0_2:
	testq	%r14, %r14
	je	LBB0_4
## %bb.3:
	shlq	$3, %r14
	movq	%r15, %rdi
	movl	$255, %esi
	movq	%r14, %rdx
	callq	_memset
LBB0_4:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_19:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	testq	%r14, %r14
	je	LBB0_18
## %bb.8:
	movq	-32(%rbp), %rax
	cmpq	$4, %r14
	jae	LBB0_10
## %bb.9:
	xorl	%ecx, %ecx
	jmp	LBB0_17
LBB0_10:
	movq	%r14, %rcx
	andq	$-4, %rcx
	movq	%rax, %xmm1
	pshufd	$68, %xmm1, %xmm0               ## xmm0 = xmm1[0,1,0,1]
	leaq	-4(%rcx), %rsi
	movq	%rsi, %rdx
	shrq	$2, %rdx
	incq	%rdx
	testq	%rsi, %rsi
	je	LBB0_11
## %bb.12:
	movq	%rdx, %rdi
	andq	$-2, %rdi
	movdqa	LCPI0_1(%rip), %xmm2            ## xmm2 = [2,2]
	paddq	%xmm1, %xmm2
	pshufd	$68, %xmm2, %xmm3               ## xmm3 = xmm2[0,1,0,1]
	movdqa	LCPI0_0(%rip), %xmm2            ## xmm2 = [0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0]
	xorl	%esi, %esi
	movdqa	LCPI0_2(%rip), %xmm4            ## xmm4 = [4,4]
	movdqa	LCPI0_3(%rip), %xmm5            ## xmm5 = [8,8]
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movdqa	%xmm2, %xmm6
	paddq	%xmm0, %xmm6
	movdqa	%xmm3, %xmm7
	paddq	%xmm2, %xmm7
	movdqu	%xmm6, (%r15,%rsi,8)
	movdqu	%xmm7, 16(%r15,%rsi,8)
	movdqa	%xmm2, %xmm6
	paddq	%xmm4, %xmm6
	movdqa	%xmm3, %xmm7
	paddq	%xmm6, %xmm7
	paddq	%xmm0, %xmm6
	movdqu	%xmm6, 32(%r15,%rsi,8)
	movdqu	%xmm7, 48(%r15,%rsi,8)
	addq	$8, %rsi
	paddq	%xmm5, %xmm2
	addq	$-2, %rdi
	jne	LBB0_13
	jmp	LBB0_14
LBB0_11:
	movdqa	LCPI0_0(%rip), %xmm2            ## xmm2 = [0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0]
	xorl	%esi, %esi
LBB0_14:
	testb	$1, %dl
	je	LBB0_16
## %bb.15:
	paddq	%xmm2, %xmm0
	paddq	LCPI0_1(%rip), %xmm1
	pshufd	$68, %xmm1, %xmm1               ## xmm1 = xmm1[0,1,0,1]
	paddq	%xmm2, %xmm1
	movdqu	%xmm0, (%r15,%rsi,8)
	movdqu	%xmm1, 16(%r15,%rsi,8)
LBB0_16:
	xorl	%ebx, %ebx
	cmpq	%r14, %rcx
	je	LBB0_19
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	leaq	(%rax,%rcx), %rdx
	movq	%rdx, (%r15,%rcx,8)
	incq	%rcx
	cmpq	%rcx, %r14
	jne	LBB0_17
LBB0_18:
	xorl	%ebx, %ebx
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_M_FIRSTFIT,4,2                 ## @M_FIRSTFIT
	.comm	_M_NOWAIT,4,2                   ## @M_NOWAIT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"impossible EOPNOTSUPP from vmem"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ; -- Begin function iommu_alloc_msi_intr
lCPI0_0:
	.quad	0                               ; 0x0
	.quad	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_iommu_alloc_msi_intr
	.p2align	2
_iommu_alloc_msi_intr:                  ; @iommu_alloc_msi_intr
	.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, x2
	mov	x19, x1
	mov	x1, #0
	mov	x2, #0
	bl	_dmar_ir_find
	cbz	x0, LBB0_4
; %bb.1:
	ldr	w8, [x0, #4]
	cbz	w8, LBB0_4
; %bb.2:
Lloh0:
	adrp	x8, _M_FIRSTFIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _M_FIRSTFIT@GOTPAGEOFF]
	ldr	w0, [x0]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _M_NOWAIT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _M_NOWAIT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w2, w9, w8
	add	x3, sp, #8
	mov	x1, x20
	bl	_vmem_alloc
	cbz	w0, LBB0_8
; %bb.3:
	mov	x21, x0
Lloh6:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w0, w8
	cset	w0, ne
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
	b	LBB0_7
LBB0_4:
	cbz	x20, LBB0_6
; %bb.5:
	lsl	x2, x20, #3
	mov	x0, x19
	mov	w1, #255
	bl	_memset
LBB0_6:
Lloh11:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh13:
	ldr	w21, [x8]
LBB0_7:
	mov	x0, x21
	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_8:
	cbz	x20, LBB0_16
; %bb.9:
	ldr	x8, [sp, #8]
	cmp	x20, #8
	b.hs	LBB0_11
; %bb.10:
	mov	x9, #0
	b	LBB0_14
LBB0_11:
	dup.2d	v0, x8
	fmov	d3, x8
	mov	w9, #2
	fmov	d1, x9
	add.2d	v1, v3, v1
	dup.2d	v1, v1[0]
	and	x9, x20, #0xfffffffffffffff8
	mov	w10, #4
	fmov	d2, x10
	add.2d	v2, v3, v2
	dup.2d	v2, v2[0]
	mov	w10, #6
	fmov	d4, x10
	add.2d	v3, v3, v4
	dup.2d	v3, v3[0]
Lloh14:
	adrp	x10, lCPI0_0@PAGE
Lloh15:
	ldr	q4, [x10, lCPI0_0@PAGEOFF]
	add	x10, x19, #32
	mov	w11, #8
	dup.2d	v5, x11
	mov	x11, x9
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	add.2d	v6, v4, v0
	add.2d	v7, v1, v4
	add.2d	v16, v2, v4
	add.2d	v17, v3, v4
	stp	q6, q7, [x10, #-32]
	stp	q16, q17, [x10], #64
	add.2d	v4, v4, v5
	subs	x11, x11, #8
	b.ne	LBB0_12
; %bb.13:
	cmp	x9, x20
	b.eq	LBB0_16
LBB0_14:
	sub	x10, x20, x9
	add	x11, x19, x9, lsl #3
	add	x8, x9, x8
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	str	x8, [x11], #8
	add	x8, x8, #1
	subs	x10, x10, #1
	b.ne	LBB0_15
LBB0_16:
	mov	w21, #0
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdr	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_M_FIRSTFIT,4,2                 ; @M_FIRSTFIT
	.comm	_M_NOWAIT,4,2                   ; @M_NOWAIT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"impossible EOPNOTSUPP from vmem"

.subsections_via_symbols
