	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function altera_mbox_probe
_altera_mbox_probe:                     ## @altera_mbox_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	movl	$80, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movl	(%rbx), %edx
	movq	%r13, %rdi
	movl	$8, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r12
	movq	%r14, %r15
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_platform_get_resource
	movq	%r13, %rdi
	movq	%rax, %rsi
	callq	_devm_ioremap_resource
	movl	%eax, 72(%r14)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_4
## %bb.15:
	movl	72(%r15), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_14:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%r15, %rdi
	callq	_altera_mbox_is_sender
	movq	%rax, 56(%r15)
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_platform_get_irq
	movq	%rax, (%r15)
	testq	%rax, %rax
	js	LBB0_6
## %bb.5:
	movl	$1, 8(%r15)
LBB0_6:
	movq	%r13, 64(%r15)
	movq	%r15, (%r12)
	addq	$16, %r14
	movq	%r13, 48(%r15)
	movl	$1, 16(%r15)
	movq	%r12, 40(%r15)
	movq	_altera_mbox_ops@GOTPCREL(%rip), %rax
	movq	%rax, 32(%r15)
	cmpq	$0, 56(%r15)
	je	LBB0_11
## %bb.7:
	cmpl	$0, 8(%r15)
	je	LBB0_9
## %bb.8:
	movl	$1, %eax
	movl	$20, %ecx
	jmp	LBB0_10
LBB0_9:
	movl	$1, 24(%r15)
	movq	_MBOX_POLLING_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	$28, %ecx
LBB0_10:
	movl	%eax, (%r15,%rcx)
LBB0_11:
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_devm_mbox_controller_register
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	callq	_dev_err
	jmp	LBB0_14
LBB0_13:
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_platform_set_drvdata
	xorl	%ebx, %ebx
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.comm	_altera_mbox_ops,4,2            ## @altera_mbox_ops
	.comm	_MBOX_POLLING_MS,4,2            ## @MBOX_POLLING_MS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Register mailbox failed\n"

	.no_dead_strip	_altera_mbox_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function altera_mbox_probe
_altera_mbox_probe:                     ; @altera_mbox_probe
	.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, x0
Lloh0:
	adrp	x21, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	w1, #80
	bl	_devm_kzalloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
	ldr	w2, [x21]
	mov	x0, x19
	mov	w1, #8
	bl	_devm_kzalloc
	cbz	x0, LBB0_4
; %bb.2:
	mov	x21, x0
Lloh2:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_platform_get_resource
	mov	x1, x0
	mov	x0, x19
	bl	_devm_ioremap_resource
	str	w0, [x20, #72]
	bl	_IS_ERR
	cbz	x0, LBB0_6
; %bb.3:
	ldr	w0, [x20, #72]
	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
	b	_PTR_ERR
LBB0_4:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_5:
	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_6:
	mov	x0, x20
	bl	_altera_mbox_is_sender
	str	x0, [x20, #56]
	mov	x0, x19
	mov	w1, #0
	bl	_platform_get_irq
	str	x0, [x20]
	tbnz	x0, #63, LBB0_8
; %bb.7:
	mov	w8, #1
	str	w8, [x20, #8]
LBB0_8:
	str	x19, [x20, #64]
	str	x20, [x21]
	mov	w8, #1
	mov	x1, x20
	str	w8, [x1, #16]!
	str	x19, [x20, #48]
Lloh8:
	adrp	x8, _altera_mbox_ops@GOTPAGE
Lloh9:
	ldr	x8, [x8, _altera_mbox_ops@GOTPAGEOFF]
	stp	x8, x21, [x20, #32]
	ldr	x8, [x20, #56]
	cbz	x8, LBB0_13
; %bb.9:
	ldr	w9, [x20, #8]
	mov	w8, #1
	cbz	w9, LBB0_11
; %bb.10:
	mov	w9, #20
	b	LBB0_12
LBB0_11:
	str	w8, [x20, #24]
Lloh10:
	adrp	x8, _MBOX_POLLING_MS@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MBOX_POLLING_MS@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	mov	w9, #28
LBB0_12:
	str	w8, [x20, x9]
LBB0_13:
	mov	x0, x19
	bl	_devm_mbox_controller_register
	mov	x21, x0
	cbz	w0, LBB0_15
; %bb.14:
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_5
LBB0_15:
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.comm	_altera_mbox_ops,4,2            ; @altera_mbox_ops
	.comm	_MBOX_POLLING_MS,4,2            ; @MBOX_POLLING_MS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Register mailbox failed\n"

	.no_dead_strip	_altera_mbox_probe
.subsections_via_symbols
