	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ep7312_hwcontrol
_ep7312_hwcontrol:                      ## @ep7312_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	%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	%esi, %r14d
	movq	(%rdi), %r15
	movq	_NAND_CTRL_CHANGE@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	je	LBB0_2
## %bb.1:
	movq	_NAND_CLE@GOTPCREL(%rip), %rax
	movq	_NAND_ALE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
	orl	(%rax), %r12d
	andl	%edx, %r12d
	shll	$3, %r12d
	movq	_NAND_NCE@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	andl	(%rax), %edx
	sete	%bl
	movq	_ep7312_pxdr@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_clps_readb
	andl	$112, %eax
	movzbl	%r12b, %ecx
	orl	%eax, %ecx
	shll	$6, %ebx
	orl	%ecx, %ebx
	orl	$128, %ebx
	movl	(%r13), %esi
	movl	%ebx, %edi
	callq	_clps_writeb
LBB0_2:
	movq	_NAND_CMD_NONE@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_4
## %bb.3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	(%r15), %esi
	movl	%r14d, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writeb                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_NAND_CTRL_CHANGE,4,2           ## @NAND_CTRL_CHANGE
	.comm	_NAND_CLE,4,2                   ## @NAND_CLE
	.comm	_NAND_ALE,4,2                   ## @NAND_ALE
	.comm	_NAND_NCE,4,2                   ## @NAND_NCE
	.comm	_ep7312_pxdr,4,2                ## @ep7312_pxdr
	.comm	_NAND_CMD_NONE,4,2              ## @NAND_CMD_NONE
	.no_dead_strip	_ep7312_hwcontrol
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ep7312_hwcontrol
_ep7312_hwcontrol:                      ; @ep7312_hwcontrol
	.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	x19, x1
	ldr	x21, [x0]
Lloh0:
	adrp	x8, _NAND_CTRL_CHANGE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NAND_CTRL_CHANGE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w2
	b.eq	LBB0_2
; %bb.1:
	mov	x20, x2
Lloh3:
	adrp	x8, _NAND_CLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NAND_CLE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _NAND_ALE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _NAND_ALE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
	and	w22, w8, w2
Lloh9:
	adrp	x8, _NAND_NCE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _NAND_NCE@GOTPAGEOFF]
Lloh11:
	ldr	w23, [x8]
Lloh12:
	adrp	x24, _ep7312_pxdr@GOTPAGE
Lloh13:
	ldr	x24, [x24, _ep7312_pxdr@GOTPAGEOFF]
	ldr	w0, [x24]
	bl	_clps_readb
	and	w8, w0, #0x70
	ubfiz	w9, w22, #3, #4
	tst	w23, w20
	mov	w10, #128
	mov	w11, #192
	csel	w10, w11, w10, eq
	orr	w9, w10, w9
	orr	w0, w9, w8
	ldr	w1, [x24]
	bl	_clps_writeb
LBB0_2:
Lloh14:
	adrp	x8, _NAND_CMD_NONE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _NAND_CMD_NONE@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	cmp	w8, w19
	b.ne	LBB0_4
; %bb.3:
	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
	ret
LBB0_4:
	ldr	w1, [x21]
	mov	x0, x19
	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	_writeb
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_NAND_CTRL_CHANGE,4,2           ; @NAND_CTRL_CHANGE
	.comm	_NAND_CLE,4,2                   ; @NAND_CLE
	.comm	_NAND_ALE,4,2                   ; @NAND_ALE
	.comm	_NAND_NCE,4,2                   ; @NAND_NCE
	.comm	_ep7312_pxdr,4,2                ; @ep7312_pxdr
	.comm	_NAND_CMD_NONE,4,2              ; @NAND_CMD_NONE
	.no_dead_strip	_ep7312_hwcontrol
.subsections_via_symbols
