	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sm2_compute_msg_hash
_sm2_compute_msg_hash:                  ## @sm2_compute_msg_hash
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -64(%rbp)                  ## 8-byte Spill
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r15
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r12
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_EVP_MD_CTX_new
	movq	%rax, %r14
	movq	%r12, %rdi
	callq	_EVP_MD_size
	testl	%eax, %eax
	js	LBB0_10
## %bb.1:
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_OPENSSL_zalloc
	movq	_ERR_R_MALLOC_FAILURE@GOTPCREL(%rip), %rcx
	movq	%r14, %r13
	testq	%r14, %r14
	je	LBB0_11
## %bb.2:
	testq	%rax, %rax
	je	LBB0_11
## %bb.3:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movq	-72(%rbp), %r8                  ## 8-byte Reload
	callq	_sm2_compute_z_digest
	testl	%eax, %eax
	je	LBB0_14
## %bb.4:
	movq	%r13, %r14
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	_EVP_DigestInit
	movq	_ERR_R_EVP_LIB@GOTPCREL(%rip), %rcx
	testl	%eax, %eax
	je	LBB0_15
## %bb.5:
	movq	%rcx, %r15
	movq	%r14, %rdi
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rsi
	movl	%ebx, %edx
	callq	_EVP_DigestUpdate
	testl	%eax, %eax
	je	LBB0_16
## %bb.6:
	movq	%r14, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_EVP_DigestUpdate
	testl	%eax, %eax
	je	LBB0_16
## %bb.7:
	movq	%r14, %rdi
	movq	%r13, %rsi
	xorl	%edx, %edx
	callq	_EVP_DigestFinal
	testl	%eax, %eax
	je	LBB0_16
## %bb.8:
	movq	%r13, %rdi
	movl	%ebx, %esi
	xorl	%edx, %edx
	callq	_BN_bin2bn
	testq	%rax, %rax
	je	LBB0_19
## %bb.9:
	movq	%rax, %rbx
	jmp	LBB0_13
LBB0_10:
	movq	_SM2_R_INVALID_DIGEST@GOTPCREL(%rip), %rcx
	jmp	LBB0_12
LBB0_11:
	movq	%r13, %r14
	movq	%rax, %r13
	jmp	LBB0_12
LBB0_14:
	xorl	%ebx, %ebx
	movq	%r13, %r14
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_13
LBB0_16:
	movq	%r15, %rcx
	jmp	LBB0_12
LBB0_15:
	movq	-48(%rbp), %r13                 ## 8-byte Reload
LBB0_12:
	movq	_SM2_F_SM2_COMPUTE_MSG_HASH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%rcx), %esi
	callq	_SM2err
	xorl	%ebx, %ebx
LBB0_13:
	movq	%r13, %rdi
	callq	_OPENSSL_free
	movq	%r14, %rdi
	callq	_EVP_MD_CTX_free
	movq	%rbx, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	movq	_ERR_R_INTERNAL_ERROR@GOTPCREL(%rip), %rcx
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_SM2_F_SM2_COMPUTE_MSG_HASH,4,2 ## @SM2_F_SM2_COMPUTE_MSG_HASH
	.comm	_SM2_R_INVALID_DIGEST,4,2       ## @SM2_R_INVALID_DIGEST
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ## @ERR_R_MALLOC_FAILURE
	.comm	_ERR_R_EVP_LIB,4,2              ## @ERR_R_EVP_LIB
	.comm	_ERR_R_INTERNAL_ERROR,4,2       ## @ERR_R_INTERNAL_ERROR
	.no_dead_strip	_sm2_compute_msg_hash
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sm2_compute_msg_hash
_sm2_compute_msg_hash:                  ; @sm2_compute_msg_hash
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x22, x5
	mov	x23, x4
	mov	x25, x3
	mov	x27, x2
	mov	x26, x1
	mov	x24, x0
	bl	_EVP_MD_CTX_new
	mov	x19, x0
	mov	x0, x24
	bl	_EVP_MD_size
	tbnz	w0, #31, LBB0_10
; %bb.1:
	mov	x21, x0
	bl	_OPENSSL_zalloc
	mov	x20, x0
Lloh0:
	adrp	x8, _ERR_R_MALLOC_FAILURE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ERR_R_MALLOC_FAILURE@GOTPAGEOFF]
	cbz	x19, LBB0_12
; %bb.2:
	cbz	x20, LBB0_12
; %bb.3:
	mov	x0, x20
	mov	x1, x24
	mov	x2, x27
	mov	x3, x25
	mov	x4, x26
	bl	_sm2_compute_z_digest
	cbz	w0, LBB0_13
; %bb.4:
	mov	x0, x19
	mov	x1, x24
	bl	_EVP_DigestInit
	cbz	w0, LBB0_11
; %bb.5:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_EVP_DigestUpdate
	cbz	w0, LBB0_11
; %bb.6:
	mov	x0, x19
	mov	x1, x23
	mov	x2, x22
	bl	_EVP_DigestUpdate
	cbz	w0, LBB0_11
; %bb.7:
	mov	x0, x19
	mov	x1, x20
	mov	x2, #0
	bl	_EVP_DigestFinal
	cbz	w0, LBB0_11
; %bb.8:
	mov	x0, x20
	mov	x1, x21
	mov	x2, #0
	bl	_BN_bin2bn
	cbz	x0, LBB0_15
; %bb.9:
	mov	x21, x0
	b	LBB0_14
LBB0_10:
	mov	x20, #0
Lloh2:
	adrp	x8, _SM2_R_INVALID_DIGEST@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SM2_R_INVALID_DIGEST@GOTPAGEOFF]
	b	LBB0_12
LBB0_11:
Lloh4:
	adrp	x8, _ERR_R_EVP_LIB@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ERR_R_EVP_LIB@GOTPAGEOFF]
LBB0_12:
Lloh6:
	adrp	x9, _SM2_F_SM2_COMPUTE_MSG_HASH@GOTPAGE
Lloh7:
	ldr	x9, [x9, _SM2_F_SM2_COMPUTE_MSG_HASH@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x9]
	ldr	w1, [x8]
	bl	_SM2err
LBB0_13:
	mov	x21, #0
LBB0_14:
	mov	x0, x20
	bl	_OPENSSL_free
	mov	x0, x19
	bl	_EVP_MD_CTX_free
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_15:
Lloh9:
	adrp	x8, _ERR_R_INTERNAL_ERROR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ERR_R_INTERNAL_ERROR@GOTPAGEOFF]
	b	LBB0_12
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_SM2_F_SM2_COMPUTE_MSG_HASH,4,2 ; @SM2_F_SM2_COMPUTE_MSG_HASH
	.comm	_SM2_R_INVALID_DIGEST,4,2       ; @SM2_R_INVALID_DIGEST
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ; @ERR_R_MALLOC_FAILURE
	.comm	_ERR_R_EVP_LIB,4,2              ; @ERR_R_EVP_LIB
	.comm	_ERR_R_INTERNAL_ERROR,4,2       ; @ERR_R_INTERNAL_ERROR
	.no_dead_strip	_sm2_compute_msg_hash
.subsections_via_symbols
