	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function msb_set_overwrite_flag
_msb_set_overwrite_flag:                ## @msb_set_overwrite_flag
	.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
	cmpq	$0, 40(%rdi)
	je	LBB0_2
## %bb.1:
	movq	_EROFS@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%rcx, %r15
	movq	%rdx, %r14
	movl	%esi, %r12d
	movq	%rdi, %rbx
	movl	%esi, %edi
	callq	_cpu_to_be16
	movl	%eax, 32(%rbx)
	movq	%r14, 24(%rbx)
	movq	_MEMSTICK_CP_OVERWRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	%r15, 8(%rbx)
	movq	_MS_CMD_BLOCK_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	movl	$1, (%rbx)
	leaq	L_.str(%rip), %rdi
	movq	%r15, %rsi
	movl	%r12d, %edx
	movq	%r14, %rcx
	callq	_dbg_verbose
	movq	_h_msb_send_command@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_msb_run_state_machine          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EROFS,4,2                      ## @EROFS
	.comm	_MEMSTICK_CP_OVERWRITE,4,2      ## @MEMSTICK_CP_OVERWRITE
	.comm	_MS_CMD_BLOCK_WRITE,4,2         ## @MS_CMD_BLOCK_WRITE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"changing overwrite flag to %02x for sector %d, page %d"

	.comm	_h_msb_send_command,4,2         ## @h_msb_send_command
	.no_dead_strip	_msb_set_overwrite_flag
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function msb_set_overwrite_flag
_msb_set_overwrite_flag:                ; @msb_set_overwrite_flag
	.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
	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	w0, w8
	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
LBB0_2:
	mov	x21, x3
	mov	x20, x2
	mov	x22, x1
	mov	x19, x0
	mov	x0, x1
	bl	_cpu_to_be16
	str	w0, [x19, #32]
	str	x20, [x19, #24]
Lloh3:
	adrp	x8, _MEMSTICK_CP_OVERWRITE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MEMSTICK_CP_OVERWRITE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x19, #16]
	str	x21, [x19, #8]
Lloh6:
	adrp	x8, _MS_CMD_BLOCK_WRITE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MS_CMD_BLOCK_WRITE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	mov	w9, #1
	stp	w9, w8, [x19]
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	mov	x2, x22
	mov	x3, x20
	bl	_dbg_verbose
Lloh11:
	adrp	x8, _h_msb_send_command@GOTPAGE
Lloh12:
	ldr	x8, [x8, _h_msb_send_command@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	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
	b	_msb_run_state_machine
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EROFS,4,2                      ; @EROFS
	.comm	_MEMSTICK_CP_OVERWRITE,4,2      ; @MEMSTICK_CP_OVERWRITE
	.comm	_MS_CMD_BLOCK_WRITE,4,2         ; @MS_CMD_BLOCK_WRITE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"changing overwrite flag to %02x for sector %d, page %d"

	.comm	_h_msb_send_command,4,2         ; @h_msb_send_command
	.no_dead_strip	_msb_set_overwrite_flag
.subsections_via_symbols
