	.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	%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
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	_MD_RECOVERY_FROZEN@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	leaq	16(%r12), %r14
	movq	%r14, %rsi
	callq	_test_bit
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movl	(%r13), %edi
	movq	%r14, %rsi
	callq	_set_bit
	movl	12(%r12), %edi
	callq	_md_wakeup_thread
LBB0_2:
	movq	_MD_RECOVERY_RUNNING@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movq	%r14, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_MD_RECOVERY_INTR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_set_bit
LBB0_4:
	movq	32(%r12), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movl	(%rax), %edi
	callq	_wake_up_process
LBB0_6:
	cmpq	$0, 56(%r12)
	je	LBB0_9
## %bb.7:
	movq	_MD_SB_CHANGE_PENDING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	44(%r12), %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_18
LBB0_9:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_mddev_unlock
	movq	_resync_wait@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	(%r13), %edi
	movq	%r14, %rsi
	callq	_test_bit
	xorl	%esi, %esi
	testq	%rax, %rax
	sete	%sil
	movl	%ebx, %edi
	callq	_wait_event
	movl	48(%r12), %ebx
	movq	_MD_SB_CHANGE_PENDING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	44(%r12), %rsi
	callq	_test_bit
	xorl	%esi, %esi
	testq	%rax, %rax
	sete	%sil
	movl	%ebx, %edi
	callq	_wait_event
	movq	%r12, %rdi
	callq	_mddev_lock_nointr
	leaq	4(%r12), %r13
	movq	%r13, %rdi
	callq	_mutex_lock
	cmpq	$0, 24(%r12)
	je	LBB0_11
## %bb.10:
	leaq	40(%r12), %rdi
	callq	_atomic_read
	xorl	%ecx, %ecx
	cmpq	$0, -48(%rbp)                   ## 8-byte Folded Reload
	setne	%cl
	cmpl	%ecx, %eax
	jg	LBB0_13
LBB0_11:
	cmpq	$0, 32(%r12)
	jne	LBB0_13
## %bb.12:
	movq	_MD_RECOVERY_RUNNING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_19
LBB0_13:
	movq	%r12, %rdi
	callq	_mdname
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_warn
	testq	%r15, %r15
	jne	LBB0_15
## %bb.14:
	movq	_MD_RECOVERY_FROZEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_clear_bit
	movq	_MD_RECOVERY_NEEDED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_set_bit
	movl	12(%r12), %edi
	callq	_md_wakeup_thread
LBB0_15:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_16:
	subl	(%rax), %ebx
LBB0_17:
	movq	%r13, %rdi
	callq	_mutex_unlock
LBB0_18:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	cmpq	$0, 24(%r12)
	je	LBB0_22
## %bb.20:
	movq	%r12, %rdi
	callq	___md_stop_writes
	xorl	%ebx, %ebx
	cmpl	$1, (%r12)
	jne	LBB0_23
## %bb.21:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_22:
	xorl	%ebx, %ebx
	jmp	LBB0_17
LBB0_23:
	movl	$1, (%r12)
	movl	20(%r12), %edi
	movl	$1, %esi
	callq	_set_disk_ro
	movq	_MD_RECOVERY_FROZEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_clear_bit
	movq	_MD_RECOVERY_NEEDED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	callq	_set_bit
	movl	12(%r12), %edi
	callq	_md_wakeup_thread
	movl	8(%r12), %edi
	callq	_sysfs_notify_dirent_safe
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_MD_RECOVERY_FROZEN,4,2         ## @MD_RECOVERY_FROZEN
	.comm	_MD_RECOVERY_RUNNING,4,2        ## @MD_RECOVERY_RUNNING
	.comm	_MD_RECOVERY_INTR,4,2           ## @MD_RECOVERY_INTR
	.comm	_MD_SB_CHANGE_PENDING,4,2       ## @MD_SB_CHANGE_PENDING
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_resync_wait,4,2                ## @resync_wait
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"md: %s still in use.\n"

	.comm	_MD_RECOVERY_NEEDED,4,2         ## @MD_RECOVERY_NEEDED
	.comm	_ENXIO,4,2                      ## @ENXIO
	.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	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x23, x1
	mov	x19, x0
Lloh0:
	adrp	x24, _MD_RECOVERY_FROZEN@GOTPAGE
Lloh1:
	ldr	x24, [x24, _MD_RECOVERY_FROZEN@GOTPAGEOFF]
	ldr	w0, [x24]
	add	x20, x19, #16
	mov	x1, x20
	bl	_test_bit
	mov	x21, x0
	cbnz	x0, LBB0_2
