	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function w83l785ts_detect
_w83l785ts_detect:                      ## @w83l785ts_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, %r15
	movq	%rdi, %rbx
	movq	8(%rdi), %r14
	movq	_I2C_FUNC_SMBUS_BYTE_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_i2c_check_functionality
	testl	%eax, %eax
	je	LBB0_5
## %bb.1:
	movq	_W83L785TS_REG_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_w83l785ts_read_value
	testb	$-128, %al
	jne	LBB0_3
## %bb.2:
	movq	_W83L785TS_REG_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_w83l785ts_read_value
	testb	$-4, %al
	je	LBB0_8
LBB0_3:
	movl	(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_4:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_5:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
LBB0_6:
	subl	(%rax), %r12d
LBB0_7:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	_W83L785TS_REG_MAN_ID1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_w83l785ts_read_value
	movl	%eax, %r15d
	shll	$8, %r15d
	movq	_W83L785TS_REG_MAN_ID2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_w83l785ts_read_value
	movl	%eax, %r13d
	addl	%r15d, %r13d
	movq	_W83L785TS_REG_CHIP_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_w83l785ts_read_value
	cmpl	$23715, %r13d                   ## imm = 0x5CA3
	jne	LBB0_11
## %bb.9:
	cmpl	$112, %eax
	jne	LBB0_11
## %bb.10:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movq	_I2C_NAME_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.2(%rip), %rsi
	callq	_strlcpy
	xorl	%r12d, %r12d
	jmp	LBB0_7
LBB0_11:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%r13d, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dev_dbg
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_FUNC_SMBUS_BYTE_DATA,4,2   ## @I2C_FUNC_SMBUS_BYTE_DATA
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_W83L785TS_REG_CONFIG,4,2       ## @W83L785TS_REG_CONFIG
	.comm	_W83L785TS_REG_TYPE,4,2         ## @W83L785TS_REG_TYPE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"W83L785TS-S detection failed at 0x%02x\n"

	.comm	_W83L785TS_REG_MAN_ID1,4,2      ## @W83L785TS_REG_MAN_ID1
	.comm	_W83L785TS_REG_MAN_ID2,4,2      ## @W83L785TS_REG_MAN_ID2
	.comm	_W83L785TS_REG_CHIP_ID,4,2      ## @W83L785TS_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	"w83l785ts"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function w83l785ts_detect
_w83l785ts_detect:                      ; @w83l785ts_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_5
; %bb.1:
Lloh3:
	adrp	x8, _W83L785TS_REG_CONFIG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _W83L785TS_REG_CONFIG@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #0
	bl	_w83l785ts_read_value
	tbnz	w0, #7, LBB0_3
; %bb.2:
Lloh6:
	adrp	x8, _W83L785TS_REG_TYPE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _W83L785TS_REG_TYPE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #0
	bl	_w83l785ts_read_value
	tst	w0, #0xfc
	b.eq	LBB0_7
LBB0_3:
	ldr	w2, [x21]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
LBB0_4:
	bl	_dev_dbg
LBB0_5:
Lloh11:
	adrp	x8, _ENODEV@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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
LBB0_7:
Lloh14:
	adrp	x8, _W83L785TS_REG_MAN_ID1@GOTPAGE
Lloh15:
	ldr	x8, [x8, _W83L785TS_REG_MAN_ID1@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #0
	bl	_w83l785ts_read_value
	mov	x22, x0
Lloh17:
	adrp	x8, _W83L785TS_REG_MAN_ID2@GOTPAGE
Lloh18:
	ldr	x8, [x8, _W83L785TS_REG_MAN_ID2@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #0
	bl	_w83l785ts_read_value
	add	w22, w0, w22, lsl #8
Lloh20:
	adrp	x8, _W83L785TS_REG_CHIP_ID@GOTPAGE
Lloh21:
	ldr	x8, [x8, _W83L785TS_REG_CHIP_ID@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #0
	bl	_w83l785ts_read_value
                                        ; kill: def $w0 killed $w0 def $x0
	mov	w8, #23715
	cmp	w22, w8
	b.ne	LBB0_10
; %bb.8:
	cmp	w0, #112
	b.ne	LBB0_10
; %bb.9:
	ldr	w0, [x20]
Lloh23:
	adrp	x8, _I2C_NAME_SIZE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _I2C_NAME_SIZE@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
Lloh26:
	adrp	x1, l_.str.2@PAGE
Lloh27:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_strlcpy
	mov	w0, #0
	b	LBB0_6
LBB0_10:
	str	x0, [sp]
Lloh28:
	adrp	x1, l_.str.1@PAGE
Lloh29:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_FUNC_SMBUS_BYTE_DATA,4,2   ; @I2C_FUNC_SMBUS_BYTE_DATA
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_W83L785TS_REG_CONFIG,4,2       ; @W83L785TS_REG_CONFIG
	.comm	_W83L785TS_REG_TYPE,4,2         ; @W83L785TS_REG_TYPE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"W83L785TS-S detection failed at 0x%02x\n"

	.comm	_W83L785TS_REG_MAN_ID1,4,2      ; @W83L785TS_REG_MAN_ID1
	.comm	_W83L785TS_REG_MAN_ID2,4,2      ; @W83L785TS_REG_MAN_ID2
	.comm	_W83L785TS_REG_CHIP_ID,4,2      ; @W83L785TS_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	"w83l785ts"

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