	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lm77_detect
_lm77_detect:                           ## @lm77_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	$24, %rsp
	.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	(%rdi), %rdi
	movq	_I2C_FUNC_SMBUS_BYTE_DATA@GOTPCREL(%rip), %rax
	movq	_I2C_FUNC_SMBUS_WORD_DATA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	callq	_i2c_check_functionality
	testl	%eax, %eax
	je	LBB0_21
## %bb.1:
	testl	%ebx, %ebx
	js	LBB0_3
LBB0_2:
	movl	(%r14), %edi
	movq	_I2C_NAME_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	callq	_strlcpy
	xorl	%ebx, %ebx
	jmp	LBB0_23
LBB0_3:
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_i2c_smbus_read_word_data
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%r12, %rdi
	movl	$2, %esi
	callq	_i2c_smbus_read_word_data
	movl	%eax, %r15d
	movq	%r12, %rdi
	movl	$3, %esi
	callq	_i2c_smbus_read_word_data
	movl	%eax, %r14d
	movq	%r12, %rdi
	movl	$4, %esi
	callq	_i2c_smbus_read_word_data
	movl	%eax, %r13d
	movq	%r12, %rdi
	movl	$5, %esi
	callq	_i2c_smbus_read_word_data
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	leal	9(%rbx), %esi
	movq	%r12, %rdi
	callq	_i2c_smbus_read_byte_data
	cmpl	-48(%rbp), %eax                 ## 4-byte Folded Reload
	jne	LBB0_21
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	leal	10(%rbx), %esi
	movq	%r12, %rdi
	callq	_i2c_smbus_read_word_data
	cmpl	%r15d, %eax
	jne	LBB0_21
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	leal	11(%rbx), %esi
	movq	%r12, %rdi
	callq	_i2c_smbus_read_word_data
	cmpl	%r14d, %eax
	jne	LBB0_21
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	leal	12(%rbx), %esi
	movq	%r12, %rdi
	callq	_i2c_smbus_read_word_data
	cmpl	%r13d, %eax
	jne	LBB0_21
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	leal	13(%rbx), %esi
	movq	%r12, %rdi
	callq	_i2c_smbus_read_word_data
	cmpl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	jne	LBB0_21
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	addl	$8, %ebx
	cmpl	$247, %ebx
	jbe	LBB0_4
## %bb.10:
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	andb	$-16, %al
	je	LBB0_12
## %bb.11:
	cmpb	$-16, %al
	jne	LBB0_21
LBB0_12:
	andb	$-16, %r15b
	je	LBB0_14
## %bb.13:
	cmpb	$-16, %r15b
	jne	LBB0_21
LBB0_14:
	andb	$-16, %r14b
	je	LBB0_16
## %bb.15:
	cmpb	$-16, %r14b
	jne	LBB0_21
LBB0_16:
	andb	$-16, %r13b
	je	LBB0_18
## %bb.17:
	cmpb	$-16, %r13b
	jne	LBB0_21
LBB0_18:
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	andb	$-16, %cl
	cmpb	$-16, %cl
	je	LBB0_20
## %bb.19:
	movl	%ecx, %eax
	testb	%al, %al
	jne	LBB0_21
LBB0_20:
	testb	$-32, -48(%rbp)                 ## 1-byte Folded Reload
	je	LBB0_24
LBB0_21:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_22:
	subl	(%rax), %ebx
LBB0_23:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_24:
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_i2c_smbus_read_word_data
	movl	%eax, %r14d
	movq	%r12, %rdi
	movl	$6, %esi
	callq	_i2c_smbus_read_word_data
	cmpl	%r14d, %eax
	jne	LBB0_30
## %bb.25:
	movq	%r12, %rdi
	movl	$7, %esi
	callq	_i2c_smbus_read_word_data
	cmpl	%r14d, %eax
	jne	LBB0_30
## %bb.26:
	movq	%r12, %rdi
	movl	$2, %esi
	callq	_i2c_smbus_read_word_data
	movl	%eax, %ebx
	movq	%r12, %rdi
	movl	$6, %esi
	callq	_i2c_smbus_read_word_data
	cmpl	%ebx, %eax
	jne	LBB0_21
## %bb.27:
	movq	%r12, %rdi
	movl	$7, %esi
	callq	_i2c_smbus_read_word_data
	cmpl	%ebx, %eax
	jne	LBB0_21
## %bb.28:
	movq	%r12, %rdi
	movl	$4, %esi
	callq	_i2c_smbus_read_word_data
	movl	%eax, %ebx
	movq	%r12, %rdi
	movl	$6, %esi
	callq	_i2c_smbus_read_word_data
	cmpl	%ebx, %eax
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	jne	LBB0_21
## %bb.29:
	movq	%r12, %rdi
	movl	$7, %esi
	callq	_i2c_smbus_read_word_data
	cmpl	%ebx, %eax
	je	LBB0_2
	jmp	LBB0_21
LBB0_30:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_FUNC_SMBUS_BYTE_DATA,4,2   ## @I2C_FUNC_SMBUS_BYTE_DATA
	.comm	_I2C_FUNC_SMBUS_WORD_DATA,4,2   ## @I2C_FUNC_SMBUS_WORD_DATA
	.comm	_ENODEV,4,2                     ## @ENODEV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"lm77"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lm77_detect
