	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function try_mailbox
_try_mailbox:                           ## @try_mailbox
	.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
	movl	%edx, %r12d
	movq	%rsi, %r14
	movslq	%edx, %rbx
	shlq	$2, %rbx
	movq	(%rsi), %rdi
	addq	%rbx, %rdi
	callq	_readl
	movq	_IVTV_MBOX_FREE@GOTPCREL(%rip), %rcx
	xorl	%r15d, %r15d
	cmpl	(%rcx), %eax
	je	LBB0_2
## %bb.1:
	movq	_IVTV_MBOX_FIRMWARE_DONE@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	je	LBB0_4
LBB0_2:
	leaq	8(%r14), %rsi
	movl	%r12d, %edi
	callq	_test_and_set_bit
	testl	%eax, %eax
	jne	LBB0_4
## %bb.3:
	movq	_IVTV_MBOX_DRIVER_BUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	(%r14), %rbx
	movq	%rbx, %rsi
	callq	_write_sync
	movl	$1, %r15d
LBB0_4:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IVTV_MBOX_FREE,4,2             ## @IVTV_MBOX_FREE
	.comm	_IVTV_MBOX_FIRMWARE_DONE,4,2    ## @IVTV_MBOX_FIRMWARE_DONE
	.comm	_IVTV_MBOX_DRIVER_BUSY,4,2      ## @IVTV_MBOX_DRIVER_BUSY
	.no_dead_strip	_try_mailbox
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function try_mailbox
_try_mailbox:                           ; @try_mailbox
	.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	x20, x2
	mov	x19, x1
	ldr	x8, [x1]
	add	x0, x8, w2, sxtw #2
	bl	_readl
Lloh0:
	adrp	x8, _IVTV_MBOX_FREE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IVTV_MBOX_FREE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _IVTV_MBOX_FIRMWARE_DONE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IVTV_MBOX_FIRMWARE_DONE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	and	w9, w9, w0
	cmp	w0, w8
	ccmp	w9, #0, #0, ne
	b.eq	LBB0_2
; %bb.1:
	add	x1, x19, #8
	mov	x0, x20
	bl	_test_and_set_bit
	cbz	w0, LBB0_3
LBB0_2:
	mov	w0, #0
	b	LBB0_4
LBB0_3:
	sxtw	x8, w20
Lloh6:
	adrp	x9, _IVTV_MBOX_DRIVER_BUSY@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IVTV_MBOX_DRIVER_BUSY@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x9]
	ldr	x9, [x19]
	add	x1, x9, x8, lsl #2
	bl	_write_sync
	mov	w0, #1
LBB0_4:
	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	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_IVTV_MBOX_FREE,4,2             ; @IVTV_MBOX_FREE
	.comm	_IVTV_MBOX_FIRMWARE_DONE,4,2    ; @IVTV_MBOX_FIRMWARE_DONE
	.comm	_IVTV_MBOX_DRIVER_BUSY,4,2      ; @IVTV_MBOX_DRIVER_BUSY
	.no_dead_strip	_try_mailbox
.subsections_via_symbols
