	.file	"extr_uncore_snbep.c_knl_cha_hw_config.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	knl_cha_hw_config, @function
knl_cha_hw_config:
.LFB0:
	.cfi_startproc
	endbr64
	mov	rax, QWORD PTR knl_uncore_cha_extra_regs[rip]
	cmp	QWORD PTR 16[rax], 0
	je	.L10
	mov	ecx, DWORD PTR 8[rsi]
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rsi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	xor	ebx, ebx
	.p2align 4,,10
	.p2align 3
.L4:
	mov	edx, DWORD PTR 4[rax]
	and	edx, ecx
	cmp	DWORD PTR [rax], edx
	jne	.L3
	or	ebx, DWORD PTR 8[rax]
.L3:
	add	rax, 24
	cmp	QWORD PTR 16[rax], 0
	jne	.L4
	test	ebx, ebx
	je	.L2
	mov	rax, QWORD PTR [rdi]
	mov	r12d, DWORD PTR 0[rbp]
	mov	edi, ebx
	mov	eax, DWORD PTR [rax]
	imul	eax, DWORD PTR KNL_CHA_MSR_OFFSET[rip]
	cdqe
	add	rax, QWORD PTR HSWEP_C0_MSR_PMON_BOX_FILTER0[rip]
	mov	QWORD PTR 24[rbp], rax
	call	knl_cha_filter_mask@PLT
	mov	edx, DWORD PTR KNL_CHA_MSR_PMON_BOX_FILTER_REMOTE_NODE[rip]
	mov	DWORD PTR 20[rbp], ebx
	or	edx, DWORD PTR KNL_CHA_MSR_PMON_BOX_FILTER_LOCAL_NODE[rip]
	and	r12d, eax
	or	edx, DWORD PTR KNL_CHA_MSR_PMON_BOX_FILTER_NNC[rip]
	or	edx, r12d
	mov	DWORD PTR 16[rbp], edx
.L2:
	pop	rbx
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L10:
	.cfi_restore 3
	.cfi_restore 6
	.cfi_restore 12
	xor	eax, eax
	ret
	.cfi_endproc
.LFE0:
	.size	knl_cha_hw_config, .-knl_cha_hw_config
	.comm	knl_uncore_cha_extra_regs,8,8
	.comm	KNL_CHA_MSR_PMON_BOX_FILTER_REMOTE_NODE,4,4
	.comm	KNL_CHA_MSR_PMON_BOX_FILTER_NNC,4,4
	.comm	KNL_CHA_MSR_PMON_BOX_FILTER_LOCAL_NODE,4,4
	.comm	KNL_CHA_MSR_OFFSET,4,4
	.comm	HSWEP_C0_MSR_PMON_BOX_FILTER0,8,8
	.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_uncore_snbep.c_knl_cha_hw_config.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	knl_cha_hw_config, %function
knl_cha_hw_config:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	ldr	r3, .L17
	ldr	r3, [r3]
	ldr	r2, [r3, #12]
	cmp	r2, #0
	beq	.L13
	push	{r4, r5, r6, lr}
	mov	r5, r1
	mov	r4, #0
	ldr	lr, [r1, #4]
	add	r3, r3, #16
.L4:
	ldr	r2, [r3, #-12]
	ldr	ip, [r3, #-16]
	and	r2, r2, lr
	cmp	ip, r2
	ldreq	r2, [r3, #-8]
	add	r3, r3, #16
	orreq	r4, r4, r2
	ldr	r2, [r3, #-4]
	cmp	r2, #0
	bne	.L4
	cmp	r4, #0
	beq	.L2
	ldr	r3, [r0]
	ldr	r1, .L17+4
	ldr	r2, .L17+8
	ldr	r3, [r3]
	ldr	r1, [r1]
	ldr	r2, [r2]
	mov	r0, r4
	mla	r3, r1, r3, r2
	str	r3, [r5, #16]
	ldr	r6, [r5]
	bl	knl_cha_filter_mask
	ldr	r2, .L17+12
	ldr	r3, .L17+16
	ldr	r1, [r2]
	ldr	r2, .L17+20
	ldr	r3, [r3]
	ldr	r2, [r2]
	orr	r3, r3, r1
	and	r6, r6, r0
	orr	r3, r3, r2
	orr	r3, r3, r6
	str	r4, [r5, #12]
	str	r3, [r5, #8]
.L2:
	mov	r0, #0
	pop	{r4, r5, r6, pc}
.L13:
	mov	r0, #0
	bx	lr
.L18:
	.align	2
.L17:
	.word	knl_uncore_cha_extra_regs
	.word	KNL_CHA_MSR_OFFSET
	.word	HSWEP_C0_MSR_PMON_BOX_FILTER0
	.word	KNL_CHA_MSR_PMON_BOX_FILTER_LOCAL_NODE
	.word	KNL_CHA_MSR_PMON_BOX_FILTER_REMOTE_NODE
	.word	KNL_CHA_MSR_PMON_BOX_FILTER_NNC
	.size	knl_cha_hw_config, .-knl_cha_hw_config
	.comm	knl_uncore_cha_extra_regs,4,4
	.comm	KNL_CHA_MSR_PMON_BOX_FILTER_REMOTE_NODE,4,4
	.comm	KNL_CHA_MSR_PMON_BOX_FILTER_NNC,4,4
	.comm	KNL_CHA_MSR_PMON_BOX_FILTER_LOCAL_NODE,4,4
	.comm	KNL_CHA_MSR_OFFSET,4,4
	.comm	HSWEP_C0_MSR_PMON_BOX_FILTER0,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
