	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rc2_set_ctx_params
_rc2_set_ctx_params:                    ## @rc2_set_ctx_params
	.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	%r12
	pushq	%rbx
	subq	$48, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	callq	_cipher_generic_set_ctx_params
	xorl	%r14d, %r14d
	testl	%eax, %eax
	je	LBB0_16
## %bb.1:
	movq	_OSSL_CIPHER_PARAM_RC2_KEYBITS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_OSSL_PARAM_locate_const
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%rax, %rdi
	movq	%r12, %rsi
	callq	_OSSL_PARAM_get_size_t
	testl	%eax, %eax
	je	LBB0_8
LBB0_3:
	movq	_OSSL_CIPHER_PARAM_ALG_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_OSSL_PARAM_locate
	movl	$1, %r14d
	testq	%rax, %rax
	je	LBB0_16
## %bb.4:
	movq	$0, -72(%rbp)
	movq	(%rax), %rcx
	movq	%rcx, -80(%rbp)
	movq	8(%rax), %rcx
	movq	_OSSL_PARAM_OCTET_STRING@GOTPCREL(%rip), %rdx
	xorl	%r14d, %r14d
	cmpq	(%rdx), %rcx
	jne	LBB0_7
## %bb.5:
	cmpl	$16, 4(%r12)
	jbe	LBB0_9
LBB0_7:
	xorl	%ebx, %ebx
LBB0_15:
	movq	_ERR_LIB_PROV@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_PROV_R_FAILED_TO_SET_PARAMETER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ERR_raise
	movq	%rbx, %rdi
	callq	_ASN1_TYPE_free
	jmp	LBB0_16
LBB0_8:
	movq	_ERR_LIB_PROV@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_PROV_R_FAILED_TO_GET_PARAMETER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ERR_raise
LBB0_16:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_18
## %bb.17:
	movl	%r14d, %eax
	addq	$48, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	16(%rax), %edx
	xorl	%ebx, %ebx
	leaq	-80(%rbp), %rsi
	xorl	%edi, %edi
	callq	_d2i_ASN1_TYPE
	testq	%rax, %rax
	je	LBB0_15
## %bb.10:
	movq	%rax, %r15
	leaq	4(%r12), %rbx
	movl	(%rbx), %ecx
	leaq	-72(%rbp), %rsi
	leaq	-64(%rbp), %rdx
	movq	%rax, %rdi
	callq	_ASN1_TYPE_get_int_octetstring
	movslq	(%rbx), %rcx
	cmpq	%rcx, %rax
	jne	LBB0_14
## %bb.11:
	leaq	-64(%rbp), %rsi
	movq	%rbx, %rdi
	movq	%rax, %rdx
	callq	_cipher_generic_initiv
	testl	%eax, %eax
	je	LBB0_14
## %bb.12:
	movq	-72(%rbp), %rdi
	callq	_rc2_magic_to_keybits
	movl	%eax, (%r12)
	testl	%eax, %eax
	je	LBB0_14
## %bb.13:
	movq	%r15, %rdi
	callq	_ASN1_TYPE_free
	movl	(%r12), %eax
	leal	7(%rax), %ecx
	testl	%eax, %eax
	cmovnsl	%eax, %ecx
	sarl	$3, %ecx
	movl	%ecx, 8(%r12)
	movl	$1, %r14d
	jmp	LBB0_16
LBB0_14:
	movq	%r15, %rbx
	jmp	LBB0_15
LBB0_18:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_OSSL_CIPHER_PARAM_RC2_KEYBITS,4,2 ## @OSSL_CIPHER_PARAM_RC2_KEYBITS
	.comm	_ERR_LIB_PROV,4,2               ## @ERR_LIB_PROV
	.comm	_PROV_R_FAILED_TO_GET_PARAMETER,4,2 ## @PROV_R_FAILED_TO_GET_PARAMETER
	.comm	_OSSL_CIPHER_PARAM_ALG_ID,4,2   ## @OSSL_CIPHER_PARAM_ALG_ID
	.comm	_OSSL_PARAM_OCTET_STRING,8,3    ## @OSSL_PARAM_OCTET_STRING
	.comm	_PROV_R_FAILED_TO_SET_PARAMETER,4,2 ## @PROV_R_FAILED_TO_SET_PARAMETER
	.no_dead_strip	_rc2_set_ctx_params
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rc2_set_ctx_params
_rc2_set_ctx_params:                    ; @rc2_set_ctx_params
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	bl	_cipher_generic_set_ctx_params
	cbz	w0, LBB0_16
