	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i915_oa_stream_init
_i915_oa_stream_init:                   ## @i915_oa_stream_init
	.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
	movq	72(%rdi), %r15
	cmpl	$0, 48(%r15)
	je	LBB0_5
## %bb.1:
	movq	%rdx, %r12
	movq	_SAMPLE_OA_REPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	testl	%ecx, (%rdx)
	je	LBB0_6
## %bb.2:
	cmpq	$0, 16(%r15)
	je	LBB0_10
## %bb.3:
	cmpq	$0, 32(%r15)
	je	LBB0_11
## %bb.4:
	leaq	L_.str.3(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_5:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_7
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
LBB0_7:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_8:
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	leaq	L_.str.2(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_11:
	movq	8(%r12), %rcx
	testq	%rcx, %rcx
	je	LBB0_14
## %bb.12:
	movq	%rdi, %r14
	movl	$4, (%rdi)
	movq	40(%r15), %rdx
	movl	(%rdx,%rcx,8), %ecx
	movl	(%rax), %eax
	orl	%eax, 4(%rdi)
	leal	4(%rcx), %eax
	movl	%eax, (%rdi)
	movl	%ecx, 24(%rdi)
	xorl	%edi, %edi
	testl	%ecx, %ecx
	sete	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_15
## %bb.13:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_14:
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_7
LBB0_15:
	movq	40(%r15), %rax
	movq	8(%r12), %rcx
	movl	4(%rax,%rcx,8), %eax
	movl	%eax, 32(%r14)
	movq	24(%r12), %rax
	movq	%rax, 64(%r14)
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	movl	20(%r12), %eax
	movl	%eax, 56(%r14)
LBB0_17:
	cmpq	$0, 8(%r14)
	je	LBB0_20
## %bb.18:
	movq	%r14, %rdi
	callq	_oa_get_render_ctx_id
	testl	%eax, %eax
	je	LBB0_20
## %bb.19:
	movl	%eax, %ebx
	leaq	L_.str.5(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	jmp	LBB0_9
LBB0_20:
	movl	16(%r12), %esi
	leaq	20(%r14), %rdx
	movq	%r15, %rdi
	callq	_get_oa_config
	testl	%eax, %eax
	je	LBB0_22
## %bb.21:
	movl	%eax, %ebx
	movl	16(%r12), %esi
	leaq	L_.str.6(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	jmp	LBB0_28
LBB0_22:
	movq	%r15, %rdi
	callq	_intel_runtime_pm_get
	movl	%eax, 16(%r14)
	leaq	4(%r15), %r12
	movq	_FORCEWAKE_ALL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_intel_uncore_forcewake_get
	movq	%r14, %rdi
	callq	_alloc_oa_buffer
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_27
## %bb.23:
	leaq	8(%r15), %r13
	movq	%r13, %rdi
	callq	_i915_mutex_lock_interruptible
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_26
## %bb.24:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	_i915_oa_stream_ops@GOTPCREL(%rip), %rax
	movq	%rax, 48(%r14)
	movq	%r14, 32(%r15)
	movq	%r14, %rdi
	callq	*16(%r15)
	testl	%eax, %eax
	je	LBB0_30
## %bb.25:
	movl	%eax, %ebx
	leaq	L_.str.7(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	movq	$0, 32(%r15)
	movq	%r14, %rdi
	callq	*24(%r15)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
LBB0_26:
	movq	%r14, %rdi
	callq	_free_oa_buffer
	movq	_FORCEWAKE_ALL@GOTPCREL(%rip), %r13
LBB0_27:
	movl	20(%r14), %esi
	movq	%r15, %rdi
	callq	_put_oa_config
	movl	(%r13), %esi
	movq	%r12, %rdi
	callq	_intel_uncore_forcewake_put
	movl	16(%r14), %esi
	movq	%r15, %rdi
	callq	_intel_runtime_pm_put
LBB0_28:
	cmpq	$0, 8(%r14)
	je	LBB0_9
## %bb.29:
	movq	%r14, %rdi
	callq	_oa_put_render_ctx_id
	jmp	LBB0_9
LBB0_30:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	leaq	40(%r14), %rdi
	movq	_CLOCK_MONOTONIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HRTIMER_MODE_REL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_hrtimer_init
	movq	_oa_poll_check_timer_cb@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%r14)
	leaq	36(%r14), %rdi
	callq	_init_waitqueue_head
	addq	$28, %r14
	movq	%r14, %rdi
	callq	_spin_lock_init
	xorl	%ebx, %ebx
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"OA metrics weren't advertised via sysfs\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SAMPLE_OA_REPORT,4,2           ## @SAMPLE_OA_REPORT
L_.str.1:                               ## @.str.1
	.asciz	"Only OA report sampling supported\n"

L_.str.2:                               ## @.str.2
	.asciz	"OA unit not supported\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.3:                               ## @.str.3
	.asciz	"OA unit already in use\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
L_.str.4:                               ## @.str.4
	.asciz	"OA report format not specified\n"

L_.str.5:                               ## @.str.5
	.asciz	"Invalid context id to filter with\n"

L_.str.6:                               ## @.str.6
	.asciz	"Invalid OA config id=%i\n"

	.comm	_FORCEWAKE_ALL,4,2              ## @FORCEWAKE_ALL
	.comm	_i915_oa_stream_ops,4,2         ## @i915_oa_stream_ops
L_.str.7:                               ## @.str.7
	.asciz	"Unable to enable metric set\n"

	.comm	_CLOCK_MONOTONIC,4,2            ## @CLOCK_MONOTONIC
	.comm	_HRTIMER_MODE_REL,4,2           ## @HRTIMER_MODE_REL
	.comm	_oa_poll_check_timer_cb,4,2     ## @oa_poll_check_timer_cb
	.no_dead_strip	_i915_oa_stream_init
.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_init
_i915_oa_stream_init:                   ; @i915_oa_stream_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	x20, [x0, #72]
	ldr	w8, [x20, #48]
	cbz	w8, LBB0_5
; %bb.1:
	mov	x22, x2
	ldr	w9, [x2]
Lloh0:
	adrp	x8, _SAMPLE_OA_REPORT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SAMPLE_OA_REPORT@GOTPAGEOFF]
	ldr	w10, [x8]
	tst	w10, w9
	b.eq	LBB0_6
; %bb.2:
	ldr	x9, [x20, #16]
	cbz	x9, LBB0_11
; %bb.3:
	ldr	x9, [x20, #32]
	cbz	x9, LBB0_12
; %bb.4:
Lloh2:
	adrp	x0, l_.str.3@PAGE
Lloh3:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DRM_DEBUG
Lloh4:
	adrp	x8, _EBUSY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_9
LBB0_5:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_7
LBB0_6:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_7:
	bl	_DRM_DEBUG
LBB0_8:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_9:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_10:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_11:
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_DEBUG
Lloh14:
	adrp	x8, _ENODEV@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_9
LBB0_12:
	ldr	x9, [x22, #8]
	cbz	x9, LBB0_19
; %bb.13:
	mov	x19, x0
	mov	w10, #4
	str	w10, [x0]
	ldr	x10, [x20, #40]
	lsl	x9, x9, #3
	ldr	w9, [x10, x9]
	ldr	w8, [x8]
	ldr	w10, [x0, #4]
	orr	w8, w10, w8
	add	w10, w9, #4
	stp	w10, w8, [x0]
	str	w9, [x0, #24]
	cmp	w9, #0
	cset	w0, eq
	bl	_WARN_ON
	cbnz	x0, LBB0_8
; %bb.14:
	ldr	x8, [x20, #40]
	ldr	x9, [x22, #8]
	add	x8, x8, x9, lsl #3
	ldr	w8, [x8, #4]
	str	w8, [x19, #32]
	ldr	x8, [x22, #24]
	str	x8, [x19, #64]
	cbz	x8, LBB0_16
; %bb.15:
	ldr	w8, [x22, #20]
	str	w8, [x19, #56]
LBB0_16:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_20
; %bb.17:
	mov	x0, x19
	bl	_oa_get_render_ctx_id
	cbz	w0, LBB0_20
; %bb.18:
	mov	x21, x0
Lloh16:
	adrp	x0, l_.str.5@PAGE
Lloh17:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_DRM_DEBUG
	b	LBB0_10
LBB0_19:
Lloh18:
	adrp	x0, l_.str.4@PAGE
Lloh19:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_7
LBB0_20:
	ldr	w1, [x22, #16]
	add	x2, x19, #20
	mov	x0, x20
	bl	_get_oa_config
	cbz	w0, LBB0_22
; %bb.21:
	mov	x21, x0
	ldr	w8, [x22, #16]
	str	x8, [sp]
Lloh20:
	adrp	x0, l_.str.6@PAGE
Lloh21:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_DRM_DEBUG
	b	LBB0_28
LBB0_22:
	mov	x0, x20
	bl	_intel_runtime_pm_get
	str	w0, [x19, #16]
	add	x22, x20, #4
Lloh22:
	adrp	x24, _FORCEWAKE_ALL@GOTPAGE
Lloh23:
	ldr	x24, [x24, _FORCEWAKE_ALL@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x22
	bl	_intel_uncore_forcewake_get
	mov	x0, x19
	bl	_alloc_oa_buffer
	mov	x21, x0
	cbnz	w0, LBB0_27
; %bb.23:
	add	x23, x20, #8
	mov	x0, x23
	bl	_i915_mutex_lock_interruptible
	mov	x21, x0
	cbnz	w0, LBB0_26
; %bb.24:
Lloh24:
	adrp	x8, _i915_oa_stream_ops@GOTPAGE
Lloh25:
	ldr	x8, [x8, _i915_oa_stream_ops@GOTPAGEOFF]
	str	x8, [x19, #48]
	str	x19, [x20, #32]
	ldr	x8, [x20, #16]
	mov	x0, x19
	blr	x8
	mov	x21, x0
	cbz	w0, LBB0_30
; %bb.25:
Lloh26:
	adrp	x0, l_.str.7@PAGE
Lloh27:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_DRM_DEBUG
	str	xzr, [x20, #32]
	ldr	x8, [x20, #24]
	mov	x0, x19
	blr	x8
	mov	x0, x23
	bl	_mutex_unlock
LBB0_26:
	mov	x0, x19
	bl	_free_oa_buffer
LBB0_27:
	ldr	w1, [x19, #20]
	mov	x0, x20
	bl	_put_oa_config
	ldr	w1, [x24]
	mov	x0, x22
	bl	_intel_uncore_forcewake_put
	ldr	w1, [x19, #16]
	mov	x0, x20
	bl	_intel_runtime_pm_put
LBB0_28:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_10
; %bb.29:
	mov	x0, x19
	bl	_oa_put_render_ctx_id
	b	LBB0_10
LBB0_30:
	mov	x0, x23
	bl	_mutex_unlock
	add	x0, x19, #40
Lloh28:
	adrp	x8, _CLOCK_MONOTONIC@GOTPAGE
Lloh29:
	ldr	x8, [x8, _CLOCK_MONOTONIC@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
Lloh31:
	adrp	x8, _HRTIMER_MODE_REL@GOTPAGE
Lloh32:
	ldr	x8, [x8, _HRTIMER_MODE_REL@GOTPAGEOFF]
Lloh33:
	ldr	w2, [x8]
	bl	_hrtimer_init
Lloh34:
	adrp	x8, _oa_poll_check_timer_cb@GOTPAGE
Lloh35:
	ldr	x8, [x8, _oa_poll_check_timer_cb@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	str	w8, [x19, #40]
	add	x0, x19, #36
	bl	_init_waitqueue_head
	add	x0, x19, #28
	bl	_spin_lock_init
	b	LBB0_10
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"OA metrics weren't advertised via sysfs\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SAMPLE_OA_REPORT,4,2           ; @SAMPLE_OA_REPORT
l_.str.1:                               ; @.str.1
	.asciz	"Only OA report sampling supported\n"

l_.str.2:                               ; @.str.2
	.asciz	"OA unit not supported\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.3:                               ; @.str.3
	.asciz	"OA unit already in use\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
l_.str.4:                               ; @.str.4
	.asciz	"OA report format not specified\n"

l_.str.5:                               ; @.str.5
	.asciz	"Invalid context id to filter with\n"

l_.str.6:                               ; @.str.6
	.asciz	"Invalid OA config id=%i\n"

	.comm	_FORCEWAKE_ALL,4,2              ; @FORCEWAKE_ALL
	.comm	_i915_oa_stream_ops,4,2         ; @i915_oa_stream_ops
l_.str.7:                               ; @.str.7
	.asciz	"Unable to enable metric set\n"

	.comm	_CLOCK_MONOTONIC,4,2            ; @CLOCK_MONOTONIC
	.comm	_HRTIMER_MODE_REL,4,2           ; @HRTIMER_MODE_REL
	.comm	_oa_poll_check_timer_cb,4,2     ; @oa_poll_check_timer_cb
	.no_dead_strip	_i915_oa_stream_init
.subsections_via_symbols
