	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rmi_f34v7_enter_flash_prog
_rmi_f34v7_enter_flash_prog:            ## @rmi_f34v7_enter_flash_prog
	.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	16(%rdi), %rax
	movq	8(%rax), %rdi
	movq	(%rdi), %rcx
	movl	(%rax), %esi
	callq	*(%rcx)
	movq	%rbx, %rdi
	callq	_rmi_f34v7_read_flash_status
	testl	%eax, %eax
	js	LBB0_4
## %bb.1:
	xorl	%eax, %eax
	cmpq	$0, 8(%rbx)
	jne	LBB0_4
## %bb.2:
	movq	%rbx, %rdi
	callq	_init_completion
	movq	_v7_CMD_ENABLE_FLASH_PROG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_rmi_f34v7_write_command
	testl	%eax, %eax
	js	LBB0_4
## %bb.3:
	movq	_F34_ENABLE_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_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_v7_CMD_ENABLE_FLASH_PROG,4,2   ## @v7_CMD_ENABLE_FLASH_PROG
	.comm	_F34_ENABLE_WAIT_MS,4,2         ## @F34_ENABLE_WAIT_MS
	.no_dead_strip	_rmi_f34v7_enter_flash_prog
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rmi_f34v7_enter_flash_prog
_rmi_f34v7_enter_flash_prog:            ; @rmi_f34v7_enter_flash_prog
	.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	x8, [x0, #16]
	ldr	x0, [x8, #8]
	ldr	x9, [x0]
	ldr	x9, [x9]
	ldr	w1, [x8]
	blr	x9
	mov	x0, x19
	bl	_rmi_f34v7_read_flash_status
	tbnz	w0, #31, LBB0_5
; %bb.1:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_3
; %bb.2:
	mov	w0, #0
	b	LBB0_5
LBB0_3:
	mov	x0, x19
	bl	_init_completion
Lloh0:
	adrp	x8, _v7_CMD_ENABLE_FLASH_PROG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _v7_CMD_ENABLE_FLASH_PROG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rmi_f34v7_write_command
	tbnz	w0, #31, LBB0_5
; %bb.4:
Lloh3:
	adrp	x8, _F34_ENABLE_WAIT_MS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _F34_ENABLE_WAIT_MS@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_rmi_f34v7_wait_for_idle
	cmp	w0, #0
	csel	w0, w0, wzr, lt
LBB0_5:
	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	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_v7_CMD_ENABLE_FLASH_PROG,4,2   ; @v7_CMD_ENABLE_FLASH_PROG
	.comm	_F34_ENABLE_WAIT_MS,4,2         ; @F34_ENABLE_WAIT_MS
	.no_dead_strip	_rmi_f34v7_enter_flash_prog
.subsections_via_symbols
