	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i2c_davinci_init
_i2c_davinci_init:                      ## @i2c_davinci_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	8(%rdi), %r15
	xorl	%esi, %esi
	callq	_davinci_i2c_reset_ctrl
	movq	%rbx, %rdi
	callq	_i2c_davinci_calc_clk_dividers
	movq	_DAVINCI_I2C_OAR_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DAVINCI_I2C_OWN_ADDRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_davinci_i2c_write_reg
	movl	(%rbx), %r14d
	movq	_DAVINCI_I2C_PSC_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_davinci_i2c_read_reg
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	(%rbx), %r14d
	movq	_DAVINCI_I2C_CLKL_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_davinci_i2c_read_reg
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	(%rbx), %r14d
	movq	_DAVINCI_I2C_CLKH_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_davinci_i2c_read_reg
	leaq	L_.str.2(%rip), %rsi
	movl	%r14d, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	(%rbx), %edi
	movl	(%r15), %ecx
	movl	4(%r15), %edx
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_davinci_i2c_reset_ctrl
	movq	_DAVINCI_I2C_IMR_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_I2C_DAVINCI_INTR_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_davinci_i2c_write_reg
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DAVINCI_I2C_OAR_REG,4,2        ## @DAVINCI_I2C_OAR_REG
	.comm	_DAVINCI_I2C_OWN_ADDRESS,4,2    ## @DAVINCI_I2C_OWN_ADDRESS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PSC  = %d\n"

	.comm	_DAVINCI_I2C_PSC_REG,4,2        ## @DAVINCI_I2C_PSC_REG
L_.str.1:                               ## @.str.1
	.asciz	"CLKL = %d\n"

	.comm	_DAVINCI_I2C_CLKL_REG,4,2       ## @DAVINCI_I2C_CLKL_REG
L_.str.2:                               ## @.str.2
	.asciz	"CLKH = %d\n"

	.comm	_DAVINCI_I2C_CLKH_REG,4,2       ## @DAVINCI_I2C_CLKH_REG
L_.str.3:                               ## @.str.3
	.asciz	"bus_freq = %dkHz, bus_delay = %d\n"

	.comm	_DAVINCI_I2C_IMR_REG,4,2        ## @DAVINCI_I2C_IMR_REG
	.comm	_I2C_DAVINCI_INTR_ALL,4,2       ## @I2C_DAVINCI_INTR_ALL
	.no_dead_strip	_i2c_davinci_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i2c_davinci_init
_i2c_davinci_init:                      ; @i2c_davinci_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	ldr	x21, [x0, #8]
	mov	w1, #0
	bl	_davinci_i2c_reset_ctrl
	mov	x0, x19
	bl	_i2c_davinci_calc_clk_dividers
Lloh0:
	adrp	x8, _DAVINCI_I2C_OAR_REG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DAVINCI_I2C_OAR_REG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _DAVINCI_I2C_OWN_ADDRESS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DAVINCI_I2C_OWN_ADDRESS@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_davinci_i2c_write_reg
	ldr	w20, [x19]
Lloh6:
	adrp	x8, _DAVINCI_I2C_PSC_REG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DAVINCI_I2C_PSC_REG@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_davinci_i2c_read_reg
	mov	x2, x0
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
	ldr	w20, [x19]
Lloh11:
	adrp	x8, _DAVINCI_I2C_CLKL_REG@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DAVINCI_I2C_CLKL_REG@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_davinci_i2c_read_reg
	mov	x2, x0
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
	ldr	w20, [x19]
Lloh16:
	adrp	x8, _DAVINCI_I2C_CLKH_REG@GOTPAGE
Lloh17:
	ldr	x8, [x8, _DAVINCI_I2C_CLKH_REG@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_davinci_i2c_read_reg
	mov	x2, x0
Lloh19:
	adrp	x1, l_.str.2@PAGE
Lloh20:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
	ldr	w0, [x19]
	ldp	w8, w2, [x21]
	str	x8, [sp]
Lloh21:
	adrp	x1, l_.str.3@PAGE
Lloh22:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_dbg
	mov	x0, x19
	mov	w1, #1
	bl	_davinci_i2c_reset_ctrl
Lloh23:
	adrp	x8, _DAVINCI_I2C_IMR_REG@GOTPAGE
Lloh24:
	ldr	x8, [x8, _DAVINCI_I2C_IMR_REG@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
Lloh26:
	adrp	x8, _I2C_DAVINCI_INTR_ALL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _I2C_DAVINCI_INTR_ALL@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_davinci_i2c_write_reg
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_DAVINCI_I2C_OAR_REG,4,2        ; @DAVINCI_I2C_OAR_REG
	.comm	_DAVINCI_I2C_OWN_ADDRESS,4,2    ; @DAVINCI_I2C_OWN_ADDRESS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PSC  = %d\n"

	.comm	_DAVINCI_I2C_PSC_REG,4,2        ; @DAVINCI_I2C_PSC_REG
l_.str.1:                               ; @.str.1
	.asciz	"CLKL = %d\n"

	.comm	_DAVINCI_I2C_CLKL_REG,4,2       ; @DAVINCI_I2C_CLKL_REG
l_.str.2:                               ; @.str.2
	.asciz	"CLKH = %d\n"

	.comm	_DAVINCI_I2C_CLKH_REG,4,2       ; @DAVINCI_I2C_CLKH_REG
l_.str.3:                               ; @.str.3
	.asciz	"bus_freq = %dkHz, bus_delay = %d\n"

	.comm	_DAVINCI_I2C_IMR_REG,4,2        ; @DAVINCI_I2C_IMR_REG
	.comm	_I2C_DAVINCI_INTR_ALL,4,2       ; @I2C_DAVINCI_INTR_ALL
	.no_dead_strip	_i2c_davinci_init
.subsections_via_symbols
