	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function flctl_cmdfunc
_flctl_cmdfunc:                         ## @flctl_cmdfunc
	.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
	movl	%ecx, %r12d
	movl	%edx, %r15d
	movl	%esi, %ebx
	callq	_nand_to_mtd
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_mtd_to_flctl
	movq	%rax, %r13
	movq	24(%rax), %rdi
	callq	_pm_runtime_get_sync
	movl	$0, (%r13)
	cmpl	$136, %ebx
	jne	LBB0_5
## %bb.1:
	movq	%r13, %rdi
	callq	_empty_fifo
	cmpl	$0, 36(%r13)
	je	LBB0_9
## %bb.2:
	cmpl	$0, 32(%r13)
	je	LBB0_10
LBB0_3:
	movl	12(%r13), %eax
	cmpl	(%r14), %eax
	jne	LBB0_11
## %bb.4:
	movq	%r14, %rdi
	callq	_execmd_write_oob
	jmp	LBB0_38
LBB0_5:
	movl	$0, 4(%r13)
	leal	-128(%rbx), %eax
	cmpl	$10, %eax
	ja	LBB0_38
## %bb.6:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_7:
	cmpl	$0, 32(%r13)
	je	LBB0_27
## %bb.8:
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_execmd_read_page_sector
	jmp	LBB0_38
LBB0_9:
	movl	20(%r13), %edx
	movq	%r14, %rdi
	movl	$129, %esi
	callq	_set_cmd_regs
	movq	%r14, %rdi
	movl	$-1, %esi
	movl	$-1, %edx
	callq	_set_addr
	movq	%r13, %rdi
	callq	_FLDTCNTR
	xorl	%edi, %edi
	movl	%eax, %esi
	callq	_writel
	movq	%r13, %rdi
	callq	_start_translation
	movq	%r13, %rdi
	callq	_wait_completion
	cmpl	$0, 32(%r13)
	jne	LBB0_3
LBB0_10:
	movq	%r14, %rdi
	movl	$136, %esi
	movl	$34945, %edx                    ## imm = 0x8881
	callq	_set_cmd_regs
	movl	12(%r13), %esi
	movl	16(%r13), %edx
	movq	%r14, %rdi
	callq	_set_addr
	movl	4(%r13), %ebx
	movq	%r13, %rdi
	callq	_FLDTCNTR
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_writel
	movq	%r13, %rdi
	callq	_start_translation
	movl	4(%r13), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_write_fiforeg
	jmp	LBB0_37
LBB0_11:
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	jmp	LBB0_38
LBB0_13:
	movq	%r14, %rdi
	callq	_execmd_write_page_sector
	jmp	LBB0_38
LBB0_14:
	movq	%r14, %rdi
	movl	$128, %esi
	movl	$128, %edx
	callq	_set_cmd_regs
	movq	%r14, %rdi
	movl	$-1, %esi
	movl	$-1, %edx
	callq	_set_addr
	movl	$1, (%r13)
	movq	%r13, %rdi
	callq	_FLDTCNTR
	movl	$1, %edi
	movl	%eax, %esi
	callq	_writel
	movq	%r13, %rdi
	callq	_start_translation
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_read_datareg
	jmp	LBB0_38
LBB0_15:
	xorl	%eax, %eax
	cmpl	$0, 36(%r13)
	jne	LBB0_31
## %bb.16:
	movl	(%r14), %eax
	cmpl	%r15d, %eax
	jle	LBB0_30
## %bb.17:
	leal	-256(%r15), %ecx
	xorl	%eax, %eax
	cmpl	$256, %r15d                     ## imm = 0x100
	setl	%al
	cmovll	%r15d, %ecx
	orl	$134, %eax
	movl	%ecx, %r15d
	jmp	LBB0_31
LBB0_18:
	cmpl	$0, 32(%r13)
	jne	LBB0_38
