	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tls_connect_wait
_tls_connect_wait:                      ## @tls_connect_wait
	.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
	movl	%esi, %r14d
	movq	%rdi, %r15
	xorl	%edi, %edi
	testq	%r15, %r15
	setne	%dil
	callq	_PJDLOG_ASSERT
	movq	(%r15), %rax
	movq	_TLS_CTX_MAGIC@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_PJDLOG_ASSERT
	movq	8(%r15), %rax
	movq	_TLS_SIDE_CLIENT@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_PJDLOG_ASSERT
	xorl	%edi, %edi
	cmpq	$0, 24(%r15)
	setne	%dil
	callq	_PJDLOG_ASSERT
	xorl	%edi, %edi
	cmpl	$0, 16(%r15)
	sete	%dil
	callq	_PJDLOG_ASSERT
	movl	%r14d, %edi
	notl	%edi
	shrl	$31, %edi
	callq	_PJDLOG_ASSERT
	movq	24(%r15), %rdi
	callq	_proto_descriptor
	movl	%eax, %ebx
	movl	%eax, %edi
	movl	%r14d, %esi
	callq	_wait_for_fd
	testl	%eax, %eax
	je	LBB0_1
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	_MSG_WAITALL@GOTPCREL(%rip), %r12
	leaq	-44(%rbp), %r14
	movq	_EINTR@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %ecx
	movl	%ebx, %edi
	movq	%r14, %rsi
	movl	$4, %edx
	callq	_recv
	cmpl	$-1, %eax
	jne	LBB0_3
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	(%r13), %eax
	je	LBB0_2
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_ENOBUFS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_2
	jmp	LBB0_9
LBB0_3:
	movl	%eax, %ecx
	testl	%eax, %eax
	je	LBB0_8
## %bb.4:
	xorl	%eax, %eax
	cmpl	$1, %ecx
	jne	LBB0_9
## %bb.5:
	movl	$1, 16(%r15)
	jmp	LBB0_9
LBB0_8:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	callq	_pjdlog_debug
	movq	_ENOTCONN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_TLS_CTX_MAGIC,8,3              ## @TLS_CTX_MAGIC
	.comm	_TLS_SIDE_CLIENT,8,3            ## @TLS_SIDE_CLIENT
	.comm	_MSG_WAITALL,4,2                ## @MSG_WAITALL
	.comm	_errno,4,2                      ## @errno
	.comm	_EINTR,4,2                      ## @EINTR
	.comm	_ENOBUFS,4,2                    ## @ENOBUFS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Connection terminated."

	.comm	_ENOTCONN,4,2                   ## @ENOTCONN
	.no_dead_strip	_tls_connect_wait
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tls_connect_wait
_tls_connect_wait:                      ; @tls_connect_wait
	.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	x21, x1
	mov	x19, x0
	cmp	x0, #0
	cset	w0, ne
	bl	_PJDLOG_ASSERT
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _TLS_CTX_MAGIC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TLS_CTX_MAGIC@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_PJDLOG_ASSERT
	ldr	x8, [x19, #8]
Lloh3:
	adrp	x9, _TLS_SIDE_CLIENT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TLS_SIDE_CLIENT@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, eq
	bl	_PJDLOG_ASSERT
	ldr	x8, [x19, #24]
	cmp	x8, #0
	cset	w0, ne
	bl	_PJDLOG_ASSERT
	ldr	w8, [x19, #16]
	cmp	w8, #0
	cset	w0, eq
	bl	_PJDLOG_ASSERT
	mvn	w8, w21
	lsr	w0, w8, #31
	bl	_PJDLOG_ASSERT
	ldr	x0, [x19, #24]
	bl	_proto_descriptor
	mov	x20, x0
	mov	x1, x21
	bl	_wait_for_fd
	cbz	w0, LBB0_2
LBB0_1:
	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_2:
Lloh6:
	adrp	x21, _MSG_WAITALL@GOTPAGE
Lloh7:
	ldr	x21, [x21, _MSG_WAITALL@GOTPAGEOFF]
Lloh8:
	adrp	x22, _errno@GOTPAGE
Lloh9:
	ldr	x22, [x22, _errno@GOTPAGEOFF]
Lloh10:
	adrp	x23, _EINTR@GOTPAGE
Lloh11:
	ldr	x23, [x23, _EINTR@GOTPAGEOFF]
Lloh12:
	adrp	x24, _ENOBUFS@GOTPAGE
Lloh13:
	ldr	x24, [x24, _ENOBUFS@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w3, [x21]
	add	x1, sp, #12
	mov	x0, x20
	mov	w2, #4
	bl	_recv
	cmn	w0, #1
	b.ne	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x22]
	ldr	w8, [x23]
	ldr	w9, [x24]
	cmp	w0, w8
	ccmp	w0, w9, #4, ne
	b.eq	LBB0_3
	b	LBB0_1
LBB0_5:
	cbz	w0, LBB0_8
; %bb.6:
	cmp	w0, #1
	b.ne	LBB0_9
; %bb.7:
	mov	w0, #0
	mov	w8, #1
	str	w8, [x19, #16]
	b	LBB0_1
LBB0_8:
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_pjdlog_debug
Lloh16:
	adrp	x8, _ENOTCONN@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ENOTCONN@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	b	LBB0_1
LBB0_9:
	mov	w0, #0
	b	LBB0_1
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_TLS_CTX_MAGIC,8,3              ; @TLS_CTX_MAGIC
	.comm	_TLS_SIDE_CLIENT,8,3            ; @TLS_SIDE_CLIENT
	.comm	_MSG_WAITALL,4,2                ; @MSG_WAITALL
	.comm	_errno,4,2                      ; @errno
	.comm	_EINTR,4,2                      ; @EINTR
	.comm	_ENOBUFS,4,2                    ; @ENOBUFS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Connection terminated."

	.comm	_ENOTCONN,4,2                   ; @ENOTCONN
	.no_dead_strip	_tls_connect_wait
.subsections_via_symbols
