	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lm85_detect
_lm85_detect:                           ## @lm85_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movl	%esi, %r12d
	movq	%rdi, %r13
	movq	8(%rdi), %r15
	movl	(%rdi), %r14d
	movq	_I2C_FUNC_SMBUS_BYTE_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_i2c_check_functionality
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	testl	%r12d, %r12d
	js	LBB0_3
LBB0_19:
	addl	$-128, %r12d
	cmpl	$7, %r12d
	jae	LBB0_20
## %bb.23:
	movslq	%r12d, %rax
	leaq	l_reltable.lm85_detect.15(%rip), %rcx
LBB0_24:
	movslq	(%rcx,%rax,4), %rsi
	addq	%rcx, %rsi
	jmp	LBB0_25
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_26
LBB0_3:
	movq	_LM85_REG_COMPANY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_lm85_read_value
	movl	%eax, %r12d
	movq	_LM85_REG_VERSTEP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_lm85_read_value
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%r14d, %edx
	movl	%r12d, %r14d
	movl	%r12d, %ecx
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_LM85_VERSTEP_VMASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%ebx, %eax
	movq	_LM85_VERSTEP_GENERIC@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_7
## %bb.4:
	movq	_LM85_VERSTEP_GENERIC2@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_7
## %bb.5:
	leaq	L_.str.1(%rip), %rsi
LBB0_6:
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_26
LBB0_20:
	leaq	L_.str.11(%rip), %rsi
LBB0_25:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movq	_I2C_NAME_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_strlcpy
	xorl	%ebx, %ebx
LBB0_26:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_any_chip@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_LM85_COMPANY_NATIONAL@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jne	LBB0_14
## %bb.8:
	leal	-135(%rbx), %eax
	cmpl	$2, %eax
	jb	LBB0_12
## %bb.9:
	cmpl	$137, %ebx
	je	LBB0_21
## %bb.10:
	cmpl	$138, %ebx
	jne	LBB0_19
## %bb.11:
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_25
LBB0_14:
	movq	_LM85_COMPANY_ANALOG_DEV@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jne	LBB0_17
## %bb.15:
	addl	$-142, %ebx
	cmpl	$5, %ebx
	jae	LBB0_19
## %bb.16:
	movslq	%ebx, %rax
	leaq	l_reltable.lm85_detect(%rip), %rcx
	jmp	LBB0_24
LBB0_17:
	movq	_LM85_COMPANY_SMSC@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jne	LBB0_27
## %bb.18:
	addl	$-139, %ebx
	cmpl	$3, %ebx
	jae	LBB0_19
## %bb.22:
	movslq	%ebx, %rax
	leaq	l_reltable.lm85_detect.14(%rip), %rcx
	jmp	LBB0_24
LBB0_12:
	movq	%r13, %rdi
	callq	_lm85_is_fake
	testl	%eax, %eax
	je	LBB0_19
## %bb.13:
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_6
LBB0_27:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_6
LBB0_21:
	leaq	L_.str.5(%rip), %rsi
	jmp	LBB0_25
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_FUNC_SMBUS_BYTE_DATA,4,2   ## @I2C_FUNC_SMBUS_BYTE_DATA
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_LM85_REG_COMPANY,4,2           ## @LM85_REG_COMPANY
	.comm	_LM85_REG_VERSTEP,4,2           ## @LM85_REG_VERSTEP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Detecting device at 0x%02x with COMPANY: 0x%02x and VERSTEP: 0x%02x\n"

	.comm	_LM85_VERSTEP_VMASK,4,2         ## @LM85_VERSTEP_VMASK
	.comm	_LM85_VERSTEP_GENERIC,4,2       ## @LM85_VERSTEP_GENERIC
	.comm	_LM85_VERSTEP_GENERIC2,4,2      ## @LM85_VERSTEP_GENERIC2
L_.str.1:                               ## @.str.1
	.asciz	"Autodetection failed: unsupported version\n"

	.comm	_any_chip,4,2                   ## @any_chip
	.comm	_LM85_COMPANY_NATIONAL,4,2      ## @LM85_COMPANY_NATIONAL
L_.str.2:                               ## @.str.2
	.asciz	"Found Winbond WPCD377I, ignoring\n"

	.comm	_LM85_COMPANY_ANALOG_DEV,4,2    ## @LM85_COMPANY_ANALOG_DEV
	.comm	_LM85_COMPANY_SMSC,4,2          ## @LM85_COMPANY_SMSC
L_.str.3:                               ## @.str.3
	.asciz	"Autodetection failed: unknown vendor\n"

L_.str.4:                               ## @.str.4
	.asciz	"lm85b"

L_.str.5:                               ## @.str.5
	.asciz	"lm85c"

L_.str.6:                               ## @.str.6
	.asciz	"adm1027"

L_.str.7:                               ## @.str.7
	.asciz	"adt7463"

L_.str.8:                               ## @.str.8
	.asciz	"adt7468"

L_.str.9:                               ## @.str.9
	.asciz	"emc6d100"

L_.str.10:                              ## @.str.10
	.asciz	"emc6d102"

