	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function w83793_detect
_w83793_detect:                         ## @w83793_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, %r13
	movq	8(%rdi), %rdi
	movzwl	(%r13), %r15d
	movq	_I2C_FUNC_SMBUS_BYTE_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_i2c_check_functionality
	testl	%eax, %eax
	je	LBB0_8
## %bb.1:
	movq	_W83793_REG_BANKSEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_i2c_smbus_read_byte_data
	movzwl	%ax, %r12d
	testb	$-128, %r12b
	movl	$163, %eax
	movl	$92, %ebx
	cmovel	%eax, %ebx
	movq	_W83793_REG_VENDORID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_i2c_smbus_read_byte_data
	movzwl	%ax, %eax
	cmpl	%eax, %ebx
	jne	LBB0_6
## %bb.2:
	testb	$7, %r12b
	jne	LBB0_4
## %bb.3:
	movq	_W83793_REG_I2C_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_i2c_smbus_read_byte_data
	movzwl	%ax, %eax
	addl	%r15d, %r15d
	cmpl	%eax, %r15d
	jne	LBB0_10
LBB0_4:
	movq	_W83793_REG_CHIPID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_i2c_smbus_read_byte_data
	cmpw	$123, %ax
	jne	LBB0_8
## %bb.5:
	movl	(%r14), %edi
	movq	_I2C_NAME_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.2(%rip), %rsi
	callq	_strlcpy
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_6:
	leaq	L_.str(%rip), %rdi
LBB0_7:
	callq	_pr_debug
LBB0_8:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_FUNC_SMBUS_BYTE_DATA,4,2   ## @I2C_FUNC_SMBUS_BYTE_DATA
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_W83793_REG_BANKSEL,4,2         ## @W83793_REG_BANKSEL
	.comm	_W83793_REG_VENDORID,4,2        ## @W83793_REG_VENDORID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"w83793: Detection failed at check vendor id\n"

	.comm	_W83793_REG_I2C_ADDR,4,2        ## @W83793_REG_I2C_ADDR
L_.str.1:                               ## @.str.1
	.asciz	"w83793: Detection failed at check i2c addr\n"

	.comm	_W83793_REG_CHIPID,4,2          ## @W83793_REG_CHIPID
L_.str.2:                               ## @.str.2
	.asciz	"w83793"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function w83793_detect
_w83793_detect:                         ; @w83793_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	x19, x1
	mov	x20, x0
	ldr	x0, [x0, #8]
	ldrh	w22, [x20]
Lloh0:
	adrp	x8, _I2C_FUNC_SMBUS_BYTE_DATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I2C_FUNC_SMBUS_BYTE_DATA@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_i2c_check_functionality
	cbz	w0, LBB0_8
; %bb.1:
Lloh3:
	adrp	x8, _W83793_REG_BANKSEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _W83793_REG_BANKSEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_i2c_smbus_read_byte_data
	mov	x21, x0
	tst	w0, #0x80
	mov	w8, #92
	mov	w9, #163
	csel	w23, w9, w8, eq
Lloh6:
	adrp	x8, _W83793_REG_VENDORID@GOTPAGE
Lloh7:
	ldr	x8, [x8, _W83793_REG_VENDORID@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_i2c_smbus_read_byte_data
	cmp	w23, w0
	b.ne	LBB0_6
; %bb.2:
	tst	w21, #0x7
	b.ne	LBB0_4
; %bb.3:
Lloh9:
	adrp	x8, _W83793_REG_I2C_ADDR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _W83793_REG_I2C_ADDR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_i2c_smbus_read_byte_data
	cmp	w0, w22, lsl #1
	b.ne	LBB0_10
LBB0_4:
Lloh12:
	adrp	x8, _W83793_REG_CHIPID@GOTPAGE
Lloh13:
	ldr	x8, [x8, _W83793_REG_CHIPID@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_i2c_smbus_read_byte_data
	cmp	w0, #123
	b.ne	LBB0_8
; %bb.5:
	ldr	w0, [x19]
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_6:
Lloh20:
	adrp	x0, l_.str@PAGE
Lloh21:
	add	x0, x0, l_.str@PAGEOFF
LBB0_7:
	bl	_pr_debug
LBB0_8:
Lloh22:
	adrp	x8, _ENODEV@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh24:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_10:
Lloh25:
	adrp	x0, l_.str.1@PAGE
Lloh26:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	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	_W83793_REG_BANKSEL,4,2         ; @W83793_REG_BANKSEL
	.comm	_W83793_REG_VENDORID,4,2        ; @W83793_REG_VENDORID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"w83793: Detection failed at check vendor id\n"

	.comm	_W83793_REG_I2C_ADDR,4,2        ; @W83793_REG_I2C_ADDR
l_.str.1:                               ; @.str.1
	.asciz	"w83793: Detection failed at check i2c addr\n"

	.comm	_W83793_REG_CHIPID,4,2          ; @W83793_REG_CHIPID
l_.str.2:                               ; @.str.2
	.asciz	"w83793"

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