	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ess_add_signing_cert_v2
_ess_add_signing_cert_v2:               ## @ess_add_signing_cert_v2
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	%rsi, %rdi
	xorl	%esi, %esi
	callq	_i2d_ESS_SIGNING_CERT_V2
	movl	%eax, %r12d
	movl	%eax, %edi
	callq	_OPENSSL_malloc
	movq	%rax, %r13
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%r13, -48(%rbp)
	leaq	-48(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_i2d_ESS_SIGNING_CERT_V2
	xorl	%eax, %eax
	callq	_ASN1_STRING_new
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%r15, %rdi
	movq	%r13, %rsi
	movl	%r12d, %edx
	callq	_ASN1_STRING_set
	testl	%eax, %eax
	je	LBB0_4
## %bb.7:
	movq	%r13, %rdi
	callq	_OPENSSL_free
	movq	_NID_id_smime_aa_signingCertificateV2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_V_ASN1_SEQUENCE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movq	%r15, %rcx
	callq	_PKCS7_add_signed_attribute
	jmp	LBB0_6
LBB0_1:
	movq	_TS_F_ESS_ADD_SIGNING_CERT_V2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ERR_R_MALLOC_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_TSerr
	xorl	%r15d, %r15d
	jmp	LBB0_5
LBB0_4:
	movq	_TS_F_ESS_ADD_SIGNING_CERT_V2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ERR_R_MALLOC_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_TSerr
LBB0_5:
	movq	%r15, %rdi
	callq	_ASN1_STRING_free
	movq	%r13, %rdi
	callq	_OPENSSL_free
	xorl	%eax, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TS_F_ESS_ADD_SIGNING_CERT_V2,4,2 ## @TS_F_ESS_ADD_SIGNING_CERT_V2
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ## @ERR_R_MALLOC_FAILURE
	.comm	_NID_id_smime_aa_signingCertificateV2,4,2 ## @NID_id_smime_aa_signingCertificateV2
	.comm	_V_ASN1_SEQUENCE,4,2            ## @V_ASN1_SEQUENCE
	.no_dead_strip	_ess_add_signing_cert_v2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ess_add_signing_cert_v2
_ess_add_signing_cert_v2:               ; @ess_add_signing_cert_v2
	.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	x21, x1
	mov	x20, x0
	mov	x0, x1
	mov	x1, #0
	bl	_i2d_ESS_SIGNING_CERT_V2
	mov	x22, x0
	bl	_OPENSSL_malloc
	mov	x19, x0
	cbz	x0, LBB0_4
; %bb.1:
	str	x19, [sp, #8]
	add	x1, sp, #8
	mov	x0, x21
	bl	_i2d_ESS_SIGNING_CERT_V2
	bl	_ASN1_STRING_new
	mov	x21, x0
	cbz	x0, LBB0_5
; %bb.2:
	mov	x0, x21
	mov	x1, x19
	mov	x2, x22
	bl	_ASN1_STRING_set
	cbz	w0, LBB0_5
; %bb.3:
	mov	x0, x19
	bl	_OPENSSL_free
Lloh0:
	adrp	x8, _NID_id_smime_aa_signingCertificateV2@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NID_id_smime_aa_signingCertificateV2@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _V_ASN1_SEQUENCE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _V_ASN1_SEQUENCE@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x20
	mov	x3, x21
	bl	_PKCS7_add_signed_attribute
	b	LBB0_7
LBB0_4:
Lloh6:
	adrp	x8, _TS_F_ESS_ADD_SIGNING_CERT_V2@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TS_F_ESS_ADD_SIGNING_CERT_V2@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x8, _ERR_R_MALLOC_FAILURE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ERR_R_MALLOC_FAILURE@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_TSerr
	mov	x21, #0
	b	LBB0_6
LBB0_5:
Lloh12:
	adrp	x8, _TS_F_ESS_ADD_SIGNING_CERT_V2@GOTPAGE
Lloh13:
	ldr	x8, [x8, _TS_F_ESS_ADD_SIGNING_CERT_V2@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
Lloh15:
	adrp	x8, _ERR_R_MALLOC_FAILURE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ERR_R_MALLOC_FAILURE@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	bl	_TSerr
LBB0_6:
	mov	x0, x21
	bl	_ASN1_STRING_free
	mov	x0, x19
	bl	_OPENSSL_free
	mov	w0, #0
LBB0_7:
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_TS_F_ESS_ADD_SIGNING_CERT_V2,4,2 ; @TS_F_ESS_ADD_SIGNING_CERT_V2
	.comm	_ERR_R_MALLOC_FAILURE,4,2       ; @ERR_R_MALLOC_FAILURE
	.comm	_NID_id_smime_aa_signingCertificateV2,4,2 ; @NID_id_smime_aa_signingCertificateV2
	.comm	_V_ASN1_SEQUENCE,4,2            ; @V_ASN1_SEQUENCE
	.no_dead_strip	_ess_add_signing_cert_v2
.subsections_via_symbols
