	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_certificate_copy               ## -- Begin function certificate_copy
	.p2align	4, 0x90
_certificate_copy:                      ## @certificate_copy
	.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
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %ebx
	movq	%rdi, %r15
	movq	$0, -48(%rbp)
	movq	_context@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	leaq	-56(%rbp), %rsi
	callq	_hx509_lock_init
	movq	-56(%rbp), %rdi
	leaq	4(%r15), %rsi
	callq	_lock_strings
	cmpl	$0, (%r15)
	je	LBB0_3
## %bb.1:
	movl	(%r12), %edi
	leaq	-48(%rbp), %rsi
	callq	_hx509_lock_init
	movq	-48(%rbp), %rdi
	movl	(%r15), %esi
	callq	_hx509_lock_command_string
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	(%r15), %edx
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	movl	%eax, %ecx
	callq	_errx
LBB0_3:
	movl	(%r12), %edi
	movslq	%ebx, %rax
	movq	-8(%r14,%rax,8), %rsi
	movq	_HX509_CERTS_CREATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-56(%rbp), %rcx
	leaq	-36(%rbp), %r8
	callq	_hx509_certs_init
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	(%r12), %edi
	leaq	L_.str.1(%rip), %rcx
	movl	$1, %esi
	movl	%eax, %edx
	callq	_hx509_err
LBB0_5:
	cmpl	$2, %ebx
	jl	LBB0_10
## %bb.6:
	incl	%ebx
	leaq	L_.str.2(%rip), %r15
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	addq	$8, %r14
	decl	%ebx
	cmpl	$2, %ebx
	jbe	LBB0_10
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	movl	-36(%rbp), %esi
	movq	-56(%rbp), %rdx
	movq	(%r14), %rcx
	callq	_hx509_certs_append
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	(%r12), %edi
	movl	$1, %esi
	movl	%eax, %edx
	movq	%r15, %rcx
	callq	_hx509_err
	jmp	LBB0_9
LBB0_10:
	movl	(%r12), %edi
	movl	-36(%rbp), %esi
	movq	-48(%rbp), %rcx
	xorl	%edx, %edx
	callq	_hx509_certs_store
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	movl	(%r12), %edi
	leaq	L_.str.3(%rip), %rcx
	movl	$1, %esi
	movl	%eax, %edx
	callq	_hx509_err
LBB0_12:
	leaq	-36(%rbp), %rdi
	callq	_hx509_certs_free
	movq	-56(%rbp), %rdi
	callq	_hx509_lock_free
	movq	-48(%rbp), %rdi
	callq	_hx509_lock_free
	xorl	%eax, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_context,4,2                    ## @context
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hx509_lock_command_string: %s: %d"

	.comm	_HX509_CERTS_CREATE,4,2         ## @HX509_CERTS_CREATE
L_.str.1:                               ## @.str.1
	.asciz	"hx509_certs_init"

L_.str.2:                               ## @.str.2
	.asciz	"hx509_certs_append"

L_.str.3:                               ## @.str.3
	.asciz	"hx509_certs_store"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_certificate_copy               ; -- Begin function certificate_copy
	.p2align	2
_certificate_copy:                      ; @certificate_copy
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x2
	mov	x20, x1
	mov	x21, x0
	str	xzr, [sp, #8]
Lloh0:
	adrp	x22, _context@GOTPAGE
Lloh1:
	ldr	x22, [x22, _context@GOTPAGEOFF]
	ldr	w0, [x22]
	add	x1, sp, #16
	bl	_hx509_lock_init
	ldr	x0, [sp, #16]
	add	x1, x21, #4
	bl	_lock_strings
	ldr	w8, [x21]
	cbz	w8, LBB0_3
; %bb.1:
	ldr	w0, [x22]
	add	x1, sp, #8
	bl	_hx509_lock_init
	ldr	x0, [sp, #8]
	ldr	w1, [x21]
	bl	_hx509_lock_command_string
	cbz	w0, LBB0_3
; %bb.2:
	mov	x3, x0
	ldr	w2, [x21]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_3:
	ldr	w0, [x22]
	sub	w8, w20, #1
	ldr	x1, [x19, w8, sxtw #3]
Lloh4:
	adrp	x8, _HX509_CERTS_CREATE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _HX509_CERTS_CREATE@GOTPAGEOFF]
Lloh6:
	ldr	w2, [x8]
	ldr	x3, [sp, #16]
	add	x4, sp, #28
	bl	_hx509_certs_init
	cbz	w0, LBB0_5
; %bb.4:
	mov	x2, x0
	ldr	w0, [x22]
Lloh7:
	adrp	x3, l_.str.1@PAGE
Lloh8:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	w1, #1
	bl	_hx509_err
LBB0_5:
	cmp	w20, #2
	b.lt	LBB0_10
; %bb.6:
	add	w21, w20, #1
Lloh9:
	adrp	x20, l_.str.2@PAGE
Lloh10:
	add	x20, x20, l_.str.2@PAGEOFF
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	x19, x19, #8
	sub	w21, w21, #1
	cmp	w21, #2
	b.ls	LBB0_10
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x22]
	ldr	w1, [sp, #28]
	ldr	x2, [sp, #16]
	ldr	x3, [x19]
	bl	_hx509_certs_append
	cbz	w0, LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x2, x0
	ldr	w0, [x22]
	mov	w1, #1
	mov	x3, x20
	bl	_hx509_err
	b	LBB0_7
LBB0_10:
	ldr	w0, [x22]
	ldr	w1, [sp, #28]
	ldr	x3, [sp, #8]
	mov	w2, #0
	bl	_hx509_certs_store
	cbz	w0, LBB0_12
; %bb.11:
	mov	x2, x0
	ldr	w0, [x22]
Lloh11:
	adrp	x3, l_.str.3@PAGE
Lloh12:
	add	x3, x3, l_.str.3@PAGEOFF
	mov	w1, #1
	bl	_hx509_err
LBB0_12:
	add	x0, sp, #28
	bl	_hx509_certs_free
	ldr	x0, [sp, #16]
	bl	_hx509_lock_free
	ldr	x0, [sp, #8]
	bl	_hx509_lock_free
	mov	w0, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_context,4,2                    ; @context
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hx509_lock_command_string: %s: %d"

	.comm	_HX509_CERTS_CREATE,4,2         ; @HX509_CERTS_CREATE
l_.str.1:                               ; @.str.1
	.asciz	"hx509_certs_init"

l_.str.2:                               ; @.str.2
	.asciz	"hx509_certs_append"

l_.str.3:                               ; @.str.3
	.asciz	"hx509_certs_store"

.subsections_via_symbols
