	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ddr_perf_counter_enable
_ddr_perf_counter_enable:               ## @ddr_perf_counter_enable
	.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
	movl	%ecx, %r12d
	movl	%esi, %r15d
	movq	%rdi, %r14
	shll	$2, %edx
	movslq	%edx, %rbx
	movq	_COUNTER_CNTL@GOTPCREL(%rip), %rax
	addq	(%rax), %rbx
	movq	(%rdi), %rsi
	addq	%rbx, %rsi
	xorl	%edi, %edi
	callq	_writel
	testl	%r12d, %r12d
	je	LBB0_1
## %bb.2:
	movq	_CNTL_EN@GOTPCREL(%rip), %rax
	movq	_CNTL_CLEAR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r12d
	orl	(%rax), %r12d
	movq	_CNTL_CSV_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r15d, %esi
	callq	_FIELD_PREP
	orl	%eax, %r12d
	addq	(%r14), %rbx
	movl	%r12d, %edi
	movq	%rbx, %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_writel                         ## TAILCALL
LBB0_1:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_COUNTER_CNTL,8,3               ## @COUNTER_CNTL
	.comm	_CNTL_EN,4,2                    ## @CNTL_EN
	.comm	_CNTL_CLEAR,4,2                 ## @CNTL_CLEAR
	.comm	_CNTL_CSV_MASK,4,2              ## @CNTL_CSV_MASK
	.no_dead_strip	_ddr_perf_counter_enable
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ddr_perf_counter_enable
_ddr_perf_counter_enable:               ; @ddr_perf_counter_enable
	.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	x21, x3
	mov	x20, x1
	mov	x19, x0
	lsl	w8, w2, #2
Lloh0:
	adrp	x9, _COUNTER_CNTL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _COUNTER_CNTL@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x22, x9, w8, sxtw
	ldr	x8, [x0]
	add	x1, x8, x22
	mov	w0, #0
	bl	_writel
	cbz	w21, LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _CNTL_EN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CNTL_EN@GOTPAGEOFF]
Lloh5:
	adrp	x9, _CNTL_CLEAR@GOTPAGE
Lloh6:
	ldr	x9, [x9, _CNTL_CLEAR@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	ldr	w9, [x9]
	orr	w21, w9, w8
Lloh9:
	adrp	x8, _CNTL_CSV_MASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CNTL_CSV_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_FIELD_PREP
	orr	w0, w21, w0
	ldr	x8, [x19]
	add	x1, x8, x22
	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
	b	_writel
LBB0_2:
	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	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_COUNTER_CNTL,8,3               ; @COUNTER_CNTL
	.comm	_CNTL_EN,4,2                    ; @CNTL_EN
	.comm	_CNTL_CLEAR,4,2                 ; @CNTL_CLEAR
	.comm	_CNTL_CSV_MASK,4,2              ; @CNTL_CSV_MASK
	.no_dead_strip	_ddr_perf_counter_enable
.subsections_via_symbols
