	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smmu_pmu_apply_event_filter
_smmu_pmu_apply_event_filter:           ## @smmu_pmu_apply_event_filter
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movl	(%rdi), %r13d
	movq	%rsi, %rdi
	callq	_get_filter_enable
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	callq	_get_filter_span
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r15, %rdi
	callq	_get_filter_stream_id
	movl	%eax, %r12d
	cmpl	$0, 20(%rbx)
	je	LBB0_4
LBB0_5:
	movl	16(%rbx), %edi
	movl	%r13d, %esi
	callq	_find_first_bit
	cmpl	%r13d, %eax
	je	LBB0_7
## %bb.6:
	movq	8(%rbx), %rcx
	cltq
	movl	(%rcx,%rax,4), %edi
	movq	%r15, %rsi
	callq	_smmu_pmu_check_global_filter
	testq	%rax, %rax
	je	LBB0_8
LBB0_7:
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%r12d, %ecx
	callq	_smmu_pmu_set_event_filter
	jmp	LBB0_9
LBB0_2:
	movq	_SMMU_PMCG_DEFAULT_FILTER_SPAN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_SMMU_PMCG_DEFAULT_FILTER_SID@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	cmpl	$0, 20(%rbx)
	jne	LBB0_5
LBB0_4:
	movq	%r15, %rdi
	movl	%r14d, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%r12d, %ecx
	callq	_smmu_pmu_set_event_filter
	xorl	%ebx, %ebx
	jmp	LBB0_9
LBB0_8:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SMMU_PMCG_DEFAULT_FILTER_SPAN,4,2 ## @SMMU_PMCG_DEFAULT_FILTER_SPAN
	.comm	_SMMU_PMCG_DEFAULT_FILTER_SID,4,2 ## @SMMU_PMCG_DEFAULT_FILTER_SID
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.no_dead_strip	_smmu_pmu_apply_event_filter
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smmu_pmu_apply_event_filter
_smmu_pmu_apply_event_filter:           ; @smmu_pmu_apply_event_filter
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x24, x2
	mov	x19, x1
	mov	x21, x0
	ldr	w23, [x0]
	mov	x0, x1
	bl	_get_filter_enable
	cbz	w0, LBB0_5
; %bb.1:
	mov	x0, x19
	bl	_get_filter_span
	mov	x20, x0
	mov	x0, x19
	bl	_get_filter_stream_id
	mov	x22, x0
	ldr	w8, [x21, #20]
	cbz	w8, LBB0_6
LBB0_2:
	ldr	w0, [x21, #16]
	mov	x1, x23
	bl	_find_first_bit
	cmp	w0, w23
	b.eq	LBB0_4
; %bb.3:
	ldr	x8, [x21, #8]
	ldr	w0, [x8, w0, sxtw #2]
	mov	x1, x19
	bl	_smmu_pmu_check_global_filter
	cbz	x0, LBB0_9
LBB0_4:
	mov	x0, x19
	mov	w1, #0
	b	LBB0_7
LBB0_5:
Lloh0:
	adrp	x8, _SMMU_PMCG_DEFAULT_FILTER_SPAN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SMMU_PMCG_DEFAULT_FILTER_SPAN@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
Lloh3:
	adrp	x8, _SMMU_PMCG_DEFAULT_FILTER_SID@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SMMU_PMCG_DEFAULT_FILTER_SID@GOTPAGEOFF]
Lloh5:
	ldr	w22, [x8]
	ldr	w8, [x21, #20]
	cbnz	w8, LBB0_2
LBB0_6:
	mov	x0, x19
	mov	x1, x24
LBB0_7:
	mov	x2, x20
	mov	x3, x22
	bl	_smmu_pmu_set_event_filter
	mov	w0, #0
LBB0_8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_9:
Lloh6:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_SMMU_PMCG_DEFAULT_FILTER_SPAN,4,2 ; @SMMU_PMCG_DEFAULT_FILTER_SPAN
	.comm	_SMMU_PMCG_DEFAULT_FILTER_SID,4,2 ; @SMMU_PMCG_DEFAULT_FILTER_SID
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.no_dead_strip	_smmu_pmu_apply_event_filter
.subsections_via_symbols
