	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fun_cmd_ctrl
_fun_cmd_ctrl:                          ## @fun_cmd_ctrl
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r15d
	movl	%esi, %r14d
	movq	(%rdi), %r12
	callq	_to_fsl_upm_nand
	movq	%rax, %rbx
	testl	%r15d, (%rax)
	jne	LBB0_3
## %bb.1:
	leaq	28(%rbx), %rdi
	callq	_fsl_upm_end_pattern
	movq	_NAND_CMD_NONE@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	je	LBB0_10
## %bb.2:
	movq	_NAND_ALE@GOTPCREL(%rip), %rax
	movq	_NAND_CLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	andl	%r15d, %ecx
	movl	%ecx, (%rbx)
LBB0_3:
	movq	_NAND_CTRL_CHANGE@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_9
## %bb.4:
	movq	_NAND_ALE@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_6
## %bb.5:
	leaq	28(%rbx), %rdi
	movl	36(%rbx), %esi
	jmp	LBB0_8
LBB0_6:
	movq	_NAND_CLE@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_9
## %bb.7:
	leaq	28(%rbx), %rdi
	movl	32(%rbx), %esi
LBB0_8:
	callq	_fsl_upm_start_pattern
LBB0_9:
	movq	%rbx, %rdi
	addq	$28, %rdi
	xorl	%ecx, %ecx
	subb	28(%rbx), %cl
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r14d
	movq	8(%rbx), %rax
	movq	16(%rbx), %rcx
	orl	(%rax,%rcx,4), %r14d
	movl	(%r12), %esi
	movl	%r14d, %edx
	callq	_fsl_upm_run_pattern
	movq	_FSL_UPM_WAIT_RUN_PATTERN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 24(%rbx)
	je	LBB0_10
## %bb.11:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_fun_wait_rnb                   ## TAILCALL
LBB0_10:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NAND_CMD_NONE,4,2              ## @NAND_CMD_NONE
	.comm	_NAND_ALE,4,2                   ## @NAND_ALE
	.comm	_NAND_CLE,4,2                   ## @NAND_CLE
	.comm	_NAND_CTRL_CHANGE,4,2           ## @NAND_CTRL_CHANGE
	.comm	_FSL_UPM_WAIT_RUN_PATTERN,4,2   ## @FSL_UPM_WAIT_RUN_PATTERN
	.no_dead_strip	_fun_cmd_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fun_cmd_ctrl
_fun_cmd_ctrl:                          ; @fun_cmd_ctrl
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x2
	mov	x20, x1
	ldr	x22, [x0]
	bl	_to_fsl_upm_nand
	mov	x19, x0
	ldr	w8, [x0]
	tst	w8, w21
	b.ne	LBB0_3
; %bb.1:
	add	x0, x19, #28
	bl	_fsl_upm_end_pattern
Lloh0:
	adrp	x8, _NAND_CMD_NONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NAND_CMD_NONE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w20
	b.eq	LBB0_11
; %bb.2:
Lloh3:
	adrp	x8, _NAND_ALE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NAND_ALE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _NAND_CLE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _NAND_CLE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
	and	w8, w8, w21
	str	w8, [x19]
LBB0_3:
Lloh9:
	adrp	x8, _NAND_CTRL_CHANGE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _NAND_CTRL_CHANGE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_9
; %bb.4:
Lloh12:
	adrp	x8, _NAND_ALE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _NAND_ALE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_6
; %bb.5:
	add	x0, x19, #28
	ldr	w1, [x19, #36]
	b	LBB0_8
LBB0_6:
Lloh15:
	adrp	x8, _NAND_CLE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _NAND_CLE@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_9
; %bb.7:
	add	x0, x19, #28
	ldr	w1, [x19, #32]
LBB0_8:
	bl	_fsl_upm_start_pattern
LBB0_9:
	mov	x21, x19
	ldr	w8, [x21, #28]!
	neg	w8, w8
	lsl	w8, w20, w8
	ldur	x9, [x21, #-20]
	ldur	x10, [x21, #-12]
	ldr	w9, [x9, x10, lsl #2]
	orr	w2, w9, w8
	ldr	w1, [x22]
	mov	x0, x21
	bl	_fsl_upm_run_pattern
	ldur	w8, [x21, #-4]
Lloh18:
	adrp	x9, _FSL_UPM_WAIT_RUN_PATTERN@GOTPAGE
Lloh19:
	ldr	x9, [x9, _FSL_UPM_WAIT_RUN_PATTERN@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.10:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_fun_wait_rnb
LBB0_11:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_NAND_CMD_NONE,4,2              ; @NAND_CMD_NONE
	.comm	_NAND_ALE,4,2                   ; @NAND_ALE
	.comm	_NAND_CLE,4,2                   ; @NAND_CLE
	.comm	_NAND_CTRL_CHANGE,4,2           ; @NAND_CTRL_CHANGE
	.comm	_FSL_UPM_WAIT_RUN_PATTERN,4,2   ; @FSL_UPM_WAIT_RUN_PATTERN
	.no_dead_strip	_fun_cmd_ctrl
.subsections_via_symbols
