	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mei_ioctl_connect_client
_mei_ioctl_connect_client:              ## @mei_ioctl_connect_client
	.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
	movq	8(%r12), %rbx
	movq	(%rbx), %rax
	movq	_MEI_DEV_ENABLED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.3:
	movq	%rdi, %r15
	movq	(%r12), %rax
	movq	_MEI_FILE_INITIALIZING@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.4:
	movq	_MEI_FILE_DISCONNECTED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.5:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_14
LBB0_6:
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	leaq	8(%rsi), %r13
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_mei_me_cl_by_uuid
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_7
## %bb.9:
	cmpq	$0, 8(%r14)
	je	LBB0_12
## %bb.10:
	xorl	%eax, %eax
	cmpq	$0, 24(%rbx)
	setne	%al
	cmpl	$0, 12(%rbx,%rax,4)
	je	LBB0_11
LBB0_12:
	movl	8(%rbx), %edi
	movl	16(%r14), %edx
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	8(%rbx), %edi
	movl	(%r14), %edx
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	8(%rbx), %edi
	movl	4(%r14), %edx
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	movl	4(%r14), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, 4(%rcx)
	movl	(%r14), %eax
	movl	%eax, (%rcx)
	movl	8(%rbx), %edi
	leaq	L_.str.5(%rip), %rsi
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	%r12, %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_mei_cl_connect
	movl	%eax, %ebx
	jmp	LBB0_13
LBB0_7:
	movl	8(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_8
LBB0_11:
	movl	8(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
LBB0_8:
	xorl	%ebx, %ebx
	movq	%r13, %rdx
	xorl	%eax, %eax
	callq	_dev_dbg
	movq	_ENOTTY@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_13:
	movq	%r14, %rdi
	callq	_mei_me_cl_put
LBB0_14:
	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_DEV_ENABLED,8,3            ## @MEI_DEV_ENABLED
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_MEI_FILE_INITIALIZING,8,3      ## @MEI_FILE_INITIALIZING
	.comm	_MEI_FILE_DISCONNECTED,8,3      ## @MEI_FILE_DISCONNECTED
	.comm	_EBUSY,4,2                      ## @EBUSY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot connect to FW Client UUID = %pUl\n"

	.comm	_ENOTTY,4,2                     ## @ENOTTY
L_.str.1:                               ## @.str.1
	.asciz	"Connection forbidden to FW Client UUID = %pUl\n"

L_.str.2:                               ## @.str.2
	.asciz	"Connect to FW Client ID = %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"FW Client - Protocol Version = %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"FW Client - Max Msg Len = %d\n"

L_.str.5:                               ## @.str.5
	.asciz	"Can connect?\n"

	.no_dead_strip	_mei_ioctl_connect_client
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mei_ioctl_connect_client
_mei_ioctl_connect_client:              ; @mei_ioctl_connect_client
	.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
	ldr	x21, [x0]
	ldr	x22, [x21, #8]
	ldr	x8, [x22]
Lloh0:
	adrp	x9, _MEI_DEV_ENABLED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MEI_DEV_ENABLED@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.1:
	ldr	x8, [x21]
Lloh3:
	adrp	x9, _MEI_FILE_INITIALIZING@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MEI_FILE_INITIALIZING@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
Lloh6:
	adrp	x10, _MEI_FILE_DISCONNECTED@GOTPAGE
Lloh7:
	ldr	x10, [x10, _MEI_FILE_DISCONNECTED@GOTPAGEOFF]
Lloh8:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_7
; %bb.2:
	mov	x23, x1
	mov	x20, x0
	add	x24, x1, #8
	mov	x0, x22
	mov	x1, x24
	bl	_mei_me_cl_by_uuid
	mov	x19, x0
	cbz	x0, LBB0_9
; %bb.3:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_5
; %bb.4:
	ldr	x8, [x22, #24]
	mov	w9, #16
	mov	w10, #12
	cmp	x8, #0
	csel	x8, x10, x9, eq
	ldr	w8, [x22, x8]
	cbz	w8, LBB0_10
LBB0_5:
	ldr	w0, [x22, #8]
	ldr	w8, [x19, #16]
	str	x8, [sp]
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_dbg
	ldr	w0, [x22, #8]
	ldr	w8, [x19]
	str	x8, [sp]
Lloh11:
	adrp	x1, l_.str.3@PAGE
Lloh12:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_dbg
	ldr	w0, [x22, #8]
	ldr	w8, [x19, #4]
	str	x8, [sp]
Lloh13:
	adrp	x1, l_.str.4@PAGE
Lloh14:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_dbg
	ldr	d0, [x19]
	str	d0, [x23]
	ldr	w0, [x22, #8]
Lloh15:
	adrp	x1, l_.str.5@PAGE
Lloh16:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_dev_dbg
	mov	x0, x21
	mov	x1, x19
	mov	x2, x20
	bl	_mei_cl_connect
	mov	x20, x0
	b	LBB0_12
LBB0_6:
Lloh17:
	adrp	x8, _ENODEV@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh19:
	adrp	x8, _EBUSY@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_13
LBB0_9:
	ldr	w0, [x22, #8]
	str	x24, [sp]
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_11
LBB0_10:
	ldr	w0, [x22, #8]
	str	x24, [sp]
Lloh23:
	adrp	x1, l_.str.1@PAGE
Lloh24:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_11:
	bl	_dev_dbg
Lloh25:
	adrp	x8, _ENOTTY@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENOTTY@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_12:
	mov	x0, x19
	bl	_mei_me_cl_put
LBB0_13:
	mov	x0, x20
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_MEI_DEV_ENABLED,8,3            ; @MEI_DEV_ENABLED
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_MEI_FILE_INITIALIZING,8,3      ; @MEI_FILE_INITIALIZING
	.comm	_MEI_FILE_DISCONNECTED,8,3      ; @MEI_FILE_DISCONNECTED
	.comm	_EBUSY,4,2                      ; @EBUSY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot connect to FW Client UUID = %pUl\n"

	.comm	_ENOTTY,4,2                     ; @ENOTTY
l_.str.1:                               ; @.str.1
	.asciz	"Connection forbidden to FW Client UUID = %pUl\n"

l_.str.2:                               ; @.str.2
	.asciz	"Connect to FW Client ID = %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"FW Client - Protocol Version = %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"FW Client - Max Msg Len = %d\n"

l_.str.5:                               ; @.str.5
	.asciz	"Can connect?\n"

	.no_dead_strip	_mei_ioctl_connect_client
.subsections_via_symbols
