	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nhmex_mbox_alter_er            ## -- Begin function nhmex_mbox_alter_er
	.p2align	4, 0x90
_nhmex_mbox_alter_er:                   ## @nhmex_mbox_alter_er
	.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
	movl	%edx, %r13d
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movl	4(%rdi), %edi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	___BITS_VALUE
	movl	%eax, %r12d
	movl	8(%rbx), %r15d
	movq	_EXTRA_REG_NHMEX_M_ZDP_CTL_FVC@GOTPCREL(%rip), %rax
	movl	%r12d, %edi
	movq	_uncore_nhmex@GOTPCREL(%rip), %rcx
	subl	(%rax), %edi
	cmpq	$0, (%rcx)
	je	LBB0_2
## %bb.1:
	callq	_NHMEX_M_PMON_ZDP_CTL_FVC_EVENT_MASK
	jmp	LBB0_3
LBB0_2:
	callq	_WSMEX_M_PMON_ZDP_CTL_FVC_EVENT_MASK
LBB0_3:
	andl	%r15d, %eax
	movl	%r12d, %esi
	subl	%r14d, %esi
	jge	LBB0_5
## %bb.4:
	movl	%r14d, %esi
	subl	%r12d, %esi
	leal	(%rsi,%rsi,2), %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	jmp	LBB0_6
LBB0_5:
	leal	(%rsi,%rsi,2), %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %eax
LBB0_6:
	movq	_uncore_nhmex@GOTPCREL(%rip), %rcx
	cmpq	$0, (%rcx)
	je	LBB0_8
## %bb.7:
	movq	_NHMEX_M_PMON_ZDP_CTL_FVC_MASK@GOTPCREL(%rip), %rdx
	movl	8(%rbx), %ecx
	andl	(%rdx), %ecx
	movl	%ecx, %edx
	jmp	LBB0_9
LBB0_8:
	movq	_WSMEX_M_PMON_ZDP_CTL_FVC_MASK@GOTPCREL(%rip), %rdx
	movl	8(%rbx), %ecx
	movl	(%rdx), %edx
	andl	%ecx, %edx
	movq	_NHMEX_M_PMON_ZDP_CTL_FVC_MASK@GOTPCREL(%rip), %rdi
	andl	(%rdi), %ecx
LBB0_9:
	orl	%eax, %edx
	orl	%ecx, %edx
	testl	%r13d, %r13d
	je	LBB0_11
## %bb.10:
	movq	_NHMEX_M_PMON_CTL_INC_SEL_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %esi
	movl	%esi, %eax
	negl	%eax
	cmpl	%r14d, %r12d
	cmovll	%esi, %eax
	addl	%eax, (%rbx)
	movl	%edx, 8(%rbx)
	orl	$-256, %r14d
	movl	%r14d, 4(%rbx)
LBB0_11:
	movl	%edx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EXTRA_REG_NHMEX_M_ZDP_CTL_FVC,4,2 ## @EXTRA_REG_NHMEX_M_ZDP_CTL_FVC
	.comm	_uncore_nhmex,8,3               ## @uncore_nhmex
	.comm	_NHMEX_M_PMON_ZDP_CTL_FVC_MASK,4,2 ## @NHMEX_M_PMON_ZDP_CTL_FVC_MASK
	.comm	_WSMEX_M_PMON_ZDP_CTL_FVC_MASK,4,2 ## @WSMEX_M_PMON_ZDP_CTL_FVC_MASK
	.comm	_NHMEX_M_PMON_CTL_INC_SEL_SHIFT,4,2 ## @NHMEX_M_PMON_CTL_INC_SEL_SHIFT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nhmex_mbox_alter_er            ; -- Begin function nhmex_mbox_alter_er
	.p2align	2