## %bb.19:
	movq	_NAND_CMD_RNDOUTSTART@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	shll	$8, %edx
	orl	$130, %edx
	cmpl	$0, 36(%r13)
	movl	$130, %eax
	cmovel	%eax, %edx
	movq	%r14, %rdi
	movl	$130, %esi
	callq	_set_cmd_regs
	movq	%r14, %rdi
	movl	%r15d, %esi
	xorl	%edx, %edx
	callq	_set_addr
	movl	(%r14), %ebx
	subl	%r15d, %ebx
	addl	4(%r14), %ebx
	jmp	LBB0_34
LBB0_20:
	movq	%r14, %rdi
	movl	$131, %esi
	movl	$131, %edx
	callq	_set_cmd_regs
	movq	%r14, %rdi
	movl	$-1, %esi
	movl	$-1, %edx
	callq	_set_addr
	movq	%r13, %rdi
	callq	_FLDTCNTR
	xorl	%edi, %edi
	movl	%eax, %esi
	callq	_writel
	jmp	LBB0_25
LBB0_21:
	cmpl	$0, 32(%r13)
	je	LBB0_28
## %bb.22:
	movq	%r14, %rdi
	movl	%r12d, %esi
	callq	_execmd_read_oob
	jmp	LBB0_38
LBB0_23:
	movq	%r14, %rdi
	movl	$133, %esi
	movl	$133, %edx
	callq	_set_cmd_regs
	movq	_NAND_BUSWIDTH_16@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	40(%r13), %eax
	setne	%cl
	shll	%cl, %r15d
	movq	%r14, %rdi
	movl	%r15d, %esi
	xorl	%edx, %edx
	callq	_set_addr
	movl	$8, (%r13)
	movq	%r13, %rdi
	callq	_FLDTCNTR
	movl	$8, %edi
	jmp	LBB0_36
LBB0_24:
	movq	%r14, %rdi
	movl	$138, %esi
	movl	$35210, %edx                    ## imm = 0x898A
	callq	_set_cmd_regs
	movl	8(%r13), %edx
	movq	%r14, %rdi
	movl	$-1, %esi
	callq	_set_addr
LBB0_25:
	movq	%r13, %rdi
	callq	_start_translation
	jmp	LBB0_37
LBB0_26:
	movl	%r12d, 8(%r13)
	jmp	LBB0_38
LBB0_27:
	movl	36(%r13), %eax
	movq	_NAND_CMD_READSTART@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	shll	$8, %edx
	testl	%eax, %eax
	cmovel	%eax, %edx
	orl	%ebx, %edx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_set_cmd_regs
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	%r12d, %edx
	callq	_set_addr
	movl	4(%r14), %ebx
	addl	(%r14), %ebx
	movl	%ebx, (%r13)
	movq	_NAND_BUSWIDTH_16@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	40(%r13), %eax
	setne	%cl
	sarl	%cl, %r15d
	addl	%r15d, 4(%r13)
	jmp	LBB0_35
LBB0_28:
	cmpl	$0, 36(%r13)
	je	LBB0_32
## %bb.29:
	movq	_NAND_CMD_READSTART@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	shll	$8, %edx
	orl	$135, %edx
	movq	%r14, %rdi
	movl	$132, %esi
	callq	_set_cmd_regs
	movl	(%r14), %esi
	jmp	LBB0_33
LBB0_30:
	subl	%eax, %r15d
	movl	$132, %eax
LBB0_31:
	movl	%r15d, 12(%r13)
	movl	%r12d, 16(%r13)
	movl	%eax, 20(%r13)
	jmp	LBB0_38
LBB0_32:
	movq	%r14, %rdi
	movl	$132, %esi
	movl	$132, %edx
	callq	_set_cmd_regs
	xorl	%esi, %esi
LBB0_33:
	movq	%r14, %rdi
	movl	%r12d, %edx
	callq	_set_addr
	movl	4(%r14), %ebx
LBB0_34:
	movl	%ebx, (%r13)
LBB0_35:
	movq	%r13, %rdi
	callq	_FLDTCNTR
	movl	%ebx, %edi
