	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r13
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_PCI_DEVFN
	xorl	%edi, %edi
	xorl	%esi, %esi
	movl	%eax, %edx
	callq	_pci_get_domain_bus_and_slot
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rax, %r12
	movq	(%rax), %rax
	movq	_PCI_VENDOR_ID_INTEL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.2:
	movq	_tjmax_pci_table@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_7
## %bb.3:
	movl	$8, %r15d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	movq	(%r14), %rdi
	cmpq	-8(%rdi,%r15), %rax
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	incq	%rbx
	callq	_ARRAY_SIZE
	cltq
	addq	$40, %r15
	cmpq	%rax, %rbx
	jl	LBB0_4
LBB0_7:
	movq	_tjmax_table@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_12
## %bb.8:
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	16(%r13), %edi
	movq	(%r12), %rax
	movl	32(%rax,%r14), %esi
	callq	_strstr
	testq	%rax, %rax
	jne	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	incq	%rbx
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	cltq
	addq	$40, %r14
	cmpq	%rax, %rbx
	jl	LBB0_9
LBB0_12:
	movq	_tjmax_model_table@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_19
## %bb.13:
	movl	$24, %ebx
	xorl	%r14d, %r14d
	movq	_ANY@GOTPCREL(%rip), %r15
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_14 Depth=1
	incq	%r14
	callq	_ARRAY_SIZE
	cltq
	addq	$40, %rbx
	cmpq	%rax, %r14
	jge	LBB0_19
LBB0_14:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdi
	movq	(%r13), %rax
	cmpq	-8(%rdi,%rbx), %rax
	jne	LBB0_18
## %bb.15:                              ##   in Loop: Header=BB0_14 Depth=1
	movq	(%rdi,%rbx), %rax
	cmpq	(%r15), %rax
	je	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_14 Depth=1
	cmpq	%rax, 8(%r13)
	jne	LBB0_18
LBB0_17:
	movl	-16(%rdi,%rbx), %ebx
	jmp	LBB0_33
LBB0_19:
	cmpq	$15, (%r13)
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movl	-52(%rbp), %r15d                ## 4-byte Reload
	jne	LBB0_24
## %bb.20:
	cmpq	$3, 8(%r13)
	jg	LBB0_21
	jmp	LBB0_23
LBB0_10:
	movq	(%r12), %rax
	movl	8(%rax,%r14), %ebx
	jmp	LBB0_33
LBB0_24:
	jl	LBB0_25
LBB0_21:
	leaq	-44(%rbp), %rdx
	leaq	-48(%rbp), %rcx
	movl	%r15d, %edi
	movl	$23, %esi
	callq	_rdmsr_safe_on_cpu
	testl	%eax, %eax
	je	LBB0_26
## %bb.22:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_warn
LBB0_23:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_warn
	movl	$100000, %ebx                   ## imm = 0x186A0
	jmp	LBB0_33
LBB0_5:
	movl	(%rdi,%r15), %ebx
	jmp	LBB0_33
LBB0_26:
	movq	(%r13), %rax
	cmpq	$22, %rax
	jg	LBB0_28
## %bb.27:
	testb	$16, -41(%rbp)
	je	LBB0_23
	jmp	LBB0_25
LBB0_28:
	cmpq	$23, %rax
	jne	LBB0_25
