	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TransformPayloadToTransformSettingForIPsecSa ## -- Begin function TransformPayloadToTransformSettingForIPsecSa
	.p2align	4, 0x90
_TransformPayloadToTransformSettingForIPsecSa: ## @TransformPayloadToTransformSettingForIPsecSa
	.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
	xorl	%r15d, %r15d
	testq	%rdi, %rdi
	je	LBB0_26
## %bb.1:
	movq	%rsi, %rbx
	testq	%rsi, %rsi
	je	LBB0_26
## %bb.2:
	movq	%rdx, %r14
	testq	%rdx, %rdx
	je	LBB0_26
## %bb.3:
	testq	%rcx, %rcx
	je	LBB0_26
## %bb.4:
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %rax
	movl	(%rax), %edi
	movq	_IPSEC_PORT_IPSEC_ESP_RAW@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rcx, %rsi
	callq	_IsUdpPortOpened
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r14, %rdi
	movl	$80, %esi
	callq	_Zero
	movl	(%rbx), %eax
	movl	%eax, 56(%r14)
	movq	_IKE_TRANSFORM_VALUE_P2_HMAC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_IkeGetTransformValue
	movq	%rax, 48(%r14)
	movq	_IKE_TRANSFORM_VALUE_P2_DH_GROUP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_IkeGetTransformValue
	movq	%rax, 32(%r14)
	movq	_INFINITE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 64(%r14)
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, 72(%r14)
	movq	_IKE_TRANSFORM_VALUE_P2_LIFE_TYPE@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_IkeGetTransformValueNum
	testq	%rax, %rax
	jle	LBB0_10
## %bb.5:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	64(%rax), %rcx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	leaq	72(%rax), %r13
	xorl	%r14d, %r14d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	-72(%rbp), %r15                 ## 8-byte Reload
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	_IKE_TRANSFORM_VALUE_P2_LIFE_VALUE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_IkeGetTransformValue
	movq	%rax, (%r15)
	incq	%r14
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_IkeGetTransformValueNum
	cmpq	%rax, %r14
	jge	LBB0_10
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %esi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_IkeGetTransformValue
	movq	%r13, %r15
	cmpq	$128, %rax
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	cmpq	$129, %rax
	je	LBB0_8
	jmp	LBB0_25
LBB0_10:
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movl	(%r15), %edi
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movl	56(%r14), %edx
	movl	$1, %esi
	callq	_GetIkeCrypto
	movq	%rax, 16(%r14)
	movl	(%r15), %edi
	movq	48(%r14), %rdx
	movl	$1, %esi
	callq	_GetIkeHash
	movq	%rax, 24(%r14)
	movl	(%r15), %edi
	movq	32(%r14), %rdx
	movl	$1, %esi
	callq	_GetIkeDh
	movl	%eax, 40(%r14)
	movq	16(%r14), %rax
	testq	%rax, %rax
	je	LBB0_25
## %bb.11:
	cmpq	$0, 24(%r14)
	movl	$0, %r15d
	je	LBB0_26
## %bb.12:
	cmpq	$0, 8(%rax)
	je	LBB0_15
## %bb.13:
	movq	_IKE_TRANSFORM_VALUE_P2_KEY_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_IkeGetTransformValue
	leal	7(%rax), %ecx
	testl	%eax, %eax
	cmovsl	%ecx, %eax
	sarl	$3, %eax
	movl	%eax, (%r14)
	cmpl	$15, %ecx
	jb	LBB0_26
## %bb.14:
	movq	16(%r14), %rdi
	movl	%eax, %esi
	callq	_IkeCheckKeySize
	testl	%eax, %eax
	jne	LBB0_16
	jmp	LBB0_26
LBB0_25:
	xorl	%r15d, %r15d
LBB0_26:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movq	(%rax), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
LBB0_16:
	movq	_IKE_TRANSFORM_VALUE_P2_CAPSULE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_IkeGetTransformValue
	movq	_IKE_P2_CAPSULE_NAT_TUNNEL_1@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	je	LBB0_24
## %bb.17:
	movq	_IKE_P2_CAPSULE_NAT_TUNNEL_2@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	je	LBB0_24
## %bb.18:
	movq	_IKE_P2_CAPSULE_NAT_TRANSPORT_1@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	je	LBB0_24
