	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function axxia_i2c_init
_axxia_i2c_init:                        ## @axxia_i2c_init
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movl	20(%rdi), %edi
	callq	_clk_get_rate
	cltd
	idivl	(%r13)
	movl	%eax, %ebx
	movl	20(%r13), %edi
	callq	_clk_get_rate
	cltq
	imulq	$1125899907, %rax, %rcx         ## imm = 0x431BDE83
	movq	%rcx, %rax
	shrq	$63, %rax
	sarq	$50, %rcx
	addl	%eax, %ecx
	movl	(%r13), %edx
	movl	16(%r13), %edi
	leaq	L_.str(%rip), %rsi
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
                                        ## kill: def $ecx killed $ecx killed $rcx
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, %r8d
	callq	_dev_dbg
	movq	_SOFT_RESET@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	addq	8(%r13), %rsi
	movl	$1, %edi
	callq	_writel
	movq	_jiffies@GOTPCREL(%rip), %r15
	movq	(%r15), %r14
	movl	$100, %edi
	callq	_msecs_to_jiffies
	movq	%rax, %rbx
	addq	%r14, %rbx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	addq	8(%r13), %rdi
	callq	_readl
	testb	$1, %al
	je	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r15), %rdi
	movq	%rbx, %rsi
	callq	_time_after
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movl	16(%r13), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_warn
LBB0_4:
	movq	_GLOBAL_CONTROL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r13), %rsi
	movl	$1, %edi
	callq	_writel
	cmpl	$100000, (%r13)                 ## imm = 0x186A0
	jg	LBB0_6
## %bb.5:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, %r12d
	shrl	$31, %r12d
	addl	%eax, %r12d
	sarl	%r12d
	movl	$250, %edi
	movl	%r12d, %r15d
	jmp	LBB0_7
LBB0_6:
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movslq	%ecx, %rax
	imulq	$1431655766, %rax, %r12         ## imm = 0x55555556
	movq	%r12, %rax
	shrq	$63, %rax
	shrq	$32, %r12
	addl	%eax, %r12d
	addl	%ecx, %ecx
	movslq	%ecx, %rax
	imulq	$1431655766, %rax, %r15         ## imm = 0x55555556
	movq	%r15, %rax
	shrq	$63, %rax
	shrq	$32, %r15
	addl	%eax, %r15d
	movl	$100, %edi
LBB0_7:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	%ebx, %esi
	callq	_ns_to_clk
	movl	%eax, %r14d
	movq	_SCL_HIGH_PERIOD@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r13), %rsi
	movl	%r12d, %edi
	callq	_writel
	movq	_SCL_LOW_PERIOD@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r13), %rsi
	movl	%r15d, %edi
	callq	_writel
	movq	_SDA_SETUP_TIME@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r13), %rsi
	movl	%r14d, %edi
	callq	_writel
	movl	$300, %edi                      ## imm = 0x12C
	movl	%ebx, %esi
	callq	_ns_to_clk
	movq	_SDA_HOLD_TIME@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	8(%r13), %rsi
	movl	%eax, %edi
	callq	_writel
	movl	$50, %edi
	movl	%ebx, %esi
	callq	_ns_to_clk
	movq	_SPIKE_FLTR_LEN@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	8(%r13), %rsi
	movl	%eax, %edi
	callq	_writel
	movq	_SCL_WAIT_TIMEOUT_NS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	callq	_ns_to_clk
	xorl	%edi, %edi
	cmpl	$32768, %eax                    ## imm = 0x8000
	jge	LBB0_9
## %bb.8:
	movl	%eax, %ecx
	jmp	LBB0_12
LBB0_9:
	xorl	%edi, %edi
	movl	%eax, %ecx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	%edi, %edx
	shrl	%ecx
	leal	1(%rdx), %edi
	cmpl	$13, %edx
	ja	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	cmpl	$65535, %eax                    ## imm = 0xFFFF
	movl	%ecx, %eax
	ja	LBB0_10
LBB0_12:
	cmpl	$32767, %ecx                    ## imm = 0x7FFF
	movl	$32767, %r14d                   ## imm = 0x7FFF
	cmovll	%ecx, %r14d
	movq	_TIMER_CLOCK_DIV@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r13), %rsi
	callq	_writel
	movq	_WT_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%r14d, %edi
	callq	_WT_VALUE
	orl	%eax, %ebx
	movq	_WAIT_TIMER_CONTROL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r13), %rsi
	movl	%ebx, %edi
	callq	_writel
	movq	%r13, %rdi
	movl	$-1, %esi
	callq	_i2c_int_disable
	movq	_INTERRUPT_ENABLE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	8(%r13), %rsi
	movl	$1, %edi
	callq	_writel
	xorl	%eax, %eax
	addq	$24, %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
	.asciz	"rate=%uHz per_clk=%uMHz -> ratio=1:%u\n"

	.comm	_SOFT_RESET,8,3                 ## @SOFT_RESET
	.comm	_jiffies,8,3                    ## @jiffies
