	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function a37xx_mbox_startup
_a37xx_mbox_startup:                    ## @a37xx_mbox_startup
	.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	%rdi, %r9
	movq	(%rdi), %rbx
	movl	8(%rbx), %edi
	movl	12(%rbx), %esi
	movq	_a37xx_mbox_irq_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_DRIVER_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	xorl	%r14d, %r14d
	xorl	%ecx, %ecx
	callq	_devm_request_irq
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	_RWTM_HOST_INT_MASK@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	addq	(%rbx), %rdi
	callq	_readl
	movq	_SP_CMD_COMPLETE@GOTPCREL(%rip), %rcx
	movq	_SP_CMD_QUEUE_FULL_ACCESS@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edi
	orl	(%rcx), %edi
	movq	_SP_CMD_QUEUE_FULL@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edi
	notl	%edi
	andl	%eax, %edi
	movq	(%r15), %rsi
	addq	(%rbx), %rsi
	callq	_writel
	jmp	LBB0_3
LBB0_1:
	movl	%eax, %r15d
	movl	8(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movl	%r15d, %r14d
LBB0_3:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_a37xx_mbox_irq_handler,4,2     ## @a37xx_mbox_irq_handler
	.comm	_DRIVER_NAME,4,2                ## @DRIVER_NAME
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot request irq\n"

	.comm	_RWTM_HOST_INT_MASK,8,3         ## @RWTM_HOST_INT_MASK
	.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
	.no_dead_strip	_a37xx_mbox_startup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function a37xx_mbox_startup
_a37xx_mbox_startup:                    ; @a37xx_mbox_startup
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x5, x0
	ldr	x20, [x0]
	ldp	w0, w1, [x20, #8]
Lloh0:
	adrp	x8, _a37xx_mbox_irq_handler@GOTPAGE
Lloh1:
	ldr	x8, [x8, _a37xx_mbox_irq_handler@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
Lloh3:
	adrp	x8, _DRIVER_NAME@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DRIVER_NAME@GOTPAGEOFF]
Lloh5:
	ldr	w4, [x8]
	mov	w3, #0
	bl	_devm_request_irq
	tbnz	w0, #31, LBB0_2
; %bb.1:
	ldr	x8, [x20]
Lloh6:
	adrp	x19, _RWTM_HOST_INT_MASK@GOTPAGE
Lloh7:
	ldr	x19, [x19, _RWTM_HOST_INT_MASK@GOTPAGEOFF]
	ldr	x9, [x19]
	add	x0, x9, x8
	bl	_readl
Lloh8:
	adrp	x8, _SP_CMD_COMPLETE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SP_CMD_COMPLETE@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _SP_CMD_QUEUE_FULL_ACCESS@GOTPAGE
Lloh12:
	ldr	x9, [x9, _SP_CMD_QUEUE_FULL_ACCESS@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh14:
	adrp	x9, _SP_CMD_QUEUE_FULL@GOTPAGE
Lloh15:
	ldr	x9, [x9, _SP_CMD_QUEUE_FULL@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w8, w9
	bic	w0, w0, w8
	ldr	x8, [x20]
	ldr	x9, [x19]
	add	x1, x9, x8
	bl	_writel
	mov	w19, #0
	b	LBB0_3
LBB0_2:
	mov	x19, x0
	ldr	w0, [x20, #8]
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
LBB0_3:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_a37xx_mbox_irq_handler,4,2     ; @a37xx_mbox_irq_handler
	.comm	_DRIVER_NAME,4,2                ; @DRIVER_NAME
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot request irq\n"

	.comm	_RWTM_HOST_INT_MASK,8,3         ; @RWTM_HOST_INT_MASK
	.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
	.no_dead_strip	_a37xx_mbox_startup
.subsections_via_symbols
