	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adm1021_detect
_adm1021_detect:                        ## @adm1021_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r13
	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_10
## %bb.1:
	movq	_ADM1021_REG_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, %ebx
	movq	_ADM1021_REG_CONV_RATE_R@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_ADM1021_REG_CONFIG_R@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_i2c_smbus_read_byte_data
	testb	$3, %bl
	jne	LBB0_11
## %bb.2:
	movl	%eax, %r14d
	andl	$63, %eax
	jne	LBB0_11
## %bb.3:
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	andl	$248, %eax
	jne	LBB0_11
## %bb.4:
	movl	%ebx, -68(%rbp)                 ## 4-byte Spill
	movq	_ADM1021_REG_MAN_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, %ebx
	movq	_ADM1021_REG_DEV_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_i2c_smbus_read_byte_data
	testl	%ebx, %ebx
	js	LBB0_36
## %bb.5:
	testl	%eax, %eax
	js	LBB0_36
## %bb.6:
	cmpl	$77, %ebx
	jne	LBB0_16
## %bb.7:
	cmpl	$1, %eax
	jne	LBB0_16
## %bb.8:
	movq	%r13, %rbx
	leaq	L_.str.2(%rip), %r14
LBB0_9:
	movq	%r15, %rdi
	callq	_i2c_adapter_id
	movl	(%r12), %ecx
	leaq	L_.str.10(%rip), %rdi
	xorl	%r13d, %r13d
	movq	%r14, %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_pr_debug
	movl	(%rbx), %edi
	movq	_I2C_NAME_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rsi
	callq	_strlcpy
	jmp	LBB0_15
LBB0_10:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_12
LBB0_11:
	leaq	L_.str.1(%rip), %rdi
LBB0_12:
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_pr_debug
LBB0_13:
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_14:
	subl	(%rax), %r13d
LBB0_15:
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	cmpl	$72, %ebx
	jg	LBB0_22
## %bb.17:
	cmpl	$35, %ebx
	je	LBB0_37
## %bb.18:
	cmpl	$65, %ebx
	jne	LBB0_25
## %bb.19:
	andb	$-16, %al
	cmpb	$48, %al
	je	LBB0_39
## %bb.20:
	testb	%al, %al
	jne	LBB0_36
## %bb.21:
	movq	%r13, %rbx
	leaq	L_.str.4(%rip), %r14
	jmp	LBB0_9
LBB0_22:
	cmpl	$73, %ebx
	je	LBB0_38
## %bb.23:
	cmpl	$84, %ebx
	jne	LBB0_25
## %bb.24:
	movq	%r13, %rbx
	leaq	L_.str.7(%rip), %r14
	jmp	LBB0_9
LBB0_25:
	movq	%r13, %rbx
	xorl	%r13d, %r13d
	xorl	%edi, %edi
	callq	_ADM1021_REG_THYST_R
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	$1, %edi
	callq	_ADM1021_REG_THYST_R
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_i2c_smbus_read_byte_data
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	js	LBB0_13
## %bb.26:
	testl	%eax, %eax
	js	LBB0_13
## %bb.27:
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	xorl	%r13d, %r13d
	xorl	%edi, %edi
	callq	_ADM1021_REG_TEMP
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movl	$1, %edi
	callq	_ADM1021_REG_TEMP
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	xorl	%edi, %edi
	callq	_ADM1021_REG_TOS_R
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movl	$1, %edi
	callq	_ADM1021_REG_TOS_R
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_i2c_smbus_read_byte_data
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
	movl	-56(%rbp), %edi                 ## 4-byte Reload
	movl	-64(%rbp), %esi                 ## 4-byte Reload
	testl	%esi, %esi
	js	LBB0_13
## %bb.28:
	testl	%ecx, %ecx
	js	LBB0_13
## %bb.29:
	testl	%edi, %edi
	js	LBB0_13
## %bb.30:
	testl	%eax, %eax
	js	LBB0_13
## %bb.31:
	cmpl	%ecx, %esi
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	jne	LBB0_40
## %bb.32:
	cmpl	%edi, %esi
	jne	LBB0_40
## %bb.33:
	cmpl	%eax, %esi
	jne	LBB0_40
## %bb.34:
	cmpl	%ecx, %esi
	jne	LBB0_40
## %bb.35:
	cmpl	%edx, %esi
	jne	LBB0_40
LBB0_36:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	jmp	LBB0_14
LBB0_37:
	movq	%r13, %rbx
	leaq	L_.str.6(%rip), %r14
	jmp	LBB0_9
LBB0_38:
	movq	%r13, %rbx
	leaq	L_.str.5(%rip), %r14
	jmp	LBB0_9
LBB0_39:
	movq	%r13, %rbx
	leaq	L_.str.3(%rip), %r14
	jmp	LBB0_9
LBB0_40:
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_44
## %bb.41:
	andl	$127, %r14d
	jne	LBB0_44
