	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtdswap_scan_eblks
_mtdswap_scan_eblks:                    ## @mtdswap_scan_eblks
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	cmpl	$0, (%rdi)
	je	LBB0_10
## %bb.1:
	xorl	%ebx, %ebx
	movq	_EBLOCK_IDX_SHIFT@GOTPCREL(%rip), %r13
	xorl	%r15d, %r15d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rcx), %eax
	movzbl	(%r13), %ecx
	shll	%cl, %eax
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	orl	%eax, (%r12,%rbx)
	incq	%r15
	movl	(%r14), %eax
	addq	$4, %rbx
	cmpq	%rax, %r15
	jae	LBB0_10
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %r12
	leaq	(%r12,%rbx), %rsi
	movq	%r14, %rdi
	callq	_mtdswap_read_markers
	testl	%eax, %eax
	js	LBB0_3
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_MTDSWAP_SCANNED_BAD@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_4
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_EBLOCK_BAD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	_EBLOCK_READERR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, (%r12,%rbx)
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	addl	$-128, %eax
	movq	_MTDSWAP_FAILING@GOTPCREL(%rip), %rcx
	cmpl	$2, %eax
	ja	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	cltq
	leaq	l_switch.table.mtdswap_scan_eblks(%rip), %rcx
	movq	(%rcx,%rax,8), %rcx
	jmp	LBB0_6
LBB0_10:
	movq	%r14, %rdi
	callq	_mtdswap_check_counts
	movl	(%r14), %eax
	testl	%eax, %eax
	je	LBB0_15
## %bb.11:
	xorl	%r13d, %r13d
	movq	_EBLOCK_BAD@GOTPCREL(%rip), %r15
	movq	_EBLOCK_IDX_SHIFT@GOTPCREL(%rip), %r12
	xorl	%ebx, %ebx
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_12 Depth=1
	incq	%rbx
	movl	%eax, %ecx
	addq	$4, %r13
	cmpq	%rcx, %rbx
	jae	LBB0_15
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rsi
	movl	(%rsi,%r13), %edx
	testl	%edx, (%r15)
	jne	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	addq	%r13, %rsi
	movzbl	(%r12), %ecx
	sarl	%cl, %edx
	movq	%r14, %rdi
	callq	_mtdswap_rb_add
	movl	(%r14), %eax
	jmp	LBB0_14
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EBLOCK_READERR,4,2             ## @EBLOCK_READERR
	.comm	_MTDSWAP_SCANNED_BAD,4,2        ## @MTDSWAP_SCANNED_BAD
	.comm	_EBLOCK_BAD,4,2                 ## @EBLOCK_BAD
	.comm	_MTDSWAP_CLEAN,4,2              ## @MTDSWAP_CLEAN
	.comm	_MTDSWAP_DIRTY,4,2              ## @MTDSWAP_DIRTY
	.comm	_MTDSWAP_FAILING,4,2            ## @MTDSWAP_FAILING
	.comm	_EBLOCK_IDX_SHIFT,4,2           ## @EBLOCK_IDX_SHIFT
	.no_dead_strip	_mtdswap_scan_eblks
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.mtdswap_scan_eblks
l_switch.table.mtdswap_scan_eblks:
	.quad	_MTDSWAP_DIRTY
	.quad	_MTDSWAP_CLEAN
	.quad	_MTDSWAP_DIRTY

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtdswap_scan_eblks
_mtdswap_scan_eblks:                    ; @mtdswap_scan_eblks
	.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	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x20, _EBLOCK_BAD@GOTPAGE
Lloh1:
	ldr	x20, [x20, _EBLOCK_BAD@GOTPAGEOFF]
Lloh2:
	adrp	x21, _EBLOCK_IDX_SHIFT@GOTPAGE
Lloh3:
	ldr	x21, [x21, _EBLOCK_IDX_SHIFT@GOTPAGEOFF]
	cbz	w8, LBB0_10
; %bb.1:
	mov	x22, #0
	mov	x23, #0
Lloh4:
	adrp	x24, _EBLOCK_READERR@GOTPAGE
Lloh5:
	ldr	x24, [x24, _EBLOCK_READERR@GOTPAGEOFF]
Lloh6:
	adrp	x25, _MTDSWAP_FAILING@GOTPAGE
Lloh7:
	ldr	x25, [x25, _MTDSWAP_FAILING@GOTPAGEOFF]
Lloh8:
	adrp	x26, _MTDSWAP_SCANNED_BAD@GOTPAGE
Lloh9:
	ldr	x26, [x26, _MTDSWAP_SCANNED_BAD@GOTPAGEOFF]
Lloh10:
	adrp	x27, l_switch.table.mtdswap_scan_eblks@PAGE
Lloh11:
	add	x27, x27, l_switch.table.mtdswap_scan_eblks@PAGEOFF
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x8]
	ldr	w9, [x21]
	lsl	w8, w8, w9
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x28, x22]
	orr	w8, w9, w8
	str	w8, [x28, x22]
	add	x23, x23, #1
	ldr	w8, [x19]
	add	x22, x22, #4
	cmp	x23, x8
	b.hs	LBB0_10
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x28, [x19, #8]
	add	x1, x28, x22
	mov	x0, x19
	bl	_mtdswap_read_markers
	tbnz	w0, #31, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x26]
	cmp	w0, w8
	b.ne	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x20]
	b	LBB0_3
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x24]
	ldr	w9, [x28, x22]
	orr	w8, w9, w8
	str	w8, [x28, x22]
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	sub	w9, w0, #128
	mov	x8, x25
	cmp	w9, #2
	b.hi	LBB0_2
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x27, w9, sxtw #3]
	b	LBB0_2
LBB0_10:
	mov	x0, x19
	bl	_mtdswap_check_counts
	ldr	w8, [x19]
	cbz	w8, LBB0_15
; %bb.11:
	mov	x22, #0
	mov	x23, #0
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	add	x23, x23, #1
	add	x22, x22, #4
	cmp	x23, w8, uxtw
	b.hs	LBB0_15
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #8]
	add	x1, x9, x22
	ldr	w9, [x1]
	ldr	w10, [x20]
	tst	w10, w9
	b.ne	LBB0_12
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	w8, [x21]
	asr	w2, w9, w8
	mov	x0, x19
	bl	_mtdswap_rb_add
	ldr	w8, [x19]
	b	LBB0_12
LBB0_15:
	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
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EBLOCK_READERR,4,2             ; @EBLOCK_READERR
	.comm	_MTDSWAP_SCANNED_BAD,4,2        ; @MTDSWAP_SCANNED_BAD
	.comm	_EBLOCK_BAD,4,2                 ; @EBLOCK_BAD
	.comm	_MTDSWAP_CLEAN,4,2              ; @MTDSWAP_CLEAN
	.comm	_MTDSWAP_DIRTY,4,2              ; @MTDSWAP_DIRTY
	.comm	_MTDSWAP_FAILING,4,2            ; @MTDSWAP_FAILING
	.comm	_EBLOCK_IDX_SHIFT,4,2           ; @EBLOCK_IDX_SHIFT
	.no_dead_strip	_mtdswap_scan_eblks
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.mtdswap_scan_eblks
l_switch.table.mtdswap_scan_eblks:
	.quad	_MTDSWAP_DIRTY
	.quad	_MTDSWAP_CLEAN
	.quad	_MTDSWAP_DIRTY

.subsections_via_symbols
