	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_StCreateHub                    ## -- Begin function StCreateHub
	.p2align	4, 0x90
_StCreateHub:                           ## @StCreateHub
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r13
	movq	(%r13), %rax
	movq	_SERVER_TYPE_FARM_MEMBER@GOTPCREL(%rip), %r15
	movq	_ERR_NOT_FARM_CONTROLLER@GOTPCREL(%rip), %rbx
	cmpq	(%r15), %rax
	je	LBB0_3
## %bb.1:
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	8(%r13), %r14
	movl	24(%rsi), %edi
	movq	%rsi, %r12
	callq	_IsEmptyStr
	movq	_ERR_INVALID_PARAMETER@GOTPCREL(%rip), %rcx
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	%rcx, %rbx
	jmp	LBB0_3
LBB0_4:
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movl	24(%r12), %edi
	callq	_IsSafeStr
	testl	%eax, %eax
	je	LBB0_9
## %bb.5:
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	movq	(%r12), %rax
	cmpq	(%r15), %rax
	je	LBB0_3
## %bb.6:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movl	24(%r14), %edi
	callq	_Trim
	movl	24(%r14), %edi
	callq	_StrLen
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:
	movl	24(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_StartWith
	testq	%rax, %rax
	jne	LBB0_9
## %bb.11:
	movl	24(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_EndWith
	testq	%rax, %rax
	je	LBB0_13
LBB0_9:
	movq	_ERR_INVALID_PARAMETER@GOTPCREL(%rip), %rbx
LBB0_3:
	movq	(%rbx), %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	(%r12), %rcx
	cmpq	(%r15), %rcx
	movq	-72(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_3
## %bb.14:
	movq	_SERVER_TYPE_STANDALONE@GOTPCREL(%rip), %rdx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	cmpq	(%rdx), %rcx
	jne	LBB0_16
## %bb.15:
	movq	_HUB_TYPE_STANDALONE@GOTPCREL(%rip), %rcx
	jmp	LBB0_18
LBB0_16:
	movq	_HUB_TYPE_FARM_DYNAMIC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_19
## %bb.17:
	movq	_HUB_TYPE_FARM_STATIC@GOTPCREL(%rip), %rcx
LBB0_18:
	movq	_ERR_INVALID_PARAMETER@GOTPCREL(%rip), %rbx
	cmpq	(%rcx), %rax
	jne	LBB0_3
LBB0_19:
	leaq	-56(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$8, %esi
	callq	_Zero
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movl	36(%r14), %eax
	movl	%eax, -52(%rbp)
	movl	32(%r14), %eax
	movl	%eax, -56(%rbp)
	movq	%rbx, %rdi
	callq	_SiSetDefaultHubOption
	movl	(%r15), %edi
	callq	_LockList
	movl	(%r15), %edi
	callq	_LIST_NUM
	movq	%rax, %rbx
	movl	(%r15), %edi
	callq	_UnlockList
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_GetServerCapsInt
	cmpq	%rax, %rbx
	jle	LBB0_21
## %bb.20:
	movq	_ERR_TOO_MANY_HUBS@GOTPCREL(%rip), %rbx
	jmp	LBB0_3
LBB0_21:
	movl	(%r15), %edi
	callq	_LockList
	movl	24(%r14), %esi
	movq	%r15, %rdi
	callq	_IsHub
	movl	%eax, %ebx
	movl	(%r15), %edi
	callq	_UnlockList
	testl	%ebx, %ebx
	je	LBB0_23
## %bb.22:
	movq	_ERR_HUB_ALREADY_EXISTS@GOTPCREL(%rip), %rbx
	jmp	LBB0_3
LBB0_23:
	movl	24(%r14), %ecx
	leaq	L_.str.2(%rip), %rdx
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	callq	_ALog
	movl	20(%r14), %edi
	movl	$4, %esi
	callq	_IsZero
	testq	%rax, %rax
	je	LBB0_25
## %bb.24:
	movl	16(%r14), %edi
	movl	$4, %esi
	callq	_IsZero
	testq	%rax, %rax
	jne	LBB0_26
LBB0_25:
	movl	28(%r14), %edi
	callq	_StrLen
	testq	%rax, %rax
	je	LBB0_27
LBB0_26:
	movl	20(%r14), %r13d
	movl	28(%r14), %ebx
	movl	%ebx, %edi
	callq	_StrLen
	movl	%r13d, %edi
	movl	%ebx, %esi
	movq	%rax, %rdx
	callq	_Sha0
	movq	_ADMINISTRATOR_USERNAME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	16(%r14), %edi
	movl	28(%r14), %edx
	callq	_HashPassword
LBB0_27:
	movl	24(%r14), %esi
	leaq	-56(%rbp), %rdx
	movq	%r15, %rdi
	callq	_NewHub
	movq	%rax, %rbx
	movl	20(%rax), %edi
	movl	20(%r14), %esi
	movq	%r15, %r13
	movq	_SHA1_SIZE@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	callq	_Copy
	movl	16(%rbx), %edi
	movl	16(%r14), %esi
	movl	(%r15), %edx
	callq	_Copy
	movq	(%r14), %rax
	movq	%rax, (%rbx)
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_AddHub
	cmpq	$0, 8(%r14)
	je	LBB0_29
## %bb.28:
	movl	$1, 8(%rbx)
	movq	%rbx, %rdi
	callq	_SetHubOnline
	jmp	LBB0_30
LBB0_29:
	movl	$0, 8(%rbx)
	movq	%rbx, %rdi
	callq	_SetHubOffline
LBB0_30:
	xorl	%eax, %eax
	callq	_SystemTime64
	movl	%eax, 12(%rbx)
	movq	%rbx, %rdi
	callq	_ReleaseHub
	movq	%r12, %rdi
	callq	_IncrementServerConfigRevision
	movq	_ERR_NO_ERROR@GOTPCREL(%rip), %rbx
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_SERVER_TYPE_FARM_MEMBER,8,3    ## @SERVER_TYPE_FARM_MEMBER
	.comm	_ERR_NOT_FARM_CONTROLLER,8,3    ## @ERR_NOT_FARM_CONTROLLER
	.comm	_ERR_INVALID_PARAMETER,8,3      ## @ERR_INVALID_PARAMETER
	.comm	_NO_SUPPORT_FOR_BRIDGE,4,2      ## @NO_SUPPORT_FOR_BRIDGE
	.comm	_SERVER_ADMIN_ONLY,4,2          ## @SERVER_ADMIN_ONLY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"."

	.comm	_SERVER_TYPE_STANDALONE,8,3     ## @SERVER_TYPE_STANDALONE
	.comm	_HUB_TYPE_STANDALONE,8,3        ## @HUB_TYPE_STANDALONE
	.comm	_HUB_TYPE_FARM_DYNAMIC,8,3      ## @HUB_TYPE_FARM_DYNAMIC
	.comm	_HUB_TYPE_FARM_STATIC,8,3       ## @HUB_TYPE_FARM_STATIC
L_.str.1:                               ## @.str.1
	.asciz	"i_max_hubs"

	.comm	_ERR_TOO_MANY_HUBS,8,3          ## @ERR_TOO_MANY_HUBS
	.comm	_ERR_HUB_ALREADY_EXISTS,8,3     ## @ERR_HUB_ALREADY_EXISTS
L_.str.2:                               ## @.str.2
	.asciz	"LA_CREATE_HUB"

	.comm	_ADMINISTRATOR_USERNAME,4,2     ## @ADMINISTRATOR_USERNAME
	.comm	_SHA1_SIZE,4,2                  ## @SHA1_SIZE
	.comm	_ERR_NO_ERROR,8,3               ## @ERR_NO_ERROR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_StCreateHub                    ; -- Begin function StCreateHub
	.p2align	2
_StCreateHub:                           ; @StCreateHub
	.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	x19, [x0]
	ldr	x8, [x19]
Lloh0:
	adrp	x23, _SERVER_TYPE_FARM_MEMBER@GOTPAGE
Lloh1:
	ldr	x23, [x23, _SERVER_TYPE_FARM_MEMBER@GOTPAGEOFF]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_2
LBB0_1:
Lloh2:
	adrp	x8, _ERR_NOT_FARM_CONTROLLER@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ERR_NOT_FARM_CONTROLLER@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
	mov	x20, x1
	mov	x22, x0
	ldr	x21, [x19, #8]
	ldr	w0, [x1, #24]
	bl	_IsEmptyStr
	cbz	x0, LBB0_5
LBB0_3:
Lloh4:
	adrp	x8, _ERR_INVALID_PARAMETER@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ERR_INVALID_PARAMETER@GOTPAGEOFF]
LBB0_4:
	ldr	x0, [x8]
	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
LBB0_5:
	ldr	w0, [x20, #24]
	bl	_IsSafeStr
	cbz	w0, LBB0_3
; %bb.6:
	ldr	x8, [x19]
	ldr	x9, [x23]
	cmp	x8, x9
	b.eq	LBB0_1
; %bb.7:
	ldr	w0, [x20, #24]
	bl	_Trim
	ldr	w0, [x20, #24]
	bl	_StrLen
	cbz	x0, LBB0_3
; %bb.8:
	ldr	w0, [x20, #24]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_StartWith
	cbnz	x0, LBB0_3
; %bb.9:
	ldr	w0, [x20, #24]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_EndWith
	cbnz	x0, LBB0_3
; %bb.10:
	ldr	x9, [x19]
	ldr	x8, [x23]
	cmp	x9, x8
	b.eq	LBB0_1
; %bb.11:
Lloh10:
	adrp	x8, _SERVER_TYPE_STANDALONE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SERVER_TYPE_STANDALONE@GOTPAGEOFF]
Lloh12:
	ldr	x10, [x8]
	ldr	x8, [x20]
	cmp	x9, x10
	b.ne	LBB0_13
; %bb.12:
Lloh13:
	adrp	x9, _HUB_TYPE_STANDALONE@GOTPAGE
Lloh14:
	ldr	x9, [x9, _HUB_TYPE_STANDALONE@GOTPAGEOFF]
	b	LBB0_15
LBB0_13:
Lloh15:
	adrp	x9, _HUB_TYPE_FARM_DYNAMIC@GOTPAGE
Lloh16:
	ldr	x9, [x9, _HUB_TYPE_FARM_DYNAMIC@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_16
; %bb.14:
Lloh18:
	adrp	x9, _HUB_TYPE_FARM_STATIC@GOTPAGE
Lloh19:
	ldr	x9, [x9, _HUB_TYPE_FARM_STATIC@GOTPAGEOFF]
LBB0_15:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
LBB0_16:
	add	x0, sp, #8
	mov	w1, #8
	bl	_Zero
	ldr	d0, [x20, #32]
	str	d0, [sp, #8]
	add	x0, sp, #8
	bl	_SiSetDefaultHubOption
	ldr	w0, [x21]
	bl	_LockList
	ldr	w0, [x21]
	bl	_LIST_NUM
	mov	x23, x0
	ldr	w0, [x21]
	bl	_UnlockList
	ldr	x0, [x22]
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_GetServerCapsInt
	cmp	x23, x0
	b.le	LBB0_18
; %bb.17:
Lloh22:
	adrp	x8, _ERR_TOO_MANY_HUBS@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ERR_TOO_MANY_HUBS@GOTPAGEOFF]
	b	LBB0_4
LBB0_18:
	ldr	w0, [x21]
	bl	_LockList
	ldr	w1, [x20, #24]
	mov	x0, x21
	bl	_IsHub
	mov	x23, x0
	ldr	w0, [x21]
	bl	_UnlockList
	cbz	w23, LBB0_20
; %bb.19:
Lloh24:
	adrp	x8, _ERR_HUB_ALREADY_EXISTS@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ERR_HUB_ALREADY_EXISTS@GOTPAGEOFF]
	b	LBB0_4
LBB0_20:
	ldr	w3, [x20, #24]
Lloh26:
	adrp	x2, l_.str.2@PAGE
Lloh27:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x22
	mov	x1, #0
	bl	_ALog
	ldr	w0, [x20, #20]
	mov	w1, #4
	bl	_IsZero
	cbz	x0, LBB0_22
; %bb.21:
	ldr	w0, [x20, #16]
	mov	w1, #4
	bl	_IsZero
	cbnz	x0, LBB0_23
LBB0_22:
	ldr	w0, [x20, #28]
	bl	_StrLen
	cbz	x0, LBB0_24
LBB0_23:
	ldr	w22, [x20, #20]
	ldr	w23, [x20, #28]
	mov	x0, x23
	bl	_StrLen
	mov	x2, x0
	mov	x0, x22
	mov	x1, x23
	bl	_Sha0
	ldr	w0, [x20, #16]
Lloh28:
	adrp	x8, _ADMINISTRATOR_USERNAME@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ADMINISTRATOR_USERNAME@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	ldr	w2, [x20, #28]
	bl	_HashPassword
LBB0_24:
	ldr	w1, [x20, #24]
	add	x2, sp, #8
	mov	x0, x21
	bl	_NewHub
	mov	x22, x0
	ldr	w0, [x0, #20]
	ldr	w1, [x20, #20]
Lloh31:
	adrp	x23, _SHA1_SIZE@GOTPAGE
Lloh32:
	ldr	x23, [x23, _SHA1_SIZE@GOTPAGEOFF]
	ldr	w2, [x23]
	bl	_Copy
	ldr	w0, [x22, #16]
	ldr	w1, [x20, #16]
	ldr	w2, [x23]
	bl	_Copy
	ldr	x8, [x20]
	str	x8, [x22]
	mov	x0, x21
	mov	x1, x22
	bl	_AddHub
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_26
; %bb.25:
	mov	w8, #1
	str	w8, [x22, #8]
	mov	x0, x22
	bl	_SetHubOnline
	b	LBB0_27
LBB0_26:
	str	wzr, [x22, #8]
	mov	x0, x22
	bl	_SetHubOffline
LBB0_27:
	bl	_SystemTime64
	str	w0, [x22, #12]
	mov	x0, x22
	bl	_ReleaseHub
	mov	x0, x19
	bl	_IncrementServerConfigRevision
Lloh33:
	adrp	x8, _ERR_NO_ERROR@GOTPAGE
Lloh34:
	ldr	x8, [x8, _ERR_NO_ERROR@GOTPAGEOFF]
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_SERVER_TYPE_FARM_MEMBER,8,3    ; @SERVER_TYPE_FARM_MEMBER
	.comm	_ERR_NOT_FARM_CONTROLLER,8,3    ; @ERR_NOT_FARM_CONTROLLER
	.comm	_ERR_INVALID_PARAMETER,8,3      ; @ERR_INVALID_PARAMETER
	.comm	_NO_SUPPORT_FOR_BRIDGE,4,2      ; @NO_SUPPORT_FOR_BRIDGE
	.comm	_SERVER_ADMIN_ONLY,4,2          ; @SERVER_ADMIN_ONLY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"."

	.comm	_SERVER_TYPE_STANDALONE,8,3     ; @SERVER_TYPE_STANDALONE
	.comm	_HUB_TYPE_STANDALONE,8,3        ; @HUB_TYPE_STANDALONE
	.comm	_HUB_TYPE_FARM_DYNAMIC,8,3      ; @HUB_TYPE_FARM_DYNAMIC
	.comm	_HUB_TYPE_FARM_STATIC,8,3       ; @HUB_TYPE_FARM_STATIC
l_.str.1:                               ; @.str.1
	.asciz	"i_max_hubs"

	.comm	_ERR_TOO_MANY_HUBS,8,3          ; @ERR_TOO_MANY_HUBS
	.comm	_ERR_HUB_ALREADY_EXISTS,8,3     ; @ERR_HUB_ALREADY_EXISTS
l_.str.2:                               ; @.str.2
	.asciz	"LA_CREATE_HUB"

	.comm	_ADMINISTRATOR_USERNAME,4,2     ; @ADMINISTRATOR_USERNAME
	.comm	_SHA1_SIZE,4,2                  ; @SHA1_SIZE
	.comm	_ERR_NO_ERROR,8,3               ; @ERR_NO_ERROR
.subsections_via_symbols
