	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.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	_CMS_DETACHED@GOTPCREL(%rip), %rax
	movq	_CMS_STREAM@GOTPCREL(%rip), %r13
	movl	(%r13), %r15d
	orl	(%rax), %r15d
	xorl	%eax, %eax
	callq	_OpenSSL_add_all_algorithms
	xorl	%eax, %eax
	callq	_ERR_load_crypto_strings
	leaq	L_.str(%rip), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_BIO_new_file
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_PEM_read_bio_X509
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_BIO_reset
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_PEM_read_bio_PrivateKey
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	testq	%rbx, %rbx
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	je	LBB0_5
## %bb.3:
	movq	%rax, %r12
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	L_.str.2(%rip), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_BIO_new_file
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%r13, %rbx
	xorl	%r13d, %r13d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	xorl	%edx, %edx
	movq	%rax, %rcx
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	%r15d, %r8d
	callq	_CMS_sign
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %r12
	leaq	L_.str.3(%rip), %rdi
	leaq	L_.str.4(%rip), %rsi
	callq	_BIO_new_file
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	movq	%rax, %r13
	testl	%r15d, (%rbx)
	jne	LBB0_12
## %bb.11:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_BIO_reset
LBB0_12:
	movq	%r13, %rdi
	movq	%r12, %rsi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	%r15d, %ecx
	callq	_SMIME_write_CMS
	xorl	%ebx, %ebx
	testl	%eax, %eax
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	jne	LBB0_14
	jmp	LBB0_13
LBB0_5:
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
LBB0_9:
	xorl	%r13d, %r13d
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_13
LBB0_1:
	xorl	%eax, %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	xorl	%r13d, %r13d
LBB0_13:
	movq	_stderr@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	leaq	L_.str.5(%rip), %rsi
	callq	_fprintf
	movl	(%rbx), %edi
	callq	_ERR_print_errors_fp
	movl	$1, %ebx
LBB0_14:
	movq	%r12, %rdi
	callq	_CMS_ContentInfo_free
	movq	%r15, %rdi
	callq	_X509_free
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_EVP_PKEY_free
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_BIO_free
	movq	%r13, %rdi
	callq	_BIO_free
	movq	%r14, %rdi
	callq	_BIO_free
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	xorl	%r12d, %r12d
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_CMS_DETACHED,4,2               ## @CMS_DETACHED
	.comm	_CMS_STREAM,4,2                 ## @CMS_STREAM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"signer.pem"

L_.str.1:                               ## @.str.1
	.asciz	"r"

L_.str.2:                               ## @.str.2
	.asciz	"sign.txt"

L_.str.3:                               ## @.str.3
	.asciz	"smout.txt"

L_.str.4:                               ## @.str.4
	.asciz	"w"

	.comm	_stderr,4,2                     ## @stderr
L_.str.5:                               ## @.str.5
	.asciz	"Error Signing Data\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
Lloh0:
	adrp	x8, _CMS_DETACHED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CMS_DETACHED@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
Lloh3:
	adrp	x26, _CMS_STREAM@GOTPAGE
Lloh4:
	ldr	x26, [x26, _CMS_STREAM@GOTPAGEOFF]
	ldr	w24, [x26]
	bl	_OpenSSL_add_all_algorithms
	bl	_ERR_load_crypto_strings
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_BIO_new_file
	mov	x19, x0
	cbz	x0, LBB0_10
; %bb.1:
	mov	x0, x19
	mov	x1, #0
	mov	w2, #0
	mov	x3, #0
	bl	_PEM_read_bio_X509
	mov	x20, x0
	mov	x0, x19
	bl	_BIO_reset
	mov	x0, x19
	mov	x1, #0
	mov	w2, #0
	mov	x3, #0
	bl	_PEM_read_bio_PrivateKey
	mov	x21, x0
	mov	x22, #0
	cbz	x20, LBB0_11
; %bb.2:
	cbz	x21, LBB0_11
; %bb.3:
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_BIO_new_file
	mov	x22, x0
	cbz	x0, LBB0_12
; %bb.4:
	orr	w25, w24, w23
	mov	x0, x20
	mov	x1, x21
	mov	x2, #0
	mov	x3, x22
	mov	x4, x25
	bl	_CMS_sign
	mov	x23, x0
	cbz	x0, LBB0_13
; %bb.5:
Lloh13:
	adrp	x0, l_.str.3@PAGE
Lloh14:
	add	x0, x0, l_.str.3@PAGEOFF
Lloh15:
	adrp	x1, l_.str.4@PAGE
Lloh16:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_BIO_new_file
	mov	x24, x0
	cbz	x0, LBB0_14
; %bb.6:
	ldr	w8, [x26]
	tst	w8, w25
	b.ne	LBB0_8
; %bb.7:
	mov	x0, x22
	bl	_BIO_reset
LBB0_8:
	mov	x0, x24
	mov	x1, x23
	mov	x2, x22
	mov	x3, x25
	bl	_SMIME_write_CMS
	cbz	w0, LBB0_14
; %bb.9:
	mov	w25, #0
	b	LBB0_15
LBB0_10:
	mov	x22, #0
	mov	x23, #0
	mov	x21, #0
	mov	x20, #0
	b	LBB0_13
LBB0_11:
	mov	x23, x22
	mov	x24, x22
	b	LBB0_14
LBB0_12:
	mov	x23, #0
LBB0_13:
	mov	x24, #0
LBB0_14:
Lloh17:
	adrp	x25, _stderr@GOTPAGE
Lloh18:
	ldr	x25, [x25, _stderr@GOTPAGEOFF]
	ldr	w0, [x25]
Lloh19:
	adrp	x1, l_.str.5@PAGE
Lloh20:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_fprintf
	ldr	w0, [x25]
	bl	_ERR_print_errors_fp
	mov	w25, #1
LBB0_15:
	mov	x0, x23
	bl	_CMS_ContentInfo_free
	mov	x0, x20
	bl	_X509_free
	mov	x0, x21
	bl	_EVP_PKEY_free
	mov	x0, x22
	bl	_BIO_free
	mov	x0, x24
	bl	_BIO_free
	mov	x0, x19
	bl	_BIO_free
	mov	x0, x25
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_CMS_DETACHED,4,2               ; @CMS_DETACHED
	.comm	_CMS_STREAM,4,2                 ; @CMS_STREAM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"signer.pem"

l_.str.1:                               ; @.str.1
	.asciz	"r"

l_.str.2:                               ; @.str.2
	.asciz	"sign.txt"

l_.str.3:                               ; @.str.3
	.asciz	"smout.txt"

l_.str.4:                               ; @.str.4
	.asciz	"w"

	.comm	_stderr,4,2                     ; @stderr
l_.str.5:                               ; @.str.5
	.asciz	"Error Signing Data\n"

.subsections_via_symbols