_lm77_detect:                           ; @lm77_detect
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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, x2
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _I2C_FUNC_SMBUS_BYTE_DATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I2C_FUNC_SMBUS_BYTE_DATA@GOTPAGEOFF]
	ldr	x0, [x0]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _I2C_FUNC_SMBUS_WORD_DATA@GOTPAGE
Lloh4:
	ldr	x9, [x9, _I2C_FUNC_SMBUS_WORD_DATA@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_i2c_check_functionality
	cbz	w0, LBB0_27
; %bb.1:
	tbnz	w21, #31, LBB0_3
LBB0_2:
	ldr	w0, [x19]
Lloh6:
	adrp	x8, _I2C_NAME_SIZE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _I2C_NAME_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strlcpy
	mov	w0, #0
	b	LBB0_28
LBB0_3:
	mov	x0, x20
	mov	w1, #0
	bl	_i2c_smbus_read_word_data
	mov	x23, x0
	mov	x0, x20
	mov	w1, #1
	bl	_i2c_smbus_read_byte_data
	mov	x21, x0
	mov	x0, x20
	mov	w1, #2
	bl	_i2c_smbus_read_word_data
	mov	x26, x0
	mov	x0, x20
	mov	w1, #3
	bl	_i2c_smbus_read_word_data
	mov	x25, x0
	mov	x0, x20
	mov	w1, #4
	bl	_i2c_smbus_read_word_data
	mov	x24, x0
	mov	x0, x20
	mov	w1, #5
	bl	_i2c_smbus_read_word_data
	mov	x22, x0
	mov	w27, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	w1, w27, #9
	mov	x0, x20
	bl	_i2c_smbus_read_byte_data
	cmp	w0, w21
	b.ne	LBB0_27
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	w1, w27, #10
	mov	x0, x20
	bl	_i2c_smbus_read_word_data
	cmp	w0, w26
	b.ne	LBB0_27
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	add	w1, w27, #11
	mov	x0, x20
	bl	_i2c_smbus_read_word_data
	cmp	w0, w25
	b.ne	LBB0_27
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	add	w1, w27, #12
	mov	x0, x20
	bl	_i2c_smbus_read_word_data
	cmp	w0, w24
	b.ne	LBB0_27
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	add	w1, w27, #13
	mov	x0, x20
	bl	_i2c_smbus_read_word_data
	cmp	w0, w22
	b.ne	LBB0_27
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	add	w27, w27, #8
	cmp	w27, #247
	b.ls	LBB0_4
; %bb.10:
	and	w8, w23, #0xf0
	cmp	w8, #240
	b.eq	LBB0_12
; %bb.11:
	cbnz	w8, LBB0_27
LBB0_12:
	and	w8, w26, #0xf0
	cmp	w8, #240
	b.eq	LBB0_14
; %bb.13:
	cbnz	w8, LBB0_27
LBB0_14:
	and	w8, w25, #0xf0
	cmp	w8, #240
	b.eq	LBB0_16
; %bb.15:
	cbnz	w8, LBB0_27
LBB0_16:
	and	w8, w24, #0xf0
	cmp	w8, #240
	b.eq	LBB0_18
; %bb.17:
	cbnz	w8, LBB0_27
LBB0_18:
	ands	w8, w22, #0xf0
	b.eq	LBB0_20
; %bb.19:
	cmp	w8, #240
	b.ne	LBB0_27
LBB0_20:
	tst	w21, #0xe0
	b.ne	LBB0_27
; %bb.21:
	mov	x0, x20
	mov	w1, #0
	bl	_i2c_smbus_read_word_data
	mov	x21, x0
	mov	x0, x20
	mov	w1, #6
	bl	_i2c_smbus_read_word_data
	cmp	w0, w21
	b.ne	LBB0_27
; %bb.22:
	mov	x0, x20
	mov	w1, #7
	bl	_i2c_smbus_read_word_data
	cmp	w0, w21
	b.ne	LBB0_27
; %bb.23:
	mov	x0, x20
	mov	w1, #2
	bl	_i2c_smbus_read_word_data
	mov	x21, x0
	mov	x0, x20
	mov	w1, #6
	bl	_i2c_smbus_read_word_data
	cmp	w0, w21
	b.ne	LBB0_27
; %bb.24:
	mov	x0, x20
	mov	w1, #7
	bl	_i2c_smbus_read_word_data
	cmp	w0, w21
	b.ne	LBB0_27
; %bb.25:
	mov	x0, x20
	mov	w1, #4
	bl	_i2c_smbus_read_word_data
	mov	x21, x0
	mov	x0, x20
	mov	w1, #6
	bl	_i2c_smbus_read_word_data
	cmp	w0, w21
	b.ne	LBB0_27
; %bb.26:
	mov	x0, x20
	mov	w1, #7
	bl	_i2c_smbus_read_word_data
	cmp	w0, w21
	b.eq	LBB0_2
LBB0_27:
Lloh11:
	adrp	x8, _ENODEV@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_28:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_FUNC_SMBUS_BYTE_DATA,4,2   ; @I2C_FUNC_SMBUS_BYTE_DATA
	.comm	_I2C_FUNC_SMBUS_WORD_DATA,4,2   ; @I2C_FUNC_SMBUS_WORD_DATA
	.comm	_ENODEV,4,2                     ; @ENODEV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"lm77"

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