	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lm83_detect
_lm83_detect:                           ## @lm83_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, %r14
	movl	%esi, %ebx
	movq	%rdi, %r12
	movq	8(%rdi), %r15
	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:
	testl	%ebx, %ebx
	movq	_lm83@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	cmovel	%eax, %ebx
	testl	%ebx, %ebx
	js	LBB0_3
## %bb.7:
	je	LBB0_8
LBB0_14:
	movq	_lm82@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %ebx
	leaq	L_.str.4(%rip), %rcx
	leaq	L_.str(%rip), %rdx
	cmoveq	%rcx, %rdx
	cmpl	%eax, %ebx
	leaq	L_.str.3(%rip), %rsi
	cmovneq	%rdx, %rsi
	movl	(%r14), %edi
	movq	_I2C_NAME_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_strlcpy
	xorl	%eax, %eax
	jmp	LBB0_15
LBB0_3:
	movq	_LM83_REG_R_STATUS1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_i2c_smbus_read_byte_data
	testb	$-88, %al
	jne	LBB0_6
## %bb.4:
	movq	_LM83_REG_R_STATUS2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_i2c_smbus_read_byte_data
	testb	$72, %al
	jne	LBB0_6
## %bb.5:
	movq	_LM83_REG_R_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_i2c_smbus_read_byte_data
	testb	$65, %al
	je	LBB0_8
LBB0_6:
	movl	(%r12), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_dbg
	jmp	LBB0_1
LBB0_8:
	movq	_LM83_REG_R_MAN_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, %ebx
	movq	_LM83_REG_R_CHIP_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_i2c_smbus_read_byte_data
	cmpl	$1, %ebx
	jne	LBB0_18
## %bb.9:
	cmpl	$3, %eax
	je	LBB0_12
## %bb.10:
	cmpl	$1, %eax
	jne	LBB0_18
## %bb.11:
	movq	_lm82@GOTPCREL(%rip), %r13
LBB0_12:
	movl	(%r13), %ebx
	testl	%ebx, %ebx
	jle	LBB0_16
## %bb.13:
	movq	_lm83@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_14
LBB0_18:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	movl	%ebx, %edx
LBB0_17:
	movl	%eax, %ecx
	callq	_dev_info
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	movl	$1, %edx
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.space	1

	.comm	_I2C_FUNC_SMBUS_BYTE_DATA,4,2   ## @I2C_FUNC_SMBUS_BYTE_DATA
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_lm83,4,2                       ## @lm83
	.comm	_LM83_REG_R_STATUS1,4,2         ## @LM83_REG_R_STATUS1
	.comm	_LM83_REG_R_STATUS2,4,2         ## @LM83_REG_R_STATUS2
	.comm	_LM83_REG_R_CONFIG,4,2          ## @LM83_REG_R_CONFIG
L_.str.1:                               ## @.str.1
	.asciz	"LM83 detection failed at 0x%02x.\n"

	.comm	_LM83_REG_R_MAN_ID,4,2          ## @LM83_REG_R_MAN_ID
	.comm	_LM83_REG_R_CHIP_ID,4,2         ## @LM83_REG_R_CHIP_ID
	.comm	_lm82,4,2                       ## @lm82
L_.str.2:                               ## @.str.2
	.asciz	"Unsupported chip (man_id=0x%02X, chip_id=0x%02X).\n"

L_.str.3:                               ## @.str.3
	.asciz	"lm83"

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

	.comm	_I2C_NAME_SIZE,4,2              ## @I2C_NAME_SIZE
	.no_dead_strip	_lm83_detect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lm83_detect
