	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function x86_assign_hw_event
_x86_assign_hw_event:                   ## @x86_assign_hw_event
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	(%rsi), %rax
	movslq	%edx, %rbx
	movq	(%rax,%rbx,8), %rax
	movq	%rax, (%rdi)
	xorl	%eax, %eax
	callq	_smp_processor_id
	movl	%eax, 32(%r15)
	movq	8(%r14), %rax
	movq	(%rax,%rbx,8), %rcx
	incq	%rcx
	movq	%rcx, (%rax,%rbx,8)
	movq	%rcx, 24(%r15)
	movq	(%r15), %rdi
	movq	_X86_PMC_IDX_FIXED_BTS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jne	LBB0_2
## %bb.1:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%r15)
	jmp	LBB0_6
LBB0_2:
	movq	_X86_PMC_IDX_FIXED@GOTPCREL(%rip), %rcx
	movq	%rdi, %rax
	subq	(%rcx), %rax
	jge	LBB0_3
## %bb.4:
	callq	_x86_pmu_config_addr
	movq	%rax, 16(%r15)
	movq	(%r15), %rdi
	callq	_x86_pmu_event_addr
	jmp	LBB0_5
LBB0_3:
	movq	_MSR_ARCH_PERFMON_FIXED_CTR_CTRL@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, 16(%r15)
	movq	_MSR_ARCH_PERFMON_FIXED_CTR0@GOTPCREL(%rip), %rcx
	addq	(%rcx), %rax
LBB0_5:
	movq	%rax, 8(%r15)
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_X86_PMC_IDX_FIXED_BTS,8,3      ## @X86_PMC_IDX_FIXED_BTS
	.comm	_X86_PMC_IDX_FIXED,8,3          ## @X86_PMC_IDX_FIXED
	.comm	_MSR_ARCH_PERFMON_FIXED_CTR_CTRL,8,3 ## @MSR_ARCH_PERFMON_FIXED_CTR_CTRL
	.comm	_MSR_ARCH_PERFMON_FIXED_CTR0,8,3 ## @MSR_ARCH_PERFMON_FIXED_CTR0
	.no_dead_strip	_x86_assign_hw_event
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function x86_assign_hw_event
_x86_assign_hw_event:                   ; @x86_assign_hw_event
	.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
                                        ; kill: def $w2 killed $w2 def $x2
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x1]
	sbfiz	x21, x2, #3, #32
	ldr	x8, [x8, x21]
	str	x8, [x0]
	bl	_smp_processor_id
	str	w0, [x19, #32]
	ldr	x8, [x20, #8]
	ldr	x9, [x8, x21]
	add	x9, x9, #1
	str	x9, [x8, x21]
	str	x9, [x19, #24]
	ldr	x0, [x19]
Lloh0:
	adrp	x8, _X86_PMC_IDX_FIXED_BTS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _X86_PMC_IDX_FIXED_BTS@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.1:
	stp	xzr, xzr, [x19, #8]
	b	LBB0_5
LBB0_2:
Lloh3:
	adrp	x8, _X86_PMC_IDX_FIXED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _X86_PMC_IDX_FIXED@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	subs	x8, x0, x8
	b.ge	LBB0_4
; %bb.3:
	bl	_x86_pmu_config_addr
	str	x0, [x19, #16]
	ldr	x0, [x19]
	bl	_x86_pmu_event_addr
	str	x0, [x19, #8]
	b	LBB0_5
LBB0_4:
Lloh6:
	adrp	x9, _MSR_ARCH_PERFMON_FIXED_CTR_CTRL@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MSR_ARCH_PERFMON_FIXED_CTR_CTRL@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
Lloh9:
	adrp	x10, _MSR_ARCH_PERFMON_FIXED_CTR0@GOTPAGE
Lloh10:
	ldr	x10, [x10, _MSR_ARCH_PERFMON_FIXED_CTR0@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
	add	x8, x8, x10
	stp	x8, x9, [x19, #8]
LBB0_5:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_X86_PMC_IDX_FIXED_BTS,8,3      ; @X86_PMC_IDX_FIXED_BTS
	.comm	_X86_PMC_IDX_FIXED,8,3          ; @X86_PMC_IDX_FIXED
	.comm	_MSR_ARCH_PERFMON_FIXED_CTR_CTRL,8,3 ; @MSR_ARCH_PERFMON_FIXED_CTR_CTRL
	.comm	_MSR_ARCH_PERFMON_FIXED_CTR0,8,3 ; @MSR_ARCH_PERFMON_FIXED_CTR0
	.no_dead_strip	_x86_assign_hw_event
.subsections_via_symbols
