	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_fan_min
_set_fan_min:                           ## @set_fan_min
	.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, -64(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r15
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	callq	_to_sensor_dev_attr
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_to_i2c_client
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_i2c_get_clientdata
	movq	%rax, %r12
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$10, %edx
	callq	_simple_strtoul
	movq	%rax, %r15
	movslq	(%r14), %rbx
	movq	%r12, %rdi
	addq	$16, %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	testq	%r15, %r15
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_1
## %bb.3:
	cmpq	$663, %r15                      ## imm = 0x297
	ja	LBB0_5
## %bb.4:
	movq	(%r12), %rax
	movl	$254, (%rax,%rbx,4)
	leal	1(%rbx), %r14d
	movl	$254, %edi
	movl	$8, %esi
	callq	_FAN_FROM_REG
	leaq	L_.str.1(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	$3, %r14d
	jmp	LBB0_2
LBB0_1:
	movq	(%r12), %rax
	movl	$255, (%rax,%rbx,4)
	movq	8(%r12), %rax
	movl	(%rax,%rbx,4), %r14d
	leal	1(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_2:
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_13
LBB0_5:
	xorl	%r14d, %r14d
	cmpq	$1350000, %r15                  ## imm = 0x149970
	ja	LBB0_6
## %bb.7:
	movl	$1350000, %eax                  ## imm = 0x149970
	xorl	%edx, %edx
	divl	%r15d
	movl	%eax, %edi
	jmp	LBB0_8
LBB0_6:
	xorl	%edi, %edi
LBB0_8:
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	cmpl	$193, %edi
	jb	LBB0_12
## %bb.9:
	cmpl	$386, %edi                      ## imm = 0x182
	jb	LBB0_10
## %bb.11:
	movl	%edi, %eax
	shrl	$2, %eax
	movl	%edi, %ecx
	shrl	$3, %ecx
	xorl	%r14d, %r14d
	cmpl	$772, %edi                      ## imm = 0x304
	setae	%r14b
	cmovbl	%eax, %ecx
	orl	$2, %r14d
	movl	%ecx, %edi
	jmp	LBB0_12
LBB0_10:
	shrl	%edi
	movl	$1, %r14d
LBB0_12:
	testl	%edi, %edi
	movl	$1, %esi
	cmovel	%esi, %edi
	movq	(%r12), %rax
	movl	%edi, (%rax,%rbx,4)
	leal	1(%rbx), %r15d
	movl	%r14d, %ecx
	shll	%cl, %esi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_FAN_FROM_REG
	leaq	L_.str.2(%rip), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	-64(%rbp), %r15                 ## 8-byte Reload
LBB0_13:
	movq	8(%r12), %rax
	cmpl	(%rax,%rbx,4), %r14d
	je	LBB0_15
## %bb.14:
	movl	%r14d, (%rax,%rbx,4)
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %esi
	movl	%r14d, %edx
	callq	_adm9240_write_fan_div
LBB0_15:
	movl	%ebx, %edi
	callq	_ADM9240_REG_FAN_MIN
	movq	(%r12), %rcx
	movl	(%rcx,%rbx,4), %edx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %esi
	callq	_i2c_smbus_write_byte_data
	movq	%r13, %rdi
	callq	_mutex_unlock
	movq	%r15, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"fan%u low limit set disabled\n"

L_.str.1:                               ## @.str.1
	.asciz	"fan%u low limit set minimum %u\n"

L_.str.2:                               ## @.str.2
	.asciz	"fan%u low limit set fan speed %u\n"

	.no_dead_strip	_set_fan_min
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_fan_min
_set_fan_min:                           ; @set_fan_min
	.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	x20, x0
	mov	x0, x1
	bl	_to_sensor_dev_attr
	mov	x23, x0
	mov	x0, x20
	bl	_to_i2c_client
	mov	x20, x0
	bl	_i2c_get_clientdata
	mov	x21, x0
	mov	x0, x22
	mov	x1, #0
	mov	w2, #10
	bl	_simple_strtoul
	mov	x24, x0
	ldrsw	x23, [x23]
	add	x22, x21, #16
	mov	x0, x22
	bl	_mutex_lock
	cbz	x24, LBB0_3
; %bb.1:
	cmp	x24, #663
	b.hi	LBB0_4
; %bb.2:
	ldr	x8, [x21]
	mov	w9, #254
	str	w9, [x8, x23, lsl #2]
	add	w24, w23, #1
	mov	w0, #254
	mov	w1, #8
	bl	_FAN_FROM_REG
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh0:
	adrp	x1, l_.str.1@PAGE
Lloh1:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x2, x24
	bl	_dev_dbg
	mov	w24, #3
	b	LBB0_6
LBB0_3:
	lsl	x8, x23, #2
	mov	w9, #255
	ldp	x10, x11, [x21]
	str	w9, [x10, x8]
	ldr	w24, [x11, x8]
	add	w2, w23, #1
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	b	LBB0_5
LBB0_4:
	mov	w8, #39280
	movk	w8, #20, lsl #16
	udiv	x8, x8, x24
	lsr	w9, w8, #1
	mov	w10, #1
	lsr	w11, w8, #2
	lsr	w12, w8, #3
	mov	w13, #2
	cmp	w8, #771
	csel	w11, w12, w11, hi
	cinc	w12, w13, hi
	cmp	w8, #386
	csel	w12, w10, w12, lo
	csel	w9, w9, w11, lo
	cmp	w8, #193
	csel	w24, wzr, w12, lo
	csel	w8, w8, w9, lo
	cmp	w8, #0
	csinc	w0, w8, wzr, ne
	ldr	x8, [x21]
	str	w0, [x8, x23, lsl #2]
	add	w25, w23, #1
	lsl	w1, w10, w24
	bl	_FAN_FROM_REG
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	x2, x25
LBB0_5:
	bl	_dev_dbg
LBB0_6:
	ldr	x8, [x21, #8]
	ldr	w9, [x8, x23, lsl #2]
	cmp	w24, w9
	b.eq	LBB0_8
; %bb.7:
	str	w24, [x8, x23, lsl #2]
	mov	x0, x20
	mov	x1, x23
	mov	x2, x24
	bl	_adm9240_write_fan_div
LBB0_8:
	mov	x0, x23
	bl	_ADM9240_REG_FAN_MIN
	mov	x1, x0
	ldr	x8, [x21]
	ldr	w2, [x8, x23, lsl #2]
	mov	x0, x20
	bl	_i2c_smbus_write_byte_data
	mov	x0, x22
	bl	_mutex_unlock
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"fan%u low limit set disabled\n"

l_.str.1:                               ; @.str.1
	.asciz	"fan%u low limit set minimum %u\n"

l_.str.2:                               ; @.str.2
	.asciz	"fan%u low limit set fan speed %u\n"

	.no_dead_strip	_set_fan_min
.subsections_via_symbols
