	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mei_me_d0i3_exit_sync
_mei_me_d0i3_exit_sync:                 ## @mei_me_d0i3_exit_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_PG_EVENT_INTR_WAIT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r12)
	movq	%r12, %rdi
	callq	_mei_me_d0i3c_read
	movq	_H_D0I3C_I3@GOTPCREL(%rip), %r13
	testl	%eax, (%r13)
	je	LBB0_1
## %bb.4:
	movq	%r12, %rdi
	callq	_mei_me_d0i3_unset
	movq	_H_D0I3C_CIP@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
## %bb.6:
	leaq	12(%r12), %rbx
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movl	16(%r12), %edi
	movq	(%r12), %rax
	movq	_MEI_PG_EVENT_INTR_RECEIVED@GOTPCREL(%rip), %rcx
	xorl	%esi, %esi
	cmpq	(%rcx), %rax
	sete	%sil
	movq	%r15, %rdx
	callq	_wait_event_timeout
	movq	%rbx, %rdi
	callq	_mutex_lock
	movq	(%r12), %rax
	movq	_MEI_PG_EVENT_INTR_RECEIVED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_3
## %bb.7:
	movq	%r12, %rdi
	callq	_mei_me_d0i3c_read
	testl	%eax, (%r13)
	je	LBB0_3
## %bb.8:
	movq	_ETIME@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_9
LBB0_1:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_5:
	leaq	L_.str.1(%rip), %rsi
LBB0_2:
	movl	8(%r12), %edi
	xorl	%eax, %eax
	callq	_dev_dbg
LBB0_3:
	movq	_MEI_PG_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	xorl	%ebx, %ebx
LBB0_9:
	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
	.cfi_endproc
                                        ## -- End function
	.comm	_MEI_D0I3_TIMEOUT,4,2           ## @MEI_D0I3_TIMEOUT
	.comm	_MEI_PG_EVENT_INTR_WAIT,8,3     ## @MEI_PG_EVENT_INTR_WAIT
	.comm	_H_D0I3C_I3,4,2                 ## @H_D0I3C_I3
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"d0i3 exit not needed\n"

	.comm	_H_D0I3C_CIP,4,2                ## @H_D0I3C_CIP
L_.str.1:                               ## @.str.1
	.asciz	"d0i3 exit wait not needed\n"

	.comm	_MEI_PG_EVENT_INTR_RECEIVED,8,3 ## @MEI_PG_EVENT_INTR_RECEIVED
	.comm	_ETIME,4,2                      ## @ETIME
	.comm	_MEI_PG_OFF,4,2                 ## @MEI_PG_OFF
	.comm	_MEI_PG_EVENT_IDLE,8,3          ## @MEI_PG_EVENT_IDLE
L_.str.2:                               ## @.str.2
	.asciz	"d0i3 exit ret = %d\n"

	.no_dead_strip	_mei_me_d0i3_exit_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_exit_sync
_mei_me_d0i3_exit_sync:                 ; @mei_me_d0i3_exit_sync
	.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
	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_PG_EVENT_INTR_WAIT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MEI_PG_EVENT_INTR_WAIT@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	str	x8, [x19]
	mov	x0, x19
	bl	_mei_me_d0i3c_read
Lloh6:
	adrp	x23, _H_D0I3C_I3@GOTPAGE
Lloh7:
	ldr	x23, [x23, _H_D0I3C_I3@GOTPAGEOFF]
	ldr	w8, [x23]
	tst	w8, w0
	b.eq	LBB0_5
; %bb.1:
	mov	x0, x19
	bl	_mei_me_d0i3_unset
Lloh8:
	adrp	x8, _H_D0I3C_CIP@GOTPAGE
Lloh9:
	ldr	x8, [x8, _H_D0I3C_CIP@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_6
; %bb.2:
	add	x22, x19, #12
	mov	x0, x22
	bl	_mutex_unlock
	ldr	w0, [x19, #16]
	ldr	x8, [x19]
Lloh11:
	adrp	x24, _MEI_PG_EVENT_INTR_RECEIVED@GOTPAGE
Lloh12:
	ldr	x24, [x24, _MEI_PG_EVENT_INTR_RECEIVED@GOTPAGEOFF]
	ldr	x9, [x24]
	cmp	x8, x9
	cset	w1, eq
	mov	x2, x21
	bl	_wait_event_timeout
	mov	x0, x22
	bl	_mutex_lock
	ldr	x8, [x19]
	ldr	x9, [x24]
	cmp	x8, x9
	b.eq	LBB0_8
; %bb.3:
	mov	x0, x19
	bl	_mei_me_d0i3c_read
	ldr	w8, [x23]
	tst	w8, w0
	b.eq	LBB0_8
; %bb.4:
Lloh13:
	adrp	x8, _ETIME@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ETIME@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_9
LBB0_5:
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_7
LBB0_6:
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_7:
	ldr	w0, [x19, #8]
	bl	_dev_dbg
LBB0_8:
	mov	w21, #0
Lloh20:
	adrp	x8, _MEI_PG_OFF@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MEI_PG_OFF@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	str	w8, [x20]
LBB0_9:
Lloh23:
	adrp	x8, _MEI_PG_EVENT_IDLE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MEI_PG_EVENT_IDLE@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
	str	x8, [x19]
	ldr	w0, [x19, #8]
	str	x21, [sp]
Lloh26:
	adrp	x1, l_.str.2@PAGE
Lloh27:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_dbg
	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
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_MEI_D0I3_TIMEOUT,4,2           ; @MEI_D0I3_TIMEOUT
	.comm	_MEI_PG_EVENT_INTR_WAIT,8,3     ; @MEI_PG_EVENT_INTR_WAIT
	.comm	_H_D0I3C_I3,4,2                 ; @H_D0I3C_I3
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"d0i3 exit not needed\n"

	.comm	_H_D0I3C_CIP,4,2                ; @H_D0I3C_CIP
l_.str.1:                               ; @.str.1
	.asciz	"d0i3 exit wait not needed\n"

	.comm	_MEI_PG_EVENT_INTR_RECEIVED,8,3 ; @MEI_PG_EVENT_INTR_RECEIVED
	.comm	_ETIME,4,2                      ; @ETIME
	.comm	_MEI_PG_OFF,4,2                 ; @MEI_PG_OFF
	.comm	_MEI_PG_EVENT_IDLE,8,3          ; @MEI_PG_EVENT_IDLE
l_.str.2:                               ; @.str.2
	.asciz	"d0i3 exit ret = %d\n"

	.no_dead_strip	_mei_me_d0i3_exit_sync
.subsections_via_symbols
