	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function fsl_pcib_alloc_msi
LCPI0_0:
	.long	0                               ## 0x0
	.long	1                               ## 0x1
	.long	2                               ## 0x2
	.long	3                               ## 0x3
LCPI0_1:
	.long	8                               ## 0x8
	.long	8                               ## 0x8
	.long	8                               ## 0x8
	.long	8                               ## 0x8
LCPI0_2:
	.long	16                              ## 0x10
	.long	16                              ## 0x10
	.long	16                              ## 0x10
	.long	16                              ## 0x10
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_fsl_pcib_alloc_msi:                    ## @fsl_pcib_alloc_msi
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r15
	movl	%edx, %r14d
	callq	_device_get_softc
	movq	_msi_vmem@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	testq	%r12, %r12
	je	LBB0_1
## %bb.2:
	movl	%r14d, %edi
	callq	_powerof2
	movq	_VMEM_ADDR_MIN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	movq	_VMEM_ADDR_MAX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r10d
	movq	_M_BESTFIT@GOTPCREL(%rip), %rcx
	movq	_M_WAITOK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
	orl	(%rcx), %ebx
	subq	$8, %rsp
	leaq	-36(%rbp), %r11
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	pushq	%r11
	pushq	%rbx
	pushq	%r10
	callq	_vmem_xalloc
	addq	$32, %rsp
	testl	%eax, %eax
	jne	LBB0_15
## %bb.3:
	movl	$0, %eax
	testl	%r14d, %r14d
	jle	LBB0_15
## %bb.4:
	movl	-36(%rbp), %ecx
	movl	%r14d, %edx
	cmpl	$8, %r14d
	jae	LBB0_6
## %bb.5:
	xorl	%esi, %esi
	jmp	LBB0_13
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_15
LBB0_6:
	movl	%edx, %esi
	andl	$-8, %esi
	movd	%ecx, %xmm1
	pshufd	$0, %xmm1, %xmm0                ## xmm0 = xmm1[0,0,0,0]
	leaq	-8(%rsi), %rax
	movq	%rax, %rbx
	shrq	$3, %rbx
	incq	%rbx
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rbx, %rax
	andq	$-2, %rax
	movl	$4, %edi
	movd	%edi, %xmm2
	paddd	%xmm1, %xmm2
	pshufd	$0, %xmm2, %xmm3                ## xmm3 = xmm2[0,0,0,0]
	movdqa	LCPI0_0(%rip), %xmm2            ## xmm2 = [0,1,2,3]
	xorl	%edi, %edi
	movdqa	LCPI0_1(%rip), %xmm4            ## xmm4 = [8,8,8,8]
	movdqa	LCPI0_2(%rip), %xmm5            ## xmm5 = [16,16,16,16]
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movdqa	%xmm0, %xmm6
	paddd	%xmm2, %xmm6
	movdqa	%xmm3, %xmm7
	paddd	%xmm2, %xmm7
	movdqu	%xmm6, (%r15,%rdi,4)
	movdqu	%xmm7, 16(%r15,%rdi,4)
	movdqa	%xmm2, %xmm6
	paddd	%xmm4, %xmm6
	movdqa	%xmm0, %xmm7
	paddd	%xmm6, %xmm7
	paddd	%xmm3, %xmm6
	movdqu	%xmm7, 32(%r15,%rdi,4)
	movdqu	%xmm6, 48(%r15,%rdi,4)
	addq	$16, %rdi
	paddd	%xmm5, %xmm2
	addq	$-2, %rax
	jne	LBB0_9
## %bb.10:
	testb	$1, %bl
	je	LBB0_12
LBB0_11:
	paddd	%xmm2, %xmm0
	movl	$4, %eax
	movd	%eax, %xmm3
	paddd	%xmm3, %xmm1
	pshufd	$0, %xmm1, %xmm1                ## xmm1 = xmm1[0,0,0,0]
	paddd	%xmm2, %xmm1
	movdqu	%xmm0, (%r15,%rdi,4)
	movdqu	%xmm1, 16(%r15,%rdi,4)
LBB0_12:
	xorl	%eax, %eax
	cmpq	%rdx, %rsi
	je	LBB0_15
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	leal	(%rcx,%rsi), %eax
	movl	%eax, (%r15,%rsi,4)
	incq	%rsi
	cmpq	%rsi, %rdx
	jne	LBB0_13
## %bb.14:
	xorl	%eax, %eax
