	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcm_mbox_intr
_bcm_mbox_intr:                         ## @bcm_mbox_intr
	.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, %rbx
	callq	_MBOX_LOCK
	movq	_REG_STATUS@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_mbox_read_4
	movq	_STATUS_EMPTY@GOTPCREL(%rip), %r12
	testl	%eax, (%r12)
	je	LBB0_1
LBB0_5:
	movq	%rbx, %rdi
	callq	_MBOX_UNLOCK
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	leaq	-36(%rbp), %r14
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r15), %esi
	movq	%rbx, %rdi
	callq	_mbox_read_4
	testl	%eax, (%r12)
	jne	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_bcm_mbox_read_msg
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rbx), %rax
	movslq	-36(%rbp), %rcx
	movl	$1, (%rax,%rcx,4)
	movslq	-36(%rbp), %rcx
	leaq	(%rax,%rcx,4), %rdi
	callq	_wakeup
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_STATUS,4,2                 ## @REG_STATUS
	.comm	_STATUS_EMPTY,4,2               ## @STATUS_EMPTY
	.no_dead_strip	_bcm_mbox_intr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcm_mbox_intr
_bcm_mbox_intr:                         ; @bcm_mbox_intr
	.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
	bl	_MBOX_LOCK
Lloh0:
	adrp	x20, _REG_STATUS@GOTPAGE
Lloh1:
	ldr	x20, [x20, _REG_STATUS@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_mbox_read_4
Lloh2:
	adrp	x21, _STATUS_EMPTY@GOTPAGE
Lloh3:
	ldr	x21, [x21, _STATUS_EMPTY@GOTPAGEOFF]
	ldr	w8, [x21]
	tst	w8, w0
	b.eq	LBB0_2
LBB0_1:
	mov	x0, x19
	bl	_MBOX_UNLOCK
	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_2:
	mov	w22, #1
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w1, [x20]
	mov	x0, x19
	bl	_mbox_read_4
	ldr	w8, [x21]
	tst	w8, w0
	b.ne	LBB0_1
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #12
	mov	x0, x19
	bl	_bcm_mbox_read_msg
	cbnz	x0, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19]
	ldrsw	x9, [sp, #12]
	str	w22, [x8, x9, lsl #2]
	ldrsw	x9, [sp, #12]
	add	x0, x8, x9, lsl #2
	bl	_wakeup
	b	LBB0_3
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_STATUS,4,2                 ; @REG_STATUS
	.comm	_STATUS_EMPTY,4,2               ; @STATUS_EMPTY
	.no_dead_strip	_bcm_mbox_intr
.subsections_via_symbols
