	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tmp401_detect
_tmp401_detect:                         ## @tmp401_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %ebx
	movq	%rdi, %r15
	movq	(%rdi), %rdi
	movq	_I2C_FUNC_SMBUS_BYTE_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_i2c_check_functionality
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	testl	%ebx, %ebx
	jle	LBB0_3
LBB0_10:
	movl	(%r14), %edi
	movq	_tmp401_id@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%ebx, %rcx
	movl	-4(%rax,%rcx,4), %esi
	movq	_I2C_NAME_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_strlcpy
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_3:
	movq	_TMP401_MANUFACTURER_ID_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_i2c_smbus_read_byte_data
	movq	_TMP401_MANUFACTURER_ID@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_1
## %bb.4:
	movq	_TMP401_DEVICE_ID_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_i2c_smbus_read_byte_data
	cmpl	$129, %eax
	je	LBB0_5
## %bb.6:
	cmpl	$128, %eax
	jne	LBB0_1
## %bb.7:
	movq	_tmp411@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_5:
	movq	_tmp401@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %ebx
	movq	_TMP401_CONFIG_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_i2c_smbus_read_byte_data
	testb	$27, %al
	jne	LBB0_1
## %bb.9:
	movq	_TMP401_CONVERSION_RATE_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_i2c_smbus_read_byte_data
	cmpl	$16, %eax
	jl	LBB0_10
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_FUNC_SMBUS_BYTE_DATA,4,2   ## @I2C_FUNC_SMBUS_BYTE_DATA
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_TMP401_MANUFACTURER_ID_REG,4,2 ## @TMP401_MANUFACTURER_ID_REG
	.comm	_TMP401_MANUFACTURER_ID,4,2     ## @TMP401_MANUFACTURER_ID
	.comm	_TMP401_DEVICE_ID_REG,4,2       ## @TMP401_DEVICE_ID_REG
	.comm	_tmp401,4,2                     ## @tmp401
	.comm	_tmp411,4,2                     ## @tmp411
	.comm	_TMP401_CONFIG_READ,4,2         ## @TMP401_CONFIG_READ
	.comm	_TMP401_CONVERSION_RATE_READ,4,2 ## @TMP401_CONVERSION_RATE_READ
	.comm	_tmp401_id,8,3                  ## @tmp401_id
	.comm	_I2C_NAME_SIZE,4,2              ## @I2C_NAME_SIZE
	.no_dead_strip	_tmp401_detect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tmp401_detect
_tmp401_detect:                         ; @tmp401_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	x19, x2
	mov	x21, x1
	mov	x20, x0
	ldr	x0, [x0]
Lloh0:
	adrp	x8, _I2C_FUNC_SMBUS_BYTE_DATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I2C_FUNC_SMBUS_BYTE_DATA@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_i2c_check_functionality
	cbz	w0, LBB0_10
; %bb.1:
	cmp	w21, #0
	b.le	LBB0_3
LBB0_2:
	ldr	w0, [x19]
Lloh3:
	adrp	x8, _tmp401_id@GOTPAGE
Lloh4:
	ldr	x8, [x8, _tmp401_id@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	add	x8, x8, w21, sxtw #2
	ldur	w1, [x8, #-4]
Lloh6:
	adrp	x8, _I2C_NAME_SIZE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _I2C_NAME_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	bl	_strlcpy
	mov	w0, #0
	b	LBB0_11
LBB0_3:
Lloh9:
	adrp	x8, _TMP401_MANUFACTURER_ID_REG@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TMP401_MANUFACTURER_ID_REG@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_i2c_smbus_read_byte_data
Lloh12:
	adrp	x8, _TMP401_MANUFACTURER_ID@GOTPAGE
Lloh13:
	ldr	x8, [x8, _TMP401_MANUFACTURER_ID@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_10
; %bb.4:
Lloh15:
	adrp	x8, _TMP401_DEVICE_ID_REG@GOTPAGE
Lloh16:
	ldr	x8, [x8, _TMP401_DEVICE_ID_REG@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_i2c_smbus_read_byte_data
	cmp	w0, #129
	b.eq	LBB0_7
; %bb.5:
	cmp	w0, #128
	b.ne	LBB0_10
; %bb.6:
Lloh18:
	adrp	x8, _tmp411@GOTPAGE
Lloh19:
	ldr	x8, [x8, _tmp411@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh20:
	adrp	x8, _tmp401@GOTPAGE
Lloh21:
	ldr	x8, [x8, _tmp401@GOTPAGEOFF]
LBB0_8:
	ldr	w21, [x8]
Lloh22:
	adrp	x8, _TMP401_CONFIG_READ@GOTPAGE
Lloh23:
	ldr	x8, [x8, _TMP401_CONFIG_READ@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_i2c_smbus_read_byte_data
	mov	w8, #27
	tst	w0, w8
	b.ne	LBB0_10
; %bb.9:
Lloh25:
	adrp	x8, _TMP401_CONVERSION_RATE_READ@GOTPAGE
Lloh26:
	ldr	x8, [x8, _TMP401_CONVERSION_RATE_READ@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_i2c_smbus_read_byte_data
	cmp	w0, #16
	b.lt	LBB0_2
LBB0_10:
Lloh28:
	adrp	x8, _ENODEV@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	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 AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_FUNC_SMBUS_BYTE_DATA,4,2   ; @I2C_FUNC_SMBUS_BYTE_DATA
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_TMP401_MANUFACTURER_ID_REG,4,2 ; @TMP401_MANUFACTURER_ID_REG
	.comm	_TMP401_MANUFACTURER_ID,4,2     ; @TMP401_MANUFACTURER_ID
	.comm	_TMP401_DEVICE_ID_REG,4,2       ; @TMP401_DEVICE_ID_REG
	.comm	_tmp401,4,2                     ; @tmp401
	.comm	_tmp411,4,2                     ; @tmp411
	.comm	_TMP401_CONFIG_READ,4,2         ; @TMP401_CONFIG_READ
	.comm	_TMP401_CONVERSION_RATE_READ,4,2 ; @TMP401_CONVERSION_RATE_READ
	.comm	_tmp401_id,8,3                  ; @tmp401_id
	.comm	_I2C_NAME_SIZE,4,2              ; @I2C_NAME_SIZE
	.no_dead_strip	_tmp401_detect
.subsections_via_symbols