## %bb.19:
	movq	_IKE_P2_CAPSULE_NAT_TRANSPORT_2@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	je	LBB0_24
## %bb.20:
	movq	_IKE_P2_CAPSULE_TRANSPORT@GOTPCREL(%rip), %rcx
	xorl	%r15d, %r15d
	cmpq	%rax, (%rcx)
	je	LBB0_22
## %bb.21:
	movq	_IKE_P2_CAPSULE_TUNNEL@GOTPCREL(%rip), %rcx
	cmpq	%rax, (%rcx)
	jne	LBB0_26
LBB0_22:
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_23
LBB0_24:
	movq	%rax, 8(%r14)
	movl	$1, %r15d
	jmp	LBB0_26
LBB0_23:
	movl	$1, 4(%r14)
	jmp	LBB0_26
	.cfi_endproc
                                        ## -- End function
	.comm	_IPSEC_PORT_IPSEC_ESP_RAW,4,2   ## @IPSEC_PORT_IPSEC_ESP_RAW
	.comm	_IKE_TRANSFORM_VALUE_P2_HMAC,4,2 ## @IKE_TRANSFORM_VALUE_P2_HMAC
	.comm	_IKE_TRANSFORM_VALUE_P2_DH_GROUP,4,2 ## @IKE_TRANSFORM_VALUE_P2_DH_GROUP
	.comm	_INFINITE,8,3                   ## @INFINITE
	.comm	_IKE_TRANSFORM_VALUE_P2_LIFE_TYPE,4,2 ## @IKE_TRANSFORM_VALUE_P2_LIFE_TYPE
	.comm	_IKE_TRANSFORM_VALUE_P2_LIFE_VALUE,4,2 ## @IKE_TRANSFORM_VALUE_P2_LIFE_VALUE
	.comm	_IKE_TRANSFORM_VALUE_P2_KEY_SIZE,4,2 ## @IKE_TRANSFORM_VALUE_P2_KEY_SIZE
	.comm	_IKE_TRANSFORM_VALUE_P2_CAPSULE,4,2 ## @IKE_TRANSFORM_VALUE_P2_CAPSULE
	.comm	_IKE_P2_CAPSULE_NAT_TUNNEL_1,8,3 ## @IKE_P2_CAPSULE_NAT_TUNNEL_1
	.comm	_IKE_P2_CAPSULE_NAT_TUNNEL_2,8,3 ## @IKE_P2_CAPSULE_NAT_TUNNEL_2
	.comm	_IKE_P2_CAPSULE_NAT_TRANSPORT_1,8,3 ## @IKE_P2_CAPSULE_NAT_TRANSPORT_1
	.comm	_IKE_P2_CAPSULE_NAT_TRANSPORT_2,8,3 ## @IKE_P2_CAPSULE_NAT_TRANSPORT_2
	.comm	_IKE_P2_CAPSULE_TRANSPORT,8,3   ## @IKE_P2_CAPSULE_TRANSPORT
	.comm	_IKE_P2_CAPSULE_TUNNEL,8,3      ## @IKE_P2_CAPSULE_TUNNEL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TransformPayloadToTransformSettingForIPsecSa ; -- Begin function TransformPayloadToTransformSettingForIPsecSa
	.p2align	2
_TransformPayloadToTransformSettingForIPsecSa: ; @TransformPayloadToTransformSettingForIPsecSa
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x0
	mov	w0, #0
	cbz	x22, LBB0_23
; %bb.1:
	mov	x21, x1
	cbz	x1, LBB0_23
; %bb.2:
	mov	x19, x2
	cbz	x2, LBB0_23
; %bb.3:
	cbz	x3, LBB0_23
