	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function set_ext_hw_attr
_set_ext_hw_attr:                       ## @set_ext_hw_attr
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	.cfi_offset %rbx, -24
	movl	(%rsi), %eax
	movzbl	%al, %ecx
	movq	_PERF_COUNT_HW_CACHE_MAX@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ecx
	jae	LBB0_1
## %bb.3:
	movzbl	%ah, %ebx
	movq	_PERF_COUNT_HW_CACHE_OP_MAX@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %ebx
	jae	LBB0_1
## %bb.4:
	shrl	$16, %eax
	movzbl	%al, %eax
	movq	_PERF_COUNT_HW_CACHE_RESULT_MAX@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %eax
	jae	LBB0_1
## %bb.5:
	movq	_hw_cache_event_ids@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	(%rdx,%rcx,8), %rdx
	movq	(%rdx,%rbx,8), %rdx
	movl	%eax, %r8d
	movl	(%rdx,%r8,4), %eax
	cmpl	$-1, %eax
	je	LBB0_1
## %bb.6:
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:
	movq	_ENOENT@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbx
	popq	%rbp
	retq
LBB0_8:
	orl	%eax, (%rdi)
	movq	_hw_cache_extra_regs@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	(%rdx,%rcx,8), %rcx
	movq	(%rcx,%rbx,8), %rcx
	movl	(%rcx,%r8,4), %ecx
	movl	%ecx, 4(%rsi)
	movl	%eax, %edi
	popq	%rbx
	popq	%rbp
	jmp	_x86_pmu_extra_regs             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PERF_COUNT_HW_CACHE_MAX,4,2    ## @PERF_COUNT_HW_CACHE_MAX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PERF_COUNT_HW_CACHE_OP_MAX,4,2 ## @PERF_COUNT_HW_CACHE_OP_MAX
	.comm	_PERF_COUNT_HW_CACHE_RESULT_MAX,4,2 ## @PERF_COUNT_HW_CACHE_RESULT_MAX
	.comm	_hw_cache_event_ids,8,3         ## @hw_cache_event_ids
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_hw_cache_extra_regs,8,3        ## @hw_cache_extra_regs
	.no_dead_strip	_set_ext_hw_attr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function set_ext_hw_attr
_set_ext_hw_attr:                       ; @set_ext_hw_attr
	.cfi_startproc
; %bb.0:
	ldr	w8, [x1]
	and	x9, x8, #0xff
Lloh0:
	adrp	x10, _PERF_COUNT_HW_CACHE_MAX@GOTPAGE
Lloh1:
	ldr	x10, [x10, _PERF_COUNT_HW_CACHE_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	cmp	w9, w10
	b.hs	LBB0_6
; %bb.1:
	ubfx	x10, x8, #8, #8
Lloh3:
	adrp	x11, _PERF_COUNT_HW_CACHE_OP_MAX@GOTPAGE
Lloh4:
	ldr	x11, [x11, _PERF_COUNT_HW_CACHE_OP_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w11, [x11]
	cmp	w10, w11
	b.hs	LBB0_6
; %bb.2:
	ubfx	w11, w8, #16, #8
Lloh6:
	adrp	x8, _PERF_COUNT_HW_CACHE_RESULT_MAX@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PERF_COUNT_HW_CACHE_RESULT_MAX@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w11, w8
	b.hs	LBB0_6
; %bb.3:
Lloh9:
	adrp	x8, _hw_cache_event_ids@GOTPAGE
Lloh10:
	ldr	x8, [x8, _hw_cache_event_ids@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	ldr	x8, [x8, x9, lsl #3]
	ldr	x8, [x8, x10, lsl #3]
	ldr	w8, [x8, w11, uxtw #2]
	cmn	w8, #1
	b.eq	LBB0_6
; %bb.4:
	cbnz	w8, LBB0_8
; %bb.5:
Lloh12:
	adrp	x8, _ENOENT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
	ret
LBB0_8:
	ldr	w12, [x0]
Lloh16:
	adrp	x13, _hw_cache_extra_regs@GOTPAGE
Lloh17:
	ldr	x13, [x13, _hw_cache_extra_regs@GOTPAGEOFF]
	orr	w12, w12, w8
Lloh18:
	ldr	x13, [x13]
	ldr	x9, [x13, x9, lsl #3]
	ldr	x9, [x9, x10, lsl #3]
	str	w12, [x0]
	ldr	w9, [x9, x11, lsl #2]
	str	w9, [x1, #4]
	mov	x0, x8
	b	_x86_pmu_extra_regs
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_PERF_COUNT_HW_CACHE_MAX,4,2    ; @PERF_COUNT_HW_CACHE_MAX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PERF_COUNT_HW_CACHE_OP_MAX,4,2 ; @PERF_COUNT_HW_CACHE_OP_MAX
	.comm	_PERF_COUNT_HW_CACHE_RESULT_MAX,4,2 ; @PERF_COUNT_HW_CACHE_RESULT_MAX
	.comm	_hw_cache_event_ids,8,3         ; @hw_cache_event_ids
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_hw_cache_extra_regs,8,3        ; @hw_cache_extra_regs
	.no_dead_strip	_set_ext_hw_attr
.subsections_via_symbols
