	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rsa_ctx_to_pss
_rsa_ctx_to_pss:                        ## @rsa_ctx_to_pss
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	callq	_EVP_PKEY_CTX_get0_pkey
	movq	%rax, %r14
	leaq	-32(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_EVP_PKEY_CTX_get_signature_md
	testq	%rax, %rax
	jle	LBB0_10
## %bb.1:
	leaq	-40(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_EVP_PKEY_CTX_get_rsa_mgf1_md
	testq	%rax, %rax
	jle	LBB0_10
## %bb.2:
	leaq	-20(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_EVP_PKEY_CTX_get_rsa_pss_saltlen
	testl	%eax, %eax
	je	LBB0_10
## %bb.3:
	movl	-20(%rbp), %edx
	cmpl	$-1, %edx
	je	LBB0_4
## %bb.6:
	leal	3(%rdx), %eax
	cmpl	$1, %eax
	ja	LBB0_5
## %bb.7:
	movq	%r14, %rdi
	callq	_EVP_PKEY_size
	movl	%eax, %ebx
	movq	-32(%rbp), %rdi
	callq	_EVP_MD_size
	subl	%eax, %ebx
	addl	$-2, %ebx
	movl	%ebx, -20(%rbp)
	movq	%r14, %rdi
	callq	_EVP_PKEY_bits
	andl	$7, %eax
	movl	-20(%rbp), %edx
	cmpl	$1, %eax
	jne	LBB0_9
## %bb.8:
	decl	%edx
	movl	%edx, -20(%rbp)
LBB0_9:
	testl	%edx, %edx
	jns	LBB0_5
LBB0_10:
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_4:
	movq	-32(%rbp), %rdi
	callq	_EVP_MD_size
	movl	%eax, %edx
	movl	%eax, -20(%rbp)
LBB0_5:
	movq	-32(%rbp), %rdi
	movq	-40(%rbp), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_rsa_pss_params_create
LBB0_11:
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_rsa_ctx_to_pss
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rsa_ctx_to_pss
_rsa_ctx_to_pss:                        ; @rsa_ctx_to_pss
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
	bl	_EVP_PKEY_CTX_get0_pkey
	mov	x19, x0
	add	x1, sp, #24
	mov	x0, x20
	bl	_EVP_PKEY_CTX_get_signature_md
	cmp	x0, #1
	b.lt	LBB0_8
; %bb.1:
	add	x1, sp, #16
	mov	x0, x20
	bl	_EVP_PKEY_CTX_get_rsa_mgf1_md
	cmp	x0, #1
	b.lt	LBB0_8
; %bb.2:
	add	x1, sp, #12
	mov	x0, x20
	bl	_EVP_PKEY_CTX_get_rsa_pss_saltlen
	cbz	w0, LBB0_8
; %bb.3:
	ldr	w2, [sp, #12]
	cmn	w2, #1
	b.eq	LBB0_9
; %bb.4:
	add	w8, w2, #3
	cmp	w8, #1
	b.hi	LBB0_10
; %bb.5:
	mov	x0, x19
	bl	_EVP_PKEY_size
	mov	x20, x0
	ldr	x0, [sp, #24]
	bl	_EVP_MD_size
	sub	w8, w20, w0
	sub	w8, w8, #2
	str	w8, [sp, #12]
	mov	x0, x19
	bl	_EVP_PKEY_bits
	and	w8, w0, #0x7
	ldr	w2, [sp, #12]
	cmp	w8, #1
	b.ne	LBB0_7
; %bb.6:
	sub	w2, w2, #1
	str	w2, [sp, #12]
LBB0_7:
	tbz	w2, #31, LBB0_10
LBB0_8:
	mov	x0, #0
	b	LBB0_11
LBB0_9:
	ldr	x0, [sp, #24]
	bl	_EVP_MD_size
	mov	x2, x0
	str	w0, [sp, #12]
LBB0_10:
	ldp	x1, x0, [sp, #16]
	bl	_rsa_pss_params_create
LBB0_11:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_rsa_ctx_to_pss
.subsections_via_symbols
