	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function w83781d_detect_subclients
_w83781d_detect_subclients:             ## @w83781d_detect_subclients
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	(%rdi), %r14d
	movq	8(%rdi), %r15
	callq	_i2c_get_clientdata
	movq	%rax, %r13
	movl	(%rax), %r12d
	movq	%r15, %rdi
	callq	_i2c_adapter_id
	movq	_force_subclients@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	cmpl	%eax, (%rsi)
	jne	LBB0_6
## %bb.1:
	cmpl	%r14d, 4(%rsi)
	jne	LBB0_6
## %bb.2:
	movl	8(%rsi), %edx
	leal	-80(%rdx), %ecx
	cmpl	$-8, %ecx
	jb	LBB0_5
## %bb.3:
	movl	12(%rsi), %r8d
	leal	-80(%r8), %ecx
	cmpl	$-8, %ecx
	jae	LBB0_23
## %bb.4:
	movl	%r8d, %edx
LBB0_5:
	addq	$4, %rbx
	leaq	L_.str(%rip), %rsi
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_13
LBB0_6:
	movl	%r12d, -56(%rbp)                ## 4-byte Spill
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	%r14d, -48(%rbp)                ## 4-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	_W83781D_REG_I2C_SUBADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_w83781d_read_value
	movl	%eax, %r12d
	andl	$7, %r12d
	orl	$72, %r12d
	movw	%r12w, -44(%rbp)
	shrl	$4, %eax
	andl	$7, %eax
	orl	$72, %eax
LBB0_7:
	movq	_w83783s@GOTPCREL(%rip), %rcx
	movl	$1, %r14d
	movl	-56(%rbp), %edx                 ## 4-byte Reload
	cmpl	(%rcx), %edx
	je	LBB0_15
## %bb.8:
	movq	_force_subclients@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	cmpl	%edx, (%rcx)
	jne	LBB0_11
## %bb.9:
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	cmpl	%edx, 4(%rcx)
	jne	LBB0_11
## %bb.10:
	movzwl	12(%rcx), %eax
LBB0_11:
	movw	%ax, -42(%rbp)
	movl	$2, %r14d
	cmpw	%ax, %r12w
	jne	LBB0_15
## %bb.12:
	movzwl	%r12w, %edx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	addq	$4, %rdi
	leaq	L_.str.1(%rip), %rsi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EBUSY@GOTPCREL(%rip), %rax
LBB0_13:
	subl	(%rax), %r14d
	jmp	LBB0_14
LBB0_15:
	movzwl	%r12w, %esi
	movq	%r15, %rdi
	callq	_i2c_new_dummy_device
	movq	8(%r13), %rcx
	movl	%eax, (%rcx)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_19
## %bb.16:
	xorl	%ebx, %ebx
	jmp	LBB0_17
LBB0_19:
	decq	%r14
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	cmpq	%rbx, %r14
	je	LBB0_21
## %bb.22:                              ##   in Loop: Header=BB0_20 Depth=1
	movzwl	-42(%rbp,%rbx,2), %r12d
	movzwl	%r12w, %esi
	movq	%r15, %rdi
	callq	_i2c_new_dummy_device
	movq	8(%r13), %rcx
	movl	%eax, 4(%rcx,%rbx,4)
	movl	%eax, %edi
	callq	_IS_ERR
	incq	%rbx
	testq	%rax, %rax
	je	LBB0_20
LBB0_17:
	movl	%ebx, %r14d
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	addq	$4, %rdi
	movzwl	%r12w, %ecx
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movq	8(%r13), %rax
	movl	(%rax,%r14,4), %edi
	callq	_PTR_ERR
	movl	%eax, %r14d
	cmpl	$1, %ebx
	jne	LBB0_14
## %bb.18:
	movq	8(%r13), %rax
	movl	(%rax), %edi
	callq	_i2c_unregister_device
	jmp	LBB0_14
LBB0_21:
	xorl	%r14d, %r14d
LBB0_14:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	movl	%r12d, -56(%rbp)                ## 4-byte Spill
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	%r14d, -48(%rbp)                ## 4-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	_W83781D_REG_I2C_SUBADDR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	andl	$7, %edx
	shll	$4, %r8d
	andl	$112, %r8d
	orl	%edx, %r8d
	movq	%r13, %rdi
	movl	%r8d, %edx
	callq	_w83781d_write_value
	movq	_force_subclients@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movzwl	8(%rax), %r12d
	movw	%r12w, -44(%rbp)
	movw	$72, %ax
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_force_subclients,8,3           ## @force_subclients
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid subclient address %d; must be 0x48-0x4f\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_W83781D_REG_I2C_SUBADDR,4,2    ## @W83781D_REG_I2C_SUBADDR
	.comm	_w83783s,4,2                    ## @w83783s
L_.str.1:                               ## @.str.1
	.asciz	"Duplicate addresses 0x%x for subclients.\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
