	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_proto_common_send              ## -- Begin function proto_common_send
	.p2align	4, 0x90
_proto_common_send:                     ## @proto_common_send
	.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	%ecx, %r14d
	movq	%rdx, %rbx
	movq	%rsi, %r12
	movl	%edi, %r15d
	notl	%edi
	shrl	$31, %edi
	callq	_PJDLOG_ASSERT
	testq	%r12, %r12
	je	LBB0_1
## %bb.3:
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movl	$1, %edi
	callq	_PJDLOG_ASSERT
	xorl	%edi, %edi
	testq	%rbx, %rbx
	setne	%dil
	callq	_PJDLOG_ASSERT
	xorl	%r13d, %r13d
	movq	_MSG_NOSIGNAL@GOTPCREL(%rip), %r14
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_4 Depth=1
	addq	%rax, %r12
	subq	%rax, %rbx
LBB0_19:                                ##   in Loop: Header=BB0_4 Depth=1
	testq	%rbx, %rbx
	je	LBB0_20
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	_MAX_SEND_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	cmpq	%rdx, %rbx
	cmovbq	%rbx, %rdx
	movl	(%r14), %ecx
	movl	%r15d, %edi
	movq	%r12, %rsi
	callq	_send
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	jns	LBB0_18
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_EINTR@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_19
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	_ENOBUFS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	testl	%r13d, %r13d
	je	LBB0_16
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$15, %r13d
	jne	LBB0_17
	jmp	LBB0_11
LBB0_16:                                ##   in Loop: Header=BB0_4 Depth=1
	leaq	L_.str.1(%rip), %rdi
	callq	_pjdlog_warning
LBB0_17:                                ##   in Loop: Header=BB0_4 Depth=1
	incl	%r13d
	imull	$100000, %r13d, %edi            ## imm = 0x186A0
	callq	_usleep
	jmp	LBB0_19
LBB0_1:
	xorl	%edi, %edi
	testq	%rbx, %rbx
	sete	%dil
	callq	_PJDLOG_ASSERT
	movq	_SHUT_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	callq	_shutdown
	movl	%eax, %ecx
	xorl	%eax, %eax
	cmpl	$-1, %ecx
	jne	LBB0_15
LBB0_2:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_15
LBB0_5:
	movq	_ENOTCONN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_15
LBB0_20:
	testl	%r13d, %r13d
	jle	LBB0_22
