	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stm32f4_i2c_set_periph_clk_freq
_stm32f4_i2c_set_periph_clk_freq:       ## @stm32f4_i2c_set_periph_clk_freq
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movl	24(%rdi), %edi
	callq	_clk_get_rate
	movl	%eax, 20(%rbx)
	movq	_HZ_TO_MHZ@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_DIV_ROUND_UP
	movq	(%rbx), %rcx
	movq	_STM32_I2C_SPEED_STANDARD@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_5
## %bb.1:
	movq	_STM32F4_I2C_MIN_STANDARD_FREQ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_3
## %bb.2:
	movq	_STM32F4_I2C_MAX_FREQ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_8
LBB0_3:
	movl	16(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_4
LBB0_5:
	movq	_STM32F4_I2C_MIN_FAST_FREQ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_7
## %bb.6:
	movq	_STM32F4_I2C_MAX_FREQ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jg	LBB0_7
LBB0_8:
	movq	%rax, %rdi
	callq	_STM32F4_I2C_CR2_FREQ
	movq	_STM32F4_I2C_CR2@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	8(%rbx), %rsi
	movq	%rax, %rdi
	callq	_writel_relaxed
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_7:
	movl	16(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
LBB0_4:
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HZ_TO_MHZ,4,2                  ## @HZ_TO_MHZ
	.comm	_STM32_I2C_SPEED_STANDARD,8,3   ## @STM32_I2C_SPEED_STANDARD
	.comm	_STM32F4_I2C_MIN_STANDARD_FREQ,8,3 ## @STM32F4_I2C_MIN_STANDARD_FREQ
	.comm	_STM32F4_I2C_MAX_FREQ,8,3       ## @STM32F4_I2C_MAX_FREQ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bad parent clk freq for standard mode\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_STM32F4_I2C_MIN_FAST_FREQ,8,3  ## @STM32F4_I2C_MIN_FAST_FREQ
L_.str.1:                               ## @.str.1
	.asciz	"bad parent clk freq for fast mode\n"

	.comm	_STM32F4_I2C_CR2,8,3            ## @STM32F4_I2C_CR2
	.no_dead_strip	_stm32f4_i2c_set_periph_clk_freq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stm32f4_i2c_set_periph_clk_freq
_stm32f4_i2c_set_periph_clk_freq:       ; @stm32f4_i2c_set_periph_clk_freq
	.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	x19, x0
	ldr	w0, [x0, #24]
	bl	_clk_get_rate
	str	w0, [x19, #20]
Lloh0:
	adrp	x8, _HZ_TO_MHZ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HZ_TO_MHZ@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_DIV_ROUND_UP
	ldr	x8, [x19]
Lloh3:
	adrp	x9, _STM32_I2C_SPEED_STANDARD@GOTPAGE
Lloh4:
	ldr	x9, [x9, _STM32_I2C_SPEED_STANDARD@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
Lloh6:
	adrp	x8, _STM32F4_I2C_MIN_STANDARD_FREQ@GOTPAGE
Lloh7:
	ldr	x8, [x8, _STM32F4_I2C_MIN_STANDARD_FREQ@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
Lloh9:
	adrp	x9, _STM32F4_I2C_MAX_FREQ@GOTPAGE
Lloh10:
	ldr	x9, [x9, _STM32F4_I2C_MAX_FREQ@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x0, x8
	ccmp	x0, x9, #0, ge
	b.le	LBB0_6
; %bb.2:
	ldr	w0, [x19, #16]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_5
LBB0_3:
Lloh14:
	adrp	x8, _STM32F4_I2C_MIN_FAST_FREQ@GOTPAGE
Lloh15:
	ldr	x8, [x8, _STM32F4_I2C_MIN_FAST_FREQ@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
Lloh17:
	adrp	x9, _STM32F4_I2C_MAX_FREQ@GOTPAGE
Lloh18:
	ldr	x9, [x9, _STM32F4_I2C_MAX_FREQ@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x0, x8
	ccmp	x0, x9, #0, ge
	b.le	LBB0_6
; %bb.4:
	ldr	w0, [x19, #16]
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_5:
	bl	_dev_err
Lloh22:
	adrp	x8, _EINVAL@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_7
LBB0_6:
	bl	_STM32F4_I2C_CR2_FREQ
	ldr	x8, [x19, #8]
Lloh25:
	adrp	x9, _STM32F4_I2C_CR2@GOTPAGE
Lloh26:
	ldr	x9, [x9, _STM32F4_I2C_CR2@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel_relaxed
	mov	w0, #0
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_HZ_TO_MHZ,4,2                  ; @HZ_TO_MHZ
	.comm	_STM32_I2C_SPEED_STANDARD,8,3   ; @STM32_I2C_SPEED_STANDARD
	.comm	_STM32F4_I2C_MIN_STANDARD_FREQ,8,3 ; @STM32F4_I2C_MIN_STANDARD_FREQ
	.comm	_STM32F4_I2C_MAX_FREQ,8,3       ; @STM32F4_I2C_MAX_FREQ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bad parent clk freq for standard mode\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_STM32F4_I2C_MIN_FAST_FREQ,8,3  ; @STM32F4_I2C_MIN_FAST_FREQ
l_.str.1:                               ; @.str.1
	.asciz	"bad parent clk freq for fast mode\n"

	.comm	_STM32F4_I2C_CR2,8,3            ; @STM32F4_I2C_CR2
	.no_dead_strip	_stm32f4_i2c_set_periph_clk_freq
.subsections_via_symbols
