	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function try_write_address
_try_write_address:                     ## @try_write_address
	.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
	movl	%esi, %ebx
	callq	_i2c_get_adapdata
	movb	$0, -44(%rbp)
	testl	%r15d, %r15d
	js	LBB0_1
## %bb.2:
	movq	%rax, %r12
	movzbl	%bl, %r14d
	leaq	-44(%rbp), %rdx
	movq	%rax, %rdi
	movl	%r14d, %esi
	movl	$1, %ecx
	callq	_usbvision_i2c_write
	movl	%eax, %r13d
	xorl	%ebx, %ebx
	cmpl	$1, %eax
	je	LBB0_7
## %bb.3:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	$5, %edi
	callq	_udelay
	cmpl	%ebx, %r15d
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	$10, %edi
	callq	_udelay
	incl	%ebx
	movq	%r12, %rdi
	movl	%r14d, %esi
	leaq	-44(%rbp), %rdx
	movl	$1, %ecx
	callq	_usbvision_i2c_write
	movl	%eax, %r13d
	cmpl	$1, %eax
	jne	LBB0_4
LBB0_7:
	testl	%ebx, %ebx
	jne	LBB0_8
	jmp	LBB0_9
LBB0_1:
	movl	$-1, %r13d
	jmp	LBB0_9
LBB0_5:
	movl	%r15d, %ebx
	testl	%ebx, %ebx
	je	LBB0_9
LBB0_8:
	movq	_DBG_I2C@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	movl	%r14d, %ecx
	xorl	%eax, %eax
	callq	_PDEBUG
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_PDEBUG
LBB0_9:
	movl	%r13d, %eax
	addq	$8, %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	"Needed %d retries for address %#2x"

L_.str.1:                               ## @.str.1
	.asciz	"Maybe there's no device at this address"

	.no_dead_strip	_try_write_address
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function try_write_address
_try_write_address:                     ; @try_write_address
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x21, x2
	mov	x19, x1
	bl	_i2c_get_adapdata
	strb	wzr, [sp, #28]
	tbnz	w21, #31, LBB0_3
; %bb.1:
	mov	x22, x0
	add	x2, sp, #28
	mov	x1, x19
	mov	w3, #1
	bl	_usbvision_i2c_write
	mov	x20, x0
	cmp	w0, #1
	b.ne	LBB0_4
; %bb.2:
	mov	w23, #0
	cbnz	w23, LBB0_8
	b	LBB0_9
LBB0_3:
	mov	w20, #-1
	b	LBB0_9
LBB0_4:
	mov	w23, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #5
	bl	_udelay
	cmp	w21, w23
	b.eq	LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w0, #10
	bl	_udelay
	add	w23, w23, #1
	add	x2, sp, #28
	mov	x0, x22
	mov	x1, x19
	mov	w3, #1
	bl	_usbvision_i2c_write
	mov	x20, x0
	cmp	w0, #1
	b.ne	LBB0_5
; %bb.7:
	cbz	w23, LBB0_9
LBB0_8:
Lloh0:
	adrp	x21, _DBG_I2C@GOTPAGE
Lloh1:
	ldr	x21, [x21, _DBG_I2C@GOTPAGEOFF]
	ldr	w0, [x21]
	mov	w8, w19
	stp	x23, x8, [sp]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_PDEBUG
	ldr	w0, [x21]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_PDEBUG
LBB0_9:
	mov	x0, x20
	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
	add	sp, sp, #96
	ret
LBB0_10:
	mov	x23, x21
	cbnz	w23, LBB0_8
	b	LBB0_9
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_DBG_I2C,4,2                    ; @DBG_I2C
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Needed %d retries for address %#2x"

l_.str.1:                               ; @.str.1
	.asciz	"Maybe there's no device at this address"

	.no_dead_strip	_try_write_address
.subsections_via_symbols