L_.str.2:                               ## @.str.2
	.asciz	"Subclient %d registration at address 0x%x failed.\n"

	.no_dead_strip	_w83781d_detect_subclients
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function w83781d_detect_subclients
_w83781d_detect_subclients:             ; @w83781d_detect_subclients
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x0
	ldr	w25, [x0]
	ldr	x21, [x0, #8]
	bl	_i2c_get_clientdata
	mov	x19, x0
	ldr	w24, [x0]
	mov	x0, x21
	bl	_i2c_adapter_id
	mov	x23, x0
Lloh0:
	adrp	x26, _force_subclients@GOTPAGE
Lloh1:
	ldr	x26, [x26, _force_subclients@GOTPAGEOFF]
	ldr	x8, [x26]
	ldr	w9, [x8]
	cmp	w9, w0
	b.ne	LBB0_5
; %bb.1:
	ldr	w9, [x8, #4]
	cmp	w9, w25
	b.ne	LBB0_5
; %bb.2:
	ldr	w9, [x8, #8]
	sub	w10, w9, #80
	mov	x2, x9
	cmn	w10, #8
	b.lo	LBB0_4
; %bb.3:
	ldr	w2, [x8, #12]
	sub	w8, w2, #80
	cmn	w8, #8
	b.hs	LBB0_22
LBB0_4:
	add	x0, x20, #4
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_12
LBB0_5:
Lloh6:
	adrp	x8, _W83781D_REG_I2C_SUBADDR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _W83781D_REG_I2C_SUBADDR@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_w83781d_read_value
	mov	w8, #72
	mov	w22, #72
	bfxil	w22, w0, #0, #3
	strh	w22, [sp, #12]
	bfxil	w8, w0, #4, #3
LBB0_6:
Lloh9:
	adrp	x9, _w83783s@GOTPAGE
Lloh10:
	ldr	x9, [x9, _w83783s@GOTPAGEOFF]
Lloh11:
	ldr	w27, [x9]
	cmp	w24, w27
	b.eq	LBB0_13
; %bb.7:
	ldr	x9, [x26]
	ldr	w10, [x9]
	cmp	w10, w23
	b.ne	LBB0_10
; %bb.8:
	ldr	w10, [x9, #4]
	cmp	w10, w25
	b.ne	LBB0_10
; %bb.9:
	ldr	w8, [x9, #12]
LBB0_10:
	strh	w8, [sp, #14]
	and	w2, w22, #0xffff
	cmp	w2, w8, uxth
	b.ne	LBB0_13
; %bb.11:
	add	x0, x20, #4
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh14:
	adrp	x8, _EBUSY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_19
LBB0_13:
	and	w1, w22, #0xffff
	mov	x0, x21
	bl	_i2c_new_dummy_device
	ldr	x8, [x19, #8]
	str	w0, [x8]
	bl	_IS_ERR
	cbz	x0, LBB0_17
; %bb.14:
	mov	x21, #0
LBB0_15:
	add	x0, x20, #4
	and	x8, x22, #0xffff
	str	x8, [sp]
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x21
	bl	_dev_err
	ldr	x8, [x19, #8]
	ldr	w0, [x8, x21, lsl #2]
	bl	_PTR_ERR
	mov	x20, x0
	cmp	w21, #1
	b.ne	LBB0_19
; %bb.16:
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	bl	_i2c_unregister_device
	b	LBB0_19
LBB0_17:
	cmp	w24, w27
	b.ne	LBB0_20
LBB0_18:
	mov	w20, #0
LBB0_19:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_20:
	ldrh	w22, [sp, #14]
	mov	x0, x21
	mov	x1, x22
	bl	_i2c_new_dummy_device
	ldr	x8, [x19, #8]
	str	w0, [x8, #4]
	bl	_IS_ERR
	cbz	x0, LBB0_23
; %bb.21:
	mov	w21, #1
	b	LBB0_15
LBB0_22:
Lloh18:
	adrp	x8, _W83781D_REG_I2C_SUBADDR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _W83781D_REG_I2C_SUBADDR@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	and	w8, w9, #0x7
	bfi	w8, w2, #4, #3
	mov	x0, x19
	mov	x2, x8
	bl	_w83781d_write_value
	ldr	x8, [x26]
	ldr	w22, [x8, #8]
	strh	w22, [sp, #12]
	mov	w8, #72
	b	LBB0_6
LBB0_23:
	cmp	w24, w27
	b.ne	LBB0_18
; %bb.24:
	ldrh	w22, [sp, #16]
	mov	x0, x21
	mov	x1, x22
	bl	_i2c_new_dummy_device
	ldr	x8, [x19, #8]
	str	w0, [x8, #8]
	bl	_IS_ERR
	mov	w21, #2
	b	LBB0_15
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_force_subclients,8,3           ; @force_subclients
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid subclient address %d; must be 0x48-0x4f\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_W83781D_REG_I2C_SUBADDR,4,2    ; @W83781D_REG_I2C_SUBADDR
	.comm	_w83783s,4,2                    ; @w83783s
l_.str.1:                               ; @.str.1
	.asciz	"Duplicate addresses 0x%x for subclients.\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
l_.str.2:                               ; @.str.2
	.asciz	"Subclient %d registration at address 0x%x failed.\n"

	.no_dead_strip	_w83781d_detect_subclients
.subsections_via_symbols
