	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adjust_tjmax
_adjust_tjmax:                          ## @adjust_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, %r15d
	movq	%rdi, %rbx
	movl	(%rdi), %eax
	cmpl	$15, %eax
	je	LBB0_8
## %bb.1:
	cmpl	$28, %eax
	jne	LBB0_6
## %bb.2:
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_PCI_DEVFN
	xorl	%edi, %edi
	movl	%eax, %esi
	callq	_pci_get_bus_and_slot
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	(%rax), %rcx
	movq	_PCI_VENDOR_ID_INTEL@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_5
## %bb.4:
	movl	$-40960, %ecx                   ## imm = 0xFFFF6000
	addl	8(%rax), %ecx
	testl	$-17, %ecx
	je	LBB0_18
LBB0_5:
	movq	%rax, %rdi
	callq	_pci_dev_put
	movl	$90000, %ebx                    ## imm = 0x15F90
	jmp	LBB0_20
LBB0_8:
	cmpl	$3, 4(%rbx)
	jg	LBB0_9
	jmp	LBB0_19
LBB0_6:
	cmpl	$15, %eax
	jl	LBB0_7
LBB0_9:
	leaq	-36(%rbp), %rdx
	leaq	-40(%rbp), %rcx
	movl	%r15d, %edi
	movl	$23, %esi
	callq	_rdmsr_safe_on_cpu
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_warn
LBB0_19:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_warn
	movl	$100000, %ebx                   ## imm = 0x186A0
	jmp	LBB0_20
LBB0_11:
	movl	(%rbx), %eax
	cmpl	$22, %eax
	jg	LBB0_13
## %bb.12:
	testb	$16, -33(%rbp)
	je	LBB0_19
	jmp	LBB0_7
LBB0_13:
	cmpl	$23, %eax
	jne	LBB0_7
## %bb.14:
	movl	-40(%rbp), %eax
	notl	%eax
	testl	$1310720, %eax                  ## imm = 0x140000
	movl	$90000, %eax                    ## imm = 0x15F90
	movl	$85000, %r12d                   ## imm = 0x14C08
	cmovel	%eax, %r12d
	movl	$105000, %eax                   ## imm = 0x19A28
	movl	$100000, %ebx                   ## imm = 0x186A0
	cmovel	%eax, %ebx
	jmp	LBB0_15
LBB0_7:
	movl	$85000, %r12d                   ## imm = 0x14C08
	movl	$100000, %ebx                   ## imm = 0x186A0
LBB0_15:
	leaq	-36(%rbp), %rdx
	leaq	-40(%rbp), %rcx
	movl	%r15d, %edi
	movl	$238, %esi
	callq	_rdmsr_safe_on_cpu
	testl	%eax, %eax
	je	LBB0_17
## %bb.16:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_warn
	jmp	LBB0_20
LBB0_17:
	testb	$64, -33(%rbp)
	cmovnel	%r12d, %ebx
LBB0_20:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	movq	%rax, %rdi
	callq	_pci_dev_put
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_VENDOR_ID_INTEL,8,3        ## @PCI_VENDOR_ID_INTEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to access MSR 0x17, assuming desktop CPU\n"

L_.str.1:                               ## @.str.1
	.asciz	"Unable to access MSR 0xEE, for Tjmax, left at default\n"

L_.str.2:                               ## @.str.2
	.asciz	"Using relative temperature scale!\n"

	.no_dead_strip	_adjust_tjmax
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adjust_tjmax
_adjust_tjmax:                          ; @adjust_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
	ldr	w8, [x0]
	cmp	w8, #15
	b.eq	LBB0_6
; %bb.1:
	cmp	w8, #28
	b.ne	LBB0_7
; %bb.2:
	mov	w0, #0
	mov	w1, #0
	bl	_PCI_DEVFN
	mov	x1, x0
	mov	w0, #0
	bl	_pci_get_bus_and_slot
	cbz	x0, LBB0_5
; %bb.3:
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _PCI_VENDOR_ID_INTEL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PCI_VENDOR_ID_INTEL@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.4:
	ldr	w8, [x0, #8]
	sub	w8, w8, #10, lsl #12            ; =40960
	tst	w8, #0xffffffef
	b.eq	LBB0_21
LBB0_5:
	mov	w21, #24464
	movk	w21, #1, lsl #16
	bl	_pci_dev_put
	b	LBB0_17
LBB0_6:
	ldr	w8, [x21, #4]
	cmp	w8, #3
	b.gt	LBB0_8
	b	LBB0_10
LBB0_7:
	cmp	w8, #15
	b.lt	LBB0_13
LBB0_8:
	add	x2, sp, #12
	add	x3, sp, #8
	mov	x0, x20
	mov	w1, #23
	bl	_rdmsr_safe_on_cpu
	cbz	w0, LBB0_11
; %bb.9:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
LBB0_10:
	mov	w21, #34464
	movk	w21, #1, lsl #16
Lloh5:
	adrp	x1, l_.str.2@PAGE
Lloh6:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_16
LBB0_11:
	ldr	w8, [x21]
	cmp	w8, #22
	b.gt	LBB0_19
; %bb.12:
	ldrb	w8, [sp, #15]
	tbz	w8, #4, LBB0_10
LBB0_13:
	mov	w21, #34464
	movk	w21, #1, lsl #16
	mov	w22, #19464
	movk	w22, #1, lsl #16
LBB0_14:
	add	x2, sp, #12
	add	x3, sp, #8
	mov	x0, x20
	mov	w1, #238
	bl	_rdmsr_safe_on_cpu
	cbz	w0, LBB0_18
; %bb.15:
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_16:
	mov	x0, x19
	bl	_dev_warn
LBB0_17:
	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
	add	sp, sp, #64
	ret
LBB0_18:
	ldrb	w8, [sp, #15]
	tst	w8, #0x40
	csel	w21, w21, w22, eq
	b	LBB0_17
LBB0_19:
	mov	w21, #34464
	movk	w21, #1, lsl #16
	mov	w22, #19464
	movk	w22, #1, lsl #16
	cmp	w8, #23
	b.ne	LBB0_14
; %bb.20:
	ldr	w8, [sp, #8]
	mov	w9, #1310720
	and	w8, w8, w9
	mov	w9, #24464
	movk	w9, #1, lsl #16
	cmp	w8, #320, lsl #12               ; =1310720
	csel	w22, w9, w22, eq
	mov	w8, #39464
	movk	w8, #1, lsl #16
	csel	w21, w8, w21, eq
	b	LBB0_14
LBB0_21:
	bl	_pci_dev_put
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_VENDOR_ID_INTEL,8,3        ; @PCI_VENDOR_ID_INTEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to access MSR 0x17, assuming desktop CPU\n"

l_.str.1:                               ; @.str.1
	.asciz	"Unable to access MSR 0xEE, for Tjmax, left at default\n"

l_.str.2:                               ; @.str.2
	.asciz	"Using relative temperature scale!\n"

	.no_dead_strip	_adjust_tjmax
.subsections_via_symbols
