	.file	"extr_perf_event_intel_uncore.c_nhmex_rbox_alter_er.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	nhmex_rbox_alter_er
	.type	nhmex_rbox_alter_er, @function
nhmex_rbox_alter_er:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbx
	.cfi_def_cfa_offset 16
	.cfi_offset 3, -16
	mov	ecx, DWORD PTR NHMEX_R_PMON_CTL_EV_SEL_SHIFT[rip]
	mov	edx, 1
	mov	rbx, rsi
	mov	eax, DWORD PTR 4[rsi]
	mov	esi, DWORD PTR [rsi]
	sal	edx, cl
	test	al, 1
	je	.L2
	sub	eax, 1
	sub	esi, edx
	mov	DWORD PTR 4[rbx], eax
	mov	DWORD PTR [rbx], esi
.L3:
	mov	rdx, QWORD PTR [rdi]
	mov	esi, eax
	sar	esi, 31
	mov	ecx, DWORD PTR [rdx]
	movsx	rdx, eax
	imul	rdx, rdx, 715827883
	shr	rdx, 32
	sub	edx, esi
	lea	edi, [rdx+rcx*4]
	lea	edx, [rdx+rdx*2]
	add	edx, edx
	sub	eax, edx
	cmp	eax, 5
	ja	.L1
	lea	rdx, .L6[rip]
	movsx	rax, DWORD PTR [rdx+rax*4]
	add	rax, rdx
	notrack jmp	rax
	.section	.rodata
	.align 4
	.align 4
.L6:
	.long	.L11-.L6
	.long	.L10-.L6
	.long	.L9-.L6
	.long	.L8-.L6
	.long	.L7-.L6
	.long	.L5-.L6
	.text
	.p2align 4,,10
	.p2align 3
.L5:
	call	NHMEX_R_MSR_PORTN_XBR_SET2_MM_CFG@PLT
	mov	DWORD PTR 12[rbx], eax
.L1:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	add	eax, 1
	add	edx, esi
	mov	DWORD PTR 4[rbx], eax
	mov	DWORD PTR [rbx], edx
	jmp	.L3
	.p2align 4,,10
	.p2align 3
.L7:
	call	NHMEX_R_MSR_PORTN_XBR_SET1_MM_CFG@PLT
	mov	DWORD PTR 12[rbx], eax
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	call	NHMEX_R_MSR_PORTN_IPERF_CFG0@PLT
	mov	DWORD PTR 12[rbx], eax
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore_state
	call	NHMEX_R_MSR_PORTN_IPERF_CFG1@PLT
	mov	DWORD PTR 12[rbx], eax
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore_state
	sar	DWORD PTR 8[rbx], 8
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L8:
	.cfi_restore_state
	sal	DWORD PTR 8[rbx], 8
	pop	rbx
	.cfi_def_cfa_offset 8
	ret
	.cfi_endproc
.LFE0:
	.size	nhmex_rbox_alter_er, .-nhmex_rbox_alter_er
	.comm	NHMEX_R_PMON_CTL_EV_SEL_SHIFT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_perf_event_intel_uncore.c_nhmex_rbox_alter_er.c"
	.text
	.align	2
	.global	nhmex_rbox_alter_er
	.syntax unified
	.arm
	.fpu softvfp
	.type	nhmex_rbox_alter_er, %function
nhmex_rbox_alter_er:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, lr}
	mov	r4, r1
	mov	r2, #1
	ldr	r1, .L14
	ldr	r3, [r4, #4]
	ldr	ip, [r1]
	ldr	r1, [r4]
	tst	r3, #1
	lsl	r2, r2, ip
	subne	r3, r3, #1
	addeq	r3, r3, #1
	subne	r2, r1, r2
	addeq	r2, r2, r1
	stm	r4, {r2, r3}
	ldr	r2, .L14+4
	ldr	r1, [r0]
	smull	ip, r0, r2, r3
	sub	r0, r0, r3, asr #31
	ldr	r2, [r1]
	add	r1, r0, r0, lsl #1
	sub	r3, r3, r1, lsl #1
	add	r0, r0, r2, lsl #2
	cmp	r3, #5
	ldrls	pc, [pc, r3, asl #2]
	b	.L1
.L6:
	.word	.L11
	.word	.L10
	.word	.L9
	.word	.L8
	.word	.L7
	.word	.L5
.L5:
	bl	NHMEX_R_MSR_PORTN_XBR_SET2_MM_CFG
	str	r0, [r4, #12]
.L1:
	pop	{r4, pc}
.L11:
	bl	NHMEX_R_MSR_PORTN_IPERF_CFG0
	str	r0, [r4, #12]
	pop	{r4, pc}
.L10:
	bl	NHMEX_R_MSR_PORTN_IPERF_CFG1
	str	r0, [r4, #12]
	pop	{r4, pc}
.L9:
	ldr	r3, [r4, #8]
	asr	r3, r3, #8
	str	r3, [r4, #8]
	pop	{r4, pc}
.L8:
	ldr	r3, [r4, #8]
	lsl	r3, r3, #8
	str	r3, [r4, #8]
	pop	{r4, pc}
.L7:
	bl	NHMEX_R_MSR_PORTN_XBR_SET1_MM_CFG
	str	r0, [r4, #12]
	pop	{r4, pc}
.L15:
	.align	2
.L14:
	.word	NHMEX_R_PMON_CTL_EV_SEL_SHIFT
	.word	715827883
	.size	nhmex_rbox_alter_er, .-nhmex_rbox_alter_er
	.comm	NHMEX_R_PMON_CTL_EV_SEL_SHIFT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
