	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function octeon_i2c_start
_octeon_i2c_start:                      ## @octeon_i2c_start
	.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
	callq	_octeon_i2c_hlc_disable
	movq	_TWSI_CTL_ENAB@GOTPCREL(%rip), %rax
	movq	_TWSI_CTL_STA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_octeon_i2c_ctl_write
	movq	%rbx, %rdi
	callq	_octeon_i2c_wait
	testl	%eax, %eax
	jne	LBB0_3
## %bb.1:
	movq	%rbx, %rdi
	callq	_octeon_i2c_stat_read
	movq	_STAT_START@GOTPCREL(%rip), %rdx
	xorl	%ecx, %ecx
	cmpq	(%rdx), %rax
	je	LBB0_4
## %bb.2:
	movq	_STAT_REP_START@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	je	LBB0_4
LBB0_3:
	movq	%rbx, %rdi
	callq	_octeon_i2c_recovery
	movq	_EAGAIN@GOTPCREL(%rip), %rdx
	xorl	%ecx, %ecx
	subl	(%rdx), %ecx
	testl	%eax, %eax
	cmovnel	%eax, %ecx
LBB0_4:
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TWSI_CTL_ENAB,4,2              ## @TWSI_CTL_ENAB
	.comm	_TWSI_CTL_STA,4,2               ## @TWSI_CTL_STA
	.comm	_STAT_START,8,3                 ## @STAT_START
	.comm	_STAT_REP_START,8,3             ## @STAT_REP_START
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.no_dead_strip	_octeon_i2c_start
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function octeon_i2c_start
_octeon_i2c_start:                      ; @octeon_i2c_start
	.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
	mov	x19, x0
	bl	_octeon_i2c_hlc_disable
Lloh0:
	adrp	x8, _TWSI_CTL_ENAB@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TWSI_CTL_ENAB@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _TWSI_CTL_STA@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TWSI_CTL_STA@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	x0, x19
	bl	_octeon_i2c_ctl_write
	mov	x0, x19
	bl	_octeon_i2c_wait
	cbnz	w0, LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_octeon_i2c_stat_read
Lloh6:
	adrp	x8, _STAT_START@GOTPAGE
Lloh7:
	ldr	x8, [x8, _STAT_START@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
Lloh9:
	adrp	x9, _STAT_REP_START@GOTPAGE
Lloh10:
	ldr	x9, [x9, _STAT_REP_START@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x0, x8
	ccmp	x0, x9, #4, ne
	b.ne	LBB0_3
; %bb.2:
	mov	w0, #0
	b	LBB0_4
LBB0_3:
	mov	x0, x19
	bl	_octeon_i2c_recovery
Lloh12:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w0, #0
	csneg	w0, w0, w8, ne
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_TWSI_CTL_ENAB,4,2              ; @TWSI_CTL_ENAB
	.comm	_TWSI_CTL_STA,4,2               ; @TWSI_CTL_STA
	.comm	_STAT_START,8,3                 ; @STAT_START
	.comm	_STAT_REP_START,8,3             ; @STAT_REP_START
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.no_dead_strip	_octeon_i2c_start
.subsections_via_symbols
