	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PKCS7_SIGNER_INFO_sign         ## -- Begin function PKCS7_SIGNER_INFO_sign
	.p2align	4, 0x90
_PKCS7_SIGNER_INFO_sign:                ## @PKCS7_SIGNER_INFO_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, %r15
	movq	$0, -64(%rbp)
	movq	$0, -48(%rbp)
	movq	24(%rdi), %rax
	movl	(%rax), %edi
	callq	_EVP_get_digestbyobj
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	%rax, %rbx
	xorl	%eax, %eax
	callq	_EVP_MD_CTX_new
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_2
## %bb.6:
	movl	16(%r15), %r8d
	leaq	-64(%rbp), %rsi
	movq	%r14, %rdi
	movq	%rbx, %rdx
	xorl	%ecx, %ecx
	callq	_EVP_DigestSignInit
	testq	%rax, %rax
	jle	LBB0_4
## %bb.7:
	movq	-64(%rbp), %rdi
	movq	_EVP_PKEY_OP_SIGN@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movq	_EVP_PKEY_CTRL_PKCS7_SIGN@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	movl	$-1, %esi
	xorl	%r8d, %r8d
	movq	%r15, %r9
	callq	_EVP_PKEY_CTX_ctrl
	testq	%rax, %rax
	jle	LBB0_8
## %bb.9:
	movq	8(%r15), %rbx
	movq	_PKCS7_ATTR_SIGN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ASN1_ITEM_rptr
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_ASN1_item_i2d
	movq	-48(%rbp), %rsi
	testq	%rsi, %rsi
	je	LBB0_4
## %bb.10:
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_EVP_DigestSignUpdate
	testq	%rax, %rax
	jle	LBB0_4
## %bb.11:
	movq	-48(%rbp), %rdi
	callq	_OPENSSL_free
	movq	$0, -48(%rbp)
	leaq	-56(%rbp), %rdx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_EVP_DigestSignFinal
	testq	%rax, %rax
	jle	LBB0_4
## %bb.12:
	movq	-56(%rbp), %rdi
	callq	_OPENSSL_malloc
	movq	%rax, -48(%rbp)
	testq	%rax, %rax
	je	LBB0_4
## %bb.13:
	leaq	-56(%rbp), %rdx
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_EVP_DigestSignFinal
	testq	%rax, %rax
	jle	LBB0_4
## %bb.14:
	movq	-64(%rbp), %rdi
	movl	(%r12), %edx
	movl	(%r13), %ecx
	movl	$1, %ebx
	movl	$-1, %esi
	movl	$1, %r8d
	movq	%r15, %r9
	callq	_EVP_PKEY_CTX_ctrl
	testq	%rax, %rax
	jle	LBB0_8
## %bb.15:
	movq	%r14, %rdi
	callq	_EVP_MD_CTX_free
	movl	(%r15), %edi
	movq	-48(%rbp), %rsi
	movq	-56(%rbp), %rdx
	callq	_ASN1_STRING_set0
	jmp	LBB0_16
LBB0_2:
	movq	_PKCS7_F_PKCS7_SIGNER_INFO_SIGN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ERR_R_MALLOC_FAILURE@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_8:
	movq	_PKCS7_F_PKCS7_SIGNER_INFO_SIGN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_PKCS7_R_CTRL_ERROR@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %esi
	callq	_PKCS7err
LBB0_4:
	movq	-48(%rbp), %rdi
	callq	_OPENSSL_free
	movq	%r14, %rdi
	callq	_EVP_MD_CTX_free
LBB0_5:
	xorl	%ebx, %ebx
LBB0_16:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PKCS7_F_PKCS7_SIGNER_INFO_SIGN,4,2 ## @PKCS7_F_PKCS7_SIGNER_INFO_SIGN
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ## @ERR_R_MALLOC_FAILURE
	.comm	_EVP_PKEY_OP_SIGN,4,2           ## @EVP_PKEY_OP_SIGN
	.comm	_EVP_PKEY_CTRL_PKCS7_SIGN,4,2   ## @EVP_PKEY_CTRL_PKCS7_SIGN
	.comm	_PKCS7_R_CTRL_ERROR,4,2         ## @PKCS7_R_CTRL_ERROR
	.comm	_PKCS7_ATTR_SIGN,4,2            ## @PKCS7_ATTR_SIGN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_PKCS7_SIGNER_INFO_sign         ; -- Begin function PKCS7_SIGNER_INFO_sign
	.p2align	2
