	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _picolcd_flash_erase64
__picolcd_flash_erase64:                ## @_picolcd_flash_erase64
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	(%rdx), %edx
	testb	$63, %dl
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subq	(%rax), %rbx
	jmp	LBB0_8
LBB0_2:
	movl	%esi, %r14d
	movq	%rdi, %r12
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subq	(%rax), %rbx
	leaq	-60(%rbp), %r13
	movq	%r13, %rsi
	callq	__picolcd_flash_setaddr
	movl	%eax, %r15d
	movl	(%r12), %edi
	movl	%r14d, %esi
	movq	%r13, %rdx
	movl	%eax, %ecx
	callq	_picolcd_send_and_wait
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	movq	8(%r14), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	movq	(%rax), %rax
	movq	_REPORT_MEMORY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.5:
	movq	_REPORT_BL_ERASE_MEMORY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
LBB0_6:
	movl	(%r14), %esi
	leaq	-60(%rbp), %rdi
	movl	%r15d, %edx
	callq	_memcmp
	testq	%rax, %rax
	cmoveq	%rax, %rbx
LBB0_7:
	movq	%r14, %rdi
	callq	_kfree
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_10
## %bb.9:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,8,3                        ## @EIO
	.comm	_EINVAL,8,3                     ## @EINVAL
	.comm	_REPORT_MEMORY,8,3              ## @REPORT_MEMORY
	.comm	_REPORT_BL_ERASE_MEMORY,8,3     ## @REPORT_BL_ERASE_MEMORY
	.no_dead_strip	__picolcd_flash_erase64
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _picolcd_flash_erase64
__picolcd_flash_erase64:                ; @_picolcd_flash_erase64
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldr	w2, [x2]
	tst	w2, #0x3f
	b.eq	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	neg	x19, x8
	b	LBB0_7
LBB0_2:
	mov	x20, x1
	mov	x22, x0
Lloh6:
	adrp	x8, _EIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	neg	x19, x8
	add	x1, sp, #12
	bl	__picolcd_flash_setaddr
	mov	x21, x0
	ldr	w0, [x22]
	add	x2, sp, #12
	mov	x1, x20
	mov	x3, x21
	bl	_picolcd_send_and_wait
	mov	x20, x0
	cbz	x0, LBB0_6
; %bb.3:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_6
; %bb.4:
	ldr	x8, [x8]
Lloh9:
	adrp	x9, _REPORT_MEMORY@GOTPAGE
Lloh10:
	ldr	x9, [x9, _REPORT_MEMORY@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
Lloh12:
	adrp	x10, _REPORT_BL_ERASE_MEMORY@GOTPAGE
Lloh13:
	ldr	x10, [x10, _REPORT_BL_ERASE_MEMORY@GOTPAGEOFF]
Lloh14:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_6
; %bb.5:
	ldr	w1, [x20]
	add	x0, sp, #12
	mov	x2, x21
	bl	_memcmp
	cmp	x0, #0
	csel	x19, xzr, x19, eq
LBB0_6:
	mov	x0, x20
	bl	_kfree
LBB0_7:
	ldr	x8, [sp, #24]
Lloh15:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh16:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.8:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_9:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,8,3                        ; @EIO
	.comm	_EINVAL,8,3                     ; @EINVAL
	.comm	_REPORT_MEMORY,8,3              ; @REPORT_MEMORY
	.comm	_REPORT_BL_ERASE_MEMORY,8,3     ; @REPORT_BL_ERASE_MEMORY
	.no_dead_strip	__picolcd_flash_erase64
.subsections_via_symbols