L_.str.1:                               ## @.str.1
	.asciz	"Soft reset failed\n"

	.comm	_GLOBAL_CONTROL,8,3             ## @GLOBAL_CONTROL
	.comm	_SCL_HIGH_PERIOD,8,3            ## @SCL_HIGH_PERIOD
	.comm	_SCL_LOW_PERIOD,8,3             ## @SCL_LOW_PERIOD
	.comm	_SDA_SETUP_TIME,8,3             ## @SDA_SETUP_TIME
	.comm	_SDA_HOLD_TIME,8,3              ## @SDA_HOLD_TIME
	.comm	_SPIKE_FLTR_LEN,8,3             ## @SPIKE_FLTR_LEN
	.comm	_SCL_WAIT_TIMEOUT_NS,4,2        ## @SCL_WAIT_TIMEOUT_NS
	.comm	_TIMER_CLOCK_DIV,8,3            ## @TIMER_CLOCK_DIV
	.comm	_WT_EN,4,2                      ## @WT_EN
	.comm	_WAIT_TIMER_CONTROL,8,3         ## @WAIT_TIMER_CONTROL
	.comm	_INTERRUPT_ENABLE,8,3           ## @INTERRUPT_ENABLE
	.no_dead_strip	_axxia_i2c_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function axxia_i2c_init