_PKCS7_SIGNER_INFO_sign:                ; @PKCS7_SIGNER_INFO_sign
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x0
	stp	xzr, xzr, [sp, #16]
	ldr	x8, [x0, #24]
	ldr	w0, [x8]
	bl	_EVP_get_digestbyobj
	cbz	x0, LBB0_15
; %bb.1:
	mov	x21, x0
	bl	_EVP_MD_CTX_new
	mov	x19, x0
	cbz	x0, LBB0_11
; %bb.2:
	ldr	w4, [x20, #16]
	add	x1, sp, #24
	mov	x0, x19
	mov	x2, x21
	mov	x3, #0
	bl	_EVP_DigestSignInit
	cmp	x0, #1
	b.lt	LBB0_14
; %bb.3:
	ldr	x0, [sp, #24]
Lloh0:
	adrp	x22, _EVP_PKEY_OP_SIGN@GOTPAGE
Lloh1:
	ldr	x22, [x22, _EVP_PKEY_OP_SIGN@GOTPAGEOFF]
	ldr	w2, [x22]
Lloh2:
	adrp	x23, _EVP_PKEY_CTRL_PKCS7_SIGN@GOTPAGE
Lloh3:
	ldr	x23, [x23, _EVP_PKEY_CTRL_PKCS7_SIGN@GOTPAGEOFF]
	ldr	w3, [x23]
	mov	w1, #-1
	mov	w4, #0
	mov	x5, x20
	bl	_EVP_PKEY_CTX_ctrl
	cmp	x0, #0
	b.le	LBB0_12
; %bb.4:
	ldr	x21, [x20, #8]
Lloh4:
	adrp	x8, _PKCS7_ATTR_SIGN@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PKCS7_ATTR_SIGN@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	bl	_ASN1_ITEM_rptr
	mov	x2, x0
	add	x1, sp, #16
	mov	x0, x21
	bl	_ASN1_item_i2d
	ldr	x1, [sp, #16]
	cbz	x1, LBB0_14
; %bb.5:
	mov	x2, x0
	mov	x0, x19
	bl	_EVP_DigestSignUpdate
	cmp	x0, #1
	b.lt	LBB0_14
; %bb.6:
	ldr	x0, [sp, #16]
	bl	_OPENSSL_free
	str	xzr, [sp, #16]
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, #0
	bl	_EVP_DigestSignFinal
	cmp	x0, #1
	b.lt	LBB0_14
; %bb.7:
	ldr	x0, [sp, #8]
	bl	_OPENSSL_malloc
	str	x0, [sp, #16]
	cbz	x0, LBB0_14
; %bb.8:
	mov	x1, x0
	add	x2, sp, #8
	mov	x0, x19
	bl	_EVP_DigestSignFinal
	cmp	x0, #1
	b.lt	LBB0_14
; %bb.9:
	ldr	x0, [sp, #24]
	ldr	w2, [x22]
	ldr	w3, [x23]
	mov	w1, #-1
	mov	w4, #1
	mov	x5, x20
	bl	_EVP_PKEY_CTX_ctrl
	cmp	x0, #0
	b.le	LBB0_12
; %bb.10:
	mov	x0, x19
	bl	_EVP_MD_CTX_free
	ldr	w0, [x20]
	ldp	x2, x1, [sp, #8]
	bl	_ASN1_STRING_set0
	mov	w0, #1
	b	LBB0_15
LBB0_11:
Lloh7:
	adrp	x8, _PKCS7_F_PKCS7_SIGNER_INFO_SIGN@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PKCS7_F_PKCS7_SIGNER_INFO_SIGN@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x8, _ERR_R_MALLOC_FAILURE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ERR_R_MALLOC_FAILURE@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:
Lloh12:
	adrp	x8, _PKCS7_F_PKCS7_SIGNER_INFO_SIGN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _PKCS7_F_PKCS7_SIGNER_INFO_SIGN@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
Lloh15:
	adrp	x8, _PKCS7_R_CTRL_ERROR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PKCS7_R_CTRL_ERROR@GOTPAGEOFF]
LBB0_13:
	ldr	w1, [x8]
	bl	_PKCS7err
LBB0_14:
	ldr	x0, [sp, #16]
	bl	_OPENSSL_free
	mov	x0, x19
	bl	_EVP_MD_CTX_free
	mov	w0, #0
LBB0_15:
	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
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_PKCS7_F_PKCS7_SIGNER_INFO_SIGN,4,2 ; @PKCS7_F_PKCS7_SIGNER_INFO_SIGN
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ; @ERR_R_MALLOC_FAILURE
	.comm	_EVP_PKEY_OP_SIGN,4,2           ; @EVP_PKEY_OP_SIGN
	.comm	_EVP_PKEY_CTRL_PKCS7_SIGN,4,2   ; @EVP_PKEY_CTRL_PKCS7_SIGN
	.comm	_PKCS7_R_CTRL_ERROR,4,2         ; @PKCS7_R_CTRL_ERROR
	.comm	_PKCS7_ATTR_SIGN,4,2            ; @PKCS7_ATTR_SIGN
.subsections_via_symbols
