	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function msc_configure
_msc_configure:                         ## @msc_configure
	.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, %r15
	addq	$76, %rdi
	callq	_lockdep_assert_held
	movq	_MSC_MODE_MULTI@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, (%r15)
	jle	LBB0_3
## %bb.1:
	movq	_ENOTSUPP@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_3:
	jne	LBB0_7
## %bb.4:
	movl	72(%r15), %edi
	movq	_WIN_READY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_WIN_INUSE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_msc_win_set_lockout
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	_EBUSY@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_14:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	%r15, %rdi
	callq	_msc_buffer_clear_hw_header
LBB0_7:
	movq	_REG_MSU_MSC0BAR@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	40(%r15), %rdi
	callq	_ioread32
	movq	%rax, 64(%r15)
	movq	_REG_MSU_MSC0SIZE@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	addq	40(%r15), %rdi
	callq	_ioread32
	movq	%rax, 56(%r15)
	movl	4(%r15), %edi
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %edi
	movq	(%rbx), %rsi
	addq	40(%r15), %rsi
	callq	_iowrite32
	movl	(%r15), %eax
	movq	_MSC_MODE_SINGLE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_9
## %bb.8:
	movl	8(%r15), %edi
	movq	(%r14), %rsi
	addq	40(%r15), %rsi
	callq	_iowrite32
LBB0_9:
	movq	_REG_MSU_MSC0CTL@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	40(%r15), %rdi
	callq	_ioread32
	movq	_MSC_MODE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	movq	_MSC_WRAPEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	%edi, %ebx
	movq	_MSC_EN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
	orl	%r14d, %ebx
	movq	_MSC_RD_HDR_OVRD@GOTPCREL(%rip), %rcx
	orl	(%rcx), %ebx
	notl	%ebx
	andl	%eax, %ebx
	movl	(%r15), %r12d
	callq	___ffs
	movl	%eax, %ecx
	shll	%cl, %r12d
	orl	%r14d, %r12d
	movl	12(%r15), %r13d
	movq	_MSC_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	___ffs
	movl	%eax, %ecx
	shll	%cl, %r13d
	orl	%r12d, %r13d
	xorl	%r14d, %r14d
	cmpq	$0, 48(%r15)
	movl	$0, %eax
	je	LBB0_11
## %bb.10:
	movq	_MSC_WRAPEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_11:
	orl	%eax, %r13d
	orl	%r13d, %ebx
	movq	_REG_MSU_MSC0CTL@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	40(%r15), %rsi
	movl	%ebx, %edi
	callq	_iowrite32
	movq	%r15, %rdi
	callq	_intel_th_msu_init
	movl	(%r15), %eax
	xorl	%ecx, %ecx
	movq	_MSC_MODE_MULTI@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %eax
	sete	%cl
	movq	32(%r15), %rdi
	movl	%ecx, (%rdi)
	callq	_intel_th_trace_enable
	movl	$1, 16(%r15)
	movq	24(%r15), %rax
	testq	%rax, %rax
	je	LBB0_14
