	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Netchan_TransmitNextFragment   ## -- Begin function Netchan_TransmitNextFragment
	.p2align	4, 0x90
_Netchan_TransmitNextFragment:          ## @Netchan_TransmitNextFragment
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	%rsp, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAX_PACKETLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%r14, %rax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rsi
	leal	(,%r14,4), %edx
	leaq	-56(%rbp), %r14
	movq	%r14, %rdi
	callq	_MSG_InitOOB
	movq	_FRAGMENT_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_MSG_WriteLong
	movq	8(%rbx), %rax
	movq	_NS_CLIENT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	_qport@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %rdi
	callq	_MSG_WriteShort
LBB0_2:
	movl	(%rbx), %esi
	movl	52(%rbx), %edi
	callq	_NETCHAN_GENCHECKSUM
	leaq	-56(%rbp), %r15
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_MSG_WriteLong
	movq	_FRAGMENT_SIZE@GOTPCREL(%rip), %r13
	movslq	(%r13), %rax
	movq	16(%rbx), %rsi
	movq	24(%rbx), %rcx
	movq	%rax, %rdx
	addq	%rsi, %rdx
	movl	%ecx, %r14d
	subl	%esi, %r14d
	cmpq	%rcx, %rdx
	cmovlel	%eax, %r14d
	movq	%r15, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_MSG_WriteShort
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_MSG_WriteShort
	movl	32(%rbx), %esi
	addl	16(%rbx), %esi
	movq	%r15, %rdi
	movl	%r14d, %edx
	callq	_MSG_WriteData
	movq	8(%rbx), %rdi
	movl	-56(%rbp), %esi
	movl	-52(%rbp), %edx
	movl	48(%rbx), %ecx
	callq	_NET_SendPacket
	xorl	%eax, %eax
	callq	_Sys_Milliseconds
	movl	%eax, 44(%rbx)
	movl	-56(%rbp), %edx
	movl	%edx, 40(%rbx)
	movq	_showpackets@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	$0, (%rax)
	je	LBB0_4
## %bb.3:
	movq	_netsrcString@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	8(%rbx), %rcx
	movl	(%rax,%rcx,4), %esi
	movl	(%rbx), %ecx
	movl	16(%rbx), %r8d
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %r9d
	callq	_Com_Printf
LBB0_4:
	movslq	%r14d, %rax
	addq	16(%rbx), %rax
	movq	%rax, 16(%rbx)
	cmpq	24(%rbx), %rax
	jne	LBB0_7
## %bb.5:
	cmpl	(%r13), %r14d
	je	LBB0_7
## %bb.6:
	incl	(%rbx)
	movq	_qfalse@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 36(%rbx)
LBB0_7:
	movq	%r12, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_9
## %bb.8:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_PACKETLEN,4,2              ## @MAX_PACKETLEN
	.comm	_FRAGMENT_BIT,4,2               ## @FRAGMENT_BIT
	.comm	_NS_CLIENT,8,3                  ## @NS_CLIENT
	.comm	_qport,8,3                      ## @qport
	.comm	_FRAGMENT_SIZE,4,2              ## @FRAGMENT_SIZE
	.comm	_showpackets,8,3                ## @showpackets
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s send %4i : s=%i fragment=%i,%i\n"

	.comm	_netsrcString,8,3               ## @netsrcString
	.comm	_qfalse,4,2                     ## @qfalse
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Netchan_TransmitNextFragment   ; -- Begin function Netchan_TransmitNextFragment
	.p2align	2
_Netchan_TransmitNextFragment:          ; @Netchan_TransmitNextFragment
	.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
	sub	sp, sp, #16
	mov	x19, x0
	mov	x21, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x8, _MAX_PACKETLEN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_PACKETLEN@GOTPAGEOFF]
Lloh5:
	ldr	w12, [x8]
	lsl	x8, x12, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x1, x9, x8
	mov	sp, x1
	lsl	w2, w12, #2
	sub	x0, x29, #48
	bl	_MSG_InitOOB
	ldr	w8, [x19]
