	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i2c_dw_set_timings_master
_i2c_dw_set_timings_master:             ## @i2c_dw_set_timings_master
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_i2c_dw_acquire_lock
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_19
## %bb.1:
	movq	_DW_IC_COMP_PARAM_1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_dw_readl
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r15, %rdi
	callq	_i2c_dw_release_lock
	movq	96(%r15), %r13
	testq	%r13, %r13
	movl	$300, %eax                      ## imm = 0x12C
	cmovel	%eax, %r13d
	movq	(%r15), %rdx
	movq	88(%r15), %r12
	testq	%r12, %r12
	cmovel	%eax, %r12d
	testq	%rdx, %rdx
	je	LBB0_3
## %bb.2:
	movq	8(%r15), %rcx
	testq	%rcx, %rcx
	jne	LBB0_4
LBB0_3:
	movq	%r15, %rdi
	callq	_i2c_dw_clk_rate
	movl	%eax, %ebx
	movl	%eax, %edi
	movl	$4000, %esi                     ## imm = 0xFA0
	movl	%r13d, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_i2c_dw_scl_hcnt
	movq	%rax, (%r15)
	movl	%ebx, %edi
	movl	$4700, %esi                     ## imm = 0x125C
	movl	%r12d, %edx
	xorl	%ecx, %ecx
	callq	_i2c_dw_scl_lcnt
	movq	%rax, %rcx
	movq	%rax, 8(%r15)
	movq	(%r15), %rdx
