	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sm2_ciphertext_size            ## -- Begin function sm2_ciphertext_size
	.p2align	4, 0x90
_sm2_ciphertext_size:                   ## @sm2_ciphertext_size
	.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	%rcx, %r14
	movq	%rdx, %r15
	movq	%rsi, %r12
	callq	_EC_KEY_get0_group
	movl	%eax, %edi
	callq	_ec_field_size
	movq	%rax, %rbx
	movq	%r12, %rdi
	callq	_EVP_MD_size
	xorl	%r13d, %r13d
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.1:
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_3
## %bb.2:
	incq	%rbx
	movq	_V_ASN1_INTEGER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%edi, %edi
	movq	%rbx, %rsi
	callq	_ASN1_object_size
	movl	%eax, %ebx
	movl	%r12d, %esi
	movq	_V_ASN1_OCTET_STRING@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	xorl	%edi, %edi
	callq	_ASN1_object_size
                                        ## kill: def $eax killed $eax def $rax
	leal	(%rax,%rbx,2), %ebx
	movl	(%r12), %edx
	xorl	%edi, %edi
	movq	%r15, %rsi
	callq	_ASN1_object_size
	addl	%ebx, %eax
	movslq	%eax, %rsi
	movq	_V_ASN1_SEQUENCE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$1, %r13d
	movl	$1, %edi
	callq	_ASN1_object_size
	cltq
	movq	%rax, (%r14)
LBB0_3:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V_ASN1_INTEGER,4,2             ## @V_ASN1_INTEGER
	.comm	_V_ASN1_OCTET_STRING,4,2        ## @V_ASN1_OCTET_STRING
	.comm	_V_ASN1_SEQUENCE,4,2            ## @V_ASN1_SEQUENCE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sm2_ciphertext_size            ; -- Begin function sm2_ciphertext_size
	.p2align	2
_sm2_ciphertext_size:                   ; @sm2_ciphertext_size
	.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	x19, x3
	mov	x20, x2
	mov	x21, x1
	bl	_EC_KEY_get0_group
	bl	_ec_field_size
	mov	x23, x0
	mov	x0, x21
	bl	_EVP_MD_size
	mov	w21, #0
	cbz	x23, LBB0_3
; %bb.1:
	mov	x22, x0
	tbnz	w0, #31, LBB0_3
; %bb.2:
	add	x1, x23, #1
Lloh0:
	adrp	x8, _V_ASN1_INTEGER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V_ASN1_INTEGER@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w0, #0
	bl	_ASN1_object_size
	mov	x21, x0
	mov	w1, w22
Lloh3:
	adrp	x22, _V_ASN1_OCTET_STRING@GOTPAGE
Lloh4:
	ldr	x22, [x22, _V_ASN1_OCTET_STRING@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	w0, #0
	bl	_ASN1_object_size
	add	w21, w0, w21, lsl #1
	ldr	w2, [x22]
	mov	w0, #0
	mov	x1, x20
	bl	_ASN1_object_size
	add	w8, w21, w0
	sxtw	x1, w8
Lloh5:
	adrp	x8, _V_ASN1_SEQUENCE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _V_ASN1_SEQUENCE@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	w21, #1
	mov	w0, #1
	bl	_ASN1_object_size
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	str	x8, [x19]
LBB0_3:
	mov	x0, x21
	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
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_V_ASN1_INTEGER,4,2             ; @V_ASN1_INTEGER
	.comm	_V_ASN1_OCTET_STRING,4,2        ; @V_ASN1_OCTET_STRING
	.comm	_V_ASN1_SEQUENCE,4,2            ; @V_ASN1_SEQUENCE
.subsections_via_symbols
