	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cns3xxx_i2c_adapter_init
_cns3xxx_i2c_adapter_init:              ## @cns3xxx_i2c_adapter_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movl	(%rdi), %edi
	leaq	L_.str(%rip), %rsi
	callq	_devm_clk_get
	movq	%rax, %rbx
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_2:
	movq	_I2C_CONTROLLER_REG@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	%rbx, %rdi
	callq	_clk_get_rate
	movq	_CNS3xxx_I2C_CLK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%ecx, %ecx
	cltd
	idivl	%ecx
	shll	$8, %eax
	addl	$261888, %eax                   ## imm = 0x3FF00
	andl	$261888, %eax                   ## imm = 0x3FF00
	orl	$255, %eax
	movq	_I2C_TIME_OUT_REG@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_I2C_TWI_OUT_DLY_REG@GOTPCREL(%rip), %rax
	orb	$3, (%rax)
	xorl	%eax, %eax
	callq	_CNS3xxx_I2C_ENABLE_INTR
	movq	_I2C_ACTION_DONE_FLAG@GOTPCREL(%rip), %rax
	movq	_I2C_BUS_ERROR_FLAG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_I2C_INTERRUPT_STATUS_REG@GOTPCREL(%rip), %rax
	orl	%ecx, (%rax)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_CNS3xxx_I2C_ENABLE             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cpu"

	.comm	_I2C_CONTROLLER_REG,8,3         ## @I2C_CONTROLLER_REG
	.comm	_CNS3xxx_I2C_CLK,4,2            ## @CNS3xxx_I2C_CLK
	.comm	_I2C_TIME_OUT_REG,4,2           ## @I2C_TIME_OUT_REG
	.comm	_I2C_TWI_OUT_DLY_REG,4,2        ## @I2C_TWI_OUT_DLY_REG
	.comm	_I2C_ACTION_DONE_FLAG,4,2       ## @I2C_ACTION_DONE_FLAG
	.comm	_I2C_BUS_ERROR_FLAG,4,2         ## @I2C_BUS_ERROR_FLAG
	.comm	_I2C_INTERRUPT_STATUS_REG,4,2   ## @I2C_INTERRUPT_STATUS_REG
	.no_dead_strip	_cns3xxx_i2c_adapter_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cns3xxx_i2c_adapter_init
_cns3xxx_i2c_adapter_init:              ; @cns3xxx_i2c_adapter_init
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	w0, [x0]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_devm_clk_get
	mov	x19, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_WARN_ON
	cbz	x0, LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_2:
Lloh2:
	adrp	x8, _I2C_CONTROLLER_REG@GOTPAGE
Lloh3:
	ldr	x8, [x8, _I2C_CONTROLLER_REG@GOTPAGEOFF]
Lloh4:
	str	xzr, [x8]
	mov	x0, x19
	bl	_clk_get_rate
Lloh5:
	adrp	x8, _CNS3xxx_I2C_CLK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CNS3xxx_I2C_CLK@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	lsl	w8, w8, #1
	sdiv	w8, w0, w8
	mov	w9, #261888
	add	w8, w9, w8, lsl #8
	and	w8, w8, #0x3ff00
	orr	w8, w8, #0xff
Lloh8:
	adrp	x9, _I2C_TIME_OUT_REG@GOTPAGE
Lloh9:
	ldr	x9, [x9, _I2C_TIME_OUT_REG@GOTPAGEOFF]
Lloh10:
	str	w8, [x9]
Lloh11:
	adrp	x8, _I2C_TWI_OUT_DLY_REG@GOTPAGE
Lloh12:
	ldr	x8, [x8, _I2C_TWI_OUT_DLY_REG@GOTPAGEOFF]
	ldr	w9, [x8]
	orr	w9, w9, #0x3
	str	w9, [x8]
	bl	_CNS3xxx_I2C_ENABLE_INTR
Lloh13:
	adrp	x8, _I2C_ACTION_DONE_FLAG@GOTPAGE
Lloh14:
	ldr	x8, [x8, _I2C_ACTION_DONE_FLAG@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _I2C_BUS_ERROR_FLAG@GOTPAGE
Lloh17:
	ldr	x9, [x9, _I2C_BUS_ERROR_FLAG@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh19:
	adrp	x9, _I2C_INTERRUPT_STATUS_REG@GOTPAGE
Lloh20:
	ldr	x9, [x9, _I2C_INTERRUPT_STATUS_REG@GOTPAGEOFF]
	ldr	w10, [x9]
	orr	w8, w8, w10
	str	w8, [x9]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_CNS3xxx_I2C_ENABLE
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotStr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotStr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cpu"

	.comm	_I2C_CONTROLLER_REG,8,3         ; @I2C_CONTROLLER_REG
	.comm	_CNS3xxx_I2C_CLK,4,2            ; @CNS3xxx_I2C_CLK
	.comm	_I2C_TIME_OUT_REG,4,2           ; @I2C_TIME_OUT_REG
	.comm	_I2C_TWI_OUT_DLY_REG,4,2        ; @I2C_TWI_OUT_DLY_REG
	.comm	_I2C_ACTION_DONE_FLAG,4,2       ; @I2C_ACTION_DONE_FLAG
	.comm	_I2C_BUS_ERROR_FLAG,4,2         ; @I2C_BUS_ERROR_FLAG
	.comm	_I2C_INTERRUPT_STATUS_REG,4,2   ; @I2C_INTERRUPT_STATUS_REG
	.no_dead_strip	_cns3xxx_i2c_adapter_init
.subsections_via_symbols
