	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function md_clear_badblocks
_md_clear_badblocks:                    ## @md_clear_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rdi, %r14
	addl	%esi, %ebx
	movl	(%rdi), %ecx
	testl	%ecx, %ecx
	jle	LBB0_1
## %bb.2:
	movl	$-1, %eax
	shll	%cl, %eax
	notl	%eax
	addl	%esi, %eax
	sarl	%cl, %eax
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %ebx
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	jmp	LBB0_3
LBB0_1:
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
LBB0_3:
	leaq	12(%r14), %r12
	movq	%r12, %rdi
	callq	_write_seqlock_irq
	movq	16(%r14), %r13
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movl	4(%r14), %r14d
	xorl	%r15d, %r15d
	cmpl	$2, %r14d
	movq	%r12, -88(%rbp)                 ## 8-byte Spill
	jl	LBB0_9
## %bb.4:
	xorl	%r15d, %r15d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	%r12d, %r14d
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	%r14d, %eax
	subl	%r15d, %eax
	cmpl	$1, %eax
	jle	LBB0_9
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	leal	(%r15,%r14), %eax
	movl	%eax, %r12d
	shrl	$31, %r12d
	addl	%eax, %r12d
	sarl	%r12d
	movslq	%r12d, %rax
	movl	(%r13,%rax,4), %edi
	callq	_BB_OFFSET
	cmpl	%ebx, %eax
	jge	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	%r12d, %r15d
	jmp	LBB0_8
LBB0_9:
	cmpl	%r15d, %r14d
	jle	LBB0_25
## %bb.10:
	movslq	%r15d, %r12
	movl	(%r13,%r12,4), %edi
	callq	_BB_OFFSET
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	(%r13,%r12,4), %edi
	callq	_BB_LEN
	addl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	cmpl	%ebx, %eax
	jle	LBB0_16
## %bb.11:
	leaq	(,%r12,4), %r14
	addq	%r13, %r14
	movl	(%r14), %edi
	callq	_BB_ACK
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	(%r14), %edi
	callq	_BB_OFFSET
	movl	%eax, %r12d
	movl	(%r14), %edi
	callq	_BB_LEN
	movl	%eax, %esi
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	subl	%r12d, %edi
	jle	LBB0_12
## %bb.13:
	movq	%r14, %rcx
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movl	4(%r14), %edx
	movq	_MD_MAX_BADBLOCKS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jge	LBB0_26
## %bb.14:
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movl	%edi, -68(%rbp)                 ## 4-byte Spill
	leaq	4(%rcx), %rdi
	subl	%r15d, %edx
	shll	$3, %edx
	movl	%esi, -56(%rbp)                 ## 4-byte Spill
	movq	%rcx, %rsi
	callq	_memmove
	incl	4(%r14)
	movl	%r12d, %edi
	movl	-68(%rbp), %esi                 ## 4-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_BB_MAKE
	movl	-56(%rbp), %esi                 ## 4-byte Reload
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	incl	%r15d
	movslq	%r15d, %r14
	jmp	LBB0_15
LBB0_12:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
LBB0_15:
	subl	%ebx, %r12d
	addl	%esi, %r12d
	movl	%ebx, %edi
	movl	%r12d, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_BB_MAKE
	movl	%eax, (%r13,%r14,4)
	movl	%r15d, %r14d
	leal	-1(%r15), %eax
	movl	%eax, %r15d
LBB0_16:
	testl	%r15d, %r15d
	js	LBB0_23
## %bb.17:
	movl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r13,%r15,4), %edi
	callq	_BB_OFFSET
	movl	%eax, %ebx
	movl	(%r13,%r15,4), %edi
	callq	_BB_LEN
	addl	%ebx, %eax
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	cmpl	%ebx, %eax
	jle	LBB0_23
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	movl	(%r13,%r15,4), %edi
	callq	_BB_OFFSET
	cmpl	%ebx, %eax
	jl	LBB0_20
## %bb.21:                              ##   in Loop: Header=BB0_18 Depth=1
	leaq	-1(%r15), %rax
	testq	%r15, %r15
	movq	%rax, %r15
	jg	LBB0_18
## %bb.22:
	movl	$-1, %r15d
	jmp	LBB0_23
LBB0_20:
	movl	(%r13,%r15,4), %edi
	callq	_BB_ACK
	movl	%eax, %r12d
	movl	(%r13,%r15,4), %edi
	callq	_BB_OFFSET
	subl	%eax, %ebx
	movl	%eax, %edi
	movl	%ebx, %esi
	movl	%r12d, %edx
	callq	_BB_MAKE
	movl	%eax, (%r13,%r15,4)
LBB0_23:
	movl	%r14d, %ebx
	subl	%r15d, %ebx
	cmpl	$2, %ebx
	jl	LBB0_25
## %bb.24:
	movslq	%r15d, %rax
	leaq	4(,%rax,4), %rdi
	addq	%r13, %rdi
	movslq	%r14d, %rax
	leaq	(,%rax,4), %rsi
	addq	%r13, %rsi
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movl	4(%r15), %edx
	subl	%r14d, %edx
	shll	$3, %edx
	callq	_memmove
	movl	4(%r15), %eax
	subl	%ebx, %eax
	incl	%eax
	movl	%eax, 4(%r15)
