	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_octeon_mbox_cancel             ## -- Begin function octeon_mbox_cancel
	.p2align	4, 0x90
_octeon_mbox_cancel:                    ## @octeon_mbox_cancel
	.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), %rax
	movslq	%esi, %rcx
	movq	(%rax,%rcx,8), %rbx
	leaq	4(%rbx), %r15
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_spin_lock_irqsave
	movq	_OCTEON_MBOX_STATE_RESPONSE_PENDING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_1
## %bb.2:
	leaq	12(%rbx), %rdi
	movq	_OCTEON_MBOX_STATE_IDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	_OCTEON_PFVFSIG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%rbx), %esi
	callq	_writeq
	jmp	LBB0_3
LBB0_1:
	movl	$1, %r14d
LBB0_3:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_spin_unlock_irqrestore
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OCTEON_MBOX_STATE_RESPONSE_PENDING,4,2 ## @OCTEON_MBOX_STATE_RESPONSE_PENDING
	.comm	_OCTEON_MBOX_STATE_IDLE,4,2     ## @OCTEON_MBOX_STATE_IDLE
	.comm	_OCTEON_PFVFSIG,4,2             ## @OCTEON_PFVFSIG
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_octeon_mbox_cancel             ; -- Begin function octeon_mbox_cancel
	.p2align	2
_octeon_mbox_cancel:                    ; @octeon_mbox_cancel
	.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
	ldr	x8, [x0]
	ldr	x20, [x8, w1, sxtw #3]
	add	x19, x20, #4
	mov	x0, x19
	mov	x1, #0
	bl	_spin_lock_irqsave
	ldr	w8, [x20]
Lloh0:
	adrp	x9, _OCTEON_MBOX_STATE_RESPONSE_PENDING@GOTPAGE
Lloh1:
	ldr	x9, [x9, _OCTEON_MBOX_STATE_RESPONSE_PENDING@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	add	x0, x20, #12
Lloh3:
	adrp	x8, _OCTEON_MBOX_STATE_IDLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _OCTEON_MBOX_STATE_IDLE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x20]
	mov	w1, #0
	mov	w2, #4
	bl	_memset
Lloh6:
	adrp	x8, _OCTEON_PFVFSIG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _OCTEON_PFVFSIG@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ldr	w1, [x20, #8]
	bl	_writeq
	mov	w20, #0
	b	LBB0_3
LBB0_2:
	mov	w20, #1
LBB0_3:
	mov	x0, x19
	mov	x1, #0
	bl	_spin_unlock_irqrestore
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_OCTEON_MBOX_STATE_RESPONSE_PENDING,4,2 ; @OCTEON_MBOX_STATE_RESPONSE_PENDING
	.comm	_OCTEON_MBOX_STATE_IDLE,4,2     ; @OCTEON_MBOX_STATE_IDLE
	.comm	_OCTEON_PFVFSIG,4,2             ; @OCTEON_PFVFSIG
.subsections_via_symbols