LBB0_4:
	movl	40(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	leaq	L_.str(%rip), %r14
	cmpl	$1000000, 80(%r15)              ## imm = 0xF4240
	jne	LBB0_8
## %bb.5:
	movq	72(%r15), %rax
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movq	64(%r15), %rcx
	testq	%rcx, %rcx
	je	LBB0_8
## %bb.7:
	movq	%rax, 56(%r15)
	movq	%rcx, 48(%r15)
	leaq	L_.str.2(%rip), %r14
LBB0_8:
	movq	56(%r15), %rcx
	testq	%rcx, %rcx
	je	LBB0_10
## %bb.9:
	movq	48(%r15), %r8
	testq	%r8, %r8
	jne	LBB0_11
LBB0_10:
	movq	%r15, %rdi
	callq	_i2c_dw_clk_rate
	movl	%eax, %ebx
	movl	%eax, %edi
	movl	$600, %esi                      ## imm = 0x258
	movl	%r13d, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_i2c_dw_scl_hcnt
	movq	%rax, 56(%r15)
	movl	%ebx, %edi
	movl	$1300, %esi                     ## imm = 0x514
	movl	%r12d, %edx
	xorl	%ecx, %ecx
	callq	_i2c_dw_scl_lcnt
	movq	%rax, %r8
	movq	%rax, 48(%r15)
	movq	56(%r15), %rcx
LBB0_11:
	movl	40(%r15), %edi
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_DW_IC_CON_SPEED_MASK@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	andl	16(%r15), %eax
	cmpl	$129, %eax
	jne	LBB0_17
## %bb.12:
	movq	_DW_IC_COMP_PARAM_1_SPEED_MODE_MASK@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	andl	(%rax), %ecx
	movq	_DW_IC_COMP_PARAM_1_SPEED_MODE_HIGH@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_13
## %bb.14:
	movq	24(%r15), %rdx
	testq	%rdx, %rdx
	je	LBB0_17
## %bb.15:
	movq	32(%r15), %rcx
	testq	%rcx, %rcx
	je	LBB0_17
## %bb.16:
	movl	40(%r15), %edi
	leaq	L_.str.5(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	jmp	LBB0_17
LBB0_13:
	movl	40(%r15), %edi
	leaq	L_.str.4(%rip), %rsi
	callq	_dev_err
	movl	(%r12), %eax
	notl	%eax
	andl	16(%r15), %eax
	movq	_DW_IC_CON_SPEED_FAST@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, 16(%r15)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 24(%r15)
LBB0_17:
	movq	%r15, %rdi
	callq	_i2c_dw_set_sda_hold
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_19
## %bb.18:
	movl	(%r12), %eax
	andl	16(%r15), %eax
	cmpl	$129, %eax
	leaq	L_.str.7(%rip), %rcx
	leaq	L_.str.8(%rip), %rsi
	cmoveq	%rcx, %rsi
	cmpl	$128, %eax
	leaq	L_.str.6(%rip), %rdx
	cmovneq	%rsi, %rdx
	movl	40(%r15), %edi
	leaq	L_.str.9(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rcx
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_19:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.space	1

	.comm	_DW_IC_COMP_PARAM_1,4,2         ## @DW_IC_COMP_PARAM_1
L_.str.1:                               ## @.str.1
	.asciz	"Standard Mode HCNT:LCNT = %d:%d\n"

L_.str.2:                               ## @.str.2
	.asciz	" Plus"

L_.str.3:                               ## @.str.3
	.asciz	"Fast Mode%s HCNT:LCNT = %d:%d\n"

	.comm	_DW_IC_CON_SPEED_MASK,4,2       ## @DW_IC_CON_SPEED_MASK
	.comm	_DW_IC_COMP_PARAM_1_SPEED_MODE_MASK,4,2 ## @DW_IC_COMP_PARAM_1_SPEED_MODE_MASK
	.comm	_DW_IC_COMP_PARAM_1_SPEED_MODE_HIGH,4,2 ## @DW_IC_COMP_PARAM_1_SPEED_MODE_HIGH
L_.str.4:                               ## @.str.4
	.asciz	"High Speed not supported!\n"

	.comm	_DW_IC_CON_SPEED_FAST,4,2       ## @DW_IC_CON_SPEED_FAST
L_.str.5:                               ## @.str.5
	.asciz	"High Speed Mode HCNT:LCNT = %d:%d\n"

L_.str.6:                               ## @.str.6
	.asciz	"Standard Mode"

L_.str.7:                               ## @.str.7
	.asciz	"High Speed Mode"

L_.str.8:                               ## @.str.8
	.asciz	"Fast Mode"

L_.str.9:                               ## @.str.9
	.asciz	"Bus speed: %s%s\n"

	.no_dead_strip	_i2c_dw_set_timings_master
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i2c_dw_set_timings_master
_i2c_dw_set_timings_master:             ; @i2c_dw_set_timings_master
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x0
	bl	_i2c_dw_acquire_lock
	cbnz	w0, LBB0_19
; %bb.1:
Lloh0:
	adrp	x8, _DW_IC_COMP_PARAM_1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DW_IC_COMP_PARAM_1@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dw_readl
	mov	x20, x0
	mov	x0, x19
	bl	_i2c_dw_release_lock
	ldp	x9, x8, [x19, #88]
	cmp	x8, #0
	mov	w10, #300
	csel	w23, w10, w8, eq
	cmp	x9, #0
	csel	w22, w10, w9, eq
	ldr	x2, [x19]
	cbz	x2, LBB0_3
; %bb.2:
	ldr	x3, [x19, #8]
	cbnz	x3, LBB0_4
LBB0_3:
	mov	x0, x19
	bl	_i2c_dw_clk_rate
	mov	x21, x0
	mov	w1, #4000
	mov	x2, x23
	mov	w3, #0
	mov	w4, #0
	bl	_i2c_dw_scl_hcnt
	str	x0, [x19]
	mov	x0, x21
	mov	w1, #4700
	mov	x2, x22
	mov	w3, #0
	bl	_i2c_dw_scl_lcnt
	mov	x3, x0
	str	x0, [x19, #8]
	ldr	x2, [x19]
LBB0_4:
	ldr	w0, [x19, #40]
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
	ldr	w8, [x19, #80]
	sub	w8, w8, #244, lsl #12           ; =999424
	cmp	w8, #576
	b.ne	LBB0_8
; %bb.5:
	ldr	x8, [x19, #72]
	cbz	x8, LBB0_8
; %bb.6:
	ldr	x9, [x19, #64]
	cbz	x9, LBB0_8
; %bb.7:
	stp	x9, x8, [x19, #48]
Lloh5:
	adrp	x21, l_.str.2@PAGE
Lloh6:
	add	x21, x21, l_.str.2@PAGEOFF
	ldr	x3, [x19, #56]
	cbnz	x3, LBB0_9
	b	LBB0_10
LBB0_8:
Lloh7:
	adrp	x21, l_.str@PAGE
Lloh8:
	add	x21, x21, l_.str@PAGEOFF
	ldr	x3, [x19, #56]
	cbz	x3, LBB0_10
LBB0_9:
	ldr	x0, [x19, #48]
	cbnz	x0, LBB0_11
LBB0_10:
	mov	x0, x19
	bl	_i2c_dw_clk_rate
	mov	x24, x0
	mov	w1, #600
	mov	x2, x23
	mov	w3, #0
	mov	w4, #0
	bl	_i2c_dw_scl_hcnt
	str	x0, [x19, #56]
	mov	x0, x24
	mov	w1, #1300
	mov	x2, x22
	mov	w3, #0
	bl	_i2c_dw_scl_lcnt
	str	x0, [x19, #48]
	ldr	x3, [x19, #56]
LBB0_11:
	ldr	w8, [x19, #40]
	str	x0, [sp]
Lloh9:
	adrp	x1, l_.str.3@PAGE
Lloh10:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x8
	mov	x2, x21
	bl	_dev_dbg
	ldr	w8, [x19, #16]
Lloh11:
	adrp	x22, _DW_IC_CON_SPEED_MASK@GOTPAGE
Lloh12:
	ldr	x22, [x22, _DW_IC_CON_SPEED_MASK@GOTPAGEOFF]
	ldr	w9, [x22]
	and	w8, w9, w8
	cmp	w8, #129
	b.ne	LBB0_17
; %bb.12:
Lloh13:
	adrp	x8, _DW_IC_COMP_PARAM_1_SPEED_MODE_MASK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _DW_IC_COMP_PARAM_1_SPEED_MODE_MASK@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	and	w8, w8, w20
Lloh16:
	adrp	x9, _DW_IC_COMP_PARAM_1_SPEED_MODE_HIGH@GOTPAGE
Lloh17:
	ldr	x9, [x9, _DW_IC_COMP_PARAM_1_SPEED_MODE_HIGH@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_16
; %bb.13:
	ldr	x2, [x19, #24]
	cbz	x2, LBB0_17
; %bb.14:
	ldr	x3, [x19, #32]
	cbz	x3, LBB0_17
; %bb.15:
	ldr	w0, [x19, #40]
Lloh19:
	adrp	x1, l_.str.5@PAGE
Lloh20:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_dev_dbg
	b	LBB0_17
LBB0_16:
	ldr	w0, [x19, #40]
Lloh21:
	adrp	x1, l_.str.4@PAGE
Lloh22:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_err
	ldr	w8, [x22]
	ldr	w9, [x19, #16]
Lloh23:
	adrp	x10, _DW_IC_CON_SPEED_FAST@GOTPAGE
Lloh24:
	ldr	x10, [x10, _DW_IC_CON_SPEED_FAST@GOTPAGEOFF]
	bic	w8, w9, w8
Lloh25:
	ldr	w9, [x10]
	orr	w8, w9, w8
	str	w8, [x19, #16]
	stp	xzr, xzr, [x19, #24]
LBB0_17:
	mov	x0, x19
	bl	_i2c_dw_set_sda_hold
	cbnz	w0, LBB0_19
; %bb.18:
	ldr	w8, [x19, #16]
	ldr	w9, [x22]
	and	w8, w9, w8
Lloh26:
	adrp	x9, l_.str.8@PAGE
Lloh27:
	add	x9, x9, l_.str.8@PAGEOFF
Lloh28:
	adrp	x10, l_.str.7@PAGE
Lloh29:
	add	x10, x10, l_.str.7@PAGEOFF
	cmp	w8, #129
	csel	x9, x10, x9, eq
Lloh30:
	adrp	x10, l_.str.6@PAGE
Lloh31:
	add	x10, x10, l_.str.6@PAGEOFF
	cmp	w8, #128
	csel	x2, x10, x9, eq
	ldr	w0, [x19, #40]
Lloh32:
	adrp	x1, l_.str.9@PAGE
Lloh33:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	x3, x21
	bl	_dev_dbg
	mov	w0, #0
LBB0_19:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.space	1

	.comm	_DW_IC_COMP_PARAM_1,4,2         ; @DW_IC_COMP_PARAM_1
l_.str.1:                               ; @.str.1
	.asciz	"Standard Mode HCNT:LCNT = %d:%d\n"

l_.str.2:                               ; @.str.2
	.asciz	" Plus"

l_.str.3:                               ; @.str.3
	.asciz	"Fast Mode%s HCNT:LCNT = %d:%d\n"

	.comm	_DW_IC_CON_SPEED_MASK,4,2       ; @DW_IC_CON_SPEED_MASK
	.comm	_DW_IC_COMP_PARAM_1_SPEED_MODE_MASK,4,2 ; @DW_IC_COMP_PARAM_1_SPEED_MODE_MASK
	.comm	_DW_IC_COMP_PARAM_1_SPEED_MODE_HIGH,4,2 ; @DW_IC_COMP_PARAM_1_SPEED_MODE_HIGH
l_.str.4:                               ; @.str.4
	.asciz	"High Speed not supported!\n"

	.comm	_DW_IC_CON_SPEED_FAST,4,2       ; @DW_IC_CON_SPEED_FAST
l_.str.5:                               ; @.str.5
	.asciz	"High Speed Mode HCNT:LCNT = %d:%d\n"

l_.str.6:                               ; @.str.6
	.asciz	"Standard Mode"

l_.str.7:                               ; @.str.7
	.asciz	"High Speed Mode"

l_.str.8:                               ; @.str.8
	.asciz	"Fast Mode"

l_.str.9:                               ; @.str.9
	.asciz	"Bus speed: %s%s\n"

	.no_dead_strip	_i2c_dw_set_timings_master
.subsections_via_symbols
