	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_OPENSSL_sk_insert              ## -- Begin function OPENSSL_sk_insert
	.p2align	4, 0x90
_OPENSSL_sk_insert:                     ## @OPENSSL_sk_insert
	.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
	xorl	%ebx, %ebx
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.1:
	movq	%rdi, %r15
	movl	(%rdi), %eax
	movq	_max_nodes@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_8
## %bb.2:
	movl	%edx, %r12d
	movq	%rsi, %r14
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_sk_reserve
	testl	%eax, %eax
	je	LBB0_8
## %bb.3:
	movl	(%r15), %ebx
	movq	16(%r15), %rax
	testl	%r12d, %r12d
	js	LBB0_5
## %bb.4:
	movl	%ebx, %edx
	subl	%r12d, %edx
	jle	LBB0_5
## %bb.6:
	movl	%r12d, %ebx
	leaq	(%rax,%rbx,8), %rdi
	addq	$8, %rdi
	leaq	(%rax,%rbx,8), %rsi
	shll	$3, %edx
	callq	_memmove
	movq	16(%r15), %rax
	movq	%r14, (%rax,%rbx,8)
	movl	(%r15), %ebx
	jmp	LBB0_7
LBB0_5:
	movslq	%ebx, %rcx
	movq	%r14, (%rax,%rcx,8)
LBB0_7:
	incl	%ebx
	movl	%ebx, (%r15)
	movq	$0, 8(%r15)
LBB0_8:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_max_nodes,4,2                  ## @max_nodes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_OPENSSL_sk_insert              ; -- Begin function OPENSSL_sk_insert
	.p2align	2
_OPENSSL_sk_insert:                     ; @OPENSSL_sk_insert
	.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
	cbz	x0, LBB0_9
; %bb.1:
	mov	x19, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _max_nodes@GOTPAGE
Lloh1:
	ldr	x9, [x9, _max_nodes@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_3
; %bb.2:
	mov	w0, #0
	b	LBB0_9
LBB0_3:
	mov	x21, x2
	mov	x20, x1
	mov	x0, x19
	mov	w1, #1
	mov	w2, #0
	bl	_sk_reserve
	cbz	w0, LBB0_9
; %bb.4:
	ldr	w8, [x19]
	ldr	x9, [x19, #16]
	tbnz	w21, #31, LBB0_7
; %bb.5:
	subs	w10, w8, w21
	b.le	LBB0_7
; %bb.6:
	add	w8, w21, #1
	add	x0, x9, w8, uxtw #3
	mov	w8, w21
	lsl	x21, x8, #3
	add	x1, x9, x21
	lsl	w2, w10, #3
	bl	_memmove
	ldr	x8, [x19, #16]
	str	x20, [x8, x21]
	ldr	w8, [x19]
	b	LBB0_8
LBB0_7:
	sxtw	x10, w8
	str	x20, [x9, x10, lsl #3]
LBB0_8:
	add	w0, w8, #1
	str	w0, [x19]
	str	xzr, [x19, #8]
LBB0_9:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_max_nodes,4,2                  ; @max_nodes
.subsections_via_symbols