_lm83_detect:                           ; @lm83_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	x22, x1
	mov	x21, x0
	ldr	x20, [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, x20
	bl	_i2c_check_functionality
	cbz	w0, LBB0_14
; %bb.1:
Lloh3:
	adrp	x8, _lm83@GOTPAGE
Lloh4:
	ldr	x8, [x8, _lm83@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x8]
	cmp	w22, #0
	csel	w8, w9, w22, eq
	tbnz	w8, #31, LBB0_4
; %bb.2:
	cbz	w8, LBB0_8
LBB0_3:
Lloh6:
	adrp	x10, _lm82@GOTPAGE
Lloh7:
	ldr	x10, [x10, _lm82@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
Lloh9:
	adrp	x11, l_.str@PAGE
Lloh10:
	add	x11, x11, l_.str@PAGEOFF
Lloh11:
	adrp	x12, l_.str.4@PAGE
Lloh12:
	add	x12, x12, l_.str.4@PAGEOFF
	cmp	w8, w10
	csel	x10, x12, x11, eq
Lloh13:
	adrp	x11, l_.str.3@PAGE
Lloh14:
	add	x11, x11, l_.str.3@PAGEOFF
	cmp	w8, w9
	csel	x1, x11, x10, eq
	ldr	w0, [x19]
Lloh15:
	adrp	x8, _I2C_NAME_SIZE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _I2C_NAME_SIZE@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	bl	_strlcpy
	mov	w0, #0
	b	LBB0_15
LBB0_4:
Lloh18:
	adrp	x8, _LM83_REG_R_STATUS1@GOTPAGE
Lloh19:
	ldr	x8, [x8, _LM83_REG_R_STATUS1@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_i2c_smbus_read_byte_data
	mov	w8, #168
	tst	w0, w8
	b.ne	LBB0_7
; %bb.5:
Lloh21:
	adrp	x8, _LM83_REG_R_STATUS2@GOTPAGE
Lloh22:
	ldr	x8, [x8, _LM83_REG_R_STATUS2@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_i2c_smbus_read_byte_data
	mov	w8, #72
	tst	w0, w8
	b.ne	LBB0_7
; %bb.6:
Lloh24:
	adrp	x8, _LM83_REG_R_CONFIG@GOTPAGE
Lloh25:
	ldr	x8, [x8, _LM83_REG_R_CONFIG@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_i2c_smbus_read_byte_data
	mov	w8, #65
	tst	w0, w8
	b.eq	LBB0_8
LBB0_7:
	ldr	w2, [x21]
Lloh27:
	adrp	x1, l_.str.1@PAGE
Lloh28:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
	b	LBB0_14
LBB0_8:
Lloh29:
	adrp	x8, _LM83_REG_R_MAN_ID@GOTPAGE
Lloh30:
	ldr	x8, [x8, _LM83_REG_R_MAN_ID@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_i2c_smbus_read_byte_data
	mov	x22, x0
Lloh32:
	adrp	x8, _LM83_REG_R_CHIP_ID@GOTPAGE
Lloh33:
	ldr	x8, [x8, _LM83_REG_R_CHIP_ID@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_i2c_smbus_read_byte_data
	mov	x3, x0
	cmp	w22, #1
	b.ne	LBB0_12
; %bb.9:
Lloh35:
	adrp	x9, _lm83@GOTPAGE
Lloh36:
	ldr	x9, [x9, _lm83@GOTPAGEOFF]
	cmp	w3, #3
	b.eq	LBB0_16
; %bb.10:
	cmp	w3, #1
	b.ne	LBB0_12
; %bb.11:
Lloh37:
	adrp	x8, _lm82@GOTPAGE
Lloh38:
	ldr	x8, [x8, _lm82@GOTPAGEOFF]
	b	LBB0_17
LBB0_12:
Lloh39:
	adrp	x1, l_.str.2@PAGE
Lloh40:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	x2, x22
LBB0_13:
	bl	_dev_info
LBB0_14:
Lloh41:
	adrp	x8, _ENODEV@GOTPAGE
Lloh42:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh43:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_15:
	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
LBB0_16:
	mov	x8, x9
LBB0_17:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_19
; %bb.18:
	ldr	w9, [x9]
	b	LBB0_3
LBB0_19:
Lloh44:
	adrp	x1, l_.str.2@PAGE
Lloh45:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	w2, #1
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpAdd	Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.space	1

	.comm	_I2C_FUNC_SMBUS_BYTE_DATA,4,2   ; @I2C_FUNC_SMBUS_BYTE_DATA
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_lm83,4,2                       ; @lm83
	.comm	_LM83_REG_R_STATUS1,4,2         ; @LM83_REG_R_STATUS1
	.comm	_LM83_REG_R_STATUS2,4,2         ; @LM83_REG_R_STATUS2
	.comm	_LM83_REG_R_CONFIG,4,2          ; @LM83_REG_R_CONFIG
l_.str.1:                               ; @.str.1
	.asciz	"LM83 detection failed at 0x%02x.\n"

	.comm	_LM83_REG_R_MAN_ID,4,2          ; @LM83_REG_R_MAN_ID
	.comm	_LM83_REG_R_CHIP_ID,4,2         ; @LM83_REG_R_CHIP_ID
	.comm	_lm82,4,2                       ; @lm82
l_.str.2:                               ; @.str.2
	.asciz	"Unsupported chip (man_id=0x%02X, chip_id=0x%02X).\n"

l_.str.3:                               ; @.str.3
	.asciz	"lm83"

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

	.comm	_I2C_NAME_SIZE,4,2              ; @I2C_NAME_SIZE
	.no_dead_strip	_lm83_detect
.subsections_via_symbols
