	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function p4_hw_config
_p4_hw_config:                          ## @p4_hw_config
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	xorl	%eax, %eax
	callq	_get_cpu
	movl	%eax, %r14d
	movl	%eax, %edi
	callq	_p4_default_cccr_conf
	movl	%eax, %r12d
	movl	20(%r15), %edx
	movl	24(%r15), %esi
	movl	%r14d, %edi
	callq	_p4_default_escr_conf
	movl	%eax, %edi
	callq	_p4_config_pack_escr
	movl	%eax, %ebx
	movl	%r12d, %edi
	callq	_p4_config_pack_cccr
	orl	%ebx, %eax
	movl	%eax, (%r15)
	xorl	%eax, %eax
	callq	_p4_ht_active
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movl	%r14d, %edi
	callq	_p4_ht_thread
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movl	(%r15), %edi
	callq	_p4_set_ht_bit
	movl	%eax, (%r15)
LBB0_3:
	movq	8(%r15), %rax
	movq	_PERF_TYPE_RAW@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.4:
	movq	_P4_CONFIG_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%eax, 16(%r15)
	movq	%r15, %rdi
	callq	_p4_validate_raw_event
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.5:
	movl	16(%r15), %edi
	orl	%edi, (%r15)
	callq	_p4_config_get_bind
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movl	(%rax), %edi
	callq	_P4_OPCODE_ESEL
	movl	%eax, %edi
	callq	_P4_CCCR_ESEL
	movl	%eax, %edi
	callq	_p4_config_pack_cccr
	orl	%eax, (%r15)
LBB0_8:
	movq	%r15, %rdi
	callq	_x86_setup_perfctr
	movl	%eax, %ebx
LBB0_9:
	xorl	%eax, %eax
	callq	_put_cpu
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_PERF_TYPE_RAW,8,3              ## @PERF_TYPE_RAW
	.comm	_P4_CONFIG_MASK,4,2             ## @P4_CONFIG_MASK
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_p4_hw_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function p4_hw_config
_p4_hw_config:                          ; @p4_hw_config
	.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
	mov	x19, x0
	bl	_get_cpu
	mov	x20, x0
	bl	_p4_default_cccr_conf
	mov	x21, x0
	ldp	w2, w1, [x19, #20]
	mov	x0, x20
	bl	_p4_default_escr_conf
	bl	_p4_config_pack_escr
	mov	x22, x0
	mov	x0, x21
	bl	_p4_config_pack_cccr
	orr	w8, w0, w22
	str	w8, [x19]
	bl	_p4_ht_active
	cbz	x0, LBB0_3
; %bb.1:
	mov	x0, x20
	bl	_p4_ht_thread
	cbz	x0, LBB0_3
; %bb.2:
	ldr	w0, [x19]
	bl	_p4_set_ht_bit
	str	w0, [x19]
LBB0_3:
	ldr	x8, [x19, #8]
Lloh0:
	adrp	x9, _PERF_TYPE_RAW@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PERF_TYPE_RAW@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.4:
Lloh3:
	adrp	x8, _P4_CONFIG_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _P4_CONFIG_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [x19, #16]
	and	w8, w9, w8
	str	w8, [x19, #16]
	mov	x0, x19
	bl	_p4_validate_raw_event
	mov	x20, x0
	cbnz	w0, LBB0_8
; %bb.5:
	ldr	w0, [x19, #16]
	ldr	w8, [x19]
	orr	w8, w8, w0
	str	w8, [x19]
	bl	_p4_config_get_bind
	cbz	x0, LBB0_9
; %bb.6:
	ldr	w0, [x0]
	bl	_P4_OPCODE_ESEL
	bl	_P4_CCCR_ESEL
	bl	_p4_config_pack_cccr
	ldr	w8, [x19]
	orr	w8, w8, w0
	str	w8, [x19]
LBB0_7:
	mov	x0, x19
	bl	_x86_setup_perfctr
	mov	x20, x0
LBB0_8:
	bl	_put_cpu
	mov	x0, x20
	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
LBB0_9:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_PERF_TYPE_RAW,8,3              ; @PERF_TYPE_RAW
	.comm	_P4_CONFIG_MASK,4,2             ; @P4_CONFIG_MASK
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_p4_hw_config
.subsections_via_symbols
