	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rsa_cms_sign
_rsa_cms_sign:                          ## @rsa_cms_sign
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	_RSA_PKCS1_PADDING@GOTPCREL(%rip), %r12
	movl	(%r12), %r13d
	movl	%r13d, -44(%rbp)
	callq	_CMS_SignerInfo_get0_pkey_ctx
	movq	%rax, %r15
	xorl	%r14d, %r14d
	leaq	-56(%rbp), %r8
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_CMS_SignerInfo_get0_algs
	testq	%r15, %r15
	je	LBB0_3
## %bb.1:
	leaq	-44(%rbp), %rsi
	movq	%r15, %rdi
	callq	_EVP_PKEY_CTX_get_rsa_padding
	testq	%rax, %rax
	jle	LBB0_9
## %bb.2:
	movl	-44(%rbp), %r13d
LBB0_3:
	cmpl	(%r12), %r13d
	jne	LBB0_5
## %bb.4:
	movq	-56(%rbp), %rbx
	movq	_NID_rsaEncryption@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_OBJ_nid2obj
	movq	_V_ASN1_NULL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rbx, %rdi
	movl	%eax, %esi
	xorl	%ecx, %ecx
	jmp	LBB0_8
LBB0_5:
	movq	_RSA_PKCS1_PSS_PADDING@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jne	LBB0_9
## %bb.6:
	movq	%r15, %rdi
	callq	_rsa_ctx_to_pss_string
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:
	movq	%rax, %rbx
	movq	-56(%rbp), %r14
	movq	_EVP_PKEY_RSA_PSS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_OBJ_nid2obj
	movq	_V_ASN1_SEQUENCE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r14, %rdi
	movl	%eax, %esi
	movq	%rbx, %rcx
LBB0_8:
	callq	_X509_ALGOR_set0
	movl	$1, %r14d
LBB0_9:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RSA_PKCS1_PADDING,4,2          ## @RSA_PKCS1_PADDING
	.comm	_NID_rsaEncryption,4,2          ## @NID_rsaEncryption
	.comm	_V_ASN1_NULL,4,2                ## @V_ASN1_NULL
	.comm	_RSA_PKCS1_PSS_PADDING,4,2      ## @RSA_PKCS1_PSS_PADDING
	.comm	_EVP_PKEY_RSA_PSS,4,2           ## @EVP_PKEY_RSA_PSS
	.comm	_V_ASN1_SEQUENCE,4,2            ## @V_ASN1_SEQUENCE
	.no_dead_strip	_rsa_cms_sign
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rsa_cms_sign
_rsa_cms_sign:                          ; @rsa_cms_sign
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x0
Lloh0:
	adrp	x21, _RSA_PKCS1_PADDING@GOTPAGE
Lloh1:
	ldr	x21, [x21, _RSA_PKCS1_PADDING@GOTPAGEOFF]
	ldr	w22, [x21]
	str	w22, [sp, #12]
	bl	_CMS_SignerInfo_get0_pkey_ctx
	mov	x19, x0
	mov	x4, sp
	mov	x0, x20
	mov	x1, #0
	mov	x2, #0
	mov	x3, #0
	bl	_CMS_SignerInfo_get0_algs
	cbz	x19, LBB0_3
; %bb.1:
	add	x1, sp, #12
	mov	x0, x19
	bl	_EVP_PKEY_CTX_get_rsa_padding
	cmp	x0, #1
	b.lt	LBB0_9
; %bb.2:
	ldr	w22, [sp, #12]
LBB0_3:
	ldr	w8, [x21]
	cmp	w22, w8
	b.ne	LBB0_5
; %bb.4:
	ldr	x19, [sp]
Lloh2:
	adrp	x8, _NID_rsaEncryption@GOTPAGE
Lloh3:
	ldr	x8, [x8, _NID_rsaEncryption@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_OBJ_nid2obj
	mov	x1, x0
Lloh5:
	adrp	x8, _V_ASN1_NULL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _V_ASN1_NULL@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x3, #0
	b	LBB0_8
LBB0_5:
Lloh8:
	adrp	x8, _RSA_PKCS1_PSS_PADDING@GOTPAGE
Lloh9:
	ldr	x8, [x8, _RSA_PKCS1_PSS_PADDING@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w22, w8
	b.ne	LBB0_9
; %bb.6:
	mov	x0, x19
	bl	_rsa_ctx_to_pss_string
	cbz	x0, LBB0_10
; %bb.7:
	mov	x19, x0
	ldr	x20, [sp]
Lloh11:
	adrp	x8, _EVP_PKEY_RSA_PSS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EVP_PKEY_RSA_PSS@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_OBJ_nid2obj
	mov	x1, x0
Lloh14:
	adrp	x8, _V_ASN1_SEQUENCE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _V_ASN1_SEQUENCE@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x3, x19
LBB0_8:
	bl	_X509_ALGOR_set0
	mov	w0, #1
	b	LBB0_10
LBB0_9:
	mov	w0, #0
LBB0_10:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_RSA_PKCS1_PADDING,4,2          ; @RSA_PKCS1_PADDING
	.comm	_NID_rsaEncryption,4,2          ; @NID_rsaEncryption
	.comm	_V_ASN1_NULL,4,2                ; @V_ASN1_NULL
	.comm	_RSA_PKCS1_PSS_PADDING,4,2      ; @RSA_PKCS1_PSS_PADDING
	.comm	_EVP_PKEY_RSA_PSS,4,2           ; @EVP_PKEY_RSA_PSS
	.comm	_V_ASN1_SEQUENCE,4,2            ; @V_ASN1_SEQUENCE
	.no_dead_strip	_rsa_cms_sign
.subsections_via_symbols
