	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sm_erase_block
_sm_erase_block:                        ## @sm_erase_block
	.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
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, %r15
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	%rdx, -72(%rbp)
	movq	32(%rdi), %rax
	movq	40(%rdi), %rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	movq	(%rax), %r13
	xorl	%r12d, %r12d
	xorl	%ecx, %ecx
	callq	_sm_mkoffset
	movl	%eax, -52(%rbp)
	movl	24(%rbx), %eax
	movl	%eax, -56(%rbp)
	cmpq	$0, 16(%rbx)
	jne	LBB0_1
## %bb.2:
	movq	%r13, %r12
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	movl	8(%rbx), %edi
	callq	_BUG_ON
	testl	%r14d, %r14d
	jne	LBB0_6
## %bb.3:
	testq	%r15, %r15
	je	LBB0_5
## %bb.4:
	cmpq	%r15, (%rbx)
	je	LBB0_5
LBB0_6:
	leaq	-56(%rbp), %rsi
	movq	%r12, %rdi
	callq	_mtd_erase
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	leaq	L_.str.1(%rip), %rdi
	xorl	%r12d, %r12d
	movq	%r15, %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_sm_printk
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movq	%r15, %rdx
	callq	_sm_mark_block_bad
	jmp	LBB0_1
LBB0_8:
	xorl	%r12d, %r12d
	testl	%r13d, %r13d
	je	LBB0_10
## %bb.9:
	movslq	%r14d, %rax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rdi
	leaq	-72(%rbp), %rsi
	movl	$8, %edx
	callq	_kfifo_in
	jmp	LBB0_10
LBB0_5:
	leaq	L_.str(%rip), %rdi
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_sm_printk
LBB0_1:
	movq	_EIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
LBB0_10:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"attempted to erase the CIS!"

L_.str.1:                               ## @.str.1
	.asciz	"erase of block %d in zone %d failed"

	.no_dead_strip	_sm_erase_block
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sm_erase_block
_sm_erase_block:                        ; @sm_erase_block
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x22, x3
	mov	x20, x2
	mov	x19, x1
	mov	x21, x0
	str	x2, [sp, #24]
	ldp	x8, x24, [x0, #32]
	ldr	x23, [x8]
	mov	w3, #0
	bl	_sm_mkoffset
	ldr	w8, [x21, #24]
	stp	w8, w0, [sp, #16]
	ldr	x8, [x21, #16]
	cbnz	x8, LBB0_10
; %bb.1:
	ldr	w0, [x21, #8]
	bl	_BUG_ON
	cbnz	w19, LBB0_4
; %bb.2:
	cbz	x20, LBB0_9
; %bb.3:
	ldr	x8, [x21]
	cmp	x8, x20
	b.eq	LBB0_9
LBB0_4:
	add	x1, sp, #16
	mov	x0, x23
	bl	_mtd_erase
	cbz	x0, LBB0_6
; %bb.5:
	stp	x20, x19, [sp]
Lloh0:
	adrp	x0, l_.str.1@PAGE
Lloh1:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_sm_printk
	mov	x0, x21
	mov	x1, x19
	mov	x2, x20
	bl	_sm_mark_block_bad
	b	LBB0_10
LBB0_6:
	cbz	w22, LBB0_8
; %bb.7:
                                        ; kill: def $w19 killed $w19 killed $x19 def $x19
	sxtw	x8, w19
	add	x0, x24, x8, lsl #2
	add	x1, sp, #24
	mov	w2, #8
	bl	_kfifo_in
LBB0_8:
	mov	w0, #0
	b	LBB0_11
LBB0_9:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_sm_printk
LBB0_10:
Lloh4:
	adrp	x8, _EIO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	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
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"attempted to erase the CIS!"

l_.str.1:                               ; @.str.1
	.asciz	"erase of block %d in zone %d failed"

	.no_dead_strip	_sm_erase_block
.subsections_via_symbols
