	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_octeon_mbox_process_message    ## -- Begin function octeon_mbox_process_message
	.p2align	4, 0x90
_octeon_mbox_process_message:           ## @octeon_mbox_process_message
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	4(%rdi), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movl	(%rbx), %eax
	movq	_OCTEON_MBOX_STATE_ERROR@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.1:
	movq	_OCTEON_MBOX_STATE_RESPONSE_PENDING@GOTPCREL(%rip), %rcx
	movq	_OCTEON_MBOX_STATE_RESPONSE_RECEIVING@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	testl	%eax, %edx
	je	LBB0_5
## %bb.2:
	leaq	20(%rbx), %rsi
	leaq	-48(%rbp), %rdi
	movl	$24, %edx
	callq	_memcpy
	movq	_OCTEON_MBOX_STATE_IDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movq	_OCTEON_PFVFSIG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%rbx), %esi
	callq	_writeq
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movl	$1, -48(%rbp)
	jmp	LBB0_3
LBB0_6:
	movq	_OCTEON_MBOX_STATE_RESPONSE_RECEIVED@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_8
## %bb.7:
	leaq	20(%rbx), %rsi
	leaq	-48(%rbp), %rdi
	movl	$24, %edx
	callq	_memcpy
	movq	_OCTEON_MBOX_STATE_IDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movq	_OCTEON_PFVFSIG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%rbx), %esi
	callq	_writeq
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movl	$0, -48(%rbp)
LBB0_3:
	movq	-32(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_15
## %bb.4:
	movl	16(%rbx), %edi
	movl	-40(%rbp), %edx
	leaq	-48(%rbp), %rsi
	callq	*%rax
	jmp	LBB0_15
LBB0_5:
	movq	_OCTEON_MBOX_STATE_IDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movq	_OCTEON_PFVFSIG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%rbx), %esi
	callq	_writeq
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_15
LBB0_8:
	movq	_OCTEON_MBOX_STATE_REQUEST_RECEIVED@GOTPCREL(%rip), %r15
	testl	%eax, (%r15)
	je	LBB0_14
## %bb.9:
	leaq	12(%rbx), %rsi
	leaq	-48(%rbp), %rdi
	movl	$24, %edx
	callq	_memcpy
	cmpl	$0, -44(%rbp)
	jne	LBB0_13
## %bb.10:
	movl	(%r15), %eax
	notl	%eax
	andl	(%rbx), %eax
	movl	%eax, (%rbx)
	movq	_OCTEON_MBOX_STATE_RESPONSE_PENDING@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_12
## %bb.11:
	movq	_OCTEON_MBOX_STATE_IDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
LBB0_12:
	movq	_OCTEON_PFVFSIG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%rbx), %esi
	callq	_writeq
LBB0_13:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_octeon_mbox_process_cmd
	jmp	LBB0_15
LBB0_14:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movl	$1, %edi
	callq	_WARN_ON
LBB0_15:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OCTEON_MBOX_STATE_ERROR,4,2    ## @OCTEON_MBOX_STATE_ERROR
	.comm	_OCTEON_MBOX_STATE_RESPONSE_PENDING,4,2 ## @OCTEON_MBOX_STATE_RESPONSE_PENDING
	.comm	_OCTEON_MBOX_STATE_RESPONSE_RECEIVING,4,2 ## @OCTEON_MBOX_STATE_RESPONSE_RECEIVING
	.comm	_OCTEON_MBOX_STATE_IDLE,8,3     ## @OCTEON_MBOX_STATE_IDLE
	.comm	_OCTEON_PFVFSIG,4,2             ## @OCTEON_PFVFSIG
	.comm	_OCTEON_MBOX_STATE_RESPONSE_RECEIVED,4,2 ## @OCTEON_MBOX_STATE_RESPONSE_RECEIVED
	.comm	_OCTEON_MBOX_STATE_REQUEST_RECEIVED,4,2 ## @OCTEON_MBOX_STATE_REQUEST_RECEIVED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_octeon_mbox_process_message    ; -- Begin function octeon_mbox_process_message
	.p2align	2
_octeon_mbox_process_message:           ; @octeon_mbox_process_message
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	add	x20, x0, #4
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _OCTEON_MBOX_STATE_ERROR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _OCTEON_MBOX_STATE_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.1:
Lloh3:
	adrp	x9, _OCTEON_MBOX_STATE_RESPONSE_PENDING@GOTPAGE
