	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_pmu_register              ## -- Begin function i915_pmu_register
	.p2align	4, 0x90
_i915_pmu_register:                     ## @i915_pmu_register
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	callq	_INTEL_GEN
	cmpl	$2, %eax
	jg	LBB0_1
## %bb.8:
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_dev_info                       ## TAILCALL
LBB0_1:
	leaq	8(%rbx), %r14
	movq	%r14, %rdi
	callq	_create_event_attributes
	movq	_i915_pmu_events_attr_group@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movq	_i915_pmu_attr_groups@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%rbx)
	movq	_perf_invalid_context@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%rbx)
	movq	_i915_pmu_event_init@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
	movq	_i915_pmu_event_add@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%rbx)
	movq	_i915_pmu_event_del@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movq	_i915_pmu_event_start@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%rbx)
	movq	_i915_pmu_event_stop@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rbx)
	movq	_i915_pmu_event_read@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	_i915_pmu_event_event_idx@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	leaq	52(%rbx), %rdi
	callq	_spin_lock_init
	leaq	48(%rbx), %rdi
	movq	_CLOCK_MONOTONIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HRTIMER_MODE_REL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_hrtimer_init
	movq	_i915_sample@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%rbx)
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	$-1, %edx
	callq	_perf_pmu_register
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:
	movq	%r14, %rdi
	callq	_i915_pmu_register_cpuhp_state
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_perf_pmu_unregister
	jmp	LBB0_6
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_6:
	movq	$0, (%r14)
	movq	%r14, %rdi
	callq	_free_event_attributes
	leaq	L_.str.2(%rip), %rdi
	movl	%ebx, %esi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_DRM_NOTE                       ## TAILCALL
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PMU not supported for this GPU."

	.comm	_i915_pmu_events_attr_group,4,2 ## @i915_pmu_events_attr_group
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_i915_pmu_attr_groups,4,2       ## @i915_pmu_attr_groups
	.comm	_perf_invalid_context,4,2       ## @perf_invalid_context
	.comm	_i915_pmu_event_init,8,3        ## @i915_pmu_event_init
	.comm	_i915_pmu_event_add,4,2         ## @i915_pmu_event_add
	.comm	_i915_pmu_event_del,4,2         ## @i915_pmu_event_del
	.comm	_i915_pmu_event_start,4,2       ## @i915_pmu_event_start
	.comm	_i915_pmu_event_stop,4,2        ## @i915_pmu_event_stop
	.comm	_i915_pmu_event_read,4,2        ## @i915_pmu_event_read
	.comm	_i915_pmu_event_event_idx,4,2   ## @i915_pmu_event_event_idx
	.comm	_CLOCK_MONOTONIC,4,2            ## @CLOCK_MONOTONIC
	.comm	_HRTIMER_MODE_REL,4,2           ## @HRTIMER_MODE_REL
	.comm	_i915_sample,4,2                ## @i915_sample
L_.str.1:                               ## @.str.1
	.asciz	"i915"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to register PMU! (err=%d)\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i915_pmu_register              ; -- Begin function i915_pmu_register
	.p2align	2
_i915_pmu_register:                     ; @i915_pmu_register
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
	bl	_INTEL_GEN
	cmp	w0, #2
	b.gt	LBB0_2
; %bb.1:
	ldr	w0, [x20]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_dev_info
LBB0_2:
	add	x19, x20, #8
	mov	x0, x19
	bl	_create_event_attributes
Lloh2:
	adrp	x8, _i915_pmu_events_attr_group@GOTPAGE
Lloh3:
	ldr	x8, [x8, _i915_pmu_events_attr_group@GOTPAGEOFF]
Lloh4:
	str	w0, [x8]
	cbz	w0, LBB0_6
; %bb.3:
Lloh5:
	adrp	x8, _i915_pmu_attr_groups@GOTPAGE
