	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function exynos_ppmu_get_event
_exynos_ppmu_get_event:                 ## @exynos_ppmu_get_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r13
	callq	_devfreq_event_get_drvdata
	movq	%rax, %r15
	movq	%r13, %rdi
	callq	_exynos_ppmu_find_ppmu_id
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movl	%eax, %r12d
	movl	(%r15), %edi
	movq	_PPMU_PMNC@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	-52(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_15
## %bb.3:
	movq	_PPMU_PMNC_ENABLE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	notl	%edx
	andl	-52(%rbp), %edx
	movl	%edx, -52(%rbp)
	movl	(%r15), %edi
	movl	(%rbx), %esi
	callq	_regmap_write
	testl	%eax, %eax
	js	LBB0_15
## %bb.4:
	movl	(%r15), %edi
	movq	_PPMU_CCNT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-60(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_15
## %bb.5:
	movl	-60(%rbp), %eax
	movl	%eax, (%r14)
	leal	-129(%r12), %eax
	cmpl	$3, %eax
	jae	LBB0_6
## %bb.10:
	movl	(%r15), %ebx
	movl	%r12d, %edi
	callq	_PPMU_PMNCT
	leaq	-44(%rbp), %rdx
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_15
## %bb.11:
	movl	-44(%rbp), %eax
LBB0_12:
	movl	%eax, 4(%r14)
	movl	(%r15), %edi
	movq	_PPMU_CNTENC@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	leaq	-48(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_15
## %bb.13:
	movq	_PPMU_CCNT_MASK@GOTPCREL(%rip), %rax
	movq	_PPMU_ENABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%r12d, %ecx
	shll	%cl, %edx
	orl	(%rax), %edx
	orl	-48(%rbp), %edx
	movl	%edx, -48(%rbp)
	movl	(%r15), %edi
	movl	(%rbx), %esi
	callq	_regmap_write
	testl	%eax, %eax
	js	LBB0_15
## %bb.14:
	movq	(%r13), %rax
	addq	$8, %r13
	movl	(%rax), %edx
	movl	(%r14), %r8d
	movl	4(%r14), %ecx
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	callq	_dev_dbg
	xorl	%eax, %eax
	jmp	LBB0_15
LBB0_6:
	cmpl	$128, %r12d
	jne	LBB0_1
## %bb.7:
	movl	(%r15), %edi
	movq	_PPMU_PMCNT3_HIGH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-44(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_15
## %bb.8:
	movl	(%r15), %edi
	movq	_PPMU_PMCNT3_LOW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %rdx
	callq	_regmap_read
	testl	%eax, %eax
	js	LBB0_15
## %bb.9:
	movl	-44(%rbp), %eax
	shll	$8, %eax
	orl	-56(%rbp), %eax
	jmp	LBB0_12
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_15:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PPMU_PMNC,4,2                  ## @PPMU_PMNC
	.comm	_PPMU_PMNC_ENABLE_MASK,4,2      ## @PPMU_PMNC_ENABLE_MASK
	.comm	_PPMU_CCNT,4,2                  ## @PPMU_CCNT
	.comm	_PPMU_PMCNT3_HIGH,4,2           ## @PPMU_PMCNT3_HIGH
	.comm	_PPMU_PMCNT3_LOW,4,2            ## @PPMU_PMCNT3_LOW
	.comm	_PPMU_CNTENC,4,2                ## @PPMU_CNTENC
	.comm	_PPMU_CCNT_MASK,4,2             ## @PPMU_CCNT_MASK
	.comm	_PPMU_ENABLE,4,2                ## @PPMU_ENABLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s (event: %ld/%ld)\n"

	.no_dead_strip	_exynos_ppmu_get_event
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function exynos_ppmu_get_event
_exynos_ppmu_get_event:                 ; @exynos_ppmu_get_event
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x19, x0
	bl	_devfreq_event_get_drvdata
	mov	x21, x0
	mov	x0, x19
	bl	_exynos_ppmu_find_ppmu_id
	tbnz	w0, #31, LBB0_14
; %bb.1:
	mov	x22, x0
	ldr	w0, [x21]
Lloh0:
	adrp	x23, _PPMU_PMNC@GOTPAGE
Lloh1:
	ldr	x23, [x23, _PPMU_PMNC@GOTPAGEOFF]
	ldr	w1, [x23]
	add	x2, sp, #16
	bl	_regmap_read
	tbnz	w0, #31, LBB0_15
; %bb.2:
Lloh2:
	adrp	x8, _PPMU_PMNC_ENABLE_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PPMU_PMNC_ENABLE_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ldr	w9, [sp, #16]
	bic	w2, w9, w8
	str	w2, [sp, #16]
	ldr	w0, [x21]
	ldr	w1, [x23]
	bl	_regmap_write
	tbnz	w0, #31, LBB0_15
; %bb.3:
	ldr	w0, [x21]
Lloh5:
	adrp	x8, _PPMU_CCNT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PPMU_CCNT@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	add	x2, sp, #28
	bl	_regmap_read
	tbnz	w0, #31, LBB0_15
; %bb.4:
	ldr	w8, [sp, #28]
	str	w8, [x20]
	sub	w8, w22, #129
	cmp	w8, #3
	b.hs	LBB0_10
; %bb.5:
	ldr	w23, [x21]
	mov	x0, x22
	bl	_PPMU_PMNCT
	mov	x1, x0
	add	x2, sp, #24
	mov	x0, x23
	bl	_regmap_read
	tbnz	w0, #31, LBB0_15
; %bb.6:
	ldr	w8, [sp, #24]
LBB0_7:
	str	w8, [x20, #4]
	ldr	w0, [x21]
Lloh8:
	adrp	x23, _PPMU_CNTENC@GOTPAGE
Lloh9:
	ldr	x23, [x23, _PPMU_CNTENC@GOTPAGEOFF]
	ldr	w1, [x23]
	add	x2, sp, #12
	bl	_regmap_read
	tbnz	w0, #31, LBB0_15
; %bb.8:
Lloh10:
	adrp	x8, _PPMU_CCNT_MASK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PPMU_CCNT_MASK@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _PPMU_ENABLE@GOTPAGE
Lloh14:
	ldr	x9, [x9, _PPMU_ENABLE@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	lsl	w9, w9, w22
	orr	w8, w9, w8
	ldr	w9, [sp, #12]
	orr	w2, w8, w9
	str	w2, [sp, #12]
	ldr	w0, [x21]
	ldr	w1, [x23]
	bl	_regmap_write
	tbnz	w0, #31, LBB0_15
; %bb.9:
	ldr	x8, [x19], #8
	ldr	w2, [x8]
	ldp	w4, w3, [x20]
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_dbg
	mov	w0, #0
	b	LBB0_15
LBB0_10:
	cmp	w22, #128
	b.ne	LBB0_14
; %bb.11:
	ldr	w0, [x21]
Lloh18:
	adrp	x8, _PPMU_PMCNT3_HIGH@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PPMU_PMCNT3_HIGH@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	add	x2, sp, #24
	bl	_regmap_read
	tbnz	w0, #31, LBB0_15
; %bb.12:
	ldr	w0, [x21]
Lloh21:
	adrp	x8, _PPMU_PMCNT3_LOW@GOTPAGE
Lloh22:
	ldr	x8, [x8, _PPMU_PMCNT3_LOW@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	add	x2, sp, #20
	bl	_regmap_read
	tbnz	w0, #31, LBB0_15
; %bb.13:
	ldp	w9, w8, [sp, #20]
	orr	w8, w9, w8, lsl #8
	b	LBB0_7
LBB0_14:
Lloh24:
	adrp	x8, _EINVAL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_15:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PPMU_PMNC,4,2                  ; @PPMU_PMNC
	.comm	_PPMU_PMNC_ENABLE_MASK,4,2      ; @PPMU_PMNC_ENABLE_MASK
	.comm	_PPMU_CCNT,4,2                  ; @PPMU_CCNT
	.comm	_PPMU_PMCNT3_HIGH,4,2           ; @PPMU_PMCNT3_HIGH
	.comm	_PPMU_PMCNT3_LOW,4,2            ; @PPMU_PMCNT3_LOW
	.comm	_PPMU_CNTENC,4,2                ; @PPMU_CNTENC
	.comm	_PPMU_CCNT_MASK,4,2             ; @PPMU_CCNT_MASK
	.comm	_PPMU_ENABLE,4,2                ; @PPMU_ENABLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s (event: %ld/%ld)\n"

	.no_dead_strip	_exynos_ppmu_get_event
.subsections_via_symbols
