	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function technisat_usb2_i2c_xfer
_technisat_usb2_i2c_xfer:               ## @technisat_usb2_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
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_mutex_lock_interruptible
	testq	%rax, %rax
	js	LBB0_9
## %bb.1:
	testl	%r15d, %r15d
	jle	LBB0_10
## %bb.2:
	xorl	%r13d, %r13d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	4(%r14), %edi
	leaq	(%rcx,%rcx,2), %rax
	movl	16(%r12,%rax,8), %esi
	movq	8(%r12,%rax,8), %rdx
	movl	4(%r12,%rax,8), %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_technisat_usb2_i2c_access
	testl	%eax, %eax
	jne	LBB0_12
LBB0_4:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	%ebx, %r13d
	cmpl	%r15d, %ebx
	jge	LBB0_13
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	leal	1(%r13), %ebx
	movslq	%r13d, %rcx
	cmpl	%r15d, %ebx
	jge	LBB0_3
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movslq	%ebx, %rax
	leaq	(%rax,%rax,2), %rax
	movq	_I2C_M_RD@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, (%r12,%rax,8)
	je	LBB0_3
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	4(%r14), %edi
	movl	16(%r12,%rax,8), %esi
	leaq	(%rcx,%rcx,2), %rcx
	movq	8(%r12,%rcx,8), %rdx
	movl	4(%r12,%rcx,8), %ecx
	movq	8(%r12,%rax,8), %r8
	movl	4(%r12,%rax,8), %r9d
	callq	_technisat_usb2_i2c_access
	testl	%eax, %eax
	jne	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	addl	$2, %r13d
	movl	%r13d, %ebx
	jmp	LBB0_4
LBB0_9:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_14
LBB0_10:
	xorl	%ebx, %ebx
	jmp	LBB0_13
LBB0_12:
	movl	%eax, %ebx
LBB0_13:
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_14:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.no_dead_strip	_technisat_usb2_i2c_xfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function technisat_usb2_i2c_xfer
_technisat_usb2_i2c_xfer:               ; @technisat_usb2_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	x20, x2
	mov	x21, x1
	bl	_i2c_get_adapdata
	mov	x19, x0
	bl	_mutex_lock_interruptible
	tbnz	x0, #63, LBB0_9
; %bb.1:
	cmp	w20, #1
	b.lt	LBB0_10
; %bb.2:
	mov	w8, #0
	mov	w23, #24
Lloh0:
	adrp	x24, _I2C_M_RD@GOTPAGE
Lloh1:
	ldr	x24, [x24, _I2C_M_RD@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x19, #4]
	madd	x8, x25, x23, x21
	ldr	w1, [x8, #16]
	ldr	x2, [x8, #8]
	ldr	w3, [x8, #4]
	mov	x4, #0
	mov	w5, #0
	bl	_technisat_usb2_i2c_access
	cbnz	w0, LBB0_11
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x8, x22
	cmp	w22, w20
	b.ge	LBB0_12
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	sxtw	x25, w8
	add	x22, x25, #1
	cmp	w22, w20
	b.ge	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mul	x8, x22, x23
	ldr	w8, [x21, x8]
	ldr	w9, [x24]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x19, #4]
	madd	x8, x22, x23, x21
	ldr	w1, [x8, #16]
	madd	x9, x25, x23, x21
	ldr	x2, [x9, #8]
	ldr	w3, [x9, #4]
	ldr	x4, [x8, #8]
	ldr	w5, [x8, #4]
	bl	_technisat_usb2_i2c_access
	cbnz	w0, LBB0_11
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	add	w22, w25, #2
	b	LBB0_4
LBB0_9:
Lloh2:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_13
LBB0_10:
	mov	w22, #0
	b	LBB0_12
LBB0_11:
	mov	x22, x0
LBB0_12:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_13:
	mov	x0, x22
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.no_dead_strip	_technisat_usb2_i2c_xfer
.subsections_via_symbols
