	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function remote_setup_ctx
_remote_setup_ctx:                      ## @remote_setup_ctx
	.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, %r13
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_SSLv23_server_method
	movl	%eax, %edi
	callq	_SSL_CTX_new
	movl	%eax, (%r13)
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	%eax, %edi
	callq	_listen_sslctx_setup
	testl	%eax, %eax
	je	LBB0_17
## %bb.3:
	movl	4(%rbx), %edi
	movq	%rbx, %rsi
	movl	$1, %edx
	callq	_fname_after_chroot
	movq	%rax, %r14
	movl	(%rbx), %edi
	movq	%rbx, %rsi
	movl	$1, %edx
	callq	_fname_after_chroot
	movq	%rax, %r15
	testq	%r14, %r14
	je	LBB0_5
## %bb.4:
	testq	%r15, %r15
	je	LBB0_5
## %bb.6:
	movq	_VERB_ALGO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_verbose
	movl	(%r13), %edi
	movq	%r14, %rsi
	callq	_SSL_CTX_use_certificate_chain_file
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	movl	(%r13), %edi
	movq	_SSL_FILETYPE_PEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rsi
	callq	_SSL_CTX_use_PrivateKey_file
	testl	%eax, %eax
	je	LBB0_9
## %bb.10:
	movl	(%r13), %edi
	callq	_SSL_CTX_check_private_key
	testl	%eax, %eax
	je	LBB0_11
## %bb.12:
	movl	(%r13), %edi
	callq	_listen_sslctx_setup_2
	movl	(%r13), %edi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_SSL_CTX_load_verify_locations
	testl	%eax, %eax
	je	LBB0_13
## %bb.16:
	movl	(%r13), %ebx
	movq	%r14, %rdi
	callq	_SSL_load_client_CA_file
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_SSL_CTX_set_client_CA_list
	movl	(%r13), %edi
	movq	_SSL_VERIFY_PEER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_SSL_CTX_set_verify
	movq	%r14, %rdi
	callq	_free
	movq	%r15, %rdi
	callq	_free
	movl	$1, %r12d
	jmp	LBB0_17
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_log_crypto_err
	jmp	LBB0_17
LBB0_5:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_log_err
	jmp	LBB0_15
LBB0_7:
	leaq	L_.str.3(%rip), %rdi
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_log_err
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_14
LBB0_9:
	leaq	L_.str.5(%rip), %rdi
	movq	%r15, %rsi
	xorl	%eax, %eax
	callq	_log_err
	leaq	L_.str.6(%rip), %rdi
	jmp	LBB0_14
LBB0_11:
	leaq	L_.str.5(%rip), %rdi
	movq	%r15, %rsi
	xorl	%eax, %eax
	callq	_log_err
	leaq	L_.str.7(%rip), %rdi
	jmp	LBB0_14
LBB0_13:
	leaq	L_.str.8(%rip), %rdi
LBB0_14:
	callq	_log_crypto_err
LBB0_15:
	movq	%r14, %rdi
	callq	_free
	movq	%r15, %rdi
	callq	_free
LBB0_17:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"could not SSL_CTX_new"

L_.str.1:                               ## @.str.1
	.asciz	"out of memory in remote control fname"

	.comm	_VERB_ALGO,4,2                  ## @VERB_ALGO
L_.str.2:                               ## @.str.2
	.asciz	"setup SSL certificates"

L_.str.3:                               ## @.str.3
	.asciz	"Error for server-cert-file: %s"

L_.str.4:                               ## @.str.4
	.asciz	"Error in SSL_CTX use_certificate_chain_file"

	.comm	_SSL_FILETYPE_PEM,4,2           ## @SSL_FILETYPE_PEM
L_.str.5:                               ## @.str.5
	.asciz	"Error for server-key-file: %s"

L_.str.6:                               ## @.str.6
	.asciz	"Error in SSL_CTX use_PrivateKey_file"

L_.str.7:                               ## @.str.7
	.asciz	"Error in SSL_CTX check_private_key"

L_.str.8:                               ## @.str.8
	.asciz	"Error setting up SSL_CTX verify locations"

	.comm	_SSL_VERIFY_PEER,4,2            ## @SSL_VERIFY_PEER
	.no_dead_strip	_remote_setup_ctx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function remote_setup_ctx
_remote_setup_ctx:                      ; @remote_setup_ctx
	.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, x1
	mov	x21, x0
	bl	_SSLv23_server_method
	bl	_SSL_CTX_new
	str	w0, [x21]
	cbz	w0, LBB0_9
; %bb.1:
	bl	_listen_sslctx_setup
	cbz	w0, LBB0_18
