	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mem_addkey
_mem_addkey:                            ## @mem_addkey
	.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
	movl	%ecx, %r15d
	movq	%rdx, %r12
	movl	%edi, %r14d
	movq	(%rdx), %rdi
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	movl	$-1, %ebx
	movq	%rdi, %rax
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	incl	%ebx
	cmpq	$0, (%rax)
	leaq	8(%rax), %rax
	jne	LBB0_3
	jmp	LBB0_4
LBB0_1:
	xorl	%ebx, %ebx
LBB0_4:
	leal	16(,%rbx,8), %esi
	callq	_realloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, (%r12)
	movl	%r15d, %edi
	callq	__hx509_private_key_ref
	movq	(%r12), %rcx
	movl	%ebx, %edx
	movq	%rax, (%rcx,%rdx,8)
	movq	(%r12), %rax
	movq	$0, 8(%rax,%rdx,8)
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	leaq	L_.str(%rip), %rcx
	movl	%r14d, %edi
	xorl	%esi, %esi
	callq	_hx509_set_error_string
	movl	(%rbx), %eax
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"out of memory"

	.no_dead_strip	_mem_addkey
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mem_addkey
_mem_addkey:                            ; @mem_addkey
	.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
	mov	x21, x3
	mov	x19, x2
	mov	x20, x0
	ldr	x0, [x2]
	cbz	x0, LBB0_3
; %bb.1:
	mov	w22, #-1
	mov	x8, x0
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x8], #8
	add	w22, w22, #1
	cbnz	x9, LBB0_2
	b	LBB0_4
LBB0_3:
	mov	w22, #0
LBB0_4:
	lsl	w8, w22, #3
	add	w1, w8, #16
	bl	_realloc
	cbz	x0, LBB0_6
; %bb.5:
	str	x0, [x19]
	mov	x0, x21
	bl	__hx509_private_key_ref
	mov	x8, x0
	mov	w0, #0
	ldr	x9, [x19]
	str	x8, [x9, w22, uxtw #3]
	ldr	x8, [x19]
	add	w9, w22, #1
	str	xzr, [x8, w9, uxtw #3]
	b	LBB0_7
LBB0_6:
Lloh0:
	adrp	x19, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x19, [x19, _ENOMEM@GOTPAGEOFF]
	ldr	w2, [x19]
Lloh2:
	adrp	x3, l_.str@PAGE
Lloh3:
	add	x3, x3, l_.str@PAGEOFF
	mov	x0, x20
	mov	w1, #0
	bl	_hx509_set_error_string
	ldr	w0, [x19]
LBB0_7:
	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 AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"out of memory"

	.no_dead_strip	_mem_addkey
.subsections_via_symbols
