	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rb4xx_nand_cmd_ctrl
_rb4xx_nand_cmd_ctrl:                   ## @rb4xx_nand_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	movq	_NAND_CTRL_CHANGE@GOTPCREL(%rip), %rax
	testl	%edx, (%rax)
	je	LBB0_2
## %bb.1:
	movl	%edx, %ebx
	movq	_RB4XX_NAND_GPIO_CLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_NAND_CLE@GOTPCREL(%rip), %rax
	xorl	%esi, %esi
	movl	(%rax), %eax
	andl	%edx, %eax
	setne	%sil
	callq	_gpio_set_value_cansleep
	movq	_RB4XX_NAND_GPIO_ALE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_NAND_ALE@GOTPCREL(%rip), %rax
	xorl	%esi, %esi
	movl	(%rax), %eax
	andl	%ebx, %eax
	setne	%sil
	callq	_gpio_set_value_cansleep
	movq	_RB4XX_NAND_GPIO_NCE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_NAND_NCE@GOTPCREL(%rip), %rax
	xorl	%esi, %esi
	andl	(%rax), %ebx
	sete	%sil
	callq	_gpio_set_value_cansleep
LBB0_2:
	movq	_NAND_CMD_NONE@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jne	LBB0_4
## %bb.3:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	movl	%r14d, %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_rb4xx_nand_write_cmd           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_NAND_CTRL_CHANGE,4,2           ## @NAND_CTRL_CHANGE
	.comm	_RB4XX_NAND_GPIO_CLE,4,2        ## @RB4XX_NAND_GPIO_CLE
	.comm	_NAND_CLE,4,2                   ## @NAND_CLE
	.comm	_RB4XX_NAND_GPIO_ALE,4,2        ## @RB4XX_NAND_GPIO_ALE
	.comm	_NAND_ALE,4,2                   ## @NAND_ALE
	.comm	_RB4XX_NAND_GPIO_NCE,4,2        ## @RB4XX_NAND_GPIO_NCE
	.comm	_NAND_NCE,4,2                   ## @NAND_NCE
	.comm	_NAND_CMD_NONE,4,2              ## @NAND_CMD_NONE
	.no_dead_strip	_rb4xx_nand_cmd_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rb4xx_nand_cmd_ctrl
_rb4xx_nand_cmd_ctrl:                   ; @rb4xx_nand_cmd_ctrl
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
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, _RB4XX_NAND_GPIO_CLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RB4XX_NAND_GPIO_CLE@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x8, _NAND_CLE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _NAND_CLE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w2
	cset	w1, ne
	bl	_gpio_set_value_cansleep
Lloh9:
	adrp	x8, _RB4XX_NAND_GPIO_ALE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _RB4XX_NAND_GPIO_ALE@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
Lloh12:
	adrp	x8, _NAND_ALE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _NAND_ALE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	tst	w8, w20
	cset	w1, ne
	bl	_gpio_set_value_cansleep
Lloh15:
	adrp	x8, _RB4XX_NAND_GPIO_NCE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _RB4XX_NAND_GPIO_NCE@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
Lloh18:
	adrp	x8, _NAND_NCE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _NAND_NCE@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	tst	w8, w20
	cset	w1, eq
	bl	_gpio_set_value_cansleep
LBB0_2:
Lloh21:
	adrp	x8, _NAND_CMD_NONE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _NAND_CMD_NONE@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	cmp	w8, w19
	b.ne	LBB0_4
; %bb.3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_4:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_rb4xx_nand_write_cmd
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_NAND_CTRL_CHANGE,4,2           ; @NAND_CTRL_CHANGE
	.comm	_RB4XX_NAND_GPIO_CLE,4,2        ; @RB4XX_NAND_GPIO_CLE
	.comm	_NAND_CLE,4,2                   ; @NAND_CLE
	.comm	_RB4XX_NAND_GPIO_ALE,4,2        ; @RB4XX_NAND_GPIO_ALE
	.comm	_NAND_ALE,4,2                   ; @NAND_ALE
	.comm	_RB4XX_NAND_GPIO_NCE,4,2        ; @RB4XX_NAND_GPIO_NCE
	.comm	_NAND_NCE,4,2                   ; @NAND_NCE
	.comm	_NAND_CMD_NONE,4,2              ; @NAND_CMD_NONE
	.no_dead_strip	_rb4xx_nand_cmd_ctrl
.subsections_via_symbols