; %bb.1:
Lloh3:
	adrp	x8, _OSSL_CIPHER_PARAM_RC2_KEYBITS@GOTPAGE
Lloh4:
	ldr	x8, [x8, _OSSL_CIPHER_PARAM_RC2_KEYBITS@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_OSSL_PARAM_locate_const
	cbz	x0, LBB0_3
; %bb.2:
	mov	x1, x19
	bl	_OSSL_PARAM_get_size_t
	cbz	w0, LBB0_7
LBB0_3:
Lloh6:
	adrp	x8, _OSSL_CIPHER_PARAM_ALG_ID@GOTPAGE
Lloh7:
	ldr	x8, [x8, _OSSL_CIPHER_PARAM_ALG_ID@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_OSSL_PARAM_locate
	cbz	x0, LBB0_13
; %bb.4:
	mov	x20, #0
	str	xzr, [sp, #16]
	ldp	x8, x9, [x0]
	str	x8, [sp, #8]
Lloh9:
	adrp	x8, _OSSL_PARAM_OCTET_STRING@GOTPAGE
Lloh10:
	ldr	x8, [x8, _OSSL_PARAM_OCTET_STRING@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.5:
	mov	x21, x19
	ldr	w8, [x21, #4]!
	cmp	w8, #16
	b.ls	LBB0_8
; %bb.6:
	mov	x20, #0
	b	LBB0_14
LBB0_7:
Lloh12:
	adrp	x8, _ERR_LIB_PROV@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ERR_LIB_PROV@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
Lloh15:
	adrp	x8, _PROV_R_FAILED_TO_GET_PARAMETER@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PROV_R_FAILED_TO_GET_PARAMETER@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	bl	_ERR_raise
	b	LBB0_15
LBB0_8:
	ldr	w2, [x0, #16]
	add	x1, sp, #8
	mov	x0, #0
	bl	_d2i_ASN1_TYPE
	mov	x20, x0
	cbz	x0, LBB0_14
; %bb.9:
	ldr	w3, [x21]
	add	x1, sp, #16
	add	x2, sp, #24
	mov	x0, x20
	bl	_ASN1_TYPE_get_int_octetstring
	ldrsw	x8, [x21]
	cmp	x0, x8
	b.ne	LBB0_14
; %bb.10:
	mov	x2, x0
	add	x1, sp, #24
	mov	x0, x21
	bl	_cipher_generic_initiv
	cbz	w0, LBB0_14
; %bb.11:
	ldr	x0, [sp, #16]
	bl	_rc2_magic_to_keybits
	str	w0, [x19]
	cbz	w0, LBB0_14
; %bb.12:
	mov	x0, x20
	bl	_ASN1_TYPE_free
	ldr	w8, [x19]
	add	w9, w8, #7
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w8, w8, #3
	str	w8, [x19, #8]
LBB0_13:
	mov	w0, #1
	b	LBB0_16
LBB0_14:
Lloh18:
	adrp	x8, _ERR_LIB_PROV@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ERR_LIB_PROV@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
Lloh21:
	adrp	x8, _PROV_R_FAILED_TO_SET_PARAMETER@GOTPAGE
Lloh22:
	ldr	x8, [x8, _PROV_R_FAILED_TO_SET_PARAMETER@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	bl	_ERR_raise
	mov	x0, x20
	bl	_ASN1_TYPE_free
LBB0_15:
	mov	w0, #0
LBB0_16:
	ldr	x8, [sp, #40]
Lloh24:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh25:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_18
; %bb.17:
	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
	add	sp, sp, #96
	ret
LBB0_18:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_OSSL_CIPHER_PARAM_RC2_KEYBITS,4,2 ; @OSSL_CIPHER_PARAM_RC2_KEYBITS
	.comm	_ERR_LIB_PROV,4,2               ; @ERR_LIB_PROV
	.comm	_PROV_R_FAILED_TO_GET_PARAMETER,4,2 ; @PROV_R_FAILED_TO_GET_PARAMETER
	.comm	_OSSL_CIPHER_PARAM_ALG_ID,4,2   ; @OSSL_CIPHER_PARAM_ALG_ID
	.comm	_OSSL_PARAM_OCTET_STRING,8,3    ; @OSSL_PARAM_OCTET_STRING
	.comm	_PROV_R_FAILED_TO_SET_PARAMETER,4,2 ; @PROV_R_FAILED_TO_SET_PARAMETER
	.no_dead_strip	_rc2_set_ctx_params
.subsections_via_symbols
