	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_th_gth_switch
_intel_th_gth_switch:                   ## @intel_th_gth_switch
	.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	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	callq	_dev_get_drvdata
	movq	%rax, %r12
	movq	_REG_CTS_CTL@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	addq	(%rax), %rsi
	xorl	%edi, %edi
	callq	_iowrite32
	movq	_CTS_CTL_SEQUENCER_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%rbx), %rsi
	addq	(%r12), %rsi
	callq	_iowrite32
	movq	_CTS_TRIG_WAITLOOP_DEPTH@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	testq	%r13, %r13
	je	LBB0_4
## %bb.1:
	movq	_REG_CTS_STAT@GOTPCREL(%rip), %r14
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	$4, %edi
	callq	_BIT
	testl	%ebx, %eax
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r14), %rdi
	addq	(%r12), %rdi
	callq	_ioread32
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_cpu_relax
	decq	%r13
	jne	LBB0_2
LBB0_4:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_dbg
LBB0_5:
	movq	_REG_CTS_CTL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r12), %rsi
	xorl	%edi, %edi
	callq	_iowrite32
	movq	%r12, %rdi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_intel_th_gth_stop
	movq	%r12, %rdi
	movq	%rbx, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_intel_th_gth_start             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_CTS_CTL,8,3                ## @REG_CTS_CTL
	.comm	_CTS_CTL_SEQUENCER_ENABLE,4,2   ## @CTS_CTL_SEQUENCER_ENABLE
	.comm	_CTS_TRIG_WAITLOOP_DEPTH,8,3    ## @CTS_TRIG_WAITLOOP_DEPTH
	.comm	_REG_CTS_STAT,8,3               ## @REG_CTS_STAT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"timeout waiting for CTS Trigger\n"

	.no_dead_strip	_intel_th_gth_switch
.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_switch
_intel_th_gth_switch:                   ; @intel_th_gth_switch
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x1
	mov	x21, x0
	bl	_dev_get_drvdata
	mov	x20, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x23, _REG_CTS_CTL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _REG_CTS_CTL@GOTPAGEOFF]
	ldr	x9, [x23]
	add	x1, x9, x8
	mov	w0, #0
	bl	_iowrite32
Lloh2:
	adrp	x8, _CTS_CTL_SEQUENCER_ENABLE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CTS_CTL_SEQUENCER_ENABLE@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	ldr	x8, [x20]
	ldr	x9, [x23]
	add	x1, x9, x8
	bl	_iowrite32
Lloh5:
	adrp	x8, _CTS_TRIG_WAITLOOP_DEPTH@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CTS_TRIG_WAITLOOP_DEPTH@GOTPAGEOFF]
Lloh7:
	ldr	x24, [x8]
	cbz	x24, LBB0_4
; %bb.1:
	mov	w22, #0
Lloh8:
	adrp	x25, _REG_CTS_STAT@GOTPAGE
Lloh9:
	ldr	x25, [x25, _REG_CTS_STAT@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #4
	bl	_BIT
	tst	w0, w22
	b.ne	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x20]
	ldr	x9, [x25]
	add	x0, x9, x8
	bl	_ioread32
	mov	x22, x0
	bl	_cpu_relax
	subs	x24, x24, #1
	b.ne	LBB0_2
LBB0_4:
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_dev_dbg
LBB0_5:
	ldr	x8, [x20]
	ldr	x9, [x23]
	add	x1, x9, x8
	mov	w0, #0
	bl	_iowrite32
	mov	x0, x20
	mov	x1, x19
	mov	w2, #0
	bl	_intel_th_gth_stop
	mov	x0, x20
	mov	x1, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_intel_th_gth_start
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_CTS_CTL,8,3                ; @REG_CTS_CTL
	.comm	_CTS_CTL_SEQUENCER_ENABLE,4,2   ; @CTS_CTL_SEQUENCER_ENABLE
	.comm	_CTS_TRIG_WAITLOOP_DEPTH,8,3    ; @CTS_TRIG_WAITLOOP_DEPTH
	.comm	_REG_CTS_STAT,8,3               ; @REG_CTS_STAT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"timeout waiting for CTS Trigger\n"

	.no_dead_strip	_intel_th_gth_switch
.subsections_via_symbols
