	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function a37xx_mbox_irq_handler
_a37xx_mbox_irq_handler:                ## @a37xx_mbox_irq_handler
	.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	%rsi, %r14
	movq	(%rsi), %r15
	movq	_RWTM_HOST_INT_RESET@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	addq	(%r15), %rdi
	callq	_readl
	movl	%eax, %ebx
	movq	_SP_CMD_COMPLETE@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_2
## %bb.1:
	movq	%r14, %rdi
	callq	_a37xx_mbox_receive
LBB0_2:
	movq	_SP_CMD_QUEUE_FULL_ACCESS@GOTPCREL(%rip), %rax
	movq	_SP_CMD_QUEUE_FULL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	testl	%ebx, %ecx
	je	LBB0_4
## %bb.3:
	movl	8(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
LBB0_4:
	movq	(%r12), %rsi
	addq	(%r15), %rsi
	movl	%ebx, %edi
	callq	_writel
	testl	%ebx, %ebx
	je	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_mbox_chan_txdone
LBB0_6:
	testl	%ebx, %ebx
	jne	LBB0_7
## %bb.8:
	movq	_IRQ_NONE@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_7:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RWTM_HOST_INT_RESET,8,3        ## @RWTM_HOST_INT_RESET
	.comm	_SP_CMD_COMPLETE,4,2            ## @SP_CMD_COMPLETE
	.comm	_SP_CMD_QUEUE_FULL_ACCESS,4,2   ## @SP_CMD_QUEUE_FULL_ACCESS
	.comm	_SP_CMD_QUEUE_FULL,4,2          ## @SP_CMD_QUEUE_FULL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Secure processor command queue full\n"

	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
	.no_dead_strip	_a37xx_mbox_irq_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function a37xx_mbox_irq_handler
_a37xx_mbox_irq_handler:                ; @a37xx_mbox_irq_handler
	.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
	ldr	x21, [x1]
	ldr	x8, [x21]
Lloh0:
	adrp	x22, _RWTM_HOST_INT_RESET@GOTPAGE
Lloh1:
	ldr	x22, [x22, _RWTM_HOST_INT_RESET@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_readl
	mov	x20, x0
Lloh2:
	adrp	x8, _SP_CMD_COMPLETE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SP_CMD_COMPLETE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_a37xx_mbox_receive
LBB0_2:
Lloh5:
	adrp	x8, _SP_CMD_QUEUE_FULL_ACCESS@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SP_CMD_QUEUE_FULL_ACCESS@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _SP_CMD_QUEUE_FULL@GOTPAGE
Lloh9:
	ldr	x9, [x9, _SP_CMD_QUEUE_FULL@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w9, w8
	tst	w8, w20
	b.eq	LBB0_4
; %bb.3:
	ldr	w0, [x21, #8]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_4:
	ldr	x8, [x21]
	ldr	x9, [x22]
	add	x1, x9, x8
	mov	x0, x20
	bl	_writel
	cbz	w20, LBB0_6
; %bb.5:
	mov	x0, x19
	mov	w1, #0
	bl	_mbox_chan_txdone
LBB0_6:
Lloh13:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh14:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh15:
	adrp	x9, _IRQ_NONE@GOTPAGE
Lloh16:
	ldr	x9, [x9, _IRQ_NONE@GOTPAGEOFF]
	cmp	w20, #0
	csel	x8, x9, x8, eq
	ldr	w0, [x8]
	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 AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_RWTM_HOST_INT_RESET,8,3        ; @RWTM_HOST_INT_RESET
	.comm	_SP_CMD_COMPLETE,4,2            ; @SP_CMD_COMPLETE
	.comm	_SP_CMD_QUEUE_FULL_ACCESS,4,2   ; @SP_CMD_QUEUE_FULL_ACCESS
	.comm	_SP_CMD_QUEUE_FULL,4,2          ; @SP_CMD_QUEUE_FULL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Secure processor command queue full\n"

	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
	.no_dead_strip	_a37xx_mbox_irq_handler
.subsections_via_symbols
