	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ch7006_probe
_ch7006_probe:                          ## @ch7006_probe
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	_CH7006_VERSION_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -24(%rbp)
	leaq	L_.str(%rip), %rsi
	callq	_ch7006_dbg
	leaq	-24(%rbp), %rsi
	movq	%r14, %rdi
	movl	$4, %edx
	callq	_i2c_master_send
	testl	%eax, %eax
	js	LBB0_3
## %bb.1:
	leaq	-20(%rbp), %rsi
	movq	%r14, %rdi
	movl	$4, %edx
	callq	_i2c_master_recv
	testl	%eax, %eax
	js	LBB0_3
## %bb.2:
	movl	-20(%rbp), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_ch7006_info
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	movl	$61, %esi
	xorl	%edx, %edx
	callq	_ch7006_write
	jmp	LBB0_4
LBB0_3:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_ch7006_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_4:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CH7006_VERSION_ID,4,2          ## @CH7006_VERSION_ID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\n"

L_.str.1:                               ## @.str.1
	.asciz	"Detected version ID: %x\n"

L_.str.2:                               ## @.str.2
	.asciz	"Error %d reading version ID\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_ch7006_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ch7006_probe
_ch7006_probe:                          ; @ch7006_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _CH7006_VERSION_ID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CH7006_VERSION_ID@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #12]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_ch7006_dbg
	add	x1, sp, #12
	mov	x0, x19
	mov	w2, #4
	bl	_i2c_master_send
	tbnz	w0, #31, LBB0_3
; %bb.1:
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #4
	bl	_i2c_master_recv
	tbnz	w0, #31, LBB0_3
; %bb.2:
	ldr	w2, [sp, #8]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_ch7006_info
	mov	x0, x19
	mov	w1, #61
	mov	w2, #0
	bl	_ch7006_write
	mov	w0, #0
	b	LBB0_4
LBB0_3:
	mov	x2, x0
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_ch7006_err
Lloh9:
	adrp	x8, _ENODEV@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_CH7006_VERSION_ID,4,2          ; @CH7006_VERSION_ID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\n"

l_.str.1:                               ; @.str.1
	.asciz	"Detected version ID: %x\n"

l_.str.2:                               ; @.str.2
	.asciz	"Error %d reading version ID\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_ch7006_probe
.subsections_via_symbols
