	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stm32_fmc2_setup
_stm32_fmc2_setup:                      ## @stm32_fmc2_setup
	.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
	movq	%rdi, %rbx
	movl	16(%rdi), %edi
	callq	_to_stm32_nfc
	movq	%rax, %r14
	movq	_FMC2_PCR@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	addq	(%rax), %rdi
	callq	_readl_relaxed
	movq	_FMC2_PCR_ECCALG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_FMC2_PCR_BCHECC@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	%ecx, %edx
	movl	%edx, %esi
	notl	%esi
	andl	%eax, %esi
	movq	8(%rbx), %rax
	movq	_FMC2_ECC_BCH8@GOTPCREL(%rip), %r8
	movq	_FMC2_ECC_BCH4@GOTPCREL(%rip), %r9
	xorl	%edi, %edi
	cmpq	(%r9), %rax
	cmovel	%ecx, %edi
	cmpq	(%r8), %rax
	cmovel	%edx, %edi
	orl	%esi, %edi
	movq	_FMC2_PCR_PWID_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	notl	%r12d
	andl	%edi, %r12d
	movq	_NAND_BUSWIDTH_16@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_2
## %bb.1:
	movq	_FMC2_PCR_PWID_BUSWIDTH_16@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_FMC2_PCR_PWID
	orl	%eax, %r12d
LBB0_2:
	movq	_FMC2_PCR_ECCSS_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	notl	%ebx
	andl	%r12d, %ebx
	movq	_FMC2_PCR_ECCSS_512@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_FMC2_PCR_ECCSS
	orl	%eax, %ebx
	movq	(%r15), %rsi
	addq	(%r14), %rsi
	movl	%ebx, %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writel_relaxed                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_FMC2_PCR,8,3                   ## @FMC2_PCR
	.comm	_FMC2_PCR_ECCALG,4,2            ## @FMC2_PCR_ECCALG
	.comm	_FMC2_PCR_BCHECC,4,2            ## @FMC2_PCR_BCHECC
	.comm	_FMC2_ECC_BCH8,8,3              ## @FMC2_ECC_BCH8
	.comm	_FMC2_ECC_BCH4,8,3              ## @FMC2_ECC_BCH4
	.comm	_FMC2_PCR_PWID_MASK,4,2         ## @FMC2_PCR_PWID_MASK
	.comm	_NAND_BUSWIDTH_16,4,2           ## @NAND_BUSWIDTH_16
	.comm	_FMC2_PCR_PWID_BUSWIDTH_16,4,2  ## @FMC2_PCR_PWID_BUSWIDTH_16
	.comm	_FMC2_PCR_ECCSS_MASK,4,2        ## @FMC2_PCR_ECCSS_MASK
	.comm	_FMC2_PCR_ECCSS_512,4,2         ## @FMC2_PCR_ECCSS_512
	.no_dead_strip	_stm32_fmc2_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stm32_fmc2_setup
_stm32_fmc2_setup:                      ; @stm32_fmc2_setup
	.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, x0
	ldr	w0, [x0, #16]
	bl	_to_stm32_nfc
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x21, _FMC2_PCR@GOTPAGE
Lloh1:
	ldr	x21, [x21, _FMC2_PCR@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_readl_relaxed
Lloh2:
	adrp	x8, _FMC2_PCR_ECCALG@GOTPAGE
Lloh3:
	ldr	x8, [x8, _FMC2_PCR_ECCALG@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _FMC2_PCR_BCHECC@GOTPAGE
Lloh6:
	ldr	x9, [x9, _FMC2_PCR_BCHECC@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w9, w9, w8
	bic	w10, w0, w9
	ldr	x11, [x20, #8]
Lloh8:
	adrp	x12, _FMC2_ECC_BCH8@GOTPAGE
Lloh9:
	ldr	x12, [x12, _FMC2_ECC_BCH8@GOTPAGEOFF]
Lloh10:
	ldr	x12, [x12]
Lloh11:
	adrp	x13, _FMC2_ECC_BCH4@GOTPAGE
Lloh12:
	ldr	x13, [x13, _FMC2_ECC_BCH4@GOTPAGEOFF]
Lloh13:
	ldr	x13, [x13]
	cmp	x11, x13
	csel	w8, w8, wzr, eq
	cmp	x11, x12
	csel	w8, w9, w8, eq
	orr	w8, w8, w10
Lloh14:
	adrp	x9, _FMC2_PCR_PWID_MASK@GOTPAGE
Lloh15:
	ldr	x9, [x9, _FMC2_PCR_PWID_MASK@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	bic	w22, w8, w9
	ldr	w8, [x20]
Lloh17:
	adrp	x9, _NAND_BUSWIDTH_16@GOTPAGE
Lloh18:
	ldr	x9, [x9, _NAND_BUSWIDTH_16@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
Lloh20:
	adrp	x8, _FMC2_PCR_PWID_BUSWIDTH_16@GOTPAGE
Lloh21:
	ldr	x8, [x8, _FMC2_PCR_PWID_BUSWIDTH_16@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	bl	_FMC2_PCR_PWID
	orr	w22, w0, w22
LBB0_2:
Lloh23:
	adrp	x8, _FMC2_PCR_ECCSS_MASK@GOTPAGE
Lloh24:
	ldr	x8, [x8, _FMC2_PCR_ECCSS_MASK@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	bic	w20, w22, w8
Lloh26:
	adrp	x8, _FMC2_PCR_ECCSS_512@GOTPAGE
Lloh27:
	ldr	x8, [x8, _FMC2_PCR_ECCSS_512@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	bl	_FMC2_PCR_ECCSS
	orr	w0, w0, w20
	ldr	x8, [x19]
	ldr	x9, [x21]
	add	x1, x9, x8
	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	_writel_relaxed
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_FMC2_PCR,8,3                   ; @FMC2_PCR
	.comm	_FMC2_PCR_ECCALG,4,2            ; @FMC2_PCR_ECCALG
	.comm	_FMC2_PCR_BCHECC,4,2            ; @FMC2_PCR_BCHECC
	.comm	_FMC2_ECC_BCH8,8,3              ; @FMC2_ECC_BCH8
	.comm	_FMC2_ECC_BCH4,8,3              ; @FMC2_ECC_BCH4
	.comm	_FMC2_PCR_PWID_MASK,4,2         ; @FMC2_PCR_PWID_MASK
	.comm	_NAND_BUSWIDTH_16,4,2           ; @NAND_BUSWIDTH_16
	.comm	_FMC2_PCR_PWID_BUSWIDTH_16,4,2  ; @FMC2_PCR_PWID_BUSWIDTH_16
	.comm	_FMC2_PCR_ECCSS_MASK,4,2        ; @FMC2_PCR_ECCSS_MASK
	.comm	_FMC2_PCR_ECCSS_512,4,2         ; @FMC2_PCR_ECCSS_512
	.no_dead_strip	_stm32_fmc2_setup
.subsections_via_symbols
