	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mxc_nand_select_chip_v2
_mxc_nand_select_chip_v2:               ## @mxc_nand_select_chip_v2
	.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, %ebx
	callq	_nand_get_controller_data
	movq	%rax, %r14
	movl	(%rax), %eax
	cmpl	$-1, %ebx
	je	LBB0_1
## %bb.4:
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movl	8(%r14), %edi
	callq	_clk_prepare_enable
	movl	$1, (%r14)
LBB0_6:
	movl	%ebx, 4(%r14)
	shll	$4, %ebx
	movq	_NFC_V1_V2_BUF_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_writew                         ## TAILCALL
LBB0_1:
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	8(%r14), %edi
	callq	_clk_disable_unprepare
	movl	$0, (%r14)
LBB0_3:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NFC_V1_V2_BUF_ADDR,4,2         ## @NFC_V1_V2_BUF_ADDR
	.no_dead_strip	_mxc_nand_select_chip_v2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mxc_nand_select_chip_v2
_mxc_nand_select_chip_v2:               ; @mxc_nand_select_chip_v2
	.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	x20, x1
	bl	_nand_get_controller_data
	mov	x19, x0
	ldr	w8, [x0]
	cmn	w20, #1
	b.eq	LBB0_4
; %bb.1:
	cbnz	w8, LBB0_3
; %bb.2:
	ldr	w0, [x19, #8]
	bl	_clk_prepare_enable
	mov	w8, #1
	str	w8, [x19]
LBB0_3:
	str	w20, [x19, #4]
	lsl	w0, w20, #4
Lloh0:
	adrp	x8, _NFC_V1_V2_BUF_ADDR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NFC_V1_V2_BUF_ADDR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_writew
LBB0_4:
	cbz	w8, LBB0_6
; %bb.5:
	ldr	w0, [x19, #8]
	bl	_clk_disable_unprepare
	str	wzr, [x19]
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_NFC_V1_V2_BUF_ADDR,4,2         ; @NFC_V1_V2_BUF_ADDR
	.no_dead_strip	_mxc_nand_select_chip_v2
.subsections_via_symbols
