	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lm78_i2c_detect
_lm78_i2c_detect:                       ## @lm78_i2c_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, -56(%rbp)                 ## 8-byte Spill
	movl	%esi, %r13d
	movq	%rdi, %r15
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_lm78_data_if_isa
	movq	%rax, %rbx
	movq	8(%r15), %r12
	movl	(%r15), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_I2C_FUNC_SMBUS_BYTE_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_i2c_check_functionality
	testl	%eax, %eax
	je	LBB0_8
## %bb.1:
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_mutex_lock
LBB0_3:
	testl	%r13d, %r13d
	js	LBB0_9
## %bb.4:
	je	LBB0_13
LBB0_5:
	testq	%rbx, %rbx
	je	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	callq	_mutex_unlock
LBB0_7:
	cmpl	$128, %r13d
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.3(%rip), %rsi
	cmoveq	%rax, %rsi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movq	_I2C_NAME_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_strlcpy
	xorl	%r14d, %r14d
	jmp	LBB0_23
LBB0_8:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_22
LBB0_9:
	movq	_LM78_REG_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_i2c_smbus_read_byte_data
	testb	$-128, %al
	jne	LBB0_19
## %bb.10:
	movq	_LM78_REG_I2C_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_i2c_smbus_read_byte_data
	cmpl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	jne	LBB0_19
## %bb.11:
	movq	%r15, %rdi
	movl	$79, %esi
	callq	_i2c_smbus_read_byte_data
	cmpl	$92, %eax
	je	LBB0_19
## %bb.12:
	cmpl	$163, %eax
	je	LBB0_19
LBB0_13:
	movq	_LM78_REG_CHIPID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_i2c_smbus_read_byte_data
	testl	%eax, %eax
	je	LBB0_16
## %bb.14:
	cmpl	$64, %eax
	je	LBB0_16
## %bb.15:
	cmpl	$32, %eax
	jne	LBB0_24
LBB0_16:
	movq	_lm78@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
LBB0_17:
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_lm78_alias_detect
	movl	%r14d, %r13d
	testq	%rax, %rax
	je	LBB0_5
## %bb.18:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_dev_dbg
LBB0_19:
	testq	%rbx, %rbx
	je	LBB0_21
## %bb.20:
	movq	%rbx, %rdi
	callq	_mutex_unlock
LBB0_21:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
LBB0_22:
	subl	(%rax), %r14d
LBB0_23:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_24:
	movl	%eax, %ecx
	andl	$254, %ecx
	movl	$128, %r14d
	cmpl	$192, %ecx
	je	LBB0_17
## %bb.25:
	testl	%r13d, %r13d
	jne	LBB0_19
## %bb.26:
	movq	%r12, %rdi
	callq	_i2c_adapter_id
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_dev_warn
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_FUNC_SMBUS_BYTE_DATA,4,2   ## @I2C_FUNC_SMBUS_BYTE_DATA
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_LM78_REG_CONFIG,4,2            ## @LM78_REG_CONFIG
	.comm	_LM78_REG_I2C_ADDR,4,2          ## @LM78_REG_I2C_ADDR
	.comm	_LM78_REG_CHIPID,4,2            ## @LM78_REG_CHIPID
	.comm	_lm78,4,2                       ## @lm78
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Ignoring 'force' parameter for unknown chip at adapter %d, address 0x%02x\n"

