	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function usbvision_i2c_xfer
_usbvision_i2c_xfer:                    ## @usbvision_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movb	$0, -41(%rbp)
	callq	_i2c_get_adapdata
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	%r12d, %r14d
	testl	%r12d, %r12d
	jle	LBB0_10
## %bb.1:
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	leaq	-41(%rbp), %rcx
	callq	_usb_find_address
	testl	%eax, %eax
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	4(%rbx), %ecx
	movl	8(%rbx), %edx
	movzbl	-41(%rbp), %esi
	testl	%eax, (%rbx)
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_usbvision_i2c_read
	cmpl	4(%rbx), %eax
	jge	LBB0_9
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_usbvision_i2c_write
	cmpl	4(%rbx), %eax
	jl	LBB0_7
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%r13
	addq	$12, %rbx
	cmpq	%r13, %r14
	jne	LBB0_2
	jmp	LBB0_10
LBB0_3:
	movl	%eax, %r12d
	movq	_DBG_I2C@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %edx
	callq	_PDEBUG
	movq	_EREMOTEIO@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	testl	%r12d, %r12d
	cmovsl	%r12d, %r14d
	jmp	LBB0_10
LBB0_7:
	movq	_EREMOTEIO@GOTPCREL(%rip), %rcx
	xorl	%r14d, %r14d
	subl	(%rcx), %r14d
	testl	%eax, %eax
	cmovsl	%eax, %r14d
LBB0_10:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DBG_I2C,4,2                    ## @DBG_I2C
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"got NAK from device, message #%d"

	.comm	_EREMOTEIO,4,2                  ## @EREMOTEIO
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.no_dead_strip	_usbvision_i2c_xfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function usbvision_i2c_xfer
_usbvision_i2c_xfer:                    ; @usbvision_i2c_xfer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x22, x2
	mov	x20, x1
	mov	x21, x0
	strb	wzr, [sp, #15]
	bl	_i2c_get_adapdata
	mov	w19, w22
	cmp	w22, #0
	b.le	LBB0_10
; %bb.1:
	mov	x23, x0
	mov	x22, #0
Lloh0:
	adrp	x25, _I2C_M_RD@GOTPAGE
Lloh1:
	ldr	x25, [x25, _I2C_M_RD@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x21]
	add	x3, sp, #15
	mov	x0, x21
	mov	x1, x20
	bl	_usb_find_address
	cbnz	w0, LBB0_8
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x25]
	ldrb	w1, [sp, #15]
	ldp	w3, w2, [x20, #4]
	ldr	w9, [x20]
	mov	x0, x23
	tst	w8, w9
	b.eq	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	bl	_usbvision_i2c_read
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	bl	_usbvision_i2c_write
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x20, #4]
	cmp	w0, w8
	b.lt	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x22, x22, #1
	add	x20, x20, #12
	cmp	x19, x22
	b.ne	LBB0_2
	b	LBB0_10
LBB0_8:
	mov	x24, x0
Lloh2:
	adrp	x8, _DBG_I2C@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DBG_I2C@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x22
	bl	_PDEBUG
Lloh7:
	adrp	x8, _EREMOTEIO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EREMOTEIO@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cmp	w24, #0
	csneg	w19, w24, w8, lt
	b	LBB0_10
LBB0_9:
Lloh10:
	adrp	x8, _EREMOTEIO@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EREMOTEIO@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	cmp	w0, #0
	csneg	w19, w0, w8, lt
LBB0_10:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_DBG_I2C,4,2                    ; @DBG_I2C
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"got NAK from device, message #%d"

	.comm	_EREMOTEIO,4,2                  ; @EREMOTEIO
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.no_dead_strip	_usbvision_i2c_xfer
.subsections_via_symbols
