	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tempmon_setfan
_tempmon_setfan:                        ## @tempmon_setfan
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_TEMPMON_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ddblreadl
	movq	_TEMPMON_CONTROL_OVERTEMP@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.1:
	movq	16(%r15), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_info
	movl	$1, (%r15)
LBB0_2:
	movq	_TEMPMON_SENSOR0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ddblreadl
	movzbl	%ah, %ecx
	xorl	%r14d, %r14d
	testl	$32768, %eax                    ## imm = 0x8000
	cmovnel	%r14d, %ecx
	movl	%ecx, %r12d
	movq	_TEMPMON_SENSOR1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ddblreadl
	movzbl	%ah, %ebx
	testl	$32768, %eax                    ## imm = 0x8000
	cmovnel	%r14d, %ebx
	cmpl	%r12d, %ebx
	cmovbel	%r12d, %ebx
	movq	_TEMPMON_FANCONTROL@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_ddblreadl
	shrl	$8, %eax
	andl	$15, %eax
	cmpl	$10, %eax
	movl	$10, %esi
	cmovbl	%eax, %esi
	movq	8(%r15), %rax
	cmpl	(%rax,%rsi,4), %ebx
	jge	LBB0_8
## %bb.3:
	cmpl	$2, %esi
	jb	LBB0_11
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	-8(%rax,%rsi,4), %ebx
	jge	LBB0_11
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	leaq	-1(%rsi), %rcx
	cmpq	$2, %rsi
	movq	%rcx, %rsi
	jg	LBB0_4
## %bb.6:
	movl	$1, %esi
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$10, %rsi
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_8 Depth=1
	leaq	1(%rsi), %rcx
	cmpl	4(%rax,%rsi,4), %ebx
	movq	%rcx, %rsi
	jge	LBB0_8
## %bb.10:
	decl	%ecx
	movl	%ecx, %esi
	jmp	LBB0_11
LBB0_9:
	movl	$10, %esi
LBB0_11:
	shll	$8, %esi
	movl	(%r14), %edx
	movq	%r15, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ddblwritel                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_TEMPMON_CONTROL,4,2            ## @TEMPMON_CONTROL
	.comm	_TEMPMON_CONTROL_OVERTEMP,4,2   ## @TEMPMON_CONTROL_OVERTEMP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Over temperature condition\n"

	.comm	_TEMPMON_SENSOR0,4,2            ## @TEMPMON_SENSOR0
	.comm	_TEMPMON_SENSOR1,4,2            ## @TEMPMON_SENSOR1
	.comm	_TEMPMON_FANCONTROL,4,2         ## @TEMPMON_FANCONTROL
	.no_dead_strip	_tempmon_setfan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tempmon_setfan
_tempmon_setfan:                        ; @tempmon_setfan
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _TEMPMON_CONTROL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TEMPMON_CONTROL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_ddblreadl
Lloh3:
	adrp	x8, _TEMPMON_CONTROL_OVERTEMP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TEMPMON_CONTROL_OVERTEMP@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
	ldr	x8, [x19, #16]
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_info
	mov	w8, #1
	str	w8, [x19]
LBB0_2:
Lloh8:
	adrp	x8, _TEMPMON_SENSOR0@GOTPAGE
Lloh9:
	ldr	x8, [x8, _TEMPMON_SENSOR0@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ddblreadl
	ubfx	w8, w0, #8, #8
	tst	w0, #0x8000
	csel	w20, w8, wzr, eq
Lloh11:
	adrp	x8, _TEMPMON_SENSOR1@GOTPAGE
Lloh12:
	ldr	x8, [x8, _TEMPMON_SENSOR1@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ddblreadl
	ubfx	w8, w0, #8, #8
	tst	w0, #0x8000
	csel	w8, w8, wzr, eq
	cmp	w8, w20
	csel	w21, w8, w20, hi
Lloh14:
	adrp	x20, _TEMPMON_FANCONTROL@GOTPAGE
Lloh15:
	ldr	x20, [x20, _TEMPMON_FANCONTROL@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	bl	_ddblreadl
	ubfx	w8, w0, #8, #4
	mov	w9, #10
	cmp	w8, #10
	csel	w8, w8, w9, lo
	ldr	x9, [x19, #8]
	ldr	w10, [x9, w8, uxtw #2]
	cmp	w21, w10
	b.ge	LBB0_8
; %bb.3:
	cmp	w8, #2
	b.lo	LBB0_12
; %bb.4:
	sub	x9, x9, #8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x9, x8, lsl #2]
	cmp	w21, w10
	b.ge	LBB0_12
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	sub	x10, x8, #1
	cmp	x8, #2
	mov	x8, x10
	b.gt	LBB0_5
; %bb.7:
	mov	w8, #1
	b	LBB0_12
LBB0_8:
	add	x9, x9, #4
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x8, #10
	b.eq	LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x10, x8, #1
	ldr	w11, [x9, x8, lsl #2]
	mov	x8, x10
	cmp	w21, w11
	b.ge	LBB0_9
; %bb.11:
	sub	w8, w10, #1
LBB0_12:
	lsl	w1, w8, #8
	ldr	w2, [x20]
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_ddblwritel
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_TEMPMON_CONTROL,4,2            ; @TEMPMON_CONTROL
	.comm	_TEMPMON_CONTROL_OVERTEMP,4,2   ; @TEMPMON_CONTROL_OVERTEMP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Over temperature condition\n"

	.comm	_TEMPMON_SENSOR0,4,2            ; @TEMPMON_SENSOR0
	.comm	_TEMPMON_SENSOR1,4,2            ; @TEMPMON_SENSOR1
	.comm	_TEMPMON_FANCONTROL,4,2         ; @TEMPMON_FANCONTROL
	.no_dead_strip	_tempmon_setfan
.subsections_via_symbols
