	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pkey_sm2_ctrl
_pkey_sm2_ctrl:                         ## @pkey_sm2_ctrl
	.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
                                        ## kill: def $esi killed $esi def $rsi
	addl	$-128, %esi
	cmpl	$6, %esi
	ja	LBB0_1
## %bb.2:
	movq	%rcx, %r12
	movl	%edx, %r14d
	movq	(%rdi), %rbx
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rsi,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_12:
	testl	%r14d, %r14d
	jle	LBB0_16
## %bb.13:
	movl	%r14d, %edi
	callq	_OPENSSL_malloc
	testq	%rax, %rax
	je	LBB0_14
## %bb.15:
	movq	%rax, %r15
	movq	%rax, %rdi
	movq	%r12, %rsi
	movl	%r14d, %edx
	callq	_memcpy
	movq	(%rbx), %rdi
	callq	_OPENSSL_free
	movq	%r15, (%rbx)
	jmp	LBB0_17
LBB0_1:
	movl	$-2, %eax
	jmp	LBB0_22
LBB0_10:
	movq	%r12, 24(%rbx)
	jmp	LBB0_21
LBB0_11:
	movq	24(%rbx), %rax
	jmp	LBB0_20
LBB0_19:
	movq	8(%rbx), %rax
LBB0_20:
	movq	%rax, (%r12)
	jmp	LBB0_21
LBB0_18:
	movq	(%rbx), %rsi
	movl	8(%rbx), %edx
	movq	%r12, %rdi
	callq	_memcpy
	jmp	LBB0_21
LBB0_7:
	movq	32(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.9:
	movl	%r14d, %esi
	callq	_EC_GROUP_set_asn1_flag
	jmp	LBB0_21
LBB0_3:
	movl	%r14d, %edi
	callq	_EC_GROUP_new_by_curve_name
	testq	%rax, %rax
	je	LBB0_4
## %bb.6:
	movq	%rax, %r14
	movq	32(%rbx), %rdi
	callq	_EC_GROUP_free
	movq	%r14, 32(%rbx)
	jmp	LBB0_21
LBB0_16:
	movq	(%rbx), %rdi
	callq	_OPENSSL_free
	movq	$0, (%rbx)
LBB0_17:
	movslq	%r14d, %rax
	movq	%rax, 8(%rbx)
	movl	$1, 16(%rbx)
LBB0_21:
	movl	$1, %eax
LBB0_22:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	_SM2_F_PKEY_SM2_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SM2_R_NO_PARAMETERS_SET@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_4:
	movq	_SM2_F_PKEY_SM2_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SM2_R_INVALID_CURVE@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_14:
	movq	_SM2_F_PKEY_SM2_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ERR_R_MALLOC_FAILURE@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %esi
	callq	_SM2err
	xorl	%eax, %eax
	jmp	LBB0_22
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_19, LBB0_19-LJTI0_0
.set L0_0_set_18, LBB0_18-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
LJTI0_0:
	.long	L0_0_set_12
	.long	L0_0_set_10
	.long	L0_0_set_11
	.long	L0_0_set_19
	.long	L0_0_set_18
	.long	L0_0_set_7
	.long	L0_0_set_3
	.end_data_region
                                        ## -- End function
	.comm	_SM2_F_PKEY_SM2_CTRL,4,2        ## @SM2_F_PKEY_SM2_CTRL
	.comm	_SM2_R_INVALID_CURVE,4,2        ## @SM2_R_INVALID_CURVE
	.comm	_SM2_R_NO_PARAMETERS_SET,4,2    ## @SM2_R_NO_PARAMETERS_SET
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ## @ERR_R_MALLOC_FAILURE
	.no_dead_strip	_pkey_sm2_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pkey_sm2_ctrl
_pkey_sm2_ctrl:                         ; @pkey_sm2_ctrl
	.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
	sub	w8, w1, #128
	cmp	w8, #6
	b.hi	LBB0_5
; %bb.1:
	mov	x20, x3
	mov	x19, x2
	ldr	x22, [x0]
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	cmp	w19, #1
	b.lt	LBB0_17
; %bb.3:
	mov	x0, x19
	bl	_OPENSSL_malloc
	cbz	x0, LBB0_21
; %bb.4:
	mov	x21, x0
	mov	x1, x20
	mov	x2, x19
	bl	_memcpy
	ldr	x0, [x22]
	bl	_OPENSSL_free
	str	x21, [x22]
	b	LBB0_18
LBB0_5:
	mov	w0, #-2
	b	LBB0_16
LBB0_6:
	str	x20, [x22, #24]
	b	LBB0_15
LBB0_7:
	ldr	x8, [x22, #24]
	b	LBB0_9
LBB0_8:
	ldr	x8, [x22, #8]
LBB0_9:
	str	x8, [x20]
	b	LBB0_15
LBB0_10:
	ldr	x1, [x22]
	ldr	w2, [x22, #8]
	mov	x0, x20
	bl	_memcpy
	b	LBB0_15
LBB0_11:
	ldr	x0, [x22, #32]
	cbz	x0, LBB0_19
; %bb.12:
	mov	x1, x19
	bl	_EC_GROUP_set_asn1_flag
	b	LBB0_15
LBB0_13:
	mov	x0, x19
	bl	_EC_GROUP_new_by_curve_name
	cbz	x0, LBB0_20
; %bb.14:
	mov	x19, x0
	ldr	x0, [x22, #32]
	bl	_EC_GROUP_free
	str	x19, [x22, #32]
LBB0_15:
	mov	w0, #1
LBB0_16:
	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
LBB0_17:
	ldr	x0, [x22]
	bl	_OPENSSL_free
	str	xzr, [x22]
LBB0_18:
	sxtw	x8, w19
	str	x8, [x22, #8]
	mov	w0, #1
	str	w0, [x22, #16]
	b	LBB0_16
LBB0_19:
Lloh2:
	adrp	x8, _SM2_F_PKEY_SM2_CTRL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SM2_F_PKEY_SM2_CTRL@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x8, _SM2_R_NO_PARAMETERS_SET@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SM2_R_NO_PARAMETERS_SET@GOTPAGEOFF]
	b	LBB0_22
LBB0_20:
Lloh7:
	adrp	x8, _SM2_F_PKEY_SM2_CTRL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SM2_F_PKEY_SM2_CTRL@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x8, _SM2_R_INVALID_CURVE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SM2_R_INVALID_CURVE@GOTPAGEOFF]
	b	LBB0_22
LBB0_21:
Lloh12:
	adrp	x8, _SM2_F_PKEY_SM2_CTRL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SM2_F_PKEY_SM2_CTRL@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
Lloh15:
	adrp	x8, _ERR_R_MALLOC_FAILURE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ERR_R_MALLOC_FAILURE@GOTPAGEOFF]
LBB0_22:
	ldr	w1, [x8]
	bl	_SM2err
	mov	w0, #0
	b	LBB0_16
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_10-LBB0_2)>>2
	.byte	(LBB0_11-LBB0_2)>>2
	.byte	(LBB0_13-LBB0_2)>>2
                                        ; -- End function
	.comm	_SM2_F_PKEY_SM2_CTRL,4,2        ; @SM2_F_PKEY_SM2_CTRL
	.comm	_SM2_R_INVALID_CURVE,4,2        ; @SM2_R_INVALID_CURVE
	.comm	_SM2_R_NO_PARAMETERS_SET,4,2    ; @SM2_R_NO_PARAMETERS_SET
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ; @ERR_R_MALLOC_FAILURE
	.no_dead_strip	_pkey_sm2_ctrl
.subsections_via_symbols
