	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adm1031_detect
_adm1031_detect:                        ## @adm1031_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
	js	LBB0_4
## %bb.3:
	movq	_adm1031@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_adm1030@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_7
LBB0_4:
	movq	%r15, %rdi
	movl	$61, %esi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, %ebx
	movq	%r15, %rdi
	movl	$62, %esi
	callq	_i2c_smbus_read_byte_data
	movl	%ebx, %ecx
	andl	$-2, %ecx
	cmpl	$48, %ecx
	jne	LBB0_1
## %bb.5:
	cmpl	$65, %eax
	jne	LBB0_1
## %bb.6:
	cmpl	$48, %ebx
	movq	_adm1030@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_adm1031@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, %ebx
	cmovel	%eax, %ebx
LBB0_7:
	testl	%ebx, %ebx
	cmovlel	%ecx, %ebx
	cmpl	%ecx, %ebx
	leaq	L_.str.2(%rip), %rcx
	leaq	L_.str(%rip), %rdx
	cmoveq	%rcx, %rdx
	cmpl	%eax, %ebx
	leaq	L_.str.1(%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_8
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.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	_adm1030,4,2                    ## @adm1030
	.comm	_adm1031,4,2                    ## @adm1031
L_.str.1:                               ## @.str.1
	.asciz	"adm1030"

L_.str.2:                               ## @.str.2
	.asciz	"adm1031"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adm1031_detect
_adm1031_detect:                        ; @adm1031_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	x20, x1
	mov	x21, 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_7
; %bb.1:
	tbnz	w20, #31, LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _adm1031@GOTPAGE
Lloh4:
	ldr	x8, [x8, _adm1031@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x8]
Lloh6:
	adrp	x8, _adm1030@GOTPAGE
Lloh7:
	ldr	x8, [x8, _adm1030@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	b	LBB0_6
LBB0_3:
	mov	x0, x21
	mov	w1, #61
	bl	_i2c_smbus_read_byte_data
	mov	x20, x0
	mov	x0, x21
	mov	w1, #62
	bl	_i2c_smbus_read_byte_data
	and	w8, w20, #0xfffffffe
	cmp	w8, #48
	b.ne	LBB0_7
; %bb.4:
	cmp	w0, #65
	b.ne	LBB0_7
; %bb.5:
Lloh9:
	adrp	x8, _adm1030@GOTPAGE
Lloh10:
	ldr	x8, [x8, _adm1030@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _adm1031@GOTPAGE
Lloh13:
	ldr	x9, [x9, _adm1031@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	cmp	w20, #48
	csel	w20, w8, w9, eq
LBB0_6:
	cmp	w20, #1
	csel	w10, w9, w20, lt
Lloh15:
	adrp	x11, l_.str@PAGE
Lloh16:
	add	x11, x11, l_.str@PAGEOFF
Lloh17:
	adrp	x12, l_.str.2@PAGE
Lloh18:
	add	x12, x12, l_.str.2@PAGEOFF
	cmp	w10, w9
	csel	x9, x12, x11, eq
Lloh19:
	adrp	x11, l_.str.1@PAGE
Lloh20:
	add	x11, x11, l_.str.1@PAGEOFF
	cmp	w10, w8
	csel	x1, x11, x9, eq
	ldr	w0, [x19]
Lloh21:
	adrp	x8, _I2C_NAME_SIZE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _I2C_NAME_SIZE@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	bl	_strlcpy
	mov	w0, #0
	b	LBB0_8
LBB0_7:
Lloh24:
	adrp	x8, _ENODEV@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	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	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.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	_adm1030,4,2                    ; @adm1030
	.comm	_adm1031,4,2                    ; @adm1031
l_.str.1:                               ; @.str.1
	.asciz	"adm1030"

l_.str.2:                               ; @.str.2
	.asciz	"adm1031"

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