	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mx23_boot_init
_mx23_boot_init:                        ## @mx23_boot_init
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	32(%rdi), %r14
	callq	_nand_to_mtd
	movq	%rax, %rbx
	movq	%r12, %rdi
	callq	_mx23_check_transcription_stamp
	testq	%rax, %rax
	jne	LBB0_9
## %bb.1:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	leaq	L_.str(%rip), %rsi
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	leaq	24(%r12), %rdi
	callq	_nanddev_eraseblocks_per_target
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	testl	%eax, %eax
	je	LBB0_8
## %bb.2:
	xorl	%r15d, %r15d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	incl	%r15d
	cmpl	%r15d, -44(%rbp)                ## 4-byte Folded Reload
	je	LBB0_8
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %ecx
	movl	4(%r12), %r14d
	subl	%r14d, %ecx
	movl	%r15d, %esi
                                        ## kill: def $cl killed $cl killed $ecx
	shrl	%cl, %esi
	movl	%r14d, %ecx
	subl	8(%r12), %ecx
	movl	%r15d, %r13d
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r13d
	movq	%r12, %rdi
	callq	_nand_select_target
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	%r13d, %esi
	leaq	-48(%rbp), %rcx
	movl	$1, %r8d
	callq	_nand_read_page_op
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_nand_deselect_target
	testl	%ebx, %ebx
	jne	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$255, -48(%rbp)
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r15d, %ebx
	movl	%r14d, %ecx
	shll	%cl, %ebx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	*16(%r12)
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_7
LBB0_8:
	movq	%r12, %rdi
	callq	_mx23_write_transcription_stamp
LBB0_9:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Transcribing bad block marks...\n"

L_.str.1:                               ## @.str.1
	.asciz	"Transcribing mark in block %u\n"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to mark block bad with ret %d\n"

	.no_dead_strip	_mx23_boot_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mx23_boot_init
_mx23_boot_init:                        ; @mx23_boot_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x0
	ldr	x20, [x0, #32]
	bl	_nand_to_mtd
	mov	x21, x0
	mov	x0, x19
	bl	_mx23_check_transcription_stamp
	cbnz	x0, LBB0_9
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
	add	x0, x19, #24
	bl	_nanddev_eraseblocks_per_target
	cbz	w0, LBB0_8
; %bb.2:
	mov	x22, x0
	mov	w26, #0
Lloh2:
	adrp	x23, l_.str.1@PAGE
Lloh3:
	add	x23, x23, l_.str.1@PAGEOFF
Lloh4:
	adrp	x24, l_.str.2@PAGE
Lloh5:
	add	x24, x24, l_.str.2@PAGEOFF
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w26, w26, #1
	cmp	w22, w26
	b.eq	LBB0_8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w8, w27, [x19]
	sub	w8, w8, w27
	lsr	w1, w26, w8
	ldr	w8, [x19, #8]
	sub	w8, w27, w8
	lsl	w25, w26, w8
	mov	x0, x19
	bl	_nand_select_target
	ldr	w2, [x21]
	add	x3, sp, #12
	mov	x0, x19
	mov	x1, x25
	mov	w4, #1
	bl	_nand_read_page_op
	mov	x25, x0
	mov	x0, x19
	bl	_nand_deselect_target
	cbnz	w25, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [sp, #12]
	cmp	w8, #255
	b.eq	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	lsl	w25, w26, w27
	str	x26, [sp]
	mov	x0, x20
	mov	x1, x23
	bl	_dev_dbg
	ldr	x8, [x19, #16]
	mov	x0, x19
	mov	x1, x25
	blr	x8
	cbz	w0, LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x2, x0
	mov	x0, x20
	mov	x1, x24
	bl	_dev_err
	b	LBB0_3
LBB0_8:
	mov	x0, x19
	bl	_mx23_write_transcription_stamp
LBB0_9:
	mov	w0, #0
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Transcribing bad block marks...\n"

l_.str.1:                               ; @.str.1
	.asciz	"Transcribing mark in block %u\n"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to mark block bad with ret %d\n"

	.no_dead_strip	_mx23_boot_init
.subsections_via_symbols
