	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function alpine_msix_init
_alpine_msix_init:                      ## @alpine_msix_init
	.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	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movl	$32, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	leaq	24(%rax), %rdi
	callq	_spin_lock_init
	leaq	-40(%rbp), %rdx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_of_address_to_resource
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	jmp	LBB0_15
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_16
LBB0_4:
	movl	-40(%rbp), %ebx
	movl	$63, %edi
	movl	$20, %esi
	callq	_GENMASK_ULL
	andl	%ebx, %eax
	movl	%eax, (%r15)
	movq	_ALPINE_MSIX_SPI_TARGET_CLUSTER0@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%r15)
	leaq	16(%r15), %rdx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_of_property_read_u32
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_6
LBB0_7:
	movq	%r15, %rdx
	addq	$20, %rdx
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	callq	_of_property_read_u32
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	leaq	L_.str.4(%rip), %rdi
LBB0_6:
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_11:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_15:
	movq	%r15, %rdi
	callq	_kfree
LBB0_16:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	20(%r15), %edi
	callq	_BITS_TO_LONGS
	movl	(%r12), %edx
	movl	%eax, %edi
	movl	$32, %esi
	callq	_kcalloc
	movq	%rax, 8(%r15)
	testq	%rax, %rax
	je	LBB0_10
## %bb.12:
	movl	16(%r15), %edx
	movl	20(%r15), %esi
	leaq	L_.str.5(%rip), %rdi
	callq	_pr_debug
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_alpine_msix_init_domains
	testl	%eax, %eax
	je	LBB0_13
## %bb.14:
	movl	%eax, %ebx
	movq	8(%r15), %rdi
	callq	_kfree
	jmp	LBB0_15
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_13:
	xorl	%ebx, %ebx
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to allocate resource\n"

	.comm	_ALPINE_MSIX_SPI_TARGET_CLUSTER0,4,2 ## @ALPINE_MSIX_SPI_TARGET_CLUSTER0
L_.str.1:                               ## @.str.1
	.asciz	"al,msi-base-spi"

L_.str.2:                               ## @.str.2
	.asciz	"Unable to parse MSI base\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.3:                               ## @.str.3
	.asciz	"al,msi-num-spis"

L_.str.4:                               ## @.str.4
	.asciz	"Unable to parse MSI numbers\n"

L_.str.5:                               ## @.str.5
	.asciz	"Registering %d msixs, starting at %d\n"

	.no_dead_strip	_alpine_msix_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function alpine_msix_init
_alpine_msix_init:                      ; @alpine_msix_init
	.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
Lloh0:
	adrp	x22, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	w0, #32
	bl	_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	add	x0, x0, #24
	bl	_spin_lock_init
	add	x2, sp, #8
	mov	x0, x20
	mov	w1, #0
	bl	_of_address_to_resource
	cbz	w0, LBB0_4
; %bb.2:
	mov	x21, x0
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
	b	LBB0_10
LBB0_3:
Lloh4:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_11
LBB0_4:
	ldr	w21, [sp, #8]
	mov	w0, #63
	mov	w1, #20
	bl	_GENMASK_ULL
	and	w8, w0, w21
Lloh7:
	adrp	x9, _ALPINE_MSIX_SPI_TARGET_CLUSTER0@GOTPAGE
Lloh8:
	ldr	x9, [x9, _ALPINE_MSIX_SPI_TARGET_CLUSTER0@GOTPAGEOFF]
	str	w8, [x19]
Lloh9:
	ldr	w9, [x9]
	orr	w8, w9, w8
	mov	x2, x19
	str	w8, [x2], #16
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_of_property_read_u32
	cbz	x0, LBB0_6
; %bb.5:
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_8
LBB0_6:
	add	x2, x19, #20
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_of_property_read_u32
	cbz	x0, LBB0_12
; %bb.7:
Lloh16:
	adrp	x0, l_.str.4@PAGE
Lloh17:
	add	x0, x0, l_.str.4@PAGEOFF
LBB0_8:
	bl	_pr_err
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_10:
	mov	x0, x19
	bl	_kfree
LBB0_11:
	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_12:
	ldr	w0, [x19, #20]
	bl	_BITS_TO_LONGS
	ldr	w2, [x22]
	mov	w1, #32
	bl	_kcalloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_15
; %bb.13:
	ldp	w2, w1, [x19, #16]
Lloh20:
	adrp	x0, l_.str.5@PAGE
Lloh21:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_pr_debug
	mov	x0, x19
	mov	x1, x20
	bl	_alpine_msix_init_domains
	mov	x21, x0
	cbz	w0, LBB0_11
; %bb.14:
	ldr	x0, [x19, #8]
	bl	_kfree
	b	LBB0_10
LBB0_15:
Lloh22:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_9
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to allocate resource\n"

	.comm	_ALPINE_MSIX_SPI_TARGET_CLUSTER0,4,2 ; @ALPINE_MSIX_SPI_TARGET_CLUSTER0
l_.str.1:                               ; @.str.1
	.asciz	"al,msi-base-spi"

l_.str.2:                               ; @.str.2
	.asciz	"Unable to parse MSI base\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.3:                               ; @.str.3
	.asciz	"al,msi-num-spis"

l_.str.4:                               ; @.str.4
	.asciz	"Unable to parse MSI numbers\n"

l_.str.5:                               ; @.str.5
	.asciz	"Registering %d msixs, starting at %d\n"

	.no_dead_strip	_alpine_msix_init
.subsections_via_symbols
