	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_FLASH_WaitForLastOperation     ## -- Begin function FLASH_WaitForLastOperation
	.p2align	4, 0x90
_FLASH_WaitForLastOperation:            ## @FLASH_WaitForLastOperation
	.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
	movl	%edi, %ebx
	xorl	%eax, %eax
	callq	_FLASH_GetStatus
	movq	_FLASH_BUSY@GOTPCREL(%rip), %r14
	cmpq	(%r14), %rax
	jne	LBB0_1
## %bb.2:
	testl	%ebx, %ebx
	je	LBB0_3
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_delay
	xorl	%eax, %eax
	callq	_FLASH_GetStatus
	leal	-1(%rbx), %ecx
	cmpq	(%r14), %rax
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$1, %ebx
	movl	%ecx, %ebx
	jne	LBB0_4
	jmp	LBB0_6
LBB0_1:
	movl	%ebx, %ecx
LBB0_6:
	testl	%ecx, %ecx
	jne	LBB0_8
LBB0_7:
	movq	_FLASH_TIMEOUT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_8:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_3:
	movl	%ebx, %ecx
	testl	%ecx, %ecx
	je	LBB0_7
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_FLASH_BUSY,8,3                 ## @FLASH_BUSY
	.comm	_FLASH_TIMEOUT,8,3              ## @FLASH_TIMEOUT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_FLASH_WaitForLastOperation     ; -- Begin function FLASH_WaitForLastOperation
	.p2align	2
_FLASH_WaitForLastOperation:            ; @FLASH_WaitForLastOperation
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
	bl	_FLASH_GetStatus
Lloh0:
	adrp	x20, _FLASH_BUSY@GOTPAGE
Lloh1:
	ldr	x20, [x20, _FLASH_BUSY@GOTPAGEOFF]
	ldr	x8, [x20]
	cmp	x0, x8
	ccmp	w19, #0, #4, eq
	b.eq	LBB0_2
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x21, x19
	bl	_delay
	bl	_FLASH_GetStatus
	sub	w19, w19, #1
	ldr	x8, [x20]
	cmp	x0, x8
	ccmp	w21, #1, #4, eq
	b.ne	LBB0_1
LBB0_2:
Lloh2:
	adrp	x8, _FLASH_TIMEOUT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _FLASH_TIMEOUT@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	w19, #0
	csel	x0, x8, x0, eq
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_FLASH_BUSY,8,3                 ; @FLASH_BUSY
	.comm	_FLASH_TIMEOUT,8,3              ; @FLASH_TIMEOUT
.subsections_via_symbols
