	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mei_me_d0i3_enter_sync
_mei_me_d0i3_enter_sync:                ## @mei_me_d0i3_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, %r12
	callq	_to_me_hw
	movq	%rax, %r14
	movq	_MEI_D0I3_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_mei_secs_to_jiffies
	movq	%rax, %r15
	movq	_MEI_PGI_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_mei_secs_to_jiffies
	movq	%rax, %r13
	movq	%r12, %rdi
	callq	_mei_me_d0i3c_read
	movq	_H_D0I3C_I3@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %rsi
LBB0_2:
	movl	8(%r12), %edi
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_10:
	movq	_MEI_PG_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_11
LBB0_3:
	movq	_MEI_PG_EVENT_WAIT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r12)
	movq	_MEI_PG_ISOLATION_ENTRY_REQ_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_mei_hbm_pg
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.4:
	leaq	12(%r12), %rbx
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movl	16(%r12), %edi
	movq	(%r12), %rax
	movq	_MEI_PG_EVENT_RECEIVED@GOTPCREL(%rip), %rcx
	xorl	%esi, %esi
	cmpq	(%rcx), %rax
	sete	%sil
	movq	%r13, %rdx
	callq	_wait_event_timeout
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	(%r12), %rax
	movq	_MEI_PG_EVENT_RECEIVED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.6:
	movq	_MEI_PG_EVENT_INTR_WAIT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r12)
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_mei_me_d0i3_set
	movq	_H_D0I3C_CIP@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_7
## %bb.8:
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movl	16(%r12), %edi
	movq	(%r12), %rax
	movq	_MEI_PG_EVENT_INTR_RECEIVED@GOTPCREL(%rip), %r13
	xorl	%esi, %esi
	cmpq	(%r13), %rax
	sete	%sil
	movq	%r15, %rdx
	callq	_wait_event_timeout
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	(%r12), %rax
	cmpq	(%r13), %rax
	je	LBB0_10
## %bb.9:
	movq	%r12, %rdi
	callq	_mei_me_d0i3c_read
	movq	_H_D0I3C_I3@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_10
LBB0_5:
	movq	_ETIME@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_11:
	movq	_MEI_PG_EVENT_IDLE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r12)
	movl	8(%r12), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_MEI_D0I3_TIMEOUT,4,2           ## @MEI_D0I3_TIMEOUT
	.comm	_MEI_PGI_TIMEOUT,4,2            ## @MEI_PGI_TIMEOUT
	.comm	_H_D0I3C_I3,4,2                 ## @H_D0I3C_I3
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"d0i3 set not needed\n"

	.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_INTR_WAIT,8,3     ## @MEI_PG_EVENT_INTR_WAIT
	.comm	_H_D0I3C_CIP,4,2                ## @H_D0I3C_CIP
L_.str.1:                               ## @.str.1
	.asciz	"d0i3 enter wait not needed\n"

	.comm	_MEI_PG_EVENT_INTR_RECEIVED,8,3 ## @MEI_PG_EVENT_INTR_RECEIVED
	.comm	_MEI_PG_ON,4,2                  ## @MEI_PG_ON
	.comm	_MEI_PG_EVENT_IDLE,8,3          ## @MEI_PG_EVENT_IDLE
L_.str.2:                               ## @.str.2
	.asciz	"d0i3 enter ret = %d\n"

	.no_dead_strip	_mei_me_d0i3_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_d0i3_enter_sync
_mei_me_d0i3_enter_sync:                ; @mei_me_d0i3_enter_sync
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	bl	_to_me_hw
	mov	x20, x0
Lloh0:
	adrp	x8, _MEI_D0I3_TIMEOUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MEI_D0I3_TIMEOUT@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_mei_secs_to_jiffies
	mov	x21, x0
Lloh3:
	adrp	x8, _MEI_PGI_TIMEOUT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MEI_PGI_TIMEOUT@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_mei_secs_to_jiffies
	mov	x23, x0
	mov	x0, x19
	bl	_mei_me_d0i3c_read
Lloh6:
	adrp	x24, _H_D0I3C_I3@GOTPAGE
Lloh7:
	ldr	x24, [x24, _H_D0I3C_I3@GOTPAGEOFF]
	ldr	w8, [x24]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.1:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
