	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_StSetLink                      ## -- Begin function StSetLink
	.p2align	4, 0x90
_StSetLink:                             ## @StSetLink
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %rdx
	movq	(%rdx), %rax
	movq	_SERVER_TYPE_STANDALONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.2:
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	_ERR_NO_ERROR@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	8(%rdx), %rbx
	movq	%rbx, %rdi
	callq	_LockHubList
	movl	32(%r12), %esi
	movq	%rbx, %rdi
	callq	_GetHub
	movq	%rax, %r13
	movq	%rbx, %rdi
	callq	_UnlockHubList
	testq	%r13, %r13
	je	LBB0_3
## %bb.4:
	cmpl	$0, (%r14)
	je	LBB0_5
LBB0_7:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movl	(%r13), %edi
	callq	_LockList
	movl	(%r13), %edi
	callq	_LIST_NUM
	testq	%rax, %rax
	jle	LBB0_11
## %bb.8:
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %edi
	movq	%r15, %rsi
	callq	_LIST_DATA
	movq	%rax, %rbx
	movl	(%rax), %edi
	callq	_Lock
	movq	24(%rbx), %rax
	movl	24(%rax), %edi
	movq	24(%r12), %rax
	movl	4(%rax), %esi
	callq	_UniStrCmpi
	testq	%rax, %rax
	je	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	(%rbx), %edi
	callq	_Unlock
	incq	%r15
	movl	(%r13), %edi
	callq	_LIST_NUM
	cmpq	%rax, %r15
	jl	LBB0_9
LBB0_11:
	movl	(%r13), %edi
	callq	_UnlockList
	movq	%r13, %rdi
	callq	_ReleaseHub
	movq	_ERR_OBJECT_NOT_FOUND@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_15
LBB0_1:
	movq	_ERR_NOT_SUPPORTED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_15
LBB0_3:
	movq	_ERR_HUB_NOT_FOUND@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_15
LBB0_5:
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	callq	_GetHubAdminOption
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	%r13, %rdi
	callq	_ReleaseHub
	movq	_ERR_NOT_ENOUGH_RIGHT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_15
LBB0_12:
	movl	44(%rbx), %edi
	callq	_AddRef
	movl	(%rbx), %edi
	callq	_Unlock
	movl	(%r13), %edi
	callq	_UnlockList
	movq	24(%r12), %rax
	movl	4(%rax), %ecx
	leaq	L_.str.1(%rip), %rdx
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_ALog
	movl	(%rbx), %edi
	callq	_Lock
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.13:
	callq	_FreeX
	movq	$0, 8(%rbx)
LBB0_14:
	movq	24(%rbx), %rdi
	movq	24(%r12), %rsi
	movl	$4, %r14d
	movl	$4, %edx
	callq	_Copy
	movq	24(%rbx), %rax
	movl	20(%rax), %edi
	movq	_LINK_DEVICE_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$4, %esi
	callq	_StrCpy
	movq	_INFINITE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	24(%rbx), %rcx
	movl	%eax, 16(%rcx)
	movabsq	$4294967306, %rax               ## imm = 0x10000000A
	movq	%rax, (%rcx)
	movl	40(%rbx), %edi
	callq	_CiFreeClientAuth
	movl	16(%r12), %edi
	callq	_CopyClientAuth
	movl	%eax, 40(%rbx)
	movq	_NUM_POLICY_ITEM_FOR_VER2@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	shll	$3, %edx
	cmpl	$0, 8(%r12)
	leaq	8(%r12), %rsi
	movq	32(%rbx), %rdi
	cmovnel	%r14d, %edx
	callq	_Copy
	movq	24(%rbx), %rax
	movq	$1, 8(%rax)
	movl	4(%r12), %eax
	movl	%eax, 16(%rbx)
	movl	(%r12), %edi
	callq	_CloneX
	movq	%rax, 8(%rbx)
	movl	(%rbx), %edi
	callq	_Unlock
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_IncrementServerConfigRevision
	movq	%rbx, %rdi
	callq	_ReleaseLink
	movq	%r13, %rdi
	callq	_ReleaseHub
	movq	-48(%rbp), %rax                 ## 8-byte Reload
