	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function block2mtd_erase
_block2mtd_erase:                       ## @block2mtd_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	(%rdi), %r15
	movq	(%rsi), %r14
	movq	8(%rsi), %r12
	movq	_MTD_ERASING@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 16(%rsi)
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	%r15, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	callq	__block2mtd_erase
	movl	%eax, %r14d
	movq	%r15, %rdi
	callq	_mutex_unlock
	testl	%r14d, %r14d
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	callq	_ERROR
LBB0_2:
	movq	_MTD_ERASE_DONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 16(%rbx)
	movq	%rbx, %rdi
	callq	_mtd_erase_callback
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MTD_ERASING,8,3                ## @MTD_ERASING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"erase failed err = %d"

	.comm	_MTD_ERASE_FAILED,8,3           ## @MTD_ERASE_FAILED
	.comm	_MTD_ERASE_DONE,8,3             ## @MTD_ERASE_DONE
	.no_dead_strip	_block2mtd_erase
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function block2mtd_erase
_block2mtd_erase:                       ; @block2mtd_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
	ldr	x21, [x0]
	ldp	x20, x22, [x1]
Lloh0:
	adrp	x8, _MTD_ERASING@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MTD_ERASING@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [x1, #16]
	mov	x0, x21
	bl	_mutex_lock
	mov	x0, x21
	mov	x1, x20
	mov	x2, x22
	bl	__block2mtd_erase
	mov	x20, x0
	mov	x0, x21
	bl	_mutex_unlock
	cbz	w20, LBB0_2
; %bb.1:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_ERROR
LBB0_2:
Lloh5:
	adrp	x8, _MTD_ERASE_DONE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MTD_ERASE_DONE@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	str	x8, [x19, #16]
	mov	x0, x19
	bl	_mtd_erase_callback
	mov	x0, x20
	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 AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_MTD_ERASING,8,3                ; @MTD_ERASING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"erase failed err = %d"

	.comm	_MTD_ERASE_FAILED,8,3           ; @MTD_ERASE_FAILED
	.comm	_MTD_ERASE_DONE,8,3             ; @MTD_ERASE_DONE
	.no_dead_strip	_block2mtd_erase
.subsections_via_symbols