## %bb.42:
	andl	$171, -68(%rbp)                 ## 4-byte Folded Spill
	jne	LBB0_44
## %bb.43:
	leaq	L_.str.8(%rip), %r14
	jmp	LBB0_9
LBB0_44:
	cmpl	%edi, %ecx
	ja	LBB0_36
## %bb.45:
	cmpl	%eax, %edx
	ja	LBB0_36
## %bb.46:
	leaq	L_.str.9(%rip), %r14
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_FUNC_SMBUS_BYTE_DATA,4,2   ## @I2C_FUNC_SMBUS_BYTE_DATA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"detect failed, smbus byte data not supported!\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_ADM1021_REG_STATUS,4,2         ## @ADM1021_REG_STATUS
	.comm	_ADM1021_REG_CONV_RATE_R,4,2    ## @ADM1021_REG_CONV_RATE_R
	.comm	_ADM1021_REG_CONFIG_R,4,2       ## @ADM1021_REG_CONFIG_R
L_.str.1:                               ## @.str.1
	.asciz	"detect failed, chip not detected!\n"

	.comm	_ADM1021_REG_MAN_ID,4,2         ## @ADM1021_REG_MAN_ID
	.comm	_ADM1021_REG_DEV_ID,4,2         ## @ADM1021_REG_DEV_ID
L_.str.2:                               ## @.str.2
	.asciz	"max1617a"

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

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

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

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

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

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

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

L_.str.10:                              ## @.str.10
	.asciz	"Detected chip %s at adapter %d, address 0x%02x.\n"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adm1021_detect
