	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvm_bb_to_chunk
_nvm_bb_to_chunk:                       ## @nvm_bb_to_chunk
	.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
	cmpl	$0, (%rdi)
	jle	LBB0_12
## %bb.1:
	movq	%r8, %rbx
	movq	%rdx, %r14
	movq	%rdi, %r15
	xorl	%r12d, %r12d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	_NVM_CHK_ST_OFFLINE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=1
	addq	$40, %rbx
	incl	%r12d
	cmpl	(%r15), %r12d
	jge	LBB0_12
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	movl	4(%r15), %eax
	movl	%eax, %ecx
	imull	%r12d, %ecx
	movslq	%ecx, %rcx
	movl	(%r14,%rcx,4), %ecx
	testl	%eax, %eax
	jle	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_NVM_BLK_T_GRWN_BAD@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movq	_NVM_BLK_T_BAD@GOTPCREL(%rip), %rsi
	orl	(%rsi), %edx
	movl	%eax, %esi
	imull	%r12d, %esi
	movslq	%esi, %rsi
	leaq	(%r14,%rsi,4), %rsi
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rsi,%rdi,4), %r13d
	testl	%r13d, %edx
	jne	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	incq	%rdi
	cmpq	%rdi, %rax
	jne	LBB0_6
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	%ecx, %r13d
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	$0, 32(%rbx)
	movq	_NVM_CHK_TP_W_SEQ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movq	$0, 16(%rbx)
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_generic_to_dev_addr
	movl	%eax, 8(%rbx)
	movl	8(%r15), %eax
	movl	%eax, 4(%rbx)
	movq	_NVM_BLK_T_FREE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jne	LBB0_2
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdi
	movl	%r12d, %esi
	movq	%rbx, %rdx
	callq	_nvm_bb_chunk_scan
	testl	%eax, %eax
	je	LBB0_3
	jmp	LBB0_13
LBB0_12:
	xorl	%eax, %eax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NVM_BLK_T_BAD,4,2              ## @NVM_BLK_T_BAD
	.comm	_NVM_BLK_T_GRWN_BAD,4,2         ## @NVM_BLK_T_GRWN_BAD
	.comm	_NVM_CHK_TP_W_SEQ,4,2           ## @NVM_CHK_TP_W_SEQ
	.comm	_NVM_BLK_T_FREE,4,2             ## @NVM_BLK_T_FREE
	.comm	_NVM_CHK_ST_OFFLINE,4,2         ## @NVM_CHK_ST_OFFLINE
	.no_dead_strip	_nvm_bb_to_chunk
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvm_bb_to_chunk
_nvm_bb_to_chunk:                       ; @nvm_bb_to_chunk
	.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
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.1:
	mov	x19, x4
	mov	x20, x2
	mov	x21, x0
	mov	x22, #0
Lloh0:
	adrp	x23, _NVM_BLK_T_BAD@GOTPAGE
Lloh1:
	ldr	x23, [x23, _NVM_BLK_T_BAD@GOTPAGEOFF]
Lloh2:
	adrp	x24, _NVM_BLK_T_GRWN_BAD@GOTPAGE
Lloh3:
	ldr	x24, [x24, _NVM_BLK_T_GRWN_BAD@GOTPAGEOFF]
Lloh4:
	adrp	x25, _NVM_CHK_TP_W_SEQ@GOTPAGE
Lloh5:
	ldr	x25, [x25, _NVM_CHK_TP_W_SEQ@GOTPAGEOFF]
Lloh6:
	adrp	x26, _NVM_BLK_T_FREE@GOTPAGE
Lloh7:
	ldr	x26, [x26, _NVM_BLK_T_FREE@GOTPAGEOFF]
Lloh8:
	adrp	x27, _NVM_CHK_ST_OFFLINE@GOTPAGE
Lloh9:
	ldr	x27, [x27, _NVM_CHK_ST_OFFLINE@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x27]
	str	w8, [x19]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x19, x19, #40
	add	x22, x22, #1
	ldrsw	x8, [x21]
	cmp	x22, x8
	b.ge	LBB0_11
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	ldr	w8, [x21, #4]
	mul	w9, w8, w22
	ldr	w28, [x20, w9, sxtw #2]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x23]
	ldr	w10, [x24]
	orr	w9, w10, w9
	mul	w10, w8, w22
	add	x10, x20, w10, sxtw #2
LBB0_6:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w11, [x10]
	tst	w9, w11
	b.ne	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	add	x10, x10, #4
	subs	x8, x8, #1
	b.ne	LBB0_6
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x28, x11
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	str	xzr, [x19, #32]
	ldr	w8, [x25]
	str	w8, [x19, #24]
	str	xzr, [x19, #16]
	mov	x0, x21
	mov	x1, x22
	bl	_generic_to_dev_addr
	ldr	w8, [x21, #8]
	stp	w8, w0, [x19, #4]
	ldr	w8, [x26]
	cmp	w28, w8
	b.ne	LBB0_2
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x21
	mov	x1, x22
	mov	x2, x19
	bl	_nvm_bb_chunk_scan
	cbz	w0, LBB0_3
	b	LBB0_12
LBB0_11:
	mov	w0, #0
LBB0_12:
	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	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_NVM_BLK_T_BAD,4,2              ; @NVM_BLK_T_BAD
	.comm	_NVM_BLK_T_GRWN_BAD,4,2         ; @NVM_BLK_T_GRWN_BAD
	.comm	_NVM_CHK_TP_W_SEQ,4,2           ; @NVM_CHK_TP_W_SEQ
	.comm	_NVM_BLK_T_FREE,4,2             ; @NVM_BLK_T_FREE
	.comm	_NVM_CHK_ST_OFFLINE,4,2         ; @NVM_CHK_ST_OFFLINE
	.no_dead_strip	_nvm_bb_to_chunk
.subsections_via_symbols
