	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcm_kona_i2c_assign_bus_speed
_bcm_kona_i2c_assign_bus_speed:         ## @bcm_kona_i2c_assign_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	16(%rdi), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	leaq	-12(%rbp), %rdx
	callq	_of_property_read_u32
	testl	%eax, %eax
	js	LBB0_5
## %bb.1:
	movl	-12(%rbp), %esi
	cmpl	$999999, %esi                   ## imm = 0xF423F
	jg	LBB0_6
## %bb.2:
	cmpl	$100000, %esi                   ## imm = 0x186A0
	je	LBB0_11
## %bb.3:
	cmpl	$400000, %esi                   ## imm = 0x61A80
	jne	LBB0_9
## %bb.4:
	movq	_std_cfg_table@GOTPCREL(%rip), %rax
	movq	_BCM_SPD_400K@GOTPCREL(%rip), %rcx
	jmp	LBB0_13
LBB0_5:
	movq	16(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_6:
	cmpl	$1000000, %esi                  ## imm = 0xF4240
	je	LBB0_12
## %bb.7:
	cmpl	$3400000, %esi                  ## imm = 0x33E140
	jne	LBB0_9
## %bb.8:
	movq	_std_cfg_table@GOTPCREL(%rip), %rax
	movq	_BCM_SPD_100K@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	shlq	$2, %rcx
	addq	(%rax), %rcx
	movq	%rcx, 8(%rbx)
	movq	_hs_cfg_table@GOTPCREL(%rip), %rax
	movq	_BCM_SPD_3P4MHZ@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	shlq	$2, %rcx
	addq	(%rax), %rcx
	movq	%rcx, (%rbx)
	jmp	LBB0_14
LBB0_9:
	leaq	L_.str.2(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_pr_err
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_10:
	subl	(%rax), %ebx
	jmp	LBB0_15
LBB0_11:
	movq	_std_cfg_table@GOTPCREL(%rip), %rax
	movq	_BCM_SPD_100K@GOTPCREL(%rip), %rcx
	jmp	LBB0_13
LBB0_12:
	movq	_std_cfg_table@GOTPCREL(%rip), %rax
	movq	_BCM_SPD_1MHZ@GOTPCREL(%rip), %rcx
LBB0_13:
	movq	(%rcx), %rcx
	shlq	$2, %rcx
	addq	(%rax), %rcx
	movq	%rcx, 8(%rbx)
LBB0_14:
	xorl	%ebx, %ebx
LBB0_15:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"clock-frequency"

L_.str.1:                               ## @.str.1
	.asciz	"missing clock-frequency property\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_std_cfg_table,8,3              ## @std_cfg_table
	.comm	_BCM_SPD_100K,8,3               ## @BCM_SPD_100K
	.comm	_BCM_SPD_400K,8,3               ## @BCM_SPD_400K
	.comm	_BCM_SPD_1MHZ,8,3               ## @BCM_SPD_1MHZ
	.comm	_hs_cfg_table,8,3               ## @hs_cfg_table
	.comm	_BCM_SPD_3P4MHZ,8,3             ## @BCM_SPD_3P4MHZ
L_.str.2:                               ## @.str.2
	.asciz	"%d hz bus speed not supported\n"

L_.str.3:                               ## @.str.3
	.asciz	"Valid speeds are 100khz, 400khz, 1mhz, and 3.4mhz\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_bcm_kona_i2c_assign_bus_speed
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bcm_kona_i2c_assign_bus_speed
_bcm_kona_i2c_assign_bus_speed:         ; @bcm_kona_i2c_assign_bus_speed
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	ldr	x8, [x0, #16]
	ldr	w0, [x8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #12
	bl	_of_property_read_u32
	tbnz	w0, #31, LBB0_5
; %bb.1:
	ldr	w8, [sp, #12]
	mov	w9, #16959
	movk	w9, #15, lsl #16
	cmp	w8, w9
	b.gt	LBB0_6
; %bb.2:
	mov	w9, #34464
	movk	w9, #1, lsl #16
	cmp	w8, w9
	b.eq	LBB0_11
; %bb.3:
	mov	w9, #6784
	movk	w9, #6, lsl #16
	cmp	w8, w9
	b.ne	LBB0_9
; %bb.4:
	mov	w0, #0
Lloh2:
	adrp	x8, _std_cfg_table@GOTPAGE
Lloh3:
	ldr	x8, [x8, _std_cfg_table@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
Lloh5:
	adrp	x9, _BCM_SPD_400K@GOTPAGE
Lloh6:
	ldr	x9, [x9, _BCM_SPD_400K@GOTPAGEOFF]
	b	LBB0_13
LBB0_5:
	ldr	x0, [x19, #16]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh9:
	adrp	x8, _ENODEV@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_10
LBB0_6:
	mov	w9, #16960
	movk	w9, #15, lsl #16
	cmp	w8, w9
	b.eq	LBB0_12
; %bb.7:
	mov	w9, #57664
	movk	w9, #51, lsl #16
	cmp	w8, w9
	b.ne	LBB0_9
; %bb.8:
	mov	w0, #0
Lloh11:
	adrp	x8, _std_cfg_table@GOTPAGE
Lloh12:
	ldr	x8, [x8, _std_cfg_table@GOTPAGEOFF]
Lloh13:
	adrp	x9, _BCM_SPD_100K@GOTPAGE
Lloh14:
	ldr	x9, [x9, _BCM_SPD_100K@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
Lloh16:
	ldr	x9, [x9]
	add	x8, x8, x9, lsl #2
Lloh17:
	adrp	x9, _hs_cfg_table@GOTPAGE
Lloh18:
	ldr	x9, [x9, _hs_cfg_table@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
Lloh20:
	adrp	x10, _BCM_SPD_3P4MHZ@GOTPAGE
Lloh21:
	ldr	x10, [x10, _BCM_SPD_3P4MHZ@GOTPAGEOFF]
Lloh22:
	ldr	x10, [x10]
	add	x9, x9, x10, lsl #2
	stp	x9, x8, [x19]
	b	LBB0_14
LBB0_9:
	str	x8, [sp]
Lloh23:
	adrp	x0, l_.str.2@PAGE
Lloh24:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_err
Lloh25:
	adrp	x0, l_.str.3@PAGE
Lloh26:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_pr_err
Lloh27:
	adrp	x8, _EINVAL@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_14
LBB0_11:
	mov	w0, #0
Lloh29:
	adrp	x8, _std_cfg_table@GOTPAGE
Lloh30:
	ldr	x8, [x8, _std_cfg_table@GOTPAGEOFF]
Lloh31:
	ldr	x8, [x8]
Lloh32:
	adrp	x9, _BCM_SPD_100K@GOTPAGE
Lloh33:
	ldr	x9, [x9, _BCM_SPD_100K@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:
	mov	w0, #0
Lloh34:
	adrp	x8, _std_cfg_table@GOTPAGE
Lloh35:
	ldr	x8, [x8, _std_cfg_table@GOTPAGEOFF]
Lloh36:
	ldr	x8, [x8]
Lloh37:
	adrp	x9, _BCM_SPD_1MHZ@GOTPAGE
Lloh38:
	ldr	x9, [x9, _BCM_SPD_1MHZ@GOTPAGEOFF]
LBB0_13:
	ldr	x9, [x9]
	add	x8, x8, x9, lsl #2
	str	x8, [x19, #8]
LBB0_14:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh15
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"clock-frequency"

l_.str.1:                               ; @.str.1
	.asciz	"missing clock-frequency property\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_std_cfg_table,8,3              ; @std_cfg_table
	.comm	_BCM_SPD_100K,8,3               ; @BCM_SPD_100K
	.comm	_BCM_SPD_400K,8,3               ; @BCM_SPD_400K
	.comm	_BCM_SPD_1MHZ,8,3               ; @BCM_SPD_1MHZ
	.comm	_hs_cfg_table,8,3               ; @hs_cfg_table
	.comm	_BCM_SPD_3P4MHZ,8,3             ; @BCM_SPD_3P4MHZ
l_.str.2:                               ; @.str.2
	.asciz	"%d hz bus speed not supported\n"

l_.str.3:                               ; @.str.3
	.asciz	"Valid speeds are 100khz, 400khz, 1mhz, and 3.4mhz\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_bcm_kona_i2c_assign_bus_speed
.subsections_via_symbols
