	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rockchip_mbox_irq
_rockchip_mbox_irq:                     ## @rockchip_mbox_irq
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movl	%edi, %r14d
	movq	_MAILBOX_B2A_STATUS@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	addq	(%rsi), %rdi
	callq	_readl_relaxed
	movl	16(%rbx), %esi
	movq	_IRQ_NONE@GOTPCREL(%rip), %r8
	testl	%esi, %esi
	jle	LBB0_6
## %bb.1:
	xorl	%ecx, %ecx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rcx
	cmpq	%rcx, %rsi
	je	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1, %edi
	shll	%cl, %edi
	btl	%ecx, %eax
	jae	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%rbx), %rdx
	cmpl	%r14d, (%rdx,%rcx,4)
	jne	LBB0_5
## %bb.4:
	movq	(%r15), %rsi
	addq	(%rbx), %rsi
	callq	_writel_relaxed
	movq	_IRQ_WAKE_THREAD@GOTPCREL(%rip), %r8
LBB0_6:
	movl	(%r8), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAILBOX_B2A_STATUS,8,3         ## @MAILBOX_B2A_STATUS
	.comm	_IRQ_WAKE_THREAD,4,2            ## @IRQ_WAKE_THREAD
	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
	.no_dead_strip	_rockchip_mbox_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rockchip_mbox_irq
_rockchip_mbox_irq:                     ; @rockchip_mbox_irq
	.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
	ldr	x8, [x1]
Lloh0:
	adrp	x21, _MAILBOX_B2A_STATUS@GOTPAGE
Lloh1:
	ldr	x21, [x21, _MAILBOX_B2A_STATUS@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_readl_relaxed
	ldr	w10, [x19, #16]
	cmp	w10, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x11, #0
	mov	w12, #1
Lloh2:
	adrp	x9, _IRQ_NONE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _IRQ_NONE@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x11, x11, #1
	cmp	x10, x11
	b.eq	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	lsl	w8, w12, w11
	tst	w8, w0
	b.eq	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x13, [x19, #8]
	ldr	w13, [x13, x11, lsl #2]
	cmp	w13, w20
	b.ne	LBB0_2
; %bb.5:
	ldr	x9, [x19]
	ldr	x10, [x21]
	add	x1, x10, x9
	mov	x0, x8
	bl	_writel_relaxed
Lloh4:
	adrp	x9, _IRQ_WAKE_THREAD@GOTPAGE
Lloh5:
	ldr	x9, [x9, _IRQ_WAKE_THREAD@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh6:
	adrp	x9, _IRQ_NONE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IRQ_NONE@GOTPAGEOFF]
LBB0_7:
	ldr	w0, [x9]
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_MAILBOX_B2A_STATUS,8,3         ; @MAILBOX_B2A_STATUS
	.comm	_IRQ_WAKE_THREAD,4,2            ; @IRQ_WAKE_THREAD
	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
	.no_dead_strip	_rockchip_mbox_irq
.subsections_via_symbols
