	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function threshold_restart_bank
_threshold_restart_bank:                ## @threshold_restart_bank
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	16(%rdi), %rax
	movl	4(%rax), %edi
	callq	_rdmsr
	movq	16(%r14), %rdi
	movl	(%rdi), %ecx
	testl	%ecx, %ecx
	js	LBB0_1
## %bb.2:
	cmpl	$0, (%r14)
	jne	LBB0_3
## %bb.4:
	movl	4(%r14), %eax
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movq	_THRESHOLD_MAX@GOTPCREL(%rip), %rdx
	subl	%ecx, %eax
	andl	(%rdx), %eax
	jmp	LBB0_7
LBB0_1:
	movl	$1, (%r14)
LBB0_3:
	movq	_THRESHOLD_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	subl	%ecx, %eax
LBB0_7:
	movq	_MASK_INT_TYPE_HI@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	notl	%ebx
	andl	%eax, %ebx
	cmpl	$0, 16(%rdi)
	je	LBB0_13
## %bb.8:
	cmpq	$0, 24(%r14)
	je	LBB0_11
## %bb.9:
	movl	8(%r14), %esi
	movl	%ebx, %ecx
	callq	_lvt_off_valid
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	_MASK_LVTOFF_HI@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, %ebx
	movl	8(%r14), %eax
	shll	$20, %eax
	orl	%eax, %ebx
LBB0_11:
	movq	16(%r14), %rdi
	cmpq	$0, 8(%rdi)
	je	LBB0_13
## %bb.12:
	movq	_INT_TYPE_APIC@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
LBB0_13:
	movq	_MASK_COUNT_EN_HI@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	4(%rdi), %edi
	movl	%ebx, %edx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_wrmsr                          ## TAILCALL
LBB0_5:
                                        ## implicit-def: $eax
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_THRESHOLD_MAX,4,2              ## @THRESHOLD_MAX
	.comm	_MASK_ERR_COUNT_HI,4,2          ## @MASK_ERR_COUNT_HI
	.comm	_MASK_OVERFLOW_HI,4,2           ## @MASK_OVERFLOW_HI
	.comm	_MASK_INT_TYPE_HI,4,2           ## @MASK_INT_TYPE_HI
	.comm	_MASK_LVTOFF_HI,4,2             ## @MASK_LVTOFF_HI
	.comm	_INT_TYPE_APIC,4,2              ## @INT_TYPE_APIC
	.comm	_MASK_COUNT_EN_HI,4,2           ## @MASK_COUNT_EN_HI
	.no_dead_strip	_threshold_restart_bank
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function threshold_restart_bank
_threshold_restart_bank:                ; @threshold_restart_bank
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	x8, [x0, #16]
	ldr	w0, [x8, #4]
	bl	_rdmsr
	ldr	x0, [x19, #16]
	ldr	w8, [x0]
	tbnz	w8, #31, LBB0_4
; %bb.1:
	ldr	w9, [x19]
	cbnz	w9, LBB0_5
; %bb.2:
	ldr	w9, [x19, #4]
	cbz	w9, LBB0_13
; %bb.3:
Lloh0:
	adrp	x10, _THRESHOLD_MAX@GOTPAGE
Lloh1:
	ldr	x10, [x10, _THRESHOLD_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	sub	w8, w9, w8
	and	w8, w10, w8
	b	LBB0_6
LBB0_4:
	mov	w9, #1
	str	w9, [x19]
LBB0_5:
Lloh3:
	adrp	x9, _THRESHOLD_MAX@GOTPAGE
Lloh4:
	ldr	x9, [x9, _THRESHOLD_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	sub	w8, w9, w8
LBB0_6:
Lloh6:
	adrp	x9, _MASK_INT_TYPE_HI@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MASK_INT_TYPE_HI@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	bic	w20, w8, w9
	ldr	w8, [x0, #16]
	cbz	w8, LBB0_12
; %bb.7:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_10
; %bb.8:
	ldr	w1, [x19, #8]
	mov	x3, x20
	bl	_lvt_off_valid
	cbz	x0, LBB0_10
; %bb.9:
Lloh9:
	adrp	x8, _MASK_LVTOFF_HI@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MASK_LVTOFF_HI@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	bic	w8, w20, w8
	ldr	w9, [x19, #8]
	orr	w20, w8, w9, lsl #20
LBB0_10:
	ldr	x0, [x19, #16]
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_12
; %bb.11:
Lloh12:
	adrp	x8, _INT_TYPE_APIC@GOTPAGE
Lloh13:
	ldr	x8, [x8, _INT_TYPE_APIC@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	orr	w20, w8, w20
LBB0_12:
Lloh15:
	adrp	x8, _MASK_COUNT_EN_HI@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MASK_COUNT_EN_HI@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	orr	w2, w8, w20
	ldr	w0, [x0, #4]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_wrmsr
LBB0_13:
                                        ; implicit-def: $w8
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_THRESHOLD_MAX,4,2              ; @THRESHOLD_MAX
	.comm	_MASK_ERR_COUNT_HI,4,2          ; @MASK_ERR_COUNT_HI
	.comm	_MASK_OVERFLOW_HI,4,2           ; @MASK_OVERFLOW_HI
	.comm	_MASK_INT_TYPE_HI,4,2           ; @MASK_INT_TYPE_HI
	.comm	_MASK_LVTOFF_HI,4,2             ; @MASK_LVTOFF_HI
	.comm	_INT_TYPE_APIC,4,2              ; @INT_TYPE_APIC
	.comm	_MASK_COUNT_EN_HI,4,2           ; @MASK_COUNT_EN_HI
	.no_dead_strip	_threshold_restart_bank
.subsections_via_symbols
