	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cfi_staa_erase_varsize
_cfi_staa_erase_varsize:                ## @cfi_staa_erase_varsize
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movq	(%rsi), %rbx
	cmpq	%rax, %rbx
	jg	LBB0_1
## %bb.2:
	movq	8(%rsi), %r12
	leaq	(%r12,%rbx), %r9
	cmpq	%rax, %r9
	jg	LBB0_1
## %bb.3:
	movq	16(%rdi), %r10
	movslq	8(%rdi), %r8
	testq	%r8, %r8
	jle	LBB0_4
## %bb.5:
	movl	%r8d, %ecx
	xorl	%edx, %edx
	movq	%r10, %rax
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	(%rax), %rbx
	jl	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	incq	%rdx
	addq	$24, %rax
	cmpq	%rdx, %rcx
	jne	LBB0_6
## %bb.8:
	movl	%ecx, %edx
	jmp	LBB0_9
LBB0_4:
	xorl	%edx, %edx
LBB0_9:
	leal	-1(%rdx), %r15d
	movslq	%r15d, %rax
	leaq	(%rax,%rax,2), %rax
	movslq	8(%r10,%rax,8), %rax
	decq	%rax
	testq	%rax, %rbx
	jne	LBB0_1
## %bb.10:
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movl	%r15d, %eax
	cmpl	%r8d, %edx
	jg	LBB0_16
## %bb.11:
	movslq	%edx, %rsi
	leaq	(%rsi,%rsi,2), %rax
	leaq	(%r10,%rax,8), %rax
	addq	$-24, %rax
	subq	%r8, %rsi
	movl	$1, %ecx
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	cmpq	(%rax), %r9
	jl	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	decq	%rcx
	addq	$24, %rax
	cmpq	%rcx, %rsi
	jne	LBB0_12
## %bb.14:
	movl	%r8d, %eax
	jmp	LBB0_16
LBB0_15:
	subl	%ecx, %edx
	movl	%edx, %eax
LBB0_16:
	decl	%eax
	cltq
	leaq	(%rax,%rax,2), %rax
	movslq	8(%r10,%rax,8), %rax
	decq	%rax
	testq	%rax, %r9
	je	LBB0_17
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_31:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	movq	%r10, -72(%rbp)                 ## 8-byte Spill
	testq	%r12, %r12
	je	LBB0_30
## %bb.18:
	movq	24(%rdi), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	(%rax), %r14
	movb	(%r14), %cl
	movq	%rbx, %r13
	sarq	%cl, %r13
	movl	%r13d, %eax
	shll	%cl, %eax
	cltq
	subq	%rax, %rbx
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_29:                                ##   in Loop: Header=BB0_19 Depth=1
	subq	%r9, %r12
	movb	%dl, %al
	addl	%eax, %r15d
	testq	%r12, %r12
	je	LBB0_30
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movslq	%r13d, %rsi
	shlq	$2, %rsi
	addq	8(%r14), %rsi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rdx
	callq	_do_erase_oneblock
	testl	%eax, %eax
	jne	LBB0_31
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	movslq	%r15d, %rax
	leaq	(%rax,%rax,2), %r10
	movq	-72(%rbp), %r11                 ## 8-byte Reload
	movslq	8(%r11,%r10,8), %r9
	movl	(%r14), %ecx
	movl	$1, %esi
	shll	%cl, %esi
	addq	%r9, %rbx
	movslq	%esi, %rdi
	movq	%rbx, %rax
	orq	%rdi, %rax
	shrq	$32, %rax
	je	LBB0_21
## %bb.22:                              ##   in Loop: Header=BB0_19 Depth=1
	movq	%rbx, %rax
	xorl	%edx, %edx
	divq	%rdi
	movq	%rdx, %r8
	jmp	LBB0_23
LBB0_21:                                ##   in Loop: Header=BB0_19 Depth=1
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%esi
	movl	%edx, %r8d
LBB0_23:                                ##   in Loop: Header=BB0_19 Depth=1
	movq	16(%r11,%r10,8), %rax
	imulq	%r9, %rax
	addq	(%r11,%r10,8), %rax
	movq	%rax, %rdx
	orq	%rdi, %rdx
	shrq	$32, %rdx
	je	LBB0_24
## %bb.25:                              ##   in Loop: Header=BB0_19 Depth=1
	xorl	%edx, %edx
	divq	%rdi
	jmp	LBB0_26
LBB0_24:                                ##   in Loop: Header=BB0_19 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%esi
                                        ## kill: def $edx killed $edx def $rdx
LBB0_26:                                ##   in Loop: Header=BB0_19 Depth=1
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	xorl	%eax, %eax
	cmpq	%rdx, %r8
	sete	%dl
	movq	%rbx, %rsi
                                        ## kill: def $cl killed $cl killed $rcx
	shrq	%cl, %rsi
	testq	%rsi, %rsi
	je	LBB0_29
## %bb.27:                              ##   in Loop: Header=BB0_19 Depth=1
	incl	%r13d
	cmpl	4(%r14), %r13d
	jge	LBB0_30
