	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tls_exec_server
_tls_exec_server:                       ## @tls_exec_server
	.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	%rcx, %r12
	movq	%rdx, %r13
	movl	%esi, %r14d
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movl	%r8d, %edi
	callq	_pjdlog_debug_set
	leaq	L_.str(%rip), %rdi
	callq	_pjdlog_prefix_set
	xorl	%eax, %eax
	callq	_SSL_load_error_strings
	xorl	%eax, %eax
	callq	_SSL_library_init
	xorl	%eax, %eax
	callq	_TLS_server_method
	movl	%eax, %edi
	callq	_SSL_CTX_new
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	movq	_EX_TEMPFAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_pjdlog_exitx
LBB0_2:
	movq	_SSL_OP_NO_SSLv2@GOTPCREL(%rip), %rax
	movq	_SSL_OP_NO_SSLv3@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_SSL_CTX_set_options
	movq	%rbx, %rdi
	callq	_SSL_new
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movq	_EX_TEMPFAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_pjdlog_exitx
LBB0_4:
	movq	_SSL_FILETYPE_PEM@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_SSL_use_RSAPrivateKey_file
	cmpl	$1, %eax
	je	LBB0_6
## %bb.5:
	xorl	%eax, %eax
	callq	_ssl_log_errors
	movq	_EX_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	movq	%r13, %rdx
	xorl	%eax, %eax
	callq	_pjdlog_exitx
LBB0_6:
	movl	(%r15), %edx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_SSL_use_certificate_file
	cmpl	$1, %eax
	je	LBB0_8
## %bb.7:
	xorl	%eax, %eax
	callq	_ssl_log_errors
	movq	_EX_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_pjdlog_exitx
LBB0_8:
	leal	1(%r14), %r12d
	leaq	L_.str.5(%rip), %rdx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	$1, %esi
	callq	_sandbox
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	movq	_EX_CONFIG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.6(%rip), %rsi
	xorl	%eax, %eax
	callq	_pjdlog_exitx
LBB0_10:
	leaq	L_.str.7(%rip), %rsi
	movl	$1, %edi
	callq	_pjdlog_debug
	movl	%r14d, %edi
	callq	_nonblock
	movl	%r12d, %edi
	callq	_nonblock
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_SSL_set_fd
	cmpl	$1, %eax
	je	LBB0_12
## %bb.11:
	movq	_EX_TEMPFAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.8(%rip), %rsi
	xorl	%eax, %eax
	callq	_pjdlog_exitx
LBB0_12:
	movq	%rbx, %rdi
	callq	_SSL_accept
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_ssl_check_error
	movl	%r14d, %edi
	movq	%rbx, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_tls_loop                       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[TLS sandbox] (server) "

	.comm	_EX_TEMPFAIL,4,2                ## @EX_TEMPFAIL
L_.str.1:                               ## @.str.1
	.asciz	"SSL_CTX_new() failed."

	.comm	_SSL_OP_NO_SSLv2,4,2            ## @SSL_OP_NO_SSLv2
	.comm	_SSL_OP_NO_SSLv3,4,2            ## @SSL_OP_NO_SSLv3
L_.str.2:                               ## @.str.2
	.asciz	"SSL_new() failed."

	.comm	_SSL_FILETYPE_PEM,4,2           ## @SSL_FILETYPE_PEM
	.comm	_EX_CONFIG,4,2                  ## @EX_CONFIG
L_.str.3:                               ## @.str.3
	.asciz	"SSL_use_RSAPrivateKey_file(%s) failed."

L_.str.4:                               ## @.str.4
	.asciz	"SSL_use_certificate_file(%s) failed."

L_.str.5:                               ## @.str.5
	.asciz	"proto_tls server"

L_.str.6:                               ## @.str.6
	.asciz	"Unable to sandbox TLS server."

L_.str.7:                               ## @.str.7
	.asciz	"Privileges successfully dropped."

L_.str.8:                               ## @.str.8
	.asciz	"SSL_set_fd() failed."

	.no_dead_strip	_tls_exec_server
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tls_exec_server
_tls_exec_server:                       ; @tls_exec_server
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x22, x3
	mov	x23, x2
	mov	x19, x1
	mov	x21, x0
	mov	x0, x4
	bl	_pjdlog_debug_set
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pjdlog_prefix_set
	bl	_SSL_load_error_strings
	bl	_SSL_library_init
	bl	_TLS_server_method
	bl	_SSL_CTX_new
	mov	x20, x0
	cbnz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _EX_TEMPFAIL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EX_TEMPFAIL@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_pjdlog_exitx
LBB0_2:
Lloh7:
	adrp	x8, _SSL_OP_NO_SSLv2@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SSL_OP_NO_SSLv2@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _SSL_OP_NO_SSLv3@GOTPAGE
