	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mei_cldev_enable               ## -- Begin function mei_cldev_enable
	.p2align	4, 0x90
_mei_cldev_enable:                      ## @mei_cldev_enable
	.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, %r15
	movq	8(%rdi), %r12
	movq	16(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	(%r12), %rax
	movq	_MEI_FILE_UNINITIALIZED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.1:
	movq	%r12, %rdi
	callq	_mei_cl_link
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.2:
	movq	%r15, 8(%r12)
LBB0_3:
	movq	%r12, %rdi
	callq	_mei_cl_is_connected
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_4
LBB0_8:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	4(%r15), %edi
	callq	_mei_me_cl_is_active
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movl	4(%r15), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_mei_cl_connect
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_8
## %bb.7:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	jmp	LBB0_8
LBB0_5:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movq	_ENOTTY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_MEI_FILE_UNINITIALIZED,8,3     ## @MEI_FILE_UNINITIALIZED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"me client is not active\n"

	.comm	_ENOTTY,4,2                     ## @ENOTTY
L_.str.1:                               ## @.str.1
	.asciz	"cannot connect\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mei_cldev_enable               ; -- Begin function mei_cldev_enable
	.p2align	2
_mei_cldev_enable:                      ; @mei_cldev_enable
	.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	x20, x0
	ldp	x21, x19, [x0, #8]
	mov	x0, x19
	bl	_mutex_lock
	ldr	x8, [x21]
Lloh0:
	adrp	x9, _MEI_FILE_UNINITIALIZED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MEI_FILE_UNINITIALIZED@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	mov	x0, x21
	bl	_mei_cl_link
	mov	x22, x0
	cbnz	w0, LBB0_5
; %bb.2:
	str	x20, [x21, #8]
LBB0_3:
	mov	x0, x21
	bl	_mei_cl_is_connected
	cbz	x0, LBB0_6
; %bb.4:
	mov	w22, #0
LBB0_5:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x22
	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
LBB0_6:
	ldr	w0, [x20, #4]
	bl	_mei_me_cl_is_active
	cbz	w0, LBB0_9
; %bb.7:
	ldr	w1, [x20, #4]
	mov	x0, x21
	mov	x2, #0
	bl	_mei_cl_connect
	mov	x22, x0
	tbz	w0, #31, LBB0_5
; %bb.8:
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	b	LBB0_5
LBB0_9:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh7:
	adrp	x8, _ENOTTY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOTTY@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_MEI_FILE_UNINITIALIZED,8,3     ; @MEI_FILE_UNINITIALIZED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"me client is not active\n"

	.comm	_ENOTTY,4,2                     ; @ENOTTY
l_.str.1:                               ; @.str.1
	.asciz	"cannot connect\n"

.subsections_via_symbols
