	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_th_pti_activate
_intel_th_pti_activate:                 ## @intel_th_pti_activate
	.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
	movq	%rdi, %r14
	callq	_dev_get_drvdata
	movq	%rax, %r15
	movq	_PTI_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	(%r15), %ebx
	testl	%ebx, %ebx
	je	LBB0_2
## %bb.1:
	movq	_PTI_PATGENMODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	___ffs
	movl	%eax, %ecx
	shll	%cl, %ebx
	orl	%ebx, %r12d
LBB0_2:
	cmpq	$0, 24(%r15)
	movl	$0, %r13d
	je	LBB0_4
## %bb.3:
	movq	_PTI_FCEN@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
LBB0_4:
	orl	%r12d, %r13d
	movl	4(%r15), %r12d
	movq	_PTI_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	___ffs
	movl	%eax, %ecx
	shll	%cl, %r12d
	movl	8(%r15), %ebx
	movq	_PTI_CLKDIV@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	___ffs
	movl	%eax, %ecx
	shll	%cl, %ebx
	orl	%r12d, %ebx
	orl	%r13d, %ebx
	movl	12(%r15), %r12d
	movq	_LPP_DEST@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	___ffs
	movl	%eax, %ecx
	shll	%cl, %r12d
	orl	%ebx, %r12d
	movq	_REG_PTI_CTL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	16(%r15), %rsi
	movl	%r12d, %edi
	callq	_iowrite32
	movq	%r14, %rdi
	callq	_intel_th_trace_enable
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PTI_EN,4,2                     ## @PTI_EN
	.comm	_PTI_PATGENMODE,4,2             ## @PTI_PATGENMODE
	.comm	_PTI_FCEN,4,2                   ## @PTI_FCEN
	.comm	_PTI_MODE,4,2                   ## @PTI_MODE
	.comm	_PTI_CLKDIV,4,2                 ## @PTI_CLKDIV
	.comm	_LPP_DEST,4,2                   ## @LPP_DEST
	.comm	_REG_PTI_CTL,8,3                ## @REG_PTI_CTL
	.no_dead_strip	_intel_th_pti_activate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_th_pti_activate
_intel_th_pti_activate:                 ; @intel_th_pti_activate
	.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
	bl	_dev_get_drvdata
	mov	x20, x0
Lloh0:
	adrp	x8, _PTI_EN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PTI_EN@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	ldr	w22, [x0]
	cbz	w22, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _PTI_PATGENMODE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PTI_PATGENMODE@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	___ffs
	lsl	w8, w22, w0
	orr	w21, w8, w21
LBB0_2:
	ldr	x8, [x20, #24]
Lloh6:
	adrp	x9, _PTI_FCEN@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PTI_FCEN@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	cmp	x8, #0
	csel	w8, wzr, w9, eq
	orr	w21, w8, w21
	ldr	w22, [x20, #4]
Lloh9:
	adrp	x8, _PTI_MODE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PTI_MODE@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	bl	___ffs
	lsl	w8, w22, w0
	orr	w21, w21, w8
	ldr	w22, [x20, #8]
Lloh12:
	adrp	x8, _PTI_CLKDIV@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PTI_CLKDIV@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	___ffs
	lsl	w8, w22, w0
	orr	w21, w21, w8
	ldr	w22, [x20, #12]
Lloh15:
	adrp	x8, _LPP_DEST@GOTPAGE
Lloh16:
	ldr	x8, [x8, _LPP_DEST@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	___ffs
	lsl	w8, w22, w0
	orr	w0, w21, w8
	ldr	x8, [x20, #16]
Lloh18:
	adrp	x9, _REG_PTI_CTL@GOTPAGE
Lloh19:
	ldr	x9, [x9, _REG_PTI_CTL@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_iowrite32
	mov	x0, x19
	bl	_intel_th_trace_enable
	mov	w0, #0
	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
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_PTI_EN,4,2                     ; @PTI_EN
	.comm	_PTI_PATGENMODE,4,2             ; @PTI_PATGENMODE
	.comm	_PTI_FCEN,4,2                   ; @PTI_FCEN
	.comm	_PTI_MODE,4,2                   ; @PTI_MODE
	.comm	_PTI_CLKDIV,4,2                 ; @PTI_CLKDIV
	.comm	_LPP_DEST,4,2                   ; @LPP_DEST
	.comm	_REG_PTI_CTL,8,3                ; @REG_PTI_CTL
	.no_dead_strip	_intel_th_pti_activate
.subsections_via_symbols
