	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_StEnableSecureNAT              ## -- Begin function StEnableSecureNAT
	.p2align	4, 0x90
_StEnableSecureNAT:                     ## @StEnableSecureNAT
	.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	%rsi, %r12
	movq	%rdi, %r15
	movq	8(%rdi), %r14
	movq	8(%r14), %rbx
	movq	%rbx, %rdi
	callq	_LockHubList
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_GetHub
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_UnlockHubList
	testq	%r12, %r12
	je	LBB0_1
## %bb.2:
	movq	(%r12), %rax
	movq	_HUB_TYPE_FARM_STATIC@GOTPCREL(%rip), %rcx
	movq	_ERR_NOT_SUPPORTED@GOTPCREL(%rip), %rbx
	cmpq	(%rcx), %rax
	je	LBB0_10
## %bb.3:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_GetServerCapsBool
	testl	%eax, %eax
	je	LBB0_10
## %bb.4:
	movq	(%r14), %rax
	movq	_SERVER_TYPE_FARM_MEMBER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.5:
	movq	_ERR_NOT_FARM_CONTROLLER@GOTPCREL(%rip), %rbx
	jmp	LBB0_10
LBB0_1:
	movq	_ERR_HUB_NOT_FOUND@GOTPCREL(%rip), %rbx
	jmp	LBB0_11
LBB0_6:
	cmpl	$0, (%r15)
	je	LBB0_7
LBB0_9:
	leaq	L_.str.2(%rip), %rdx
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_ALog
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_EnableSecureNAT
	incl	8(%r12)
	movq	%r12, %rdi
	callq	_SiHubUpdateProc
	movq	%r14, %rdi
	callq	_IncrementServerConfigRevision
	movq	_ERR_NO_ERROR@GOTPCREL(%rip), %rbx
	jmp	LBB0_10
LBB0_7:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	callq	_GetHubAdminOption
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	_ERR_NOT_ENOUGH_RIGHT@GOTPCREL(%rip), %rbx
LBB0_10:
	movq	%r12, %rdi
	callq	_ReleaseHub
LBB0_11:
	movl	(%rbx), %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CHECK_RIGHT,4,2                ## @CHECK_RIGHT
	.comm	_ERR_HUB_NOT_FOUND,4,2          ## @ERR_HUB_NOT_FOUND
	.comm	_HUB_TYPE_FARM_STATIC,8,3       ## @HUB_TYPE_FARM_STATIC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"b_support_securenat"

	.comm	_ERR_NOT_SUPPORTED,4,2          ## @ERR_NOT_SUPPORTED
	.comm	_SERVER_TYPE_FARM_MEMBER,8,3    ## @SERVER_TYPE_FARM_MEMBER
	.comm	_ERR_NOT_FARM_CONTROLLER,4,2    ## @ERR_NOT_FARM_CONTROLLER
L_.str.1:                               ## @.str.1
	.asciz	"no_securenat"

	.comm	_ERR_NOT_ENOUGH_RIGHT,4,2       ## @ERR_NOT_ENOUGH_RIGHT
L_.str.2:                               ## @.str.2
	.asciz	"LA_ENABLE_SNAT"

	.comm	_ERR_NO_ERROR,4,2               ## @ERR_NO_ERROR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_StEnableSecureNAT              ; -- Begin function StEnableSecureNAT
	.p2align	2
_StEnableSecureNAT:                     ; @StEnableSecureNAT
	.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, x1
	mov	x21, x0
	ldr	x20, [x0, #8]
	ldr	x22, [x20, #8]
	mov	x0, x22
	bl	_LockHubList
	ldr	w1, [x19]
	mov	x0, x22
	bl	_GetHub
	mov	x19, x0
	mov	x0, x22
	bl	_UnlockHubList
	cbz	x19, LBB0_7
; %bb.1:
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _HUB_TYPE_FARM_STATIC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _HUB_TYPE_FARM_STATIC@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_5
; %bb.2:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_GetServerCapsBool
	cbz	w0, LBB0_5
; %bb.3:
	ldr	x8, [x20]
Lloh5:
	adrp	x9, _SERVER_TYPE_FARM_MEMBER@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SERVER_TYPE_FARM_MEMBER@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.4:
Lloh8:
	adrp	x20, _ERR_NOT_FARM_CONTROLLER@GOTPAGE
Lloh9:
	ldr	x20, [x20, _ERR_NOT_FARM_CONTROLLER@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh10:
	adrp	x20, _ERR_NOT_SUPPORTED@GOTPAGE
Lloh11:
	ldr	x20, [x20, _ERR_NOT_SUPPORTED@GOTPAGEOFF]
LBB0_6:
	mov	x0, x19
	bl	_ReleaseHub
	b	LBB0_8
LBB0_7:
Lloh12:
	adrp	x20, _ERR_HUB_NOT_FOUND@GOTPAGE
Lloh13:
	ldr	x20, [x20, _ERR_HUB_NOT_FOUND@GOTPAGEOFF]
LBB0_8:
	ldr	w0, [x20]
	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
LBB0_9:
	ldr	w8, [x21]
	cbz	w8, LBB0_11
LBB0_10:
Lloh14:
	adrp	x2, l_.str.2@PAGE
Lloh15:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x21
	mov	x1, x19
	bl	_ALog
	mov	x0, x19
	mov	w1, #1
	bl	_EnableSecureNAT
	ldr	w8, [x19, #8]
	add	w8, w8, #1
	str	w8, [x19, #8]
	mov	x0, x19
	bl	_SiHubUpdateProc
	mov	x0, x20
	bl	_IncrementServerConfigRevision
Lloh16:
	adrp	x20, _ERR_NO_ERROR@GOTPAGE
Lloh17:
	ldr	x20, [x20, _ERR_NO_ERROR@GOTPAGEOFF]
	b	LBB0_6
LBB0_11:
Lloh18:
	adrp	x1, l_.str.1@PAGE
Lloh19:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_GetHubAdminOption
	cbz	x0, LBB0_10
; %bb.12:
Lloh20:
	adrp	x20, _ERR_NOT_ENOUGH_RIGHT@GOTPAGE
Lloh21:
	ldr	x20, [x20, _ERR_NOT_ENOUGH_RIGHT@GOTPAGEOFF]
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_CHECK_RIGHT,4,2                ; @CHECK_RIGHT
	.comm	_ERR_HUB_NOT_FOUND,4,2          ; @ERR_HUB_NOT_FOUND
	.comm	_HUB_TYPE_FARM_STATIC,8,3       ; @HUB_TYPE_FARM_STATIC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"b_support_securenat"

	.comm	_ERR_NOT_SUPPORTED,4,2          ; @ERR_NOT_SUPPORTED
	.comm	_SERVER_TYPE_FARM_MEMBER,8,3    ; @SERVER_TYPE_FARM_MEMBER
	.comm	_ERR_NOT_FARM_CONTROLLER,4,2    ; @ERR_NOT_FARM_CONTROLLER
l_.str.1:                               ; @.str.1
	.asciz	"no_securenat"

	.comm	_ERR_NOT_ENOUGH_RIGHT,4,2       ; @ERR_NOT_ENOUGH_RIGHT
l_.str.2:                               ; @.str.2
	.asciz	"LA_ENABLE_SNAT"

	.comm	_ERR_NO_ERROR,4,2               ; @ERR_NO_ERROR
.subsections_via_symbols
