	.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), %r13
	callq	_i2c_get_clientdata
	movq	%rax, %r15
	movl	(%rax), %r12d
	movq	%r13, %rdi
	callq	_i2c_adapter_id
	movq	_force_subclients@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	cmpl	%eax, (%rsi)
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	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), %eax
	leal	-80(%rax), %ecx
	cmpl	$-8, %ecx
	jae	LBB0_25
## %bb.4:
	movl	%eax, %edx
LBB0_5:
	addq	$4, %rbx
	leaq	L_.str(%rip), %rsi
	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	%r14d, -52(%rbp)                ## 4-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	_W83781D_REG_I2C_SUBADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_w83781d_read_value
	movl	%eax, %ebx
	andl	$7, %ebx
	orl	$72, %ebx
	movw	%bx, -48(%rbp)
	shrl	$4, %eax
	andl	$7, %eax
	orl	$72, %eax
LBB0_7:
	movq	_w83783s@GOTPCREL(%rip), %r14
	cmpl	(%r14), %r12d
	je	LBB0_16
## %bb.8:
	movq	_force_subclients@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	cmpl	%edx, (%rcx)
	jne	LBB0_11
## %bb.9:
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	cmpl	%edx, 4(%rcx)
	jne	LBB0_11
## %bb.10:
	movzwl	12(%rcx), %eax
LBB0_11:
	movw	%ax, -46(%rbp)
	cmpw	%ax, %bx
	jne	LBB0_16
## %bb.12:
	movzwl	%bx, %edx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	addq	$4, %rdi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EBUSY@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %ebx
	jmp	LBB0_14
LBB0_16:
	movzwl	%bx, %esi
	movq	%r13, %rdi
	callq	_i2c_new_dummy
	movq	8(%r15), %rcx
	movl	%eax, (%rcx)
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	testl	%eax, %eax
	je	LBB0_17
## %bb.20:
	movb	$1, %dl
	movl	$1, %ecx
	.p2align	4, 0x90
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	xorl	%ebx, %ebx
	cmpl	(%r14), %r12d
	je	LBB0_15
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=1
	testb	$1, %dl
	je	LBB0_15
## %bb.23:                              ##   in Loop: Header=BB0_21 Depth=1
	movzwl	-48(%rbp,%rcx,2), %ebx
	movzwl	%bx, %esi
	movq	%r13, %rdi
	callq	_i2c_new_dummy
	movq	8(%r15), %rcx
	movl	%eax, 4(%rcx)
	movl	$2, %ecx
	xorl	%edx, %edx
	testl	%eax, %eax
	jne	LBB0_21
## %bb.24:
	movl	$1, %edx
	jmp	LBB0_18
LBB0_17:
	xorl	%edx, %edx
LBB0_18:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	addq	$4, %rdi
	movzwl	%bx, %ecx
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	testl	%r14d, %r14d
	je	LBB0_14
## %bb.19:
	movq	8(%r15), %rax
	movl	(%rax), %edi
	callq	_i2c_unregister_device
LBB0_14:
	negl	%ebx
LBB0_15:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_25:
	movl	%r14d, -52(%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, %eax
	andl	$112, %eax
	orl	%edx, %eax
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_w83781d_write_value
	movq	_force_subclients@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movzwl	8(%rax), %ebx
	movw	%bx, -48(%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"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.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_23
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	x27, _w83783s@GOTPAGE
Lloh10:
	ldr	x27, [x27, _w83783s@GOTPAGEOFF]
	ldr	w9, [x27]
	cmp	w24, w9
	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
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh13:
	adrp	x8, _EBUSY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_12:
	ldr	w20, [x8]
	b	LBB0_21
LBB0_13:
	and	w1, w22, #0xffff
	mov	x0, x21
	bl	_i2c_new_dummy
	mov	x23, x0
	ldr	x8, [x19, #8]
	str	w0, [x8]
	cbz	w0, LBB0_17
; %bb.14:
	ldr	w8, [x27]
	cmp	w24, w8
	b.eq	LBB0_16
; %bb.15:
	ldrh	w22, [sp, #14]
	mov	x0, x21
	mov	x1, x22
	bl	_i2c_new_dummy
	ldr	x8, [x19, #8]
	str	w0, [x8, #4]
	cbz	w0, LBB0_18
LBB0_16:
	mov	w0, #0
	b	LBB0_22
LBB0_17:
	mov	w2, #0
	b	LBB0_19
LBB0_18:
	mov	w2, #1
LBB0_19:
	add	x0, x20, #4
	and	x8, x22, #0xffff
	str	x8, [sp]
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
Lloh17:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh19:
	ldr	w20, [x8]
	cbz	w23, LBB0_21
; %bb.20:
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
	bl	_i2c_unregister_device
LBB0_21:
	neg	w0, w20
LBB0_22:
	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_23:
Lloh20:
	adrp	x8, _W83781D_REG_I2C_SUBADDR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _W83781D_REG_I2C_SUBADDR@GOTPAGEOFF]
Lloh22:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.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"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_w83781d_detect_subclients
.subsections_via_symbols
