	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_GetBestTransformSettingForIkeSa ## -- Begin function GetBestTransformSettingForIkeSa
	.p2align	4, 0x90
_GetBestTransformSettingForIkeSa:       ## @GetBestTransformSettingForIkeSa
	.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
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	testq	%rdi, %rdi
	je	LBB0_17
## %bb.1:
	testq	%rsi, %rsi
	je	LBB0_17
## %bb.2:
	movq	%rdx, %r14
	testq	%rdx, %rdx
	je	LBB0_17
## %bb.3:
	movl	(%rsi), %edi
	movq	_IKE_PAYLOAD_SA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r15d, %r15d
	xorl	%edx, %edx
	callq	_IkeGetPayload
	testq	%rax, %rax
	je	LBB0_17
## %bb.4:
	movq	%rax, %rbx
	movl	24(%rax), %edi
	movq	_IKE_PAYLOAD_PROPOSAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_IkeGetPayloadNum
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	jle	LBB0_17
## %bb.5:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_6 Depth=1
	incq	%r13
	cmpq	-72(%rbp), %r13                 ## 8-byte Folded Reload
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_16
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
	movl	24(%rbx), %edi
	movq	_IKE_PAYLOAD_PROPOSAL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdx
	callq	_IkeGetPayload
	testq	%rax, %rax
	movq	_IKE_PAYLOAD_TRANSFORM@GOTPCREL(%rip), %rbx
	je	LBB0_15
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%rax, %r14
	movq	8(%rax), %rax
	movq	_IKE_PROTOCOL_ID_IKE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	16(%r14), %edi
	movl	(%rbx), %esi
	callq	_IkeGetPayloadNum
	testq	%rax, %rax
	jle	LBB0_15
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%rax, %r12
	xorl	%r15d, %r15d
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_10 Depth=2
	incq	%r15
	cmpq	%r15, %r12
	je	LBB0_15
LBB0_10:                                ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	16(%r14), %edi
	movl	(%rbx), %esi
	movq	%r15, %rdx
	callq	_IkeGetPayload
	testq	%rax, %rax
	je	LBB0_14
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=2
	movq	(%rax), %rcx
	movq	_IKE_TRANSFORM_ID_P1_KEY_IKE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=2
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	%rax, %rsi
	leaq	-44(%rbp), %rdx
	callq	_TransformPayloadToTransformSettingForIkeSa
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	leaq	-44(%rbp), %rsi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	$4, %edx
	callq	_Copy
	movl	$1, %r15d
	jmp	LBB0_17
LBB0_16:
	xorl	%r15d, %r15d
LBB0_17:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IKE_PAYLOAD_SA,4,2             ## @IKE_PAYLOAD_SA
	.comm	_IKE_PAYLOAD_PROPOSAL,4,2       ## @IKE_PAYLOAD_PROPOSAL
	.comm	_IKE_PROTOCOL_ID_IKE,8,3        ## @IKE_PROTOCOL_ID_IKE
	.comm	_IKE_PAYLOAD_TRANSFORM,4,2      ## @IKE_PAYLOAD_TRANSFORM
	.comm	_IKE_TRANSFORM_ID_P1_KEY_IKE,8,3 ## @IKE_TRANSFORM_ID_P1_KEY_IKE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_GetBestTransformSettingForIkeSa ; -- Begin function GetBestTransformSettingForIkeSa
	.p2align	2
_GetBestTransformSettingForIkeSa:       ; @GetBestTransformSettingForIkeSa
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x0
	mov	w0, #0
	cbz	x20, LBB0_17
; %bb.1:
	cbz	x1, LBB0_17
; %bb.2:
	mov	x19, x2
	cbz	x2, LBB0_17
; %bb.3:
	ldr	w0, [x1]
Lloh0:
	adrp	x8, _IKE_PAYLOAD_SA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IKE_PAYLOAD_SA@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x2, #0
	bl	_IkeGetPayload
	cbz	x0, LBB0_17
; %bb.4:
	mov	x21, x0
	ldr	w0, [x0, #24]
Lloh3:
	adrp	x27, _IKE_PAYLOAD_PROPOSAL@GOTPAGE
Lloh4:
	ldr	x27, [x27, _IKE_PAYLOAD_PROPOSAL@GOTPAGEOFF]
	ldr	w1, [x27]
	bl	_IkeGetPayloadNum
	cmp	x0, #1
	b.lt	LBB0_16
; %bb.5:
	mov	x22, x0
	str	x19, [sp]                       ; 8-byte Folded Spill
	mov	x23, #0
Lloh5:
	adrp	x28, _IKE_PAYLOAD_TRANSFORM@GOTPAGE
Lloh6:
	ldr	x28, [x28, _IKE_PAYLOAD_TRANSFORM@GOTPAGEOFF]
Lloh7:
	adrp	x19, _IKE_TRANSFORM_ID_P1_KEY_IKE@GOTPAGE
Lloh8:
	ldr	x19, [x19, _IKE_TRANSFORM_ID_P1_KEY_IKE@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x23, x23, #1
	cmp	x23, x22
	b.eq	LBB0_16
LBB0_7:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_12 Depth 2
	ldr	w0, [x21, #24]
	ldr	w1, [x27]
	mov	x2, x23
	bl	_IkeGetPayload
	cbz	x0, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x24, x0
	ldr	x8, [x0, #8]
Lloh9:
	adrp	x9, _IKE_PROTOCOL_ID_IKE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _IKE_PROTOCOL_ID_IKE@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w0, [x24, #16]
	ldr	w1, [x28]
	bl	_IkeGetPayloadNum
	cmp	x0, #1
	b.lt	LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x25, x0
	mov	x26, #0
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=2
	add	x26, x26, #1
	cmp	x25, x26
	b.eq	LBB0_6
LBB0_12:                                ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x24, #16]
	ldr	w1, [x28]
	mov	x2, x26
	bl	_IkeGetPayload
	cbz	x0, LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=2
	mov	x1, x0
	ldr	x8, [x0]
	ldr	x9, [x19]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=2
	add	x2, sp, #12
	mov	x0, x20
	bl	_TransformPayloadToTransformSettingForIkeSa
	cbz	x0, LBB0_11
; %bb.15:
	add	x1, sp, #12
	ldr	x0, [sp]                        ; 8-byte Folded Reload
	mov	w2, #4
	bl	_Copy
	mov	w0, #1
	b	LBB0_17
LBB0_16:
	mov	w0, #0
LBB0_17:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_IKE_PAYLOAD_SA,4,2             ; @IKE_PAYLOAD_SA
	.comm	_IKE_PAYLOAD_PROPOSAL,4,2       ; @IKE_PAYLOAD_PROPOSAL
	.comm	_IKE_PROTOCOL_ID_IKE,8,3        ; @IKE_PROTOCOL_ID_IKE
	.comm	_IKE_PAYLOAD_TRANSFORM,4,2      ; @IKE_PAYLOAD_TRANSFORM
	.comm	_IKE_TRANSFORM_ID_P1_KEY_IKE,8,3 ; @IKE_TRANSFORM_ID_P1_KEY_IKE
.subsections_via_symbols
