	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function md_set_readonly
_md_set_readonly:                       ## @md_set_readonly
	.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
	leaq	4(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	leaq	32(%rbx), %rdi
	callq	_atomic_read
	xorl	%ecx, %ecx
	testq	%r15, %r15
	setne	%cl
	cmpl	%ecx, %eax
	jle	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_mdname
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_printk
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_9
LBB0_2:
	testq	%r15, %r15
	je	LBB0_4
## %bb.3:
	movq	%r15, %rdi
	callq	_sync_blockdev
LBB0_4:
	cmpq	$0, 24(%rbx)
	je	LBB0_5
## %bb.6:
	movq	%rbx, %rdi
	callq	___md_stop_writes
	xorl	%r15d, %r15d
	cmpl	$1, (%rbx)
	jne	LBB0_8
## %bb.7:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_9
LBB0_5:
	xorl	%r15d, %r15d
	jmp	LBB0_9
LBB0_8:
	movl	$1, (%rbx)
	movl	16(%rbx), %edi
	movl	$1, %esi
	callq	_set_disk_ro
	movq	_MD_RECOVERY_FROZEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	12(%rbx), %rsi
	callq	_clear_bit
	movl	8(%rbx), %edi
	callq	_sysfs_notify_dirent_safe
LBB0_9:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"md: %s still in use.\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_MD_RECOVERY_FROZEN,4,2         ## @MD_RECOVERY_FROZEN
	.no_dead_strip	_md_set_readonly
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function md_set_readonly
_md_set_readonly:                       ; @md_set_readonly
	.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	x21, x1
	mov	x20, x0
	add	x19, x0, #4
	mov	x0, x19
	bl	_mutex_lock
	add	x0, x20, #32
	bl	_atomic_read
	cmp	x21, #0
	cset	w8, ne
	cmp	w0, w8
	b.le	LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_mdname
	mov	x1, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printk
Lloh2:
	adrp	x8, _EBUSY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_7
LBB0_2:
	cbz	x21, LBB0_4
; %bb.3:
	mov	x0, x21
	bl	_sync_blockdev
LBB0_4:
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_9
; %bb.5:
	mov	x0, x20
	bl	___md_stop_writes
	ldr	w8, [x20]
	cmp	w8, #1
	b.ne	LBB0_8
; %bb.6:
Lloh4:
	adrp	x8, _ENXIO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_10
LBB0_8:
	mov	w8, #1
	str	w8, [x20]
	ldr	w0, [x20, #16]
	mov	w1, #1
	bl	_set_disk_ro
Lloh6:
	adrp	x8, _MD_RECOVERY_FROZEN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MD_RECOVERY_FROZEN@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	add	x1, x20, #12
	bl	_clear_bit
	ldr	w0, [x20, #8]
	bl	_sysfs_notify_dirent_safe
LBB0_9:
	mov	w20, #0
LBB0_10:
	mov	x0, x19
	bl	_mutex_unlock
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"md: %s still in use.\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_MD_RECOVERY_FROZEN,4,2         ; @MD_RECOVERY_FROZEN
	.no_dead_strip	_md_set_readonly
.subsections_via_symbols
