	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function test_sm2_sign
_test_sm2_sign:                         ## @test_sm2_sign
	.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, -112(%rbp)                 ## 8-byte Spill
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	movq	%rcx, %r12
	movq	%rdx, %rbx
	movq	%rsi, %r14
	movq	%rdi, %r13
	movq	%rcx, %rdi
	callq	_strlen
	movq	%rax, %r15
	movq	$0, -56(%rbp)
	movq	$0, -104(%rbp)
	movq	$0, -96(%rbp)
	movq	$0, -72(%rbp)
	movq	$0, -64(%rbp)
	leaq	-56(%rbp), %rdi
	movq	%rbx, %rsi
	callq	_BN_hex2bn
	movl	%eax, %edi
	callq	_TEST_true
	testl	%eax, %eax
	je	LBB0_14
## %bb.1:
	movq	%r15, -88(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_EC_KEY_new
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_TEST_ptr
	testl	%eax, %eax
	je	LBB0_16
## %bb.2:
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_EC_KEY_set_group
	movl	%eax, %edi
	callq	_TEST_true
	testl	%eax, %eax
	je	LBB0_15
## %bb.3:
	movq	-56(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_EC_KEY_set_private_key
	movl	%eax, %edi
	callq	_TEST_true
	testl	%eax, %eax
	je	LBB0_15
## %bb.4:
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_EC_POINT_new
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_TEST_ptr
	testl	%eax, %eax
	je	LBB0_19
## %bb.5:
	movq	-56(%rbp), %rdx
	xorl	%r15d, %r15d
	movq	%r13, %rdi
	movq	%r14, %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_17
## %bb.6:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_EC_KEY_set_public_key
	movl	%eax, %edi
	callq	_TEST_true
	testl	%eax, %eax
	je	LBB0_19
## %bb.7:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_start_fake_rand
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_EVP_sm3
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	callq	_strlen
	movq	%rbx, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movq	%r13, %rdx
	movq	%rax, %rcx
	movq	%r12, %r8
	movq	-88(%rbp), %r9                  ## 8-byte Reload
	callq	_sm2_do_sign
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_TEST_ptr
	testl	%eax, %eax
	je	LBB0_21
## %bb.8:
	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_21
## %bb.9:
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_restore_rand
	leaq	-104(%rbp), %rsi
	leaq	-96(%rbp), %rdx
	movq	%r13, %rdi
	callq	_ECDSA_SIG_get0
	leaq	-72(%rbp), %rdi
	movq	-112(%rbp), %rsi                ## 8-byte Reload
	callq	_BN_hex2bn
	movl	%eax, %edi
	callq	_TEST_true
	testl	%eax, %eax
	je	LBB0_18
## %bb.10:
	movq	16(%rbp), %rsi
	leaq	-64(%rbp), %rdi
	callq	_BN_hex2bn
	movl	%eax, %edi
	callq	_TEST_true
	testl	%eax, %eax
	je	LBB0_18
## %bb.11:
	movq	-72(%rbp), %rdi
	movq	-104(%rbp), %rsi
	callq	_TEST_BN_eq
	testl	%eax, %eax
	je	LBB0_18
## %bb.12:
	movq	-64(%rbp), %rdi
	movq	-96(%rbp), %rsi
	callq	_TEST_BN_eq
	testl	%eax, %eax
	je	LBB0_18
## %bb.13:
	xorl	%eax, %eax
	callq	_EVP_sm3
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	callq	_strlen
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, (%rsp)
	movq	%rbx, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movq	%r13, %rdx
	movq	%r15, %rcx
	movq	%rax, %r8
	movq	%r12, %r9
	callq	_sm2_do_verify
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_TEST_true
	jmp	LBB0_18
LBB0_14:
	xorl	%r15d, %r15d
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	jmp	LBB0_17
LBB0_15:
	xorl	%r15d, %r15d
LBB0_16:
	xorl	%r14d, %r14d
LBB0_17:
	xorl	%r13d, %r13d
LBB0_18:
	movq	%r13, %rdi
	callq	_ECDSA_SIG_free
	movq	%r14, %rdi
	callq	_EC_POINT_free
	movq	%rbx, %rdi
	callq	_EC_KEY_free
	movq	-56(%rbp), %rdi
	callq	_BN_free
	movq	-72(%rbp), %rdi
	callq	_BN_free
	movq	-64(%rbp), %rdi
	callq	_BN_free
	movl	%r15d, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	xorl	%r15d, %r15d
	jmp	LBB0_17
LBB0_21:
	xorl	%eax, %eax
	callq	_restore_rand
	jmp	LBB0_18
	.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_sign
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function test_sm2_sign
_test_sm2_sign:                         ; @test_sm2_sign
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x24, x6
	mov	x25, x5
	mov	x26, x4
	mov	x21, x3
	mov	x19, x2
	mov	x22, x1
	mov	x27, x0
	mov	x0, x3
	bl	_strlen
	mov	x23, x0
	stp	xzr, xzr, [sp, #32]
	stp	xzr, xzr, [sp, #16]
	str	xzr, [sp, #8]
	add	x0, sp, #40
	mov	x1, x19
	bl	_BN_hex2bn
	bl	_TEST_true
	cbz	w0, LBB0_15
; %bb.1:
	bl	_EC_KEY_new
	mov	x19, x0
	bl	_TEST_ptr
	cbz	w0, LBB0_14
; %bb.2:
	mov	x0, x19
	mov	x1, x27
	bl	_EC_KEY_set_group
	bl	_TEST_true
	cbz	w0, LBB0_14
; %bb.3:
	ldr	x1, [sp, #40]
	mov	x0, x19
	bl	_EC_KEY_set_private_key
	bl	_TEST_true
	cbz	w0, LBB0_14
; %bb.4:
	mov	x0, x27
	bl	_EC_POINT_new
	mov	x20, x0
	bl	_TEST_ptr
	cbz	w0, LBB0_16
; %bb.5:
	ldr	x2, [sp, #40]
	mov	x0, x27
	mov	x1, x20
	mov	x3, #0
	mov	x4, #0
	mov	x5, #0
	bl	_EC_POINT_mul
	bl	_TEST_true
	cbz	w0, LBB0_16
; %bb.6:
	mov	x0, x19
	mov	x1, x20
	bl	_EC_KEY_set_public_key
	bl	_TEST_true
	cbz	w0, LBB0_16
; %bb.7:
	mov	x0, x26
	bl	_start_fake_rand
	bl	_EVP_sm3
	mov	x26, x0
	mov	x0, x22
	bl	_strlen
	mov	x3, x0
	mov	x0, x19
	mov	x1, x26
	mov	x2, x22
	mov	x4, x21
	mov	x5, x23
	bl	_sm2_do_sign
	mov	x26, x0
	bl	_TEST_ptr
	cbz	w0, LBB0_19
; %bb.8:
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_19
; %bb.9:
	bl	_restore_rand
	add	x1, sp, #32
	add	x2, sp, #24
	mov	x0, x26
	bl	_ECDSA_SIG_get0
	add	x0, sp, #16
	mov	x1, x25
	bl	_BN_hex2bn
	bl	_TEST_true
	cbz	w0, LBB0_20
; %bb.10:
	add	x0, sp, #8
	mov	x1, x24
	bl	_BN_hex2bn
	bl	_TEST_true
	cbz	w0, LBB0_20
; %bb.11:
	ldr	x0, [sp, #16]
	ldr	x1, [sp, #32]
	bl	_TEST_BN_eq
	cbz	w0, LBB0_20
; %bb.12:
	ldr	x0, [sp, #8]
	ldr	x1, [sp, #24]
	bl	_TEST_BN_eq
	cbz	w0, LBB0_20
; %bb.13:
	bl	_EVP_sm3
	mov	x24, x0
	mov	x0, x22
	bl	_strlen
	mov	x4, x0
	mov	x0, x19
	mov	x1, x24
	mov	x2, x26
	mov	x3, x22
	mov	x5, x21
	mov	x6, x23
	bl	_sm2_do_verify
	mov	x21, x0
	bl	_TEST_true
	b	LBB0_18
LBB0_14:
	mov	w21, #0
	mov	x20, #0
	b	LBB0_17
LBB0_15:
	mov	w21, #0
	mov	x20, #0
	mov	x19, #0
	b	LBB0_17
LBB0_16:
	mov	w21, #0
LBB0_17:
	mov	x26, #0
LBB0_18:
	mov	x0, x26
	bl	_ECDSA_SIG_free
	mov	x0, x20
	bl	_EC_POINT_free
	mov	x0, x19
	bl	_EC_KEY_free
	ldr	x0, [sp, #40]
	bl	_BN_free
	ldr	x0, [sp, #16]
	bl	_BN_free
	ldr	x0, [sp, #8]
	bl	_BN_free
	mov	x0, x21
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_19:
	bl	_restore_rand
LBB0_20:
	mov	w21, #0
	b	LBB0_18
	.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_sign
.subsections_via_symbols
