	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mei_start                      ## -- Begin function mei_start
	.p2align	4, 0x90
_mei_start:                             ## @mei_start
	.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
	leaq	8(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	%rbx, %rdi
	callq	_mei_clear_interrupts
	movq	%rbx, %rdi
	callq	_mei_hw_config
	movl	12(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	movq	$0, 16(%rbx)
	movq	_MEI_DEV_INITIALIZING@GOTPCREL(%rip), %r15
	movq	_ENODEV@GOTPCREL(%rip), %r12
	movq	_MEI_DEV_DISABLED@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rsi
	movq	%rbx, %rdi
	callq	_mei_set_devstate
	movq	%rbx, %rdi
	callq	_mei_reset
	movl	(%r12), %ecx
	addl	%eax, %ecx
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	(%rbx), %rcx
	cmpq	(%r13), %rcx
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	testl	%eax, %eax
	jne	LBB0_1
## %bb.5:
	movq	%rbx, %rdi
	callq	_mei_hbm_start_wait
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movl	12(%rbx), %edi
	leaq	L_.str.2(%rip), %rsi
LBB0_7:
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_14
LBB0_3:
	movl	12(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_14:
	movl	12(%rbx), %edi
	leaq	L_.str.7(%rip), %rsi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_dev_err
	movq	(%r13), %rsi
	movq	%rbx, %rdi
	callq	_mei_set_devstate
	movq	%r14, %rdi
	callq	_mutex_unlock
	subl	(%r12), %r15d
LBB0_15:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%rbx, %rdi
	callq	_mei_host_is_ready
	testl	%eax, %eax
	je	LBB0_9
## %bb.10:
	movq	%rbx, %rdi
	callq	_mei_hw_is_ready
	testl	%eax, %eax
	je	LBB0_11
## %bb.12:
	movq	%rbx, %rdi
	callq	_mei_hbm_version_is_supported
	movl	12(%rbx), %edi
	testl	%eax, %eax
	je	LBB0_13
## %bb.16:
	leaq	L_.str.6(%rip), %rsi
	callq	_dev_dbg
	movq	%r14, %rdi
	callq	_mutex_unlock
	xorl	%r15d, %r15d
	jmp	LBB0_15
LBB0_9:
	movl	12(%rbx), %edi
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_7
LBB0_11:
	movl	12(%rbx), %edi
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_7
LBB0_13:
	leaq	L_.str.5(%rip), %rsi
	callq	_dev_dbg
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"reset in start the mei device.\n"

	.comm	_MEI_DEV_INITIALIZING,8,3       ## @MEI_DEV_INITIALIZING
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_MEI_DEV_DISABLED,8,3           ## @MEI_DEV_DISABLED
L_.str.1:                               ## @.str.1
	.asciz	"reset failed ret = %d"

L_.str.2:                               ## @.str.2
	.asciz	"HBM haven't started"

L_.str.3:                               ## @.str.3
	.asciz	"host is not ready.\n"

L_.str.4:                               ## @.str.4
	.asciz	"ME is not ready.\n"

L_.str.5:                               ## @.str.5
	.asciz	"MEI start failed.\n"

L_.str.6:                               ## @.str.6
	.asciz	"link layer has been established.\n"

L_.str.7:                               ## @.str.7
	.asciz	"link layer initialization failed.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mei_start                      ; -- Begin function mei_start
	.p2align	2
_mei_start:                             ; @mei_start
	.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	x20, x0
	add	x19, x0, #8
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x20
	bl	_mei_clear_interrupts
	mov	x0, x20
	bl	_mei_hw_config
	ldr	w0, [x20, #12]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	str	xzr, [x20, #16]
Lloh2:
	adrp	x23, _MEI_DEV_INITIALIZING@GOTPAGE
Lloh3:
	ldr	x23, [x23, _MEI_DEV_INITIALIZING@GOTPAGEOFF]
Lloh4:
	adrp	x21, _ENODEV@GOTPAGE
Lloh5:
	ldr	x21, [x21, _ENODEV@GOTPAGEOFF]
Lloh6:
	adrp	x22, _MEI_DEV_DISABLED@GOTPAGE
Lloh7:
	ldr	x22, [x22, _MEI_DEV_DISABLED@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x1, [x23]
	mov	x0, x20
	bl	_mei_set_devstate
	mov	x0, x20
	bl	_mei_reset
                                        ; kill: def $w0 killed $w0 def $x0
	ldr	w8, [x21]
	cmn	w0, w8
	b.eq	LBB0_6
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x8, [x20]
	ldr	x9, [x22]
	cmp	x8, x9
	b.eq	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	cbnz	w0, LBB0_1
; %bb.4:
	mov	x0, x20
	bl	_mei_hbm_start_wait
	cbz	x0, LBB0_10
; %bb.5:
	ldr	w0, [x20, #12]
Lloh8:
	adrp	x1, l_.str.2@PAGE
Lloh9:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_7
LBB0_6:
	ldr	w8, [x20, #12]
	str	x0, [sp]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x8
LBB0_7:
	bl	_dev_err
LBB0_8:
	ldr	w0, [x20, #12]
Lloh12:
	adrp	x1, l_.str.7@PAGE
Lloh13:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_dev_err
	ldr	x1, [x22]
	mov	x0, x20
	bl	_mei_set_devstate
	mov	x0, x19
	bl	_mutex_unlock
	ldr	w8, [x21]
	neg	w0, w8
LBB0_9:
	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
LBB0_10:
	mov	x0, x20
	bl	_mei_host_is_ready
	cbz	w0, LBB0_14
; %bb.11:
	mov	x0, x20
	bl	_mei_hw_is_ready
	cbz	w0, LBB0_15
; %bb.12:
	mov	x0, x20
	bl	_mei_hbm_version_is_supported
	mov	x8, x0
	ldr	w0, [x20, #12]
	cbz	w8, LBB0_16
; %bb.13:
Lloh14:
	adrp	x1, l_.str.6@PAGE
Lloh15:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_dev_dbg
	mov	x0, x19
	bl	_mutex_unlock
	mov	w0, #0
	b	LBB0_9
LBB0_14:
	ldr	w0, [x20, #12]
Lloh16:
	adrp	x1, l_.str.3@PAGE
Lloh17:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_7
LBB0_15:
	ldr	w0, [x20, #12]
Lloh18:
	adrp	x1, l_.str.4@PAGE
Lloh19:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_7
LBB0_16:
Lloh20:
	adrp	x1, l_.str.5@PAGE
Lloh21:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_dev_dbg
	b	LBB0_8
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reset in start the mei device.\n"

	.comm	_MEI_DEV_INITIALIZING,8,3       ; @MEI_DEV_INITIALIZING
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_MEI_DEV_DISABLED,8,3           ; @MEI_DEV_DISABLED
l_.str.1:                               ; @.str.1
	.asciz	"reset failed ret = %d"

l_.str.2:                               ; @.str.2
	.asciz	"HBM haven't started"

l_.str.3:                               ; @.str.3
	.asciz	"host is not ready.\n"

l_.str.4:                               ; @.str.4
	.asciz	"ME is not ready.\n"

l_.str.5:                               ; @.str.5
	.asciz	"MEI start failed.\n"

l_.str.6:                               ; @.str.6
	.asciz	"link layer has been established.\n"

l_.str.7:                               ; @.str.7
	.asciz	"link layer initialization failed.\n"

.subsections_via_symbols
