	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function brcmstb_i2c_set_bus_speed
_brcmstb_i2c_set_bus_speed:             ## @brcmstb_i2c_set_bus_speed
	.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, %r14
	movq	_bsc_clk@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	movl	%eax, %r12d
	testl	%eax, %eax
	jle	LBB0_1
## %bb.2:
	movq	(%r14), %rcx
	movq	(%r15), %rax
	movl	%r12d, %edx
	addq	$12, %rax
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rcx, -12(%rax)
	je	LBB0_4
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	addq	$16, %rax
	cmpq	%rbx, %rdx
	jne	LBB0_3
	jmp	LBB0_8
LBB0_1:
	xorl	%ebx, %ebx
	cmpl	%r12d, %ebx
	je	LBB0_8
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_BSC_CTL_REG_SCL_SEL_MASK@GOTPCREL(%rip), %rcx
	movq	_BSC_CTL_REG_DIV_CLK_MASK@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	orl	(%rcx), %esi
	notl	%esi
	movq	16(%r14), %rcx
	andl	(%rcx), %esi
	orl	-4(%rax), %esi
	orl	(%rax), %esi
	movl	%esi, (%rcx)
	movq	_ctl_reg@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_bsc_writel
	cmpl	%r12d, %ebx
	jne	LBB0_6
LBB0_8:
	movq	_ctl_reg@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_bsc_readl
	movq	_BSC_CTL_REG_SCL_SEL_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_BSC_CTL_REG_SCL_SEL_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	sarl	%cl, %eax
	movl	8(%r14), %edi
	movq	(%r15), %rcx
	cltq
	shlq	$4, %rax
	movq	(%rcx,%rax), %rdx
	leaq	L_.str(%rip), %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dev_warn                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_bsc_clk,8,3                    ## @bsc_clk
	.comm	_BSC_CTL_REG_SCL_SEL_MASK,4,2   ## @BSC_CTL_REG_SCL_SEL_MASK
	.comm	_BSC_CTL_REG_DIV_CLK_MASK,4,2   ## @BSC_CTL_REG_DIV_CLK_MASK
	.comm	_ctl_reg,4,2                    ## @ctl_reg
	.comm	_BSC_CTL_REG_SCL_SEL_SHIFT,4,2  ## @BSC_CTL_REG_SCL_SEL_SHIFT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"leaving current clock-frequency @ %dHz\n"

	.no_dead_strip	_brcmstb_i2c_set_bus_speed
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function brcmstb_i2c_set_bus_speed
_brcmstb_i2c_set_bus_speed:             ; @brcmstb_i2c_set_bus_speed
	.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
Lloh0:
	adrp	x21, _bsc_clk@GOTPAGE
Lloh1:
	ldr	x21, [x21, _bsc_clk@GOTPAGEOFF]
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	mov	x20, x0
	cmp	w0, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x22, #0
	ldr	x9, [x19]
	ldr	x8, [x21]
	mov	w10, w20
	add	x8, x8, #8
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldur	x11, [x8, #-8]
	cmp	x11, x9
	b.eq	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x22, x22, #1
	add	x8, x8, #16
	cmp	x10, x22
	b.ne	LBB0_2
	b	LBB0_7
LBB0_4:
	mov	w22, #0
	cmp	w22, w20
	b.eq	LBB0_7
LBB0_5:
	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_6:
Lloh2:
	adrp	x9, _BSC_CTL_REG_SCL_SEL_MASK@GOTPAGE
Lloh3:
	ldr	x9, [x9, _BSC_CTL_REG_SCL_SEL_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
Lloh5:
	adrp	x10, _BSC_CTL_REG_DIV_CLK_MASK@GOTPAGE
Lloh6:
	ldr	x10, [x10, _BSC_CTL_REG_DIV_CLK_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	orr	w9, w10, w9
	ldr	x10, [x19, #16]
	ldr	w11, [x10]
	bic	w9, w11, w9
	ldp	w11, w8, [x8]
	orr	w9, w11, w9
	orr	w1, w9, w8
	str	w1, [x10]
Lloh8:
	adrp	x8, _ctl_reg@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ctl_reg@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_bsc_writel
	cmp	w22, w20
	b.ne	LBB0_5
LBB0_7:
Lloh11:
	adrp	x8, _ctl_reg@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ctl_reg@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_bsc_readl
Lloh14:
	adrp	x8, _BSC_CTL_REG_SCL_SEL_MASK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _BSC_CTL_REG_SCL_SEL_MASK@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	and	w8, w8, w0
Lloh17:
	adrp	x9, _BSC_CTL_REG_SCL_SEL_SHIFT@GOTPAGE
Lloh18:
	ldr	x9, [x9, _BSC_CTL_REG_SCL_SEL_SHIFT@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	asr	w8, w8, w9
	ldr	x9, [x21]
	sbfiz	x8, x8, #4, #32
	ldr	x2, [x9, x8]
	ldr	w0, [x19, #8]
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	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	_dev_warn
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_bsc_clk,8,3                    ; @bsc_clk
	.comm	_BSC_CTL_REG_SCL_SEL_MASK,4,2   ; @BSC_CTL_REG_SCL_SEL_MASK
	.comm	_BSC_CTL_REG_DIV_CLK_MASK,4,2   ; @BSC_CTL_REG_DIV_CLK_MASK
	.comm	_ctl_reg,4,2                    ; @ctl_reg
	.comm	_BSC_CTL_REG_SCL_SEL_SHIFT,4,2  ; @BSC_CTL_REG_SCL_SEL_SHIFT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"leaving current clock-frequency @ %dHz\n"

	.no_dead_strip	_brcmstb_i2c_set_bus_speed
.subsections_via_symbols
