	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fsmc_exec_op
_fsmc_exec_op:                          ## @fsmc_exec_op
	.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	%rsi, %rbx
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_nand_to_fsmc
	movq	%rax, %r15
	movl	(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	callq	_pr_debug
	cmpl	$0, (%rbx)
	je	LBB0_1
## %bb.2:
	xorl	%r14d, %r14d
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
LBB0_15:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	8(%r12,%r13), %esi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_nand_soft_waitrdy
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_3 Depth=1
	incq	%r14
	movl	(%rbx), %eax
	cmpq	%rax, %r14
	jae	LBB0_17
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	movq	8(%rbx), %r12
	leaq	(%r14,%r14,2), %r13
	shlq	$4, %r13
	leaq	(%r12,%r13), %rsi
	leaq	L_.str.1(%rip), %rdi
	callq	_nand_op_trace
	movl	(%r12,%r13), %eax
	addl	$-128, %eax
	cmpl	$4, %eax
	ja	LBB0_16
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_12:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r15), %eax
	movl	12(%r12,%r13), %edx
	movl	16(%r12,%r13), %esi
	movq	_USE_DMA_ACCESS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	callq	_fsmc_write_buf_dma
	jmp	LBB0_16
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r15), %eax
	movl	12(%r12,%r13), %edx
	movl	20(%r12,%r13), %esi
	movq	_USE_DMA_ACCESS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	callq	_fsmc_read_buf_dma
	jmp	LBB0_16
LBB0_18:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	40(%r12,%r13), %edi
	movl	8(%r15), %esi
	callq	_writeb_relaxed
	jmp	LBB0_16
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$0, 24(%r12,%r13)
	jle	LBB0_16
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	addq	%r13, %r12
	addq	$24, %r12
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	8(%r12), %rax
	movl	(%rax,%rbx,4), %edi
	movl	4(%r15), %esi
	callq	_writeb_relaxed
	incq	%rbx
	movslq	(%r12), %rax
	cmpq	%rax, %rbx
	jl	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_16
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	callq	_fsmc_write_buf
	jmp	LBB0_16
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	callq	_fsmc_read_buf
	jmp	LBB0_16
LBB0_1:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_17:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_18, LBB0_18-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
LJTI0_0:
	.long	L0_0_set_15
	.long	L0_0_set_12
	.long	L0_0_set_9
	.long	L0_0_set_18
	.long	L0_0_set_5
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Executing operation [%d instructions]:\n"

L_.str.1:                               ## @.str.1
	.asciz	"  "

	.comm	_USE_DMA_ACCESS,4,2             ## @USE_DMA_ACCESS
	.no_dead_strip	_fsmc_exec_op
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fsmc_exec_op
_fsmc_exec_op:                          ; @fsmc_exec_op
	.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	x19, x1
	mov	x20, x0
	bl	_nand_to_fsmc
	mov	x21, x0
	ldr	w1, [x19]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_debug
	ldr	w8, [x19]
	cbz	w8, LBB0_17
; %bb.1:
	mov	x25, #0
	mov	w22, #0
	mov	w26, #48
Lloh2:
	adrp	x23, l_.str.1@PAGE
Lloh3:
	add	x23, x23, l_.str.1@PAGEOFF
Lloh4:
	adrp	x28, _USE_DMA_ACCESS@GOTPAGE
Lloh5:
	ldr	x28, [x28, _USE_DMA_ACCESS@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	madd	x8, x25, x26, x27
	ldr	w1, [x8, #8]
	mov	x0, x20
	bl	_nand_soft_waitrdy
	mov	x22, x0
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x25, x25, #1
	ldr	w8, [x19]
	cmp	x25, x8
	b.hs	LBB0_18
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_13 Depth 2
	ldr	x27, [x19, #8]
	madd	x24, x25, x26, x27
	mov	x0, x23
	mov	x1, x24
	bl	_nand_op_trace
	ldr	w8, [x24]
	sub	w8, w8, #128
	cmp	w8, #4
	b.hi	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh6:
	adrp	x11, lJTI0_0@PAGE
Lloh7:
	add	x11, x11, lJTI0_0@PAGEOFF
	adr	x9, LBB0_2
	ldrb	w10, [x11, x8]
	add	x9, x9, x10, lsl #2
	br	x9
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x21]
	ldr	w9, [x28]
	madd	x10, x25, x26, x27
	ldp	w2, w1, [x10, #12]
	mov	x0, x21
	cmp	w8, w9
	b.ne	LBB0_15
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	_fsmc_write_buf_dma
	b	LBB0_3
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x21]
	ldr	w9, [x28]
	madd	x10, x25, x26, x27
	ldr	w1, [x10, #20]
	ldr	w2, [x10, #12]
	mov	x0, x21
	cmp	w8, w9
	b.ne	LBB0_16
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	_fsmc_read_buf_dma
	b	LBB0_3
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	madd	x8, x25, x26, x27
	ldr	w0, [x8, #40]
	ldr	w1, [x21, #8]
	bl	_writeb_relaxed
	b	LBB0_3
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
	madd	x24, x25, x26, x27
	ldr	w8, [x24, #24]!
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x23, x28
	mov	x28, x22
	mov	x22, x20
	mov	x20, #0
	madd	x8, x25, x26, x27
	add	x27, x8, #32
LBB0_13:                                ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x27]
	ldr	w0, [x8, x20, lsl #2]
	ldr	w1, [x21, #4]
	bl	_writeb_relaxed
	add	x20, x20, #1
	ldrsw	x8, [x24]
	cmp	x20, x8
	b.lt	LBB0_13
; %bb.14:                               ;   in Loop: Header=BB0_4 Depth=1
	mov	x20, x22
	mov	x22, x28
	mov	x28, x23
Lloh8:
	adrp	x23, l_.str.1@PAGE
Lloh9:
	add	x23, x23, l_.str.1@PAGEOFF
	b	LBB0_3
LBB0_15:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	_fsmc_write_buf
	b	LBB0_3
LBB0_16:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	_fsmc_read_buf
	b	LBB0_3
LBB0_17:
	mov	w22, #0
LBB0_18:
	mov	x0, x22
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_10-LBB0_2)>>2
	.byte	(LBB0_11-LBB0_2)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Executing operation [%d instructions]:\n"

l_.str.1:                               ; @.str.1
	.asciz	"  "

	.comm	_USE_DMA_ACCESS,4,2             ; @USE_DMA_ACCESS
	.no_dead_strip	_fsmc_exec_op
.subsections_via_symbols
