	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stm32h7_adc_prepare
_stm32h7_adc_prepare:                   ## @stm32h7_adc_prepare
	.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	%rdi, %r14
	callq	_stm32h7_adc_exit_pwr_down
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.1:
	movq	%r14, %rdi
	callq	_stm32h7_adc_selfcalib
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:
	movq	_STM32H7_ADC_DIFSEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r14), %edx
	movq	%r14, %rdi
	callq	_stm32_adc_writel
	movq	%r14, %rdi
	callq	_stm32h7_adc_enable
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.4:
	movq	%r14, %rdi
	testl	%r15d, %r15d
	je	LBB0_6
## %bb.5:
	callq	_stm32h7_adc_restore_selfcalib
	jmp	LBB0_7
LBB0_2:
	movl	%r15d, %ebx
	jmp	LBB0_10
LBB0_6:
	callq	_stm32h7_adc_read_selfcalib
LBB0_7:
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:
	movq	%r14, %rdi
	callq	_stm32h7_adc_disable
LBB0_10:
	movq	%r14, %rdi
	callq	_stm32h7_adc_enter_pwr_down
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_STM32H7_ADC_PCSEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r14), %edx
	movq	%r14, %rdi
	callq	_stm32_adc_writel
	xorl	%ebx, %ebx
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_STM32H7_ADC_DIFSEL,4,2         ## @STM32H7_ADC_DIFSEL
	.comm	_STM32H7_ADC_PCSEL,4,2          ## @STM32H7_ADC_PCSEL
	.no_dead_strip	_stm32h7_adc_prepare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stm32h7_adc_prepare
_stm32h7_adc_prepare:                   ; @stm32h7_adc_prepare
	.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, x0
	bl	_stm32h7_adc_exit_pwr_down
	mov	x20, x0
	cbnz	w0, LBB0_8
; %bb.1:
	mov	x0, x19
	bl	_stm32h7_adc_selfcalib
	mov	x21, x0
	tbnz	w0, #31, LBB0_6
; %bb.2:
Lloh0:
	adrp	x8, _STM32H7_ADC_DIFSEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STM32H7_ADC_DIFSEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	w2, [x19, #4]
	mov	x0, x19
	bl	_stm32_adc_writel
	mov	x0, x19
	bl	_stm32h7_adc_enable
	mov	x20, x0
	cbnz	w0, LBB0_7
; %bb.3:
	mov	x0, x19
	cbz	w21, LBB0_9
; %bb.4:
	bl	_stm32h7_adc_restore_selfcalib
	mov	x20, x0
	cbz	w0, LBB0_10
LBB0_5:
	mov	x0, x19
	bl	_stm32h7_adc_disable
	b	LBB0_7
LBB0_6:
	mov	x20, x21
LBB0_7:
	mov	x0, x19
	bl	_stm32h7_adc_enter_pwr_down
LBB0_8:
	mov	x0, x20
	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
LBB0_9:
	bl	_stm32h7_adc_read_selfcalib
	mov	x20, x0
	cbnz	w0, LBB0_5
LBB0_10:
Lloh3:
	adrp	x8, _STM32H7_ADC_PCSEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _STM32H7_ADC_PCSEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	ldr	w2, [x19]
	mov	x0, x19
	bl	_stm32_adc_writel
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_STM32H7_ADC_DIFSEL,4,2         ; @STM32H7_ADC_DIFSEL
	.comm	_STM32H7_ADC_PCSEL,4,2          ; @STM32H7_ADC_PCSEL
	.no_dead_strip	_stm32h7_adc_prepare
.subsections_via_symbols
