	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %r15
	movslq	(%rdi), %r8
	movslq	(%rsi), %rax
	testq	%r8, %r8
	jle	LBB0_1
## %bb.2:
	movl	%r8d, %ebx
	xorl	%edx, %edx
	movq	%r15, %rcx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	(%rcx), %eax
	jl	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rdx
	addq	$16, %rcx
	cmpq	%rdx, %rbx
	jne	LBB0_3
## %bb.5:
	movl	%ebx, %edx
	jmp	LBB0_6
LBB0_1:
	xorl	%edx, %edx
LBB0_6:
	movslq	%edx, %r10
	movq	%r10, %rcx
	shlq	$4, %rcx
	movl	-12(%rcx,%r15), %ebx
	decl	%ebx
	testl	%eax, %ebx
	jne	LBB0_14
## %bb.7:
	leal	-1(%rdx), %r12d
	cmpl	%r8d, %edx
	jle	LBB0_9
## %bb.8:
	movq	8(%rsi), %r14
	leaq	(%r14,%rax), %r9
	movl	%r12d, %r8d
	jmp	LBB0_13
LBB0_9:
	movq	8(%rsi), %r14
	leaq	(%r14,%rax), %r9
	leaq	(%rcx,%r15), %rsi
	addq	$-16, %rsi
	subq	%r8, %r10
	movl	$1, %ecx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movslq	(%rsi), %rbx
	cmpq	%rbx, %r9
	jl	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	decq	%rcx
	addq	$16, %rsi
	cmpq	%rcx, %r10
	jne	LBB0_10
	jmp	LBB0_13
LBB0_12:
	subl	%ecx, %edx
	movl	%edx, %r8d
LBB0_13:
	movslq	%r8d, %rcx
	shlq	$4, %rcx
	movslq	-12(%rcx,%r15), %rcx
	decq	%rcx
	testq	%rcx, %r9
	je	LBB0_15
LBB0_14:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_30:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	testq	%r14, %r14
	je	LBB0_29
## %bb.16:
	movq	16(%rdi), %rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	(%rcx), %r11
	movb	(%r11), %cl
	movl	%eax, %esi
	sarl	%cl, %esi
	movl	%esi, %edx
	shll	%cl, %edx
	subl	%edx, %eax
	movslq	%eax, %rbx
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_26:                                ##   in Loop: Header=BB0_17 Depth=1
	movl	-44(%rbp), %esi                 ## 4-byte Reload
LBB0_28:                                ##   in Loop: Header=BB0_17 Depth=1
	subq	%r9, %r14
	movb	%dl, %al
	addl	%eax, %r12d
	testq	%r14, %r14
	je	LBB0_29
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movl	%r12d, %r13d
	movq	%r15, %r12
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movslq	%esi, %rsi
	shlq	$2, %rsi
	addq	8(%r11), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rdx
	movq	%r11, %r15
	callq	_do_erase_oneblock
	testl	%eax, %eax
	jne	LBB0_18
## %bb.19:                              ##   in Loop: Header=BB0_17 Depth=1
	movslq	%r13d, %rdi
	shlq	$4, %rdi
	movslq	4(%r12,%rdi), %r9
	movl	(%r15), %ecx
	movl	$1, %esi
	shll	%cl, %esi
	addq	%r9, %rbx
	movslq	%esi, %r10
	movq	%rbx, %rax
	orq	%r10, %rax
	shrq	$32, %rax
	movq	%r15, %r11
	je	LBB0_20
## %bb.21:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	%rbx, %rax
	xorl	%edx, %edx
	divq	%r10
	movq	%rdx, %r8
	jmp	LBB0_22
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_17 Depth=1
	movl	%ebx, %eax
	xorl	%edx, %edx
	divl	%esi
	movl	%edx, %r8d
LBB0_22:                                ##   in Loop: Header=BB0_17 Depth=1
	movq	%r12, %r15
	movl	%r13d, %r12d
	movslq	(%r15,%rdi), %rdx
	movq	8(%r15,%rdi), %rax
	imulq	%r9, %rax
	addq	%rdx, %rax
	movq	%rax, %rdx
	orq	%r10, %rdx
	shrq	$32, %rdx
	je	LBB0_23
