	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx231xx_do_i2c_scan            ## -- Begin function cx231xx_do_i2c_scan
	.p2align	4, 0x90
_cx231xx_do_i2c_scan:                   ## @cx231xx_do_i2c_scan
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	$1, -72(%rbp)
	leaq	-41(%rbp), %rax
	movq	%rax, -64(%rbp)
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)
	movq	_i2c_scan@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_8
## %bb.1:
	movl	%esi, %r14d
	movq	%rdi, %r15
	movl	$1, (%rdi)
	callq	_cx231xx_get_i2c_adap
	movq	%rax, %r12
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	4(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	movl	%ebx, %ecx
	callq	_dev_info
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%r13
	addl	$2, %ebx
	cmpq	$128, %r13
	je	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r13d, -56(%rbp)
	movq	%r12, %rdi
	leaq	-72(%rbp), %rsi
	movl	$1, %edx
	callq	_i2c_transfer
	testl	%eax, %eax
	js	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_i2c_devs@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax,%r13,8), %rax
	leaq	L_.str.1(%rip), %r8
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %r8
	jmp	LBB0_5
LBB0_7:
	movl	$0, (%r15)
LBB0_8:
	addq	$40, %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	_i2c_scan,4,2                   ## @i2c_scan
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"i2c scan: found device @ port %d addr 0x%x  [%s]\n"

	.comm	_i2c_devs,8,3                   ## @i2c_devs
L_.str.1:                               ## @.str.1
	.asciz	"???"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cx231xx_do_i2c_scan            ; -- Begin function cx231xx_do_i2c_scan
	.p2align	2
_cx231xx_do_i2c_scan:                   ; @cx231xx_do_i2c_scan
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	w8, #1
	str	w8, [sp]
	add	x9, sp, #31
Lloh0:
	adrp	x10, _I2C_M_RD@GOTPAGE
Lloh1:
	ldr	x10, [x10, _I2C_M_RD@GOTPAGEOFF]
	str	x9, [sp, #8]
Lloh2:
	ldr	w9, [x10]
	str	w9, [sp, #20]
Lloh3:
	adrp	x9, _i2c_scan@GOTPAGE
Lloh4:
	ldr	x9, [x9, _i2c_scan@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cbz	w9, LBB0_6
; %bb.1:
	mov	x20, x1
	mov	x19, x0
	str	w8, [x0]
	bl	_cx231xx_get_i2c_adap
	mov	x21, x0
	mov	w22, #0
	mov	x24, #0
Lloh6:
	adrp	x25, _i2c_devs@GOTPAGE
Lloh7:
	ldr	x25, [x25, _i2c_devs@GOTPAGEOFF]
Lloh8:
	adrp	x26, l_.str.1@PAGE
Lloh9:
	add	x26, x26, l_.str.1@PAGEOFF
Lloh10:
	adrp	x23, l_.str@PAGE
Lloh11:
	add	x23, x23, l_.str@PAGEOFF
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x24, x24, #1
	add	w22, w22, #2
	cmp	x24, #128
	b.eq	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	str	w24, [sp, #16]
	mov	x1, sp
	mov	x0, x21
	mov	w2, #1
	bl	_i2c_transfer
	tbnz	w0, #31, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x19, #4]
	ldr	x8, [x25]
	ldr	x8, [x8, x24, lsl #3]
	cmp	x8, #0
	csel	x4, x26, x8, eq
	mov	x1, x23
	mov	x2, x20
	mov	x3, x22
	bl	_dev_info
	b	LBB0_2
LBB0_5:
	str	wzr, [x19]
LBB0_6:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.comm	_i2c_scan,4,2                   ; @i2c_scan
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"i2c scan: found device @ port %d addr 0x%x  [%s]\n"

	.comm	_i2c_devs,8,3                   ; @i2c_devs
l_.str.1:                               ; @.str.1
	.asciz	"???"

.subsections_via_symbols
