	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cipher_hw_sm4_initkey
_cipher_hw_sm4_initkey:                 ## @cipher_hw_sm4_initkey
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	movq	%rbx, %rsi
	callq	_SM4_set_key
	movq	%rbx, 24(%rbx)
	cmpq	$0, 16(%rbx)
	je	LBB0_2
## %bb.1:
	movq	_SM4_encrypt@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_2:
	movq	(%rbx), %rcx
	movq	_EVP_CIPH_ECB_MODE@GOTPCREL(%rip), %rdx
	movq	_EVP_CIPH_CBC_MODE@GOTPCREL(%rip), %rdi
	movq	_SM4_decrypt@GOTPCREL(%rip), %rsi
	movq	%rsi, %rax
	cmpq	(%rdi), %rcx
	je	LBB0_4
## %bb.3:
	movq	_SM4_encrypt@GOTPCREL(%rip), %rax
LBB0_4:
	cmpq	(%rdx), %rcx
	cmoveq	%rsi, %rax
LBB0_5:
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
	movl	$1, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EVP_CIPH_ECB_MODE,8,3          ## @EVP_CIPH_ECB_MODE
	.comm	_EVP_CIPH_CBC_MODE,8,3          ## @EVP_CIPH_CBC_MODE
	.comm	_SM4_encrypt,8,3                ## @SM4_encrypt
	.comm	_SM4_decrypt,8,3                ## @SM4_decrypt
	.no_dead_strip	_cipher_hw_sm4_initkey
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cipher_hw_sm4_initkey
_cipher_hw_sm4_initkey:                 ; @cipher_hw_sm4_initkey
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	mov	x0, x1
	mov	x1, x19
	bl	_SM4_set_key
	str	x19, [x19, #24]
	ldr	x9, [x19, #16]
Lloh0:
	adrp	x8, _SM4_encrypt@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SM4_encrypt@GOTPAGEOFF]
	cbnz	x9, LBB0_2
; %bb.1:
	ldr	x9, [x19]
Lloh2:
	adrp	x10, _EVP_CIPH_ECB_MODE@GOTPAGE
Lloh3:
	ldr	x10, [x10, _EVP_CIPH_ECB_MODE@GOTPAGEOFF]
Lloh4:
	ldr	x10, [x10]
Lloh5:
	adrp	x11, _EVP_CIPH_CBC_MODE@GOTPAGE
Lloh6:
	ldr	x11, [x11, _EVP_CIPH_CBC_MODE@GOTPAGEOFF]
Lloh7:
	ldr	x11, [x11]
	cmp	x9, x11
	ccmp	x9, x10, #4, ne
Lloh8:
	adrp	x9, _SM4_decrypt@GOTPAGE
Lloh9:
	ldr	x9, [x9, _SM4_decrypt@GOTPAGEOFF]
	csel	x8, x9, x8, eq
LBB0_2:
	ldr	x8, [x8]
	str	x8, [x19, #8]
	mov	w0, #1
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EVP_CIPH_ECB_MODE,8,3          ; @EVP_CIPH_ECB_MODE
	.comm	_EVP_CIPH_CBC_MODE,8,3          ; @EVP_CIPH_CBC_MODE
	.comm	_SM4_encrypt,8,3                ; @SM4_encrypt
	.comm	_SM4_decrypt,8,3                ; @SM4_decrypt
	.no_dead_strip	_cipher_hw_sm4_initkey
.subsections_via_symbols