L_.str.11:                              ## @.str.11
	.asciz	"lm85"

	.comm	_I2C_NAME_SIZE,4,2              ## @I2C_NAME_SIZE
	.no_dead_strip	_lm85_detect
	.section	__TEXT,__const
	.p2align	2                               ## @reltable.lm85_detect
l_reltable.lm85_detect:
	.long	L_.str.8-l_reltable.lm85_detect
	.long	L_.str.8-l_reltable.lm85_detect
	.long	L_.str.7-l_reltable.lm85_detect
	.long	L_.str.7-l_reltable.lm85_detect
	.long	L_.str.6-l_reltable.lm85_detect

	.p2align	2                               ## @reltable.lm85_detect.14
l_reltable.lm85_detect.14:
	.long	L_.str.10-l_reltable.lm85_detect.14
	.long	L_.str.9-l_reltable.lm85_detect.14
	.long	L_.str.9-l_reltable.lm85_detect.14

	.p2align	2                               ## @reltable.lm85_detect.15
l_reltable.lm85_detect.15:
	.long	L_.str.5-l_reltable.lm85_detect.15
	.long	L_.str.4-l_reltable.lm85_detect.15
	.long	L_.str.10-l_reltable.lm85_detect.15
	.long	L_.str.9-l_reltable.lm85_detect.15
	.long	L_.str.8-l_reltable.lm85_detect.15
	.long	L_.str.7-l_reltable.lm85_detect.15
	.long	L_.str.6-l_reltable.lm85_detect.15

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lm85_detect
_lm85_detect:                           ; @lm85_detect
	.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	x19, x2
	mov	x22, x1
	mov	x21, x0
	ldr	x20, [x0, #8]
	ldr	w25, [x0]
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, x20
	bl	_i2c_check_functionality
	cbz	w0, LBB0_15
; %bb.1:
	tbnz	w22, #31, LBB0_5
LBB0_2:
	sub	w8, w22, #128
	cmp	w8, #7
	b.hs	LBB0_11
; %bb.3:
Lloh3:
	adrp	x9, l_switch.table.lm85_detect.13@PAGE
Lloh4:
	add	x9, x9, l_switch.table.lm85_detect.13@PAGEOFF
LBB0_4:
	ldr	x1, [x9, w8, sxtw #3]
	b	LBB0_12
LBB0_5:
Lloh5:
	adrp	x8, _LM85_REG_COMPANY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _LM85_REG_COMPANY@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_lm85_read_value
	mov	x24, x0
Lloh8:
	adrp	x8, _LM85_REG_VERSTEP@GOTPAGE
Lloh9:
	ldr	x8, [x8, _LM85_REG_VERSTEP@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_lm85_read_value
	mov	x23, x0
	stp	x24, x23, [sp, #8]
	str	x25, [sp]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
Lloh13:
	adrp	x8, _LM85_VERSTEP_VMASK@GOTPAGE
Lloh14:
	ldr	x8, [x8, _LM85_VERSTEP_VMASK@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	and	w8, w8, w23
Lloh16:
	adrp	x9, _LM85_VERSTEP_GENERIC@GOTPAGE
Lloh17:
	ldr	x9, [x9, _LM85_VERSTEP_GENERIC@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
Lloh19:
	adrp	x10, _LM85_VERSTEP_GENERIC2@GOTPAGE
Lloh20:
	ldr	x10, [x10, _LM85_VERSTEP_GENERIC2@GOTPAGEOFF]
Lloh21:
	ldr	w10, [x10]
	cmp	w8, w9
	ccmp	w8, w10, #4, ne
	b.ne	LBB0_13
; %bb.6:
Lloh22:
	adrp	x8, _any_chip@GOTPAGE
Lloh23:
	ldr	x8, [x8, _any_chip@GOTPAGEOFF]
Lloh24:
	ldr	w22, [x8]
Lloh25:
	adrp	x8, _LM85_COMPANY_NATIONAL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _LM85_COMPANY_NATIONAL@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	cmp	w24, w8
	b.ne	LBB0_17
; %bb.7:
	sub	w8, w23, #135
	cmp	w8, #2
	b.lo	LBB0_23
; %bb.8:
	cmp	w23, #137
	b.eq	LBB0_26
; %bb.9:
	cmp	w23, #138
	b.ne	LBB0_2
; %bb.10:
Lloh28:
	adrp	x1, l_.str.4@PAGE
Lloh29:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_12
LBB0_11:
Lloh30:
	adrp	x1, l_.str.11@PAGE
Lloh31:
	add	x1, x1, l_.str.11@PAGEOFF
LBB0_12:
	ldr	w0, [x19]
Lloh32:
	adrp	x8, _I2C_NAME_SIZE@GOTPAGE
Lloh33:
	ldr	x8, [x8, _I2C_NAME_SIZE@GOTPAGEOFF]
Lloh34:
	ldr	w2, [x8]
	bl	_strlcpy
	mov	w0, #0
	b	LBB0_16
LBB0_13:
Lloh35:
	adrp	x1, l_.str.1@PAGE
Lloh36:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_14:
	mov	x0, x20
	bl	_dev_dbg
LBB0_15:
Lloh37:
	adrp	x8, _ENODEV@GOTPAGE
Lloh38:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_16:
	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
LBB0_17:
Lloh40:
	adrp	x8, _LM85_COMPANY_ANALOG_DEV@GOTPAGE
Lloh41:
	ldr	x8, [x8, _LM85_COMPANY_ANALOG_DEV@GOTPAGEOFF]
Lloh42:
	ldr	w8, [x8]
	cmp	w24, w8
	b.ne	LBB0_20
; %bb.18:
	sub	w8, w23, #142
	cmp	w8, #5
	b.hs	LBB0_2
; %bb.19:
Lloh43:
	adrp	x9, l_switch.table.lm85_detect@PAGE
Lloh44:
	add	x9, x9, l_switch.table.lm85_detect@PAGEOFF
	b	LBB0_4
LBB0_20:
Lloh45:
	adrp	x8, _LM85_COMPANY_SMSC@GOTPAGE
Lloh46:
	ldr	x8, [x8, _LM85_COMPANY_SMSC@GOTPAGEOFF]
Lloh47:
	ldr	w8, [x8]
	cmp	w24, w8
	b.ne	LBB0_25
; %bb.21:
	sub	w8, w23, #139
	cmp	w8, #3
	b.hs	LBB0_2
; %bb.22:
Lloh48:
	adrp	x9, l_switch.table.lm85_detect.12@PAGE
Lloh49:
	add	x9, x9, l_switch.table.lm85_detect.12@PAGEOFF
	b	LBB0_4
LBB0_23:
	mov	x0, x21
	bl	_lm85_is_fake
	cbz	w0, LBB0_2
; %bb.24:
Lloh50:
	adrp	x1, l_.str.2@PAGE
Lloh51:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_14
LBB0_25:
Lloh52:
	adrp	x1, l_.str.3@PAGE
Lloh53:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_14
LBB0_26:
Lloh54:
	adrp	x1, l_.str.5@PAGE
Lloh55:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpAdd	Lloh54, Lloh55
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_FUNC_SMBUS_BYTE_DATA,4,2   ; @I2C_FUNC_SMBUS_BYTE_DATA
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_LM85_REG_COMPANY,4,2           ; @LM85_REG_COMPANY
	.comm	_LM85_REG_VERSTEP,4,2           ; @LM85_REG_VERSTEP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Detecting device at 0x%02x with COMPANY: 0x%02x and VERSTEP: 0x%02x\n"

	.comm	_LM85_VERSTEP_VMASK,4,2         ; @LM85_VERSTEP_VMASK
	.comm	_LM85_VERSTEP_GENERIC,4,2       ; @LM85_VERSTEP_GENERIC
	.comm	_LM85_VERSTEP_GENERIC2,4,2      ; @LM85_VERSTEP_GENERIC2
l_.str.1:                               ; @.str.1
	.asciz	"Autodetection failed: unsupported version\n"

	.comm	_any_chip,4,2                   ; @any_chip
	.comm	_LM85_COMPANY_NATIONAL,4,2      ; @LM85_COMPANY_NATIONAL
l_.str.2:                               ; @.str.2
	.asciz	"Found Winbond WPCD377I, ignoring\n"

	.comm	_LM85_COMPANY_ANALOG_DEV,4,2    ; @LM85_COMPANY_ANALOG_DEV
	.comm	_LM85_COMPANY_SMSC,4,2          ; @LM85_COMPANY_SMSC
l_.str.3:                               ; @.str.3
	.asciz	"Autodetection failed: unknown vendor\n"

l_.str.4:                               ; @.str.4
	.asciz	"lm85b"

l_.str.5:                               ; @.str.5
	.asciz	"lm85c"

l_.str.6:                               ; @.str.6
	.asciz	"adm1027"

l_.str.7:                               ; @.str.7
	.asciz	"adt7463"

l_.str.8:                               ; @.str.8
	.asciz	"adt7468"

l_.str.9:                               ; @.str.9
	.asciz	"emc6d100"

l_.str.10:                              ; @.str.10
	.asciz	"emc6d102"

l_.str.11:                              ; @.str.11
	.asciz	"lm85"

	.comm	_I2C_NAME_SIZE,4,2              ; @I2C_NAME_SIZE
	.no_dead_strip	_lm85_detect
	.section	__DATA,__const
	.p2align	3                               ; @switch.table.lm85_detect
l_switch.table.lm85_detect:
	.quad	l_.str.8
	.quad	l_.str.8
	.quad	l_.str.7
	.quad	l_.str.7
	.quad	l_.str.6

	.p2align	3                               ; @switch.table.lm85_detect.12
l_switch.table.lm85_detect.12:
	.quad	l_.str.10
	.quad	l_.str.9
	.quad	l_.str.9

	.p2align	3                               ; @switch.table.lm85_detect.13
l_switch.table.lm85_detect.13:
	.quad	l_.str.5
	.quad	l_.str.4
	.quad	l_.str.10
	.quad	l_.str.9
	.quad	l_.str.8
	.quad	l_.str.7
	.quad	l_.str.6

.subsections_via_symbols