LBB0_36:
	movl	%eax, %esi
	callq	_writel
	movq	%r13, %rdi
	callq	_empty_fifo
	movq	%r13, %rdi
	callq	_start_translation
	movl	(%r13), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_read_fiforeg
LBB0_37:
	movq	%r13, %rdi
	callq	_wait_completion
LBB0_38:
	movq	24(%r13), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pm_runtime_put_sync            ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_18, LBB0_18-LJTI0_0
.set L0_0_set_20, LBB0_20-LJTI0_0
.set L0_0_set_21, LBB0_21-LJTI0_0
.set L0_0_set_23, LBB0_23-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_38, LBB0_38-LJTI0_0
.set L0_0_set_24, LBB0_24-LJTI0_0
.set L0_0_set_26, LBB0_26-LJTI0_0
LJTI0_0:
	.long	L0_0_set_14
	.long	L0_0_set_15
	.long	L0_0_set_18
	.long	L0_0_set_20
	.long	L0_0_set_21
	.long	L0_0_set_23
	.long	L0_0_set_7
	.long	L0_0_set_7
	.long	L0_0_set_38
	.long	L0_0_set_24
	.long	L0_0_set_26
	.end_data_region
                                        ## -- End function
	.comm	_NAND_CMD_READSTART,4,2         ## @NAND_CMD_READSTART
	.comm	_NAND_BUSWIDTH_16,4,2           ## @NAND_BUSWIDTH_16
	.comm	_NAND_CMD_RNDOUTSTART,4,2       ## @NAND_CMD_RNDOUTSTART
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid address !?\n"

	.no_dead_strip	_flctl_cmdfunc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function flctl_cmdfunc
