	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdx, %r15
	movq	%rdi, %r12
	movq	%rsi, %rdi
	callq	_to_sensor_dev_attr
	movq	%rax, %rbx
	movq	%r12, %rdi
	callq	_dev_get_drvdata
	movq	%rax, %r12
	movslq	(%rbx), %r13
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$10, %edx
	callq	_simple_strtol
	movq	%rax, %rbx
	leaq	8(%r12), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	16(%r12), %rax
	movl	(%rax,%r13,4), %edi
	callq	_DIV_FROM_REG
	movq	%rax, %rcx
	imulq	%rbx, %rcx
	cmpq	$491520, %rcx                   ## imm = 0x78000
	jg	LBB0_2
## %bb.1:
	movq	%rcx, %rax
	shlq	$6, %rax
	leaq	(%rax,%rax,2), %rax
	cmpq	$983039, %rax                   ## imm = 0xEFFFF
	jle	LBB0_2
## %bb.3:
	movq	%rcx, %rax
	shrq	$63, %rax
	addq	%rcx, %rax
	sarq	%rax
	addq	$983040, %rax                   ## imm = 0xF0000
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_4
## %bb.5:
	cqto
	idivq	%rcx
	jmp	LBB0_6
LBB0_2:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subq	(%rax), %r14
	jmp	LBB0_7
LBB0_4:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_6:
	movl	$192, %edx
	subl	%eax, %edx
	movq	(%r12), %rax
	movl	%edx, (%rax,%r13,4)
	movq	_SMSC47M1_REG_FAN_PRELOAD@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax,%r13,4), %esi
	movq	%r12, %rdi
	callq	_smsc47m1_write_value
	movq	%r15, %rdi
	callq	_mutex_unlock
LBB0_7:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,8,3                     ## @EINVAL
	.comm	_SMSC47M1_REG_FAN_PRELOAD,8,3   ## @SMSC47M1_REG_FAN_PRELOAD
	.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:
	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, x3
	mov	x21, x2
	mov	x20, x0
	mov	x0, x1
	bl	_to_sensor_dev_attr
	mov	x22, x0
	mov	x0, x20
	bl	_dev_get_drvdata
	mov	x20, x0
	ldrsw	x23, [x22]
	mov	x0, x21
	mov	x1, #0
	mov	w2, #10
	bl	_simple_strtol
	mov	x22, x0
	add	x21, x20, #8
	mov	x0, x21
	bl	_mutex_lock
	ldr	x8, [x20, #16]
	ldr	w0, [x8, x23, lsl #2]
	bl	_DIV_FROM_REG
	mul	x8, x0, x22
	cmp	x8, #120, lsl #12               ; =491520
	b.gt	LBB0_3
; %bb.1:
	add	x9, x8, x8, lsl #1
	lsl	x9, x9, #6
	cmp	x9, #240, lsl #12               ; =983040
	b.lt	LBB0_3
; %bb.2:
	cmp	x8, #0
	cinc	x9, x8, lt
	asr	x9, x9, #1
	add	x9, x9, #240, lsl #12           ; =983040
	sdiv	x8, x9, x8
	mov	w9, #192
	sub	w2, w9, w8
	ldr	x8, [x20]
	lsl	x9, x23, #2
	str	w2, [x8, x9]
Lloh0:
	adrp	x8, _SMSC47M1_REG_FAN_PRELOAD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SMSC47M1_REG_FAN_PRELOAD@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w1, [x8, x9]
	mov	x0, x20
	bl	_smsc47m1_write_value
	mov	x0, x21
	bl	_mutex_unlock
	b	LBB0_4
LBB0_3:
	mov	x0, x21
	bl	_mutex_unlock
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	neg	x19, x8
LBB0_4:
	mov	x0, x19
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,8,3                     ; @EINVAL
	.comm	_SMSC47M1_REG_FAN_PRELOAD,8,3   ; @SMSC47M1_REG_FAN_PRELOAD
	.no_dead_strip	_set_fan_min
.subsections_via_symbols
