	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tmio_nand_hwcontrol
_tmio_nand_hwcontrol:                   ## @tmio_nand_hwcontrol
	.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, %r12d
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_mtd_to_tmio
	movq	%rax, %r15
	movq	(%rbx), %rbx
	movq	_NAND_CTRL_CHANGE@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_7
## %bb.1:
	movq	_NAND_NCE@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_5
## %bb.2:
	movq	_FCR_MODE_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_NAND_CLE@GOTPCREL(%rip), %rdx
	movq	_FCR_MODE_CLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %esi
	orl	%ecx, %esi
	notl	%eax
	andl	%ecx, %eax
	testl	%r12d, (%rdx)
	cmovnel	%esi, %eax
	movq	_NAND_ALE@GOTPCREL(%rip), %rcx
	movq	_FCR_MODE_ALE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edi
	testl	%r12d, (%rcx)
	je	LBB0_4
## %bb.3:
	orl	%eax, %edi
	jmp	LBB0_6
LBB0_5:
	movq	_FCR_MODE_STANDBY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	jmp	LBB0_6
LBB0_4:
	notl	%edi
	andl	%eax, %edi
LBB0_6:
	movq	_FCR_MODE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r15), %rsi
	callq	_tmio_iowrite8
	movq	$0, (%r15)
LBB0_7:
	movq	_NAND_CMD_NONE@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_9
## %bb.8:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	(%rbx), %rsi
	movl	%r14d, %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_tmio_iowrite8                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_NAND_CTRL_CHANGE,4,2           ## @NAND_CTRL_CHANGE
	.comm	_NAND_NCE,4,2                   ## @NAND_NCE
	.comm	_FCR_MODE_DATA,4,2              ## @FCR_MODE_DATA
	.comm	_NAND_CLE,4,2                   ## @NAND_CLE
	.comm	_FCR_MODE_CLE,4,2               ## @FCR_MODE_CLE
	.comm	_NAND_ALE,4,2                   ## @NAND_ALE
	.comm	_FCR_MODE_ALE,4,2               ## @FCR_MODE_ALE
	.comm	_FCR_MODE_STANDBY,4,2           ## @FCR_MODE_STANDBY
	.comm	_FCR_MODE,8,3                   ## @FCR_MODE
	.comm	_NAND_CMD_NONE,4,2              ## @NAND_CMD_NONE
	.no_dead_strip	_tmio_nand_hwcontrol
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tmio_nand_hwcontrol
_tmio_nand_hwcontrol:                   ; @tmio_nand_hwcontrol
	.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	x19, x1
	mov	x22, x0
	bl	_mtd_to_tmio
	ldr	x22, [x22]
Lloh0:
	adrp	x8, _NAND_CTRL_CHANGE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NAND_CTRL_CHANGE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_5
; %bb.1:
	mov	x20, x0
Lloh3:
	adrp	x8, _NAND_NCE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NAND_NCE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_3
; %bb.2:
Lloh6:
	adrp	x8, _FCR_MODE_DATA@GOTPAGE
Lloh7:
	ldr	x8, [x8, _FCR_MODE_DATA@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _NAND_CLE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _NAND_CLE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
Lloh12:
	adrp	x10, _FCR_MODE_CLE@GOTPAGE
Lloh13:
	ldr	x10, [x10, _FCR_MODE_CLE@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	orr	w11, w10, w8
	bic	w8, w8, w10
	tst	w9, w21
	csel	w8, w8, w11, eq
Lloh15:
	adrp	x9, _NAND_ALE@GOTPAGE
Lloh16:
	ldr	x9, [x9, _NAND_ALE@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	tst	w9, w21
Lloh18:
	adrp	x9, _FCR_MODE_ALE@GOTPAGE
Lloh19:
	ldr	x9, [x9, _FCR_MODE_ALE@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	bic	w10, w8, w9
	orr	w8, w9, w8
	csel	w0, w10, w8, eq
	b	LBB0_4
LBB0_3:
Lloh21:
	adrp	x8, _FCR_MODE_STANDBY@GOTPAGE
Lloh22:
	ldr	x8, [x8, _FCR_MODE_STANDBY@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
LBB0_4:
	ldr	x8, [x20, #8]
Lloh24:
	adrp	x9, _FCR_MODE@GOTPAGE
Lloh25:
	ldr	x9, [x9, _FCR_MODE@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_tmio_iowrite8
	str	xzr, [x20]
LBB0_5:
Lloh27:
	adrp	x8, _NAND_CMD_NONE@GOTPAGE
Lloh28:
	ldr	x8, [x8, _NAND_CMD_NONE@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	cmp	w8, w19
	b.ne	LBB0_7
; %bb.6:
	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
LBB0_7:
	ldr	x1, [x22]
	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	_tmio_iowrite8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_NAND_CTRL_CHANGE,4,2           ; @NAND_CTRL_CHANGE
	.comm	_NAND_NCE,4,2                   ; @NAND_NCE
	.comm	_FCR_MODE_DATA,4,2              ; @FCR_MODE_DATA
	.comm	_NAND_CLE,4,2                   ; @NAND_CLE
	.comm	_FCR_MODE_CLE,4,2               ; @FCR_MODE_CLE
	.comm	_NAND_ALE,4,2                   ; @NAND_ALE
	.comm	_FCR_MODE_ALE,4,2               ; @FCR_MODE_ALE
	.comm	_FCR_MODE_STANDBY,4,2           ; @FCR_MODE_STANDBY
	.comm	_FCR_MODE,8,3                   ; @FCR_MODE
	.comm	_NAND_CMD_NONE,4,2              ; @NAND_CMD_NONE
	.no_dead_strip	_tmio_nand_hwcontrol
.subsections_via_symbols