## %bb.24:                              ##   in Loop: Header=BB0_17 Depth=1
	xorl	%edx, %edx
	divq	%r10
	jmp	LBB0_25
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_17 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%esi
                                        ## kill: def $edx killed $edx def $rdx
LBB0_25:                                ##   in Loop: Header=BB0_17 Depth=1
	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_26
## %bb.27:                              ##   in Loop: Header=BB0_17 Depth=1
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	incl	%esi
	xorl	%ebx, %ebx
	cmpl	4(%r11), %esi
	jl	LBB0_28
	jmp	LBB0_30
LBB0_29:
	xorl	%ebx, %ebx
	jmp	LBB0_30
LBB0_18:
	movl	%eax, %ebx
	jmp	LBB0_30
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.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	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	ldr	x21, [x0, #8]
	ldr	w9, [x0]
	ldrsw	x8, [x1]
	cmp	w9, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x12, #0
	mov	x10, x21
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x10]
	cmp	w8, w11
	b.lt	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x12, x12, #1
	add	x10, x10, #16
	cmp	x9, x12
	b.ne	LBB0_2
; %bb.4:
	mov	x12, x9
	b	LBB0_7
LBB0_5:
	mov	w12, #0
	b	LBB0_7
LBB0_6:
                                        ; kill: def $w12 killed $w12 killed $x12 def $x12
LBB0_7:
	sxtw	x10, w12
	sub	x22, x10, #1
	add	x10, x21, x22, lsl #4
	ldr	w10, [x10, #4]
	sub	w10, w10, #1
	tst	w10, w8
	b.ne	LBB0_15
; %bb.8:
	cmp	w12, w9
	b.le	LBB0_10
; %bb.9:
	ldr	x23, [x1, #8]
	add	x10, x23, x8
	mov	x11, x22
	b	LBB0_14
LBB0_10:
	mov	x10, x9
	sxtw	x14, w10
	ldr	x23, [x1, #8]
	add	x10, x23, x8
	sub	w11, w12, #1
	add	x13, x21, w12, sxtw #4
	sub	x13, x13, #16
	sub	x12, x14, w12, sxtw
	add	x12, x12, #1
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldrsw	x14, [x13]
	cmp	x10, x14
	b.lt	LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	add	w11, w11, #1
	add	x13, x13, #16
	subs	x12, x12, #1
	b.ne	LBB0_11
; %bb.13:
	mov	x11, x9
LBB0_14:
	add	x9, x21, w11, sxtw #4
	ldursw	x9, [x9, #-12]
	sub	x9, x9, #1
	tst	x10, x9
	b.eq	LBB0_17
LBB0_15:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_16:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_17:
	cbz	x23, LBB0_24
; %bb.18:
	ldr	x19, [x0, #16]
	ldr	x24, [x19]
	ldr	w9, [x24]
	asr	w25, w8, w9
	lsl	w9, w25, w9
	sub	w8, w8, w9
	sxtw	x20, w8
	mov	w26, #1
	b	LBB0_20
LBB0_19:                                ;   in Loop: Header=BB0_20 Depth=1
	sub	x23, x23, x8
	cbz	x23, LBB0_24
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24, #8]
	add	x1, x8, w25, sxtw #2
	mov	x0, x19
	mov	x2, x20
	bl	_do_erase_oneblock
	cbnz	w0, LBB0_16
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=1
	add	x9, x21, w22, sxtw #4
	ldpsw	x10, x8, [x9]
	add	x20, x20, x8
	ldr	w11, [x24]
	lsl	w12, w26, w11
	sxtw	x12, w12
	udiv	x13, x20, x12
	msub	x13, x13, x12, x20
	ldr	x9, [x9, #8]
	madd	x9, x9, x8, x10
	udiv	x10, x9, x12
	msub	x9, x10, x12, x9
	cmp	x13, x9
	cinc	w22, w22, eq
	lsr	x9, x20, x11
	cbz	x9, LBB0_19
; %bb.22:                               ;   in Loop: Header=BB0_20 Depth=1
	add	w25, w25, #1
	ldr	w9, [x24, #4]
	cmp	w25, w9
	b.ge	LBB0_24
; %bb.23:                               ;   in Loop: Header=BB0_20 Depth=1
	mov	x20, #0
	b	LBB0_19
LBB0_24:
	mov	w0, #0
	b	LBB0_16
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_cfi_staa_erase_varsize
.subsections_via_symbols