_flctl_cmdfunc:                         ; @flctl_cmdfunc
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x22, x3
	mov	x21, x2
	mov	x23, x1
	bl	_nand_to_mtd
	mov	x20, x0
	bl	_mtd_to_flctl
	mov	x19, x0
	ldr	x0, [x0, #24]
	bl	_pm_runtime_get_sync
	str	wzr, [x19]
	cmp	w23, #136
	b.ne	LBB0_5
; %bb.1:
	mov	x0, x19
	bl	_empty_fifo
	ldr	w8, [x19, #36]
	cbz	w8, LBB0_9
; %bb.2:
	ldr	w8, [x19, #32]
	cbz	w8, LBB0_10
LBB0_3:
	ldr	w8, [x19, #12]
	ldr	w9, [x20]
	cmp	w8, w9
	b.ne	LBB0_11
; %bb.4:
	mov	x0, x20
	bl	_execmd_write_oob
	b	LBB0_37
LBB0_5:
	str	wzr, [x19, #4]
	sub	w8, w23, #128
	cmp	w8, #10
	b.hi	LBB0_37
; %bb.6:
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_7
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_7:
	ldr	w8, [x19, #32]
	cbz	w8, LBB0_26
; %bb.8:
	mov	x0, x20
	mov	x1, x22
	bl	_execmd_read_page_sector
	b	LBB0_37
LBB0_9:
	ldr	w2, [x19, #20]
	mov	x0, x20
	mov	w1, #129
	bl	_set_cmd_regs
	mov	x0, x20
	mov	w1, #-1
	mov	w2, #-1
	bl	_set_addr
	mov	x0, x19
	bl	_FLDTCNTR
	mov	x1, x0
	mov	w0, #0
	bl	_writel
	mov	x0, x19
	bl	_start_translation
	mov	x0, x19
	bl	_wait_completion
	ldr	w8, [x19, #32]
	cbnz	w8, LBB0_3
LBB0_10:
	mov	x0, x20
	mov	w1, #136
	mov	w2, #34945
	bl	_set_cmd_regs
	ldp	w1, w2, [x19, #12]
	mov	x0, x20
	bl	_set_addr
	ldr	w20, [x19, #4]
	mov	x0, x19
	bl	_FLDTCNTR
	mov	x1, x0
	mov	x0, x20
	bl	_writel
	mov	x0, x19
	bl	_start_translation
	ldr	w1, [x19, #4]
	mov	x0, x19
	mov	w2, #0
	bl	_write_fiforeg
	b	LBB0_36
LBB0_11:
	cbz	w8, LBB0_13
; %bb.12:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
	b	LBB0_37
LBB0_13:
	mov	x0, x20
	bl	_execmd_write_page_sector
	b	LBB0_37
LBB0_14:
	mov	x0, x20
	mov	w1, #128
	mov	w2, #128
	bl	_set_cmd_regs
	mov	x0, x20
	mov	w1, #-1
	mov	w2, #-1
	bl	_set_addr
	mov	w8, #1
	str	w8, [x19]
	mov	x0, x19
	bl	_FLDTCNTR
	mov	x1, x0
	mov	w0, #1
	bl	_writel
	mov	x0, x19
	bl	_start_translation
	mov	x0, x19
	mov	w1, #0
	bl	_read_datareg
	b	LBB0_37
LBB0_15:
	ldr	w8, [x19, #36]
	cbz	w8, LBB0_27
; %bb.16:
	mov	w8, #0
	b	LBB0_28
LBB0_17:
	ldr	w8, [x19, #32]
	cbnz	w8, LBB0_37
; %bb.18:
	ldr	w8, [x19, #36]
Lloh4:
	adrp	x9, _NAND_CMD_RNDOUTSTART@GOTPAGE
Lloh5:
	ldr	x9, [x9, _NAND_CMD_RNDOUTSTART@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	mov	w10, #130
	mov	w11, #130
	bfi	w11, w9, #8, #24
	cmp	w8, #0
	csel	w2, w10, w11, eq
	mov	x0, x20
	mov	w1, #130
	bl	_set_cmd_regs
	mov	x0, x20
	mov	x1, x21
	mov	w2, #0
	bl	_set_addr
	ldp	w8, w9, [x20]
	sub	w8, w8, w21
	add	w20, w8, w9
	b	LBB0_33
LBB0_19:
	mov	x0, x20
	mov	w1, #131
	mov	w2, #131
	bl	_set_cmd_regs
	mov	x0, x20
	mov	w1, #-1
	mov	w2, #-1
	bl	_set_addr
	mov	x0, x19
	bl	_FLDTCNTR
	mov	x1, x0
	mov	w0, #0
	bl	_writel
	b	LBB0_24
LBB0_20:
	ldr	w8, [x19, #32]
	cbz	w8, LBB0_29
; %bb.21:
	mov	x0, x20
	mov	x1, x22
	bl	_execmd_read_oob
	b	LBB0_37
LBB0_22:
	mov	x0, x20
	mov	w1, #133
	mov	w2, #133
	bl	_set_cmd_regs
	ldr	w8, [x19, #40]
Lloh7:
	adrp	x9, _NAND_BUSWIDTH_16@GOTPAGE
Lloh8:
	ldr	x9, [x9, _NAND_BUSWIDTH_16@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w8, ne
	lsl	w1, w21, w8
	mov	x0, x20
	mov	w2, #0
	bl	_set_addr
	mov	w8, #8
	str	w8, [x19]
	mov	x0, x19
	bl	_FLDTCNTR
	mov	x1, x0
	mov	w0, #8
	b	LBB0_35
LBB0_23:
	mov	x0, x20
	mov	w1, #138
	mov	w2, #35210
	bl	_set_cmd_regs
	ldr	w2, [x19, #8]
	mov	x0, x20
	mov	w1, #-1
	bl	_set_addr
LBB0_24:
	mov	x0, x19
	bl	_start_translation
	b	LBB0_36
LBB0_25:
	str	w22, [x19, #8]
	b	LBB0_37
LBB0_26:
Lloh10:
	adrp	x8, _NAND_CMD_READSTART@GOTPAGE
Lloh11:
	ldr	x8, [x8, _NAND_CMD_READSTART@GOTPAGEOFF]
	ldr	w9, [x19, #36]
Lloh12:
	ldr	w8, [x8]
	lsl	w8, w8, #8
	cmp	w9, #0
	csel	w8, wzr, w8, eq
	orr	w2, w8, w23
	mov	x0, x20
	mov	x1, x23
	bl	_set_cmd_regs
	mov	x0, x20
	mov	w1, #0
	mov	x2, x22
	bl	_set_addr
	ldp	w8, w9, [x20]
	add	w20, w9, w8
	str	w20, [x19]
	ldr	w8, [x19, #40]
Lloh13:
	adrp	x9, _NAND_BUSWIDTH_16@GOTPAGE
Lloh14:
	ldr	x9, [x9, _NAND_BUSWIDTH_16@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w8, ne
	asr	w8, w21, w8
	ldr	w9, [x19, #4]
	add	w8, w8, w9
	str	w8, [x19, #4]
	b	LBB0_34
LBB0_27:
	ldr	w8, [x20]
	subs	w9, w21, #256
	csel	w9, w21, w9, lt
	mov	w10, #134
	cinc	w10, w10, lt
	sub	w11, w21, w8
	mov	w12, #132
	cmp	w8, w21
	csel	w21, w9, w11, gt
	csel	w8, w10, w12, gt
LBB0_28:
	stp	w21, w22, [x19, #12]
	str	w8, [x19, #20]
	b	LBB0_37
LBB0_29:
	ldr	w8, [x19, #36]
	cbz	w8, LBB0_31
; %bb.30:
Lloh16:
	adrp	x8, _NAND_CMD_READSTART@GOTPAGE
Lloh17:
	ldr	x8, [x8, _NAND_CMD_READSTART@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	mov	w2, #135
	bfi	w2, w8, #8, #24
	mov	x0, x20
	mov	w1, #132
	bl	_set_cmd_regs
	ldr	w1, [x20]
	b	LBB0_32
LBB0_31:
	mov	x0, x20
	mov	w1, #132
	mov	w2, #132
	bl	_set_cmd_regs
	mov	w1, #0
LBB0_32:
	mov	x0, x20
	mov	x2, x22
	bl	_set_addr
	ldr	w20, [x20, #4]
LBB0_33:
	str	w20, [x19]
LBB0_34:
	mov	x0, x19
	bl	_FLDTCNTR
	mov	x1, x0
	mov	x0, x20
LBB0_35:
	bl	_writel
	mov	x0, x19
	bl	_empty_fifo
	mov	x0, x19
	bl	_start_translation
	ldr	w1, [x19]
	mov	x0, x19
	mov	w2, #0
	bl	_read_fiforeg
LBB0_36:
	mov	x0, x19
	bl	_wait_completion
LBB0_37:
	ldr	x0, [x19, #24]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_pm_runtime_put_sync
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_14-LBB0_7)>>2
	.byte	(LBB0_15-LBB0_7)>>2
	.byte	(LBB0_17-LBB0_7)>>2
	.byte	(LBB0_19-LBB0_7)>>2
	.byte	(LBB0_20-LBB0_7)>>2
	.byte	(LBB0_22-LBB0_7)>>2
	.byte	(LBB0_7-LBB0_7)>>2
	.byte	(LBB0_7-LBB0_7)>>2
	.byte	(LBB0_37-LBB0_7)>>2
	.byte	(LBB0_23-LBB0_7)>>2
	.byte	(LBB0_25-LBB0_7)>>2
                                        ; -- End function
	.comm	_NAND_CMD_READSTART,4,2         ; @NAND_CMD_READSTART
	.comm	_NAND_BUSWIDTH_16,4,2           ; @NAND_BUSWIDTH_16
	.comm	_NAND_CMD_RNDOUTSTART,4,2       ; @NAND_CMD_RNDOUTSTART
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid address !?\n"

	.no_dead_strip	_flctl_cmdfunc
.subsections_via_symbols
