	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function be_err_recover
_be_err_recover:                        ## @be_err_recover
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	callq	_lancer_chip
	testl	%eax, %eax
	je	LBB0_1
LBB0_5:
	movq	%rbx, %rdi
	callq	_be_fw_wait_ready
	testl	%eax, %eax
	jne	LBB0_8
## %bb.6:
	movq	_BE_FLAGS_TRY_RECOVERY@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	orl	%eax, 4(%rbx)
	movq	%rbx, %rdi
	callq	_be_cleanup
	movq	%rbx, %rdi
	callq	_be_resume
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:
	movl	(%r14), %eax
	notl	%eax
	andl	%eax, 4(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_1:
	cmpl	$0, 8(%rbx)
	je	LBB0_3
## %bb.2:
	movq	_BE_DISABLE_TPE_RECOVERY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_4
LBB0_3:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	movq	%rbx, %rdi
	callq	_be_tpe_recover
	testl	%eax, %eax
	jne	LBB0_8
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_BE_DISABLE_TPE_RECOVERY,4,2    ## @BE_DISABLE_TPE_RECOVERY
	.comm	_EIO,4,2                        ## @EIO
	.comm	_BE_FLAGS_TRY_RECOVERY,4,2      ## @BE_FLAGS_TRY_RECOVERY
	.no_dead_strip	_be_err_recover
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function be_err_recover
_be_err_recover:                        ; @be_err_recover
	.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	x19, x0
	bl	_lancer_chip
	cbz	w0, LBB0_4
LBB0_1:
	mov	x0, x19
	bl	_be_fw_wait_ready
	cbnz	w0, LBB0_7
; %bb.2:
Lloh0:
	adrp	x20, _BE_FLAGS_TRY_RECOVERY@GOTPAGE
Lloh1:
	ldr	x20, [x20, _BE_FLAGS_TRY_RECOVERY@GOTPAGEOFF]
	ldr	w8, [x20]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
	mov	x0, x19
	bl	_be_cleanup
	mov	x0, x19
	bl	_be_resume
	cbnz	w0, LBB0_7
; %bb.3:
	ldr	w8, [x20]
	ldr	w9, [x19, #4]
	bic	w8, w9, w8
	str	w8, [x19, #4]
	b	LBB0_7
LBB0_4:
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_6
; %bb.5:
	ldr	w8, [x19]
Lloh2:
	adrp	x9, _BE_DISABLE_TPE_RECOVERY@GOTPAGE
Lloh3:
	ldr	x9, [x9, _BE_DISABLE_TPE_RECOVERY@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
LBB0_6:
Lloh5:
	adrp	x8, _EIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_8:
	mov	x0, x19
	bl	_be_tpe_recover
	cbnz	w0, LBB0_7
	b	LBB0_1
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_BE_DISABLE_TPE_RECOVERY,4,2    ; @BE_DISABLE_TPE_RECOVERY
	.comm	_EIO,4,2                        ; @EIO
	.comm	_BE_FLAGS_TRY_RECOVERY,4,2      ; @BE_FLAGS_TRY_RECOVERY
	.no_dead_strip	_be_err_recover
.subsections_via_symbols
