	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i2c_detect_address
_i2c_detect_address:                    ## @i2c_detect_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %r15
	movl	(%rdi), %r13d
	leal	-120(%r13), %eax
	cmpl	$-118, %eax
	ja	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%r13d, %edx
	callq	_dev_warn
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_16
LBB0_2:
	movl	%esi, %r12d
	movq	%rdi, %rbx
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	movl	%r13d, %esi
	callq	_i2c_check_addr
	xorl	%r14d, %r14d
	testq	%rax, %rax
	jne	LBB0_16
## %bb.3:
	testl	%r12d, %r12d
	js	LBB0_4
LBB0_7:
	leaq	-64(%rbp), %rdi
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movl	%r13d, -64(%rbp)
	movq	%rbx, %rdi
	movl	%r12d, %esi
	leaq	-64(%rbp), %rdx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	callq	*(%rax)
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%eax, %ecx
	cmovnel	%eax, %r14d
	jmp	LBB0_16
LBB0_4:
	movq	_I2C_SMBUS_QUICK@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	$0, (%rsp)
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	movl	%r13d, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_i2c_smbus_xfer
	testq	%rax, %rax
	js	LBB0_16
## %bb.5:
	movl	%r13d, %eax
	andl	$-16, %eax
	cmpl	$80, %eax
	jne	LBB0_7
## %bb.6:
	movq	_I2C_SMBUS_QUICK@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	$0, (%rsp)
	movq	%r15, %rdi
	movl	%r13d, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_i2c_smbus_xfer
	jmp	LBB0_7
LBB0_9:
	movq	-56(%rbp), %rdx
	cmpb	$0, (%rdx)
	je	LBB0_10
## %bb.11:
	movl	-64(%rbp), %ecx
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_dbg
	leaq	-64(%rbp), %rsi
	movq	%r15, %rdi
	callq	_i2c_new_device
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	addq	$4, %rax
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	addq	$8, %rsi
	movq	%rax, %rdi
	callq	_list_add_tail
	jmp	LBB0_15
LBB0_10:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	16(%rax), %rdx
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movl	%r13d, %ecx
	jmp	LBB0_14
LBB0_13:
	movq	-56(%rbp), %rdx
	movl	-64(%rbp), %ecx
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
LBB0_14:
	callq	_dev_err
LBB0_15:
	xorl	%r14d, %r14d
LBB0_16:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid probe address 0x%02x\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_I2C_SMBUS_QUICK,4,2            ## @I2C_SMBUS_QUICK
	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.1:                               ## @.str.1
	.asciz	"%s detection function provided no name for 0x%x\n"

L_.str.2:                               ## @.str.2
	.asciz	"Creating %s at 0x%02x\n"

L_.str.3:                               ## @.str.3
	.asciz	"Failed creating %s at 0x%02x\n"

	.no_dead_strip	_i2c_detect_address
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i2c_detect_address
_i2c_detect_address:                    ; @i2c_detect_address
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	ldr	x19, [x0, #8]
	ldr	w21, [x0]
	sub	w8, w21, #120
	cmn	w8, #118
	b.hi	LBB0_2
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_dev_warn
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_4
LBB0_2:
	mov	x20, x2
	mov	x22, x1
	mov	x23, x0
	mov	x0, x19
	mov	x1, x21
	bl	_i2c_check_addr
	cbz	x0, LBB0_5
LBB0_3:
	mov	w0, #0
LBB0_4:
	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
	add	sp, sp, #80
	ret
LBB0_5:
	tbnz	w22, #31, LBB0_8
LBB0_6:
	mov	x0, sp
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	str	w21, [sp]
	ldr	x8, [x20]
	mov	x2, sp
	mov	x0, x23
	mov	x1, x22
	blr	x8
	cbz	w0, LBB0_11
; %bb.7:
Lloh5:
	adrp	x8, _ENODEV@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmn	w0, w8
	csel	w0, wzr, w0, eq
	b	LBB0_4
LBB0_8:
Lloh8:
	adrp	x24, _I2C_SMBUS_QUICK@GOTPAGE
Lloh9:
	ldr	x24, [x24, _I2C_SMBUS_QUICK@GOTPAGEOFF]
	ldr	w5, [x24]
	mov	x0, x19
	mov	x1, x21
	mov	w2, #0
	mov	w3, #0
	mov	w4, #0
	mov	x6, #0
	bl	_i2c_smbus_xfer
	tbnz	x0, #63, LBB0_3
; %bb.9:
	and	w8, w21, #0xfffffff0
	cmp	w8, #80
	b.ne	LBB0_6
; %bb.10:
	ldr	w5, [x24]
	mov	x0, x19
	mov	x1, x21
	mov	w2, #0
	mov	w3, #0
	mov	w4, #0
	mov	x6, #0
	bl	_i2c_smbus_xfer
	b	LBB0_6
LBB0_11:
	ldr	x2, [sp, #8]
	ldrb	w8, [x2]
	cbz	w8, LBB0_14
; %bb.12:
	ldr	w3, [sp]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	mov	x1, sp
	mov	x0, x19
	bl	_i2c_new_device
	cbz	x0, LBB0_15
; %bb.13:
	add	x0, x0, #4
	add	x1, x20, #8
	bl	_list_add_tail
	b	LBB0_3
LBB0_14:
	ldr	x2, [x20, #16]
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x3, x21
	b	LBB0_16
LBB0_15:
	ldr	x2, [sp, #8]
	ldr	w3, [sp]
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
LBB0_16:
	bl	_dev_err
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid probe address 0x%02x\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_I2C_SMBUS_QUICK,4,2            ; @I2C_SMBUS_QUICK
	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.1:                               ; @.str.1
	.asciz	"%s detection function provided no name for 0x%x\n"

l_.str.2:                               ; @.str.2
	.asciz	"Creating %s at 0x%02x\n"

l_.str.3:                               ; @.str.3
	.asciz	"Failed creating %s at 0x%02x\n"

	.no_dead_strip	_i2c_detect_address
.subsections_via_symbols
