	.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	%rdx, %r14
	movl	%esi, %r15d
	movq	%rdi, %r13
	movq	8(%rdi), %r12
	movq	_I2C_FUNC_SMBUS_BYTE_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_i2c_check_functionality
	testl	%eax, %eax
	je	LBB0_11
## %bb.1:
	testl	%r15d, %r15d
	js	LBB0_3
## %bb.2:
	jne	LBB0_9
	jmp	LBB0_6
LBB0_3:
	movq	_W83L785TS_REG_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_w83l785ts_read_value
	testb	$-128, %al
	jne	LBB0_5
## %bb.4:
	movq	_W83L785TS_REG_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_w83l785ts_read_value
	testb	$-4, %al
	je	LBB0_6
LBB0_5:
	movl	(%r13), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_dbg
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_6:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	_W83L785TS_REG_MAN_ID1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_w83l785ts_read_value
	movl	%eax, %r14d
	shll	$8, %r14d
	movq	_W83L785TS_REG_MAN_ID2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_w83l785ts_read_value
	movl	%eax, %ebx
	addl	%r14d, %ebx
	movq	_W83L785TS_REG_CHIP_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_w83l785ts_read_value
	movl	%ebx, %ecx
	xorl	$23715, %ecx                    ## imm = 0x5CA3
	movl	%eax, %edx
	xorl	$112, %edx
	orl	%ecx, %edx
	jne	LBB0_8
## %bb.7:
	movq	_w83l785ts@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
LBB0_8:
	testl	%r15d, %r15d
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jle	LBB0_10
LBB0_9:
	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_13
LBB0_10:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	movl	%ebx, %edx
	movl	%eax, %ecx
	callq	_dev_info
LBB0_11:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
LBB0_12:
	subl	(%rax), %ebx
LBB0_13:
	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	_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
	.comm	_w83l785ts,4,2                  ## @w83l785ts
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:
	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	x22, 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_9
; %bb.1:
	tbnz	w21, #31, LBB0_3
; %bb.2:
	cbnz	w21, LBB0_7
	b	LBB0_6
LBB0_3:
Lloh3:
	adrp	x8, _W83L785TS_REG_CONFIG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _W83L785TS_REG_CONFIG@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x22
	mov	w2, #0
	bl	_w83l785ts_read_value
	tbnz	w0, #7, LBB0_5
; %bb.4:
Lloh6:
	adrp	x8, _W83L785TS_REG_TYPE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _W83L785TS_REG_TYPE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x22
	mov	w2, #0
	bl	_w83l785ts_read_value
	tst	w0, #0xfc
	b.eq	LBB0_6
LBB0_5:
	ldr	w2, [x22]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	b	LBB0_9
LBB0_6:
Lloh11:
	adrp	x8, _W83L785TS_REG_MAN_ID1@GOTPAGE
Lloh12:
	ldr	x8, [x8, _W83L785TS_REG_MAN_ID1@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x22
	mov	w2, #0
	bl	_w83l785ts_read_value
	mov	x23, x0
Lloh14:
	adrp	x8, _W83L785TS_REG_MAN_ID2@GOTPAGE
Lloh15:
	ldr	x8, [x8, _W83L785TS_REG_MAN_ID2@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x22
	mov	w2, #0
	bl	_w83l785ts_read_value
	add	w23, w0, w23, lsl #8
Lloh17:
	adrp	x8, _W83L785TS_REG_CHIP_ID@GOTPAGE
Lloh18:
	ldr	x8, [x8, _W83L785TS_REG_CHIP_ID@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x22
	mov	w2, #0
	bl	_w83l785ts_read_value
	cmp	w0, #112
	mov	w8, #23715
	ccmp	w23, w8, #0, eq
Lloh20:
	adrp	x8, _w83l785ts@GOTPAGE
Lloh21:
	ldr	x8, [x8, _w83l785ts@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	csel	w8, w8, w21, eq
	cmp	w8, #0
	b.le	LBB0_8
LBB0_7:
	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_10
LBB0_8:
	mov	x3, x0
Lloh28:
	adrp	x1, l_.str.1@PAGE
Lloh29:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x23
	bl	_dev_info
LBB0_9:
Lloh30:
	adrp	x8, _ENODEV@GOTPAGE
Lloh31:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.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
	.comm	_w83l785ts,4,2                  ; @w83l785ts
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