LBB0_15:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ERR_NO_ERROR,8,3               ## @ERR_NO_ERROR
	.comm	_SERVER_TYPE_STANDALONE,8,3     ## @SERVER_TYPE_STANDALONE
	.comm	_ERR_NOT_SUPPORTED,8,3          ## @ERR_NOT_SUPPORTED
	.comm	_CHECK_RIGHT,4,2                ## @CHECK_RIGHT
	.comm	_ERR_LINK_CANT_CREATE_ON_FARM,8,3 ## @ERR_LINK_CANT_CREATE_ON_FARM
	.comm	_ERR_HUB_NOT_FOUND,8,3          ## @ERR_HUB_NOT_FOUND
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no_cascade"

	.comm	_ERR_NOT_ENOUGH_RIGHT,8,3       ## @ERR_NOT_ENOUGH_RIGHT
	.comm	_ERR_OBJECT_NOT_FOUND,8,3       ## @ERR_OBJECT_NOT_FOUND
L_.str.1:                               ## @.str.1
	.asciz	"LA_SET_LINK"

	.comm	_LINK_DEVICE_NAME,4,2           ## @LINK_DEVICE_NAME
	.comm	_INFINITE,4,2                   ## @INFINITE
	.comm	_NUM_POLICY_ITEM_FOR_VER2,4,2   ## @NUM_POLICY_ITEM_FOR_VER2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function StSetLink
lCPI0_0:
	.long	10                              ; 0xa
	.long	1                               ; 0x1
lCPI0_1:
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_StSetLink
	.p2align	2
_StSetLink:                             ; @StSetLink
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	ldr	x20, [x0, #8]
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _SERVER_TYPE_STANDALONE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SERVER_TYPE_STANDALONE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.1:
	mov	x22, x1
	mov	x24, x0
Lloh3:
	adrp	x8, _ERR_NO_ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ERR_NO_ERROR@GOTPAGEOFF]
Lloh5:
	ldr	x19, [x8]
	ldr	x23, [x20, #8]
	mov	x0, x23
	bl	_LockHubList
	ldr	w1, [x22, #32]
	mov	x0, x23
	bl	_GetHub
	mov	x21, x0
	mov	x0, x23
	bl	_UnlockHubList
	cbz	x21, LBB0_9
; %bb.2:
	ldr	w8, [x24]
	cbz	w8, LBB0_10
LBB0_3:
	ldr	w0, [x21]
	bl	_LockList
	ldr	w0, [x21]
	bl	_LIST_NUM
	cmp	x0, #1
	b.lt	LBB0_7
; %bb.4:
	mov	x25, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21]
	mov	x1, x25
	bl	_LIST_DATA
	mov	x23, x0
	ldr	w0, [x0]
	bl	_Lock
	ldr	x8, [x23, #24]
	ldr	w0, [x8, #24]
	ldr	x8, [x22, #24]
	ldr	w1, [x8, #4]
	bl	_UniStrCmpi
	cbz	x0, LBB0_12
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x23]
	bl	_Unlock
	add	x25, x25, #1
	ldr	w0, [x21]
	bl	_LIST_NUM
	cmp	x25, x0
	b.lt	LBB0_5
LBB0_7:
	ldr	w0, [x21]
	bl	_UnlockList
	mov	x0, x21
	bl	_ReleaseHub
Lloh6:
	adrp	x8, _ERR_OBJECT_NOT_FOUND@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ERR_OBJECT_NOT_FOUND@GOTPAGEOFF]
Lloh8:
	ldr	x19, [x8]
	b	LBB0_15
LBB0_8:
Lloh9:
	adrp	x8, _ERR_NOT_SUPPORTED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ERR_NOT_SUPPORTED@GOTPAGEOFF]
Lloh11:
	ldr	x19, [x8]
	b	LBB0_15
LBB0_9:
Lloh12:
	adrp	x8, _ERR_HUB_NOT_FOUND@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ERR_HUB_NOT_FOUND@GOTPAGEOFF]
Lloh14:
	ldr	x19, [x8]
	b	LBB0_15
LBB0_10:
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_GetHubAdminOption
	cbz	x0, LBB0_3
; %bb.11:
	mov	x0, x21
	bl	_ReleaseHub
Lloh17:
	adrp	x8, _ERR_NOT_ENOUGH_RIGHT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ERR_NOT_ENOUGH_RIGHT@GOTPAGEOFF]
