	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function w83792d_detect
_w83792d_detect:                        ## @w83792d_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), %rdi
	movzwl	(%rbx), %r12d
	movq	_I2C_FUNC_SMBUS_BYTE_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_i2c_check_functionality
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_W83792D_REG_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_w83792d_read_value
	testb	$-128, %al
	jne	LBB0_1
## %bb.3:
	movq	_W83792D_REG_BANK@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_w83792d_read_value
	movl	%eax, %r15d
	movq	_W83792D_REG_CHIPMAN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_w83792d_read_value
	testb	$7, %r15b
	je	LBB0_4
LBB0_8:
	movq	_W83792D_REG_I2C_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_w83792d_read_value
	cmpl	%r12d, %eax
	jne	LBB0_1
## %bb.9:
	movl	(%r13), %r15d
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_w83792d_read_value
                                        ## kill: def $eax killed $eax def $rax
	andl	$120, %eax
	leal	128(%rax), %edx
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_w83792d_write_value
	movq	_W83792D_REG_WCHIPID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_w83792d_read_value
	movl	%eax, %r15d
	movq	_W83792D_REG_CHIPMAN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_w83792d_read_value
	cmpl	$122, %r15d
	jne	LBB0_1
## %bb.10:
	cmpl	$92, %eax
	jne	LBB0_1
## %bb.11:
	movl	(%r14), %edi
	movq	_I2C_NAME_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str(%rip), %rsi
	callq	_strlcpy
	xorl	%eax, %eax
	jmp	LBB0_12
LBB0_4:
	testb	$-128, %r15b
	jne	LBB0_6
## %bb.5:
	cmpl	$163, %eax
	jne	LBB0_1
LBB0_6:
	testb	$-128, %r15b
	je	LBB0_8
## %bb.7:
	cmpl	$92, %eax
	je	LBB0_8
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_12:
	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	_W83792D_REG_CONFIG,4,2         ## @W83792D_REG_CONFIG
	.comm	_W83792D_REG_BANK,4,2           ## @W83792D_REG_BANK
	.comm	_W83792D_REG_CHIPMAN,4,2        ## @W83792D_REG_CHIPMAN
	.comm	_W83792D_REG_I2C_ADDR,4,2       ## @W83792D_REG_I2C_ADDR
	.comm	_W83792D_REG_WCHIPID,4,2        ## @W83792D_REG_WCHIPID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"w83792d"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function w83792d_detect
_w83792d_detect:                        ; @w83792d_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_11
; %bb.1:
Lloh3:
	adrp	x8, _W83792D_REG_CONFIG@GOTPAGE
Lloh4:
	ldr	x8, [x8, _W83792D_REG_CONFIG@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_w83792d_read_value
	tbnz	w0, #7, LBB0_11
; %bb.2:
Lloh6:
	adrp	x24, _W83792D_REG_BANK@GOTPAGE
Lloh7:
	ldr	x24, [x24, _W83792D_REG_BANK@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x20
	bl	_w83792d_read_value
	mov	x21, x0
Lloh8:
	adrp	x23, _W83792D_REG_CHIPMAN@GOTPAGE
Lloh9:
	ldr	x23, [x23, _W83792D_REG_CHIPMAN@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x20
	bl	_w83792d_read_value
	tst	w21, #0x7
	b.eq	LBB0_7
LBB0_3:
Lloh10:
	adrp	x8, _W83792D_REG_I2C_ADDR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _W83792D_REG_I2C_ADDR@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_w83792d_read_value
	cmp	w0, w22
	b.ne	LBB0_11
; %bb.4:
	ldr	w21, [x24]
	mov	x0, x20
	mov	x1, x21
	bl	_w83792d_read_value
	and	w8, w0, #0x78
	orr	w2, w8, #0x80
	mov	x0, x20
	mov	x1, x21
	bl	_w83792d_write_value
Lloh13:
	adrp	x8, _W83792D_REG_WCHIPID@GOTPAGE
Lloh14:
	ldr	x8, [x8, _W83792D_REG_WCHIPID@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_w83792d_read_value
	mov	x21, x0
	ldr	w1, [x23]
	mov	x0, x20
	bl	_w83792d_read_value
	cmp	w21, #122
	b.ne	LBB0_11
; %bb.5:
	cmp	w0, #92
	b.ne	LBB0_11
; %bb.6:
	ldr	w0, [x19]
Lloh16:
	adrp	x8, _I2C_NAME_SIZE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _I2C_NAME_SIZE@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strlcpy
	mov	w0, #0
	b	LBB0_12
LBB0_7:
	tbnz	w21, #7, LBB0_9
; %bb.8:
	cmp	w0, #163
	b.ne	LBB0_11
LBB0_9:
	tbz	w21, #7, LBB0_3
; %bb.10:
	cmp	w0, #92
	b.eq	LBB0_3
LBB0_11:
Lloh21:
	adrp	x8, _ENODEV@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	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 AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_FUNC_SMBUS_BYTE_DATA,4,2   ; @I2C_FUNC_SMBUS_BYTE_DATA
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_W83792D_REG_CONFIG,4,2         ; @W83792D_REG_CONFIG
	.comm	_W83792D_REG_BANK,4,2           ; @W83792D_REG_BANK
	.comm	_W83792D_REG_CHIPMAN,4,2        ; @W83792D_REG_CHIPMAN
	.comm	_W83792D_REG_I2C_ADDR,4,2       ; @W83792D_REG_I2C_ADDR
	.comm	_W83792D_REG_WCHIPID,4,2        ; @W83792D_REG_WCHIPID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"w83792d"

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