	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rdev_set_badblocks             ## -- Begin function rdev_set_badblocks
	.p2align	4, 0x90
_rdev_set_badblocks:                    ## @rdev_set_badblocks
	.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, %r15
	movq	(%rdi), %r14
	xorl	%eax, %eax
	testl	%ecx, %ecx
	setne	%al
	addl	24(%rdi,%rax,8), %esi
	addq	$20, %rdi
	xorl	%ebx, %ebx
	xorl	%ecx, %ecx
	callq	_badblocks_set
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	movq	_ExternalBbl@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	16(%r15), %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	leaq	12(%r15), %rdi
	leaq	L_.str(%rip), %rdx
	xorl	%esi, %esi
	callq	_sysfs_notify
LBB0_3:
	movl	8(%r15), %edi
	callq	_sysfs_notify_dirent_safe
	addq	$4, %r14
	movq	_MD_SB_CHANGE_CLEAN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	movl	%eax, %ebx
	movq	_MD_SB_CHANGE_PENDING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	orl	%eax, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	%ebx, %edx
	callq	_set_mask_bits
	movq	(%r15), %rax
	movl	(%rax), %edi
	callq	_md_wakeup_thread
	movl	$1, %ebx
LBB0_4:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ExternalBbl,4,2                ## @ExternalBbl
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unacknowledged_bad_blocks"

	.comm	_MD_SB_CHANGE_CLEAN,4,2         ## @MD_SB_CHANGE_CLEAN
	.comm	_MD_SB_CHANGE_PENDING,4,2       ## @MD_SB_CHANGE_PENDING
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_rdev_set_badblocks             ; -- Begin function rdev_set_badblocks
	.p2align	2
_rdev_set_badblocks:                    ; @rdev_set_badblocks
	.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	x20, [x0]
	cmp	w3, #0
	mov	w8, #32
	mov	w9, #24
	csel	x8, x9, x8, eq
	ldr	w8, [x0, x8]
	add	w1, w8, w1
	add	x0, x0, #20
	mov	w3, #0
	bl	_badblocks_set
	mov	x8, x0
	mov	w0, #0
	cbnz	w8, LBB0_4
; %bb.1:
Lloh0:
	adrp	x8, _ExternalBbl@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ExternalBbl@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, x19, #16
	bl	_test_bit
	cbz	x0, LBB0_3
; %bb.2:
	add	x0, x19, #12
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x1, #0
	bl	_sysfs_notify
LBB0_3:
	ldr	w0, [x19, #8]
	bl	_sysfs_notify_dirent_safe
	add	x20, x20, #4
Lloh5:
	adrp	x8, _MD_SB_CHANGE_CLEAN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MD_SB_CHANGE_CLEAN@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_BIT
	mov	x21, x0
Lloh8:
	adrp	x8, _MD_SB_CHANGE_PENDING@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MD_SB_CHANGE_PENDING@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	bl	_BIT
	orr	w2, w0, w21
	mov	x0, x20
	mov	w1, #0
	bl	_set_mask_bits
	ldr	x8, [x19]
	ldr	w0, [x8]
	bl	_md_wakeup_thread
	mov	w0, #1
LBB0_4:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ExternalBbl,4,2                ; @ExternalBbl
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unacknowledged_bad_blocks"

	.comm	_MD_SB_CHANGE_CLEAN,4,2         ; @MD_SB_CHANGE_CLEAN
	.comm	_MD_SB_CHANGE_PENDING,4,2       ; @MD_SB_CHANGE_PENDING
.subsections_via_symbols
