	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_octeon_i2c_xfer                ## -- Begin function octeon_i2c_xfer
	.p2align	4, 0x90
_octeon_i2c_xfer:                       ## @octeon_i2c_xfer
	.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
	movl	%edx, %r14d
	movq	%rsi, %rbx
	callq	_i2c_get_adapdata
	movq	%rax, %r15
	cmpl	$2, %r14d
	je	LBB0_6
## %bb.1:
	cmpl	$1, %r14d
	jne	LBB0_14
## %bb.2:
	movl	(%rbx), %eax
	decl	%eax
	cmpl	$7, %eax
	ja	LBB0_16
## %bb.3:
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%rbx)
	je	LBB0_5
## %bb.4:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_octeon_i2c_hlc_read
	movl	%eax, %r12d
	jmp	LBB0_27
LBB0_6:
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%rbx)
	jne	LBB0_16
## %bb.7:
	movl	28(%rbx), %ecx
	movq	_I2C_M_RECV_LEN@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	jne	LBB0_16
## %bb.8:
	movl	(%rbx), %edx
	decl	%edx
	cmpl	$1, %edx
	ja	LBB0_16
## %bb.9:
	movl	24(%rbx), %edx
	decl	%edx
	cmpl	$7, %edx
	ja	LBB0_16
## %bb.10:
	movq	8(%rbx), %rdx
	cmpq	32(%rbx), %rdx
	jne	LBB0_16
## %bb.11:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	testl	%eax, %ecx
	je	LBB0_13
## %bb.12:
	callq	_octeon_i2c_hlc_comp_read
	movl	%eax, %r12d
	jmp	LBB0_27
LBB0_14:
	jl	LBB0_15
LBB0_16:
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movl	%r14d, %r13d
	movl	$1, %r14d
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	cmpl	$0, (%rbx)
	je	LBB0_22
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	%r15, %rdi
	callq	_octeon_i2c_start
	testl	%eax, %eax
	jne	LBB0_19
## %bb.20:                              ##   in Loop: Header=BB0_17 Depth=1
	movl	4(%rbx), %r8d
	movq	8(%rbx), %rsi
	movl	16(%rbx), %edx
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	testl	%r8d, (%rax)
	je	LBB0_23
## %bb.21:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	_I2C_M_RECV_LEN@GOTPCREL(%rip), %rax
	andl	(%rax), %r8d
	movq	%r15, %rdi
	movq	%rbx, %rcx
	callq	_octeon_i2c_read
	jmp	LBB0_24
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_17 Depth=1
	movl	(%rbx), %ecx
	movq	%r15, %rdi
	callq	_octeon_i2c_write
LBB0_24:                                ##   in Loop: Header=BB0_17 Depth=1
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_26
## %bb.25:                              ##   in Loop: Header=BB0_17 Depth=1
	addq	$24, %rbx
	leaq	1(%r14), %rax
	cmpq	%r13, %r14
	movq	%rax, %r14
	jb	LBB0_17
	jmp	LBB0_26
LBB0_22:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_26
LBB0_19:
	movl	%eax, %r14d
	jmp	LBB0_28
LBB0_15:
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	xorl	%r12d, %r12d
LBB0_26:
	movq	%r15, %rdi
	callq	_octeon_i2c_stop
	movl	-44(%rbp), %r14d                ## 4-byte Reload
LBB0_27:
	testl	%r12d, %r12d
	cmovnel	%r12d, %r14d
LBB0_28:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_octeon_i2c_hlc_write
	movl	%eax, %r12d
	jmp	LBB0_27
LBB0_13:
	callq	_octeon_i2c_hlc_comp_write
	movl	%eax, %r12d
	jmp	LBB0_27
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.comm	_I2C_M_RECV_LEN,4,2             ## @I2C_M_RECV_LEN
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_octeon_i2c_xfer                ; -- Begin function octeon_i2c_xfer
	.p2align	2
_octeon_i2c_xfer:                       ; @octeon_i2c_xfer
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x2
	mov	x21, x1
	bl	_i2c_get_adapdata
	mov	x20, x0
	cmp	w19, #2
	b.eq	LBB0_5
; %bb.1:
	cmp	w19, #1
	b.ne	LBB0_12