## %bb.28:                              ##   in Loop: Header=BB0_19 Depth=1
	xorl	%ebx, %ebx
	jmp	LBB0_29
LBB0_30:
	movq	_MTD_ERASE_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, 16(%rdi)
	callq	_mtd_erase_callback
	xorl	%eax, %eax
	jmp	LBB0_31
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MTD_ERASE_DONE,4,2             ## @MTD_ERASE_DONE
	.no_dead_strip	_cfi_staa_erase_varsize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cfi_staa_erase_varsize
_cfi_staa_erase_varsize:                ; @cfi_staa_erase_varsize
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	x8, [x1]
	ldr	x10, [x0]
	cmp	x8, x10
	b.gt	LBB0_16
; %bb.1:
	mov	x19, x1
	ldr	x22, [x1, #8]
	add	x9, x22, x8
	cmp	x9, x10
	b.gt	LBB0_16
; %bb.2:
	ldr	x23, [x0, #16]
	ldr	w10, [x0, #8]
	cmp	w10, #1
	b.lt	LBB0_7
; %bb.3:
	mov	x12, #0
	mov	x11, x23
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x13, [x11]
	cmp	x8, x13
	b.lt	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x12, x12, #1
	add	x11, x11, #24
	cmp	x10, x12
	b.ne	LBB0_4
; %bb.6:
	mov	x12, x10
	b	LBB0_9
LBB0_7:
	mov	w12, #0
	b	LBB0_9
LBB0_8:
                                        ; kill: def $w12 killed $w12 killed $x12 def $x12
LBB0_9:
	sxtw	x11, w12
	sub	x24, x11, #1
	mov	w11, #24
	madd	x11, x24, x11, x23
	ldrsw	x11, [x11, #8]
	sub	x11, x11, #1
	tst	x8, x11
	b.ne	LBB0_16
; %bb.10:
	mov	x11, x24
	cmp	w12, w10
	b.gt	LBB0_15
; %bb.11:
	mov	x11, x10
	sxtw	x14, w11
	sub	w11, w12, #1
	mov	w13, #24
	smaddl	x13, w12, w13, x23
	sub	x13, x13, #24
	sub	x12, x14, w12, sxtw
	add	x12, x12, #1
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x14, [x13]
	cmp	x9, x14
	b.lt	LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	add	w11, w11, #1
	add	x13, x13, #24
	subs	x12, x12, #1
	b.ne	LBB0_12
; %bb.14:
	mov	x11, x10
LBB0_15:
	mov	w10, #24
	smaddl	x10, w11, w10, x23
	ldursw	x10, [x10, #-16]
	sub	x10, x10, #1
	tst	x9, x10
	b.eq	LBB0_18
LBB0_16:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_17:
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_18:
	cbz	x22, LBB0_25
; %bb.19:
	ldr	x20, [x0, #24]
	ldr	x25, [x20]
	ldr	w9, [x25]
	asr	x26, x8, x9
	lsl	w9, w26, w9
	sub	x21, x8, w9, sxtw
	mov	w27, #24
	mov	w28, #1
	b	LBB0_21
LBB0_20:                                ;   in Loop: Header=BB0_21 Depth=1
	sub	x22, x22, x8
	cbz	x22, LBB0_25
LBB0_21:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x25, #8]
	add	x1, x8, w26, sxtw #2
	mov	x0, x20
	mov	x2, x21
	bl	_do_erase_oneblock
	cbnz	w0, LBB0_17
; %bb.22:                               ;   in Loop: Header=BB0_21 Depth=1
	smaddl	x9, w24, w27, x23
	ldrsw	x8, [x9, #8]
	add	x21, x21, x8
	ldr	w10, [x25]
	lsl	w11, w28, w10
	sxtw	x11, w11
	udiv	x12, x21, x11
	msub	x12, x12, x11, x21
	ldr	x13, [x9]
	ldr	x9, [x9, #16]
	madd	x9, x9, x8, x13
	udiv	x13, x9, x11
	msub	x9, x13, x11, x9
	cmp	x12, x9
	cinc	w24, w24, eq
	lsr	x9, x21, x10
	cbz	x9, LBB0_20
; %bb.23:                               ;   in Loop: Header=BB0_21 Depth=1
	add	w26, w26, #1
	ldr	w9, [x25, #4]
	cmp	w26, w9
	b.ge	LBB0_25
; %bb.24:                               ;   in Loop: Header=BB0_21 Depth=1
	mov	x21, #0
	b	LBB0_20
LBB0_25:
Lloh3:
	adrp	x8, _MTD_ERASE_DONE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MTD_ERASE_DONE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x19, #16]
	mov	x0, x19
	bl	_mtd_erase_callback
	mov	w0, #0
	b	LBB0_17
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MTD_ERASE_DONE,4,2             ; @MTD_ERASE_DONE
	.no_dead_strip	_cfi_staa_erase_varsize
.subsections_via_symbols
