	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_self_refresh_helper_init   ## -- Begin function drm_self_refresh_helper_init
	.p2align	4, 0x90
_drm_self_refresh_helper_init:          ## @drm_self_refresh_helper_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	(%rdi), %rdi
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_3:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$32, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %rbx
	leaq	24(%rax), %rdi
	movq	_drm_self_refresh_helper_entry_work@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_DELAYED_WORK
	movq	%r14, 16(%rbx)
	leaq	8(%rbx), %rdi
	callq	_mutex_init
	movq	%rbx, %r15
	addq	$4, %r15
	movq	%r15, %rdi
	callq	_ewma_psr_time_init
	movq	%rbx, %rdi
	callq	_ewma_psr_time_init
	movq	_SELF_REFRESH_AVG_SEED_MS@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_ewma_psr_time_add
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_ewma_psr_time_add
	movq	%rbx, (%r14)
	xorl	%eax, %eax
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_drm_self_refresh_helper_entry_work,4,2 ## @drm_self_refresh_helper_entry_work
	.comm	_SELF_REFRESH_AVG_SEED_MS,4,2   ## @SELF_REFRESH_AVG_SEED_MS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_self_refresh_helper_init   ; -- Begin function drm_self_refresh_helper_init
	.p2align	2
_drm_self_refresh_helper_init:          ; @drm_self_refresh_helper_init
	.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	x19, x0
	ldr	x0, [x0]
	bl	_WARN_ON
	cbz	x0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_3:
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w0, #32
	bl	_kzalloc
	cbz	x0, LBB0_6
; %bb.4:
	mov	x20, x0
	add	x0, x0, #24
Lloh5:
	adrp	x8, _drm_self_refresh_helper_entry_work@GOTPAGE
Lloh6:
	ldr	x8, [x8, _drm_self_refresh_helper_entry_work@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_INIT_DELAYED_WORK
	str	x19, [x20, #16]
	add	x0, x20, #8
	bl	_mutex_init
	add	x21, x20, #4
	mov	x0, x21
	bl	_ewma_psr_time_init
	mov	x0, x20
	bl	_ewma_psr_time_init
Lloh8:
	adrp	x22, _SELF_REFRESH_AVG_SEED_MS@GOTPAGE
Lloh9:
	ldr	x22, [x22, _SELF_REFRESH_AVG_SEED_MS@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x21
	bl	_ewma_psr_time_add
	ldr	w1, [x22]
	mov	x0, x20
	bl	_ewma_psr_time_add
	mov	w0, #0
	str	x20, [x19]
LBB0_5:
	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
LBB0_6:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_drm_self_refresh_helper_entry_work,4,2 ; @drm_self_refresh_helper_entry_work
	.comm	_SELF_REFRESH_AVG_SEED_MS,4,2   ; @SELF_REFRESH_AVG_SEED_MS
.subsections_via_symbols
