	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mei_me_pg_legacy_enter_sync
_mei_me_pg_legacy_enter_sync:           ## @mei_me_pg_legacy_enter_sync
	.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	%rdi, %rbx
	callq	_to_me_hw
	movq	%rax, %r14
	movq	_MEI_PGI_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_mei_secs_to_jiffies
	movq	%rax, %r15
	movq	_MEI_PG_EVENT_WAIT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	movq	_MEI_PG_ISOLATION_ENTRY_REQ_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mei_hbm_pg
	testl	%eax, %eax
	jne	LBB0_5
## %bb.1:
	leaq	8(%rbx), %r12
	movq	%r12, %rdi
	callq	_mutex_unlock
	movl	12(%rbx), %edi
	movq	(%rbx), %rax
	movq	_MEI_PG_EVENT_RECEIVED@GOTPCREL(%rip), %r13
	xorl	%esi, %esi
	cmpq	(%r13), %rax
	sete	%sil
	movq	%r15, %rdx
	callq	_wait_event_timeout
	movq	%r12, %rdi
	callq	_mutex_lock
	movq	(%rbx), %rax
	cmpq	(%r13), %rax
	jne	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_mei_me_pg_set
	xorl	%eax, %eax
	jmp	LBB0_4
LBB0_3:
	movq	_ETIME@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_4:
	movq	_MEI_PG_EVENT_IDLE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, (%rbx)
	movq	_MEI_PG_ON@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%r14)
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MEI_PGI_TIMEOUT,4,2            ## @MEI_PGI_TIMEOUT
	.comm	_MEI_PG_EVENT_WAIT,8,3          ## @MEI_PG_EVENT_WAIT
	.comm	_MEI_PG_ISOLATION_ENTRY_REQ_CMD,4,2 ## @MEI_PG_ISOLATION_ENTRY_REQ_CMD
	.comm	_MEI_PG_EVENT_RECEIVED,8,3      ## @MEI_PG_EVENT_RECEIVED
	.comm	_ETIME,4,2                      ## @ETIME
	.comm	_MEI_PG_EVENT_IDLE,8,3          ## @MEI_PG_EVENT_IDLE
	.comm	_MEI_PG_ON,4,2                  ## @MEI_PG_ON
	.no_dead_strip	_mei_me_pg_legacy_enter_sync
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mei_me_pg_legacy_enter_sync
_mei_me_pg_legacy_enter_sync:           ; @mei_me_pg_legacy_enter_sync
	.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	x19, x0
	bl	_to_me_hw
	mov	x20, x0
Lloh0:
	adrp	x8, _MEI_PGI_TIMEOUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MEI_PGI_TIMEOUT@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_mei_secs_to_jiffies
	mov	x21, x0
Lloh3:
	adrp	x8, _MEI_PG_EVENT_WAIT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MEI_PG_EVENT_WAIT@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	str	x8, [x19]
Lloh6:
	adrp	x8, _MEI_PG_ISOLATION_ENTRY_REQ_CMD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MEI_PG_ISOLATION_ENTRY_REQ_CMD@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mei_hbm_pg
	cbnz	w0, LBB0_5
; %bb.1:
	add	x22, x19, #8
	mov	x0, x22
	bl	_mutex_unlock
	ldr	w0, [x19, #12]
	ldr	x8, [x19]
Lloh9:
	adrp	x23, _MEI_PG_EVENT_RECEIVED@GOTPAGE
Lloh10:
	ldr	x23, [x23, _MEI_PG_EVENT_RECEIVED@GOTPAGEOFF]
	ldr	x9, [x23]
	cmp	x8, x9
	cset	w1, eq
	mov	x2, x21
	bl	_wait_event_timeout
	mov	x0, x22
	bl	_mutex_lock
	ldr	x8, [x19]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_mei_me_pg_set
	mov	w0, #0
	b	LBB0_4
LBB0_3:
Lloh11:
	adrp	x8, _ETIME@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ETIME@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
Lloh14:
	adrp	x8, _MEI_PG_EVENT_IDLE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MEI_PG_EVENT_IDLE@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	str	x8, [x19]
Lloh17:
	adrp	x8, _MEI_PG_ON@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MEI_PG_ON@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	str	w8, [x20]
LBB0_5:
	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
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_MEI_PGI_TIMEOUT,4,2            ; @MEI_PGI_TIMEOUT
	.comm	_MEI_PG_EVENT_WAIT,8,3          ; @MEI_PG_EVENT_WAIT
	.comm	_MEI_PG_ISOLATION_ENTRY_REQ_CMD,4,2 ; @MEI_PG_ISOLATION_ENTRY_REQ_CMD
	.comm	_MEI_PG_EVENT_RECEIVED,8,3      ; @MEI_PG_EVENT_RECEIVED
	.comm	_ETIME,4,2                      ; @ETIME
	.comm	_MEI_PG_EVENT_IDLE,8,3          ; @MEI_PG_EVENT_IDLE
	.comm	_MEI_PG_ON,4,2                  ; @MEI_PG_ON
	.no_dead_strip	_mei_me_pg_legacy_enter_sync
.subsections_via_symbols
