	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_EnableSecureNATEx              ## -- Begin function EnableSecureNATEx
	.p2align	4, 0x90
_EnableSecureNATEx:                     ## @EnableSecureNATEx
	.cfi_startproc
## %bb.0:
	testq	%rdi, %rdi
	je	LBB0_19
## %bb.1:
	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
	movl	%edx, %r15d
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	40(%rdi), %rax
	movq	(%rax), %rax
	movb	$1, %r12b
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	(%rax), %rax
	movq	_SERVER_TYPE_FARM_CONTROLLER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	movq	(%rbx), %rax
	movq	_HUB_TYPE_FARM_DYNAMIC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	setne	%r12b
LBB0_4:
	movl	16(%rbx), %edi
	callq	_Lock
	testl	%r15d, %r15d
	je	LBB0_6
## %bb.5:
	movl	8(%rbx), %r14d
	testl	%r14d, %r14d
	jne	LBB0_10
	jmp	LBB0_8
LBB0_19:
	retq
LBB0_6:
	movl	%r14d, 8(%rbx)
	testl	%r14d, %r14d
	je	LBB0_8
LBB0_10:
	testb	%r12b, %r12b
	jne	LBB0_15
## %bb.11:
	cmpq	$0, 24(%rbx)
	je	LBB0_14
## %bb.12:
	movl	32(%rbx), %edi
	callq	_LIST_NUM
	cmpl	$2, %eax
	jl	LBB0_8
## %bb.13:
	cmpq	$0, 24(%rbx)
	jne	LBB0_15
LBB0_14:
	movl	32(%rbx), %edi
	callq	_LIST_NUM
	testl	%eax, %eax
	je	LBB0_8
LBB0_15:
	cmpq	$0, 24(%rbx)
	jne	LBB0_18
## %bb.16:
	cmpl	$0, 12(%rbx)
	jne	LBB0_18
## %bb.17:
	movl	20(%rbx), %esi
	movq	%rbx, %rdi
	callq	_SnNewSecureNAT
	movq	%rax, 24(%rbx)
	jmp	LBB0_18
LBB0_8:
	movq	24(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_18
## %bb.9:
	callq	_SnFreeSecureNAT
	movq	$0, 24(%rbx)
LBB0_18:
	movl	16(%rbx), %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_Unlock                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SERVER_TYPE_FARM_CONTROLLER,8,3 ## @SERVER_TYPE_FARM_CONTROLLER
	.comm	_HUB_TYPE_FARM_DYNAMIC,8,3      ## @HUB_TYPE_FARM_DYNAMIC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_EnableSecureNATEx              ; -- Begin function EnableSecureNATEx
	.p2align	2
_EnableSecureNATEx:                     ; @EnableSecureNATEx
	.cfi_startproc
; %bb.0:
	cbz	x0, LBB0_7
; %bb.1:
	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
	.cfi_remember_state
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x0, #40]
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.2:
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _SERVER_TYPE_FARM_CONTROLLER@GOTPAGE
Lloh1:
	ldr	x9, [x9, _SERVER_TYPE_FARM_CONTROLLER@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	ldr	x8, [x19]
Lloh3:
	adrp	x9, _HUB_TYPE_FARM_DYNAMIC@GOTPAGE
Lloh4:
	ldr	x9, [x9, _HUB_TYPE_FARM_DYNAMIC@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w22, ne
	b	LBB0_5
LBB0_4:
	mov	w22, #1
LBB0_5:
	ldr	w0, [x19, #16]
	bl	_Lock
	cbz	w21, LBB0_8
; %bb.6:
	ldr	w20, [x19, #8]
	cbnz	w20, LBB0_9
	b	LBB0_17
LBB0_7:
	.cfi_def_cfa wsp, 0
	.cfi_same_value w30
	.cfi_same_value w29
	.cfi_same_value w19
	.cfi_same_value w20
	.cfi_same_value w21
	.cfi_same_value w22
	ret
LBB0_8:
	.cfi_restore_state
	str	w20, [x19, #8]
	cbz	w20, LBB0_17
LBB0_9:
	tbnz	w22, #0, LBB0_14
; %bb.10:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_13
; %bb.11:
	ldr	w0, [x19, #32]
	bl	_LIST_NUM
	cmp	w0, #2
	b.lt	LBB0_17
; %bb.12:
	ldr	x8, [x19, #24]
	cbnz	x8, LBB0_14
LBB0_13:
	ldr	w0, [x19, #32]
	bl	_LIST_NUM
	cbz	w0, LBB0_17
LBB0_14:
	ldr	x8, [x19, #24]
	cbnz	x8, LBB0_19
; %bb.15:
	ldr	w8, [x19, #12]
	cbnz	w8, LBB0_19
; %bb.16:
	ldr	w1, [x19, #20]
	mov	x0, x19
	bl	_SnNewSecureNAT
	str	x0, [x19, #24]
	b	LBB0_19
LBB0_17:
	ldr	x0, [x19, #24]
	cbz	x0, LBB0_19
; %bb.18:
	bl	_SnFreeSecureNAT
	str	xzr, [x19, #24]
LBB0_19:
	ldr	w0, [x19, #16]
	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
	b	_Unlock
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_SERVER_TYPE_FARM_CONTROLLER,8,3 ; @SERVER_TYPE_FARM_CONTROLLER
	.comm	_HUB_TYPE_FARM_DYNAMIC,8,3      ; @HUB_TYPE_FARM_DYNAMIC
.subsections_via_symbols