## %bb.21:
	cmpl	$1, %r13d
	leaq	L_.str.3(%rip), %rax
	leaq	L_.str.4(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str.2(%rip), %rdi
	movl	%r13d, %esi
	callq	_pjdlog_info
LBB0_22:
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	cmpl	$-1, %esi
	je	LBB0_23
## %bb.24:
	movl	%r15d, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_proto_descriptor_send          ## TAILCALL
LBB0_23:
	xorl	%eax, %eax
	jmp	LBB0_15
LBB0_11:
	leaq	L_.str(%rip), %rdi
	callq	_pjdlog_warning
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_12:
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_15
## %bb.13:
	movl	%r15d, %edi
	callq	_blocking_socket
	testq	%rax, %rax
	je	LBB0_2
## %bb.14:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SHUT_RD,4,2                    ## @SHUT_RD
	.comm	_errno,4,2                      ## @errno
	.comm	_MAX_SEND_SIZE,8,3              ## @MAX_SEND_SIZE
	.comm	_MSG_NOSIGNAL,4,2               ## @MSG_NOSIGNAL
	.comm	_ENOTCONN,4,2                   ## @ENOTCONN
	.comm	_EINTR,4,2                      ## @EINTR
	.comm	_ENOBUFS,4,2                    ## @ENOBUFS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Getting ENOBUFS errors for 11s on send(), giving up."

L_.str.1:                               ## @.str.1
	.asciz	"Got ENOBUFS error on send(), retrying for a bit."

	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
L_.str.2:                               ## @.str.2
	.asciz	"Data sent successfully after %d ENOBUFS error%s."

L_.str.3:                               ## @.str.3
	.space	1

L_.str.4:                               ## @.str.4
	.asciz	"s"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_proto_common_send              ; -- Begin function proto_common_send
	.p2align	2
_proto_common_send:                     ; @proto_common_send
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	mvn	w8, w0
	lsr	w0, w8, #31
	bl	_PJDLOG_ASSERT
	cbz	x22, LBB0_12
; %bb.1:
	str	w20, [sp, #12]                  ; 4-byte Folded Spill
	mov	w0, #1
	bl	_PJDLOG_ASSERT
	cmp	x21, #0
	cset	w0, ne
	bl	_PJDLOG_ASSERT
	mov	w23, #0
Lloh0:
	adrp	x26, _MAX_SEND_SIZE@GOTPAGE
Lloh1:
	ldr	x26, [x26, _MAX_SEND_SIZE@GOTPAGEOFF]
Lloh2:
	adrp	x27, _MSG_NOSIGNAL@GOTPAGE
Lloh3:
	ldr	x27, [x27, _MSG_NOSIGNAL@GOTPAGEOFF]
Lloh4:
	adrp	x25, _errno@GOTPAGE
Lloh5:
	ldr	x25, [x25, _errno@GOTPAGEOFF]
Lloh6:
	adrp	x28, _EINTR@GOTPAGE
Lloh7:
	ldr	x28, [x28, _EINTR@GOTPAGEOFF]
	mov	w24, #34464
	movk	w24, #1, lsl #16
Lloh8:
	adrp	x20, _ENOBUFS@GOTPAGE
Lloh9:
	ldr	x20, [x20, _ENOBUFS@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x22, x22, x0
	sub	x21, x21, x0
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	cbz	x21, LBB0_14
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x26]
	cmp	x21, x8
	csel	x2, x21, x8, lo
	ldr	w3, [x27]
	mov	x0, x19
	mov	x1, x22
	bl	_send
	cbz	x0, LBB0_13
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	tbz	x0, #63, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x25]
	ldr	w8, [x28]
	cmp	w0, w8
	b.eq	LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x20]
	cmp	w0, w8
	b.ne	LBB0_20
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	cbz	w23, LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w23, #15
	b.ne	LBB0_11
	b	LBB0_19
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pjdlog_warning
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
	add	w23, w23, #1
	mul	w0, w23, w24
	bl	_usleep
	b	LBB0_3
LBB0_12:
	cmp	x21, #0
	cset	w0, eq
	bl	_PJDLOG_ASSERT
Lloh12:
	adrp	x8, _SHUT_RD@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SHUT_RD@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_shutdown
Lloh15:
	adrp	x8, _errno@GOTPAGE
Lloh16:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmn	w0, #1
	csel	w0, w8, wzr, eq
	b	LBB0_24
LBB0_13:
Lloh18:
	adrp	x8, _ENOTCONN@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ENOTCONN@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	b	LBB0_24
LBB0_14:
	cmp	w23, #1
	b.lt	LBB0_16
; %bb.15:
Lloh21:
	adrp	x8, l_.str.4@PAGE
Lloh22:
	add	x8, x8, l_.str.4@PAGEOFF
Lloh23:
	adrp	x9, l_.str.3@PAGE
Lloh24:
	add	x9, x9, l_.str.3@PAGEOFF
	csel	x2, x9, x8, eq
Lloh25:
	adrp	x0, l_.str.2@PAGE
Lloh26:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x23
	bl	_pjdlog_info
LBB0_16:
	ldr	w1, [sp, #12]                   ; 4-byte Folded Reload
	cmn	w1, #1
	b.eq	LBB0_18
; %bb.17:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_proto_descriptor_send
LBB0_18:
	mov	w0, #0
	b	LBB0_24
LBB0_19:
Lloh27:
	adrp	x0, l_.str@PAGE
Lloh28:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pjdlog_warning
	ldr	w0, [x25]
LBB0_20:
Lloh29:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh30:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_24
; %bb.21:
	mov	x0, x19
	bl	_blocking_socket
	cbz	x0, LBB0_23
; %bb.22:
Lloh32:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh34:
	ldr	w0, [x8]
	str	w0, [x25]
	b	LBB0_24
LBB0_23:
	ldr	w0, [x25]
LBB0_24:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_SHUT_RD,4,2                    ; @SHUT_RD
	.comm	_errno,4,2                      ; @errno
	.comm	_MAX_SEND_SIZE,8,3              ; @MAX_SEND_SIZE
	.comm	_MSG_NOSIGNAL,4,2               ; @MSG_NOSIGNAL
	.comm	_ENOTCONN,4,2                   ; @ENOTCONN
	.comm	_EINTR,4,2                      ; @EINTR
	.comm	_ENOBUFS,4,2                    ; @ENOBUFS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Getting ENOBUFS errors for 11s on send(), giving up."

l_.str.1:                               ; @.str.1
	.asciz	"Got ENOBUFS error on send(), retrying for a bit."

	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
l_.str.2:                               ; @.str.2
	.asciz	"Data sent successfully after %d ENOBUFS error%s."

l_.str.3:                               ; @.str.3
	.space	1

l_.str.4:                               ; @.str.4
	.asciz	"s"

.subsections_via_symbols
