	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function raid5_remove_disk
_raid5_remove_disk:                     ## @raid5_remove_disk
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %r14
	movslq	(%rsi), %r15
	movq	24(%r14), %rbx
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	shlq	$4, %r15
	leaq	(%rbx,%r15), %r12
	movq	%r14, %rdi
	callq	_print_raid5_conf
	leaq	(%rbx,%r15), %rax
	addq	$8, %rax
	movq	%rax, %rcx
	cmpq	%r13, 8(%rbx,%r15)
	je	LBB0_3
## %bb.1:
	xorl	%ebx, %ebx
	cmpq	%r13, (%r12)
	jne	LBB0_21
## %bb.2:
	movq	%r12, %rcx
LBB0_3:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movq	%rcx, %rbx
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpl	(%r14), %eax
	jl	LBB0_6
## %bb.4:
	movq	8(%r14), %rax
	movq	_MaxSector@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.5:
	movq	_In_sync@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%r13), %rsi
	callq	_clear_bit
LBB0_6:
	movq	_In_sync@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%r13), %r12
	movq	%r12, %rsi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	leaq	8(%r13), %r15
	movq	%r15, %rdi
	callq	_atomic_read
	testq	%rax, %rax
	je	LBB0_9
LBB0_8:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_20:
	movq	%r14, %rdi
	callq	_print_raid5_conf
LBB0_21:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	_Faulty@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_15
## %bb.10:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	cmpq	16(%r14), %rax
	je	LBB0_15
## %bb.11:
	movq	%r14, %rdi
	callq	_has_failed
	testl	%eax, %eax
	jne	LBB0_15
## %bb.12:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	cmpq	%r13, %rax
	jne	LBB0_15
LBB0_14:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpl	(%r14), %eax
	jl	LBB0_8
LBB0_15:
	movq	%rbx, %r15
	movq	$0, (%rbx)
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_synchronize_rcu
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_atomic_read
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	movq	%r13, (%r15)
	jmp	LBB0_20
LBB0_17:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	movq	(%r15), %rsi
	testq	%rsi, %rsi
	je	LBB0_19
## %bb.18:
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	%rsi, (%rax)
	movq	_Replacement@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$4, %rsi
	callq	_clear_bit
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_smp_mb
	movq	$0, (%r15)
	movq	_WantReplacement@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_clear_bit
	jmp	LBB0_20
LBB0_19:
	movq	_WantReplacement@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r12, %rsi
	callq	_clear_bit
	xorl	%ebx, %ebx
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_MaxSector,8,3                  ## @MaxSector
	.comm	_In_sync,4,2                    ## @In_sync
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_Faulty,4,2                     ## @Faulty
	.comm	_Replacement,4,2                ## @Replacement
	.comm	_WantReplacement,4,2            ## @WantReplacement
	.no_dead_strip	_raid5_remove_disk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function raid5_remove_disk
_raid5_remove_disk:                     ; @raid5_remove_disk
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x1
	mov	x22, x0
	ldr	x19, [x0, #8]
	ldrsw	x27, [x1]
	ldr	x8, [x19, #24]
	add	x24, x8, x27, lsl #4
	mov	x0, x19
	bl	_print_raid5_conf
	mov	x25, x24
	ldr	x8, [x25, #8]!
	mov	x26, x25
	cmp	x8, x20
	b.eq	LBB0_4
; %bb.1:
	ldr	x8, [x24]
	cmp	x8, x20
	b.eq	LBB0_3
; %bb.2:
	mov	w21, #0
	b	LBB0_11
LBB0_3:
	mov	x26, x24
LBB0_4:
	ldr	w8, [x19]
Lloh0:
	adrp	x21, _In_sync@GOTPAGE
Lloh1:
	ldr	x21, [x21, _In_sync@GOTPAGEOFF]
	cmp	w27, w8
	b.lt	LBB0_7
; %bb.5:
	ldr	x8, [x19, #8]
Lloh2:
	adrp	x9, _MaxSector@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MaxSector@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.6:
	ldr	w0, [x21]
	add	x1, x20, #4
	bl	_clear_bit
LBB0_7:
	ldr	w0, [x21]
	add	x21, x20, #4
	mov	x1, x21
	bl	_test_bit
	cbnz	x0, LBB0_9
; %bb.8:
	add	x23, x20, #8
	mov	x0, x23
	bl	_atomic_read
	cbz	x0, LBB0_12
LBB0_9:
Lloh5:
	adrp	x8, _EBUSY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_10:
	mov	x0, x19
	bl	_print_raid5_conf
LBB0_11:
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_12:
Lloh8:
	adrp	x8, _Faulty@GOTPAGE
Lloh9:
	ldr	x8, [x8, _Faulty@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_test_bit
	cbnz	x0, LBB0_17
; %bb.13:
	ldr	x8, [x22]
	ldr	x9, [x19, #16]
	cmp	x8, x9
	b.eq	LBB0_17
; %bb.14:
	mov	x0, x19
	bl	_has_failed
	cbnz	w0, LBB0_17
; %bb.15:
	ldr	x8, [x24]
	cmp	x8, #0
	ccmp	x8, x20, #4, ne
	b.ne	LBB0_17
; %bb.16:
	ldr	w8, [x19]
	cmp	w27, w8
	b.lt	LBB0_9
LBB0_17:
	str	xzr, [x26]
	bl	_synchronize_rcu
	mov	x0, x23
	bl	_atomic_read
	cbz	x0, LBB0_19
; %bb.18:
Lloh11:
	adrp	x8, _EBUSY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w21, w8
	str	x20, [x26]
	b	LBB0_10
LBB0_19:
	ldr	x8, [x24]
	cbz	x8, LBB0_21
; %bb.20:
	str	x8, [x25]
Lloh14:
	adrp	x9, _Replacement@GOTPAGE
Lloh15:
	ldr	x9, [x9, _Replacement@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x9]
	add	x1, x8, #4
	bl	_clear_bit
	bl	_smp_mb
	str	xzr, [x24]
LBB0_21:
Lloh17:
	adrp	x8, _WantReplacement@GOTPAGE
Lloh18:
	ldr	x8, [x8, _WantReplacement@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_clear_bit
	mov	w21, #0
	b	LBB0_10
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_MaxSector,8,3                  ; @MaxSector
	.comm	_In_sync,4,2                    ; @In_sync
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_Faulty,4,2                     ; @Faulty
	.comm	_Replacement,4,2                ; @Replacement
	.comm	_WantReplacement,4,2            ; @WantReplacement
	.no_dead_strip	_raid5_remove_disk
.subsections_via_symbols
