	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_tjmax
_get_tjmax:                             ## @get_tjmax
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %ebx
	movq	%rdi, %r15
	movq	_MSR_IA32_TEMPERATURE_TARGET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-36(%rbp), %rdx
	leaq	-40(%rbp), %rcx
	movl	%ebx, %edi
	callq	_rdmsr_safe_on_cpu
	testl	%eax, %eax
	je	LBB0_6
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_warn
	jmp	LBB0_2
LBB0_6:
	movzbl	-34(%rbp), %r12d
	leal	-81(%r12), %eax
	cmpl	$38, %eax
	ja	LBB0_2
## %bb.7:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%r12d, %edx
	callq	_dev_info
	imull	$1000, %r12d, %eax              ## imm = 0x3E8
	jmp	LBB0_11
LBB0_2:
	movl	(%r15), %edx
	cmpl	$28, %edx
	ja	LBB0_9
## %bb.3:
	movl	$71352320, %eax                 ## imm = 0x440C000
	btl	%edx, %eax
	jae	LBB0_4
## %bb.8:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_warn
	jmp	LBB0_10
LBB0_4:
	movl	$276824064, %eax                ## imm = 0x10800000
	btl	%edx, %eax
	jae	LBB0_9
## %bb.5:
	movq	%r15, %rdi
	movl	%ebx, %esi
	movq	%r14, %rdx
	callq	_adjust_tjmax
	jmp	LBB0_11
LBB0_9:
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_warn
LBB0_10:
	movl	$100000, %eax                   ## imm = 0x186A0
LBB0_11:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MSR_IA32_TEMPERATURE_TARGET,4,2 ## @MSR_IA32_TEMPERATURE_TARGET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to read TjMax from CPU.\n"

L_.str.1:                               ## @.str.1
	.asciz	"TjMax is %d C.\n"

L_.str.2:                               ## @.str.2
	.asciz	"TjMax is assumed as 100 C!\n"

L_.str.3:                               ## @.str.3
	.asciz	"CPU (model=0x%x) is not supported yet, using default TjMax of 100C.\n"

	.no_dead_strip	_get_tjmax
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_tjmax
_get_tjmax:                             ; @get_tjmax
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _MSR_IA32_TEMPERATURE_TARGET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MSR_IA32_TEMPERATURE_TARGET@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	add	x3, sp, #8
	mov	x0, x20
	bl	_rdmsr_safe_on_cpu
	cbz	w0, LBB0_2
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
	b	LBB0_4
LBB0_2:
	ldrb	w22, [sp, #14]
	sub	w8, w22, #81
	cmp	w8, #38
	b.hi	LBB0_4
; %bb.3:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	bl	_dev_info
	mov	w8, #1000
	mul	w20, w22, w8
	b	LBB0_11
LBB0_4:
	ldr	w8, [x21]
	cmp	w8, #28
	b.hi	LBB0_9
; %bb.5:
	mov	w9, #1
	lsl	w9, w9, w8
	mov	w10, #49152
	movk	w10, #1088, lsl #16
	tst	w9, w10
	b.eq	LBB0_7
; %bb.6:
	mov	w20, #34464
	movk	w20, #1, lsl #16
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_10
LBB0_7:
	mov	w10, #276824064
	tst	w9, w10
	b.eq	LBB0_9
; %bb.8:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_adjust_tjmax
	mov	x20, x0
	b	LBB0_11
LBB0_9:
	mov	w20, #34464
	movk	w20, #1, lsl #16
	str	x8, [sp]
Lloh9:
	adrp	x1, l_.str.3@PAGE
Lloh10:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_10:
	mov	x0, x19
	bl	_dev_warn
LBB0_11:
	mov	x0, x20
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_MSR_IA32_TEMPERATURE_TARGET,4,2 ; @MSR_IA32_TEMPERATURE_TARGET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to read TjMax from CPU.\n"

l_.str.1:                               ; @.str.1
	.asciz	"TjMax is %d C.\n"

l_.str.2:                               ; @.str.2
	.asciz	"TjMax is assumed as 100 C!\n"

l_.str.3:                               ; @.str.3
	.asciz	"CPU (model=0x%x) is not supported yet, using default TjMax of 100C.\n"

	.no_dead_strip	_get_tjmax
.subsections_via_symbols
