	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rmi_f34v7_erase_config
_rmi_f34v7_erase_config:                ## @rmi_f34v7_erase_config
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_info
	leaq	4(%rbx), %rdi
	callq	_init_completion
	movl	(%rbx), %eax
	cmpl	$130, %eax
	je	LBB0_5
## %bb.1:
	cmpl	$129, %eax
	je	LBB0_4
## %bb.2:
	cmpl	$128, %eax
	jne	LBB0_7
## %bb.3:
	movq	_v7_CMD_ERASE_UI_CONFIG@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_5:
	movq	_v7_CMD_ERASE_BL_CONFIG@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_4:
	movq	_v7_CMD_ERASE_DISP_CONFIG@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_rmi_f34v7_write_command
	testl	%eax, %eax
	js	LBB0_8
LBB0_7:
	movq	_F34_ERASE_WAIT_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_rmi_f34v7_wait_for_idle
	movl	%eax, %ecx
	sarl	$31, %ecx
	andl	%ecx, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Erasing config...\n"

	.comm	_v7_CMD_ERASE_UI_CONFIG,4,2     ## @v7_CMD_ERASE_UI_CONFIG
	.comm	_v7_CMD_ERASE_DISP_CONFIG,4,2   ## @v7_CMD_ERASE_DISP_CONFIG
	.comm	_v7_CMD_ERASE_BL_CONFIG,4,2     ## @v7_CMD_ERASE_BL_CONFIG
	.comm	_F34_ERASE_WAIT_MS,4,2          ## @F34_ERASE_WAIT_MS
	.no_dead_strip	_rmi_f34v7_erase_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rmi_f34v7_erase_config
_rmi_f34v7_erase_config:                ; @rmi_f34v7_erase_config
	.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
	ldr	x0, [x0, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_info
	add	x0, x19, #4
	bl	_init_completion
	ldr	w8, [x19]
	cmp	w8, #130
	b.eq	LBB0_4
; %bb.1:
	cmp	w8, #129
	b.eq	LBB0_5
; %bb.2:
	cmp	w8, #128
	b.ne	LBB0_7
; %bb.3:
Lloh2:
	adrp	x8, _v7_CMD_ERASE_UI_CONFIG@GOTPAGE
Lloh3:
	ldr	x8, [x8, _v7_CMD_ERASE_UI_CONFIG@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
Lloh4:
	adrp	x8, _v7_CMD_ERASE_BL_CONFIG@GOTPAGE
Lloh5:
	ldr	x8, [x8, _v7_CMD_ERASE_BL_CONFIG@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh6:
	adrp	x8, _v7_CMD_ERASE_DISP_CONFIG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _v7_CMD_ERASE_DISP_CONFIG@GOTPAGEOFF]
LBB0_6:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rmi_f34v7_write_command
	tbnz	w0, #31, LBB0_8
LBB0_7:
Lloh8:
	adrp	x8, _F34_ERASE_WAIT_MS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _F34_ERASE_WAIT_MS@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rmi_f34v7_wait_for_idle
	cmp	w0, #0
	csel	w0, w0, wzr, lt
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Erasing config...\n"

	.comm	_v7_CMD_ERASE_UI_CONFIG,4,2     ; @v7_CMD_ERASE_UI_CONFIG
	.comm	_v7_CMD_ERASE_DISP_CONFIG,4,2   ; @v7_CMD_ERASE_DISP_CONFIG
	.comm	_v7_CMD_ERASE_BL_CONFIG,4,2     ; @v7_CMD_ERASE_BL_CONFIG
	.comm	_F34_ERASE_WAIT_MS,4,2          ; @F34_ERASE_WAIT_MS
	.no_dead_strip	_rmi_f34v7_erase_config
.subsections_via_symbols