LBB0_15:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movdqa	LCPI0_0(%rip), %xmm2            ## xmm2 = [0,1,2,3]
	xorl	%edi, %edi
	testb	$1, %bl
	jne	LBB0_11
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_msi_vmem,8,3                   ## @msi_vmem
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_VMEM_ADDR_MIN,4,2              ## @VMEM_ADDR_MIN
	.comm	_VMEM_ADDR_MAX,4,2              ## @VMEM_ADDR_MAX
	.comm	_M_BESTFIT,4,2                  ## @M_BESTFIT
	.comm	_M_WAITOK,4,2                   ## @M_WAITOK
	.no_dead_strip	_fsl_pcib_alloc_msi
.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 fsl_pcib_alloc_msi
lCPI0_0:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.long	2                               ; 0x2
	.long	3                               ; 0x3
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_fsl_pcib_alloc_msi:                    ; @fsl_pcib_alloc_msi
	.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	x19, x4
	mov	x20, x2
	bl	_device_get_softc
Lloh0:
	adrp	x8, _msi_vmem@GOTPAGE
Lloh1:
	ldr	x8, [x8, _msi_vmem@GOTPAGEOFF]
Lloh2:
	ldr	x21, [x8]
	cbz	x21, LBB0_5
; %bb.1:
	mov	x0, x20
	bl	_powerof2
	mov	x2, x0
Lloh3:
	adrp	x8, _VMEM_ADDR_MIN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VMEM_ADDR_MIN@GOTPAGEOFF]
Lloh5:
	ldr	w5, [x8]
Lloh6:
	adrp	x8, _VMEM_ADDR_MAX@GOTPAGE
Lloh7:
	ldr	x8, [x8, _VMEM_ADDR_MAX@GOTPAGEOFF]
Lloh8:
	adrp	x9, _M_BESTFIT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _M_BESTFIT@GOTPAGEOFF]
Lloh10:
	ldr	w6, [x8]
Lloh11:
	ldr	w8, [x9]
Lloh12:
	adrp	x9, _M_WAITOK@GOTPAGE
Lloh13:
	ldr	x9, [x9, _M_WAITOK@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w7, w9, w8
	add	x8, sp, #12
	str	x8, [sp]
	mov	x0, x21
	mov	x1, x20
	mov	w3, #0
	mov	w4, #0
	bl	_vmem_xalloc
	cbnz	w0, LBB0_12
; %bb.2:
	cmp	w20, #1
	b.lt	LBB0_11
; %bb.3:
	ldr	w9, [sp, #12]
	mov	w8, w20
	cmp	w20, #16
	b.hs	LBB0_6
; %bb.4:
	mov	x10, #0
	b	LBB0_9
LBB0_5:
Lloh15:
	adrp	x8, _ENODEV@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	b	LBB0_12
LBB0_6:
	fmov	s3, w9
	dup.4s	v0, w9
	movi.4s	v1, #4
	add.4s	v1, v3, v1
	dup.4s	v1, v1[0]
	movi.4s	v2, #8
	add.4s	v2, v3, v2
	dup.4s	v2, v2[0]
	movi.4s	v4, #12
	add.4s	v3, v3, v4
	dup.4s	v3, v3[0]
	and	x10, x8, #0xfffffff0
Lloh18:
	adrp	x11, lCPI0_0@PAGE
Lloh19:
	ldr	q4, [x11, lCPI0_0@PAGEOFF]
	add	x11, x19, #32
	movi.4s	v5, #16
	mov	x12, x10
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	add.4s	v6, v0, v4
	add.4s	v7, v1, v4
	add.4s	v16, v2, v4
	add.4s	v17, v3, v4
	stp	q6, q7, [x11, #-32]
	stp	q16, q17, [x11], #64
	add.4s	v4, v4, v5
	subs	x12, x12, #16
	b.ne	LBB0_7
; %bb.8:
	cmp	x10, x8
	b.eq	LBB0_11
LBB0_9:
	add	w9, w9, w10
	add	x11, x19, x10, lsl #2
	sub	x8, x8, x10
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	str	w9, [x11], #4
	add	w9, w9, #1
	subs	x8, x8, #1
	b.ne	LBB0_10
LBB0_11:
	mov	w0, #0
LBB0_12:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh10
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdr	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_msi_vmem,8,3                   ; @msi_vmem
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_VMEM_ADDR_MIN,4,2              ; @VMEM_ADDR_MIN
	.comm	_VMEM_ADDR_MAX,4,2              ; @VMEM_ADDR_MAX
	.comm	_M_BESTFIT,4,2                  ; @M_BESTFIT
	.comm	_M_WAITOK,4,2                   ; @M_WAITOK
	.no_dead_strip	_fsl_pcib_alloc_msi
.subsections_via_symbols