Lloh11:
	ldr	x9, [x9, _SSL_OP_NO_SSLv3@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	x0, x20
	bl	_SSL_CTX_set_options
	mov	x0, x20
	bl	_SSL_new
	mov	x20, x0
	cbnz	x0, LBB0_4
; %bb.3:
Lloh13:
	adrp	x8, _EX_TEMPFAIL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EX_TEMPFAIL@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_pjdlog_exitx
LBB0_4:
Lloh18:
	adrp	x25, _SSL_FILETYPE_PEM@GOTPAGE
Lloh19:
	ldr	x25, [x25, _SSL_FILETYPE_PEM@GOTPAGEOFF]
	ldr	w2, [x25]
	mov	x0, x20
	mov	x1, x23
	bl	_SSL_use_RSAPrivateKey_file
Lloh20:
	adrp	x24, _EX_CONFIG@GOTPAGE
Lloh21:
	ldr	x24, [x24, _EX_CONFIG@GOTPAGEOFF]
	cmp	w0, #1
	b.eq	LBB0_6
; %bb.5:
	bl	_ssl_log_errors
	ldr	w0, [x24]
	str	x23, [sp]
Lloh22:
	adrp	x1, l_.str.3@PAGE
Lloh23:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_pjdlog_exitx
LBB0_6:
	add	w23, w19, #1
	ldr	w2, [x25]
	mov	x0, x20
	mov	x1, x22
	bl	_SSL_use_certificate_file
	cmp	w0, #1
	b.eq	LBB0_8
; %bb.7:
	bl	_ssl_log_errors
	ldr	w0, [x24]
	str	x22, [sp]
Lloh24:
	adrp	x1, l_.str.4@PAGE
Lloh25:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_pjdlog_exitx
LBB0_8:
Lloh26:
	adrp	x2, l_.str.5@PAGE
Lloh27:
	add	x2, x2, l_.str.5@PAGEOFF
	mov	x0, x21
	mov	w1, #1
	bl	_sandbox
	cbz	x0, LBB0_10
; %bb.9:
	ldr	w0, [x24]
Lloh28:
	adrp	x1, l_.str.6@PAGE
Lloh29:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_pjdlog_exitx
LBB0_10:
Lloh30:
	adrp	x1, l_.str.7@PAGE
Lloh31:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	w0, #1
	bl	_pjdlog_debug
	mov	x0, x19
	bl	_nonblock
	mov	x0, x23
	bl	_nonblock
	mov	x0, x20
	mov	x1, x23
	bl	_SSL_set_fd
	cmp	w0, #1
	b.eq	LBB0_12
; %bb.11:
Lloh32:
	adrp	x8, _EX_TEMPFAIL@GOTPAGE
Lloh33:
	ldr	x8, [x8, _EX_TEMPFAIL@GOTPAGEOFF]
Lloh34:
	ldr	w0, [x8]
Lloh35:
	adrp	x1, l_.str.8@PAGE
Lloh36:
	add	x1, x1, l_.str.8@PAGEOFF
	bl	_pjdlog_exitx
LBB0_12:
	mov	x0, x20
	bl	_SSL_accept
	mov	x1, x0
	mov	x0, x20
	bl	_ssl_check_error
	mov	x0, x19
	mov	x1, x20
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_tls_loop
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[TLS sandbox] (server) "

	.comm	_EX_TEMPFAIL,4,2                ; @EX_TEMPFAIL
l_.str.1:                               ; @.str.1
	.asciz	"SSL_CTX_new() failed."

	.comm	_SSL_OP_NO_SSLv2,4,2            ; @SSL_OP_NO_SSLv2
	.comm	_SSL_OP_NO_SSLv3,4,2            ; @SSL_OP_NO_SSLv3
l_.str.2:                               ; @.str.2
	.asciz	"SSL_new() failed."

	.comm	_SSL_FILETYPE_PEM,4,2           ; @SSL_FILETYPE_PEM
	.comm	_EX_CONFIG,4,2                  ; @EX_CONFIG
l_.str.3:                               ; @.str.3
	.asciz	"SSL_use_RSAPrivateKey_file(%s) failed."

l_.str.4:                               ; @.str.4
	.asciz	"SSL_use_certificate_file(%s) failed."

l_.str.5:                               ; @.str.5
	.asciz	"proto_tls server"

l_.str.6:                               ; @.str.6
	.asciz	"Unable to sandbox TLS server."

l_.str.7:                               ; @.str.7
	.asciz	"Privileges successfully dropped."

l_.str.8:                               ; @.str.8
	.asciz	"SSL_set_fd() failed."

	.no_dead_strip	_tls_exec_server
.subsections_via_symbols