; %bb.1:
	ldr	w0, [x24]
	mov	x1, x20
	bl	_set_bit
	ldr	w0, [x19, #12]
	bl	_md_wakeup_thread
LBB0_2:
Lloh2:
	adrp	x25, _MD_RECOVERY_RUNNING@GOTPAGE
Lloh3:
	ldr	x25, [x25, _MD_RECOVERY_RUNNING@GOTPAGEOFF]
	ldr	w0, [x25]
	mov	x1, x20
	bl	_test_bit
	cbz	x0, LBB0_4
; %bb.3:
Lloh4:
	adrp	x8, _MD_RECOVERY_INTR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MD_RECOVERY_INTR@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_set_bit
LBB0_4:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_6
; %bb.5:
	ldr	w0, [x8]
	bl	_wake_up_process
LBB0_6:
	ldr	x8, [x19, #56]
Lloh7:
	adrp	x26, _MD_SB_CHANGE_PENDING@GOTPAGE
Lloh8:
	ldr	x26, [x26, _MD_SB_CHANGE_PENDING@GOTPAGEOFF]
	cbz	x8, LBB0_9
; %bb.7:
	ldr	w0, [x26]
	add	x1, x19, #44
	bl	_test_bit
	cbz	x0, LBB0_9
; %bb.8:
Lloh9:
	adrp	x8, _EBUSY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_18
LBB0_9:
	mov	x0, x19
	bl	_mddev_unlock
Lloh12:
	adrp	x8, _resync_wait@GOTPAGE
Lloh13:
	ldr	x8, [x8, _resync_wait@GOTPAGEOFF]
Lloh14:
	ldr	w22, [x8]
	ldr	w0, [x25]
	mov	x1, x20
	bl	_test_bit
	cmp	x0, #0
	cset	w1, eq
	mov	x0, x22
	bl	_wait_event
	ldr	w22, [x19, #48]
	ldr	w0, [x26]
	add	x1, x19, #44
	bl	_test_bit
	cmp	x0, #0
	cset	w1, eq
	mov	x0, x22
	bl	_wait_event
	mov	x0, x19
	bl	_mddev_lock_nointr
	add	x22, x19, #4
	mov	x0, x22
	bl	_mutex_lock
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_11
; %bb.10:
	add	x0, x19, #40
	bl	_atomic_read
	cmp	x23, #0
	cset	w8, ne
	cmp	w0, w8
	b.gt	LBB0_13
LBB0_11:
	ldr	x8, [x19, #32]
	cbnz	x8, LBB0_13
; %bb.12:
	ldr	w0, [x25]
	mov	x1, x20
	bl	_test_bit
	cbz	x0, LBB0_19
LBB0_13:
	mov	x0, x19
	bl	_mdname
	mov	x1, x0
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_warn
	cbnz	x21, LBB0_15
; %bb.14:
	ldr	w0, [x24]
	mov	x1, x20
	bl	_clear_bit
Lloh17:
	adrp	x8, _MD_RECOVERY_NEEDED@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MD_RECOVERY_NEEDED@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_set_bit
	ldr	w0, [x19, #12]
	bl	_md_wakeup_thread
LBB0_15:
Lloh20:
	adrp	x8, _EBUSY@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_16:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_17:
	mov	x0, x22
	bl	_mutex_unlock
LBB0_18:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_19:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_23
; %bb.20:
	mov	x0, x19
	bl	___md_stop_writes
	ldr	w8, [x19]
	cmp	w8, #1
	b.ne	LBB0_22
; %bb.21:
Lloh22:
	adrp	x8, _ENXIO@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
	b	LBB0_16
LBB0_22:
	mov	w8, #1
	str	w8, [x19]
	ldr	w0, [x19, #20]
	mov	w1, #1
	bl	_set_disk_ro
	ldr	w0, [x24]
	mov	x1, x20
	bl	_clear_bit
Lloh24:
	adrp	x8, _MD_RECOVERY_NEEDED@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MD_RECOVERY_NEEDED@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_set_bit
	ldr	w0, [x19, #12]
	bl	_md_wakeup_thread
	ldr	w0, [x19, #8]
	bl	_sysfs_notify_dirent_safe
LBB0_23:
	mov	w19, #0
	b	LBB0_17
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_MD_RECOVERY_FROZEN,4,2         ; @MD_RECOVERY_FROZEN
	.comm	_MD_RECOVERY_RUNNING,4,2        ; @MD_RECOVERY_RUNNING
	.comm	_MD_RECOVERY_INTR,4,2           ; @MD_RECOVERY_INTR
	.comm	_MD_SB_CHANGE_PENDING,4,2       ; @MD_SB_CHANGE_PENDING
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_resync_wait,4,2                ; @resync_wait
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"md: %s still in use.\n"

	.comm	_MD_RECOVERY_NEEDED,4,2         ; @MD_RECOVERY_NEEDED
	.comm	_ENXIO,4,2                      ; @ENXIO
	.no_dead_strip	_md_set_readonly
.subsections_via_symbols
