	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvm_bb_chunk_scan
_nvm_bb_chunk_scan:                     ## @nvm_bb_chunk_scan
	.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	%rdx, %r14
	movq	%rdi, %r13
	callq	_nvm_bb_chunk_sense
                                        ## kill: def $eax killed $eax def $rax
	testl	%eax, %eax
	js	LBB0_24
## %bb.1:
	leal	-128(%rax), %ecx
	cmpl	$3, %ecx
	jae	LBB0_5
## %bb.2:
	movq	_NVM_CHK_ST_OPEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_3:
	movq	%rax, 8(%r14)
	movl	(%r13), %edx
	testl	%edx, %edx
	jle	LBB0_21
## %bb.4:
	movl	4(%r13), %ecx
	xorl	%r15d, %r15d
	jmp	LBB0_12
LBB0_5:
	cmpl	$131, %eax
	je	LBB0_22
## %bb.6:
	testl	%eax, %eax
	jne	LBB0_23
## %bb.7:
	movq	_NVM_CHK_ST_OPEN@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movq	%rax, 8(%r14)
	movl	(%r13), %esi
	movl	4(%r13), %eax
	decl	%esi
	decl	%eax
	shlq	$32, %rax
	orq	%rax, %rsi
	movq	%r13, %rdi
	callq	_nvm_bb_chunk_sense
                                        ## kill: def $eax killed $eax def $rax
	testl	%eax, %eax
	js	LBB0_24
## %bb.8:
	leal	-128(%rax), %ecx
	cmpl	$4, %ecx
	jae	LBB0_25
## %bb.9:
	movq	(%rbx), %rax
	jmp	LBB0_3
LBB0_10:                                ##   in Loop: Header=BB0_12 Depth=1
	movl	(%r13), %edx
LBB0_11:                                ##   in Loop: Header=BB0_12 Depth=1
	incq	%r15
	movslq	%edx, %rsi
	xorl	%eax, %eax
	cmpq	%rsi, %r15
	jge	LBB0_24
LBB0_12:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_15 Depth 2
	testl	%ecx, %ecx
	jle	LBB0_11
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_15 Depth=2
	movl	8(%r13), %eax
	addl	%eax, (%r14)
	incq	%r12
	movslq	4(%r13), %rcx
	movabsq	$4294967296, %rax               ## imm = 0x100000000
	addq	%rax, %rbx
	cmpq	%rcx, %r12
	jge	LBB0_10
LBB0_15:                                ##   Parent Loop BB0_12 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rbx, %rsi
	orq	%r15, %rsi
	movq	%r13, %rdi
	callq	_nvm_bb_chunk_sense
	movl	%eax, %ecx
	testl	%eax, %eax
	js	LBB0_20
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=2
	leal	-128(%rcx), %eax
	cmpl	$3, %eax
	jb	LBB0_14
## %bb.17:                              ##   in Loop: Header=BB0_15 Depth=2
	testl	%ecx, %ecx
	je	LBB0_14
## %bb.18:
	xorl	%eax, %eax
	cmpl	$131, %ecx
	je	LBB0_24
## %bb.19:
	negl	%ecx
LBB0_20:
	movl	%ecx, %eax
	jmp	LBB0_24
LBB0_21:
	xorl	%eax, %eax
	jmp	LBB0_24
LBB0_22:
	movq	_NVM_CHK_ST_FREE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r14)
	xorl	%eax, %eax
	jmp	LBB0_24
LBB0_25:
	testl	%eax, %eax
	jne	LBB0_23
## %bb.26:
	movq	_NVM_CHK_ST_CLOSED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%r14)
	movl	16(%r13), %eax
	movl	%eax, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_24
LBB0_23:
	negl	%eax
LBB0_24:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NVM_CHK_ST_OPEN,8,3            ## @NVM_CHK_ST_OPEN
	.comm	_NVM_CHK_ST_FREE,8,3            ## @NVM_CHK_ST_FREE
	.comm	_NVM_CHK_ST_CLOSED,8,3          ## @NVM_CHK_ST_CLOSED
	.no_dead_strip	_nvm_bb_chunk_scan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvm_bb_chunk_scan