Lloh8:
	adrp	x9, _FRAGMENT_BIT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _FRAGMENT_BIT@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w1, w9, w8
	sub	x0, x29, #48
	bl	_MSG_WriteLong
	ldr	x8, [x19, #8]
Lloh11:
	adrp	x9, _NS_CLIENT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _NS_CLIENT@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh14:
	adrp	x8, _qport@GOTPAGE
Lloh15:
	ldr	x8, [x8, _qport@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	ldr	w1, [x8]
	sub	x0, x29, #48
	bl	_MSG_WriteShort
LBB0_2:
	ldr	w0, [x19, #52]
	ldr	w1, [x19]
	bl	_NETCHAN_GENCHECKSUM
	mov	x1, x0
	sub	x0, x29, #48
	bl	_MSG_WriteLong
Lloh17:
	adrp	x22, _FRAGMENT_SIZE@GOTPAGE
Lloh18:
	ldr	x22, [x22, _FRAGMENT_SIZE@GOTPAGEOFF]
	ldrsw	x8, [x22]
	ldp	x1, x9, [x19, #16]
	sub	w10, w9, w1
	add	x11, x1, x8
	cmp	x11, x9
	csel	w20, w10, w8, gt
	sub	x0, x29, #48
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_MSG_WriteShort
	sub	x0, x29, #48
	mov	x1, x20
	bl	_MSG_WriteShort
	ldr	w8, [x19, #32]
	ldr	w9, [x19, #16]
	add	w1, w8, w9
	sub	x0, x29, #48
	mov	x2, x20
	bl	_MSG_WriteData
	ldr	x0, [x19, #8]
	ldp	w1, w2, [x29, #-48]
	ldr	w3, [x19, #48]
	bl	_NET_SendPacket
	bl	_Sys_Milliseconds
	ldur	w2, [x29, #-48]
	stp	w2, w0, [x19, #40]
Lloh19:
	adrp	x8, _showpackets@GOTPAGE
Lloh20:
	ldr	x8, [x8, _showpackets@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	ldr	x8, [x8]
	cbz	x8, LBB0_4
; %bb.3:
Lloh22:
	adrp	x8, _netsrcString@GOTPAGE
Lloh23:
	ldr	x8, [x8, _netsrcString@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
	ldr	x9, [x19, #8]
	ldr	w1, [x8, x9, lsl #2]
	ldr	w3, [x19]
	ldr	w4, [x19, #16]
Lloh25:
	adrp	x0, l_.str@PAGE
Lloh26:
	add	x0, x0, l_.str@PAGEOFF
	mov	x5, x20
	bl	_Com_Printf
LBB0_4:
	ldp	x8, x9, [x19, #16]
	add	x8, x8, w20, sxtw
	str	x8, [x19, #16]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.5:
	ldr	w8, [x22]
	cmp	w20, w8
	b.eq	LBB0_7
; %bb.6:
	ldr	w8, [x19]
	add	w8, w8, #1
	str	w8, [x19]
Lloh27:
	adrp	x8, _qfalse@GOTPAGE
Lloh28:
	ldr	x8, [x8, _qfalse@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	str	w8, [x19, #36]
LBB0_7:
	mov	sp, x21
	ldur	x8, [x29, #-40]
Lloh30:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh31:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_9
; %bb.8:
	sub	sp, x29, #32
	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
LBB0_9:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_PACKETLEN,4,2              ; @MAX_PACKETLEN
	.comm	_FRAGMENT_BIT,4,2               ; @FRAGMENT_BIT
	.comm	_NS_CLIENT,8,3                  ; @NS_CLIENT
	.comm	_qport,8,3                      ; @qport
	.comm	_FRAGMENT_SIZE,4,2              ; @FRAGMENT_SIZE
	.comm	_showpackets,8,3                ; @showpackets
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s send %4i : s=%i fragment=%i,%i\n"

	.comm	_netsrcString,8,3               ; @netsrcString
	.comm	_qfalse,4,2                     ; @qfalse
.subsections_via_symbols
