	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tempmon_init
_tempmon_init:                          ## @tempmon_init
	.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
	movl	%esi, %r13d
	movq	%rdi, %rbx
	movq	8(%rdi), %r15
	movl	28(%rdi), %r12d
	leaq	4(%rdi), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irq
	testl	%r13d, %r13d
	je	LBB0_2
## %bb.1:
	movl	24(%rbx), %edi
	leaq	_tempmon_init.temperature_table(%rip), %rsi
	movl	$44, %edx
	callq	_memcpy
LBB0_2:
	movq	16(%rbx), %rax
	movl	(%rax), %edx
	movq	_temp_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movl	%r12d, %esi
	movq	%rbx, %r8
	callq	_ddb_irq_set
	movq	_TEMPMON_CONTROL_OVERTEMP@GOTPCREL(%rip), %r15
	movq	_TEMPMON_CONTROL_AUTOSCAN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	(%r15), %esi
	movq	_TEMPMON_CONTROL_INTENABLE@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	_TEMPMON_CONTROL@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	%rbx, %rdi
	callq	_ddblwritel
	movq	_TEMPMON_FANCONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	$768, %esi                      ## imm = 0x300
	callq	_ddblwritel
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_ddblreadl
	xorl	%ecx, %ecx
	andl	(%r15), %eax
	setne	%cl
	movl	%ecx, (%rbx)
	je	LBB0_3
## %bb.4:
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_info
	movl	$-1, %r15d
	jmp	LBB0_5
LBB0_3:
	xorl	%r15d, %r15d
LBB0_5:
	movq	%rbx, %rdi
	callq	_tempmon_setfan
	movq	%r14, %rdi
	callq	_spin_unlock_irq
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__DATA,__data
	.p2align	4                               ## @tempmon_init.temperature_table
_tempmon_init.temperature_table:
	.long	30                              ## 0x1e
	.long	35                              ## 0x23
	.long	40                              ## 0x28
	.long	45                              ## 0x2d
	.long	50                              ## 0x32
	.long	55                              ## 0x37
	.long	60                              ## 0x3c
	.long	65                              ## 0x41
	.long	70                              ## 0x46
	.long	75                              ## 0x4b
	.long	80                              ## 0x50

	.comm	_temp_handler,4,2               ## @temp_handler
	.comm	_TEMPMON_CONTROL_OVERTEMP,4,2   ## @TEMPMON_CONTROL_OVERTEMP
	.comm	_TEMPMON_CONTROL_AUTOSCAN,4,2   ## @TEMPMON_CONTROL_AUTOSCAN
	.comm	_TEMPMON_CONTROL_INTENABLE,4,2  ## @TEMPMON_CONTROL_INTENABLE
	.comm	_TEMPMON_CONTROL,4,2            ## @TEMPMON_CONTROL
	.comm	_TEMPMON_FANCONTROL,4,2         ## @TEMPMON_FANCONTROL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Over temperature condition\n"

	.no_dead_strip	_tempmon_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tempmon_init
_tempmon_init:                          ; @tempmon_init
	.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	x23, x1
	mov	x19, x0
	ldr	x21, [x0, #8]
	ldr	w22, [x0, #28]
	add	x20, x0, #4
	mov	x0, x20
	bl	_spin_lock_irq
	cbz	w23, LBB0_2
; %bb.1:
	ldr	w0, [x19, #24]
Lloh0:
	adrp	x1, _tempmon_init.temperature_table@PAGE
Lloh1:
	add	x1, x1, _tempmon_init.temperature_table@PAGEOFF
	mov	w2, #44
	bl	_memcpy
LBB0_2:
	ldr	x8, [x19, #16]
	ldr	w2, [x8]
Lloh2:
	adrp	x8, _temp_handler@GOTPAGE
Lloh3:
	ldr	x8, [x8, _temp_handler@GOTPAGEOFF]
Lloh4:
	ldr	w3, [x8]
	mov	x0, x21
	mov	x1, x22
	mov	x4, x19
	bl	_ddb_irq_set
Lloh5:
	adrp	x21, _TEMPMON_CONTROL_OVERTEMP@GOTPAGE
Lloh6:
	ldr	x21, [x21, _TEMPMON_CONTROL_OVERTEMP@GOTPAGEOFF]
	ldr	w8, [x21]
Lloh7:
	adrp	x9, _TEMPMON_CONTROL_AUTOSCAN@GOTPAGE
Lloh8:
	ldr	x9, [x9, _TEMPMON_CONTROL_AUTOSCAN@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
Lloh10:
	adrp	x10, _TEMPMON_CONTROL_INTENABLE@GOTPAGE
Lloh11:
	ldr	x10, [x10, _TEMPMON_CONTROL_INTENABLE@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh12:
	ldr	w9, [x10]
	orr	w1, w8, w9
Lloh13:
	adrp	x22, _TEMPMON_CONTROL@GOTPAGE
Lloh14:
	ldr	x22, [x22, _TEMPMON_CONTROL@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x0, x19
	bl	_ddblwritel
Lloh15:
	adrp	x8, _TEMPMON_FANCONTROL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _TEMPMON_FANCONTROL@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #768
	bl	_ddblwritel
	ldr	w1, [x22]
	mov	x0, x19
	bl	_ddblreadl
	ldr	w8, [x21]
	ands	w8, w8, w0
	cset	w9, ne
	str	w9, [x19]
	cbz	w8, LBB0_4
; %bb.3:
	ldr	x8, [x19, #8]
	ldr	w0, [x8]
Lloh18:
	adrp	x1, l_.str@PAGE
Lloh19:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_info
	mov	w21, #-1
	b	LBB0_5
LBB0_4:
	mov	w21, #0
LBB0_5:
	mov	x0, x19
	bl	_tempmon_setfan
	mov	x0, x20
	bl	_spin_unlock_irq
	mov	x0, x21
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__DATA,__data
	.p2align	2                               ; @tempmon_init.temperature_table
_tempmon_init.temperature_table:
	.long	30                              ; 0x1e
	.long	35                              ; 0x23
	.long	40                              ; 0x28
	.long	45                              ; 0x2d
	.long	50                              ; 0x32
	.long	55                              ; 0x37
	.long	60                              ; 0x3c
	.long	65                              ; 0x41
	.long	70                              ; 0x46
	.long	75                              ; 0x4b
	.long	80                              ; 0x50

	.comm	_temp_handler,4,2               ; @temp_handler
	.comm	_TEMPMON_CONTROL_OVERTEMP,4,2   ; @TEMPMON_CONTROL_OVERTEMP
	.comm	_TEMPMON_CONTROL_AUTOSCAN,4,2   ; @TEMPMON_CONTROL_AUTOSCAN
	.comm	_TEMPMON_CONTROL_INTENABLE,4,2  ; @TEMPMON_CONTROL_INTENABLE
	.comm	_TEMPMON_CONTROL,4,2            ; @TEMPMON_CONTROL
	.comm	_TEMPMON_FANCONTROL,4,2         ; @TEMPMON_FANCONTROL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Over temperature condition\n"

	.no_dead_strip	_tempmon_init
.subsections_via_symbols
