	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function test_sm2_crypt
_test_sm2_crypt:                        ## @test_sm2_crypt
	.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
	subq	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r12
	movq	%r8, -112(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r15
	movq	%rsi, -96(%rbp)                 ## 8-byte Spill
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	movq	%rcx, %rdi
	callq	_strlen
	movq	%rax, %rbx
	movq	$0, -64(%rbp)
	xorl	%r14d, %r14d
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_OPENSSL_hexstr2buf
	movq	$0, -56(%rbp)
	movq	$0, -80(%rbp)
	movq	%rbx, -120(%rbp)                ## 8-byte Spill
	movq	%rbx, -72(%rbp)
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movq	%rax, %rdi
	callq	_TEST_ptr
	movl	$0, %r12d
	movl	$0, %ebx
	movl	$0, %r13d
	movl	$0, %ecx
	testl	%eax, %eax
	je	LBB0_23
## %bb.1:
	leaq	-64(%rbp), %rdi
	movq	%r15, %rsi
	callq	_BN_hex2bn
	movl	%eax, %edi
	callq	_TEST_true
	testl	%eax, %eax
	je	LBB0_20
## %bb.2:
	xorl	%eax, %eax
	callq	_EC_KEY_new
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_TEST_ptr
	testl	%eax, %eax
	je	LBB0_19
## %bb.3:
	movq	%r12, %rdi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_EC_KEY_set_group
	movl	%eax, %edi
	callq	_TEST_true
	testl	%eax, %eax
	je	LBB0_19
## %bb.4:
	movq	-64(%rbp), %rsi
	movq	%r12, %rdi
	callq	_EC_KEY_set_private_key
	movl	%eax, %edi
	callq	_TEST_true
	testl	%eax, %eax
	je	LBB0_19
## %bb.5:
	movq	%rbx, %rdi
	callq	_EC_POINT_new
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_TEST_ptr
	testl	%eax, %eax
	je	LBB0_24
## %bb.6:
	movq	-64(%rbp), %rdx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_EC_POINT_mul
	movl	%eax, %edi
	callq	_TEST_true
	testl	%eax, %eax
	je	LBB0_26
## %bb.7:
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_EC_KEY_set_public_key
	movl	%eax, %edi
	callq	_TEST_true
	testl	%eax, %eax
	je	LBB0_24
## %bb.8:
	leaq	-56(%rbp), %rcx
	movq	%r12, %rdi
	movq	-96(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rsi
	movq	-120(%rbp), %r14                ## 8-byte Reload
	movq	%r14, %rdx
	callq	_sm2_ciphertext_size
	movl	%eax, %edi
	callq	_TEST_true
	testl	%eax, %eax
	je	LBB0_24
## %bb.9:
	movq	-56(%rbp), %rdi
	callq	_OPENSSL_zalloc
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_TEST_ptr
	testl	%eax, %eax
	je	LBB0_25
## %bb.10:
	movq	-112(%rbp), %rdi                ## 8-byte Reload
	callq	_start_fake_rand
	leaq	-56(%rbp), %r9
	movq	%r12, %rdi
	movq	%r13, %rsi
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	movq	%r14, %rcx
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %r8
	callq	_sm2_encrypt
	movl	%eax, %edi
	callq	_TEST_true
	testl	%eax, %eax
	je	LBB0_27
## %bb.11:
	movq	_fake_rand_bytes_offset@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_fake_rand_size@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_TEST_size_t_eq
	testl	%eax, %eax
	je	LBB0_27
## %bb.12:
	xorl	%eax, %eax
	callq	_restore_rand
	movq	-56(%rbp), %rcx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rcx, %rsi
	movq	-104(%rbp), %rdx                ## 8-byte Reload
	xorl	%eax, %eax
	callq	_TEST_mem_eq
	testl	%eax, %eax
	je	LBB0_30
## %bb.13:
	movq	-56(%rbp), %rdx
	leaq	-80(%rbp), %rcx
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_sm2_plaintext_size
	movl	%eax, %edi
	callq	_TEST_true
	testl	%eax, %eax
	je	LBB0_32
## %bb.14:
	movq	-80(%rbp), %rdi
	movq	%r14, %rsi
	callq	_TEST_int_eq
	xorl	%ecx, %ecx
	testl	%eax, %eax
	je	LBB0_33
## %bb.15:
	movq	-88(%rbp), %rbx                 ## 8-byte Reload
	movq	-80(%rbp), %rdi
	callq	_OPENSSL_zalloc
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_TEST_ptr
	testl	%eax, %eax
	je	LBB0_31
## %bb.16:
	movq	-56(%rbp), %rcx
	leaq	-72(%rbp), %r9
	movq	%r12, %rdi
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	%r13, %r8
	callq	_sm2_decrypt
	movl	%eax, %edi
	callq	_TEST_true
	testl	%eax, %eax
	je	LBB0_31
## %bb.17:
	movq	-72(%rbp), %rdi
	movq	%r14, %rsi
	callq	_TEST_int_eq
	testl	%eax, %eax
	je	LBB0_31
## %bb.18:
	movq	-72(%rbp), %rsi
	movq	%r13, %rdi
	movq	%rbx, %rdx
	movq	%r14, %rcx
	xorl	%eax, %eax
	callq	_TEST_mem_eq
	xorl	%ecx, %ecx
	testl	%eax, %eax
	setne	%cl
	jmp	LBB0_29
LBB0_19:
	xorl	%r14d, %r14d
	jmp	LBB0_21
LBB0_20:
	xorl	%r14d, %r14d
	xorl	%r12d, %r12d
LBB0_21:
	xorl	%ebx, %ebx
	xorl	%r13d, %r13d
LBB0_22:
	xorl	%ecx, %ecx
LBB0_23:
	movq	-64(%rbp), %rdi
	movq	%rcx, %r15
	callq	_BN_free
	movq	%r14, %rdi
	callq	_EC_POINT_free
	movq	%rbx, %rdi
	callq	_OPENSSL_free
	movq	%r13, %rdi
	callq	_OPENSSL_free
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	callq	_OPENSSL_free
	movq	%r12, %rdi
	callq	_EC_KEY_free
	movl	%r15d, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_24:
	xorl	%ebx, %ebx
LBB0_25:
	xorl	%r13d, %r13d
	xorl	%ecx, %ecx
	movq	%r15, %r14
	jmp	LBB0_23
LBB0_26:
	xorl	%r13d, %r13d
	xorl	%ecx, %ecx
	movq	%r15, %r14
	xorl	%ebx, %ebx
	jmp	LBB0_23
LBB0_27:
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_restore_rand
LBB0_28:
	xorl	%ecx, %ecx
LBB0_29:
	movq	%r15, %r14
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_23
LBB0_30:
	xorl	%r13d, %r13d
LBB0_31:
	movq	%r15, %r14
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_22
LBB0_32:
	xorl	%r13d, %r13d
	jmp	LBB0_28
LBB0_33:
	xorl	%r13d, %r13d
	jmp	LBB0_29
	.cfi_endproc
                                        ## -- End function
	.comm	_fake_rand_bytes_offset,4,2     ## @fake_rand_bytes_offset
	.comm	_fake_rand_size,4,2             ## @fake_rand_size
	.no_dead_strip	_test_sm2_crypt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function test_sm2_crypt
_test_sm2_crypt:                        ; @test_sm2_crypt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x5
	mov	x26, x4
	mov	x23, x3
	mov	x20, x2
	mov	x25, x1
	mov	x22, x0
	mov	x0, x3
	bl	_strlen
	mov	x24, x0
	str	xzr, [sp, #40]
	mov	x0, x19
	mov	x1, #0
	bl	_OPENSSL_hexstr2buf
	mov	x19, x0
	stp	xzr, xzr, [sp, #24]
	str	x24, [sp, #16]
	bl	_TEST_ptr
	cbz	w0, LBB0_19
; %bb.1:
	add	x0, sp, #40
	mov	x1, x20
	bl	_BN_hex2bn
	bl	_TEST_true
	cbz	w0, LBB0_19
; %bb.2:
	bl	_EC_KEY_new
	mov	x20, x0
	bl	_TEST_ptr
	cbz	w0, LBB0_20
; %bb.3:
	mov	x0, x20
	mov	x1, x22
	bl	_EC_KEY_set_group
	bl	_TEST_true
	cbz	w0, LBB0_20
; %bb.4:
	ldr	x1, [sp, #40]
	mov	x0, x20
	bl	_EC_KEY_set_private_key
	bl	_TEST_true
	cbz	w0, LBB0_20
; %bb.5:
	mov	x0, x22
	bl	_EC_POINT_new
	mov	x21, x0
	bl	_TEST_ptr
	cbz	w0, LBB0_21
; %bb.6:
	ldr	x2, [sp, #40]
	mov	x0, x22
	mov	x1, x21
	mov	x3, #0
	mov	x4, #0
	mov	x5, #0
	bl	_EC_POINT_mul
	bl	_TEST_true
	cbz	w0, LBB0_21
; %bb.7:
	mov	x0, x20
	mov	x1, x21
	bl	_EC_KEY_set_public_key
	bl	_TEST_true
	cbz	w0, LBB0_21
; %bb.8:
	add	x3, sp, #32
	mov	x0, x20
	mov	x1, x25
	mov	x2, x24
	bl	_sm2_ciphertext_size
	bl	_TEST_true
	cbz	w0, LBB0_21
; %bb.9:
	ldr	x0, [sp, #32]
	bl	_OPENSSL_zalloc
	mov	x22, x0
	bl	_TEST_ptr
	cbz	w0, LBB0_22
; %bb.10:
	mov	x0, x26
	bl	_start_fake_rand
	add	x5, sp, #32
	mov	x0, x20
	mov	x1, x25
	mov	x2, x23
	mov	x3, x24
	mov	x4, x22
	bl	_sm2_encrypt
	bl	_TEST_true
	cbz	w0, LBB0_25
; %bb.11:
Lloh0:
	adrp	x8, _fake_rand_bytes_offset@GOTPAGE
Lloh1:
	ldr	x8, [x8, _fake_rand_bytes_offset@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _fake_rand_size@GOTPAGE
Lloh4:
	ldr	x8, [x8, _fake_rand_size@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_TEST_size_t_eq
	cbz	w0, LBB0_25
; %bb.12:
	bl	_restore_rand
	ldr	x1, [sp, #32]
	stp	x19, x1, [sp]
	mov	x0, x22
	bl	_TEST_mem_eq
	cbz	w0, LBB0_22
; %bb.13:
	ldr	x2, [sp, #32]
	add	x3, sp, #24
	mov	x0, x20
	mov	x1, x25
	bl	_sm2_plaintext_size
	bl	_TEST_true
	cbz	w0, LBB0_22
; %bb.14:
	ldr	x0, [sp, #24]
	mov	x1, x24
	bl	_TEST_int_eq
	cbz	w0, LBB0_22
; %bb.15:
	ldr	x0, [sp, #24]
	bl	_OPENSSL_zalloc
	mov	x26, x0
	bl	_TEST_ptr
	cbz	w0, LBB0_23
; %bb.16:
	ldr	x3, [sp, #32]
	add	x5, sp, #16
	mov	x0, x20
	mov	x1, x25
	mov	x2, x22
	mov	x4, x26
	bl	_sm2_decrypt
	bl	_TEST_true
	cbz	w0, LBB0_23
; %bb.17:
	ldr	x0, [sp, #16]
	mov	x1, x24
	bl	_TEST_int_eq
	cbz	w0, LBB0_23
; %bb.18:
	ldr	x1, [sp, #16]
	stp	x23, x24, [sp]
	mov	x0, x26
	bl	_TEST_mem_eq
	cmp	w0, #0
	cset	w23, ne
	b	LBB0_24
LBB0_19:
	mov	x21, #0
	mov	x20, #0
	b	LBB0_21
LBB0_20:
	mov	x21, #0
LBB0_21:
	mov	x22, #0
LBB0_22:
	mov	x26, #0
LBB0_23:
	mov	w23, #0
LBB0_24:
	ldr	x0, [sp, #40]
	bl	_BN_free
	mov	x0, x21
	bl	_EC_POINT_free
	mov	x0, x22
	bl	_OPENSSL_free
	mov	x0, x26
	bl	_OPENSSL_free
	mov	x0, x19
	bl	_OPENSSL_free
	mov	x0, x20
	bl	_EC_KEY_free
	mov	x0, x23
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_25:
	bl	_restore_rand
	b	LBB0_22
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_fake_rand_bytes_offset,4,2     ; @fake_rand_bytes_offset
	.comm	_fake_rand_size,4,2             ; @fake_rand_size
	.no_dead_strip	_test_sm2_crypt
.subsections_via_symbols
