	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sign
_sign:                                  ## @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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %ebx
	movq	%rsi, %r15
	movq	%rdi, %r12
	xorl	%edi, %edi
	testq	%r12, %r12
	setne	%dil
	callq	_assert
	xorl	%edi, %edi
	testq	%r15, %r15
	setne	%dil
	callq	_assert
	leaq	-64(%rbp), %rdi
	leaq	-56(%rbp), %rsi
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edx
	callq	_receive_chunk
	movq	-64(%rbp), %rdi
	movq	-56(%rbp), %rsi
	callq	_BIO_new_mem_buf
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ERR_print_errors_fp
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_2:
	movq	_PKCS7_BINARY@GOTPCREL(%rip), %rax
	movq	_PKCS7_PARTIAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	orl	(%rax), %r8d
	xorl	%edi, %edi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movq	%rbx, %rcx
	callq	_PKCS7_sign
	movq	%rax, %r13
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ERR_print_errors_fp
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_4:
	movq	_DIGEST@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_EVP_get_digestbyname
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ERR_print_errors_fp
	movl	(%r14), %edx
	leaq	L_.str.2(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_6:
	movq	%r13, %rdi
	movq	%r12, %rsi
	movq	%r15, %rdx
	movq	%rbx, %rcx
	xorl	%r8d, %r8d
	callq	_PKCS7_sign_add_signer
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_8
## %bb.7:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ERR_print_errors_fp
	leaq	L_.str.3(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_8:
	movq	_NID_pkcs9_contentType@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	_V_ASN1_OBJECT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	leaq	L_.str.4(%rip), %rdi
	movl	$1, %esi
	callq	_OBJ_txt2obj
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	%ebx, %edx
	movl	%eax, %ecx
	callq	_PKCS7_add_signed_attribute
	movq	-64(%rbp), %rsi
	movq	-56(%rbp), %rdx
	movq	%r13, %rdi
	callq	_magic
	xorl	%eax, %eax
	callq	_BIO_s_mem
	movl	%eax, %edi
	callq	_BIO_new
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_10
## %bb.9:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ERR_print_errors_fp
	leaq	L_.str.5(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_10:
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_i2d_PKCS7_bio
	testl	%eax, %eax
	jne	LBB0_12
## %bb.11:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ERR_print_errors_fp
	leaq	L_.str.6(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_12:
	leaq	-72(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_BIO_get_mem_data
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_14
## %bb.13:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_ERR_print_errors_fp
	leaq	L_.str.7(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_errx
LBB0_14:
	movq	_BIO_NOCLOSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_BIO_set_close
	movq	%rbx, %rdi
	callq	_BIO_free
	movq	-72(%rbp), %rdi
	movq	%r15, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_send_chunk
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"BIO_new_mem_buf(3) failed"

	.comm	_PKCS7_BINARY,4,2               ## @PKCS7_BINARY
	.comm	_PKCS7_PARTIAL,4,2              ## @PKCS7_PARTIAL
L_.str.1:                               ## @.str.1
	.asciz	"PKCS7_sign(3) failed"

	.comm	_DIGEST,4,2                     ## @DIGEST
L_.str.2:                               ## @.str.2
	.asciz	"EVP_get_digestbyname(\"%s\") failed"

L_.str.3:                               ## @.str.3
	.asciz	"PKCS7_sign_add_signer(3) failed"

	.comm	_NID_pkcs9_contentType,4,2      ## @NID_pkcs9_contentType
	.comm	_V_ASN1_OBJECT,4,2              ## @V_ASN1_OBJECT
L_.str.4:                               ## @.str.4
	.asciz	"1.3.6.1.4.1.311.2.1.4"

L_.str.5:                               ## @.str.5
	.asciz	"BIO_new(3) failed"

L_.str.6:                               ## @.str.6
	.asciz	"i2d_PKCS7_bio(3) failed"

L_.str.7:                               ## @.str.7
	.asciz	"BIO_get_mem_data(3) failed"

	.comm	_BIO_NOCLOSE,4,2                ## @BIO_NOCLOSE
	.comm	_stdout,4,2                     ## @stdout
	.no_dead_strip	_sign
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sign
_sign:                                  ; @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	x19, x2
	mov	x21, x1
	mov	x22, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_assert
	cmp	x21, #0
	cset	w0, ne
	bl	_assert
	add	x0, sp, #24
	add	x1, sp, #8
	mov	x2, x19
	bl	_receive_chunk
	ldr	x0, [sp, #24]
	ldr	x1, [sp, #8]
	bl	_BIO_new_mem_buf
	mov	x20, x0
	cbnz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _stderr@GOTPAGE
Lloh1:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_ERR_print_errors_fp
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_2:
Lloh5:
	adrp	x8, _PKCS7_BINARY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PKCS7_BINARY@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _PKCS7_PARTIAL@GOTPAGE
Lloh9:
	ldr	x9, [x9, _PKCS7_PARTIAL@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w4, w9, w8
	mov	x0, #0
	mov	x1, #0
	mov	x2, #0
	mov	x3, x20
	bl	_PKCS7_sign
	mov	x20, x0
	cbnz	x0, LBB0_4
; %bb.3:
Lloh11:
	adrp	x8, _stderr@GOTPAGE
Lloh12:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_ERR_print_errors_fp
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_4:
Lloh16:
	adrp	x24, _DIGEST@GOTPAGE
Lloh17:
	ldr	x24, [x24, _DIGEST@GOTPAGEOFF]
	ldr	w0, [x24]
	bl	_EVP_get_digestbyname
	mov	x23, x0
	cbnz	x0, LBB0_6
; %bb.5:
Lloh18:
	adrp	x8, _stderr@GOTPAGE
Lloh19:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	bl	_ERR_print_errors_fp
	ldr	w8, [x24]
	str	x8, [sp]
Lloh21:
	adrp	x1, l_.str.2@PAGE
Lloh22:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_6:
	mov	x0, x20
	mov	x1, x22
	mov	x2, x21
	mov	x3, x23
	mov	w4, #0
	bl	_PKCS7_sign_add_signer
	mov	x21, x0
	cbnz	x0, LBB0_8
; %bb.7:
Lloh23:
	adrp	x8, _stderr@GOTPAGE
Lloh24:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	bl	_ERR_print_errors_fp
Lloh26:
	adrp	x1, l_.str.3@PAGE
Lloh27:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_8:
Lloh28:
	adrp	x8, _NID_pkcs9_contentType@GOTPAGE
Lloh29:
	ldr	x8, [x8, _NID_pkcs9_contentType@GOTPAGEOFF]
Lloh30:
	ldr	w22, [x8]
Lloh31:
	adrp	x8, _V_ASN1_OBJECT@GOTPAGE
Lloh32:
	ldr	x8, [x8, _V_ASN1_OBJECT@GOTPAGEOFF]
Lloh33:
	ldr	w23, [x8]
Lloh34:
	adrp	x0, l_.str.4@PAGE
Lloh35:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	w1, #1
	bl	_OBJ_txt2obj
	mov	x3, x0
	mov	x0, x21
	mov	x1, x22
	mov	x2, x23
	bl	_PKCS7_add_signed_attribute
	ldr	x1, [sp, #24]
	ldr	x2, [sp, #8]
	mov	x0, x20
	bl	_magic
	bl	_BIO_s_mem
	bl	_BIO_new
	mov	x21, x0
	cbnz	x0, LBB0_10
; %bb.9:
Lloh36:
	adrp	x8, _stderr@GOTPAGE
Lloh37:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh38:
	ldr	w0, [x8]
	bl	_ERR_print_errors_fp
Lloh39:
	adrp	x1, l_.str.5@PAGE
Lloh40:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_10:
	mov	x0, x21
	mov	x1, x20
	bl	_i2d_PKCS7_bio
	cbnz	w0, LBB0_12
; %bb.11:
Lloh41:
	adrp	x8, _stderr@GOTPAGE
Lloh42:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh43:
	ldr	w0, [x8]
	bl	_ERR_print_errors_fp
Lloh44:
	adrp	x1, l_.str.6@PAGE
Lloh45:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_12:
	add	x1, sp, #16
	mov	x0, x21
	bl	_BIO_get_mem_data
	mov	x20, x0
	cbnz	x0, LBB0_14
; %bb.13:
Lloh46:
	adrp	x8, _stderr@GOTPAGE
Lloh47:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh48:
	ldr	w0, [x8]
	bl	_ERR_print_errors_fp
Lloh49:
	adrp	x1, l_.str.7@PAGE
Lloh50:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	w0, #1
	bl	_errx
LBB0_14:
Lloh51:
	adrp	x8, _BIO_NOCLOSE@GOTPAGE
Lloh52:
	ldr	x8, [x8, _BIO_NOCLOSE@GOTPAGEOFF]
Lloh53:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_BIO_set_close
	mov	x0, x21
	bl	_BIO_free
	ldr	x0, [sp, #16]
	mov	x1, x20
	mov	x2, x19
	bl	_send_chunk
	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 AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.cfi_endproc
                                        ; -- End function
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"BIO_new_mem_buf(3) failed"

	.comm	_PKCS7_BINARY,4,2               ; @PKCS7_BINARY
	.comm	_PKCS7_PARTIAL,4,2              ; @PKCS7_PARTIAL
l_.str.1:                               ; @.str.1
	.asciz	"PKCS7_sign(3) failed"

	.comm	_DIGEST,4,2                     ; @DIGEST
l_.str.2:                               ; @.str.2
	.asciz	"EVP_get_digestbyname(\"%s\") failed"

l_.str.3:                               ; @.str.3
	.asciz	"PKCS7_sign_add_signer(3) failed"

	.comm	_NID_pkcs9_contentType,4,2      ; @NID_pkcs9_contentType
	.comm	_V_ASN1_OBJECT,4,2              ; @V_ASN1_OBJECT
l_.str.4:                               ; @.str.4
	.asciz	"1.3.6.1.4.1.311.2.1.4"

l_.str.5:                               ; @.str.5
	.asciz	"BIO_new(3) failed"

l_.str.6:                               ; @.str.6
	.asciz	"i2d_PKCS7_bio(3) failed"

l_.str.7:                               ; @.str.7
	.asciz	"BIO_get_mem_data(3) failed"

	.comm	_BIO_NOCLOSE,4,2                ; @BIO_NOCLOSE
	.comm	_stdout,4,2                     ; @stdout
	.no_dead_strip	_sign
.subsections_via_symbols
