	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function AT91F_DataFlashWaitReady
_AT91F_DataFlashWaitReady:              ## @AT91F_DataFlashWaitReady
	.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	%esi, %ebx
	movq	%rdi, %r14
	movq	_IDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rdi)
	decl	%ebx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_AT91F_DataFlashGetStatus
	movl	(%r14), %eax
	addl	$-1, %ebx
	setb	%cl
	testb	$-128, %al
	jne	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	testb	%cl, %cl
	jne	LBB0_1
LBB0_3:
	testb	$-128, %al
	jne	LBB0_4
## %bb.5:
	movq	_AT91C_DATAFLASH_ERROR@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_4:
	movq	_AT91C_DATAFLASH_OK@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IDLE,4,2                       ## @IDLE
	.comm	_AT91C_DATAFLASH_ERROR,4,2      ## @AT91C_DATAFLASH_ERROR
	.comm	_AT91C_DATAFLASH_OK,4,2         ## @AT91C_DATAFLASH_OK
	.no_dead_strip	_AT91F_DataFlashWaitReady
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function AT91F_DataFlashWaitReady
_AT91F_DataFlashWaitReady:              ; @AT91F_DataFlashWaitReady
	.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
Lloh0:
	adrp	x8, _IDLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IDLE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [x0]
	sub	w20, w1, #1
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_AT91F_DataFlashGetStatus
	ldr	w8, [x19]
	subs	w20, w20, #1
	cset	w9, hs
	tbnz	w8, #7, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	tbnz	w9, #0, LBB0_1
LBB0_3:
Lloh3:
	adrp	x9, _AT91C_DATAFLASH_ERROR@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AT91C_DATAFLASH_ERROR@GOTPAGEOFF]
Lloh5:
	adrp	x10, _AT91C_DATAFLASH_OK@GOTPAGE
Lloh6:
	ldr	x10, [x10, _AT91C_DATAFLASH_OK@GOTPAGEOFF]
	tst	w8, #0x80
	csel	x8, x9, x10, eq
	ldr	w0, [x8]
	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 AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_IDLE,4,2                       ; @IDLE
	.comm	_AT91C_DATAFLASH_ERROR,4,2      ; @AT91C_DATAFLASH_ERROR
	.comm	_AT91C_DATAFLASH_OK,4,2         ; @AT91C_DATAFLASH_OK
	.no_dead_strip	_AT91F_DataFlashWaitReady
.subsections_via_symbols
