	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mei_restart                    ## -- Begin function mei_restart
	.p2align	4, 0x90
_mei_restart:                           ## @mei_restart
	.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, %rbx
	leaq	16(%rdi), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	_MEI_DEV_POWER_UP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_mei_set_devstate
	movq	$0, 24(%rbx)
	movq	%rbx, %rdi
	callq	_mei_reset
	movl	%eax, %r14d
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	_ENODEV@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	addl	%r14d, %eax
	je	LBB0_2
## %bb.1:
	movq	(%rbx), %rax
	movq	_MEI_DEV_DISABLED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
LBB0_2:
	movl	12(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	callq	_dev_err
	xorl	%r15d, %r15d
	subl	(%r12), %r15d
LBB0_5:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	xorl	%r15d, %r15d
	testl	%r14d, %r14d
	je	LBB0_5
## %bb.4:
	addq	$8, %rbx
	movq	%rbx, %rdi
	callq	_schedule_work
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_MEI_DEV_POWER_UP,4,2           ## @MEI_DEV_POWER_UP
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_MEI_DEV_DISABLED,8,3           ## @MEI_DEV_DISABLED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"device disabled = %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mei_restart                    ; -- Begin function mei_restart
	.p2align	2
_mei_restart:                           ; @mei_restart
	.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
	add	x21, x0, #16
	mov	x0, x21
	bl	_mutex_lock
Lloh0:
	adrp	x8, _MEI_DEV_POWER_UP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MEI_DEV_POWER_UP@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mei_set_devstate
	str	xzr, [x19, #24]
	mov	x0, x19
	bl	_mei_reset
	mov	x20, x0
	mov	x0, x21
	bl	_mutex_unlock
Lloh3:
	adrp	x21, _ENODEV@GOTPAGE
Lloh4:
	ldr	x21, [x21, _ENODEV@GOTPAGEOFF]
	ldr	w8, [x21]
	cmn	w20, w8
	b.eq	LBB0_2
; %bb.1:
	ldr	x8, [x19]
Lloh5:
	adrp	x9, _MEI_DEV_DISABLED@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MEI_DEV_DISABLED@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
LBB0_2:
	ldr	w0, [x19, #12]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_dev_err
	ldr	w8, [x21]
	neg	w0, w8
	b	LBB0_6
LBB0_3:
	cbz	w20, LBB0_5
; %bb.4:
	add	x0, x19, #8
	bl	_schedule_work
LBB0_5:
	mov	w0, #0
LBB0_6:
	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
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_MEI_DEV_POWER_UP,4,2           ; @MEI_DEV_POWER_UP
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_MEI_DEV_DISABLED,8,3           ; @MEI_DEV_DISABLED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"device disabled = %d\n"

.subsections_via_symbols