LBB0_2:
	ldr	w0, [x19, #8]
	bl	_dev_dbg
LBB0_3:
	mov	w22, #0
Lloh10:
	adrp	x8, _MEI_PG_ON@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MEI_PG_ON@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	str	w8, [x20]
	b	LBB0_10
LBB0_4:
Lloh13:
	adrp	x8, _MEI_PG_EVENT_WAIT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MEI_PG_EVENT_WAIT@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	str	x8, [x19]
Lloh16:
	adrp	x8, _MEI_PG_ISOLATION_ENTRY_REQ_CMD@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MEI_PG_ISOLATION_ENTRY_REQ_CMD@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mei_hbm_pg
	mov	x22, x0
	cbnz	w0, LBB0_10
; %bb.5:
	add	x22, x19, #12
	mov	x0, x22
	bl	_mutex_unlock
	ldr	w0, [x19, #16]
	ldr	x8, [x19]
Lloh19:
	adrp	x25, _MEI_PG_EVENT_RECEIVED@GOTPAGE
Lloh20:
	ldr	x25, [x25, _MEI_PG_EVENT_RECEIVED@GOTPAGEOFF]
	ldr	x9, [x25]
	cmp	x8, x9
	cset	w1, eq
	mov	x2, x23
	bl	_wait_event_timeout
	mov	x0, x22
	bl	_mutex_lock
	ldr	x8, [x19]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.6:
Lloh21:
	adrp	x8, _MEI_PG_EVENT_INTR_WAIT@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MEI_PG_EVENT_INTR_WAIT@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	str	x8, [x19]
	mov	x0, x19
	mov	w1, #1
	bl	_mei_me_d0i3_set
Lloh24:
	adrp	x8, _H_D0I3C_CIP@GOTPAGE
Lloh25:
	ldr	x8, [x8, _H_D0I3C_CIP@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_11
; %bb.7:
	mov	x0, x22
	bl	_mutex_unlock
	ldr	w0, [x19, #16]
	ldr	x8, [x19]
Lloh27:
	adrp	x23, _MEI_PG_EVENT_INTR_RECEIVED@GOTPAGE
Lloh28:
	ldr	x23, [x23, _MEI_PG_EVENT_INTR_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.eq	LBB0_3
; %bb.8:
	mov	x0, x19
	bl	_mei_me_d0i3c_read
	ldr	w8, [x24]
	tst	w8, w0
	b.ne	LBB0_3
LBB0_9:
Lloh29:
	adrp	x8, _ETIME@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ETIME@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_10:
Lloh32:
	adrp	x8, _MEI_PG_EVENT_IDLE@GOTPAGE
Lloh33:
	ldr	x8, [x8, _MEI_PG_EVENT_IDLE@GOTPAGEOFF]
Lloh34:
	ldr	x8, [x8]
	str	x8, [x19]
	ldr	w0, [x19, #8]
	str	x22, [sp]
Lloh35:
	adrp	x1, l_.str.2@PAGE
Lloh36:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_dbg
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_11:
Lloh37:
	adrp	x1, l_.str.1@PAGE
Lloh38:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_MEI_D0I3_TIMEOUT,4,2           ; @MEI_D0I3_TIMEOUT
	.comm	_MEI_PGI_TIMEOUT,4,2            ; @MEI_PGI_TIMEOUT
	.comm	_H_D0I3C_I3,4,2                 ; @H_D0I3C_I3
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"d0i3 set not needed\n"

	.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_INTR_WAIT,8,3     ; @MEI_PG_EVENT_INTR_WAIT
	.comm	_H_D0I3C_CIP,4,2                ; @H_D0I3C_CIP
l_.str.1:                               ; @.str.1
	.asciz	"d0i3 enter wait not needed\n"

	.comm	_MEI_PG_EVENT_INTR_RECEIVED,8,3 ; @MEI_PG_EVENT_INTR_RECEIVED
	.comm	_MEI_PG_ON,4,2                  ; @MEI_PG_ON
	.comm	_MEI_PG_EVENT_IDLE,8,3          ; @MEI_PG_EVENT_IDLE
l_.str.2:                               ; @.str.2
	.asciz	"d0i3 enter ret = %d\n"

	.no_dead_strip	_mei_me_d0i3_enter_sync
.subsections_via_symbols
