	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function md_open
_md_open:                               ## @md_open
	.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, %r14
	movl	8(%rdi), %edi
	callq	_mddev_find
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rax, %r15
	movq	16(%rax), %rax
	cmpq	(%r14), %rax
	je	LBB0_6
## %bb.2:
	movq	%r15, %rdi
	callq	_mddev_put
	movq	_md_misc_wq@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_flush_workqueue
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_3:
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_4:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	xorl	%edi, %edi
	cmpq	(%rax), %r15
	setne	%dil
	callq	_BUG_ON
	movq	%r15, %rdi
	callq	_mutex_lock_interruptible
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_8
LBB0_7:
	movq	%r15, %rdi
	callq	_mddev_put
	jmp	LBB0_5
LBB0_8:
	movq	_MD_CLOSING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	8(%r15), %rsi
	callq	_test_bit
	movq	%r15, %rdi
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:
	callq	_mutex_unlock
	movq	_ENODEV@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	je	LBB0_12
## %bb.10:
	negl	%ebx
	jmp	LBB0_7
LBB0_11:
	addq	$4, %rdi
	callq	_atomic_inc
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	%r14, %rdi
	callq	_check_disk_change
LBB0_12:
	xorl	%ebx, %ebx
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_md_misc_wq,4,2                 ## @md_misc_wq
	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
	.comm	_MD_CLOSING,4,2                 ## @MD_CLOSING
	.no_dead_strip	_md_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function md_open
_md_open:                               ; @md_open
	.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	x20, x0
	ldr	w0, [x0, #8]
	bl	_mddev_find
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #16]
	ldr	x9, [x20]
	cmp	x8, x9
	b.eq	LBB0_6
; %bb.2:
	mov	x0, x19
	bl	_mddev_put
Lloh0:
	adrp	x8, _md_misc_wq@GOTPAGE
Lloh1:
	ldr	x8, [x8, _md_misc_wq@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_flush_workqueue
Lloh3:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh5:
	adrp	x8, _ENODEV@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_5:
	mov	x0, x21
	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_6:
	ldr	x8, [x8]
	cmp	x19, x8
	cset	w0, ne
	bl	_BUG_ON
	mov	x0, x19
	bl	_mutex_lock_interruptible
	mov	x21, x0
	cbz	w0, LBB0_8
LBB0_7:
	mov	x0, x19
	bl	_mddev_put
	b	LBB0_5
LBB0_8:
Lloh7:
	adrp	x8, _MD_CLOSING@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MD_CLOSING@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	add	x1, x19, #8
	bl	_test_bit
	cbz	x0, LBB0_11
; %bb.9:
	mov	x0, x19
	bl	_mutex_unlock
Lloh10:
	adrp	x8, _ENODEV@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	cbz	w8, LBB0_12
; %bb.10:
	neg	w21, w8
	b	LBB0_7
LBB0_11:
	add	x0, x19, #4
	bl	_atomic_inc
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	bl	_check_disk_change
LBB0_12:
	mov	w21, #0
	b	LBB0_5
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_md_misc_wq,4,2                 ; @md_misc_wq
	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
	.comm	_MD_CLOSING,4,2                 ; @MD_CLOSING
	.no_dead_strip	_md_open
.subsections_via_symbols
