	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mpc5121_nfc_select_chip
_mpc5121_nfc_select_chip:               ## @mpc5121_nfc_select_chip
	.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	%esi, %ebx
	callq	_nand_to_mtd
	movq	%rax, %r14
	testl	%ebx, %ebx
	js	LBB0_1
## %bb.2:
	movq	_NFC_BUF_ADDR@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_NFC_ACTIVE_CS_MASK@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	%r14, %rdi
	callq	_nfc_clear
	movq	_NFC_ACTIVE_CS_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %ebx
	movl	(%r15), %esi
	andl	(%r12), %ebx
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_nfc_set
	movq	_NFC_CONFIG1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_NFC_CE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nfc_set                        ## TAILCALL
LBB0_1:
	movq	_NFC_CONFIG1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_NFC_CE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nfc_clear                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_NFC_CONFIG1,4,2                ## @NFC_CONFIG1
	.comm	_NFC_CE,4,2                     ## @NFC_CE
	.comm	_NFC_BUF_ADDR,4,2               ## @NFC_BUF_ADDR
	.comm	_NFC_ACTIVE_CS_MASK,4,2         ## @NFC_ACTIVE_CS_MASK
	.comm	_NFC_ACTIVE_CS_SHIFT,4,2        ## @NFC_ACTIVE_CS_SHIFT
	.no_dead_strip	_mpc5121_nfc_select_chip
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mpc5121_nfc_select_chip
_mpc5121_nfc_select_chip:               ; @mpc5121_nfc_select_chip
	.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	x20, x1
	bl	_nand_to_mtd
	mov	x19, x0
	tbnz	w20, #31, LBB0_2
; %bb.1:
Lloh0:
	adrp	x21, _NFC_BUF_ADDR@GOTPAGE
Lloh1:
	ldr	x21, [x21, _NFC_BUF_ADDR@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh2:
	adrp	x22, _NFC_ACTIVE_CS_MASK@GOTPAGE
Lloh3:
	ldr	x22, [x22, _NFC_ACTIVE_CS_MASK@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x0, x19
	bl	_nfc_clear
	ldr	w1, [x21]
Lloh4:
	adrp	x8, _NFC_ACTIVE_CS_SHIFT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _NFC_ACTIVE_CS_SHIFT@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	lsl	w8, w20, w8
	ldr	w9, [x22]
	and	w2, w8, w9
	mov	x0, x19
	bl	_nfc_set
Lloh7:
	adrp	x8, _NFC_CONFIG1@GOTPAGE
Lloh8:
	ldr	x8, [x8, _NFC_CONFIG1@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
Lloh10:
	adrp	x8, _NFC_CE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _NFC_CE@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	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	_nfc_set
LBB0_2:
Lloh13:
	adrp	x8, _NFC_CONFIG1@GOTPAGE
Lloh14:
	ldr	x8, [x8, _NFC_CONFIG1@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x8, _NFC_CE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _NFC_CE@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	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	_nfc_clear
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_NFC_CONFIG1,4,2                ; @NFC_CONFIG1
	.comm	_NFC_CE,4,2                     ; @NFC_CE
	.comm	_NFC_BUF_ADDR,4,2               ; @NFC_BUF_ADDR
	.comm	_NFC_ACTIVE_CS_MASK,4,2         ; @NFC_ACTIVE_CS_MASK
	.comm	_NFC_ACTIVE_CS_SHIFT,4,2        ; @NFC_ACTIVE_CS_SHIFT
	.no_dead_strip	_mpc5121_nfc_select_chip
.subsections_via_symbols
