	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mei_cl_link                    ## -- Begin function mei_cl_link
	.p2align	4, 0x90
_mei_cl_link:                           ## @mei_cl_link
	.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
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	xorl	%edi, %edi
	cmpq	$0, 16(%rbx)
	sete	%dil
	jmp	LBB0_3
LBB0_1:
	movl	$1, %edi
LBB0_3:
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
LBB0_6:
	movq	16(%rbx), %r14
	movl	4(%r14), %edi
	movq	_MEI_CLIENTS_MAX@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_find_first_zero_bit
	movl	(%r12), %edx
	cmpl	%edx, %eax
	jge	LBB0_7
## %bb.9:
	movl	%eax, %r15d
	movl	(%r14), %eax
	movq	_MEI_MAX_OPEN_HANDLE_COUNT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	cmpl	%edx, %eax
	jge	LBB0_10
## %bb.11:
	incl	%eax
	movl	%eax, (%r14)
	movl	%r15d, (%rbx)
	leaq	8(%rbx), %rdi
	leaq	8(%r14), %rsi
	callq	_list_add_tail
	movl	4(%r14), %esi
	movl	%r15d, %edi
	callq	_set_bit
	movq	_MEI_FILE_INITIALIZING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	leaq	L_.str.2(%rip), %rdx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_cl_dbg
	xorl	%eax, %eax
	jmp	LBB0_12
LBB0_7:
	movl	12(%r14), %edi
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_8
LBB0_10:
	movl	12(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
LBB0_8:
	callq	_dev_err
	movq	_EMFILE@GOTPCREL(%rip), %rcx
LBB0_5:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_12:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MEI_CLIENTS_MAX,4,2            ## @MEI_CLIENTS_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"id exceeded %d"

	.comm	_EMFILE,4,2                     ## @EMFILE
	.comm	_MEI_MAX_OPEN_HANDLE_COUNT,4,2  ## @MEI_MAX_OPEN_HANDLE_COUNT
L_.str.1:                               ## @.str.1
	.asciz	"open_handle_count exceeded %d"

	.comm	_MEI_FILE_INITIALIZING,4,2      ## @MEI_FILE_INITIALIZING
L_.str.2:                               ## @.str.2
	.asciz	"link cl\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mei_cl_link                    ; -- Begin function mei_cl_link
	.p2align	2
_mei_cl_link:                           ; @mei_cl_link
	.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
	cbz	x0, LBB0_3
; %bb.1:
	ldr	x8, [x19, #16]
	cmp	x8, #0
	cset	w0, eq
	bl	_WARN_ON
	cbz	x0, LBB0_4
LBB0_2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_10
LBB0_3:
	mov	w0, #1
	bl	_WARN_ON
	cbnz	x0, LBB0_2
LBB0_4:
	ldr	x20, [x19, #16]
	ldr	w0, [x20, #4]
Lloh2:
	adrp	x22, _MEI_CLIENTS_MAX@GOTPAGE
Lloh3:
	ldr	x22, [x22, _MEI_CLIENTS_MAX@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_find_first_zero_bit
	ldr	w2, [x22]
	cmp	w0, w2
	b.ge	LBB0_7
; %bb.5:
	ldr	w8, [x20]
Lloh4:
	adrp	x9, _MEI_MAX_OPEN_HANDLE_COUNT@GOTPAGE
Lloh5:
	ldr	x9, [x9, _MEI_MAX_OPEN_HANDLE_COUNT@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x9]
	cmp	w8, w2
	b.ge	LBB0_8
; %bb.6:
	mov	x21, x0
	add	w8, w8, #1
	str	w8, [x20]
	str	w0, [x19]
	add	x0, x19, #8
	add	x1, x20, #8
	bl	_list_add_tail
	ldr	w1, [x20, #4]
	mov	x0, x21
	bl	_set_bit
Lloh7:
	adrp	x8, _MEI_FILE_INITIALIZING@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MEI_FILE_INITIALIZING@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	str	w8, [x19, #4]
Lloh10:
	adrp	x2, l_.str.2@PAGE
Lloh11:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	x1, x19
	bl	_cl_dbg
	mov	w0, #0
	b	LBB0_11
LBB0_7:
	ldr	w0, [x20, #12]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_9
LBB0_8:
	ldr	w0, [x20, #12]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_9:
	bl	_dev_err
Lloh16:
	adrp	x8, _EMFILE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EMFILE@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	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	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MEI_CLIENTS_MAX,4,2            ; @MEI_CLIENTS_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"id exceeded %d"

	.comm	_EMFILE,4,2                     ; @EMFILE
	.comm	_MEI_MAX_OPEN_HANDLE_COUNT,4,2  ; @MEI_MAX_OPEN_HANDLE_COUNT
l_.str.1:                               ; @.str.1
	.asciz	"open_handle_count exceeded %d"

	.comm	_MEI_FILE_INITIALIZING,4,2      ; @MEI_FILE_INITIALIZING
l_.str.2:                               ; @.str.2
	.asciz	"link cl\n"

.subsections_via_symbols
