	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_fan_auto_channel
_set_fan_auto_channel:                  ## @set_fan_auto_channel
	.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	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r12
	movq	%rsi, %rbx
	callq	_to_i2c_client
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_i2c_get_clientdata
	movq	%rax, %r13
	movq	%rbx, %rdi
	callq	_to_sensor_dev_attr
	movl	(%rax), %ebx
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$10, %edx
	callq	_simple_strtol
	movl	%eax, %r14d
	movl	(%r13), %r15d
	leaq	24(%r13), %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movl	(%r13), %ecx
	leaq	-44(%rbp), %r8
	movq	%r13, %rdi
	movl	%ebx, %esi
	movl	%r14d, %edx
	callq	_get_fan_auto_nearest
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	jmp	LBB0_8
LBB0_2:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movl	-44(%rbp), %edi
	movl	(%r13), %esi
	callq	_FAN_CHAN_TO_REG
	movl	%eax, (%r13)
	movq	_ADM1031_CONF1_AUTO_MODE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%ecx, %eax
	andl	%ecx, %r15d
	cmpl	%r15d, %eax
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_7
## %bb.3:
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movq	8(%r13), %rax
	movq	16(%r13), %rcx
	movl	(%rcx), %edx
	movl	%edx, (%rax)
	movl	4(%rcx), %ecx
	movl	%ecx, 4(%rax)
	movq	_ADM1031_REG_PWM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$85, %edx
	jmp	LBB0_6
LBB0_5:
	movq	8(%r13), %rax
	movq	16(%r13), %rcx
	movl	(%rax), %edi
	movl	%edi, (%rcx)
	movl	4(%rax), %edx
	movl	%edx, 4(%rcx)
	movq	_ADM1031_REG_PWM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	shll	$4, %edx
	orl	%edi, %edx
	movq	%rbx, %rdi
LBB0_6:
	callq	_adm1031_write_value
LBB0_7:
	movl	-44(%rbp), %edi
	movl	(%r13), %esi
	callq	_FAN_CHAN_TO_REG
	movl	%eax, (%r13)
	movq	_ADM1031_REG_CONF1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_adm1031_write_value
	movq	%r12, %rdi
	callq	_mutex_unlock
	movq	%r14, %rax
LBB0_8:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ADM1031_CONF1_AUTO_MODE,4,2    ## @ADM1031_CONF1_AUTO_MODE
	.comm	_ADM1031_REG_PWM,4,2            ## @ADM1031_REG_PWM
	.comm	_ADM1031_REG_CONF1,4,2          ## @ADM1031_REG_CONF1
	.no_dead_strip	_set_fan_auto_channel
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_fan_auto_channel
_set_fan_auto_channel:                  ; @set_fan_auto_channel
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x3
	mov	x22, x2
	mov	x23, x1
	bl	_to_i2c_client
	mov	x20, x0
	bl	_i2c_get_clientdata
	mov	x21, x0
	mov	x0, x23
	bl	_to_sensor_dev_attr
	ldr	w23, [x0]
	mov	x0, x22
	mov	x1, #0
	mov	w2, #10
	bl	_simple_strtol
	mov	x24, x0
	ldr	w25, [x21]
	add	x22, x21, #24
	mov	x0, x22
	bl	_mutex_lock
	ldr	w3, [x21]
	add	x4, sp, #12
	mov	x0, x21
	mov	x1, x23
	mov	x2, x24
	bl	_get_fan_auto_nearest
	cbz	w0, LBB0_2
; %bb.1:
	mov	x23, x0
	mov	x0, x22
	bl	_mutex_unlock
	mov	x19, x23
	b	LBB0_8
LBB0_2:
	ldr	w0, [sp, #12]
	ldr	w1, [x21]
	bl	_FAN_CHAN_TO_REG
	str	w0, [x21]
Lloh0:
	adrp	x8, _ADM1031_CONF1_AUTO_MODE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ADM1031_CONF1_AUTO_MODE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
	and	w8, w9, w0
	and	w9, w9, w25
	cmp	w8, w9
	b.eq	LBB0_7
; %bb.3:
	cbz	w8, LBB0_5
; %bb.4:
	ldp	x9, x8, [x21, #8]
	ldr	w10, [x8]
	str	w10, [x9]
	ldr	w8, [x8, #4]
	str	w8, [x9, #4]
Lloh3:
	adrp	x8, _ADM1031_REG_PWM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ADM1031_REG_PWM@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #85
	b	LBB0_6
LBB0_5:
	ldp	x8, x9, [x21, #8]
	ldr	w10, [x8]
	str	w10, [x9]
	ldr	w8, [x8, #4]
	str	w8, [x9, #4]
Lloh6:
	adrp	x9, _ADM1031_REG_PWM@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ADM1031_REG_PWM@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x9]
	orr	w2, w10, w8, lsl #4
	mov	x0, x20
LBB0_6:
	bl	_adm1031_write_value
LBB0_7:
	ldr	w0, [sp, #12]
	ldr	w1, [x21]
	bl	_FAN_CHAN_TO_REG
	mov	x2, x0
	str	w2, [x21]
Lloh9:
	adrp	x8, _ADM1031_REG_CONF1@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ADM1031_REG_CONF1@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x20
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_adm1031_write_value
	mov	x0, x22
	bl	_mutex_unlock
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ADM1031_CONF1_AUTO_MODE,4,2    ; @ADM1031_CONF1_AUTO_MODE
	.comm	_ADM1031_REG_PWM,4,2            ; @ADM1031_REG_PWM
	.comm	_ADM1031_REG_CONF1,4,2          ; @ADM1031_REG_CONF1
	.no_dead_strip	_set_fan_auto_channel
.subsections_via_symbols