; %bb.2:
	ldr	w0, [x20, #4]
	mov	x1, x20
	mov	w2, #1
	bl	_fname_after_chroot
	mov	x19, x0
	ldr	w0, [x20]
	mov	x1, x20
	mov	w2, #1
	bl	_fname_after_chroot
	mov	x20, x0
	cbz	x19, LBB0_10
; %bb.3:
	cbz	x20, LBB0_10
; %bb.4:
Lloh0:
	adrp	x8, _VERB_ALGO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VERB_ALGO@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str.2@PAGE
Lloh4:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_verbose
	ldr	w0, [x21]
	mov	x1, x19
	bl	_SSL_CTX_use_certificate_chain_file
	cbz	w0, LBB0_11
; %bb.5:
	ldr	w0, [x21]
Lloh5:
	adrp	x8, _SSL_FILETYPE_PEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SSL_FILETYPE_PEM@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x1, x20
	bl	_SSL_CTX_use_PrivateKey_file
	cbz	w0, LBB0_12
; %bb.6:
	ldr	w0, [x21]
	bl	_SSL_CTX_check_private_key
	cbz	w0, LBB0_13
; %bb.7:
	ldr	w0, [x21]
	bl	_listen_sslctx_setup_2
	ldr	w0, [x21]
	mov	x1, x19
	mov	x2, #0
	bl	_SSL_CTX_load_verify_locations
	cbz	w0, LBB0_14
; %bb.8:
	ldr	w22, [x21]
	mov	x0, x19
	bl	_SSL_load_client_CA_file
	mov	x1, x0
	mov	x0, x22
	bl	_SSL_CTX_set_client_CA_list
	ldr	w0, [x21]
Lloh8:
	adrp	x8, _SSL_VERIFY_PEER@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SSL_VERIFY_PEER@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x2, #0
	bl	_SSL_CTX_set_verify
	mov	x0, x19
	bl	_free
	mov	x0, x20
	bl	_free
	mov	w0, #1
	b	LBB0_18
LBB0_9:
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	bl	_log_crypto_err
	b	LBB0_17
LBB0_10:
Lloh13:
	adrp	x0, l_.str.1@PAGE
Lloh14:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_log_err
	b	LBB0_16
LBB0_11:
	str	x19, [sp]
Lloh15:
	adrp	x0, l_.str.3@PAGE
Lloh16:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_log_err
Lloh17:
	adrp	x0, l_.str.4@PAGE
Lloh18:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_15
LBB0_12:
	str	x20, [sp]
Lloh19:
	adrp	x0, l_.str.5@PAGE
Lloh20:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_log_err
Lloh21:
	adrp	x0, l_.str.6@PAGE
Lloh22:
	add	x0, x0, l_.str.6@PAGEOFF
	b	LBB0_15
LBB0_13:
	str	x20, [sp]
Lloh23:
	adrp	x0, l_.str.5@PAGE
Lloh24:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_log_err
Lloh25:
	adrp	x0, l_.str.7@PAGE
Lloh26:
	add	x0, x0, l_.str.7@PAGEOFF
	b	LBB0_15
LBB0_14:
Lloh27:
	adrp	x0, l_.str.8@PAGE
Lloh28:
	add	x0, x0, l_.str.8@PAGEOFF
LBB0_15:
	bl	_log_crypto_err
LBB0_16:
	mov	x0, x19
	bl	_free
	mov	x0, x20
	bl	_free
LBB0_17:
	mov	w0, #0
LBB0_18:
	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 AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"could not SSL_CTX_new"

l_.str.1:                               ; @.str.1
	.asciz	"out of memory in remote control fname"

	.comm	_VERB_ALGO,4,2                  ; @VERB_ALGO
l_.str.2:                               ; @.str.2
	.asciz	"setup SSL certificates"

l_.str.3:                               ; @.str.3
	.asciz	"Error for server-cert-file: %s"

l_.str.4:                               ; @.str.4
	.asciz	"Error in SSL_CTX use_certificate_chain_file"

	.comm	_SSL_FILETYPE_PEM,4,2           ; @SSL_FILETYPE_PEM
l_.str.5:                               ; @.str.5
	.asciz	"Error for server-key-file: %s"

l_.str.6:                               ; @.str.6
	.asciz	"Error in SSL_CTX use_PrivateKey_file"

l_.str.7:                               ; @.str.7
	.asciz	"Error in SSL_CTX check_private_key"

l_.str.8:                               ; @.str.8
	.asciz	"Error setting up SSL_CTX verify locations"

	.comm	_SSL_VERIFY_PEER,4,2            ; @SSL_VERIFY_PEER
	.no_dead_strip	_remote_setup_ctx
.subsections_via_symbols
