	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcm47xxnflash_ops_bcm4706_cmd_ctrl
_bcm47xxnflash_ops_bcm4706_cmd_ctrl:    ## @bcm47xxnflash_ops_bcm4706_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	%esi, %ebx
	callq	_nand_get_controller_data
	movq	_NAND_CMD_NONE@GOTPCREL(%rip), %rcx
	cmpl	%ebx, (%rcx)
	jne	LBB0_1
## %bb.4:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_1:
	movq	_NAND_CTRL_CLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	andl	%ebx, %edx
	movq	_NCTL_CMD0@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ebx, %ecx
	testl	%edx, %edx
	cmovel	%edx, %ecx
	movq	_NAND_CMD_RESET@GOTPCREL(%rip), %rdx
	xorl	%esi, %esi
	cmpl	%ebx, (%rdx)
	je	LBB0_3
## %bb.2:
	movq	_NCTL_CSA@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
LBB0_3:
	orl	%ecx, %esi
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_bcm47xxnflash_ops_bcm4706_ctl_cmd ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_NAND_CMD_NONE,4,2              ## @NAND_CMD_NONE
	.comm	_NAND_CTRL_CLE,4,2              ## @NAND_CTRL_CLE
	.comm	_NCTL_CMD0,4,2                  ## @NCTL_CMD0
	.comm	_NAND_CMD_RESET,4,2             ## @NAND_CMD_RESET
	.comm	_NCTL_CSA,4,2                   ## @NCTL_CSA
	.no_dead_strip	_bcm47xxnflash_ops_bcm4706_cmd_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcm47xxnflash_ops_bcm4706_cmd_ctrl
_bcm47xxnflash_ops_bcm4706_cmd_ctrl:    ; @bcm47xxnflash_ops_bcm4706_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
	bl	_nand_get_controller_data
Lloh0:
	adrp	x8, _NAND_CMD_NONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NAND_CMD_NONE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w19
	b.ne	LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_2:
Lloh3:
	adrp	x8, _NAND_CTRL_CLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NAND_CTRL_CLE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _NCTL_CMD0@GOTPAGE
Lloh7:
	ldr	x9, [x9, _NCTL_CMD0@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w9, w9, w19
	tst	w8, w19
	csel	w8, wzr, w9, eq
Lloh9:
	adrp	x9, _NAND_CMD_RESET@GOTPAGE
Lloh10:
	ldr	x9, [x9, _NAND_CMD_RESET@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
Lloh12:
	adrp	x10, _NCTL_CSA@GOTPAGE
Lloh13:
	ldr	x10, [x10, _NCTL_CSA@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	cmp	w9, w19
	csel	w9, wzr, w10, eq
	orr	w1, w9, w8
	ldr	w0, [x0]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_bcm47xxnflash_ops_bcm4706_ctl_cmd
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_NAND_CMD_NONE,4,2              ; @NAND_CMD_NONE
	.comm	_NAND_CTRL_CLE,4,2              ; @NAND_CTRL_CLE
	.comm	_NCTL_CMD0,4,2                  ; @NCTL_CMD0
	.comm	_NAND_CMD_RESET,4,2             ; @NAND_CMD_RESET
	.comm	_NCTL_CSA,4,2                   ; @NCTL_CSA
	.no_dead_strip	_bcm47xxnflash_ops_bcm4706_cmd_ctrl
.subsections_via_symbols
