	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function octeon_i2c_hlc_comp_read
_octeon_i2c_hlc_comp_read:              ## @octeon_i2c_hlc_comp_read
	.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	%rsi, %r13
	movq	%rdi, %r12
	callq	_octeon_i2c_hlc_enable
	movq	_SW_TWSI_V@GOTPCREL(%rip), %rax
	movq	_SW_TWSI_R@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_SW_TWSI_SOVR@GOTPCREL(%rip), %rax
	movl	24(%r13), %esi
	decl	%esi
	movq	_SW_TWSI_SIZE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %esi
	orl	(%rax), %edx
	orl	%edx, %esi
	movl	(%r13), %edx
	movl	4(%r13), %eax
	andl	$127, %eax
	movq	_SW_TWSI_ADDR_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	orl	%esi, %eax
	movq	_I2C_M_TEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 8(%r13)
	jne	LBB0_1
## %bb.2:
	movq	_SW_TWSI_OP_7_IA@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_1:
	movq	_SW_TWSI_OP_10_IA@GOTPCREL(%rip), %rcx
LBB0_3:
	orl	(%rcx), %eax
	cmpl	$2, %edx
	jne	LBB0_5
## %bb.4:
	movq	_SW_TWSI_EIA@GOTPCREL(%rip), %rdx
	movq	16(%r13), %rsi
	movq	_SW_TWSI_IA_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	(%rsi), %r15d
	shll	%cl, %r15d
	movl	4(%rsi), %r14d
	shll	%cl, %r14d
	orl	(%rdx), %eax
	orl	%eax, %r14d
	movq	%r13, %rbx
	movq	(%r12), %r13
	movq	%r12, %rdi
	callq	_SW_TWSI_EXT
	addq	%rax, %r13
	movl	%r15d, %edi
	movq	%r13, %rsi
	movq	%rbx, %r13
	callq	_octeon_i2c_writeq_flush
	jmp	LBB0_6
LBB0_5:
	movq	16(%r13), %rcx
	movl	(%rcx), %r14d
	movq	_SW_TWSI_IA_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %r14d
	orl	%eax, %r14d
LBB0_6:
	movq	%r12, %rdi
	callq	_octeon_i2c_hlc_int_clear
	movq	(%r12), %rbx
	movq	%r12, %rdi
	callq	_SW_TWSI
	addq	%rax, %rbx
	movl	%r14d, %edi
	movq	%rbx, %rsi
	callq	_octeon_i2c_writeq_flush
	movq	%r12, %rdi
	callq	_octeon_i2c_hlc_wait
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_7
LBB0_22:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	(%r12), %rbx
	movq	%r12, %rdi
	callq	_SW_TWSI
	addq	%rax, %rbx
	movq	%rbx, %rdi
	callq	___raw_readq
	movq	_SW_TWSI_R@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_23
## %bb.8:
	movl	24(%r13), %ebx
	xorl	%r15d, %r15d
	testl	%ebx, %ebx
	jle	LBB0_22
## %bb.9:
	movq	40(%r13), %rdx
	movzbl	%al, %ecx
	movl	%ecx, -4(%rdx,%rbx,4)
	movl	24(%r13), %ecx
	cmpl	$2, %ecx
	jl	LBB0_10
## %bb.11:
	movzbl	%ah, %ecx
	movl	%ecx, -8(%rdx,%rbx,4)
	movl	24(%r13), %ecx
	cmpl	$3, %ecx
	jl	LBB0_12
## %bb.13:
	movl	%eax, %ecx
	shrl	$16, %ecx
	movzbl	%cl, %ecx
	movl	%ecx, -12(%rdx,%rbx,4)
	movl	24(%r13), %ecx
	cmpl	$4, %ecx
	jl	LBB0_14
## %bb.15:
	shrl	$24, %eax
	movl	%eax, -16(%rdx,%rbx,4)
	movl	24(%r13), %ecx
	addq	$-5, %rbx
	cmpl	$5, %ecx
	jl	LBB0_22
	jmp	LBB0_17
LBB0_23:
	movq	%r12, %rdi
	xorl	%esi, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_octeon_i2c_check_status        ## TAILCALL
LBB0_10:
	addq	$-2, %rbx
	cmpl	$5, %ecx
	jl	LBB0_22
	jmp	LBB0_17
LBB0_12:
	addq	$-3, %rbx
	cmpl	$5, %ecx
	jl	LBB0_22
	jmp	LBB0_17
LBB0_14:
	addq	$-4, %rbx
	cmpl	$5, %ecx
	jl	LBB0_22
LBB0_17:
	movq	(%r12), %r14
	movq	%r12, %rdi
	callq	_SW_TWSI_EXT
	addq	%rax, %r14
	movq	%r14, %rdi
	callq	___raw_readq
	cmpl	$5, 24(%r13)
	jl	LBB0_22