Lloh19:
	ldr	x19, [x8]
	b	LBB0_15
LBB0_12:
	ldr	w0, [x23, #44]
	bl	_AddRef
	ldr	w0, [x23]
	bl	_Unlock
	ldr	w0, [x21]
	bl	_UnlockList
	ldr	x8, [x22, #24]
	ldr	w3, [x8, #4]
Lloh20:
	adrp	x2, l_.str.1@PAGE
Lloh21:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x24
	mov	x1, x21
	bl	_ALog
	ldr	w0, [x23]
	bl	_Lock
	ldr	x0, [x23, #8]
	cbz	x0, LBB0_14
; %bb.13:
	bl	_FreeX
	str	xzr, [x23, #8]
LBB0_14:
	ldr	x0, [x23, #24]
	ldr	x1, [x22, #24]
	mov	w24, #4
	mov	w2, #4
	bl	_Copy
	ldr	x8, [x23, #24]
	ldr	w0, [x8, #20]
Lloh22:
	adrp	x8, _LINK_DEVICE_NAME@GOTPAGE
Lloh23:
	ldr	x8, [x8, _LINK_DEVICE_NAME@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
	mov	w1, #4
	bl	_StrCpy
Lloh25:
	adrp	x8, _INFINITE@GOTPAGE
Lloh26:
	ldr	x8, [x8, _INFINITE@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	ldr	x9, [x23, #24]
	str	w8, [x9, #16]
Lloh28:
	adrp	x8, lCPI0_0@PAGE
Lloh29:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x9]
	ldr	w0, [x23, #40]
	bl	_CiFreeClientAuth
	ldr	w0, [x22, #16]
	bl	_CopyClientAuth
	str	w0, [x23, #40]
	mov	x1, x22
	ldr	w8, [x1, #8]!
	ldr	x0, [x23, #32]
Lloh30:
	adrp	x9, _NUM_POLICY_ITEM_FOR_VER2@GOTPAGE
Lloh31:
	ldr	x9, [x9, _NUM_POLICY_ITEM_FOR_VER2@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
	lsl	w9, w9, #3
	cmp	w8, #0
	csel	w2, w9, w24, eq
	bl	_Copy
	ldr	x8, [x23, #24]
Lloh33:
	adrp	x9, lCPI0_1@PAGE
Lloh34:
	ldr	d0, [x9, lCPI0_1@PAGEOFF]
	str	d0, [x8, #8]
	ldp	w0, w8, [x22]
	str	w8, [x23, #16]
	bl	_CloneX
	str	x0, [x23, #8]
	ldr	w0, [x23]
	bl	_Unlock
	mov	x0, x20
	bl	_IncrementServerConfigRevision
	mov	x0, x23
	bl	_ReleaseLink
	mov	x0, x21
	bl	_ReleaseHub
LBB0_15:
	mov	x0, x19
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdr	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdr	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_ERR_NO_ERROR,8,3               ; @ERR_NO_ERROR
	.comm	_SERVER_TYPE_STANDALONE,8,3     ; @SERVER_TYPE_STANDALONE
	.comm	_ERR_NOT_SUPPORTED,8,3          ; @ERR_NOT_SUPPORTED
	.comm	_CHECK_RIGHT,4,2                ; @CHECK_RIGHT
	.comm	_ERR_LINK_CANT_CREATE_ON_FARM,8,3 ; @ERR_LINK_CANT_CREATE_ON_FARM
	.comm	_ERR_HUB_NOT_FOUND,8,3          ; @ERR_HUB_NOT_FOUND
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no_cascade"

	.comm	_ERR_NOT_ENOUGH_RIGHT,8,3       ; @ERR_NOT_ENOUGH_RIGHT
	.comm	_ERR_OBJECT_NOT_FOUND,8,3       ; @ERR_OBJECT_NOT_FOUND
l_.str.1:                               ; @.str.1
	.asciz	"LA_SET_LINK"

	.comm	_LINK_DEVICE_NAME,4,2           ; @LINK_DEVICE_NAME
	.comm	_INFINITE,4,2                   ; @INFINITE
	.comm	_NUM_POLICY_ITEM_FOR_VER2,4,2   ; @NUM_POLICY_ITEM_FOR_VER2
.subsections_via_symbols
