	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i915_oa_stream_destroy
_i915_oa_stream_destroy:                ## @i915_oa_stream_destroy
	.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	%rdi, %rbx
	movq	24(%rdi), %r14
	xorl	%edi, %edi
	cmpq	%rbx, 16(%r14)
	setne	%dil
	callq	_BUG_ON
	leaq	32(%r14), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	$0, 16(%r14)
	movq	%rbx, %rdi
	callq	*8(%r14)
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	%rbx, %rdi
	callq	_free_oa_buffer
	leaq	28(%r14), %rdi
	movq	_FORCEWAKE_ALL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_intel_uncore_forcewake_put
	leaq	24(%r14), %rdi
	movl	16(%rbx), %esi
	callq	_intel_runtime_pm_put
	cmpq	$0, 8(%rbx)
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_oa_put_render_ctx_id
LBB0_2:
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_put_oa_config
	movq	(%r14), %rsi
	testq	%rsi, %rsi
	je	LBB0_3
## %bb.4:
	leaq	L_.str(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DRM_NOTE                       ## TAILCALL
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FORCEWAKE_ALL,4,2              ## @FORCEWAKE_ALL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d spurious OA report notices suppressed due to ratelimiting\n"

	.no_dead_strip	_i915_oa_stream_destroy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i915_oa_stream_destroy
_i915_oa_stream_destroy:                ; @i915_oa_stream_destroy
	.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	x20, x0
	ldr	x19, [x0, #24]
	ldr	x8, [x19, #16]
	cmp	x8, x0
	cset	w0, ne
	bl	_BUG_ON
	add	x21, x19, #32
	mov	x0, x21
	bl	_mutex_lock
	str	xzr, [x19, #16]
	ldr	x8, [x19, #8]
	mov	x0, x20
	blr	x8
	mov	x0, x21
	bl	_mutex_unlock
	mov	x0, x20
	bl	_free_oa_buffer
	add	x0, x19, #28
Lloh0:
	adrp	x8, _FORCEWAKE_ALL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FORCEWAKE_ALL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_intel_uncore_forcewake_put
	add	x0, x19, #24
	ldr	w1, [x20, #16]
	bl	_intel_runtime_pm_put
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_oa_put_render_ctx_id
LBB0_2:
	ldr	w1, [x20]
	mov	x0, x19
	bl	_put_oa_config
	ldr	x1, [x19]
	cbz	x1, LBB0_4
; %bb.3:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	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	_DRM_NOTE
LBB0_4:
	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 AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_FORCEWAKE_ALL,4,2              ; @FORCEWAKE_ALL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d spurious OA report notices suppressed due to ratelimiting\n"

	.no_dead_strip	_i915_oa_stream_destroy
.subsections_via_symbols