## %bb.18:
	movq	40(%r13), %rcx
	movslq	%ebx, %rdx
	movzbl	%al, %esi
	movl	%esi, (%rcx,%rdx,4)
	cmpl	$6, 24(%r13)
	jl	LBB0_22
## %bb.19:
	movzbl	%ah, %esi
	movl	%esi, -4(%rcx,%rdx,4)
	cmpl	$7, 24(%r13)
	jl	LBB0_22
## %bb.20:
	movl	%eax, %esi
	shrl	$16, %esi
	movzbl	%sil, %esi
	movl	%esi, -8(%rcx,%rdx,4)
	cmpl	$8, 24(%r13)
	jl	LBB0_22
## %bb.21:
	shrl	$24, %eax
	movl	%eax, -12(%rcx,%rdx,4)
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.comm	_SW_TWSI_V,4,2                  ## @SW_TWSI_V
	.comm	_SW_TWSI_R,4,2                  ## @SW_TWSI_R
	.comm	_SW_TWSI_SOVR,4,2               ## @SW_TWSI_SOVR
	.comm	_SW_TWSI_SIZE_SHIFT,4,2         ## @SW_TWSI_SIZE_SHIFT
	.comm	_SW_TWSI_ADDR_SHIFT,4,2         ## @SW_TWSI_ADDR_SHIFT
	.comm	_I2C_M_TEN,4,2                  ## @I2C_M_TEN
	.comm	_SW_TWSI_OP_10_IA,4,2           ## @SW_TWSI_OP_10_IA
	.comm	_SW_TWSI_OP_7_IA,4,2            ## @SW_TWSI_OP_7_IA
	.comm	_SW_TWSI_EIA,4,2                ## @SW_TWSI_EIA
	.comm	_SW_TWSI_IA_SHIFT,4,2           ## @SW_TWSI_IA_SHIFT
	.no_dead_strip	_octeon_i2c_hlc_comp_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function octeon_i2c_hlc_comp_read
_octeon_i2c_hlc_comp_read:              ; @octeon_i2c_hlc_comp_read
	.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, x1
	mov	x20, x0
	bl	_octeon_i2c_hlc_enable
Lloh0:
	adrp	x8, _SW_TWSI_V@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SW_TWSI_V@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x23, _SW_TWSI_R@GOTPAGE
Lloh4:
	ldr	x23, [x23, _SW_TWSI_R@GOTPAGEOFF]
	ldr	w9, [x23]
	orr	w8, w9, w8