; %bb.2:
	ldr	w8, [x21]
	sub	w8, w8, #1
	cmp	w8, #7
	b.hi	LBB0_13
; %bb.3:
	ldr	w8, [x21, #4]
Lloh0:
	adrp	x9, _I2C_M_RD@GOTPAGE
Lloh1:
	ldr	x9, [x9, _I2C_M_RD@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	mov	x0, x20
	mov	x1, x21
	tst	w9, w8
	b.eq	LBB0_25
; %bb.4:
	bl	_octeon_i2c_hlc_read
	mov	x22, x0
	b	LBB0_23
LBB0_5:
	ldr	w9, [x21, #4]
Lloh3:
	adrp	x8, _I2C_M_RD@GOTPAGE
Lloh4:
	ldr	x8, [x8, _I2C_M_RD@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w9
	b.ne	LBB0_13
; %bb.6:
	ldr	w9, [x21, #28]
Lloh6:
	adrp	x10, _I2C_M_RECV_LEN@GOTPAGE
Lloh7:
	ldr	x10, [x10, _I2C_M_RECV_LEN@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	tst	w10, w9
	b.ne	LBB0_13
; %bb.7:
	ldr	w10, [x21]
	sub	w10, w10, #1
	cmp	w10, #1
	b.hi	LBB0_13
; %bb.8:
	ldr	w10, [x21, #24]
	sub	w10, w10, #1
	cmp	w10, #7
	b.hi	LBB0_13
; %bb.9:
	ldr	x10, [x21, #8]
	ldr	x11, [x21, #32]
	cmp	x10, x11
	b.ne	LBB0_13
; %bb.10:
	mov	x0, x20
	mov	x1, x21
	tst	w9, w8
	b.eq	LBB0_26
; %bb.11:
	bl	_octeon_i2c_hlc_comp_read
	mov	x22, x0
	b	LBB0_23
LBB0_12:
	b.lt	LBB0_21
LBB0_13:
	mov	w23, #1
Lloh9:
	adrp	x24, _I2C_M_RD@GOTPAGE
Lloh10:
	ldr	x24, [x24, _I2C_M_RD@GOTPAGEOFF]
Lloh11:
	adrp	x25, _I2C_M_RECV_LEN@GOTPAGE
Lloh12:
	ldr	x25, [x25, _I2C_M_RECV_LEN@GOTPAGEOFF]
	mov	w26, w19
	b	LBB0_16
LBB0_14:                                ;   in Loop: Header=BB0_16 Depth=1
	ldr	w9, [x25]
	and	w4, w9, w8
	mov	x0, x20
	mov	x3, x21
	bl	_octeon_i2c_read
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=1
	mov	x22, x0
	add	x21, x21, #24
	cmp	w0, #0
	ccmp	x23, x26, #2, eq
	add	x23, x23, #1
	b.hs	LBB0_22
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x21]
	cbz	w8, LBB0_20
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	mov	x0, x20
	bl	_octeon_i2c_start
	cbnz	w0, LBB0_24
; %bb.18:                               ;   in Loop: Header=BB0_16 Depth=1
	ldr	w8, [x21, #4]
	ldr	w9, [x24]
	ldr	x1, [x21, #8]
	ldr	w2, [x21, #16]
	tst	w9, w8
	b.ne	LBB0_14
; %bb.19:                               ;   in Loop: Header=BB0_16 Depth=1
	ldr	w3, [x21]
	mov	x0, x20
	bl	_octeon_i2c_write
	b	LBB0_15
LBB0_20:
Lloh13:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_22
LBB0_21:
	mov	w22, #0
LBB0_22:
	mov	x0, x20
	bl	_octeon_i2c_stop
LBB0_23:
	cmp	w22, #0
	csel	w0, w19, w22, eq
LBB0_24:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_25:
	bl	_octeon_i2c_hlc_write
	mov	x22, x0
	b	LBB0_23
LBB0_26:
	bl	_octeon_i2c_hlc_comp_write
	mov	x22, x0
	b	LBB0_23
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.comm	_I2C_M_RECV_LEN,4,2             ; @I2C_M_RECV_LEN
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
.subsections_via_symbols
