	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xfrm_tmpl_resolve
_xfrm_tmpl_resolve:                     ## @xfrm_tmpl_resolve
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, -52(%rbp)                 ## 4-byte Spill
	movq	%rcx, %r12
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	movl	%esi, %ebx
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_XFRM_MAX_DEPTH@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	leaq	(,%r13,8), %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	cmpl	$2, %ebx
	cmovlq	%r12, %r14
	movl	%ebx, -56(%rbp)                 ## 4-byte Spill
	testl	%ebx, %ebx
	jle	LBB0_1
## %bb.4:
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	movq	(%r15), %rdi
	movl	$0, %r15d
	cmpl	%r13d, (%rdi)
	jge	LBB0_10
## %bb.5:
	movl	-56(%rbp), %eax                 ## 4-byte Reload
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	movl	$1, %r12d
	movzwl	-52(%rbp), %r13d                ## 2-byte Folded Reload
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movslq	%ebx, %rax
	leaq	(%r14,%rax,8), %rdx
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	movl	%r13d, %ecx
	callq	_xfrm_tmpl_resolve_one
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	addl	%ebx, %r15d
	cmpq	%r12, -72(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax,%r12,8), %rdi
	movl	(%rdi), %eax
	addl	%r15d, %eax
	incq	%r12
	movl	%r15d, %ebx
	movq	_XFRM_MAX_DEPTH@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jl	LBB0_6
LBB0_10:
	movq	_ENOBUFS@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movl	%r15d, %ebx
	movl	%ecx, %r15d
LBB0_11:
	testl	%ebx, %ebx
	jle	LBB0_14
## %bb.12:
	movl	%ebx, %ebx
	incq	%rbx
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	leal	-2(%rbx), %eax
	movq	(%r14,%rax,8), %rdi
	callq	_xfrm_state_put
	decq	%rbx
	cmpq	$1, %rbx
	ja	LBB0_13
	jmp	LBB0_14
LBB0_1:
	xorl	%r15d, %r15d
	jmp	LBB0_2
LBB0_8:
	movq	-64(%rbp), %r12                 ## 8-byte Reload
LBB0_2:
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	cmpl	$2, -56(%rbp)                   ## 4-byte Folded Reload
	jl	LBB0_14
## %bb.3:
	movzwl	%ax, %ecx
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	%r15d, %edx
	callq	_xfrm_state_sort
LBB0_14:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_16
## %bb.15:
	movl	%r15d, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_XFRM_MAX_DEPTH,4,2             ## @XFRM_MAX_DEPTH
	.comm	_ENOBUFS,4,2                    ## @ENOBUFS
	.no_dead_strip	_xfrm_tmpl_resolve
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xfrm_tmpl_resolve
_xfrm_tmpl_resolve:                     ; @xfrm_tmpl_resolve
	.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
	sub	sp, sp, #16
	mov	x21, x4
	mov	x22, x3
	mov	x24, x2
	mov	x23, x1
	mov	x8, x0
Lloh0:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	stur	x9, [x29, #-88]
Lloh3:
	adrp	x26, _XFRM_MAX_DEPTH@GOTPAGE
Lloh4:
	ldr	x26, [x26, _XFRM_MAX_DEPTH@GOTPAGEOFF]
	ldr	w13, [x26]
	lsl	x12, x13, #3
	mov	x9, x12
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x12, #15
	and	x10, x10, #0xffffffff0
	sub	x9, x9, x10
	mov	sp, x9
	cmp	w1, #1
	csel	x19, x9, x3, gt
	b.lt	LBB0_6
; %bb.1:
	ldr	x0, [x8]
	ldr	w9, [x0]
	cmp	w9, w13
	b.ge	LBB0_9
; %bb.2:
	mov	w20, #0
	mov	w9, w23
	add	x27, x8, #8
	sub	x28, x9, #1
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x2, x19, w20, sxtw #3
	mov	x1, x24
	mov	x3, x21
	bl	_xfrm_tmpl_resolve_one
	mov	x25, x0
	tbnz	w0, #31, LBB0_11
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w20, w25, w20
	cbz	x28, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x26]
	ldr	x0, [x27], #8
	ldr	w9, [x0]
	sub	x28, x28, #1
	add	w9, w9, w20
	cmp	w9, w8
	b.lt	LBB0_3
	b	LBB0_10
LBB0_6:
	mov	w20, #0
LBB0_7:
	cmp	w23, #2
	b.lt	LBB0_15
; %bb.8:
	mov	x0, x22
	mov	x1, x19
	mov	x2, x20
	mov	x3, x21
	bl	_xfrm_state_sort
	b	LBB0_15
LBB0_9:
	mov	w20, #0
LBB0_10:
Lloh7:
	adrp	x8, _ENOBUFS@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOBUFS@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w25, w8
LBB0_11:
	cmp	w20, #1
	b.lt	LBB0_14
; %bb.12:
	mov	w8, w20
	add	x20, x8, #1
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	sub	w8, w20, #2
	ldr	x0, [x19, w8, uxtw #3]
	bl	_xfrm_state_put
	sub	x20, x20, #1
	cmp	x20, #1
	b.hi	LBB0_13
LBB0_14:
	mov	x20, x25
LBB0_15:
	ldur	x8, [x29, #-88]
Lloh10:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh11:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_17
; %bb.16:
	mov	x0, x20
	sub	sp, x29, #80
	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_17:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_XFRM_MAX_DEPTH,4,2             ; @XFRM_MAX_DEPTH
	.comm	_ENOBUFS,4,2                    ; @ENOBUFS
	.no_dead_strip	_xfrm_tmpl_resolve
.subsections_via_symbols
