	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cms_wrap_init
_cms_wrap_init:                         ## @cms_wrap_init
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	(%rdi), %r15
	movq	%rsi, %rdi
	callq	_EVP_CIPHER_key_length
	movl	%eax, %r14d
	movq	%r15, %rdi
	callq	_EVP_CIPHER_CTX_cipher
	testq	%rax, %rax
	je	LBB0_1
## %bb.9:
	movq	%r15, %rdi
	callq	_EVP_CIPHER_CTX_mode
	movq	_EVP_CIPH_WRAP_MODE@GOTPCREL(%rip), %rdx
	xorl	%ecx, %ecx
	cmpq	(%rdx), %rax
	sete	%cl
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rbx, %rdi
	callq	_EVP_CIPHER_type
	movq	_NID_des_ede3_cbc@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	xorl	%eax, %eax
	callq	_EVP_des_ede3_wrap
	jmp	LBB0_8
LBB0_3:
	xorl	%eax, %eax
	cmpl	$16, %r14d
	jg	LBB0_5
## %bb.4:
	callq	_EVP_aes_128_wrap
	jmp	LBB0_8
LBB0_5:
	cmpl	$24, %r14d
	ja	LBB0_7
## %bb.6:
	callq	_EVP_aes_192_wrap
	jmp	LBB0_8
LBB0_7:
	callq	_EVP_aes_256_wrap
LBB0_8:
	movq	%rax, %rsi
	movq	%r15, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_EVP_EncryptInit_ex             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EVP_CIPH_WRAP_MODE,8,3         ## @EVP_CIPH_WRAP_MODE
	.comm	_NID_des_ede3_cbc,8,3           ## @NID_des_ede3_cbc
	.no_dead_strip	_cms_wrap_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cms_wrap_init
_cms_wrap_init:                         ; @cms_wrap_init
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x1
	ldr	x19, [x0]
	mov	x0, x1
	bl	_EVP_CIPHER_key_length
	mov	x20, x0
	mov	x0, x19
	bl	_EVP_CIPHER_CTX_cipher
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_EVP_CIPHER_CTX_mode
Lloh0:
	adrp	x8, _EVP_CIPH_WRAP_MODE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EVP_CIPH_WRAP_MODE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	cset	w0, eq
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_2:
	mov	x0, x21
	bl	_EVP_CIPHER_type
Lloh3:
	adrp	x8, _NID_des_ede3_cbc@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NID_des_ede3_cbc@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_4
; %bb.3:
	bl	_EVP_des_ede3_wrap
	b	LBB0_9
LBB0_4:
	cmp	w20, #16
	b.gt	LBB0_6
; %bb.5:
	bl	_EVP_aes_128_wrap
	b	LBB0_9
LBB0_6:
	cmp	w20, #24
	b.hi	LBB0_8
; %bb.7:
	bl	_EVP_aes_192_wrap
	b	LBB0_9
LBB0_8:
	bl	_EVP_aes_256_wrap
LBB0_9:
	mov	x1, x0
	mov	x0, x19
	mov	x2, #0
	mov	x3, #0
	mov	x4, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_EVP_EncryptInit_ex
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EVP_CIPH_WRAP_MODE,8,3         ; @EVP_CIPH_WRAP_MODE
	.comm	_NID_des_ede3_cbc,8,3           ; @NID_des_ede3_cbc
	.no_dead_strip	_cms_wrap_init
.subsections_via_symbols
