	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function msb_erase_block
_msb_erase_block:                       ## @msb_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpq	$0, 40(%rdi)
	je	LBB0_2
## %bb.1:
	movq	_EROFS@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_8
LBB0_2:
	movl	%esi, %r14d
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rdi
	callq	_dbg_verbose
	movl	%r14d, %edi
	callq	_cpu_to_be16
	movl	%eax, 32(%rbx)
	movq	$0, 24(%rbx)
	movq	_MEMSTICK_CP_BLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	_MS_CMD_BLOCK_ERASE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movl	$0, (%rbx)
	movq	_h_msb_send_command@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_msb_run_state_machine
	xorl	%r15d, %r15d
	testl	%eax, %eax
	je	LBB0_7
## %bb.3:
	movl	%eax, %r12d
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_msb_reset
	testq	%rax, %rax
	jne	LBB0_6
## %bb.4:
	movl	%r14d, %edi
	callq	_cpu_to_be16
	movl	%eax, 32(%rbx)
	movq	$0, 24(%rbx)
	movq	_MEMSTICK_CP_BLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	_MS_CMD_BLOCK_ERASE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movl	$0, (%rbx)
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_msb_run_state_machine
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:
	movl	%eax, %r12d
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_msb_reset
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
	movl	%r14d, %esi
	callq	_pr_err
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_msb_mark_bad
	movl	%r12d, %r15d
LBB0_7:
	leaq	L_.str.2(%rip), %rdi
	movl	%r14d, %esi
	callq	_dbg_verbose
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_msb_mark_block_unused
	movl	4(%rbx), %esi
	movl	%r14d, %edi
	callq	___set_bit
LBB0_8:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EROFS,4,2                      ## @EROFS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"erasing pba %d"

	.comm	_MEMSTICK_CP_BLOCK,4,2          ## @MEMSTICK_CP_BLOCK
	.comm	_MS_CMD_BLOCK_ERASE,4,2         ## @MS_CMD_BLOCK_ERASE
	.comm	_h_msb_send_command,4,2         ## @h_msb_send_command
L_.str.1:                               ## @.str.1
	.asciz	"erase failed, marking pba %d as bad"

L_.str.2:                               ## @.str.2
	.asciz	"erase success, marking pba %d as unused"

	.no_dead_strip	_msb_erase_block
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function msb_erase_block
_msb_erase_block:                       ; @msb_erase_block
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x8, [x0, #40]
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EROFS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EROFS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_8
LBB0_2:
	mov	x19, x1
	mov	x20, x0
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dbg_verbose
	mov	x0, x19
	bl	_cpu_to_be16
	str	w0, [x20, #32]
	str	xzr, [x20, #24]
Lloh5:
	adrp	x22, _MEMSTICK_CP_BLOCK@GOTPAGE
Lloh6:
	ldr	x22, [x22, _MEMSTICK_CP_BLOCK@GOTPAGEOFF]
	ldr	w8, [x22]
	str	w8, [x20, #16]
Lloh7:
	adrp	x23, _MS_CMD_BLOCK_ERASE@GOTPAGE
Lloh8:
	ldr	x23, [x23, _MS_CMD_BLOCK_ERASE@GOTPAGEOFF]
	ldr	w8, [x23]
	str	w8, [x20, #8]
	str	wzr, [x20]
Lloh9:
	adrp	x24, _h_msb_send_command@GOTPAGE
Lloh10:
	ldr	x24, [x24, _h_msb_send_command@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x20
	bl	_msb_run_state_machine
	mov	x21, x0
	cbz	w0, LBB0_7
; %bb.3:
	mov	x0, x20
	mov	w1, #1
	bl	_msb_reset
	cbnz	x0, LBB0_6
; %bb.4:
	mov	x0, x19
	bl	_cpu_to_be16
	str	w0, [x20, #32]
	str	xzr, [x20, #24]
	ldr	w8, [x22]
	str	w8, [x20, #16]
	ldr	w8, [x23]
	str	w8, [x20, #8]
	str	wzr, [x20]
	ldr	w1, [x24]
	mov	x0, x20
	bl	_msb_run_state_machine
	mov	x21, x0
	cbz	w0, LBB0_7
; %bb.5:
	mov	x0, x20
	mov	w1, #1
	bl	_msb_reset
LBB0_6:
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_pr_err
	mov	x0, x20
	mov	x1, x19
	bl	_msb_mark_bad
LBB0_7:
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x19
	bl	_dbg_verbose
	mov	x0, x20
	mov	x1, x19
	bl	_msb_mark_block_unused
	ldr	w1, [x20, #4]
	mov	x0, x19
	bl	___set_bit
LBB0_8:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_EROFS,4,2                      ; @EROFS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"erasing pba %d"

	.comm	_MEMSTICK_CP_BLOCK,4,2          ; @MEMSTICK_CP_BLOCK
	.comm	_MS_CMD_BLOCK_ERASE,4,2         ; @MS_CMD_BLOCK_ERASE
	.comm	_h_msb_send_command,4,2         ; @h_msb_send_command
l_.str.1:                               ; @.str.1
	.asciz	"erase failed, marking pba %d as bad"

l_.str.2:                               ; @.str.2
	.asciz	"erase success, marking pba %d as unused"

	.no_dead_strip	_msb_erase_block
.subsections_via_symbols
