	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rsa_pss_to_ctx
_rsa_pss_to_ctx:                        ## @rsa_pss_to_ctx
	.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	%rcx, %r15
	movq	%rdx, %rbx
	movq	%rsi, %r13
	movq	%rdi, %r12
	movq	%rsi, -48(%rbp)
	movq	$0, -72(%rbp)
	movq	$0, -56(%rbp)
	movl	(%rdx), %edi
	callq	_OBJ_obj2nid
	movq	_EVP_PKEY_RSA_PSS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.2:
	movq	%rbx, %rdi
	callq	_rsa_pss_decode
	movq	%rax, %r14
	leaq	-56(%rbp), %rsi
	leaq	-72(%rbp), %rdx
	leaq	-60(%rbp), %rcx
	movq	%rax, %rdi
	callq	_rsa_pss_get_param
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	testq	%r15, %r15
	je	LBB0_10
## %bb.5:
	movq	-56(%rbp), %rdx
	leaq	-48(%rbp), %rsi
	movq	%r12, %rdi
	xorl	%ecx, %ecx
	movq	%r15, %r8
	callq	_EVP_DigestVerifyInit
	testl	%eax, %eax
	je	LBB0_14
## %bb.6:
	movq	-48(%rbp), %r13
	jmp	LBB0_7
LBB0_1:
	movq	_RSA_F_RSA_PSS_TO_CTX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_RSA_R_UNSUPPORTED_SIGNATURE_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_RSAerr
	movl	$-1, %ebx
	jmp	LBB0_16
LBB0_3:
	movq	_RSA_F_RSA_PSS_TO_CTX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_RSA_R_INVALID_PSS_PARAMETERS@GOTPCREL(%rip), %rax
LBB0_13:
	movl	(%rax), %esi
	callq	_RSAerr
LBB0_14:
	movl	$-1, %ebx
LBB0_15:
	movq	%r14, %rdi
	callq	_RSA_PSS_PARAMS_free
LBB0_16:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	leaq	-80(%rbp), %rsi
	movq	%r13, %rdi
	callq	_EVP_PKEY_CTX_get_signature_md
	testq	%rax, %rax
	jle	LBB0_14
## %bb.11:
	movq	-56(%rbp), %rdi
	callq	_EVP_MD_type
	movq	%rax, %rbx
	movq	-80(%rbp), %rdi
	callq	_EVP_MD_type
	cmpq	%rax, %rbx
	jne	LBB0_12
LBB0_7:
	movq	_RSA_PKCS1_PSS_PADDING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_EVP_PKEY_CTX_set_rsa_padding
	movl	$-1, %ebx
	testq	%rax, %rax
	jle	LBB0_15
## %bb.8:
	movq	-48(%rbp), %rdi
	movl	-60(%rbp), %esi
	callq	_EVP_PKEY_CTX_set_rsa_pss_saltlen
	testq	%rax, %rax
	jle	LBB0_15
## %bb.9:
	movq	-48(%rbp), %rdi
	movq	-72(%rbp), %rsi
	callq	_EVP_PKEY_CTX_set_rsa_mgf1_md
	xorl	%ecx, %ecx
	testq	%rax, %rax
	setg	%cl
	leal	(%rcx,%rcx), %ebx
	decl	%ebx
	jmp	LBB0_15
LBB0_12:
	movq	_RSA_F_RSA_PSS_TO_CTX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_RSA_R_DIGEST_DOES_NOT_MATCH@GOTPCREL(%rip), %rax
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_EVP_PKEY_RSA_PSS,8,3           ## @EVP_PKEY_RSA_PSS
	.comm	_RSA_F_RSA_PSS_TO_CTX,4,2       ## @RSA_F_RSA_PSS_TO_CTX
	.comm	_RSA_R_UNSUPPORTED_SIGNATURE_TYPE,4,2 ## @RSA_R_UNSUPPORTED_SIGNATURE_TYPE
	.comm	_RSA_R_INVALID_PSS_PARAMETERS,4,2 ## @RSA_R_INVALID_PSS_PARAMETERS
	.comm	_RSA_R_DIGEST_DOES_NOT_MATCH,4,2 ## @RSA_R_DIGEST_DOES_NOT_MATCH
	.comm	_RSA_PKCS1_PSS_PADDING,4,2      ## @RSA_PKCS1_PSS_PADDING
	.no_dead_strip	_rsa_pss_to_ctx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rsa_pss_to_ctx
