	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_abs_bbt
_read_abs_bbt:                          ## @read_abs_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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %rbx
	callq	_nand_to_mtd
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leaq	4(%rbx), %r13
	movq	%r13, %rdi
	callq	_nanddev_target_size
	movl	%eax, %r14d
	movq	_NAND_BBT_PERCHIP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r15)
	je	LBB0_7
## %bb.1:
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_nanddev_ntargets
	testl	%eax, %eax
	jle	LBB0_8
## %bb.2:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	xorl	%r12d, %r12d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	-72(%rbp), %r8                  ## 8-byte Reload
	movq	8(%r8), %rax
	movl	(%rax,%r15,4), %edx
	movzbl	(%rbx), %ecx
	movl	%r14d, %eax
	sarl	%cl, %eax
	movq	%rbx, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	%eax, %ecx
	movl	%r12d, %r9d
	callq	_read_bbt
	testl	%eax, %eax
	jne	LBB0_9
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movzbl	(%rbx), %ecx
	movl	%r14d, %eax
	sarl	%cl, %eax
	addl	%eax, %r12d
	incq	%r15
	movq	%r13, %rdi
	callq	_nanddev_ntargets
	cltq
	cmpq	%rax, %r15
	jge	LBB0_8
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$-1, -44(%rbp)                  ## 4-byte Folded Reload
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	%r15, -56(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_6
	jmp	LBB0_5
LBB0_7:
	movq	8(%r15), %rax
	movl	(%rax), %edx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	movb	(%rbx), %cl
	sarl	%cl, %eax
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movl	%eax, %ecx
	movq	%r15, %r8
	xorl	%r9d, %r9d
	callq	_read_bbt
	testl	%eax, %eax
	jne	LBB0_9
LBB0_8:
	xorl	%eax, %eax
LBB0_9:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NAND_BBT_PERCHIP,4,2           ## @NAND_BBT_PERCHIP
	.no_dead_strip	_read_abs_bbt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_abs_bbt
_read_abs_bbt:                          ; @read_abs_bbt
	.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	x22, x3
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	bl	_nand_to_mtd
	mov	x25, x0
	add	x23, x21, #4
	mov	x0, x23
	bl	_nanddev_target_size
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _NAND_BBT_PERCHIP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NAND_BBT_PERCHIP@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.1:
	mov	x24, x0
	mov	x0, x23
	bl	_nanddev_ntargets
	cmp	w0, #1
	b.lt	LBB0_8
; %bb.2:
	mov	x26, #0
	mov	w25, #0
	mov	w27, w22
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x19, #8]
	ldr	w2, [x8, x26, lsl #2]
	ldr	w8, [x21]
	asr	w3, w24, w8
	mov	x0, x21
	mov	x1, x20
	mov	x4, x19
	mov	x5, x25
	bl	_read_bbt
	cbnz	w0, LBB0_9
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x21]
	asr	w8, w24, w8
	add	w25, w8, w25
	add	x26, x26, #1
	mov	x0, x23
	bl	_nanddev_ntargets
	cmp	x26, w0, sxtw
	b.ge	LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	cmn	w22, #1
	b.eq	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	x27, x26
	b.ne	LBB0_4
	b	LBB0_3
LBB0_7:
	ldr	x8, [x19, #8]
	ldr	w2, [x8]
	ldr	w8, [x25]
	ldr	w9, [x21]
	asr	w3, w8, w9
	mov	x0, x21
	mov	x1, x20
	mov	x4, x19
	mov	w5, #0
	bl	_read_bbt
	cbnz	w0, LBB0_9
LBB0_8:
	mov	w0, #0
LBB0_9:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_NAND_BBT_PERCHIP,4,2           ; @NAND_BBT_PERCHIP
	.no_dead_strip	_read_abs_bbt
.subsections_via_symbols
