	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_th_gth_reset
_intel_th_gth_reset:                    ## @intel_th_gth_reset
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	_REG_GTH_SCRPD0@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	(%r15), %rdi
	callq	_ioread32
	movq	_SCRPD_DEBUGGER_IN_USE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_9
LBB0_2:
	movq	_SCRPD_STH_IS_ENABLED@GOTPCREL(%rip), %rcx
	movq	_SCRPD_TRIGGER_IS_ENABLED@GOTPCREL(%rip), %rdx
	orl	(%rcx), %eax
	orl	(%rdx), %eax
	movq	(%rbx), %rsi
	addq	(%r15), %rsi
	movl	%eax, %edi
	callq	_iowrite32
	xorl	%ebx, %ebx
	movq	_GTH_NONE@GOTPCREL(%rip), %r14
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	incl	%ebx
	cmpl	$8, %ebx
	je	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	callq	_TH_OUTPUT_PARM
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_gth_output_parm_get
	cmpq	(%r14), %rax
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_gth_output_set
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	$16, %edx
	callq	_gth_smcfreq_set
	jmp	LBB0_5
LBB0_6:
	movq	_REG_GTH_DESTOVR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r15), %rsi
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	callq	_iowrite32
	movq	_REG_GTH_SWDEST0@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rsi
	addq	(%r14), %rsi
	addq	%rbx, %rsi
	xorl	%edi, %edi
	callq	_iowrite32
	addq	$4, %rbx
	cmpq	$132, %rbx
	jne	LBB0_7
## %bb.8:
	movq	_REG_GTH_SCR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r15), %rsi
	xorl	%r14d, %r14d
	xorl	%edi, %edi
	callq	_iowrite32
	movq	_REG_GTH_SCR2@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r15), %rsi
	movl	$252, %edi
	callq	_iowrite32
	movq	_CTS_EVENT_ENABLE_IF_ANYTHING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_REG_CTS_C0S0_EN@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r15), %rsi
	callq	_iowrite32
	movq	_CTS_STATE_IDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_CTS_ACTION_CONTROL_SET_STATE
	movq	_CTS_ACTION_CONTROL_TRIGGER@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_REG_CTS_C0S0_ACT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	(%r15), %rsi
	movl	%eax, %edi
	callq	_iowrite32
LBB0_9:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_GTH_SCRPD0,8,3             ## @REG_GTH_SCRPD0
	.comm	_SCRPD_DEBUGGER_IN_USE,4,2      ## @SCRPD_DEBUGGER_IN_USE
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_SCRPD_STH_IS_ENABLED,4,2       ## @SCRPD_STH_IS_ENABLED
	.comm	_SCRPD_TRIGGER_IS_ENABLED,4,2   ## @SCRPD_TRIGGER_IS_ENABLED
	.comm	_GTH_NONE,8,3                   ## @GTH_NONE
	.comm	_REG_GTH_DESTOVR,8,3            ## @REG_GTH_DESTOVR
	.comm	_REG_GTH_SWDEST0,8,3            ## @REG_GTH_SWDEST0
	.comm	_REG_GTH_SCR,8,3                ## @REG_GTH_SCR
	.comm	_REG_GTH_SCR2,8,3               ## @REG_GTH_SCR2
	.comm	_CTS_EVENT_ENABLE_IF_ANYTHING,4,2 ## @CTS_EVENT_ENABLE_IF_ANYTHING
	.comm	_REG_CTS_C0S0_EN,8,3            ## @REG_CTS_C0S0_EN
	.comm	_CTS_STATE_IDLE,4,2             ## @CTS_STATE_IDLE
	.comm	_CTS_ACTION_CONTROL_TRIGGER,4,2 ## @CTS_ACTION_CONTROL_TRIGGER
	.comm	_REG_CTS_C0S0_ACT,8,3           ## @REG_CTS_C0S0_ACT
	.no_dead_strip	_intel_th_gth_reset
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_th_gth_reset
_intel_th_gth_reset:                    ; @intel_th_gth_reset
	.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
	ldr	x8, [x0]
Lloh0:
	adrp	x20, _REG_GTH_SCRPD0@GOTPAGE
