	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pkey_sm2_copy
_pkey_sm2_copy:                         ## @pkey_sm2_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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	callq	_pkey_sm2_init
	xorl	%r14d, %r14d
	testl	%eax, %eax
	je	LBB0_9
## %bb.1:
	movq	(%rbx), %rbx
	movq	(%r15), %r12
	movq	24(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.2:
	callq	_EC_GROUP_dup
	movq	%rax, 24(%r12)
	testq	%rax, %rax
	je	LBB0_3
LBB0_4:
	cmpq	$0, 16(%rbx)
	je	LBB0_8
## %bb.5:
	movl	8(%rbx), %edi
	callq	_OPENSSL_malloc
	movq	%rax, 16(%r12)
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	16(%rbx), %rsi
	movl	8(%rbx), %edx
	movq	%rax, %rdi
	callq	_memcpy
LBB0_8:
	movl	8(%rbx), %eax
	movl	%eax, 8(%r12)
	movl	4(%rbx), %eax
	movl	%eax, 4(%r12)
	movl	(%rbx), %eax
	movl	%eax, (%r12)
	movl	$1, %r14d
	jmp	LBB0_9
LBB0_6:
	movq	_SM2_F_PKEY_SM2_COPY@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ERR_R_MALLOC_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_SM2err
LBB0_3:
	movq	%r15, %rdi
	callq	_pkey_sm2_cleanup
LBB0_9:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SM2_F_PKEY_SM2_COPY,4,2        ## @SM2_F_PKEY_SM2_COPY
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ## @ERR_R_MALLOC_FAILURE
	.no_dead_strip	_pkey_sm2_copy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pkey_sm2_copy
_pkey_sm2_copy:                         ; @pkey_sm2_copy
	.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	x20, x1
	mov	x19, x0
	bl	_pkey_sm2_init
	cbz	w0, LBB0_9
; %bb.1:
	ldr	x20, [x20]
	ldr	x21, [x19]
	ldr	x0, [x20, #24]
	cbz	x0, LBB0_3
; %bb.2:
	bl	_EC_GROUP_dup
	str	x0, [x21, #24]
	cbz	x0, LBB0_8
LBB0_3:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_6
; %bb.4:
	ldr	w0, [x20, #8]
	bl	_OPENSSL_malloc
	str	x0, [x21, #16]
	cbz	x0, LBB0_7
; %bb.5:
	ldr	x1, [x20, #16]
	ldr	w2, [x20, #8]
	bl	_memcpy
LBB0_6:
	ldr	w8, [x20, #8]
	str	w8, [x21, #8]
	ldr	d0, [x20]
	str	d0, [x21]
	mov	w0, #1
	b	LBB0_9
LBB0_7:
Lloh0:
	adrp	x8, _SM2_F_PKEY_SM2_COPY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SM2_F_PKEY_SM2_COPY@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _ERR_R_MALLOC_FAILURE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ERR_R_MALLOC_FAILURE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_SM2err
LBB0_8:
	mov	x0, x19
	bl	_pkey_sm2_cleanup
	mov	w0, #0
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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_SM2_F_PKEY_SM2_COPY,4,2        ; @SM2_F_PKEY_SM2_COPY
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ; @ERR_R_MALLOC_FAILURE
	.no_dead_strip	_pkey_sm2_copy
.subsections_via_symbols
