	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function part_erase
_part_erase:                            ## @part_erase
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %rbx
	callq	_PART
	movq	%rax, %r14
	movq	_MTD_WRITEABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_1
## %bb.3:
	movq	(%r15), %rax
	cmpq	8(%rbx), %rax
	jge	LBB0_4
## %bb.5:
	addq	(%r14), %rax
	movq	%rax, (%r15)
	movq	8(%r14), %rdi
	movq	%r15, %rsi
	callq	*(%rdi)
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:
	movq	8(%r15), %rdx
	movq	_MTD_FAIL_ADDR_UNKNOWN@GOTPCREL(%rip), %rsi
	movq	(%r14), %rcx
	cmpq	(%rsi), %rdx
	je	LBB0_9
## %bb.8:
	subq	%rcx, %rdx
	movq	%rdx, 8(%r15)
LBB0_9:
	subq	%rcx, (%r15)
	jmp	LBB0_10
LBB0_1:
	movq	_EROFS@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	xorl	%eax, %eax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_MTD_WRITEABLE,4,2              ## @MTD_WRITEABLE
	.comm	_EROFS,4,2                      ## @EROFS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MTD_FAIL_ADDR_UNKNOWN,8,3      ## @MTD_FAIL_ADDR_UNKNOWN
	.no_dead_strip	_part_erase
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function part_erase
_part_erase:                            ; @part_erase
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	mov	x21, x0
	bl	_PART
	ldr	w8, [x21]
Lloh0:
	adrp	x9, _MTD_WRITEABLE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MTD_WRITEABLE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.1:
	ldr	x8, [x19]
	ldr	x9, [x21, #8]
	cmp	x8, x9
	b.ge	LBB0_7
; %bb.2:
	mov	x20, x0
	ldp	x9, x0, [x0]
	add	x8, x9, x8
	str	x8, [x19]
	ldr	x8, [x0]
	mov	x1, x19
	blr	x8
	cbz	w0, LBB0_9
; %bb.3:
	ldr	x9, [x19, #8]
Lloh3:
	adrp	x8, _MTD_FAIL_ADDR_UNKNOWN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MTD_FAIL_ADDR_UNKNOWN@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x8]
	ldr	x8, [x20]
	cmp	x9, x10
	b.eq	LBB0_5
; %bb.4:
	sub	x9, x9, x8
	str	x9, [x19, #8]
LBB0_5:
	ldr	x9, [x19]
	sub	x8, x9, x8
	str	x8, [x19]
	b	LBB0_9
LBB0_6:
Lloh6:
	adrp	x8, _EROFS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EROFS@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_MTD_WRITEABLE,4,2              ; @MTD_WRITEABLE
	.comm	_EROFS,4,2                      ; @EROFS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MTD_FAIL_ADDR_UNKNOWN,8,3      ; @MTD_FAIL_ADDR_UNKNOWN
	.no_dead_strip	_part_erase
.subsections_via_symbols
