	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adm9240_detect
_adm9240_detect:                        ## @adm9240_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	%rsi, %r14
	movq	%rdi, %rbx
	movq	8(%rdi), %r15
	movl	(%rdi), %r12d
	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	_ADM9240_REG_I2C_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_i2c_smbus_read_byte_data
	cmpl	%r12d, %eax
	jne	LBB0_3
## %bb.5:
	movq	_ADM9240_REG_MAN_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, %r12d
	cmpl	$35, %eax
	jne	LBB0_7
## %bb.6:
	leaq	L_.str.2(%rip), %r13
	jmp	LBB0_11
LBB0_3:
	leaq	L_.str.1(%rip), %rsi
LBB0_4:
	movq	%r15, %rdi
	movl	%r12d, %edx
	callq	_dev_err
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_12
LBB0_7:
	cmpl	$218, %r12d
	je	LBB0_8
## %bb.9:
	cmpl	$1, %r12d
	jne	LBB0_13
## %bb.10:
	leaq	L_.str.4(%rip), %r13
	jmp	LBB0_11
LBB0_8:
	leaq	L_.str.3(%rip), %r13
LBB0_11:
	movq	_ADM9240_REG_DIE_REV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_i2c_smbus_read_byte_data
	cmpl	$218, %r12d
	leaq	L_.str.8(%rip), %rcx
	leaq	L_.str.9(%rip), %rsi
	cmoveq	%rcx, %rsi
	cmpl	$35, %r12d
	leaq	L_.str.7(%rip), %rdx
	cmovneq	%rsi, %rdx
	leaq	L_.str.6(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %ecx
	callq	_dev_info
	movl	(%r14), %edi
	movq	_I2C_NAME_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rsi
	callq	_strlcpy
	xorl	%eax, %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	leaq	L_.str.5(%rip), %rsi
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_FUNC_SMBUS_BYTE_DATA,4,2   ## @I2C_FUNC_SMBUS_BYTE_DATA
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_ADM9240_REG_I2C_ADDR,4,2       ## @ADM9240_REG_I2C_ADDR
	.section	__TEXT,__cstring,cstring_literals
L_.str.1:                               ## @.str.1
	.asciz	"detect fail: address match, 0x%02x\n"

	.comm	_ADM9240_REG_MAN_ID,4,2         ## @ADM9240_REG_MAN_ID
L_.str.2:                               ## @.str.2
	.asciz	"adm9240"

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

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

L_.str.5:                               ## @.str.5
	.asciz	"detect fail: unknown manuf, 0x%02x\n"

	.comm	_ADM9240_REG_DIE_REV,4,2        ## @ADM9240_REG_DIE_REV
L_.str.6:                               ## @.str.6
	.asciz	"found %s revision %u\n"

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

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

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

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adm9240_detect
_adm9240_detect:                        ; @adm9240_detect
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x1
	mov	x21, x0
	ldr	x19, [x0, #8]
	ldr	w22, [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, x19
	bl	_i2c_check_functionality
	cbz	w0, LBB0_6
; %bb.1:
Lloh3:
	adrp	x8, _ADM9240_REG_I2C_ADDR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ADM9240_REG_I2C_ADDR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_i2c_smbus_read_byte_data
	cmp	w0, w22
	b.ne	LBB0_4
; %bb.2:
Lloh6:
	adrp	x8, _ADM9240_REG_MAN_ID@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ADM9240_REG_MAN_ID@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_i2c_smbus_read_byte_data
	mov	x22, x0
	cmp	w0, #35
	b.ne	LBB0_7
; %bb.3:
Lloh9:
	adrp	x23, l_.str.2@PAGE
Lloh10:
	add	x23, x23, l_.str.2@PAGEOFF
	b	LBB0_11
LBB0_4:
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_5:
	mov	x0, x19
	mov	x2, x22
	bl	_dev_err
LBB0_6:
Lloh13:
	adrp	x8, _ENODEV@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_7:
	cmp	w22, #218
	b.eq	LBB0_10
; %bb.8:
	cmp	w22, #1
	b.ne	LBB0_13
; %bb.9:
Lloh16:
	adrp	x23, l_.str.4@PAGE
Lloh17:
	add	x23, x23, l_.str.4@PAGEOFF
	b	LBB0_11
LBB0_10:
Lloh18:
	adrp	x23, l_.str.3@PAGE
Lloh19:
	add	x23, x23, l_.str.3@PAGEOFF
LBB0_11:
Lloh20:
	adrp	x8, _ADM9240_REG_DIE_REV@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ADM9240_REG_DIE_REV@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_i2c_smbus_read_byte_data
	mov	x3, x0
Lloh23:
	adrp	x8, l_.str.9@PAGE
Lloh24:
	add	x8, x8, l_.str.9@PAGEOFF
Lloh25:
	adrp	x9, l_.str.8@PAGE
Lloh26:
	add	x9, x9, l_.str.8@PAGEOFF
	cmp	w22, #218
	csel	x8, x9, x8, eq
Lloh27:
	adrp	x9, l_.str.7@PAGE
Lloh28:
	add	x9, x9, l_.str.7@PAGEOFF
	cmp	w22, #35
	csel	x2, x9, x8, eq
Lloh29:
	adrp	x1, l_.str.6@PAGE
Lloh30:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_dev_info
	ldr	w0, [x20]
Lloh31:
	adrp	x8, _I2C_NAME_SIZE@GOTPAGE
Lloh32:
	ldr	x8, [x8, _I2C_NAME_SIZE@GOTPAGEOFF]
Lloh33:
	ldr	w2, [x8]
	mov	x1, x23
	bl	_strlcpy
	mov	w0, #0
LBB0_12:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_13:
Lloh34:
	adrp	x1, l_.str.5@PAGE
Lloh35:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_FUNC_SMBUS_BYTE_DATA,4,2   ; @I2C_FUNC_SMBUS_BYTE_DATA
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_ADM9240_REG_I2C_ADDR,4,2       ; @ADM9240_REG_I2C_ADDR
	.section	__TEXT,__cstring,cstring_literals
l_.str.1:                               ; @.str.1
	.asciz	"detect fail: address match, 0x%02x\n"

	.comm	_ADM9240_REG_MAN_ID,4,2         ; @ADM9240_REG_MAN_ID
l_.str.2:                               ; @.str.2
	.asciz	"adm9240"

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

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

l_.str.5:                               ; @.str.5
	.asciz	"detect fail: unknown manuf, 0x%02x\n"

	.comm	_ADM9240_REG_DIE_REV,4,2        ; @ADM9240_REG_DIE_REV
l_.str.6:                               ; @.str.6
	.asciz	"found %s revision %u\n"

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

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

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

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