Lloh5:
	adrp	x9, _SW_TWSI_SOVR@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SW_TWSI_SOVR@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w8, w9
	ldr	w9, [x19, #24]
	sub	w9, w9, #1
Lloh8:
	adrp	x10, _SW_TWSI_SIZE_SHIFT@GOTPAGE
Lloh9:
	ldr	x10, [x10, _SW_TWSI_SIZE_SHIFT@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w8, w8, w9
	ldp	w10, w9, [x19]
	and	w9, w9, #0x7f
Lloh11:
	adrp	x11, _SW_TWSI_ADDR_SHIFT@GOTPAGE
Lloh12:
	ldr	x11, [x11, _SW_TWSI_ADDR_SHIFT@GOTPAGEOFF]
Lloh13:
	ldr	w11, [x11]
	lsl	w9, w9, w11
	orr	w8, w8, w9
	ldr	w9, [x19, #8]
Lloh14:
	adrp	x11, _I2C_M_TEN@GOTPAGE
Lloh15:
	ldr	x11, [x11, _I2C_M_TEN@GOTPAGEOFF]
Lloh16:
	ldr	w11, [x11]
Lloh17:
	adrp	x12, _SW_TWSI_OP_7_IA@GOTPAGE
Lloh18:
	ldr	x12, [x12, _SW_TWSI_OP_7_IA@GOTPAGEOFF]
	tst	w11, w9
Lloh19:
	adrp	x9, _SW_TWSI_OP_10_IA@GOTPAGE
Lloh20:
	ldr	x9, [x9, _SW_TWSI_OP_10_IA@GOTPAGEOFF]
	csel	x9, x12, x9, eq
	ldr	w9, [x9]
	orr	w8, w8, w9
	cmp	w10, #2
	b.ne	LBB0_2
; %bb.1:
Lloh21:
	adrp	x9, _SW_TWSI_EIA@GOTPAGE
Lloh22:
	ldr	x9, [x9, _SW_TWSI_EIA@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	x9, [x19, #16]
Lloh24:
	adrp	x10, _SW_TWSI_IA_SHIFT@GOTPAGE
Lloh25:
	ldr	x10, [x10, _SW_TWSI_IA_SHIFT@GOTPAGEOFF]
Lloh26:
	ldr	w10, [x10]
	ldp	w11, w9, [x9]
	lsl	w22, w11, w10
	lsl	w9, w9, w10
	orr	w21, w8, w9
	ldr	x24, [x20]
	mov	x0, x20
	bl	_SW_TWSI_EXT
	add	x1, x0, x24
	mov	x0, x22
	bl	_octeon_i2c_writeq_flush
	b	LBB0_3
LBB0_2:
	ldr	x9, [x19, #16]
	ldr	w9, [x9]
Lloh27:
	adrp	x10, _SW_TWSI_IA_SHIFT@GOTPAGE
Lloh28:
	ldr	x10, [x10, _SW_TWSI_IA_SHIFT@GOTPAGEOFF]
Lloh29:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w21, w9, w8
LBB0_3:
	mov	x0, x20
	bl	_octeon_i2c_hlc_int_clear
	ldr	x22, [x20]
	mov	x0, x20
	bl	_SW_TWSI
	add	x1, x0, x22
	mov	x0, x21
	bl	_octeon_i2c_writeq_flush
	mov	x0, x20
	bl	_octeon_i2c_hlc_wait
	mov	x8, x0
	cbnz	w0, LBB0_17
; %bb.4:
	ldr	x21, [x20]
	mov	x0, x20
	bl	_SW_TWSI
	add	x0, x0, x21
	bl	___raw_readq
	ldr	w8, [x23]
	tst	w8, w0
	b.eq	LBB0_18
; %bb.5:
	ldr	w8, [x19, #24]
	cmp	w8, #1
	b.lt	LBB0_16
; %bb.6:
	ldr	x10, [x19, #40]
	and	w9, w0, #0xff
	add	x11, x10, x8, lsl #2
	stur	w9, [x11, #-4]
	ldr	w9, [x19, #24]
	sub	x21, x8, #2
	cmp	w9, #2
	b.lt	LBB0_10
; %bb.7:
	ubfx	w9, w0, #8, #8
	str	w9, [x10, x21, lsl #2]
	ldr	w9, [x19, #24]
	sub	x21, x8, #3
	cmp	w9, #3
	b.lt	LBB0_10
; %bb.8:
	ubfx	w9, w0, #16, #8
	str	w9, [x10, x21, lsl #2]
	ldr	w9, [x19, #24]
	sub	x21, x8, #4
	cmp	w9, #4
	b.lt	LBB0_10
; %bb.9:
	lsr	w9, w0, #24
	str	w9, [x10, x21, lsl #2]
	ldr	w9, [x19, #24]
	sub	x21, x8, #5
LBB0_10:
	cmp	w9, #4
	b.le	LBB0_16
; %bb.11:
	ldr	x22, [x20]
	mov	x0, x20
	bl	_SW_TWSI_EXT
	add	x0, x0, x22
	bl	___raw_readq
	ldr	w8, [x19, #24]
	cmp	w8, #5
	b.lt	LBB0_16
; %bb.12:
	ldr	x9, [x19, #40]
	and	w8, w0, #0xff
	sbfiz	x10, x21, #2, #32
	str	w8, [x9, x10]
	ldr	w8, [x19, #24]
	cmp	w8, #6
	b.lt	LBB0_16
; %bb.13:
	sxtw	x10, w21
	ubfx	w11, w0, #8, #8
	add	x8, x9, x10, lsl #2
	stur	w11, [x8, #-4]
	ldr	w11, [x19, #24]
	cmp	w11, #7
	b.lt	LBB0_16
; %bb.14:
	ubfx	w11, w0, #16, #8
	stur	w11, [x8, #-8]
	ldr	w8, [x19, #24]
	cmp	w8, #8
	b.lt	LBB0_16
; %bb.15:
	mov	w8, #0
	lsr	w11, w0, #24
	add	x9, x9, x10, lsl #2
	stur	w11, [x9, #-12]
	b	LBB0_17
LBB0_16:
	mov	w8, #0
LBB0_17:
	mov	x0, x8
	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
LBB0_18:
	mov	x0, x20
	mov	w1, #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
	b	_octeon_i2c_check_status
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_SW_TWSI_V,4,2                  ; @SW_TWSI_V
	.comm	_SW_TWSI_R,4,2                  ; @SW_TWSI_R
	.comm	_SW_TWSI_SOVR,4,2               ; @SW_TWSI_SOVR
	.comm	_SW_TWSI_SIZE_SHIFT,4,2         ; @SW_TWSI_SIZE_SHIFT
	.comm	_SW_TWSI_ADDR_SHIFT,4,2         ; @SW_TWSI_ADDR_SHIFT
	.comm	_I2C_M_TEN,4,2                  ; @I2C_M_TEN
	.comm	_SW_TWSI_OP_10_IA,4,2           ; @SW_TWSI_OP_10_IA
	.comm	_SW_TWSI_OP_7_IA,4,2            ; @SW_TWSI_OP_7_IA
	.comm	_SW_TWSI_EIA,4,2                ; @SW_TWSI_EIA
	.comm	_SW_TWSI_IA_SHIFT,4,2           ; @SW_TWSI_IA_SHIFT
	.no_dead_strip	_octeon_i2c_hlc_comp_read
.subsections_via_symbols