LBB0_25:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	$1, 8(%rax)
LBB0_26:
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	callq	_write_sequnlock_irq
	xorl	%eax, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MD_MAX_BADBLOCKS,4,2           ## @MD_MAX_BADBLOCKS
	.no_dead_strip	_md_clear_badblocks
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function md_clear_badblocks
_md_clear_badblocks:                    ; @md_clear_badblocks
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x0
	add	w8, w2, w1
	ldr	w9, [x0]
	mov	w10, #-1
	lsl	w10, w10, w9
	mvn	w10, w10
	add	w10, w10, w1
	asr	w10, w10, w9
	asr	w11, w8, w9
	cmp	w9, #1
	csel	w21, w8, w11, lt
	csel	w28, w1, w10, lt
	add	x20, x0, #12
	mov	x0, x20
	bl	_write_seqlock_irq
	ldr	x27, [x19, #16]
	ldr	w24, [x19, #4]
	cmp	w24, #1
	b.le	LBB0_4
; %bb.1:
	mov	w25, #0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	w8, w25, w24
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w22, w8, #1
	ldr	w0, [x27, w22, sxtw #2]
	bl	_BB_OFFSET
	cmp	w0, w21
	csel	w24, w24, w22, lt
	csel	w25, w22, w25, lt
	sub	w8, w24, w25
	cmp	w8, #1
	b.gt	LBB0_2
; %bb.3:
	cmp	w24, w25
	b.gt	LBB0_5
	b	LBB0_21
LBB0_4:
	mov	w25, #0
	cmp	w24, w25
	b.le	LBB0_21
LBB0_5:
	add	x23, x27, w25, sxtw #2
	ldr	w0, [x23]
	bl	_BB_OFFSET
	mov	x22, x0
	ldr	w0, [x23]
	bl	_BB_LEN
	add	w8, w0, w22
	cmp	w8, w21
	b.le	LBB0_11
; %bb.6:
	ldr	w0, [x23]
	bl	_BB_ACK
	mov	x22, x0
	ldr	w0, [x23]
	bl	_BB_OFFSET
	mov	x24, x0
	ldr	w0, [x23]
	bl	_BB_LEN
	subs	w26, w28, w24
	b.le	LBB0_9
; %bb.7:
	ldr	w8, [x19, #4]
Lloh0:
	adrp	x9, _MD_MAX_BADBLOCKS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MD_MAX_BADBLOCKS@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ge	LBB0_22
; %bb.8:
	str	w0, [sp, #12]                   ; 4-byte Folded Spill
	add	x0, x23, #4
	sub	w8, w8, w25
	lsl	w2, w8, #3
	mov	x1, x23
	bl	_memmove
	ldr	w8, [x19, #4]
	add	w8, w8, #1
	str	w8, [x19, #4]
	mov	x0, x24
	mov	x1, x26
	mov	x2, x22
	bl	_BB_MAKE
	str	w0, [x23]
	ldr	w0, [sp, #12]                   ; 4-byte Folded Reload
	add	w25, w25, #1
	sxtw	x23, w25
                                        ; kill: def $w25 killed $w25 killed $x25 def $x25
	b	LBB0_10
LBB0_9:
	sxtw	x23, w25
LBB0_10:
	sub	w8, w24, w21
	add	w1, w8, w0
	mov	x0, x21
	mov	x2, x22
	bl	_BB_MAKE
	str	w0, [x27, x23, lsl #2]
	mov	x24, x25
	sub	w8, w25, #1
	mov	x25, x8
LBB0_11:
	tbnz	w25, #31, LBB0_19
; %bb.12:
	mov	w25, w25
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	lsl	x22, x25, #2
	ldr	w0, [x27, x22]
	bl	_BB_OFFSET
	mov	x21, x0
	ldr	w0, [x27, x22]
	bl	_BB_LEN
	add	w8, w0, w21
	cmp	w8, w28
	b.le	LBB0_18
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	w0, [x27, x25, lsl #2]
	bl	_BB_OFFSET
	cmp	w0, w28
	b.lt	LBB0_17
; %bb.15:                               ;   in Loop: Header=BB0_13 Depth=1
	sub	x8, x25, #1
	cmp	x25, #0
	mov	x25, x8
	b.gt	LBB0_13
; %bb.16:
	mov	w25, #-1
	b	LBB0_19
LBB0_17:
	ldr	w0, [x27, x22]
	bl	_BB_ACK
	mov	x21, x0
	ldr	w0, [x27, x22]
	bl	_BB_OFFSET
	sub	w1, w28, w0
	mov	x2, x21
	bl	_BB_MAKE
	str	w0, [x27, x22]
LBB0_18:
                                        ; kill: def $w25 killed $w25 killed $x25 def $x25
LBB0_19:
	sub	w21, w24, w25
	cmp	w21, #2
	b.lt	LBB0_21
; %bb.20:
	add	x8, x27, w25, sxtw #2
	add	x0, x8, #4
	add	x1, x27, w24, sxtw #2
	ldr	w8, [x19, #4]
	sub	w8, w8, w24
	lsl	w2, w8, #3
	bl	_memmove
	ldr	w8, [x19, #4]
	sub	w8, w8, w21
	add	w8, w8, #1
	str	w8, [x19, #4]
LBB0_21:
	mov	w8, #1
	str	w8, [x19, #8]
LBB0_22:
	mov	x0, x20
	bl	_write_sequnlock_irq
	mov	w0, #0
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MD_MAX_BADBLOCKS,4,2           ; @MD_MAX_BADBLOCKS
	.no_dead_strip	_md_clear_badblocks
.subsections_via_symbols