Lloh4:
	ldr	x9, [x9, _OCTEON_MBOX_STATE_RESPONSE_PENDING@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _OCTEON_MBOX_STATE_RESPONSE_RECEIVING@GOTPAGE
Lloh7:
	ldr	x10, [x10, _OCTEON_MBOX_STATE_RESPONSE_RECEIVING@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.eq	LBB0_6
; %bb.2:
	add	x1, x19, #20
	add	x0, sp, #8
	mov	w2, #24
	bl	_memcpy
Lloh9:
	adrp	x8, _OCTEON_MBOX_STATE_IDLE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _OCTEON_MBOX_STATE_IDLE@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	str	w8, [x19]
Lloh12:
	adrp	x8, _OCTEON_PFVFSIG@GOTPAGE
Lloh13:
	ldr	x8, [x8, _OCTEON_PFVFSIG@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	ldr	w1, [x19, #8]
	bl	_writeq
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mov	w8, #1
	str	w8, [sp, #8]
	ldr	x8, [sp, #24]
	cbnz	x8, LBB0_5
	b	LBB0_14
LBB0_3:
Lloh15:
	adrp	x9, _OCTEON_MBOX_STATE_RESPONSE_RECEIVED@GOTPAGE
Lloh16:
	ldr	x9, [x9, _OCTEON_MBOX_STATE_RESPONSE_RECEIVED@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.4:
	add	x1, x19, #20
	add	x0, sp, #8
	mov	w2, #24
	bl	_memcpy
Lloh18:
	adrp	x8, _OCTEON_MBOX_STATE_IDLE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _OCTEON_MBOX_STATE_IDLE@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	str	w8, [x19]
Lloh21:
	adrp	x8, _OCTEON_PFVFSIG@GOTPAGE
Lloh22:
	ldr	x8, [x8, _OCTEON_PFVFSIG@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	ldr	w1, [x19, #8]
	bl	_writeq
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	str	wzr, [sp, #8]
	ldr	x8, [sp, #24]
	cbz	x8, LBB0_14
LBB0_5:
	ldr	w0, [x19, #16]
	ldr	w2, [sp, #16]
	add	x1, sp, #8
	blr	x8
	b	LBB0_14
LBB0_6:
Lloh24:
	adrp	x8, _OCTEON_MBOX_STATE_IDLE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _OCTEON_MBOX_STATE_IDLE@GOTPAGEOFF]
Lloh26:
	ldr	x8, [x8]
	str	w8, [x19]
Lloh27:
	adrp	x8, _OCTEON_PFVFSIG@GOTPAGE
Lloh28:
	ldr	x8, [x8, _OCTEON_PFVFSIG@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
	ldr	w1, [x19, #8]
	bl	_writeq
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	b	LBB0_14
LBB0_7:
Lloh30:
	adrp	x21, _OCTEON_MBOX_STATE_REQUEST_RECEIVED@GOTPAGE
Lloh31:
	ldr	x21, [x21, _OCTEON_MBOX_STATE_REQUEST_RECEIVED@GOTPAGEOFF]
	ldr	w9, [x21]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.8:
	add	x1, x19, #12
	add	x0, sp, #8
	mov	w2, #24
	bl	_memcpy
	ldr	w8, [sp, #12]
	cbnz	w8, LBB0_12
; %bb.9:
	ldr	w8, [x21]
	ldr	w9, [x19]
	bic	w8, w9, w8
	str	w8, [x19]
Lloh32:
	adrp	x9, _OCTEON_MBOX_STATE_RESPONSE_PENDING@GOTPAGE
Lloh33:
	ldr	x9, [x9, _OCTEON_MBOX_STATE_RESPONSE_PENDING@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_11
; %bb.10:
Lloh35:
	adrp	x8, _OCTEON_MBOX_STATE_IDLE@GOTPAGE
Lloh36:
	ldr	x8, [x8, _OCTEON_MBOX_STATE_IDLE@GOTPAGEOFF]
Lloh37:
	ldr	x8, [x8]
	str	w8, [x19]
LBB0_11:
Lloh38:
	adrp	x8, _OCTEON_PFVFSIG@GOTPAGE
Lloh39:
	ldr	x8, [x8, _OCTEON_PFVFSIG@GOTPAGEOFF]
Lloh40:
	ldr	w0, [x8]
	ldr	w1, [x19, #8]
	bl	_writeq
LBB0_12:
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	add	x1, sp, #8
	mov	x0, x19
	bl	_octeon_mbox_process_cmd
	b	LBB0_14
LBB0_13:
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	mov	w0, #1
	bl	_WARN_ON
LBB0_14:
	mov	w0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_OCTEON_MBOX_STATE_ERROR,4,2    ; @OCTEON_MBOX_STATE_ERROR
	.comm	_OCTEON_MBOX_STATE_RESPONSE_PENDING,4,2 ; @OCTEON_MBOX_STATE_RESPONSE_PENDING
	.comm	_OCTEON_MBOX_STATE_RESPONSE_RECEIVING,4,2 ; @OCTEON_MBOX_STATE_RESPONSE_RECEIVING
	.comm	_OCTEON_MBOX_STATE_IDLE,8,3     ; @OCTEON_MBOX_STATE_IDLE
	.comm	_OCTEON_PFVFSIG,4,2             ; @OCTEON_PFVFSIG
	.comm	_OCTEON_MBOX_STATE_RESPONSE_RECEIVED,4,2 ; @OCTEON_MBOX_STATE_RESPONSE_RECEIVED
	.comm	_OCTEON_MBOX_STATE_REQUEST_RECEIVED,4,2 ; @OCTEON_MBOX_STATE_REQUEST_RECEIVED
.subsections_via_symbols
