	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function msc_disable
_msc_disable:                           ## @msc_disable
	.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, %rbx
	movq	80(%rdi), %r14
	addq	$76, %rdi
	callq	_lockdep_assert_held
	movq	(%rbx), %rax
	movq	_MSC_MODE_MULTI@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	_WIN_INUSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_WIN_LOCKED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_msc_win_set_lockout
LBB0_2:
	movq	64(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	8(%rax), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movl	56(%rbx), %edi
	callq	*%rax
LBB0_5:
	movq	%rbx, %rdi
	callq	_intel_th_msu_deinit
	movl	72(%rbx), %edi
	callq	_intel_th_trace_disable
	movq	(%rbx), %rax
	movq	_MSC_MODE_SINGLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.6:
	movq	_REG_MSU_MSC0STS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	32(%rbx), %rdi
	callq	_ioread32
	movq	_MSCSTS_WRAPSTAT@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	andl	(%rcx), %eax
	setne	%dl
	movl	%edx, 8(%rbx)
	movq	_REG_MSU_MSC0MWP@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	32(%rbx), %rdi
	callq	_ioread32
	movl	16(%rbx), %edx
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edx
	movl	%eax, %r15d
	decl	%edx
	andl	%eax, %edx
	movl	%edx, 12(%rbx)
	movq	%rbx, %rdi
	callq	_msc_dev
	movl	8(%rbx), %r8d
	movl	12(%rbx), %ecx
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_7:
	movq	_REG_MSU_MSC0CTL@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	addq	32(%rbx), %rdi
	callq	_ioread32
	movq	_MSC_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	notl	%edi
	andl	%eax, %edi
	movq	(%r15), %rsi
	addq	32(%rbx), %rsi
	callq	_iowrite32
	movq	64(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:
	movq	(%rax), %r13
	testq	%r13, %r13
	je	LBB0_10
## %bb.9:
	movl	56(%rbx), %r15d
	movl	(%r14), %r12d
	movq	%r14, %rdi
	callq	_msc_win_total_sz
	movl	%r15d, %edi
	movl	%r12d, %esi
	movl	%eax, %edx
	callq	*%r13
LBB0_10:
	movq	$0, 48(%rbx)
	movl	20(%rbx), %edi
	movq	_REG_MSU_MSC0BAR@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	32(%rbx), %rsi
	callq	_iowrite32
	movl	24(%rbx), %edi
	movq	_REG_MSU_MSC0SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	32(%rbx), %rsi
	callq	_iowrite32
	movq	%rbx, %rdi
	callq	_msc_dev
	movl	%eax, %r14d
	movq	_REG_MSU_MSC0NWSA@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	32(%rbx), %rdi
	callq	_ioread32
	leaq	L_.str.1(%rip), %rsi
	movl	%r14d, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_REG_MSU_MSC0STS@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	32(%rbx), %rdi
	callq	_ioread32
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_msc_dev
	leaq	L_.str.2(%rip), %rsi
	movl	%eax, %edi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_REG_MSU_MSUSTS@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	addq	32(%rbx), %rdi
	callq	_ioread32
	cmpq	$0, 40(%rbx)
	jne	LBB0_11
## %bb.12:
	movq	_MSUSTS_MSC0BLAST@GOTPCREL(%rip), %rcx
	jmp	LBB0_13
LBB0_11:
	movq	_MSUSTS_MSC1BLAST@GOTPCREL(%rip), %rcx
LBB0_13:
	andl	(%rcx), %eax
	movq	(%r14), %rsi
	addq	32(%rbx), %rsi
	movl	%eax, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_iowrite32                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MSC_MODE_MULTI,8,3             ## @MSC_MODE_MULTI
	.comm	_WIN_INUSE,4,2                  ## @WIN_INUSE
	.comm	_WIN_LOCKED,4,2                 ## @WIN_LOCKED
	.comm	_MSC_MODE_SINGLE,8,3            ## @MSC_MODE_SINGLE
	.comm	_REG_MSU_MSC0STS,8,3            ## @REG_MSU_MSC0STS
	.comm	_MSCSTS_WRAPSTAT,4,2            ## @MSCSTS_WRAPSTAT
	.comm	_REG_MSU_MSC0MWP,8,3            ## @REG_MSU_MSC0MWP
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MSCnMWP: %08x/%08lx, wrap: %d\n"

	.comm	_REG_MSU_MSC0CTL,8,3            ## @REG_MSU_MSC0CTL
	.comm	_MSC_EN,4,2                     ## @MSC_EN
	.comm	_REG_MSU_MSC0BAR,8,3            ## @REG_MSU_MSC0BAR
	.comm	_REG_MSU_MSC0SIZE,8,3           ## @REG_MSU_MSC0SIZE
L_.str.1:                               ## @.str.1
	.asciz	"MSCnNWSA: %08x\n"

	.comm	_REG_MSU_MSC0NWSA,8,3           ## @REG_MSU_MSC0NWSA
L_.str.2:                               ## @.str.2
	.asciz	"MSCnSTS: %08x\n"

	.comm	_REG_MSU_MSUSTS,8,3             ## @REG_MSU_MSUSTS
	.comm	_MSUSTS_MSC1BLAST,4,2           ## @MSUSTS_MSC1BLAST
	.comm	_MSUSTS_MSC0BLAST,4,2           ## @MSUSTS_MSC0BLAST
	.no_dead_strip	_msc_disable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function msc_disable
_msc_disable:                           ; @msc_disable
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x0
	ldr	x20, [x0, #80]
	add	x0, x0, #76
	bl	_lockdep_assert_held
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _MSC_MODE_MULTI@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MSC_MODE_MULTI@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _WIN_INUSE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _WIN_INUSE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _WIN_LOCKED@GOTPAGE
Lloh7:
	ldr	x8, [x8, _WIN_LOCKED@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_msc_win_set_lockout
LBB0_2:
	ldr	x8, [x19, #64]
	cbz	x8, LBB0_5
; %bb.3:
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_5
; %bb.4:
	ldr	w0, [x19, #56]
	blr	x8
LBB0_5:
	mov	x0, x19
	bl	_intel_th_msu_deinit
	ldr	w0, [x19, #72]
	bl	_intel_th_trace_disable
	ldr	x8, [x19]
Lloh9:
	adrp	x9, _MSC_MODE_SINGLE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _MSC_MODE_SINGLE@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
Lloh12:
	adrp	x23, _REG_MSU_MSC0STS@GOTPAGE
Lloh13:
	ldr	x23, [x23, _REG_MSU_MSC0STS@GOTPAGEOFF]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.6:
	ldr	x8, [x19, #32]
	ldr	x9, [x23]
	add	x0, x9, x8
	bl	_ioread32
Lloh14:
	adrp	x8, _MSCSTS_WRAPSTAT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MSCSTS_WRAPSTAT@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	tst	w8, w0
	cset	w8, ne
	str	w8, [x19, #8]
	ldr	x8, [x19, #32]
Lloh17:
	adrp	x9, _REG_MSU_MSC0MWP@GOTPAGE
Lloh18:
	ldr	x9, [x9, _REG_MSU_MSC0MWP@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_ioread32
	mov	x21, x0
Lloh20:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh21:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
	ldr	w9, [x19, #16]
Lloh22:
	ldr	w8, [x8]
	lsl	w8, w9, w8
	sub	w8, w8, #1
	and	w8, w8, w0
	str	w8, [x19, #12]
	mov	x0, x19
	bl	_msc_dev
	ldp	w9, w8, [x19, #8]
	stp	x8, x9, [sp]
Lloh23:
	adrp	x1, l_.str@PAGE
Lloh24:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_dev_dbg
LBB0_7:
	ldr	x8, [x19, #32]
Lloh25:
	adrp	x21, _REG_MSU_MSC0CTL@GOTPAGE
Lloh26:
	ldr	x21, [x21, _REG_MSU_MSC0CTL@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_ioread32
Lloh27:
	adrp	x8, _MSC_EN@GOTPAGE
Lloh28:
	ldr	x8, [x8, _MSC_EN@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	bic	w0, w0, w8
	ldr	x8, [x19, #32]
	ldr	x9, [x21]
	add	x1, x9, x8
	bl	_iowrite32
	ldr	x8, [x19, #64]
	cbz	x8, LBB0_10
; %bb.8:
	ldr	x24, [x8]
	cbz	x24, LBB0_10
; %bb.9:
	ldr	w21, [x19, #56]
	ldr	w22, [x20]
	mov	x0, x20
	bl	_msc_win_total_sz
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
	blr	x24
LBB0_10:
	str	xzr, [x19, #48]
	ldr	w0, [x19, #20]
	ldr	x8, [x19, #32]
Lloh30:
	adrp	x9, _REG_MSU_MSC0BAR@GOTPAGE
Lloh31:
	ldr	x9, [x9, _REG_MSU_MSC0BAR@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_iowrite32
	ldr	w0, [x19, #24]
	ldr	x8, [x19, #32]
Lloh33:
	adrp	x9, _REG_MSU_MSC0SIZE@GOTPAGE
Lloh34:
	ldr	x9, [x9, _REG_MSU_MSC0SIZE@GOTPAGEOFF]
Lloh35:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_iowrite32
	mov	x0, x19
	bl	_msc_dev
	mov	x20, x0
	ldr	x8, [x19, #32]
Lloh36:
	adrp	x9, _REG_MSU_MSC0NWSA@GOTPAGE
Lloh37:
	ldr	x9, [x9, _REG_MSU_MSC0NWSA@GOTPAGEOFF]
Lloh38:
	ldr	x9, [x9]
	add	x0, x9, x8
	bl	_ioread32
	mov	x2, x0
Lloh39:
	adrp	x1, l_.str.1@PAGE
Lloh40:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
	ldr	x8, [x19, #32]
	ldr	x9, [x23]
	add	x0, x9, x8
	bl	_ioread32
	mov	x20, x0
	mov	x0, x19
	bl	_msc_dev
Lloh41:
	adrp	x1, l_.str.2@PAGE
Lloh42:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x20
	bl	_dev_dbg
	ldr	x8, [x19, #32]
Lloh43:
	adrp	x20, _REG_MSU_MSUSTS@GOTPAGE
Lloh44:
	ldr	x20, [x20, _REG_MSU_MSUSTS@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_ioread32
Lloh45:
	adrp	x8, _MSUSTS_MSC1BLAST@GOTPAGE
Lloh46:
	ldr	x8, [x8, _MSUSTS_MSC1BLAST@GOTPAGEOFF]
Lloh47:
	adrp	x9, _MSUSTS_MSC0BLAST@GOTPAGE
Lloh48:
	ldr	x9, [x9, _MSUSTS_MSC0BLAST@GOTPAGEOFF]
	ldp	x11, x10, [x19, #32]
	cmp	x10, #0
	csel	x8, x9, x8, eq
	ldr	w8, [x8]
	and	w0, w8, w0
	ldr	x8, [x20]
	add	x1, x8, x11
	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
	add	sp, sp, #80
	b	_iowrite32
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh47, Lloh48
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_MSC_MODE_MULTI,8,3             ; @MSC_MODE_MULTI
	.comm	_WIN_INUSE,4,2                  ; @WIN_INUSE
	.comm	_WIN_LOCKED,4,2                 ; @WIN_LOCKED
	.comm	_MSC_MODE_SINGLE,8,3            ; @MSC_MODE_SINGLE
	.comm	_REG_MSU_MSC0STS,8,3            ; @REG_MSU_MSC0STS
	.comm	_MSCSTS_WRAPSTAT,4,2            ; @MSCSTS_WRAPSTAT
	.comm	_REG_MSU_MSC0MWP,8,3            ; @REG_MSU_MSC0MWP
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MSCnMWP: %08x/%08lx, wrap: %d\n"

	.comm	_REG_MSU_MSC0CTL,8,3            ; @REG_MSU_MSC0CTL
	.comm	_MSC_EN,4,2                     ; @MSC_EN
	.comm	_REG_MSU_MSC0BAR,8,3            ; @REG_MSU_MSC0BAR
	.comm	_REG_MSU_MSC0SIZE,8,3           ; @REG_MSU_MSC0SIZE
l_.str.1:                               ; @.str.1
	.asciz	"MSCnNWSA: %08x\n"

	.comm	_REG_MSU_MSC0NWSA,8,3           ; @REG_MSU_MSC0NWSA
l_.str.2:                               ; @.str.2
	.asciz	"MSCnSTS: %08x\n"

	.comm	_REG_MSU_MSUSTS,8,3             ; @REG_MSU_MSUSTS
	.comm	_MSUSTS_MSC1BLAST,4,2           ; @MSUSTS_MSC1BLAST
	.comm	_MSUSTS_MSC0BLAST,4,2           ; @MSUSTS_MSC0BLAST
	.no_dead_strip	_msc_disable
.subsections_via_symbols
