	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_th_msu_init
_intel_th_msu_init:                     ## @intel_th_msu_init
	.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
	cmpq	$0, 8(%rdi)
	je	LBB0_8
## %bb.1:
	movq	%rdi, %rbx
	cmpl	$0, 24(%rdi)
	je	LBB0_8
## %bb.2:
	movq	_REG_MSU_MINTCTL@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	addq	(%rbx), %rdi
	callq	_ioread32
	movl	%eax, %r14d
	cmpq	$0, 16(%rbx)
	jne	LBB0_3
## %bb.4:
	movq	_M0BLIE@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_M1BLIE@GOTPCREL(%rip), %rax
LBB0_5:
	orl	(%rax), %r14d
	movq	(%r15), %rsi
	addq	(%rbx), %rsi
	movl	%r14d, %edi
	callq	_iowrite32
	movq	(%r15), %rdi
	addq	(%rbx), %rdi
	callq	_ioread32
	cmpl	%eax, %r14d
	jne	LBB0_6
## %bb.7:
	movq	_REG_MSU_MSUSTS@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	addq	(%rbx), %rdi
	callq	_ioread32
	movq	(%r14), %rsi
	addq	(%rbx), %rsi
	movl	%eax, %edi
	callq	_iowrite32
	jmp	LBB0_8
LBB0_6:
	movq	%rbx, %rdi
	callq	_msc_dev
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_info
	movq	$0, 8(%rbx)
LBB0_8:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_MSU_MINTCTL,8,3            ## @REG_MSU_MINTCTL
	.comm	_M1BLIE,4,2                     ## @M1BLIE
	.comm	_M0BLIE,4,2                     ## @M0BLIE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MINTCTL ignores writes: no usable interrupts\n"

	.comm	_REG_MSU_MSUSTS,8,3             ## @REG_MSU_MSUSTS
	.no_dead_strip	_intel_th_msu_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_th_msu_init
_intel_th_msu_init:                     ; @intel_th_msu_init
	.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
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_5
; %bb.1:
	mov	x19, x0
	ldr	w8, [x0, #24]
	cbz	w8, LBB0_5
; %bb.2:
	ldr	x8, [x19]
Lloh0:
	adrp	x21, _REG_MSU_MINTCTL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _REG_MSU_MINTCTL@GOTPAGEOFF]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_ioread32
	ldr	x8, [x19, #16]
Lloh2:
	adrp	x9, _M1BLIE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _M1BLIE@GOTPAGEOFF]
Lloh4:
	adrp	x10, _M0BLIE@GOTPAGE
Lloh5:
	ldr	x10, [x10, _M0BLIE@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x10, x9, eq
	ldr	w8, [x8]
	orr	w20, w8, w0
	ldr	x8, [x19]
	ldr	x9, [x21]
	add	x1, x9, x8
	mov	x0, x20
	bl	_iowrite32
	ldr	x8, [x19]
	ldr	x9, [x21]
	add	x0, x9, x8
	bl	_ioread32
	cmp	w20, w0
	b.ne	LBB0_4
; %bb.3:
	ldr	x8, [x19]
Lloh6:
	adrp	x20, _REG_MSU_MSUSTS@GOTPAGE
Lloh7:
	ldr	x20, [x20, _REG_MSU_MSUSTS@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x0, x9, x8
	bl	_ioread32
	ldr	x8, [x19]
	ldr	x9, [x20]
	add	x1, x9, x8
	bl	_iowrite32
	b	LBB0_5
LBB0_4:
	mov	x0, x19
	bl	_msc_dev
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_info
	str	xzr, [x19, #8]
LBB0_5:
	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 AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_MSU_MINTCTL,8,3            ; @REG_MSU_MINTCTL
	.comm	_M1BLIE,4,2                     ; @M1BLIE
	.comm	_M0BLIE,4,2                     ; @M0BLIE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MINTCTL ignores writes: no usable interrupts\n"

	.comm	_REG_MSU_MSUSTS,8,3             ; @REG_MSU_MSUSTS
	.no_dead_strip	_intel_th_msu_init
.subsections_via_symbols