_nhmex_mbox_alter_er:                   ; @nhmex_mbox_alter_er
	.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	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	w0, [x0, #4]
	mov	w1, #0
	mov	w2, #8
	bl	___BITS_VALUE
	mov	x22, x0
Lloh0:
	adrp	x8, _EXTRA_REG_NHMEX_M_ZDP_CTL_FVC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EXTRA_REG_NHMEX_M_ZDP_CTL_FVC@GOTPAGEOFF]
	ldr	w24, [x19, #8]
Lloh2:
	ldr	w8, [x8]
	sub	w0, w0, w8
Lloh3:
	adrp	x23, _uncore_nhmex@GOTPAGE
Lloh4:
	ldr	x23, [x23, _uncore_nhmex@GOTPAGEOFF]
	ldr	x8, [x23]
	cbz	x8, LBB0_2
; %bb.1:
	bl	_NHMEX_M_PMON_ZDP_CTL_FVC_EVENT_MASK
	b	LBB0_3
LBB0_2:
	bl	_WSMEX_M_PMON_ZDP_CTL_FVC_EVENT_MASK
LBB0_3:
	and	w8, w0, w24
	sub	w9, w22, w20
	add	w10, w9, w9, lsl #1
	asr	w10, w8, w10
	sub	w11, w20, w22
	add	w12, w11, w11, lsl #1
	lsl	w12, w8, w12
	cmp	w22, w20
	csel	w8, w9, w11, ge
	csel	w9, w10, w12, ge
	ldr	x10, [x23]
	cbz	x10, LBB0_5
; %bb.4:
Lloh5:
	adrp	x10, _NHMEX_M_PMON_ZDP_CTL_FVC_MASK@GOTPAGE
Lloh6:
	ldr	x10, [x10, _NHMEX_M_PMON_ZDP_CTL_FVC_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	ldr	w11, [x19, #8]
	and	w10, w11, w10
	mov	x11, x10
	b	LBB0_6
LBB0_5:
Lloh8:
	adrp	x10, _WSMEX_M_PMON_ZDP_CTL_FVC_MASK@GOTPAGE
Lloh9:
	ldr	x10, [x10, _WSMEX_M_PMON_ZDP_CTL_FVC_MASK@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	ldr	w12, [x19, #8]
	and	w11, w12, w10
Lloh11:
	adrp	x10, _NHMEX_M_PMON_ZDP_CTL_FVC_MASK@GOTPAGE
Lloh12:
	ldr	x10, [x10, _NHMEX_M_PMON_ZDP_CTL_FVC_MASK@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
	and	w10, w12, w10
LBB0_6:
	orr	w9, w11, w9
	orr	w0, w9, w10
	cbz	w21, LBB0_8
; %bb.7:
Lloh14:
	adrp	x9, _NHMEX_M_PMON_CTL_INC_SEL_SHIFT@GOTPAGE
Lloh15:
	ldr	x9, [x9, _NHMEX_M_PMON_CTL_INC_SEL_SHIFT@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	lsl	w8, w8, w9
	ldr	w9, [x19]
	cmp	w22, w20
	cneg	w8, w8, ge
	add	w8, w9, w8
	orr	w9, w20, #0xffffff00
	str	w8, [x19]
	stp	w9, w0, [x19, #4]
LBB0_8:
	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	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_EXTRA_REG_NHMEX_M_ZDP_CTL_FVC,4,2 ; @EXTRA_REG_NHMEX_M_ZDP_CTL_FVC
	.comm	_uncore_nhmex,8,3               ; @uncore_nhmex
	.comm	_NHMEX_M_PMON_ZDP_CTL_FVC_MASK,4,2 ; @NHMEX_M_PMON_ZDP_CTL_FVC_MASK
	.comm	_WSMEX_M_PMON_ZDP_CTL_FVC_MASK,4,2 ; @WSMEX_M_PMON_ZDP_CTL_FVC_MASK
	.comm	_NHMEX_M_PMON_CTL_INC_SEL_SHIFT,4,2 ; @NHMEX_M_PMON_CTL_INC_SEL_SHIFT
.subsections_via_symbols