## %bb.12:
	movq	(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_14
## %bb.13:
	movl	20(%r15), %edi
	callq	*%rcx
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_MSC_MODE_MULTI,4,2             ## @MSC_MODE_MULTI
	.comm	_ENOTSUPP,4,2                   ## @ENOTSUPP
	.comm	_WIN_READY,4,2                  ## @WIN_READY
	.comm	_WIN_INUSE,4,2                  ## @WIN_INUSE
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_REG_MSU_MSC0BAR,8,3            ## @REG_MSU_MSC0BAR
	.comm	_REG_MSU_MSC0SIZE,8,3           ## @REG_MSU_MSC0SIZE
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_MSC_MODE_SINGLE,4,2            ## @MSC_MODE_SINGLE
	.comm	_REG_MSU_MSC0CTL,8,3            ## @REG_MSU_MSC0CTL
	.comm	_MSC_MODE,4,2                   ## @MSC_MODE
	.comm	_MSC_WRAPEN,4,2                 ## @MSC_WRAPEN
	.comm	_MSC_EN,4,2                     ## @MSC_EN
	.comm	_MSC_RD_HDR_OVRD,4,2            ## @MSC_RD_HDR_OVRD
	.comm	_MSC_LEN,4,2                    ## @MSC_LEN
	.no_dead_strip	_msc_configure
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function msc_configure
_msc_configure:                         ; @msc_configure
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	add	x0, x0, #76
	bl	_lockdep_assert_held
	ldr	w8, [x19]
Lloh0:
	adrp	x20, _MSC_MODE_MULTI@GOTPAGE
Lloh1:
	ldr	x20, [x20, _MSC_MODE_MULTI@GOTPAGEOFF]
	ldr	w9, [x20]
	cmp	w8, w9
	b.le	LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _ENOTSUPP@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOTSUPP@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:
	b.ne	LBB0_7
; %bb.3:
	ldr	w0, [x19, #72]
Lloh4:
	adrp	x8, _WIN_READY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _WIN_READY@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
Lloh7:
	adrp	x8, _WIN_INUSE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _WIN_INUSE@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	bl	_msc_win_set_lockout
	cbz	x0, LBB0_6
; %bb.4:
Lloh10:
	adrp	x8, _EBUSY@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_13
LBB0_6:
	mov	x0, x19
	bl	_msc_buffer_clear_hw_header
LBB0_7:
	ldr	x8, [x19, #40]
Lloh12:
	adrp	x22, _REG_MSU_MSC0BAR@GOTPAGE
Lloh13:
	ldr	x22, [x22, _REG_MSU_MSC0BAR@GOTPAGEOFF]
	ldr	x9, [x22]
	add	x0, x9, x8
	bl	_ioread32
	str	x0, [x19, #64]
	ldr	x8, [x19, #40]
Lloh14:
	adrp	x21, _REG_MSU_MSC0SIZE@GOTPAGE
Lloh15:
	ldr	x21, [x21, _REG_MSU_MSC0SIZE@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_ioread32
	str	x0, [x19, #56]
Lloh16:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
	ldr	w9, [x19, #4]
Lloh18:
	ldr	w8, [x8]
	asr	w0, w9, w8
	ldr	x8, [x19, #40]
	ldr	x9, [x22]
	add	x1, x9, x8
	bl	_iowrite32
	ldr	w8, [x19]
Lloh19:
	adrp	x9, _MSC_MODE_SINGLE@GOTPAGE
Lloh20:
	ldr	x9, [x9, _MSC_MODE_SINGLE@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_9
; %bb.8:
	ldr	w0, [x19, #8]
	ldr	x8, [x19, #40]
	ldr	x9, [x21]
	add	x1, x9, x8
	bl	_iowrite32
LBB0_9:
	ldr	x8, [x19, #40]
Lloh22:
	adrp	x21, _REG_MSU_MSC0CTL@GOTPAGE
Lloh23:
	ldr	x21, [x21, _REG_MSU_MSC0CTL@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_ioread32
Lloh24:
	adrp	x8, _MSC_MODE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MSC_MODE@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
Lloh27:
	adrp	x22, _MSC_WRAPEN@GOTPAGE
Lloh28:
	ldr	x22, [x22, _MSC_WRAPEN@GOTPAGEOFF]
	ldr	w9, [x22]
	orr	w9, w9, w8
Lloh29:
	adrp	x10, _MSC_EN@GOTPAGE
Lloh30:
	ldr	x10, [x10, _MSC_EN@GOTPAGEOFF]
Lloh31:
	ldr	w10, [x10]
Lloh32:
	adrp	x11, _MSC_RD_HDR_OVRD@GOTPAGE
Lloh33:
	ldr	x11, [x11, _MSC_RD_HDR_OVRD@GOTPAGEOFF]
	orr	w9, w9, w10
Lloh34:
	ldr	w11, [x11]
	orr	w9, w9, w11
	bic	w9, w0, w9
	orr	w23, w9, w10
	ldr	w24, [x19]
	mov	x0, x8
	bl	___ffs
	lsl	w8, w24, w0
	orr	w23, w23, w8
	ldr	w24, [x19, #12]
Lloh35:
	adrp	x8, _MSC_LEN@GOTPAGE
Lloh36:
	ldr	x8, [x8, _MSC_LEN@GOTPAGEOFF]
Lloh37:
	ldr	w0, [x8]
	bl	___ffs
	lsl	w8, w24, w0
	orr	w8, w23, w8
	ldr	w9, [x22]
	ldp	x11, x10, [x19, #40]
	cmp	x10, #0
	csel	w9, wzr, w9, eq
	orr	w0, w8, w9
	ldr	x8, [x21]
	add	x1, x8, x11
	bl	_iowrite32
	mov	x0, x19
	bl	_intel_th_msu_init
	ldr	w8, [x19]
	ldr	w9, [x20]
	cmp	w8, w9
	cset	w8, eq
	ldr	x0, [x19, #32]
	str	w8, [x0]
	bl	_intel_th_trace_enable
	mov	w8, #1
	str	w8, [x19, #16]
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_12
; %bb.10:
	ldr	x8, [x8]
	cbz	x8, LBB0_12
; %bb.11:
	ldr	w0, [x19, #20]
	blr	x8
LBB0_12:
	mov	w0, #0
LBB0_13:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_MSC_MODE_MULTI,4,2             ; @MSC_MODE_MULTI
	.comm	_ENOTSUPP,4,2                   ; @ENOTSUPP
	.comm	_WIN_READY,4,2                  ; @WIN_READY
	.comm	_WIN_INUSE,4,2                  ; @WIN_INUSE
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_REG_MSU_MSC0BAR,8,3            ; @REG_MSU_MSC0BAR
	.comm	_REG_MSU_MSC0SIZE,8,3           ; @REG_MSU_MSC0SIZE
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_MSC_MODE_SINGLE,4,2            ; @MSC_MODE_SINGLE
	.comm	_REG_MSU_MSC0CTL,8,3            ; @REG_MSU_MSC0CTL
	.comm	_MSC_MODE,4,2                   ; @MSC_MODE
	.comm	_MSC_WRAPEN,4,2                 ; @MSC_WRAPEN
	.comm	_MSC_EN,4,2                     ; @MSC_EN
	.comm	_MSC_RD_HDR_OVRD,4,2            ; @MSC_RD_HDR_OVRD
	.comm	_MSC_LEN,4,2                    ; @MSC_LEN
	.no_dead_strip	_msc_configure
.subsections_via_symbols