_axxia_i2c_init:                        ; @axxia_i2c_init
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	w0, [x0, #20]
	bl	_clk_get_rate
	ldr	w9, [x19]
	ldr	w8, [x19, #20]
	sdiv	w21, w0, w9
	mov	x0, x8
	bl	_clk_get_rate
	mov	w8, #56963
	movk	w8, #17179, lsl #16
	smull	x8, w0, w8
	lsr	x9, x8, #63
	asr	x8, x8, #50
	add	w20, w8, w9
	ldr	w0, [x19, #16]
	ldr	w2, [x19]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x20
	mov	x4, x21
	bl	_dev_dbg
	ldr	x8, [x19, #8]
Lloh2:
	adrp	x23, _SOFT_RESET@GOTPAGE
Lloh3:
	ldr	x23, [x23, _SOFT_RESET@GOTPAGEOFF]
	ldr	x9, [x23]
	add	x1, x9, x8
	mov	w0, #1
	bl	_writel
Lloh4:
	adrp	x24, _jiffies@GOTPAGE
Lloh5:
	ldr	x24, [x24, _jiffies@GOTPAGEOFF]
	ldr	x22, [x24]
	mov	w0, #100
	bl	_msecs_to_jiffies
	add	x22, x0, x22
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x9, [x23]
	add	x0, x9, x8
	bl	_readl
	tbz	w0, #0, LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x0, [x24]
	mov	x1, x22
	bl	_time_after
	cbz	x0, LBB0_1
; %bb.3:
	ldr	w0, [x19, #16]
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_warn
LBB0_4:
	ldr	x8, [x19, #8]
Lloh8:
	adrp	x9, _GLOBAL_CONTROL@GOTPAGE
Lloh9:
	ldr	x9, [x9, _GLOBAL_CONTROL@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #1
	bl	_writel
	ldr	w8, [x19]
	mov	w9, #34464
	movk	w9, #1, lsl #16
	mov	w10, #21846
	movk	w10, #21845, lsl #16
	smull	x11, w21, w10
	lsr	x12, x11, #63
	lsr	x11, x11, #32
	add	w11, w11, w12
	lsl	w12, w21, #1
	smull	x10, w12, w10
	lsr	x12, x10, #63
	lsr	x10, x10, #32
	add	w10, w10, w12
	mov	w12, #100
	cmp	w21, #0
	cinc	w13, w21, lt
	asr	w13, w13, #1
	mov	w14, #250
	cmp	w8, w9
	csel	w0, w12, w14, gt
	csel	w21, w11, w13, gt
	csel	w22, w10, w13, gt
	mov	x1, x20
	bl	_ns_to_clk
	mov	x23, x0
	ldr	x8, [x19, #8]
Lloh11:
	adrp	x9, _SCL_HIGH_PERIOD@GOTPAGE
Lloh12:
	ldr	x9, [x9, _SCL_HIGH_PERIOD@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x21
	bl	_writel
	ldr	x8, [x19, #8]
Lloh14:
	adrp	x9, _SCL_LOW_PERIOD@GOTPAGE
Lloh15:
	ldr	x9, [x9, _SCL_LOW_PERIOD@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x22
	bl	_writel
	ldr	x8, [x19, #8]
Lloh17:
	adrp	x9, _SDA_SETUP_TIME@GOTPAGE
Lloh18:
	ldr	x9, [x9, _SDA_SETUP_TIME@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	x0, x23
	bl	_writel
	mov	w0, #300
	mov	x1, x20
	bl	_ns_to_clk
	ldr	x8, [x19, #8]
Lloh20:
	adrp	x9, _SDA_HOLD_TIME@GOTPAGE
Lloh21:
	ldr	x9, [x9, _SDA_HOLD_TIME@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	mov	w0, #50
	mov	x1, x20
	bl	_ns_to_clk
	ldr	x8, [x19, #8]
Lloh23:
	adrp	x9, _SPIKE_FLTR_LEN@GOTPAGE
Lloh24:
	ldr	x9, [x9, _SPIKE_FLTR_LEN@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
Lloh26:
	adrp	x8, _SCL_WAIT_TIMEOUT_NS@GOTPAGE
Lloh27:
	ldr	x8, [x8, _SCL_WAIT_TIMEOUT_NS@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_ns_to_clk
	cmp	w0, #8, lsl #12                 ; =32768
	b.ge	LBB0_6
; %bb.5:
	mov	w8, #0
	b	LBB0_9
LBB0_6:
	mov	w8, #0
	mov	x9, x0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x10, x8
	lsr	w0, w9, #1
	add	w8, w8, #1
	cmp	w10, #13
	b.hi	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	lsr	w10, w9, #16
	mov	x9, x0
	cbnz	w10, LBB0_7
LBB0_9:
	mov	w9, #32767
	cmp	w0, w9
	csel	w20, w0, w9, lt
	ldr	x9, [x19, #8]
Lloh29:
	adrp	x10, _TIMER_CLOCK_DIV@GOTPAGE
Lloh30:
	ldr	x10, [x10, _TIMER_CLOCK_DIV@GOTPAGEOFF]
Lloh31:
	ldr	x10, [x10]
	add	x1, x10, x9
	mov	x0, x8
	bl	_writel
Lloh32:
	adrp	x8, _WT_EN@GOTPAGE
Lloh33:
	ldr	x8, [x8, _WT_EN@GOTPAGEOFF]
Lloh34:
	ldr	w21, [x8]
	mov	x0, x20
	bl	_WT_VALUE
	orr	w0, w0, w21
	ldr	x8, [x19, #8]
Lloh35:
	adrp	x9, _WAIT_TIMER_CONTROL@GOTPAGE
Lloh36:
	ldr	x9, [x9, _WAIT_TIMER_CONTROL@GOTPAGEOFF]
Lloh37:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	mov	x0, x19
	mov	w1, #-1
	bl	_i2c_int_disable
	ldr	x8, [x19, #8]
Lloh38:
	adrp	x9, _INTERRUPT_ENABLE@GOTPAGE
Lloh39:
	ldr	x9, [x9, _INTERRUPT_ENABLE@GOTPAGEOFF]
Lloh40:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #1
	bl	_writel
	mov	w0, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rate=%uHz per_clk=%uMHz -> ratio=1:%u\n"

	.comm	_SOFT_RESET,8,3                 ; @SOFT_RESET
	.comm	_jiffies,8,3                    ; @jiffies
l_.str.1:                               ; @.str.1
	.asciz	"Soft reset failed\n"

	.comm	_GLOBAL_CONTROL,8,3             ; @GLOBAL_CONTROL
	.comm	_SCL_HIGH_PERIOD,8,3            ; @SCL_HIGH_PERIOD
	.comm	_SCL_LOW_PERIOD,8,3             ; @SCL_LOW_PERIOD
	.comm	_SDA_SETUP_TIME,8,3             ; @SDA_SETUP_TIME
	.comm	_SDA_HOLD_TIME,8,3              ; @SDA_HOLD_TIME
	.comm	_SPIKE_FLTR_LEN,8,3             ; @SPIKE_FLTR_LEN
	.comm	_SCL_WAIT_TIMEOUT_NS,4,2        ; @SCL_WAIT_TIMEOUT_NS
	.comm	_TIMER_CLOCK_DIV,8,3            ; @TIMER_CLOCK_DIV
	.comm	_WT_EN,4,2                      ; @WT_EN
	.comm	_WAIT_TIMER_CONTROL,8,3         ; @WAIT_TIMER_CONTROL
	.comm	_INTERRUPT_ENABLE,8,3           ; @INTERRUPT_ENABLE
	.no_dead_strip	_axxia_i2c_init
.subsections_via_symbols
