	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function altera_mbox_rx_data
_altera_mbox_rx_data:                   ## @altera_mbox_rx_data
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -24(%rbp)
	callq	_mbox_chan_to_altera_mbox
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_altera_mbox_pending
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_MAILBOX_PTR_REG@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%rbx), %rdi
	callq	_readl_relaxed
	movq	_MBOX_PTR@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, -32(%rbp,%rcx,4)
	movq	_MAILBOX_CMD_REG@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%rbx), %rdi
	callq	_readl_relaxed
	movq	_MBOX_CMD@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%eax, -32(%rbp,%rcx,4)
	leaq	-32(%rbp), %rsi
	movq	%r14, %rdi
	callq	_mbox_chan_received_data
LBB0_2:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-24(%rbp), %rax
	jne	LBB0_4
## %bb.3:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAILBOX_PTR_REG,8,3            ## @MAILBOX_PTR_REG
	.comm	_MBOX_PTR,8,3                   ## @MBOX_PTR
	.comm	_MAILBOX_CMD_REG,8,3            ## @MAILBOX_CMD_REG
	.comm	_MBOX_CMD,8,3                   ## @MBOX_CMD
	.no_dead_strip	_altera_mbox_rx_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function altera_mbox_rx_data
_altera_mbox_rx_data:                   ; @altera_mbox_rx_data
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #8]
	bl	_mbox_chan_to_altera_mbox
	mov	x20, x0
	bl	_altera_mbox_pending
	cbz	x0, LBB0_2
; %bb.1:
	ldr	x8, [x20]
Lloh3:
	adrp	x9, _MAILBOX_PTR_REG@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MAILBOX_PTR_REG@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl_relaxed
Lloh6:
	adrp	x8, _MBOX_PTR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MBOX_PTR@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	mov	x21, sp
	str	w0, [x21, x8, lsl #2]
	ldr	x8, [x20]
Lloh9:
	adrp	x9, _MAILBOX_CMD_REG@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MAILBOX_CMD_REG@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl_relaxed
Lloh12:
	adrp	x8, _MBOX_CMD@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MBOX_CMD@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	str	w0, [x21, x8, lsl #2]
	mov	x1, sp
	mov	x0, x19
	bl	_mbox_chan_received_data
LBB0_2:
	ldr	x8, [sp, #8]
Lloh15:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_4
; %bb.3:
	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_4:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_MAILBOX_PTR_REG,8,3            ; @MAILBOX_PTR_REG
	.comm	_MBOX_PTR,8,3                   ; @MBOX_PTR
	.comm	_MAILBOX_CMD_REG,8,3            ; @MAILBOX_CMD_REG
	.comm	_MBOX_CMD,8,3                   ; @MBOX_CMD
	.no_dead_strip	_altera_mbox_rx_data
.subsections_via_symbols