## %bb.29:
	movl	-48(%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_30
LBB0_25:
	movl	$85000, %r12d                   ## imm = 0x14C08
	movl	$100000, %ebx                   ## imm = 0x186A0
LBB0_30:
	leaq	-44(%rbp), %rdx
	leaq	-48(%rbp), %rcx
	movl	%r15d, %edi
	movl	$238, %esi
	callq	_rdmsr_safe_on_cpu
	testl	%eax, %eax
	je	LBB0_32
## %bb.31:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_warn
	jmp	LBB0_33
LBB0_32:
	testb	$64, -41(%rbp)
	cmovnel	%r12d, %ebx
LBB0_33:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_VENDOR_ID_INTEL,8,3        ## @PCI_VENDOR_ID_INTEL
	.comm	_tjmax_pci_table,8,3            ## @tjmax_pci_table
	.comm	_tjmax_table,8,3                ## @tjmax_table
	.comm	_tjmax_model_table,8,3          ## @tjmax_model_table
	.comm	_ANY,8,3                        ## @ANY
	.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, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	mov	w0, #0
	mov	w1, #0
	bl	_PCI_DEVFN
	mov	x2, x0
	mov	w0, #0
	mov	w1, #0
	bl	_pci_get_domain_bus_and_slot
	cbz	x0, LBB0_6
; %bb.1:
	mov	x22, x0
	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_6
; %bb.2:
Lloh3:
	adrp	x23, _tjmax_pci_table@GOTPAGE
Lloh4:
	ldr	x23, [x23, _tjmax_pci_table@GOTPAGEOFF]
	ldr	x0, [x23]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_6
; %bb.3:
	mov	x24, #0
	mov	x25, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22, #8]
	ldr	x0, [x23]
	ldr	x9, [x0, x24]
	cmp	x8, x9
	b.eq	LBB0_28
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x25, x25, #1
	bl	_ARRAY_SIZE
	add	x24, x24, #40
	cmp	x25, w0, sxtw
	b.lt	LBB0_4
LBB0_6:
Lloh5:
	adrp	x22, _tjmax_table@GOTPAGE
Lloh6:
	ldr	x22, [x22, _tjmax_table@GOTPAGEOFF]
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_10
; %bb.7:
	mov	x23, #0
	mov	x24, #0
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21, #16]
	ldr	x8, [x22]
	add	x8, x8, x23
	ldr	w1, [x8, #32]
	bl	_strstr
	cbnz	x0, LBB0_19
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	x24, x24, #1
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	add	x23, x23, #40
	cmp	x24, w0, sxtw
	b.lt	LBB0_8
LBB0_10:
Lloh7:
	adrp	x22, _tjmax_model_table@GOTPAGE
Lloh8:
	ldr	x22, [x22, _tjmax_model_table@GOTPAGEOFF]
	ldr	x0, [x22]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_17
; %bb.11:
	mov	x23, #0
	mov	x24, #0
Lloh9:
	adrp	x25, _ANY@GOTPAGE
Lloh10:
	ldr	x25, [x25, _ANY@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	add	x24, x24, #1
	bl	_ARRAY_SIZE
	add	x23, x23, #40
	cmp	x24, w0, sxtw
	b.ge	LBB0_17
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x22]
	ldr	x9, [x21]
	add	x8, x0, x23
	ldr	x10, [x8, #16]
	cmp	x9, x10
	b.ne	LBB0_12
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	x8, [x8, #24]
	ldr	x9, [x25]
	cmp	x8, x9
	b.eq	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	x9, [x21, #8]
	cmp	x9, x8
	b.ne	LBB0_12
LBB0_16:
	add	x8, x0, x23
	ldr	w22, [x8, #8]
	b	LBB0_32
LBB0_17:
	mov	w22, #34464
	movk	w22, #1, lsl #16
	ldr	x8, [x21]
	cmp	x8, #15
	b.ne	LBB0_20
; %bb.18:
	ldr	x8, [x21, #8]
	cmp	x8, #3
	b.gt	LBB0_21
	b	LBB0_23
LBB0_19:
	ldr	x8, [x22]
	add	x8, x8, x23
	ldr	w22, [x8, #8]
	b	LBB0_32
LBB0_20:
	b.lt	LBB0_24
LBB0_21:
	add	x2, sp, #12
	add	x3, sp, #8
	mov	x0, x20
	mov	w1, #23
	bl	_rdmsr_safe_on_cpu
	cbz	w0, LBB0_29
; %bb.22:
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
LBB0_23:
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_27
LBB0_24:
	mov	w23, #19464
	movk	w23, #1, lsl #16
LBB0_25:
	add	x2, sp, #12
	add	x3, sp, #8
	mov	x0, x20
	mov	w1, #238
	bl	_rdmsr_safe_on_cpu
	cbz	w0, LBB0_31
; %bb.26:
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_27:
	mov	x0, x19
	bl	_dev_warn
	b	LBB0_32
LBB0_28:
	add	x8, x0, x24
	ldr	w22, [x8, #8]
	b	LBB0_32
LBB0_29:
	mov	w23, #19464
	movk	w23, #1, lsl #16
	ldr	x8, [x21]
	cmp	x8, #22
	b.gt	LBB0_33
; %bb.30:
	ldrb	w8, [sp, #15]
	tbz	w8, #4, LBB0_23
	b	LBB0_25
LBB0_31:
	ldrb	w8, [sp, #15]
	tst	w8, #0x40
	csel	w22, w22, w23, eq
LBB0_32:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_33:
	cmp	x8, #23
	b.ne	LBB0_25
; %bb.34:
	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	w23, w9, w23, eq
	mov	w8, #39464
	movk	w8, #1, lsl #16
	csel	w22, w8, w22, eq
	b	LBB0_25
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_VENDOR_ID_INTEL,8,3        ; @PCI_VENDOR_ID_INTEL
	.comm	_tjmax_pci_table,8,3            ; @tjmax_pci_table
	.comm	_tjmax_table,8,3                ; @tjmax_table
	.comm	_tjmax_model_table,8,3          ; @tjmax_model_table
	.comm	_ANY,8,3                        ; @ANY
	.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
