	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gl861_i2c_xfer
_gl861_i2c_xfer:                        ## @gl861_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, %r15d
	movq	%rsi, %r12
	callq	_i2c_get_adapdata
	cmpl	$3, %r15d
	jl	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_3:
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_mutex_lock_interruptible
	testq	%rax, %rax
	js	LBB0_14
## %bb.4:
	xorl	%ebx, %ebx
	testl	%r15d, %r15d
	jle	LBB0_12
## %bb.5:
	movq	_I2C_M_RD@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	leal	1(%rbx), %ecx
	movslq	%ebx, %rax
	cmpl	%r15d, %ecx
	jge	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	(%r13), %ecx
	testl	%ecx, 24(%r12)
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	leaq	(%rax,%rax,2), %rax
	movl	16(%r12,%rax,8), %esi
	movq	8(%r12,%rax,8), %rdx
	movl	4(%r12,%rax,8), %ecx
	movq	32(%r12), %r8
	movl	28(%r12), %r9d
	movq	%r14, %rdi
	callq	_gl861_i2c_msg
	movl	$1, %ecx
	testq	%rax, %rax
	jns	LBB0_11
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	leaq	(%rax,%rax,2), %rax
	movl	16(%r12,%rax,8), %esi
	movq	8(%r12,%rax,8), %rdx
	movl	4(%r12,%rax,8), %ecx
	movq	%r14, %rdi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_gl861_i2c_msg
	movl	%ebx, %ecx
	testq	%rax, %rax
	js	LBB0_12
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=1
	incl	%ecx
	movl	%ecx, %ebx
	cmpl	%r15d, %ecx
	jl	LBB0_6
LBB0_12:
	movq	%r14, %rdi
	callq	_mutex_unlock
	jmp	LBB0_13
LBB0_14:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.no_dead_strip	_gl861_i2c_xfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gl861_i2c_xfer
_gl861_i2c_xfer:                        ; @gl861_i2c_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	x20, x2
	mov	x21, x1
	bl	_i2c_get_adapdata
	cmp	w20, #3
	b.lt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_12
LBB0_2:
	mov	x19, x0
	bl	_mutex_lock_interruptible
	tbnz	x0, #63, LBB0_11
; %bb.3:
	cmp	w20, #1
	b.lt	LBB0_13
; %bb.4:
	mov	w22, #0
Lloh2:
	adrp	x23, _I2C_M_RD@GOTPAGE
Lloh3:
	ldr	x23, [x23, _I2C_M_RD@GOTPAGEOFF]
	mov	w24, #24
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	w1, [x8, #16]
	ldr	x2, [x8, #8]
	ldr	w3, [x8, #4]
	mov	x0, x19
	mov	x4, #0
	mov	w5, #0
	bl	_gl861_i2c_msg
	tbnz	x0, #63, LBB0_14
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	w22, w22, #1
	cmp	w22, w20
	b.ge	LBB0_14
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	add	w9, w22, #1
	smaddl	x8, w22, w24, x21
	cmp	w9, w20
	b.ge	LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w9, [x21, #24]
	ldr	w10, [x23]
	tst	w10, w9
	b.eq	LBB0_5
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w1, [x8, #16]
	ldr	x2, [x8, #8]
	ldr	w3, [x8, #4]
	ldr	x4, [x21, #32]
	ldr	w5, [x21, #28]
	mov	x0, x19
	bl	_gl861_i2c_msg
	tbnz	x0, #63, LBB0_14
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	w22, #1
	b	LBB0_6
LBB0_11:
Lloh4:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_15
LBB0_13:
	mov	w22, #0
LBB0_14:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_15:
	mov	x0, x22
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.no_dead_strip	_gl861_i2c_xfer
.subsections_via_symbols