_rsa_pss_to_ctx:                        ; @rsa_pss_to_ctx
	.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	x21, x3
	mov	x19, x2
	mov	x20, x1
	mov	x22, x0
	str	x1, [sp, #40]
	stp	xzr, xzr, [sp, #16]
	ldr	w0, [x2]
	bl	_OBJ_obj2nid
Lloh0:
	adrp	x8, _EVP_PKEY_RSA_PSS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EVP_PKEY_RSA_PSS@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_5
; %bb.1:
	mov	x0, x19
	bl	_rsa_pss_decode
	mov	x19, x0
	add	x1, sp, #16
	add	x2, sp, #24
	add	x3, sp, #36
	bl	_rsa_pss_get_param
	cbz	w0, LBB0_6
; %bb.2:
	cbz	x21, LBB0_8
; %bb.3:
	ldr	x2, [sp, #16]
	add	x1, sp, #40
	mov	x0, x22
	mov	x3, #0
	mov	x4, x21
	bl	_EVP_DigestVerifyInit
	cbz	w0, LBB0_13
; %bb.4:
	ldr	x20, [sp, #40]
	b	LBB0_10
LBB0_5:
Lloh3:
	adrp	x8, _RSA_F_RSA_PSS_TO_CTX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RSA_F_RSA_PSS_TO_CTX@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x8, _RSA_R_UNSUPPORTED_SIGNATURE_TYPE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RSA_R_UNSUPPORTED_SIGNATURE_TYPE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_RSAerr
	mov	w20, #-1
	b	LBB0_15
LBB0_6:
Lloh9:
	adrp	x8, _RSA_F_RSA_PSS_TO_CTX@GOTPAGE
Lloh10:
	ldr	x8, [x8, _RSA_F_RSA_PSS_TO_CTX@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
Lloh12:
	adrp	x8, _RSA_R_INVALID_PSS_PARAMETERS@GOTPAGE
Lloh13:
	ldr	x8, [x8, _RSA_R_INVALID_PSS_PARAMETERS@GOTPAGEOFF]
LBB0_7:
	ldr	w1, [x8]
	bl	_RSAerr
	b	LBB0_13
LBB0_8:
	add	x1, sp, #8
	mov	x0, x20
	bl	_EVP_PKEY_CTX_get_signature_md
	cmp	x0, #1
	b.lt	LBB0_13
; %bb.9:
	ldr	x0, [sp, #16]
	bl	_EVP_MD_type
	mov	x21, x0
	ldr	x0, [sp, #8]
	bl	_EVP_MD_type
	cmp	x21, x0
	b.ne	LBB0_16
LBB0_10:
Lloh14:
	adrp	x8, _RSA_PKCS1_PSS_PADDING@GOTPAGE
Lloh15:
	ldr	x8, [x8, _RSA_PKCS1_PSS_PADDING@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_EVP_PKEY_CTX_set_rsa_padding
	cmp	x0, #1
	b.lt	LBB0_13
; %bb.11:
	ldr	x0, [sp, #40]
	ldr	w1, [sp, #36]
	bl	_EVP_PKEY_CTX_set_rsa_pss_saltlen
	mov	w20, #-1
	cmp	x0, #1
	b.lt	LBB0_14
; %bb.12:
	ldr	x0, [sp, #40]
	ldr	x1, [sp, #24]
	bl	_EVP_PKEY_CTX_set_rsa_mgf1_md
	cmp	x0, #1
	cneg	w20, w20, ge
	b	LBB0_14
LBB0_13:
	mov	w20, #-1
LBB0_14:
	mov	x0, x19
	bl	_RSA_PSS_PARAMS_free
LBB0_15:
	mov	x0, x20
	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_16:
Lloh17:
	adrp	x8, _RSA_F_RSA_PSS_TO_CTX@GOTPAGE
Lloh18:
	ldr	x8, [x8, _RSA_F_RSA_PSS_TO_CTX@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
Lloh20:
	adrp	x8, _RSA_R_DIGEST_DOES_NOT_MATCH@GOTPAGE
Lloh21:
	ldr	x8, [x8, _RSA_R_DIGEST_DOES_NOT_MATCH@GOTPAGEOFF]
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_EVP_PKEY_RSA_PSS,8,3           ; @EVP_PKEY_RSA_PSS
	.comm	_RSA_F_RSA_PSS_TO_CTX,4,2       ; @RSA_F_RSA_PSS_TO_CTX
	.comm	_RSA_R_UNSUPPORTED_SIGNATURE_TYPE,4,2 ; @RSA_R_UNSUPPORTED_SIGNATURE_TYPE
	.comm	_RSA_R_INVALID_PSS_PARAMETERS,4,2 ; @RSA_R_INVALID_PSS_PARAMETERS
	.comm	_RSA_R_DIGEST_DOES_NOT_MATCH,4,2 ; @RSA_R_DIGEST_DOES_NOT_MATCH
	.comm	_RSA_PKCS1_PSS_PADDING,4,2      ; @RSA_PKCS1_PSS_PADDING
	.no_dead_strip	_rsa_pss_to_ctx
.subsections_via_symbols
