	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function clk_bcm2835_i2c_set_rate
_clk_bcm2835_i2c_set_rate:              ## @clk_bcm2835_i2c_set_rate
	.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, %r15
	movq	%rsi, %rbx
	callq	_to_clk_bcm2835_i2c
	movq	%rax, %r14
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_clk_bcm2835_i2c_calc_divider
	movl	%eax, %ebx
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%ebx, %eax
	je	LBB0_2
## %bb.1:
	movl	(%r14), %edi
	movq	_BCM2835_I2C_DIV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edx
	callq	_bcm2835_i2c_writel
	leal	15(%rbx), %edi
	testl	%ebx, %ebx
	cmovnsl	%ebx, %edi
	leal	3(%rbx), %r15d
	cmovnsl	%ebx, %r15d
	sarl	$4, %edi
	movl	$1, %esi
	callq	_max
	movl	%eax, %ebx
	sarl	$2, %r15d
	movl	%r15d, %edi
	movl	$1, %esi
	callq	_max
	movl	(%r14), %edi
	movq	_BCM2835_I2C_FEDL_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %ebx
	movq	_BCM2835_I2C_DEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_BCM2835_I2C_REDL_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	orl	%eax, %ebx
	movl	%ebx, %edx
	callq	_bcm2835_i2c_writel
	xorl	%ebx, %ebx
LBB0_2:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_BCM2835_I2C_DIV,4,2            ## @BCM2835_I2C_DIV
	.comm	_BCM2835_I2C_DEL,4,2            ## @BCM2835_I2C_DEL
	.comm	_BCM2835_I2C_FEDL_SHIFT,4,2     ## @BCM2835_I2C_FEDL_SHIFT
	.comm	_BCM2835_I2C_REDL_SHIFT,4,2     ## @BCM2835_I2C_REDL_SHIFT
	.no_dead_strip	_clk_bcm2835_i2c_set_rate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function clk_bcm2835_i2c_set_rate
_clk_bcm2835_i2c_set_rate:              ; @clk_bcm2835_i2c_set_rate
	.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, x2
	mov	x21, x1
	bl	_to_clk_bcm2835_i2c
	mov	x19, x0
	mov	x0, x21
	mov	x1, x20
	bl	_clk_bcm2835_i2c_calc_divider
	mov	x20, x0
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmn	w0, w8
	b.eq	LBB0_2
; %bb.1:
	ldr	w0, [x19]
Lloh3:
	adrp	x8, _BCM2835_I2C_DIV@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BCM2835_I2C_DIV@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x2, x20
	bl	_bcm2835_i2c_writel
	add	w8, w20, #15
	cmp	w20, #0
	csel	w8, w8, w20, lt
	asr	w0, w8, #4
	add	w8, w20, #3
	csel	w21, w8, w20, lt
	mov	w1, #1
	bl	_max
	mov	x20, x0
	asr	w0, w21, #2
	mov	w1, #1
	bl	_max
	ldr	w8, [x19]
Lloh6:
	adrp	x9, _BCM2835_I2C_DEL@GOTPAGE
Lloh7:
	ldr	x9, [x9, _BCM2835_I2C_DEL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x9]
Lloh9:
	adrp	x9, _BCM2835_I2C_FEDL_SHIFT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _BCM2835_I2C_FEDL_SHIFT@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	lsl	w9, w20, w9
Lloh12:
	adrp	x10, _BCM2835_I2C_REDL_SHIFT@GOTPAGE
Lloh13:
	ldr	x10, [x10, _BCM2835_I2C_REDL_SHIFT@GOTPAGEOFF]
Lloh14:
	ldr	w10, [x10]
	lsl	w10, w0, w10
	orr	w2, w10, w9
	mov	x0, x8
	bl	_bcm2835_i2c_writel
	mov	w20, #0
LBB0_2:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_BCM2835_I2C_DIV,4,2            ; @BCM2835_I2C_DIV
	.comm	_BCM2835_I2C_DEL,4,2            ; @BCM2835_I2C_DEL
	.comm	_BCM2835_I2C_FEDL_SHIFT,4,2     ; @BCM2835_I2C_FEDL_SHIFT
	.comm	_BCM2835_I2C_REDL_SHIFT,4,2     ; @BCM2835_I2C_REDL_SHIFT
	.no_dead_strip	_clk_bcm2835_i2c_set_rate
.subsections_via_symbols