Lloh6:
	ldr	x8, [x8, _i915_pmu_attr_groups@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _perf_invalid_context@GOTPAGE
Lloh9:
	ldr	x9, [x9, _perf_invalid_context@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #40]
Lloh11:
	adrp	x8, _i915_pmu_event_init@GOTPAGE
Lloh12:
	ldr	x8, [x8, _i915_pmu_event_init@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
Lloh14:
	adrp	x9, _i915_pmu_event_add@GOTPAGE
Lloh15:
	ldr	x9, [x9, _i915_pmu_event_add@GOTPAGEOFF]
	str	x8, [x20, #8]
Lloh16:
	ldr	w8, [x9]
Lloh17:
	adrp	x9, _i915_pmu_event_del@GOTPAGE
Lloh18:
	ldr	x9, [x9, _i915_pmu_event_del@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #32]
Lloh20:
	adrp	x8, _i915_pmu_event_start@GOTPAGE
Lloh21:
	ldr	x8, [x8, _i915_pmu_event_start@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	adrp	x9, _i915_pmu_event_stop@GOTPAGE
Lloh24:
	ldr	x9, [x9, _i915_pmu_event_stop@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #24]
Lloh26:
	adrp	x8, _i915_pmu_event_read@GOTPAGE
Lloh27:
	ldr	x8, [x8, _i915_pmu_event_read@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
Lloh29:
	adrp	x9, _i915_pmu_event_event_idx@GOTPAGE
Lloh30:
	ldr	x9, [x9, _i915_pmu_event_event_idx@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	stp	w9, w8, [x20, #16]
	add	x0, x20, #52
	bl	_spin_lock_init
	add	x0, x20, #48
Lloh32:
	adrp	x8, _CLOCK_MONOTONIC@GOTPAGE
Lloh33:
	ldr	x8, [x8, _CLOCK_MONOTONIC@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
Lloh35:
	adrp	x8, _HRTIMER_MODE_REL@GOTPAGE
Lloh36:
	ldr	x8, [x8, _HRTIMER_MODE_REL@GOTPAGEOFF]
Lloh37:
	ldr	w2, [x8]
	bl	_hrtimer_init
Lloh38:
	adrp	x8, _i915_sample@GOTPAGE
Lloh39:
	ldr	x8, [x8, _i915_sample@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	str	w8, [x20, #48]
Lloh41:
	adrp	x1, l_.str.1@PAGE
Lloh42:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	w2, #-1
	bl	_perf_pmu_register
	mov	x20, x0
	cbnz	w0, LBB0_7
; %bb.4:
	mov	x0, x19
	bl	_i915_pmu_register_cpuhp_state
	cbz	w0, LBB0_8
; %bb.5:
	mov	x20, x0
	mov	x0, x19
	bl	_perf_pmu_unregister
	b	LBB0_7
LBB0_6:
Lloh43:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh44:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_7:
	str	xzr, [x19]
	mov	x0, x19
	bl	_free_event_attributes
Lloh46:
	adrp	x0, l_.str.2@PAGE
Lloh47:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_DRM_NOTE
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotStr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpAdd	Lloh46, Lloh47
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PMU not supported for this GPU."

	.comm	_i915_pmu_events_attr_group,4,2 ; @i915_pmu_events_attr_group
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_i915_pmu_attr_groups,4,2       ; @i915_pmu_attr_groups
	.comm	_perf_invalid_context,4,2       ; @perf_invalid_context
	.comm	_i915_pmu_event_init,8,3        ; @i915_pmu_event_init
	.comm	_i915_pmu_event_add,4,2         ; @i915_pmu_event_add
	.comm	_i915_pmu_event_del,4,2         ; @i915_pmu_event_del
	.comm	_i915_pmu_event_start,4,2       ; @i915_pmu_event_start
	.comm	_i915_pmu_event_stop,4,2        ; @i915_pmu_event_stop
	.comm	_i915_pmu_event_read,4,2        ; @i915_pmu_event_read
	.comm	_i915_pmu_event_event_idx,4,2   ; @i915_pmu_event_event_idx
	.comm	_CLOCK_MONOTONIC,4,2            ; @CLOCK_MONOTONIC
	.comm	_HRTIMER_MODE_REL,4,2           ; @HRTIMER_MODE_REL
	.comm	_i915_sample,4,2                ; @i915_sample
l_.str.1:                               ; @.str.1
	.asciz	"i915"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to register PMU! (err=%d)\n"

.subsections_via_symbols