_nvm_bb_chunk_scan:                     ; @nvm_bb_chunk_scan
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x2
	mov	x20, x0
	bl	_nvm_bb_chunk_sense
	tbnz	w0, #31, LBB0_23
; %bb.1:
	sub	w8, w0, #128
	cmp	w8, #3
	b.hs	LBB0_12
; %bb.2:
Lloh0:
	adrp	x8, _NVM_CHK_ST_OPEN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NVM_CHK_ST_OPEN@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
LBB0_3:
	str	x8, [x19, #8]
	ldr	w9, [x20]
	cmp	w9, #1
	b.lt	LBB0_17
; %bb.4:
	mov	x21, #0
	ldr	w8, [x20, #4]
	mov	x22, #4294967296
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	w0, #0
	add	x21, x21, #1
	cmp	x21, w9, sxtw
	b.ge	LBB0_23
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x23, #0
	mov	x24, #0
LBB0_8:                                 ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	orr	x1, x23, x21
	mov	x0, x20
	bl	_nvm_bb_chunk_sense
	tbnz	w0, #31, LBB0_23
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	sub	w8, w0, #128
	cmp	w8, #3
	ccmp	w0, #0, #4, hs
	b.ne	LBB0_19
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=2
	ldr	w9, [x19]
	ldp	w8, w10, [x20, #4]
                                        ; kill: def $w8 killed $w8 def $x8
	sxtw	x8, w8
	add	w9, w9, w10
	str	w9, [x19]
	add	x24, x24, #1
	add	x23, x23, x22
	cmp	x24, x8
	b.lt	LBB0_8
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=1
	ldr	w9, [x20]
	b	LBB0_5
LBB0_12:
	cmp	w0, #131
	b.eq	LBB0_18
; %bb.13:
	cbnz	w0, LBB0_22
; %bb.14:
Lloh3:
	adrp	x21, _NVM_CHK_ST_OPEN@GOTPAGE
Lloh4:
	ldr	x21, [x21, _NVM_CHK_ST_OPEN@GOTPAGEOFF]
	ldr	x8, [x21]
	str	x8, [x19, #8]
	ldp	w8, w9, [x20]
	sub	w1, w8, #1
	sub	w8, w9, #1
	bfi	x1, x8, #32, #32
	mov	x0, x20
	bl	_nvm_bb_chunk_sense
	tbnz	w0, #31, LBB0_23
; %bb.15:
	sub	w8, w0, #128
	cmp	w8, #4
	b.hs	LBB0_20
; %bb.16:
	ldr	x8, [x21]
	b	LBB0_3
LBB0_17:
	mov	w0, #0
	b	LBB0_23
LBB0_18:
	mov	w0, #0
Lloh5:
	adrp	x8, _NVM_CHK_ST_FREE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NVM_CHK_ST_FREE@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	str	x8, [x19, #8]
	b	LBB0_23
LBB0_19:
	cmp	w0, #131
	csneg	w0, wzr, w0, eq
	b	LBB0_23
LBB0_20:
	cbnz	w0, LBB0_22
; %bb.21:
Lloh8:
	adrp	x8, _NVM_CHK_ST_CLOSED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _NVM_CHK_ST_CLOSED@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	str	x8, [x19, #8]
	ldr	w8, [x20, #16]
	str	w8, [x19]
	b	LBB0_23
LBB0_22:
	neg	w0, w0
LBB0_23:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_NVM_CHK_ST_OPEN,8,3            ; @NVM_CHK_ST_OPEN
	.comm	_NVM_CHK_ST_FREE,8,3            ; @NVM_CHK_ST_FREE
	.comm	_NVM_CHK_ST_CLOSED,8,3          ; @NVM_CHK_ST_CLOSED
	.no_dead_strip	_nvm_bb_chunk_scan
.subsections_via_symbols
