	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function erasecrosstest
_erasecrosstest:                        ## @erasecrosstest
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_twopages@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_pr_info
	movq	_ebcnt@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_bbt@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	testl	%eax, %eax
	jle	LBB0_1
## %bb.2:
	movq	_mtd@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rcx,%rbx,8)
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	addq	(%rdx), %r15
	incq	%rbx
	cmpq	%rbx, %rax
	jne	LBB0_3
## %bb.5:
	movl	%eax, %ebx
	jmp	LBB0_6
LBB0_1:
	xorl	%r15d, %r15d
LBB0_6:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movslq	%eax, %rdx
	decl	%eax
	leaq	(%rcx,%rdx,8), %rcx
	addq	$-8, %rcx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	%eax, %r12d
	subl	$1, %eax
	jb	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	cmpq	$0, (%rcx)
	leaq	-8(%rcx), %rcx
	jne	LBB0_7
LBB0_9:
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_pr_info
	movq	_mtd@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movl	%ebx, %esi
	callq	_mtdtest_erase_eraseblock
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_20
## %bb.10:
	leaq	L_.str.2(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_pr_info
	movq	_writebuf@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	_pgsize@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movq	_rnd_state@GOTPCREL(%rip), %rdi
	callq	_prandom_bytes_state
	movl	(%r13), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_strcpy
	movq	_mtd@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movl	(%r14), %edx
	movl	(%r13), %ecx
	movq	%r15, %rsi
	callq	_mtdtest_write
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_20
## %bb.11:
	leaq	L_.str.4(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_pr_info
	movq	_pgsize@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_memset
	movq	_mtd@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movl	(%r14), %edx
	movq	%r15, %rsi
	movq	%r13, %rcx
	callq	_mtdtest_read
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_20
## %bb.12:
	movq	_mtd@GOTPCREL(%rip), %r13
	leaq	L_.str.5(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_pr_info
	movq	_writebuf@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_pgsize@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_14
LBB0_13:
	leaq	L_.str.6(%rip), %rdi
	callq	_pr_err
	movq	_errcnt@GOTPCREL(%rip), %rax
	incl	(%rax)
	movl	$-1, %r13d
	jmp	LBB0_20
LBB0_14:
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_pr_info
	movq	(%r13), %rdi
	movl	%ebx, %esi
	callq	_mtdtest_erase_eraseblock
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_20
## %bb.15:
	leaq	L_.str.2(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_pr_info
	movq	_writebuf@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movl	(%r14), %edx
	movq	_rnd_state@GOTPCREL(%rip), %rdi
	callq	_prandom_bytes_state
	movl	(%r13), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_strcpy
	movq	_mtd@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movl	(%r14), %edx
	movl	(%r13), %ecx
	movq	%r15, %rsi
	callq	_mtdtest_write
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_20
## %bb.16:
	leaq	L_.str.1(%rip), %rdi
	movl	%r12d, %esi
	xorl	%eax, %eax
	callq	_pr_info
	movq	_mtd@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movl	%r12d, %esi
	callq	_mtdtest_erase_eraseblock
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_20
## %bb.17:
	leaq	L_.str.4(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_pr_info
	movl	(%r14), %edx
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_memset
	movq	_mtd@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movl	(%r14), %edx
	movq	%r15, %rsi
	movq	%r12, %rcx
	callq	_mtdtest_read
	movl	%eax, %r13d
	testl	%eax, %eax
	je	LBB0_18
LBB0_20:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	leaq	L_.str.5(%rip), %rdi
	xorl	%r13d, %r13d
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_pr_info
	movq	_writebuf@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r14), %edx
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_memcmp
	testq	%rax, %rax
	jne	LBB0_13
## %bb.19:
	leaq	L_.str.7(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_info
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_twopages,8,3                   ## @twopages
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"erasecrosstest\n"

	.comm	_ebcnt,4,2                      ## @ebcnt
	.comm	_bbt,8,3                        ## @bbt
	.comm	_mtd,8,3                        ## @mtd
L_.str.1:                               ## @.str.1
	.asciz	"erasing block %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"writing 1st page of block %d\n"

	.comm	_rnd_state,4,2                  ## @rnd_state
	.comm	_writebuf,4,2                   ## @writebuf
	.comm	_pgsize,4,2                     ## @pgsize
L_.str.3:                               ## @.str.3
	.asciz	"There is no data like this!"

L_.str.4:                               ## @.str.4
	.asciz	"reading 1st page of block %d\n"

L_.str.5:                               ## @.str.5
	.asciz	"verifying 1st page of block %d\n"

L_.str.6:                               ## @.str.6
	.asciz	"verify failed!\n"

	.comm	_errcnt,4,2                     ## @errcnt
L_.str.7:                               ## @.str.7
	.asciz	"erasecrosstest ok\n"

	.no_dead_strip	_erasecrosstest
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function erasecrosstest
_erasecrosstest:                        ; @erasecrosstest
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
Lloh0:
	adrp	x8, _twopages@GOTPAGE
Lloh1:
	ldr	x8, [x8, _twopages@GOTPAGEOFF]
Lloh2:
	ldr	x19, [x8]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_info
Lloh5:
	adrp	x8, _ebcnt@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ebcnt@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _bbt@GOTPAGE
Lloh9:
	ldr	x9, [x9, _bbt@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
Lloh11:
	adrp	x23, _mtd@GOTPAGE
Lloh12:
	ldr	x23, [x23, _mtd@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x21, #0
	mov	x20, #0
	ldr	x10, [x23]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x9, x21, lsl #3]
	cbz	x11, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x11, [x10]
	add	x20, x11, x20
	add	x21, x21, #1
	cmp	x8, x21
	b.ne	LBB0_2
; %bb.4:
	mov	x21, x8
	b	LBB0_7
LBB0_5:
	mov	w21, #0
	mov	x20, #0
	b	LBB0_7
LBB0_6:
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
LBB0_7:
	sub	w10, w8, #1
	add	x8, x9, w8, sxtw #3
	sub	x8, x8, #8
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	mov	x22, x10
	cbz	w10, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x9, [x8], #-8
	sub	w10, w22, #1
	cbnz	x9, LBB0_8
LBB0_10:
	str	x21, [sp]
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_info
	ldr	x0, [x23]
	mov	x1, x21
	bl	_mtdtest_erase_eraseblock
	cbnz	w0, LBB0_19
; %bb.11:
	mov	x8, x21
	str	x8, [sp]
Lloh15:
	adrp	x0, l_.str.2@PAGE
Lloh16:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_info
Lloh17:
	adrp	x24, _writebuf@GOTPAGE
Lloh18:
	ldr	x24, [x24, _writebuf@GOTPAGEOFF]
	ldr	w1, [x24]
Lloh19:
	adrp	x25, _pgsize@GOTPAGE
Lloh20:
	ldr	x25, [x25, _pgsize@GOTPAGEOFF]
	ldr	w2, [x25]
Lloh21:
	adrp	x0, _rnd_state@GOTPAGE
Lloh22:
	ldr	x0, [x0, _rnd_state@GOTPAGEOFF]
	bl	_prandom_bytes_state
	ldr	w0, [x24]
Lloh23:
	adrp	x1, l_.str.3@PAGE
Lloh24:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_strcpy
	ldr	x0, [x23]
	ldr	w2, [x25]
	ldr	w3, [x24]
	mov	x1, x20
	bl	_mtdtest_write
	cbnz	w0, LBB0_19
; %bb.12:
	mov	x8, x21
	str	x8, [sp]
Lloh25:
	adrp	x0, l_.str.4@PAGE
Lloh26:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_pr_info
	ldr	w2, [x25]
	mov	x0, x19
	mov	w1, #0
	bl	_memset
	ldr	x0, [x23]
	ldr	w2, [x25]
	mov	x1, x20
	mov	x3, x19
	bl	_mtdtest_read
	cbnz	w0, LBB0_19
; %bb.13:
	mov	x8, x21
	str	x8, [sp]
Lloh27:
	adrp	x0, l_.str.5@PAGE
Lloh28:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_pr_info
	ldr	w0, [x24]
	ldr	w2, [x25]
	mov	x1, x19
	bl	_memcmp
	cbz	x0, LBB0_15
LBB0_14:
Lloh29:
	adrp	x0, l_.str.6@PAGE
Lloh30:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_pr_err
Lloh31:
	adrp	x8, _errcnt@GOTPAGE
Lloh32:
	ldr	x8, [x8, _errcnt@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	mov	w0, #-1
	b	LBB0_19
LBB0_15:
	mov	x8, x21
	str	x8, [sp]
Lloh33:
	adrp	x0, l_.str.1@PAGE
Lloh34:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_info
	ldr	x0, [x23]
	mov	x1, x21
	bl	_mtdtest_erase_eraseblock
	cbnz	w0, LBB0_19
; %bb.16:
	mov	x8, x21
	str	x8, [sp]
Lloh35:
	adrp	x0, l_.str.2@PAGE
Lloh36:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_info
	ldr	w1, [x24]
	ldr	w2, [x25]
Lloh37:
	adrp	x0, _rnd_state@GOTPAGE
Lloh38:
	ldr	x0, [x0, _rnd_state@GOTPAGEOFF]
	bl	_prandom_bytes_state
	ldr	w0, [x24]
Lloh39:
	adrp	x1, l_.str.3@PAGE
Lloh40:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_strcpy
	ldr	x0, [x23]
	ldr	w2, [x25]
	ldr	w3, [x24]
	mov	x1, x20
	bl	_mtdtest_write
	cbnz	w0, LBB0_19
; %bb.17:
	str	x22, [sp]
Lloh41:
	adrp	x0, l_.str.1@PAGE
Lloh42:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_info
	ldr	x0, [x23]
	mov	x1, x22
	bl	_mtdtest_erase_eraseblock
	cbnz	w0, LBB0_19
; %bb.18:
	mov	x8, x21
	str	x8, [sp]
Lloh43:
	adrp	x0, l_.str.4@PAGE
Lloh44:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_pr_info
	ldr	w2, [x25]
	mov	x0, x19
	mov	w1, #0
	bl	_memset
	ldr	x0, [x23]
	ldr	w2, [x25]
	mov	x1, x20
	mov	x3, x19
	bl	_mtdtest_read
	cbz	w0, LBB0_20
LBB0_19:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_20:
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	str	x21, [sp]
Lloh45:
	adrp	x0, l_.str.5@PAGE
Lloh46:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_pr_info
	ldr	w0, [x24]
	ldr	w2, [x25]
	mov	x1, x19
	bl	_memcmp
	cbnz	x0, LBB0_14
; %bb.21:
Lloh47:
	adrp	x0, l_.str.7@PAGE
Lloh48:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_pr_info
	mov	w0, #0
	b	LBB0_19
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpAdd	Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.comm	_twopages,8,3                   ; @twopages
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"erasecrosstest\n"

	.comm	_ebcnt,4,2                      ; @ebcnt
	.comm	_bbt,8,3                        ; @bbt
	.comm	_mtd,8,3                        ; @mtd
l_.str.1:                               ; @.str.1
	.asciz	"erasing block %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"writing 1st page of block %d\n"

	.comm	_rnd_state,4,2                  ; @rnd_state
	.comm	_writebuf,4,2                   ; @writebuf
	.comm	_pgsize,4,2                     ; @pgsize
l_.str.3:                               ; @.str.3
	.asciz	"There is no data like this!"

l_.str.4:                               ; @.str.4
	.asciz	"reading 1st page of block %d\n"

l_.str.5:                               ; @.str.5
	.asciz	"verifying 1st page of block %d\n"

l_.str.6:                               ; @.str.6
	.asciz	"verify failed!\n"

	.comm	_errcnt,4,2                     ; @errcnt
l_.str.7:                               ; @.str.7
	.asciz	"erasecrosstest ok\n"

	.no_dead_strip	_erasecrosstest
.subsections_via_symbols
