	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tmp421_detect
_tmp421_detect:                         ## @tmp421_detect
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movl	%esi, %ebx
	movq	%rdi, %r12
	movq	8(%rdi), %r14
	movq	_I2C_FUNC_SMBUS_BYTE_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_i2c_check_functionality
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	testl	%ebx, %ebx
	jle	LBB0_3
LBB0_6:
	movl	(%r15), %edi
	movq	_tmp421_id@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%ebx, %rbx
	movl	-4(%rax,%rbx,4), %esi
	movq	_I2C_NAME_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_strlcpy
	leaq	l_reltable.tmp421_detect(%rip), %rax
	movslq	-4(%rax,%rbx,4), %rdx
	addq	%rax, %rdx
	movl	(%r12), %ecx
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_info
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_3:
	movq	_TMP421_MANUFACTURER_ID_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_i2c_smbus_read_byte_data
	movq	_TMP421_MANUFACTURER_ID@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_1
## %bb.4:
	movq	_TMP421_DEVICE_ID_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_i2c_smbus_read_byte_data
	addl	$-128, %eax
	cmpl	$3, %eax
	jae	LBB0_1
## %bb.5:
	cltq
	leaq	l_switch.table.tmp421_detect(%rip), %rcx
	movq	(%rcx,%rax,8), %rax
	movl	(%rax), %ebx
	jmp	LBB0_6
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TMP421"

L_.str.1:                               ## @.str.1
	.asciz	"TMP422"

L_.str.2:                               ## @.str.2
	.asciz	"TMP423"

	.section	__TEXT,__const
	.p2align	2                               ## @reltable.tmp421_detect
l_reltable.tmp421_detect:
	.long	L_.str-l_reltable.tmp421_detect
	.long	L_.str.1-l_reltable.tmp421_detect
	.long	L_.str.2-l_reltable.tmp421_detect

	.comm	_I2C_FUNC_SMBUS_BYTE_DATA,4,2   ## @I2C_FUNC_SMBUS_BYTE_DATA
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_TMP421_MANUFACTURER_ID_REG,4,2 ## @TMP421_MANUFACTURER_ID_REG
	.comm	_TMP421_MANUFACTURER_ID,4,2     ## @TMP421_MANUFACTURER_ID
	.comm	_TMP421_DEVICE_ID_REG,4,2       ## @TMP421_DEVICE_ID_REG
	.comm	_tmp421,4,2                     ## @tmp421
	.comm	_tmp422,4,2                     ## @tmp422
	.comm	_tmp423,4,2                     ## @tmp423
	.comm	_tmp421_id,8,3                  ## @tmp421_id
	.comm	_I2C_NAME_SIZE,4,2              ## @I2C_NAME_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str.3:                               ## @.str.3
	.asciz	"Detected TI %s chip at 0x%02x\n"

	.no_dead_strip	_tmp421_detect
	.section	__DATA,__const
	.p2align	3                               ## @switch.table.tmp421_detect
l_switch.table.tmp421_detect:
	.quad	_tmp423
	.quad	_tmp422
	.quad	_tmp421

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tmp421_detect
_tmp421_detect:                         ; @tmp421_detect
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x21, x2
	mov	x22, x1
	mov	x20, x0
	ldr	x19, [x0, #8]
Lloh0:
	adrp	x8, _I2C_FUNC_SMBUS_BYTE_DATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I2C_FUNC_SMBUS_BYTE_DATA@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_i2c_check_functionality
	cbz	w0, LBB0_6
; %bb.1:
	cmp	w22, #0
	b.le	LBB0_3
LBB0_2:
	ldr	w0, [x21]
Lloh3:
	adrp	x8, _tmp421_id@GOTPAGE
Lloh4:
	ldr	x8, [x8, _tmp421_id@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	sxtw	x9, w22
	sub	x21, x9, #1
	ldr	w1, [x8, x21, lsl #2]
Lloh6:
	adrp	x8, _I2C_NAME_SIZE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _I2C_NAME_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	bl	_strlcpy
Lloh9:
	adrp	x8, l___const.tmp421_detect.names@PAGE
Lloh10:
	add	x8, x8, l___const.tmp421_detect.names@PAGEOFF
	ldr	x2, [x8, x21, lsl #3]
	ldr	w3, [x20]
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_info
	mov	w0, #0
	b	LBB0_7
LBB0_3:
Lloh13:
	adrp	x8, _TMP421_MANUFACTURER_ID_REG@GOTPAGE
Lloh14:
	ldr	x8, [x8, _TMP421_MANUFACTURER_ID_REG@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_i2c_smbus_read_byte_data
Lloh16:
	adrp	x8, _TMP421_MANUFACTURER_ID@GOTPAGE
Lloh17:
	ldr	x8, [x8, _TMP421_MANUFACTURER_ID@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_6
; %bb.4:
Lloh19:
	adrp	x8, _TMP421_DEVICE_ID_REG@GOTPAGE
Lloh20:
	ldr	x8, [x8, _TMP421_DEVICE_ID_REG@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_i2c_smbus_read_byte_data
	sub	w8, w0, #128
	cmp	w8, #3
	b.hs	LBB0_6
; %bb.5:
Lloh22:
	adrp	x9, l_switch.table.tmp421_detect@PAGE
Lloh23:
	add	x9, x9, l_switch.table.tmp421_detect@PAGEOFF
	ldr	x8, [x9, w8, sxtw #3]
	ldr	w22, [x8]
	b	LBB0_2
LBB0_6:
Lloh24:
	adrp	x8, _ENODEV@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TMP421"

l_.str.1:                               ; @.str.1
	.asciz	"TMP422"

l_.str.2:                               ; @.str.2
	.asciz	"TMP423"

	.section	__DATA,__const
	.p2align	3                               ; @__const.tmp421_detect.names
l___const.tmp421_detect.names:
	.quad	l_.str
	.quad	l_.str.1
	.quad	l_.str.2

	.comm	_I2C_FUNC_SMBUS_BYTE_DATA,4,2   ; @I2C_FUNC_SMBUS_BYTE_DATA
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_TMP421_MANUFACTURER_ID_REG,4,2 ; @TMP421_MANUFACTURER_ID_REG
	.comm	_TMP421_MANUFACTURER_ID,4,2     ; @TMP421_MANUFACTURER_ID
	.comm	_TMP421_DEVICE_ID_REG,4,2       ; @TMP421_DEVICE_ID_REG
	.comm	_tmp421,4,2                     ; @tmp421
	.comm	_tmp422,4,2                     ; @tmp422
	.comm	_tmp423,4,2                     ; @tmp423
	.comm	_tmp421_id,8,3                  ; @tmp421_id
	.comm	_I2C_NAME_SIZE,4,2              ; @I2C_NAME_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str.3:                               ; @.str.3
	.asciz	"Detected TI %s chip at 0x%02x\n"

	.no_dead_strip	_tmp421_detect
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.tmp421_detect
l_switch.table.tmp421_detect:
	.quad	_tmp423
	.quad	_tmp422
	.quad	_tmp421

.subsections_via_symbols