; %bb.4:
	ldr	x8, [x22, #8]
	ldr	w0, [x8]
Lloh0:
	adrp	x8, _IPSEC_PORT_IPSEC_ESP_RAW@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IPSEC_PORT_IPSEC_ESP_RAW@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x1, x3
	bl	_IsUdpPortOpened
	mov	x20, x0
	mov	x0, x19
	mov	w1, #80
	bl	_Zero
	ldr	w8, [x21]
	str	w8, [x19, #56]
Lloh3:
	adrp	x8, _IKE_TRANSFORM_VALUE_P2_HMAC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IKE_TRANSFORM_VALUE_P2_HMAC@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x21
	mov	x2, #0
	bl	_IkeGetTransformValue
	str	x0, [x19, #48]
Lloh6:
	adrp	x8, _IKE_TRANSFORM_VALUE_P2_DH_GROUP@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IKE_TRANSFORM_VALUE_P2_DH_GROUP@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x21
	mov	x2, #0
	bl	_IkeGetTransformValue
Lloh9:
	adrp	x8, _INFINITE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _INFINITE@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	mov	x24, x19
	str	x8, [x24, #72]!
	stur	x0, [x24, #-40]
	mov	x25, x24
	str	x8, [x25, #-8]!
Lloh12:
	adrp	x26, _IKE_TRANSFORM_VALUE_P2_LIFE_TYPE@GOTPAGE
Lloh13:
	ldr	x26, [x26, _IKE_TRANSFORM_VALUE_P2_LIFE_TYPE@GOTPAGEOFF]
	ldr	w1, [x26]
	mov	x0, x21
	bl	_IkeGetTransformValueNum
	cmp	x0, #1
	b.lt	LBB0_10
; %bb.5:
	mov	x23, #0
Lloh14:
	adrp	x27, _IKE_TRANSFORM_VALUE_P2_LIFE_VALUE@GOTPAGE
Lloh15:
	ldr	x27, [x27, _IKE_TRANSFORM_VALUE_P2_LIFE_VALUE@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	mov	x28, x25
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	ldr	w1, [x27]
	mov	x0, x21
	mov	x2, x23
	bl	_IkeGetTransformValue
	str	x0, [x28]
	add	x23, x23, #1
	ldr	w1, [x26]
	mov	x0, x21
	bl	_IkeGetTransformValueNum
	cmp	x23, x0
	b.ge	LBB0_10
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x26]
	mov	x0, x21
	mov	x2, x23
	bl	_IkeGetTransformValue
	mov	x28, x24
	cmp	x0, #128
	b.eq	LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	cmp	x0, #129
	b.eq	LBB0_6
	b	LBB0_22
LBB0_10:
	ldr	w0, [x22]
	ldr	w2, [x19, #56]
	mov	w1, #1
	bl	_GetIkeCrypto
	str	x0, [x19, #16]
	ldr	w0, [x22]
	ldr	x2, [x19, #48]
	mov	w1, #1
	bl	_GetIkeHash
	str	x0, [x19, #24]
	ldr	w0, [x22]
	ldr	x2, [x19, #32]
	mov	w1, #1
	bl	_GetIkeDh
	str	w0, [x19, #40]
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_22
; %bb.11:
	ldr	x9, [x19, #24]
	cbz	x9, LBB0_22
; %bb.12:
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_15
; %bb.13:
Lloh16:
	adrp	x8, _IKE_TRANSFORM_VALUE_P2_KEY_SIZE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _IKE_TRANSFORM_VALUE_P2_KEY_SIZE@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x21
	mov	x2, #0
	bl	_IkeGetTransformValue
	add	w8, w0, #7
	cmp	w0, #0
	csel	w9, w8, w0, lt
	asr	w1, w9, #3
	str	w1, [x19]
	cmp	w8, #15
	b.lo	LBB0_22
; %bb.14:
	ldr	x0, [x19, #16]
	bl	_IkeCheckKeySize
	cbnz	w0, LBB0_16
	b	LBB0_23
LBB0_15:
	ldr	x8, [x8]
	ldr	w8, [x8]
	str	w8, [x19]
LBB0_16:
Lloh19:
	adrp	x8, _IKE_TRANSFORM_VALUE_P2_CAPSULE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _IKE_TRANSFORM_VALUE_P2_CAPSULE@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x21
	mov	x2, #0
	bl	_IkeGetTransformValue
Lloh22:
	adrp	x8, _IKE_P2_CAPSULE_NAT_TUNNEL_1@GOTPAGE
Lloh23:
	ldr	x8, [x8, _IKE_P2_CAPSULE_NAT_TUNNEL_1@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
	cmp	x8, x0
	b.eq	LBB0_25
; %bb.17:
Lloh25:
	adrp	x8, _IKE_P2_CAPSULE_NAT_TUNNEL_2@GOTPAGE
Lloh26:
	ldr	x8, [x8, _IKE_P2_CAPSULE_NAT_TUNNEL_2@GOTPAGEOFF]
Lloh27:
	ldr	x8, [x8]
	cmp	x8, x0
	b.eq	LBB0_25
; %bb.18:
Lloh28:
	adrp	x8, _IKE_P2_CAPSULE_NAT_TRANSPORT_1@GOTPAGE
Lloh29:
	ldr	x8, [x8, _IKE_P2_CAPSULE_NAT_TRANSPORT_1@GOTPAGEOFF]
Lloh30:
	ldr	x8, [x8]
	cmp	x8, x0
	b.eq	LBB0_25
; %bb.19:
Lloh31:
	adrp	x8, _IKE_P2_CAPSULE_NAT_TRANSPORT_2@GOTPAGE
Lloh32:
	ldr	x8, [x8, _IKE_P2_CAPSULE_NAT_TRANSPORT_2@GOTPAGEOFF]
Lloh33:
	ldr	x8, [x8]
	cmp	x8, x0
	b.eq	LBB0_25
; %bb.20:
Lloh34:
	adrp	x8, _IKE_P2_CAPSULE_TRANSPORT@GOTPAGE
Lloh35:
	ldr	x8, [x8, _IKE_P2_CAPSULE_TRANSPORT@GOTPAGEOFF]
Lloh36:
	ldr	x8, [x8]
	cmp	x8, x0
	b.eq	LBB0_24
; %bb.21:
Lloh37:
	adrp	x8, _IKE_P2_CAPSULE_TUNNEL@GOTPAGE
Lloh38:
	ldr	x8, [x8, _IKE_P2_CAPSULE_TUNNEL@GOTPAGEOFF]
Lloh39:
	ldr	x8, [x8]
	cmp	x8, x0
	b.eq	LBB0_24
LBB0_22:
	mov	w0, #0
LBB0_23:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_24:
	cbz	w20, LBB0_26
LBB0_25:
	str	x0, [x19, #8]
	mov	w0, #1
	b	LBB0_23
LBB0_26:
	mov	w0, #0
	mov	w8, #1
	str	w8, [x19, #4]
	b	LBB0_23
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_IPSEC_PORT_IPSEC_ESP_RAW,4,2   ; @IPSEC_PORT_IPSEC_ESP_RAW
	.comm	_IKE_TRANSFORM_VALUE_P2_HMAC,4,2 ; @IKE_TRANSFORM_VALUE_P2_HMAC
	.comm	_IKE_TRANSFORM_VALUE_P2_DH_GROUP,4,2 ; @IKE_TRANSFORM_VALUE_P2_DH_GROUP
	.comm	_INFINITE,8,3                   ; @INFINITE
	.comm	_IKE_TRANSFORM_VALUE_P2_LIFE_TYPE,4,2 ; @IKE_TRANSFORM_VALUE_P2_LIFE_TYPE
	.comm	_IKE_TRANSFORM_VALUE_P2_LIFE_VALUE,4,2 ; @IKE_TRANSFORM_VALUE_P2_LIFE_VALUE
	.comm	_IKE_TRANSFORM_VALUE_P2_KEY_SIZE,4,2 ; @IKE_TRANSFORM_VALUE_P2_KEY_SIZE
	.comm	_IKE_TRANSFORM_VALUE_P2_CAPSULE,4,2 ; @IKE_TRANSFORM_VALUE_P2_CAPSULE
	.comm	_IKE_P2_CAPSULE_NAT_TUNNEL_1,8,3 ; @IKE_P2_CAPSULE_NAT_TUNNEL_1
	.comm	_IKE_P2_CAPSULE_NAT_TUNNEL_2,8,3 ; @IKE_P2_CAPSULE_NAT_TUNNEL_2
	.comm	_IKE_P2_CAPSULE_NAT_TRANSPORT_1,8,3 ; @IKE_P2_CAPSULE_NAT_TRANSPORT_1
	.comm	_IKE_P2_CAPSULE_NAT_TRANSPORT_2,8,3 ; @IKE_P2_CAPSULE_NAT_TRANSPORT_2
	.comm	_IKE_P2_CAPSULE_TRANSPORT,8,3   ; @IKE_P2_CAPSULE_TRANSPORT
	.comm	_IKE_P2_CAPSULE_TUNNEL,8,3      ; @IKE_P2_CAPSULE_TUNNEL
.subsections_via_symbols
