	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tls_connect
_tls_connect:                           ## @tls_connect
	.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, %r14
	movl	%edx, %r15d
	movq	%rsi, %r12
	movq	%rdi, %rbx
	testq	%rdi, %rdi
	je	LBB0_1
## %bb.2:
	xorl	%edi, %edi
	cmpb	$0, (%rbx)
	setne	%dil
	jmp	LBB0_3
LBB0_1:
	movl	$1, %edi
LBB0_3:
	callq	_PJDLOG_ASSERT
	xorl	%edi, %edi
	testq	%r12, %r12
	setne	%dil
	callq	_PJDLOG_ASSERT
	xorl	%edi, %edi
	cmpl	$-1, %r15d
	setge	%dil
	callq	_PJDLOG_ASSERT
	xorl	%edi, %edi
	testq	%r14, %r14
	setne	%dil
	callq	_PJDLOG_ASSERT
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movl	$6, %edx
	callq	_strncmp
	movl	$-1, %r13d
	testq	%rax, %rax
	je	LBB0_4
LBB0_18:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	testq	%rbx, %rbx
	je	LBB0_6
## %bb.5:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	$6, %edx
	callq	_strncmp
	testq	%rax, %rax
	jne	LBB0_18
LBB0_6:
	leaq	L_.str.1(%rip), %rsi
	leaq	-48(%rbp), %rcx
	xorl	%edi, %edi
	movl	$-1, %edx
	callq	_proto_connect
	cmpl	$-1, %eax
	je	LBB0_7
## %bb.8:
	xorl	%eax, %eax
	callq	_fork
	movl	%eax, %r13d
	testl	%eax, %eax
	je	LBB0_11
## %bb.9:
	cmpl	$-1, %r13d
	jne	LBB0_12
## %bb.10:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	-48(%rbp), %rdi
	callq	_proto_close
	jmp	LBB0_18
LBB0_7:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	jmp	LBB0_18
LBB0_11:
	leaq	L_.str.2(%rip), %rdi
	callq	_pjdlog_prefix_set
	movq	-48(%rbp), %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	movl	%r15d, %ecx
	callq	_tls_call_exec_client
LBB0_12:
	movl	%r13d, %r12d
	movl	$1, %edi
	movl	$32, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_13
## %bb.14:
	movq	%rax, %rbx
	movq	-48(%rbp), %rdi
	xorl	%r13d, %r13d
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_proto_send
	movq	-48(%rbp), %rax
	movq	%rax, 24(%rbx)
	movq	$0, 16(%rbx)
	movq	_TLS_SIDE_CLIENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movl	$0, (%rbx)
	movq	_TLS_CTX_MAGIC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
	testl	%r15d, %r15d
	js	LBB0_17
## %bb.15:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_tls_connect_wait
	testl	%eax, %eax
	je	LBB0_17
## %bb.16:
	movl	%eax, %r15d
	movq	_SIGKILL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edi
	callq	_kill
	movq	%rbx, %rdi
	callq	_tls_close
	movl	%r15d, %r13d
	jmp	LBB0_18
LBB0_13:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	-48(%rbp), %rdi
	callq	_proto_close
	movq	_SIGKILL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r12d, %edi
	callq	_kill
	jmp	LBB0_18
LBB0_17:
	movq	%rbx, (%r14)
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tls://"

L_.str.1:                               ## @.str.1
	.asciz	"socketpair://"

	.comm	_errno,4,2                      ## @errno
L_.str.2:                               ## @.str.2
	.asciz	"[TLS sandbox] (client) "

	.comm	_SIGKILL,4,2                    ## @SIGKILL
	.comm	_TLS_SIDE_CLIENT,4,2            ## @TLS_SIDE_CLIENT
	.comm	_TLS_CTX_MAGIC,4,2              ## @TLS_CTX_MAGIC
	.comm	_RFFDG,4,2                      ## @RFFDG
	.comm	_RFPROC,4,2                     ## @RFPROC
	.comm	_RFTSIGZMB,4,2                  ## @RFTSIGZMB
	.no_dead_strip	_tls_connect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tls_connect
_tls_connect:                           ; @tls_connect
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	cbz	x0, LBB0_2
; %bb.1:
	ldrb	w8, [x22]
	cmp	w8, #0
	cset	w0, ne
	b	LBB0_3
