	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function build_logical_block_map
_build_logical_block_map:               ## @build_logical_block_map
	.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, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_OOB_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	32(%r15), %r12
	movq	_MTD_DEBUG_LEVEL1@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movslq	(%r15), %rdx
	movq	%rdx, %rcx
	imulq	8(%r15), %rcx
	shrq	$10, %rcx
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	callq	_DEBUG
	movl	16(%r15), %eax
	incl	%eax
	cmpl	(%r15), %eax
	jge	LBB0_10
## %bb.1:
	movslq	%eax, %rbx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	jge	LBB0_9
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %r13
	imulq	%rbx, %r13
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	*(%r12)
	testq	%rax, %rax
	jne	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	%r14, %rdx
	callq	_read_raw_oob
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	callq	_get_logical_address
	testl	%eax, %eax
	js	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%eax, %ecx
	movq	_MAX_LOGIC_BLK_PER_ZONE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	cmpl	%esi, %ecx
	jge	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, %eax
	cltd
	movq	_MAX_PHYS_BLK_PER_ZONE@GOTPCREL(%rip), %rdi
	idivl	(%rdi)
	imull	%eax, %esi
	addl	%ecx, %esi
	movq	24(%r15), %rdx
	movslq	%esi, %rcx
	movw	%bx, (%rdx,%rcx,2)
	movq	_MTD_DEBUG_LEVEL2@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edx
                                        ## kill: def $ecx killed $ecx killed $rcx
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_DEBUG
	jmp	LBB0_8
LBB0_9:
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_4:
	movq	_MTD_DEBUG_LEVEL0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%r13d, %edx
	xorl	%eax, %eax
	callq	_DEBUG
	movl	$-1, %ebx
LBB0_10:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_12
## %bb.11:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_OOB_SIZE,4,2                   ## @OOB_SIZE
	.comm	_MTD_DEBUG_LEVEL1,4,2           ## @MTD_DEBUG_LEVEL1
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SSFDC_RO: build_block_map() nblks=%d (%luK)\n"

	.comm	_MTD_DEBUG_LEVEL0,4,2           ## @MTD_DEBUG_LEVEL0
L_.str.1:                               ## @.str.1
	.asciz	"SSFDC_RO: mtd read_oob() failed at %lu\n"

	.comm	_MAX_LOGIC_BLK_PER_ZONE,4,2     ## @MAX_LOGIC_BLK_PER_ZONE
	.comm	_MAX_PHYS_BLK_PER_ZONE,4,2      ## @MAX_PHYS_BLK_PER_ZONE
	.comm	_MTD_DEBUG_LEVEL2,4,2           ## @MTD_DEBUG_LEVEL2
L_.str.2:                               ## @.str.2
	.asciz	"SSFDC_RO: build_block_map() phys_block=%d,logic_block_addr=%d, zone=%d\n"

	.no_dead_strip	_build_logical_block_map
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function build_logical_block_map
_build_logical_block_map:               ; @build_logical_block_map
	.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
	sub	sp, sp, #16
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _OOB_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _OOB_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	x8, x8, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x20, x9, x8
	mov	sp, x20
Lloh8:
	adrp	x8, _MTD_DEBUG_LEVEL1@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MTD_DEBUG_LEVEL1@GOTPAGEOFF]
	ldr	x21, [x0, #32]
Lloh10:
	ldr	w0, [x8]
	ldrsw	x2, [x19]
	ldr	x8, [x19, #8]
	mul	x8, x8, x2
	lsr	x8, x8, #10
	str	x8, [sp, #-16]!
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_DEBUG
	add	sp, sp, #16
	ldr	w8, [x19, #16]
	add	w8, w8, #1
	ldr	w9, [x19]
	cmp	w8, w9
	b.ge	LBB0_8
; %bb.1:
	sxtw	x22, w8
Lloh13:
	adrp	x25, _MAX_LOGIC_BLK_PER_ZONE@GOTPAGE
Lloh14:
	ldr	x25, [x25, _MAX_LOGIC_BLK_PER_ZONE@GOTPAGEOFF]
Lloh15:
	adrp	x26, _MAX_PHYS_BLK_PER_ZONE@GOTPAGE
Lloh16:
	ldr	x26, [x26, _MAX_PHYS_BLK_PER_ZONE@GOTPAGEOFF]
Lloh17:
	adrp	x27, _MTD_DEBUG_LEVEL2@GOTPAGE
Lloh18:
	ldr	x27, [x27, _MTD_DEBUG_LEVEL2@GOTPAGEOFF]
Lloh19:
	adrp	x23, l_.str.2@PAGE
Lloh20:
	add	x23, x23, l_.str.2@PAGEOFF
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x22, x22, #1
	ldrsw	x8, [x19]
	cmp	x22, x8
	b.ge	LBB0_8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	mul	x24, x8, x22
	ldr	x8, [x21]
	mov	x0, x21
	mov	x1, x24
	blr	x8
	cbnz	x0, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
	mov	x1, x24
	mov	x2, x20
	bl	_read_raw_oob
	tbnz	w0, #31, LBB0_11
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	bl	_get_logical_address
	tbnz	w0, #31, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x25]
	cmp	w0, w8
	b.ge	LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w9, [x26]
	sdiv	w9, w22, w9
	madd	w8, w9, w8, w0
	ldr	x10, [x19, #24]
	strh	w22, [x10, w8, sxtw #1]
	ldr	w0, [x27]
	stp	x8, x9, [sp, #-16]!
	mov	x1, x23
	mov	x2, x22
	bl	_DEBUG
	add	sp, sp, #16
	b	LBB0_2
LBB0_8:
	mov	w0, #0
LBB0_9:
	ldur	x8, [x29, #-88]
Lloh21:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.10:
	sub	sp, x29, #80
	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
LBB0_11:
Lloh24:
	adrp	x8, _MTD_DEBUG_LEVEL0@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MTD_DEBUG_LEVEL0@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
Lloh27:
	adrp	x1, l_.str.1@PAGE
Lloh28:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x24
	bl	_DEBUG
	mov	w0, #-1
	b	LBB0_9
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_OOB_SIZE,4,2                   ; @OOB_SIZE
	.comm	_MTD_DEBUG_LEVEL1,4,2           ; @MTD_DEBUG_LEVEL1
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SSFDC_RO: build_block_map() nblks=%d (%luK)\n"

	.comm	_MTD_DEBUG_LEVEL0,4,2           ; @MTD_DEBUG_LEVEL0
l_.str.1:                               ; @.str.1
	.asciz	"SSFDC_RO: mtd read_oob() failed at %lu\n"

	.comm	_MAX_LOGIC_BLK_PER_ZONE,4,2     ; @MAX_LOGIC_BLK_PER_ZONE
	.comm	_MAX_PHYS_BLK_PER_ZONE,4,2      ; @MAX_PHYS_BLK_PER_ZONE
	.comm	_MTD_DEBUG_LEVEL2,4,2           ; @MTD_DEBUG_LEVEL2
l_.str.2:                               ; @.str.2
	.asciz	"SSFDC_RO: build_block_map() phys_block=%d,logic_block_addr=%d, zone=%d\n"

	.no_dead_strip	_build_logical_block_map
.subsections_via_symbols
