	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nand_create_bbt                ## -- Begin function nand_create_bbt
	.p2align	4, 0x90
_nand_create_bbt:                       ## @nand_create_bbt
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movl	(%rdi), %eax
	movq	_NAND_BBT_USE_FLASH@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.1:
	cmpq	$0, 16(%rbx)
	jne	LBB0_7
## %bb.2:
	movq	_NAND_BBT_NO_OOB@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
## %bb.3:
	movq	_bbt_main_no_oob_descr@GOTPCREL(%rip), %rax
	movq	%rax, 16(%rbx)
	movq	_bbt_mirror_no_oob_descr@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_4:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%rbx)
	jmp	LBB0_7
LBB0_5:
	movq	_bbt_main_descr@GOTPCREL(%rip), %rax
	movq	%rax, 16(%rbx)
	movq	_bbt_mirror_descr@GOTPCREL(%rip), %rax
LBB0_6:
	movq	%rax, 8(%rbx)
LBB0_7:
	movl	4(%rbx), %esi
	testl	%esi, %esi
	je	LBB0_9
LBB0_8:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_nand_scan_bbt                  ## TAILCALL
LBB0_9:
	movq	%rbx, %rdi
	callq	_nand_create_badblock_pattern
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_11:
	movl	4(%rbx), %esi
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_NAND_BBT_USE_FLASH,4,2         ## @NAND_BBT_USE_FLASH
	.comm	_NAND_BBT_NO_OOB,4,2            ## @NAND_BBT_NO_OOB
	.comm	_bbt_main_no_oob_descr,4,2      ## @bbt_main_no_oob_descr
	.comm	_bbt_mirror_no_oob_descr,4,2    ## @bbt_mirror_no_oob_descr
	.comm	_bbt_main_descr,4,2             ## @bbt_main_descr
	.comm	_bbt_mirror_descr,4,2           ## @bbt_mirror_descr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nand_create_bbt                ; -- Begin function nand_create_bbt
	.p2align	2
_nand_create_bbt:                       ; @nand_create_bbt
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _NAND_BBT_USE_FLASH@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NAND_BBT_USE_FLASH@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_4
; %bb.1:
	ldr	x9, [x19, #16]
	cbnz	x9, LBB0_5
; %bb.2:
Lloh3:
	adrp	x9, _NAND_BBT_NO_OOB@GOTPAGE
Lloh4:
	ldr	x9, [x9, _NAND_BBT_NO_OOB@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.3:
Lloh6:
	adrp	x8, _bbt_main_no_oob_descr@GOTPAGE
Lloh7:
	ldr	x8, [x8, _bbt_main_no_oob_descr@GOTPAGEOFF]
Lloh8:
	adrp	x9, _bbt_mirror_no_oob_descr@GOTPAGE
Lloh9:
	ldr	x9, [x9, _bbt_mirror_no_oob_descr@GOTPAGEOFF]
	b	LBB0_8
LBB0_4:
	stp	xzr, xzr, [x19, #8]
LBB0_5:
	ldr	w1, [x19, #4]
	cbz	w1, LBB0_9
LBB0_6:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_nand_scan_bbt
LBB0_7:
Lloh10:
	adrp	x8, _bbt_main_descr@GOTPAGE
Lloh11:
	ldr	x8, [x8, _bbt_main_descr@GOTPAGEOFF]
Lloh12:
	adrp	x9, _bbt_mirror_descr@GOTPAGE
Lloh13:
	ldr	x9, [x9, _bbt_mirror_descr@GOTPAGEOFF]
LBB0_8:
	stp	x9, x8, [x19, #8]
	ldr	w1, [x19, #4]
	cbnz	w1, LBB0_6
LBB0_9:
	mov	x0, x19
	bl	_nand_create_badblock_pattern
	cbz	w0, LBB0_11
; %bb.10:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_11:
	ldr	w1, [x19, #4]
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_NAND_BBT_USE_FLASH,4,2         ; @NAND_BBT_USE_FLASH
	.comm	_NAND_BBT_NO_OOB,4,2            ; @NAND_BBT_NO_OOB
	.comm	_bbt_main_no_oob_descr,4,2      ; @bbt_main_no_oob_descr
	.comm	_bbt_mirror_no_oob_descr,4,2    ; @bbt_mirror_no_oob_descr
	.comm	_bbt_main_descr,4,2             ; @bbt_main_descr
	.comm	_bbt_mirror_descr,4,2           ; @bbt_mirror_descr
.subsections_via_symbols
