	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function altera_msi_probe
_altera_msi_probe:                      ## @altera_msi_probe
	.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	%rdi, %rbx
	movq	(%rdi), %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$48, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rax, %r14
	leaq	40(%rax), %rdi
	callq	_mutex_init
	movq	%rbx, 32(%r14)
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	callq	_platform_get_resource_byname
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_devm_ioremap_resource
	movq	%rax, 24(%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	24(%r14), %rdi
	jmp	LBB0_8
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
LBB0_4:
	subl	(%rax), %r15d
LBB0_5:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	(%r12), %esi
	leaq	L_.str.2(%rip), %rdx
	movq	%rbx, %rdi
	callq	_platform_get_resource_byname
	movq	%rax, %r12
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_devm_ioremap_resource
	movq	%rax, 16(%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	16(%r14), %rdi
LBB0_8:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_9:
	movl	(%r12), %eax
	movl	%eax, 8(%r14)
	movq	%r14, %rdx
	addq	$4, %rdx
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	callq	_of_property_read_u32
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	leaq	L_.str.5(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_11:
	movq	%r14, %rdi
	callq	_altera_allocate_domains
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_5
## %bb.12:
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_platform_get_irq
	movl	%eax, (%r14)
	testl	%eax, %eax
	js	LBB0_14
## %bb.13:
	movq	_altera_msi_isr@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	movq	%r14, %rdx
	callq	_irq_set_chained_handler_and_data
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_platform_set_drvdata
	jmp	LBB0_5
LBB0_14:
	leaq	L_.str.6(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movl	(%r14), %r15d
	movq	%rbx, %rdi
	callq	_altera_msi_remove
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"csr"

L_.str.1:                               ## @.str.1
	.asciz	"failed to map csr memory\n"

L_.str.2:                               ## @.str.2
	.asciz	"vector_slave"

L_.str.3:                               ## @.str.3
	.asciz	"failed to map vector_slave memory\n"

L_.str.4:                               ## @.str.4
	.asciz	"num-vectors"

L_.str.5:                               ## @.str.5
	.asciz	"failed to parse the number of vectors\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.6:                               ## @.str.6
	.asciz	"failed to map IRQ: %d\n"

	.comm	_altera_msi_isr,4,2             ## @altera_msi_isr
	.no_dead_strip	_altera_msi_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function altera_msi_probe
_altera_msi_probe:                      ; @altera_msi_probe
	.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, x0
	ldr	x21, [x0]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #48
	bl	_devm_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	add	x0, x0, #40
	bl	_mutex_init
	str	x19, [x20, #32]
Lloh3:
	adrp	x22, _IORESOURCE_MEM@GOTPAGE
Lloh4:
	ldr	x22, [x22, _IORESOURCE_MEM@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh5:
	adrp	x2, l_.str@PAGE
Lloh6:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_platform_get_resource_byname
	mov	x1, x0
	mov	x0, x19
	bl	_devm_ioremap_resource
	str	x0, [x20, #24]
	bl	_IS_ERR
	cbz	x0, LBB0_6
; %bb.2:
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	x0, [x20, #24]
	b	LBB0_8
LBB0_3:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_5:
	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_6:
	ldr	w1, [x22]
Lloh11:
	adrp	x2, l_.str.2@PAGE
Lloh12:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_platform_get_resource_byname
	mov	x22, x0
	mov	x0, x19
	mov	x1, x22
	bl	_devm_ioremap_resource
	str	x0, [x20, #16]
	bl	_IS_ERR
	cbz	x0, LBB0_9
; %bb.7:
Lloh13:
	adrp	x1, l_.str.3@PAGE
Lloh14:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	x0, [x20, #16]
LBB0_8:
	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	_PTR_ERR
LBB0_9:
	ldr	w8, [x22]
	str	w8, [x20, #8]
	add	x2, x20, #4
Lloh15:
	adrp	x1, l_.str.4@PAGE
Lloh16:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x21
	bl	_of_property_read_u32
	cbz	x0, LBB0_11
; %bb.10:
Lloh17:
	adrp	x1, l_.str.5@PAGE
Lloh18:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh19:
	adrp	x8, _EINVAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_4
LBB0_11:
	mov	x0, x20
	bl	_altera_allocate_domains
	mov	x21, x0
	cbnz	w0, LBB0_5
; %bb.12:
	mov	x0, x19
	mov	w1, #0
	bl	_platform_get_irq
                                        ; kill: def $w0 killed $w0 def $x0
	str	w0, [x20]
	tbnz	w0, #31, LBB0_14
; %bb.13:
Lloh21:
	adrp	x8, _altera_msi_isr@GOTPAGE
Lloh22:
	ldr	x8, [x8, _altera_msi_isr@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
                                        ; kill: def $w0 killed $w0 killed $x0
	mov	x2, x20
	bl	_irq_set_chained_handler_and_data
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
	mov	w21, #0
	b	LBB0_5
LBB0_14:
	str	x0, [sp]
Lloh24:
	adrp	x1, l_.str.6@PAGE
Lloh25:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	w21, [x20]
	mov	x0, x19
	bl	_altera_msi_remove
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"csr"

l_.str.1:                               ; @.str.1
	.asciz	"failed to map csr memory\n"

l_.str.2:                               ; @.str.2
	.asciz	"vector_slave"

l_.str.3:                               ; @.str.3
	.asciz	"failed to map vector_slave memory\n"

l_.str.4:                               ; @.str.4
	.asciz	"num-vectors"

l_.str.5:                               ; @.str.5
	.asciz	"failed to parse the number of vectors\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.6:                               ; @.str.6
	.asciz	"failed to map IRQ: %d\n"

	.comm	_altera_msi_isr,4,2             ; @altera_msi_isr
	.no_dead_strip	_altera_msi_probe
.subsections_via_symbols
