	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sshkey_cert_copy               ## -- Begin function sshkey_cert_copy
	.p2align	4, 0x90
_sshkey_cert_copy:                      ## @sshkey_cert_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	(%rsi), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	callq	_cert_free
	movq	$0, (%rbx)
LBB0_2:
	movq	(%r14), %r15
	testq	%r15, %r15
	je	LBB0_15
## %bb.3:
	xorl	%eax, %eax
	callq	_cert_new
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_9
## %bb.4:
	movq	%rax, %r14
	movq	%rax, %r12
	movl	56(%r14), %edi
	movl	56(%r15), %esi
	callq	_sshbuf_putb
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_17
## %bb.5:
	movl	52(%r12), %edi
	movl	52(%r15), %esi
	callq	_sshbuf_putb
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_17
## %bb.6:
	movl	48(%r12), %edi
	movl	48(%r15), %esi
	callq	_sshbuf_putb
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_17
## %bb.7:
	movl	44(%r15), %eax
	movl	%eax, 44(%r12)
	movl	40(%r15), %eax
	movl	%eax, 40(%r12)
	movq	32(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.8:
	callq	_strdup
	movq	%rax, 32(%r12)
	testq	%rax, %rax
	jne	LBB0_11
LBB0_9:
	movq	_SSH_ERR_ALLOC_FAIL@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_10:
	movq	$0, 32(%r12)
LBB0_11:
	movl	28(%r15), %eax
	movl	%eax, 28(%r12)
	movl	24(%r15), %eax
	movl	%eax, 24(%r12)
	movq	16(%r15), %rdi
	addq	$16, %r14
	testq	%rdi, %rdi
	je	LBB0_13
## %bb.12:
	movq	%r14, %rsi
	callq	_sshkey_from_private
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_17
	jmp	LBB0_14
LBB0_13:
	movq	$0, (%r14)
LBB0_14:
	movq	(%r15), %rdi
	movq	_SSHKEY_CERT_MAX_PRINCIPALS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jbe	LBB0_18
LBB0_15:
	movq	_SSH_ERR_INVALID_ARGUMENT@GOTPCREL(%rip), %rax
LBB0_16:
	movl	(%rax), %ebx
LBB0_17:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	xorl	%ebx, %ebx
	testq	%rdi, %rdi
	je	LBB0_25
## %bb.19:
	movl	$8, %esi
	callq	_calloc
	movq	%rax, 8(%r12)
	testq	%rax, %rax
	je	LBB0_9
## %bb.20:
	movq	(%r15), %r14
	testq	%r14, %r14
	je	LBB0_25
## %bb.21:
	xorl	%r13d, %r13d
LBB0_22:                                ## =>This Inner Loop Header: Depth=1
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	8(%r15), %rcx
	movq	(%rcx,%r13,8), %rdi
	callq	_strdup
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx,%r13,8)
	movq	8(%r12), %rax
	cmpq	$0, (%rax,%r13,8)
	je	LBB0_27
## %bb.23:                              ##   in Loop: Header=BB0_22 Depth=1
	incq	%r13
	cmpq	%r13, %r14
	jne	LBB0_22
	jmp	LBB0_26
LBB0_25:
	xorl	%r14d, %r14d
LBB0_26:
	movq	%r14, (%r12)
	jmp	LBB0_17
LBB0_27:
	movq	%r13, (%r12)
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_SSH_ERR_INTERNAL_ERROR,4,2     ## @SSH_ERR_INTERNAL_ERROR
	.comm	_SSH_ERR_INVALID_ARGUMENT,4,2   ## @SSH_ERR_INVALID_ARGUMENT
	.comm	_SSH_ERR_ALLOC_FAIL,4,2         ## @SSH_ERR_ALLOC_FAIL
	.comm	_SSHKEY_CERT_MAX_PRINCIPALS,8,3 ## @SSHKEY_CERT_MAX_PRINCIPALS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sshkey_cert_copy               ; -- Begin function sshkey_cert_copy
	.p2align	2
