	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function w83l786ng_detect
_w83l786ng_detect:                      ## @w83l786ng_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
	movq	_I2C_FUNC_SMBUS_BYTE_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_i2c_check_functionality
	testl	%eax, %eax
	je	LBB0_5
## %bb.1:
	movq	_W83L786NG_REG_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_w83l786ng_read_value
	testb	$-128, %al
	jne	LBB0_6
## %bb.2:
	movq	_W83L786NG_REG_MAN_ID1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_w83l786ng_read_value
	movl	%eax, %r13d
	shll	$8, %r13d
	movq	_W83L786NG_REG_MAN_ID2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_w83l786ng_read_value
	movl	%eax, %r12d
	addl	%r13d, %r12d
	movq	_W83L786NG_REG_CHIP_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_w83l786ng_read_value
	cmpl	$23715, %r12d                   ## imm = 0x5CA3
	jne	LBB0_7
## %bb.3:
	cmpl	$128, %eax
	jne	LBB0_7
## %bb.4:
	movl	(%r14), %edi
	movq	_I2C_NAME_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.2(%rip), %rsi
	callq	_strlcpy
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_5:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	jmp	LBB0_9
LBB0_6:
	movl	(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
	jmp	LBB0_8
LBB0_7:
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	movl	%r12d, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_8:
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_9:
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_FUNC_SMBUS_BYTE_DATA,4,2   ## @I2C_FUNC_SMBUS_BYTE_DATA
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_W83L786NG_REG_CONFIG,4,2       ## @W83L786NG_REG_CONFIG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"W83L786NG detection failed at 0x%02x\n"

	.comm	_W83L786NG_REG_MAN_ID1,4,2      ## @W83L786NG_REG_MAN_ID1
	.comm	_W83L786NG_REG_MAN_ID2,4,2      ## @W83L786NG_REG_MAN_ID2
	.comm	_W83L786NG_REG_CHIP_ID,4,2      ## @W83L786NG_REG_CHIP_ID
L_.str.1:                               ## @.str.1
	.asciz	"Unsupported chip (man_id=0x%04X, chip_id=0x%02X)\n"

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

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function w83l786ng_detect
_w83l786ng_detect:                      ; @w83l786ng_detect
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x1
	mov	x21, x0
	ldr	x19, [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, x19
	bl	_i2c_check_functionality
	cbz	w0, LBB0_8
; %bb.1:
Lloh3:
	adrp	x8, _W83L786NG_REG_CONFIG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _W83L786NG_REG_CONFIG@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_w83l786ng_read_value
	tbnz	w0, #7, LBB0_5
; %bb.2:
Lloh6:
	adrp	x8, _W83L786NG_REG_MAN_ID1@GOTPAGE
Lloh7:
	ldr	x8, [x8, _W83L786NG_REG_MAN_ID1@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_w83l786ng_read_value
	mov	x22, x0
Lloh9:
	adrp	x8, _W83L786NG_REG_MAN_ID2@GOTPAGE
Lloh10:
	ldr	x8, [x8, _W83L786NG_REG_MAN_ID2@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_w83l786ng_read_value
	add	w22, w0, w22, lsl #8
Lloh12:
	adrp	x8, _W83L786NG_REG_CHIP_ID@GOTPAGE
Lloh13:
	ldr	x8, [x8, _W83L786NG_REG_CHIP_ID@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_w83l786ng_read_value
                                        ; kill: def $w0 killed $w0 def $x0
	mov	w8, #23715
	cmp	w22, w8
	b.ne	LBB0_6
; %bb.3:
	cmp	w0, #128
	b.ne	LBB0_6
; %bb.4:
	ldr	w0, [x20]
Lloh15:
	adrp	x8, _I2C_NAME_SIZE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _I2C_NAME_SIZE@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_strlcpy
	mov	w0, #0
	b	LBB0_9
LBB0_5:
	ldr	w2, [x21]
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	b	LBB0_7
LBB0_6:
	str	x0, [sp]
Lloh22:
	adrp	x1, l_.str.1@PAGE
Lloh23:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x22
LBB0_7:
	bl	_dev_dbg
LBB0_8:
Lloh24:
	adrp	x8, _ENODEV@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_FUNC_SMBUS_BYTE_DATA,4,2   ; @I2C_FUNC_SMBUS_BYTE_DATA
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_W83L786NG_REG_CONFIG,4,2       ; @W83L786NG_REG_CONFIG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"W83L786NG detection failed at 0x%02x\n"

	.comm	_W83L786NG_REG_MAN_ID1,4,2      ; @W83L786NG_REG_MAN_ID1
	.comm	_W83L786NG_REG_MAN_ID2,4,2      ; @W83L786NG_REG_MAN_ID2
	.comm	_W83L786NG_REG_CHIP_ID,4,2      ; @W83L786NG_REG_CHIP_ID
l_.str.1:                               ; @.str.1
	.asciz	"Unsupported chip (man_id=0x%04X, chip_id=0x%02X)\n"

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

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