	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ishtp_cl_link                  ## -- Begin function ishtp_cl_link
	.p2align	4, 0x90
_ishtp_cl_link:                         ## @ishtp_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	%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
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	xorl	%edi, %edi
	cmpq	$0, 24(%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), %rax
LBB0_5:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_15
LBB0_6:
	movq	24(%rbx), %r13
	leaq	16(%r13), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	(%r13), %rax
	movq	_ISHTP_MAX_OPEN_HANDLE_COUNT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_7
## %bb.8:
	movl	24(%r13), %edi
	movq	_ISHTP_CLIENTS_MAX@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	callq	_find_first_zero_bit
	cmpl	(%r15), %eax
	jge	LBB0_9
## %bb.10:
	movl	%eax, %r12d
	incq	(%r13)
	movl	%eax, (%rbx)
	leaq	20(%r13), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	8(%r13), %rax
	movq	_ISHTP_DEV_ENABLED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.12:
	leaq	8(%rbx), %rdi
	leaq	28(%r13), %rsi
	callq	_list_add_tail
	movl	24(%r13), %esi
	movl	%r12d, %edi
	callq	_set_bit
	movq	_ISHTP_CL_INITIALIZING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	xorl	%ebx, %ebx
	jmp	LBB0_13
LBB0_7:
	movq	_EMFILE@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_14
LBB0_9:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	16(%rbx), %rdi
	movl	(%r15), %edx
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_ENOENT@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_11:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_13:
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
LBB0_14:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
LBB0_15:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ISHTP_MAX_OPEN_HANDLE_COUNT,8,3 ## @ISHTP_MAX_OPEN_HANDLE_COUNT
	.comm	_EMFILE,4,2                     ## @EMFILE
	.comm	_ISHTP_CLIENTS_MAX,4,2          ## @ISHTP_CLIENTS_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"id exceeded %d"

	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_ISHTP_DEV_ENABLED,8,3          ## @ISHTP_DEV_ENABLED
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_ISHTP_CL_INITIALIZING,4,2      ## @ISHTP_CL_INITIALIZING
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ishtp_cl_link                  ; -- Begin function ishtp_cl_link
	.p2align	2
_ishtp_cl_link:                         ; @ishtp_cl_link
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	cbz	x0, LBB0_4
; %bb.1:
	ldr	x8, [x20, #24]
	cmp	x8, #0
	cset	w0, eq
	bl	_WARN_ON
	cbz	x0, LBB0_5
LBB0_2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_3:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_14
LBB0_4:
	mov	w0, #1
	bl	_WARN_ON
	cbnz	x0, LBB0_2
LBB0_5:
	ldr	x23, [x20, #24]
	add	x19, x23, #16
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	x8, [x23]
Lloh2:
	adrp	x9, _ISHTP_MAX_OPEN_HANDLE_COUNT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _ISHTP_MAX_OPEN_HANDLE_COUNT@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_9
; %bb.6:
	ldr	w0, [x23, #24]
Lloh5:
	adrp	x21, _ISHTP_CLIENTS_MAX@GOTPAGE
Lloh6:
	ldr	x21, [x21, _ISHTP_CLIENTS_MAX@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_find_first_zero_bit
	ldr	w8, [x21]
	cmp	w0, w8
	b.ge	LBB0_10
; %bb.7:
	mov	x22, x0
	ldr	x8, [x23]
	add	x8, x8, #1
	str	x8, [x23]
	str	w0, [x20]
	add	x21, x23, #20
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldr	x8, [x23, #8]
Lloh7:
	adrp	x9, _ISHTP_DEV_ENABLED@GOTPAGE
Lloh8:
	ldr	x9, [x9, _ISHTP_DEV_ENABLED@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.8:
	add	x0, x20, #8
	add	x1, x23, #28
	bl	_list_add_tail
	ldr	w1, [x23, #24]
	mov	x0, x22
	bl	_set_bit
	mov	w22, #0
Lloh10:
	adrp	x8, _ISHTP_CL_INITIALIZING@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ISHTP_CL_INITIALIZING@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	str	w8, [x20, #4]
	b	LBB0_12
LBB0_9:
Lloh13:
	adrp	x8, _EMFILE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EMFILE@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_13
LBB0_10:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	ldr	x0, [x20, #16]
	ldr	w2, [x21]
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh18:
	adrp	x8, _ENOENT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
	b	LBB0_3
LBB0_11:
Lloh20:
	adrp	x8, _ENODEV@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_12:
	mov	x0, x21
	bl	_spin_unlock_irqrestore
LBB0_13:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
LBB0_14:
	mov	x0, x22
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ISHTP_MAX_OPEN_HANDLE_COUNT,8,3 ; @ISHTP_MAX_OPEN_HANDLE_COUNT
	.comm	_EMFILE,4,2                     ; @EMFILE
	.comm	_ISHTP_CLIENTS_MAX,4,2          ; @ISHTP_CLIENTS_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"id exceeded %d"

	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_ISHTP_DEV_ENABLED,8,3          ; @ISHTP_DEV_ENABLED
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_ISHTP_CL_INITIALIZING,4,2      ; @ISHTP_CL_INITIALIZING
.subsections_via_symbols
