	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function raid5_add_disk
_raid5_add_disk:                        ## @raid5_add_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movq	8(%rdi), %r12
	xorl	%ebx, %ebx
	cmpq	8(%r12), %rax
	jne	LBB0_2
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_23
LBB0_2:
	movq	%rsi, %r14
	movq	_EEXIST@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	movl	(%r12), %r13d
	movl	(%rsi), %eax
	testl	%eax, %eax
	js	LBB0_3
LBB0_5:
	decl	%r13d
	movl	4(%r14), %ecx
	xorl	%r15d, %r15d
	testl	%ecx, %ecx
	cmovnsl	%ecx, %r15d
	cmovnsl	%ecx, %r13d
	testl	%eax, %eax
	js	LBB0_8
## %bb.6:
	cmpl	%r15d, %eax
	jl	LBB0_8
## %bb.7:
	movq	24(%r12), %rcx
	movl	%eax, %edx
	shlq	$4, %rdx
	cmpq	$0, 8(%rcx,%rdx)
	cmovel	%eax, %r15d
LBB0_8:
	cmpl	%r13d, %r15d
	jg	LBB0_22
## %bb.9:
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	24(%r12), %rax
	movl	%r15d, %ecx
	incl	%r13d
	shlq	$4, %rcx
	leaq	(%rax,%rcx), %r14
	addq	$8, %r14
	movl	%r15d, %ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%r14)
	je	LBB0_11
## %bb.15:                              ##   in Loop: Header=BB0_10 Depth=1
	incl	%ebx
	addq	$16, %r14
	cmpl	%ebx, %r13d
	jne	LBB0_10
## %bb.16:
	movslq	%r15d, %r14
	shlq	$4, %r14
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_17 Depth=1
	incl	%r15d
	addq	$16, %r14
	cmpl	%r15d, %r13d
	je	LBB0_21
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movq	24(%r12), %rbx
	movq	_WantReplacement@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	8(%rbx,%r14), %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	cmpq	$0, (%rbx,%r14)
	jne	LBB0_20
## %bb.19:
	movq	_In_sync@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	leaq	8(%r13), %rsi
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	callq	_clear_bit
	movq	_Replacement@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_set_bit
	movl	%r15d, 4(%r13)
	movl	$1, 16(%r12)
	movq	(%rbx,%r14), %rdi
	movq	%r13, %rsi
	jmp	LBB0_14
LBB0_3:
	movq	%r12, %rdi
	callq	_has_failed
	testq	%rax, %rax
	je	LBB0_4
## %bb.24:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_23
LBB0_11:
	movq	_In_sync@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	leaq	8(%r15), %rsi
	callq	_clear_bit
	movl	%ebx, 4(%r15)
	cmpl	%ebx, (%r15)
	movq	%r15, %rsi
	je	LBB0_13
## %bb.12:
	movl	$1, 16(%r12)
LBB0_13:
	movq	(%r14), %rdi
LBB0_14:
	callq	_rcu_assign_pointer
	xorl	%ebx, %ebx
	jmp	LBB0_22
LBB0_4:
	movl	(%r14), %eax
	jmp	LBB0_5
LBB0_21:
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
LBB0_22:
	movq	%r12, %rdi
	callq	_print_raid5_conf
LBB0_23:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EEXIST,4,2                     ## @EEXIST
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_In_sync,4,2                    ## @In_sync
	.comm	_WantReplacement,4,2            ## @WantReplacement
	.comm	_Replacement,4,2                ## @Replacement
	.no_dead_strip	_raid5_add_disk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function raid5_add_disk
_raid5_add_disk:                        ; @raid5_add_disk
	.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
	ldp	x8, x19, [x0]
	ldr	x9, [x19, #8]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_23
LBB0_3:
	mov	x20, x1
Lloh2:
	adrp	x8, _EEXIST@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EEXIST@GOTPAGEOFF]
Lloh4:
	ldr	w21, [x8]
	ldr	w22, [x19]
	ldr	w8, [x1]
	tbnz	w8, #31, LBB0_16
LBB0_4:
	neg	w21, w21
	sub	w9, w22, #1
	ldr	w10, [x20, #4]
	bic	w22, w10, w10, asr #31
	cmp	w10, #0
	csel	w9, w10, w9, ge
	tbnz	w8, #31, LBB0_7
; %bb.5:
	cmp	w8, w22
	b.lt	LBB0_7
; %bb.6:
	ldr	x10, [x19, #24]
	add	x10, x10, w8, uxtw #4
	ldr	x10, [x10, #8]
	cmp	x10, #0
	csel	w22, w8, w22, eq
LBB0_7:
	cmp	w22, w9
	b.gt	LBB0_22
; %bb.8:
	ldr	x8, [x19, #24]
	add	w23, w9, #1
	add	x8, x8, w22, uxtw #4
	add	x24, x8, #8
	mov	x25, x22
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24]
	cbz	x8, LBB0_18
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	add	w25, w25, #1
	add	x24, x24, #16
	cmp	w23, w25
	b.ne	LBB0_9
; %bb.11:
	sbfiz	x24, x22, #4, #32
Lloh5:
	adrp	x26, _WantReplacement@GOTPAGE
Lloh6:
	ldr	x26, [x26, _WantReplacement@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	add	w22, w22, #1
	add	x24, x24, #16
	cmp	w23, w22
	b.eq	LBB0_22
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	x25, [x19, #24]
	ldr	w0, [x26]
	add	x8, x25, x24
	ldr	x1, [x8, #8]
	bl	_test_bit
	cbz	x0, LBB0_12
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	x8, [x25, x24]
	cbnz	x8, LBB0_12
; %bb.15:
Lloh7:
	adrp	x8, _In_sync@GOTPAGE
Lloh8:
	ldr	x8, [x8, _In_sync@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	add	x21, x20, #8
	mov	x1, x21
	bl	_clear_bit
Lloh10:
	adrp	x8, _Replacement@GOTPAGE
Lloh11:
	ldr	x8, [x8, _Replacement@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_set_bit
	str	w22, [x20, #4]
	mov	w8, #1
	str	w8, [x19, #16]
	ldr	x0, [x25, x24]
	b	LBB0_21
LBB0_16:
	mov	x0, x19
	bl	_has_failed
	cbz	x0, LBB0_24
; %bb.17:
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_2
LBB0_18:
Lloh15:
	adrp	x8, _In_sync@GOTPAGE
Lloh16:
	ldr	x8, [x8, _In_sync@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	add	x1, x20, #8
	bl	_clear_bit
	str	w25, [x20, #4]
	ldr	w8, [x20]
	cmp	w8, w25
	b.eq	LBB0_20
; %bb.19:
	mov	w8, #1
	str	w8, [x19, #16]
LBB0_20:
	ldr	x0, [x24]
LBB0_21:
	mov	x1, x20
	bl	_rcu_assign_pointer
	mov	w21, #0
LBB0_22:
	mov	x0, x19
	bl	_print_raid5_conf
LBB0_23:
	mov	x0, x21
	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_24:
	ldr	w8, [x20]
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_EEXIST,4,2                     ; @EEXIST
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_In_sync,4,2                    ; @In_sync
	.comm	_WantReplacement,4,2            ; @WantReplacement
	.comm	_Replacement,4,2                ; @Replacement
	.no_dead_strip	_raid5_add_disk
.subsections_via_symbols