_sshkey_cert_copy:                      ; @sshkey_cert_copy
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	x0, [x1]
	cbz	x0, LBB0_2
; %bb.1:
	bl	_cert_free
	str	xzr, [x20]
LBB0_2:
	ldr	x21, [x19]
	cbz	x21, LBB0_15
; %bb.3:
	bl	_cert_new
	str	x0, [x20]
	cbz	x0, LBB0_9
; %bb.4:
	mov	x19, x0
	ldr	w0, [x0, #56]
	ldr	w1, [x21, #56]
	bl	_sshbuf_putb
	cbnz	w0, LBB0_17
; %bb.5:
	ldr	w0, [x19, #52]
	ldr	w1, [x21, #52]
	bl	_sshbuf_putb
	cbnz	w0, LBB0_17
; %bb.6:
	ldr	w0, [x19, #48]
	ldr	w1, [x21, #48]
	bl	_sshbuf_putb
	cbnz	w0, LBB0_17
; %bb.7:
	ldr	d0, [x21, #40]
	str	d0, [x19, #40]
	ldr	x0, [x21, #32]
	cbz	x0, LBB0_10
; %bb.8:
	bl	_strdup
	str	x0, [x19, #32]
	cbnz	x0, LBB0_11
LBB0_9:
Lloh0:
	adrp	x8, _SSH_ERR_ALLOC_FAIL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SSH_ERR_ALLOC_FAIL@GOTPAGEOFF]
	b	LBB0_16
LBB0_10:
	str	xzr, [x19, #32]
LBB0_11:
	ldr	d0, [x21, #24]
	str	d0, [x19, #24]
	ldr	x0, [x21, #16]
	add	x1, x19, #16
	cbz	x0, LBB0_13
; %bb.12:
	bl	_sshkey_from_private
	cbnz	w0, LBB0_17
	b	LBB0_14
LBB0_13:
	str	xzr, [x1]
LBB0_14:
	ldr	x0, [x21]
Lloh2:
	adrp	x8, _SSHKEY_CERT_MAX_PRINCIPALS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SSHKEY_CERT_MAX_PRINCIPALS@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ls	LBB0_18
LBB0_15:
Lloh5:
	adrp	x8, _SSH_ERR_INVALID_ARGUMENT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SSH_ERR_INVALID_ARGUMENT@GOTPAGEOFF]
LBB0_16:
	ldr	w0, [x8]
LBB0_17:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_18:
	cbz	x0, LBB0_24
; %bb.19:
	mov	w1, #8
	bl	_calloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_9
; %bb.20:
	ldr	x22, [x21]
	cbz	x22, LBB0_25
; %bb.21:
	mov	x20, x0
	mov	x23, #0
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #8]
	lsl	x24, x23, #3
	ldr	x0, [x8, x24]
	bl	_strdup
	str	x0, [x20, x24]
	ldr	x20, [x19, #8]
	ldr	x8, [x20, x24]
	cbz	x8, LBB0_26
; %bb.23:                               ;   in Loop: Header=BB0_22 Depth=1
	add	x23, x23, #1
	cmp	x22, x23
	b.ne	LBB0_22
	b	LBB0_25
LBB0_24:
	mov	x22, #0
LBB0_25:
	mov	w0, #0
	str	x22, [x19]
	b	LBB0_17
LBB0_26:
	str	x23, [x19]
	b	LBB0_9
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_SSH_ERR_INTERNAL_ERROR,4,2     ; @SSH_ERR_INTERNAL_ERROR
	.comm	_SSH_ERR_INVALID_ARGUMENT,4,2   ; @SSH_ERR_INVALID_ARGUMENT
	.comm	_SSH_ERR_ALLOC_FAIL,4,2         ; @SSH_ERR_ALLOC_FAIL
	.comm	_SSHKEY_CERT_MAX_PRINCIPALS,8,3 ; @SSHKEY_CERT_MAX_PRINCIPALS
.subsections_via_symbols
