	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mddev_unlock                   ## -- Begin function mddev_unlock
	.p2align	4, 0x90
_mddev_unlock:                          ## @mddev_unlock
	.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	%rdi, %rbx
	movq	40(%rdi), %r14
	testq	%r14, %r14
	je	LBB0_10
## %bb.1:
	movq	$0, 40(%rbx)
	movl	$1, (%rbx)
	leaq	12(%rbx), %rdi
	callq	_mutex_unlock
	cmpq	$0, 24(%rbx)
	je	LBB0_9
## %bb.2:
	leaq	24(%rbx), %r15
	cmpq	_md_redundancy_group@GOTPCREL(%rip), %r14
	je	LBB0_4
## %bb.3:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_sysfs_remove_group
LBB0_4:
	movq	32(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	cmpq	$0, (%rax)
	jne	LBB0_9
LBB0_6:
	movq	_md_redundancy_group@GOTPCREL(%rip), %rsi
	movq	%r15, %rdi
	callq	_sysfs_remove_group
	movq	16(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.7:
	callq	_sysfs_put
LBB0_8:
	movq	$0, 16(%rbx)
LBB0_9:
	movl	$0, (%rbx)
	jmp	LBB0_11
LBB0_10:
	leaq	12(%rbx), %rdi
	callq	_mutex_unlock
LBB0_11:
	movq	_pers_lock@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_spin_lock
	movl	8(%rbx), %edi
	callq	_md_wakeup_thread
	addq	$4, %rbx
	movq	%rbx, %rdi
	callq	_wake_up
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_md_redundancy_group,4,2        ## @md_redundancy_group
	.comm	_pers_lock,4,2                  ## @pers_lock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mddev_unlock                   ; -- Begin function mddev_unlock
	.p2align	2
_mddev_unlock:                          ; @mddev_unlock
	.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	x19, x0
	ldr	x21, [x0, #40]
	cbz	x21, LBB0_10
; %bb.1:
	str	xzr, [x19, #40]
	mov	w8, #1
	str	w8, [x19]
	add	x0, x19, #12
	bl	_mutex_unlock
	mov	x20, x19
	ldr	x8, [x20, #24]!
	cbz	x8, LBB0_9
; %bb.2:
Lloh0:
	adrp	x8, _md_redundancy_group@GOTPAGE
Lloh1:
	ldr	x8, [x8, _md_redundancy_group@GOTPAGEOFF]
	cmp	x21, x8
	b.eq	LBB0_4
; %bb.3:
	mov	x0, x20
	mov	x1, x21
	bl	_sysfs_remove_group
LBB0_4:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_6
; %bb.5:
	ldr	x8, [x8]
	cbnz	x8, LBB0_9
LBB0_6:
Lloh2:
	adrp	x1, _md_redundancy_group@GOTPAGE
Lloh3:
	ldr	x1, [x1, _md_redundancy_group@GOTPAGEOFF]
	mov	x0, x20
	bl	_sysfs_remove_group
	ldr	x0, [x19, #16]
	cbz	x0, LBB0_8
; %bb.7:
	bl	_sysfs_put
LBB0_8:
	str	xzr, [x19, #16]
LBB0_9:
	str	wzr, [x19]
	b	LBB0_11
LBB0_10:
	add	x0, x19, #12
	bl	_mutex_unlock
LBB0_11:
Lloh4:
	adrp	x20, _pers_lock@GOTPAGE
Lloh5:
	ldr	x20, [x20, _pers_lock@GOTPAGEOFF]
	mov	x0, x20
	bl	_spin_lock
	ldr	w0, [x19, #8]
	bl	_md_wakeup_thread
	add	x0, x19, #4
	bl	_wake_up
	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
	b	_spin_unlock
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_md_redundancy_group,4,2        ; @md_redundancy_group
	.comm	_pers_lock,4,2                  ; @pers_lock
.subsections_via_symbols
