	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rs_check_degrade_dev
_rs_check_degrade_dev:                  ## @rs_check_degrade_dev
	.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
	movl	%edx, %r15d
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	%edx, %r13d
	leaq	(,%r13,8), %rdi
	addq	8(%rbx), %rdi
	callq	_TestSetDevFailed
	testq	%rax, %rax
	jne	LBB0_15
## %bb.1:
	leaq	32(%rbx), %rdi
	callq	_atomic_inc_return
	movq	24(%rbx), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_9
## %bb.2:
	movq	%rbx, %rdi
	callq	_TestSetRSDead
	testl	%eax, %eax
	jne	LBB0_9
## %bb.3:
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	%rsp, -56(%rbp)                 ## 8-byte Spill
	movq	_BDEVNAME_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -72(%rbp)                 ## 8-byte Spill
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_DMERR
	cmpl	$0, 16(%rbx)
	je	LBB0_8
## %bb.4:
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	incq	%r12
	movl	16(%rbx), %eax
	addq	$8, %r14
	cmpq	%rax, %r12
	jae	LBB0_8
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%rbx), %rdi
	addq	%r14, %rdi
	callq	_DevFailed
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%rbx), %rax
	movq	(%rax,%r14), %rax
	movl	(%rax), %edi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	callq	_bdevname
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DMERR
	jmp	LBB0_7
LBB0_8:
	movq	-56(%rbp), %rsp                 ## 8-byte Reload
	movq	-64(%rbp), %r14                 ## 8-byte Reload
LBB0_9:
	movq	%rbx, %rdi
	callq	_TestSetRSDegraded
	testl	%eax, %eax
	jne	LBB0_14
## %bb.10:
	movq	%rsp, %r12
	movq	_BDEVNAME_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rsi
	movl	%r15d, 20(%rbx)
	movq	8(%rbx), %rax
	movq	(%rax,%r13,8), %rax
	movl	(%rax), %edi
	callq	_bdevname
	leaq	L_.str.4(%rip), %rcx
	leaq	L_.str.3(%rip), %rsi
	testq	%r14, %r14
	cmoveq	%rcx, %rsi
	je	LBB0_11
## %bb.12:
	movq	(%r14), %rcx
	jmp	LBB0_13
LBB0_11:
	xorl	%ecx, %ecx
LBB0_13:
	leaq	L_.str.2(%rip), %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_DMERR
	leaq	L_.str.5(%rip), %rdi
	xorl	%eax, %eax
	callq	_DMERR
	movq	%r12, %rsp
LBB0_14:
	movq	%rbx, %rdi
	callq	_SetRSProhibitWrites
	movq	%rbx, %rdi
	callq	_schedule_work
LBB0_15:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_17
## %bb.16:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_BDEVNAME_SIZE,4,2              ## @BDEVNAME_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"FATAL: too many devices failed -> RAID set broken"

L_.str.1:                               ## @.str.1
	.asciz	"device /dev/%s failed"

L_.str.2:                               ## @.str.2
	.asciz	"CRITICAL: %sio error on device /dev/%s in region=%llu; DEGRADING RAID set\n"

L_.str.3:                               ## @.str.3
	.space	1

L_.str.4:                               ## @.str.4
	.asciz	"FAKED "

L_.str.5:                               ## @.str.5
	.asciz	"further device error messages suppressed"

	.no_dead_strip	_rs_check_degrade_dev
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rs_check_degrade_dev
_rs_check_degrade_dev:                  ; @rs_check_degrade_dev
	.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
	sub	sp, sp, #16
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	ldr	x8, [x0, #8]
	add	x0, x8, w2, uxtw #3
	bl	_TestSetDevFailed
	cbnz	x0, LBB0_15
; %bb.1:
	add	x0, x19, #32
	bl	_atomic_inc_return
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	cmp	x0, x8
	b.le	LBB0_9
; %bb.2:
	mov	x0, x19
	bl	_TestSetRSDead
	cbnz	w0, LBB0_9
; %bb.3:
	mov	x24, sp
Lloh3:
	adrp	x8, _BDEVNAME_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BDEVNAME_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x22, x9, x8
	mov	sp, x22
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DMERR
	ldr	w8, [x19, #16]
	cbz	w8, LBB0_8
; %bb.4:
	mov	x25, #0
	mov	x26, #0
Lloh10:
	adrp	x23, l_.str.1@PAGE
Lloh11:
	add	x23, x23, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x26, x26, #1
	ldr	w8, [x19, #16]
	add	x25, x25, #8
	cmp	x26, x8
	b.hs	LBB0_8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	add	x0, x8, x25
	bl	_DevFailed
	cbz	x0, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x25]
	ldr	w0, [x8]
	mov	x1, x22
	bl	_bdevname
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp, #-16]!
	mov	x0, x23
	bl	_DMERR
	add	sp, sp, #16
	b	LBB0_5
LBB0_8:
	mov	sp, x24
LBB0_9:
	mov	x0, x19
	bl	_TestSetRSDegraded
	cbnz	w0, LBB0_14
; %bb.10:
	mov	x22, sp
	mov	w12, w21
Lloh12:
	adrp	x8, _BDEVNAME_SIZE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BDEVNAME_SIZE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	mov	x9, x8
Lloh15:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh16:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x1, x9, x8
	mov	sp, x1
	str	w21, [x19, #20]
Lloh17:
	adrp	x8, l_.str.3@PAGE
Lloh18:
	add	x8, x8, l_.str.3@PAGEOFF
Lloh19:
	adrp	x9, l_.str.4@PAGE
Lloh20:
	add	x9, x9, l_.str.4@PAGEOFF
	cmp	x20, #0
	csel	x21, x9, x8, eq
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x12, lsl #3]
	ldr	w0, [x8]
	bl	_bdevname
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	x20, LBB0_12
; %bb.11:
	ldr	x8, [x20]
	b	LBB0_13
LBB0_12:
	mov	x8, #0
LBB0_13:
	sub	sp, sp, #32
	stp	x0, x8, [sp, #8]
	str	x21, [sp]
Lloh21:
	adrp	x0, l_.str.2@PAGE
Lloh22:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DMERR
	add	sp, sp, #32
Lloh23:
	adrp	x0, l_.str.5@PAGE
Lloh24:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_DMERR
	mov	sp, x22
LBB0_14:
	mov	x0, x19
	bl	_SetRSProhibitWrites
	mov	x0, x19
	bl	_schedule_work
LBB0_15:
	ldur	x8, [x29, #-72]
Lloh25:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh26:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.16:
	sub	sp, x29, #64
	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_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_BDEVNAME_SIZE,4,2              ; @BDEVNAME_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"FATAL: too many devices failed -> RAID set broken"

l_.str.1:                               ; @.str.1
	.asciz	"device /dev/%s failed"

l_.str.2:                               ; @.str.2
	.asciz	"CRITICAL: %sio error on device /dev/%s in region=%llu; DEGRADING RAID set\n"

l_.str.3:                               ; @.str.3
	.space	1

l_.str.4:                               ; @.str.4
	.asciz	"FAKED "

l_.str.5:                               ; @.str.5
	.asciz	"further device error messages suppressed"

	.no_dead_strip	_rs_check_degrade_dev
.subsections_via_symbols