LBB0_2:
	mov	w0, #1
LBB0_3:
	bl	_PJDLOG_ASSERT
	cmp	x21, #0
	cset	w0, ne
	bl	_PJDLOG_ASSERT
	cmn	w20, #2
	cset	w0, gt
	bl	_PJDLOG_ASSERT
	cmp	x19, #0
	cset	w0, ne
	bl	_PJDLOG_ASSERT
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	w2, #6
	bl	_strncmp
	cbz	x0, LBB0_6
LBB0_4:
	mov	w20, #-1
LBB0_5:
	mov	x0, x20
	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
	add	sp, sp, #80
	ret
LBB0_6:
	cbz	x22, LBB0_8
; %bb.7:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	mov	w2, #6
	bl	_strncmp
	cbnz	x0, LBB0_4
LBB0_8:
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x3, sp, #8
	mov	x0, #0
	mov	w2, #-1
	bl	_proto_connect
	cmn	w0, #1
	b.eq	LBB0_12
; %bb.9:
	bl	_fork
	mov	x23, x0
	cbz	w0, LBB0_13
; %bb.10:
	cmn	w23, #1
	b.ne	LBB0_14
; %bb.11:
Lloh6:
	adrp	x8, _errno@GOTPAGE
Lloh7:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh8:
	ldr	w20, [x8]
	ldr	x0, [sp, #8]
	bl	_proto_close
	b	LBB0_5
LBB0_12:
Lloh9:
	adrp	x8, _errno@GOTPAGE
Lloh10:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh11:
	ldr	w20, [x8]
	b	LBB0_5
LBB0_13:
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pjdlog_prefix_set
	ldr	x0, [sp, #8]
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	bl	_tls_call_exec_client
LBB0_14:
	mov	w0, #1
	mov	w1, #32
	bl	_calloc
	cbz	x0, LBB0_18
; %bb.15:
	mov	x21, x0
	ldr	x0, [sp, #8]
	mov	x1, #0
	mov	w2, #0
	bl	_proto_send
	ldr	x8, [sp, #8]
	stp	xzr, x8, [x21, #16]
Lloh14:
	adrp	x8, _TLS_SIDE_CLIENT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _TLS_SIDE_CLIENT@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	str	w8, [x21, #8]
Lloh17:
	adrp	x8, _TLS_CTX_MAGIC@GOTPAGE
Lloh18:
	ldr	x8, [x8, _TLS_CTX_MAGIC@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	stp	wzr, w8, [x21]
	tbnz	w20, #31, LBB0_19
; %bb.16:
	mov	x0, x21
	mov	x1, x20
	bl	_tls_connect_wait
	cbz	w0, LBB0_19
; %bb.17:
	mov	x20, x0
Lloh20:
	adrp	x8, _SIGKILL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _SIGKILL@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_kill
	mov	x0, x21
	bl	_tls_close
	b	LBB0_5
LBB0_18:
Lloh23:
	adrp	x8, _errno@GOTPAGE
Lloh24:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh25:
	ldr	w20, [x8]
	ldr	x0, [sp, #8]
	bl	_proto_close
Lloh26:
	adrp	x8, _SIGKILL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _SIGKILL@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_kill
	b	LBB0_5
LBB0_19:
	mov	w20, #0
	str	x21, [x19]
	b	LBB0_5
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tls://"

l_.str.1:                               ; @.str.1
	.asciz	"socketpair://"

	.comm	_errno,4,2                      ; @errno
l_.str.2:                               ; @.str.2
	.asciz	"[TLS sandbox] (client) "

	.comm	_SIGKILL,4,2                    ; @SIGKILL
	.comm	_TLS_SIDE_CLIENT,4,2            ; @TLS_SIDE_CLIENT
	.comm	_TLS_CTX_MAGIC,4,2              ; @TLS_CTX_MAGIC
	.comm	_RFFDG,4,2                      ; @RFFDG
	.comm	_RFPROC,4,2                     ; @RFPROC
	.comm	_RFTSIGZMB,4,2                  ; @RFTSIGZMB
	.no_dead_strip	_tls_connect
.subsections_via_symbols
