	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_netplay_send                   ## -- Begin function netplay_send
	.p2align	4, 0x90
_netplay_send:                          ## @netplay_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdx, %r15
	movl	%esi, %r12d
	movq	%rdi, %rbx
	callq	_buf_remaining
	cmpq	%r14, %rax
	jae	LBB0_3
## %bb.1:
	movq	%rbx, %rdi
	movl	%r12d, %esi
	movl	$1, %edx
	callq	_netplay_send_flush
	testl	%eax, %eax
	je	LBB0_2
LBB0_3:
	movq	%rbx, %rdi
	callq	_buf_remaining
	cmpq	%r14, %rax
	jae	LBB0_5
## %bb.4:
	movl	%r12d, %edi
	movq	%r15, %rsi
	movq	%r14, %rdx
	xorl	%ecx, %ecx
	callq	_socket_send_all_blocking
	movl	%eax, %ecx
	xorl	%eax, %eax
	testl	%ecx, %ecx
	setne	%al
	jmp	LBB0_9
LBB0_5:
	movq	(%rbx), %r12
	movq	8(%rbx), %rdi
	subq	%rdi, %r12
	cmpq	%r14, %r12
	jae	LBB0_7
## %bb.6:
	subq	%r12, %r14
	addq	16(%rbx), %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_memcpy
	movq	16(%rbx), %rdi
	addq	%r12, %r15
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_memcpy
	jmp	LBB0_8
LBB0_2:
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_7:
	addq	16(%rbx), %rdi
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_memcpy
	addq	8(%rbx), %r14
LBB0_8:
	movq	%r14, 8(%rbx)
	movl	$1, %eax
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_netplay_send                   ; -- Begin function netplay_send
	.p2align	2
_netplay_send:                          ; @netplay_send
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x21, x3
	mov	x20, x2
	mov	x22, x1
	mov	x19, x0
	bl	_buf_remaining
	cmp	x0, x21
	b.hs	LBB0_2
; %bb.1:
	mov	x0, x19
	mov	x1, x22
	mov	w2, #1
	bl	_netplay_send_flush
	cbz	w0, LBB0_8
LBB0_2:
	mov	x0, x19
	bl	_buf_remaining
	cmp	x0, x21
	b.hs	LBB0_4
; %bb.3:
	mov	x0, x22
	mov	x1, x20
	mov	x2, x21
	mov	w3, #0
	bl	_socket_send_all_blocking
	cmp	w0, #0
	cset	w0, ne
	b	LBB0_8
LBB0_4:
	ldp	x9, x8, [x19]
	sub	x22, x9, x8
	cmp	x22, x21
	b.hs	LBB0_6
; %bb.5:
	sub	x21, x21, x22
	ldr	x9, [x19, #16]
	add	x0, x9, x8
	mov	x1, x20
	mov	x2, x22
	bl	_memcpy
	ldr	x0, [x19, #16]
	add	x1, x20, x22
	mov	x2, x21
	bl	_memcpy
	b	LBB0_7
LBB0_6:
	ldr	x9, [x19, #16]
	add	x0, x9, x8
	mov	x1, x20
	mov	x2, x21
	bl	_memcpy
	ldr	x8, [x19, #8]
	add	x21, x8, x21
LBB0_7:
	str	x21, [x19, #8]
	mov	w0, #1
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
