	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function go7007_i2c_master_xfer
_go7007_i2c_master_xfer:                ## @go7007_i2c_master_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, %r12
	callq	_i2c_get_adapdata
	testl	%r14d, %r14d
	jle	LBB0_10
## %bb.1:
	movq	%rax, %r15
	xorl	%ebx, %ebx
	movq	_I2C_M_RD@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movslq	%ebx, %rax
	shlq	$5, %rax
	movl	(%r12,%rax), %ecx
	cmpl	$3, %ecx
	je	LBB0_14
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$2, %ecx
	jne	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	incl	%ebx
	cmpl	%r14d, %ebx
	je	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r12,%rax), %rsi
	movslq	%ebx, %rdx
	shlq	$5, %rdx
	cmpq	8(%r12,%rdx), %rsi
	jne	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r13), %ecx
	testl	%ecx, 16(%r12,%rax)
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%ecx, 16(%r12,%rdx)
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$1, (%r12,%rdx)
	jne	LBB0_9
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	24(%r12,%rax), %rax
	movl	(%rax), %ecx
	shll	$8, %ecx
	orl	4(%rax), %ecx
	movq	24(%r12,%rdx), %r9
	movq	%r15, %rdi
	movl	$1, %edx
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r13), %ecx
	testl	%ecx, 16(%r12,%rax)
	jne	LBB0_9
## %bb.15:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r12,%rax), %rsi
	movq	24(%r12,%rax), %r9
	movl	(%r9), %ecx
	shll	$8, %ecx
	orl	4(%r9), %ecx
	addq	$8, %r9
	movq	%r15, %rdi
	xorl	%edx, %edx
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, %r8d
	callq	_go7007_i2c_xfer
	testq	%rax, %rax
	js	LBB0_9
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	incl	%ebx
	cmpl	%r14d, %ebx
	jl	LBB0_2
	jmp	LBB0_10
LBB0_9:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_10:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_go7007_i2c_master_xfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function go7007_i2c_master_xfer
_go7007_i2c_master_xfer:                ; @go7007_i2c_master_xfer
	.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, x2
	mov	x20, x1
	bl	_i2c_get_adapdata
	cmp	w19, #1
	b.lt	LBB0_15
; %bb.1:
	mov	x21, x0
	mov	w23, #0
Lloh0:
	adrp	x22, _I2C_M_RD@GOTPAGE
Lloh1:
	ldr	x22, [x22, _I2C_M_RD@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x9, x23
	sxtw	x8, w9
	sbfiz	x9, x9, #5, #32
	ldr	w9, [x20, x9]
	cmp	w9, #3
	b.eq	LBB0_10
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w9, #2
	b.ne	LBB0_14
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x23, x8, #1
	cmp	w23, w19
	b.eq	LBB0_14
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x9, x20, x8, lsl #5
	ldr	x1, [x9, #8]
	add	x10, x20, x23, lsl #5
	ldr	x10, [x10, #8]
	cmp	x1, x10
	b.ne	LBB0_14
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w10, [x9, #16]
	ldr	w9, [x22]
	tst	w9, w10
	b.ne	LBB0_14
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x10, x20, x23, lsl #5
	ldr	w10, [x10, #16]
	tst	w10, w9
	b.eq	LBB0_14
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	lsl	x9, x23, #5
	ldr	w9, [x20, x9]
	cmp	w9, #1
	b.ne	LBB0_14
; %bb.9:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x8, x20, x8, lsl #5
	ldr	x8, [x8, #24]
	ldp	w9, w8, [x8]
	orr	w3, w8, w9, lsl #8
	add	x8, x20, x23, lsl #5
	ldr	x5, [x8, #24]
	mov	x0, x21
	mov	w2, #1
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x8, x20, x8, lsl #5
	ldr	w9, [x8, #16]
	ldr	w10, [x22]
	tst	w10, w9
	b.ne	LBB0_14
; %bb.11:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	x1, [x8, #8]
	ldr	x8, [x8, #24]
	ldp	w9, w10, [x8]
	orr	w3, w10, w9, lsl #8
	add	x5, x8, #8
	mov	x0, x21
	mov	w2, #0
LBB0_12:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w4, #1
	bl	_go7007_i2c_xfer
	tbnz	x0, #63, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_2 Depth=1
	add	w23, w23, #1
	cmp	w23, w19
	b.lt	LBB0_2
	b	LBB0_15
LBB0_14:
Lloh2:
	adrp	x8, _EIO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_15:
	mov	x0, x19
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_go7007_i2c_master_xfer
.subsections_via_symbols