Lloh1:
	ldr	x20, [x20, _REG_GTH_SCRPD0@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_ioread32
Lloh2:
	adrp	x8, _SCRPD_DEBUGGER_IN_USE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SCRPD_DEBUGGER_IN_USE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _EBUSY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_2:
Lloh8:
	adrp	x8, _SCRPD_STH_IS_ENABLED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SCRPD_STH_IS_ENABLED@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x9, _SCRPD_TRIGGER_IS_ENABLED@GOTPAGE
Lloh12:
	ldr	x9, [x9, _SCRPD_TRIGGER_IS_ENABLED@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w8, w0
	orr	w0, w8, w9
	ldr	x8, [x19]
	ldr	x9, [x20]
	add	x1, x9, x8
	bl	_iowrite32
	mov	w20, #0
Lloh14:
	adrp	x21, _GTH_NONE@GOTPAGE
Lloh15:
	ldr	x21, [x21, _GTH_NONE@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w20, w20, #1
	cmp	w20, #8
	b.eq	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	bl	_TH_OUTPUT_PARM
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_gth_output_parm_get
	ldr	x8, [x21]
	cmp	x0, x8
	b.eq	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_gth_output_set
	mov	x0, x19
	mov	x1, x20
	mov	w2, #16
	bl	_gth_smcfreq_set
	b	LBB0_3
LBB0_6:
	ldr	x8, [x19]
Lloh16:
	adrp	x9, _REG_GTH_DESTOVR@GOTPAGE
Lloh17:
	ldr	x9, [x9, _REG_GTH_DESTOVR@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #0
	bl	_iowrite32
	mov	x20, #0
Lloh19:
	adrp	x21, _REG_GTH_SWDEST0@GOTPAGE
Lloh20:
	ldr	x21, [x21, _REG_GTH_SWDEST0@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	ldr	x9, [x21]
	add	x8, x8, x9
	add	x1, x20, x8
	mov	w0, #0
	bl	_iowrite32
	add	x20, x20, #4
	cmp	x20, #132
	b.ne	LBB0_7
; %bb.8:
	ldr	x8, [x19]
Lloh21:
	adrp	x9, _REG_GTH_SCR@GOTPAGE
Lloh22:
	ldr	x9, [x9, _REG_GTH_SCR@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #0
	bl	_iowrite32
	ldr	x8, [x19]
Lloh24:
	adrp	x9, _REG_GTH_SCR2@GOTPAGE
Lloh25:
	ldr	x9, [x9, _REG_GTH_SCR2@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #252
	bl	_iowrite32
Lloh27:
	adrp	x8, _CTS_EVENT_ENABLE_IF_ANYTHING@GOTPAGE
Lloh28:
	ldr	x8, [x8, _CTS_EVENT_ENABLE_IF_ANYTHING@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
	ldr	x8, [x19]
Lloh30:
	adrp	x9, _REG_CTS_C0S0_EN@GOTPAGE
Lloh31:
	ldr	x9, [x9, _REG_CTS_C0S0_EN@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_iowrite32
Lloh33:
	adrp	x8, _CTS_STATE_IDLE@GOTPAGE
Lloh34:
	ldr	x8, [x8, _CTS_STATE_IDLE@GOTPAGEOFF]
Lloh35:
	ldr	w0, [x8]
	bl	_CTS_ACTION_CONTROL_SET_STATE
Lloh36:
	adrp	x8, _CTS_ACTION_CONTROL_TRIGGER@GOTPAGE
Lloh37:
	ldr	x8, [x8, _CTS_ACTION_CONTROL_TRIGGER@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	orr	w0, w8, w0
	ldr	x8, [x19]
Lloh39:
	adrp	x9, _REG_CTS_C0S0_ACT@GOTPAGE
Lloh40:
	ldr	x9, [x9, _REG_CTS_C0S0_ACT@GOTPAGEOFF]
Lloh41:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_iowrite32
	mov	w0, #0
LBB0_9:
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_GTH_SCRPD0,8,3             ; @REG_GTH_SCRPD0
	.comm	_SCRPD_DEBUGGER_IN_USE,4,2      ; @SCRPD_DEBUGGER_IN_USE
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_SCRPD_STH_IS_ENABLED,4,2       ; @SCRPD_STH_IS_ENABLED
	.comm	_SCRPD_TRIGGER_IS_ENABLED,4,2   ; @SCRPD_TRIGGER_IS_ENABLED
	.comm	_GTH_NONE,8,3                   ; @GTH_NONE
	.comm	_REG_GTH_DESTOVR,8,3            ; @REG_GTH_DESTOVR
	.comm	_REG_GTH_SWDEST0,8,3            ; @REG_GTH_SWDEST0
	.comm	_REG_GTH_SCR,8,3                ; @REG_GTH_SCR
	.comm	_REG_GTH_SCR2,8,3               ; @REG_GTH_SCR2
	.comm	_CTS_EVENT_ENABLE_IF_ANYTHING,4,2 ; @CTS_EVENT_ENABLE_IF_ANYTHING
	.comm	_REG_CTS_C0S0_EN,8,3            ; @REG_CTS_C0S0_EN
	.comm	_CTS_STATE_IDLE,4,2             ; @CTS_STATE_IDLE
	.comm	_CTS_ACTION_CONTROL_TRIGGER,4,2 ; @CTS_ACTION_CONTROL_TRIGGER
	.comm	_REG_CTS_C0S0_ACT,8,3           ; @REG_CTS_C0S0_ACT
	.no_dead_strip	_intel_th_gth_reset
.subsections_via_symbols