_adm1021_detect:                        ; @adm1021_detect
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	mov	x20, x0
	ldr	x21, [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, x21
	bl	_i2c_check_functionality
	cbz	w0, LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _ADM1021_REG_STATUS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ADM1021_REG_STATUS@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_i2c_smbus_read_byte_data
	mov	x22, x0
Lloh6:
	adrp	x8, _ADM1021_REG_CONV_RATE_R@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ADM1021_REG_CONV_RATE_R@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_i2c_smbus_read_byte_data
	mov	x23, x0
Lloh9:
	adrp	x8, _ADM1021_REG_CONFIG_R@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ADM1021_REG_CONFIG_R@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_i2c_smbus_read_byte_data
	and	w8, w22, #0x3
	and	w9, w0, #0x3f
	and	w10, w23, #0xf8
	cmp	w8, #0
	ccmp	w9, #0, #0, eq
	ccmp	w10, #0, #0, eq
	b.eq	LBB0_7
; %bb.2:
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_3:
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
LBB0_4:
	bl	_pr_debug
LBB0_5:
Lloh16:
	adrp	x8, _ENODEV@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_7:
	mov	x24, x0
Lloh19:
	adrp	x8, _ADM1021_REG_MAN_ID@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ADM1021_REG_MAN_ID@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_i2c_smbus_read_byte_data
	mov	x25, x0
Lloh22:
	adrp	x8, _ADM1021_REG_DEV_ID@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ADM1021_REG_DEV_ID@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_i2c_smbus_read_byte_data
	tbnz	w25, #31, LBB0_5
; %bb.8:
	tbnz	w0, #31, LBB0_5
; %bb.9:
	cmp	w25, #77
	ccmp	w0, #1, #0, eq
	b.eq	LBB0_16
; %bb.10:
	cmp	w25, #72
	b.gt	LBB0_18
; %bb.11:
	cmp	w25, #35
	b.eq	LBB0_36
; %bb.12:
	cmp	w25, #65
	b.ne	LBB0_21
; %bb.13:
	and	w8, w0, #0xf0
	cmp	w8, #48
	b.eq	LBB0_38
; %bb.14:
	cbnz	w8, LBB0_5
; %bb.15:
Lloh25:
	adrp	x22, l_.str.4@PAGE
Lloh26:
	add	x22, x22, l_.str.4@PAGEOFF
	b	LBB0_17
LBB0_16:
Lloh27:
	adrp	x22, l_.str.2@PAGE
Lloh28:
	add	x22, x22, l_.str.2@PAGEOFF
LBB0_17:
	mov	x0, x21
	bl	_i2c_adapter_id
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	w8, [x20]
	stp	x0, x8, [sp, #8]
	str	x22, [sp]
Lloh29:
	adrp	x0, l_.str.10@PAGE
Lloh30:
	add	x0, x0, l_.str.10@PAGEOFF
	bl	_pr_debug
	ldr	w0, [x19]
Lloh31:
	adrp	x8, _I2C_NAME_SIZE@GOTPAGE
Lloh32:
	ldr	x8, [x8, _I2C_NAME_SIZE@GOTPAGEOFF]
Lloh33:
	ldr	w2, [x8]
	mov	x1, x22
	bl	_strlcpy
	mov	w0, #0
	b	LBB0_6
LBB0_18:
	cmp	w25, #73
	b.eq	LBB0_37
; %bb.19:
	cmp	w25, #84
	b.ne	LBB0_21
; %bb.20:
Lloh34:
	adrp	x22, l_.str.7@PAGE
Lloh35:
	add	x22, x22, l_.str.7@PAGEOFF
	b	LBB0_17
LBB0_21:
	mov	w0, #0
	bl	_ADM1021_REG_THYST_R
	mov	x1, x0
	mov	x0, x20
	bl	_i2c_smbus_read_byte_data
	mov	x25, x0
	mov	w0, #1
	bl	_ADM1021_REG_THYST_R
	mov	x1, x0
	mov	x0, x20
	bl	_i2c_smbus_read_byte_data
	tbnz	w25, #31, LBB0_5
; %bb.22:
	tbnz	w0, #31, LBB0_5
; %bb.23:
	str	w0, [sp, #28]                   ; 4-byte Folded Spill
	mov	w0, #0
	bl	_ADM1021_REG_TEMP
	mov	x1, x0
	mov	x0, x20
	bl	_i2c_smbus_read_byte_data
	mov	x27, x0
	mov	w0, #1
	bl	_ADM1021_REG_TEMP
	mov	x1, x0
	mov	x0, x20
	bl	_i2c_smbus_read_byte_data
	mov	x28, x0
	mov	w0, #0
	bl	_ADM1021_REG_TOS_R
	mov	x1, x0
	mov	x0, x20
	bl	_i2c_smbus_read_byte_data
	mov	x26, x0
	mov	w0, #1
	bl	_ADM1021_REG_TOS_R
	mov	x1, x0
	mov	x0, x20
	bl	_i2c_smbus_read_byte_data
	tbnz	w27, #31, LBB0_5
; %bb.24:
	tbnz	w28, #31, LBB0_5
; %bb.25:
	tbnz	w26, #31, LBB0_5
; %bb.26:
	tbnz	w0, #31, LBB0_5
; %bb.27:
	cmp	w27, w28
	ldr	w9, [sp, #28]                   ; 4-byte Folded Reload
	b.ne	LBB0_32
; %bb.28:
	cmp	w27, w26
	b.ne	LBB0_32
; %bb.29:
	cmp	w27, w0
	b.ne	LBB0_32
; %bb.30:
	cmp	w27, w25
	b.ne	LBB0_32
; %bb.31:
	cmp	w27, w9
	b.eq	LBB0_5
LBB0_32:
	cbnz	w23, LBB0_39
; %bb.33:
	and	w8, w24, #0x7f
	cbnz	w8, LBB0_39
; %bb.34:
	mov	w8, #171
	and	w8, w22, w8
	cbnz	w8, LBB0_39
; %bb.35:
Lloh36:
	adrp	x22, l_.str.8@PAGE
Lloh37:
	add	x22, x22, l_.str.8@PAGEOFF
	b	LBB0_17
LBB0_36:
Lloh38:
	adrp	x22, l_.str.6@PAGE
Lloh39:
	add	x22, x22, l_.str.6@PAGEOFF
	b	LBB0_17
LBB0_37:
Lloh40:
	adrp	x22, l_.str.5@PAGE
Lloh41:
	add	x22, x22, l_.str.5@PAGEOFF
	b	LBB0_17
LBB0_38:
Lloh42:
	adrp	x22, l_.str.3@PAGE
Lloh43:
	add	x22, x22, l_.str.3@PAGEOFF
	b	LBB0_17
LBB0_39:
	cmp	w25, w26
	b.hi	LBB0_5
; %bb.40:
	cmp	w9, w0
	b.hi	LBB0_5
; %bb.41:
Lloh44:
	adrp	x22, l_.str.9@PAGE
Lloh45:
	add	x22, x22, l_.str.9@PAGEOFF
	b	LBB0_17
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpAdd	Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_FUNC_SMBUS_BYTE_DATA,4,2   ; @I2C_FUNC_SMBUS_BYTE_DATA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"detect failed, smbus byte data not supported!\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_ADM1021_REG_STATUS,4,2         ; @ADM1021_REG_STATUS
	.comm	_ADM1021_REG_CONV_RATE_R,4,2    ; @ADM1021_REG_CONV_RATE_R
	.comm	_ADM1021_REG_CONFIG_R,4,2       ; @ADM1021_REG_CONFIG_R
l_.str.1:                               ; @.str.1
	.asciz	"detect failed, chip not detected!\n"

	.comm	_ADM1021_REG_MAN_ID,4,2         ; @ADM1021_REG_MAN_ID
	.comm	_ADM1021_REG_DEV_ID,4,2         ; @ADM1021_REG_DEV_ID
l_.str.2:                               ; @.str.2
	.asciz	"max1617a"

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

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

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

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

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

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

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

l_.str.10:                              ; @.str.10
	.asciz	"Detected chip %s at adapter %d, address 0x%02x.\n"

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