L_.str.1:                               ## @.str.1
	.asciz	"Device at 0x%02x appears to be the same as ISA device\n"

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

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

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lm78_i2c_detect
_lm78_i2c_detect:                       ; @lm78_i2c_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, x2
	mov	x21, x1
	mov	x24, x0
	bl	_lm78_data_if_isa
	mov	x19, x0
	ldr	x23, [x24, #8]
	ldr	w22, [x24]
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, x23
	bl	_i2c_check_functionality
	cbz	w0, LBB0_20
; %bb.1:
	cbz	x19, LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_mutex_lock
LBB0_3:
	tbnz	w21, #31, LBB0_8
; %bb.4:
	cbz	w21, LBB0_12
LBB0_5:
	cbz	x19, LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_7:
Lloh3:
	adrp	x8, l_.str.3@PAGE
Lloh4:
	add	x8, x8, l_.str.3@PAGEOFF
Lloh5:
	adrp	x9, l_.str.2@PAGE
Lloh6:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	w21, #128
	csel	x1, x9, x8, eq
	ldr	w0, [x20]
Lloh7:
	adrp	x8, _I2C_NAME_SIZE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _I2C_NAME_SIZE@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	bl	_strlcpy
	mov	w0, #0
	b	LBB0_21
LBB0_8:
Lloh10:
	adrp	x8, _LM78_REG_CONFIG@GOTPAGE
Lloh11:
	ldr	x8, [x8, _LM78_REG_CONFIG@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x24
	bl	_i2c_smbus_read_byte_data
	tbnz	w0, #7, LBB0_18
; %bb.9:
Lloh13:
	adrp	x8, _LM78_REG_I2C_ADDR@GOTPAGE
Lloh14:
	ldr	x8, [x8, _LM78_REG_I2C_ADDR@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x24
	bl	_i2c_smbus_read_byte_data
	cmp	w0, w22
	b.ne	LBB0_18
; %bb.10:
	mov	x0, x24
	mov	w1, #79
	bl	_i2c_smbus_read_byte_data
	cmp	w0, #92
	b.eq	LBB0_18
; %bb.11:
	cmp	w0, #163
	b.eq	LBB0_18
LBB0_12:
Lloh16:
	adrp	x8, _LM78_REG_CHIPID@GOTPAGE
Lloh17:
	ldr	x8, [x8, _LM78_REG_CHIPID@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x24
	bl	_i2c_smbus_read_byte_data
	mov	x1, x0
	cbz	w0, LBB0_15
; %bb.13:
	cmp	w1, #64
	b.eq	LBB0_15
; %bb.14:
	cmp	w1, #32
	b.ne	LBB0_22
LBB0_15:
Lloh19:
	adrp	x8, _lm78@GOTPAGE
Lloh20:
	ldr	x8, [x8, _lm78@GOTPAGEOFF]
Lloh21:
	ldr	w21, [x8]
LBB0_16:
	mov	x0, x24
	bl	_lm78_alias_detect
	cbz	x0, LBB0_5
; %bb.17:
Lloh22:
	adrp	x1, l_.str.1@PAGE
Lloh23:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x23
	mov	x2, x22
	bl	_dev_dbg
LBB0_18:
	cbz	x19, LBB0_20
; %bb.19:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_20:
Lloh24:
	adrp	x8, _ENODEV@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_21:
	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_22:
	and	w8, w1, #0xfe
	cmp	w8, #192
	b.ne	LBB0_24
; %bb.23:
	mov	w21, #128
	b	LBB0_16
LBB0_24:
	cbnz	w21, LBB0_18
; %bb.25:
	mov	x0, x23
	bl	_i2c_adapter_id
	mov	x2, x0
Lloh27:
	adrp	x1, l_.str@PAGE
Lloh28:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	mov	x3, x22
	bl	_dev_warn
	b	LBB0_18
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_FUNC_SMBUS_BYTE_DATA,4,2   ; @I2C_FUNC_SMBUS_BYTE_DATA
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_LM78_REG_CONFIG,4,2            ; @LM78_REG_CONFIG
	.comm	_LM78_REG_I2C_ADDR,4,2          ; @LM78_REG_I2C_ADDR
	.comm	_LM78_REG_CHIPID,4,2            ; @LM78_REG_CHIPID
	.comm	_lm78,4,2                       ; @lm78
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Ignoring 'force' parameter for unknown chip at adapter %d, address 0x%02x\n"

l_.str.1:                               ; @.str.1
	.asciz	"Device at 0x%02x appears to be the same as ISA device\n"

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

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

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