	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stm32_fmc2_ham_calculate
_stm32_fmc2_ham_calculate:              ## @stm32_fmc2_ham_calculate
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	(%rdi), %edi
	callq	_to_stm32_nfc
	movq	%rax, %rbx
	movq	_FMC2_SR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%rbx), %rdi
	movq	_FMC2_TIMEOUT_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	xorl	%edx, %edx
	movl	$10, %ecx
	callq	_readl_relaxed_poll_timeout
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	8(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_3
LBB0_2:
	movq	_FMC2_HECCR@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	(%rbx), %rdi
	callq	_readl_relaxed
	movl	%eax, %edi
	movq	%r14, %rsi
	callq	_stm32_fmc2_ham_set_ecc
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_stm32_fmc2_set_ecc
LBB0_3:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FMC2_SR,8,3                    ## @FMC2_SR
	.comm	_FMC2_SR_NWRF,4,2               ## @FMC2_SR_NWRF
	.comm	_FMC2_TIMEOUT_MS,4,2            ## @FMC2_TIMEOUT_MS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ham timeout\n"

	.comm	_FMC2_HECCR,8,3                 ## @FMC2_HECCR
	.no_dead_strip	_stm32_fmc2_ham_calculate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stm32_fmc2_ham_calculate
_stm32_fmc2_ham_calculate:              ; @stm32_fmc2_ham_calculate
	.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	x19, x2
	ldr	w0, [x0]
	bl	_to_stm32_nfc
	mov	x20, x0
Lloh0:
	adrp	x8, _FMC2_SR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FMC2_SR@GOTPAGEOFF]
	ldr	x9, [x0]
Lloh2:
	ldr	x8, [x8]
	add	x0, x8, x9
Lloh3:
	adrp	x8, _FMC2_TIMEOUT_MS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FMC2_TIMEOUT_MS@GOTPAGEOFF]
Lloh5:
	ldr	w4, [x8]
	mov	w2, #0
	mov	w3, #10
	bl	_readl_relaxed_poll_timeout
	mov	x21, x0
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w0, [x20, #8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_3
LBB0_2:
	ldr	x8, [x20]
Lloh8:
	adrp	x9, _FMC2_HECCR@GOTPAGE
Lloh9:
	ldr	x9, [x9, _FMC2_HECCR@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_readl_relaxed
	mov	x1, x19
	bl	_stm32_fmc2_ham_set_ecc
	mov	x0, x20
	mov	w1, #0
	bl	_stm32_fmc2_set_ecc
LBB0_3:
	mov	x0, x21
	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
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_FMC2_SR,8,3                    ; @FMC2_SR
	.comm	_FMC2_SR_NWRF,4,2               ; @FMC2_SR_NWRF
	.comm	_FMC2_TIMEOUT_MS,4,2            ; @FMC2_TIMEOUT_MS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ham timeout\n"

	.comm	_FMC2_HECCR,8,3                 ; @FMC2_HECCR
	.no_dead_strip	_stm32_fmc2_ham_calculate
.subsections_via_symbols
