	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mic_setup_msi
_mic_setup_msi:                         ## @mic_setup_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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	%rsi, %rdi
	callq	_pci_enable_msi
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_dev_dbg
	jmp	LBB0_10
LBB0_2:
	movl	$1, (%r14)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edi
	callq	_kzalloc
	movl	%eax, 4(%r14)
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movq	%r14, %rdi
	callq	_mic_setup_callbacks
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	jmp	LBB0_8
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_6:
	movl	4(%r15), %edi
	movq	_mic_interrupt@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_mic_thread_fn@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.2(%rip), %r8
	xorl	%ebx, %ebx
	xorl	%ecx, %ecx
	movq	%r14, %r9
	callq	_request_threaded_irq
	testl	%eax, %eax
	je	LBB0_11
## %bb.7:
	movl	%eax, %r12d
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movq	%r14, %rdi
	callq	_mic_release_callbacks
	movl	%r12d, %ebx
LBB0_8:
	movl	4(%r14), %edi
	callq	_kfree
LBB0_9:
	movq	%r15, %rdi
	callq	_pci_disable_msi
	movl	$0, (%r14)
LBB0_10:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movl	(%r14), %edx
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_dbg
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error enabling MSI. rc = %d\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"Error setting up callbacks\n"

	.comm	_mic_interrupt,4,2              ## @mic_interrupt
	.comm	_mic_thread_fn,4,2              ## @mic_thread_fn
L_.str.2:                               ## @.str.2
	.asciz	"mic-msi"

L_.str.3:                               ## @.str.3
	.asciz	"Error allocating MSI interrupt\n"

L_.str.4:                               ## @.str.4
	.asciz	"%d MSI irqs setup\n"

	.no_dead_strip	_mic_setup_msi
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mic_setup_msi
_mic_setup_msi:                         ; @mic_setup_msi
	.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	x19, x1
	mov	x20, x0
	mov	x0, x1
	bl	_pci_enable_msi
	cbz	w0, LBB0_2
; %bb.1:
	mov	x21, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_dev_dbg
	b	LBB0_10
LBB0_2:
	mov	w8, #1
	str	w8, [x20]
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w0, #4
	bl	_kzalloc
	str	w0, [x20, #4]
	cbz	w0, LBB0_5
; %bb.3:
	mov	x0, x20
	bl	_mic_setup_callbacks
	cbz	w0, LBB0_6
; %bb.4:
	mov	x21, x0
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_8
LBB0_5:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_9
LBB0_6:
	ldr	w0, [x19, #4]
Lloh10:
	adrp	x8, _mic_interrupt@GOTPAGE
Lloh11:
	ldr	x8, [x8, _mic_interrupt@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
Lloh13:
	adrp	x8, _mic_thread_fn@GOTPAGE
Lloh14:
	ldr	x8, [x8, _mic_thread_fn@GOTPAGEOFF]
Lloh15:
	ldr	w2, [x8]
Lloh16:
	adrp	x4, l_.str.2@PAGE
Lloh17:
	add	x4, x4, l_.str.2@PAGEOFF
	mov	w3, #0
	mov	x5, x20
	bl	_request_threaded_irq
	mov	x21, x0
	cbz	w0, LBB0_11
; %bb.7:
Lloh18:
	adrp	x1, l_.str.3@PAGE
Lloh19:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	mov	x0, x20
	bl	_mic_release_callbacks
LBB0_8:
	ldr	w0, [x20, #4]
	bl	_kfree
LBB0_9:
	mov	x0, x19
	bl	_pci_disable_msi
	str	wzr, [x20]
LBB0_10:
	mov	x0, x21
	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_11:
	ldr	w2, [x20]
Lloh20:
	adrp	x1, l_.str.4@PAGE
Lloh21:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	b	LBB0_10
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error enabling MSI. rc = %d\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"Error setting up callbacks\n"

	.comm	_mic_interrupt,4,2              ; @mic_interrupt
	.comm	_mic_thread_fn,4,2              ; @mic_thread_fn
l_.str.2:                               ; @.str.2
	.asciz	"mic-msi"

l_.str.3:                               ; @.str.3
	.asciz	"Error allocating MSI interrupt\n"

l_.str.4:                               ; @.str.4
	.asciz	"%d MSI irqs setup\n"

	.no_dead_strip	_mic_setup_msi
.subsections_via_symbols
