	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function chargen_dg
_chargen_dg:                            ## @chargen_dg
	.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	%rsi, %r12
	movl	%edi, %r14d
	movq	%rsp, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_LINESIZ@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	addl	$2, %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	_endring@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_initring
	movq	_ring@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, _chargen_dg.rs(%rip)
LBB0_2:
	movl	$4, -60(%rbp)
	leaq	-56(%rbp), %r8
	leaq	-60(%rbp), %r9
	movl	%r14d, %edi
	movq	%r15, %rsi
	movl	%ebx, %edx
	xorl	%ecx, %ecx
	callq	_recvfrom
	testq	%rax, %rax
	js	LBB0_9
## %bb.3:
	leaq	-56(%rbp), %rdi
	movq	%r12, %rsi
	callq	_check_loop
	testq	%rax, %rax
	jne	LBB0_9
## %bb.4:
	movq	_endring@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movq	_chargen_dg.rs(%rip), %rsi
	subq	%rsi, %r12
	movq	_LINESIZ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	cmpl	%r12d, %edx
	jle	LBB0_6
## %bb.5:
	movl	%r12d, %edx
	callq	_memmove
	movslq	%r12d, %rax
	movq	%r15, %rdi
	addq	%rax, %rdi
	movq	_ring@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	_LINESIZ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	subl	%r12d, %edx
LBB0_6:
	callq	_memmove
	movq	_chargen_dg.rs(%rip), %rax
	incq	%rax
	movq	%rax, _chargen_dg.rs(%rip)
	movq	_endring@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.7:
	movq	_ring@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, _chargen_dg.rs(%rip)
LBB0_8:
	movq	_LINESIZ@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movw	$2573, (%r15,%rax)              ## imm = 0xA0D
	movl	-60(%rbp), %r9d
	leaq	-56(%rbp), %r8
	movl	%r14d, %edi
	movq	%r15, %rsi
	movl	%ebx, %edx
	xorl	%ecx, %ecx
	callq	_sendto
LBB0_9:
	movq	%r13, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_11
## %bb.10:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_chargen_dg.rs,8,3 ## @chargen_dg.rs
	.comm	_LINESIZ,4,2                    ## @LINESIZ
	.comm	_endring,8,3                    ## @endring
	.comm	_ring,8,3                       ## @ring
	.no_dead_strip	_chargen_dg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function chargen_dg
_chargen_dg:                            ; @chargen_dg
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	sub	sp, sp, #32
	mov	x22, x1
	mov	x19, x0
	mov	x23, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x24, _LINESIZ@GOTPAGE
Lloh4:
	ldr	x24, [x24, _LINESIZ@GOTPAGEOFF]
	ldr	w8, [x24]
	add	w20, w8, #2
	mov	x9, x20
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x20, #15
	and	x9, x9, #0x1fffffff0
	sub	x21, x8, x9
	mov	sp, x21
Lloh7:
	adrp	x25, _endring@GOTPAGE
Lloh8:
	ldr	x25, [x25, _endring@GOTPAGEOFF]
	ldr	x8, [x25]
	cbnz	x8, LBB0_2
; %bb.1:
	bl	_initring
Lloh9:
	adrp	x8, _ring@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ring@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	adrp	x9, _chargen_dg.rs@PAGE
	str	x8, [x9, _chargen_dg.rs@PAGEOFF]
LBB0_2:
	mov	w8, #4
	stur	w8, [x29, #-84]
	sub	x4, x29, #80
	sub	x5, x29, #84
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	mov	w3, #0
	bl	_recvfrom
	tbnz	x0, #63, LBB0_9
; %bb.3:
	sub	x0, x29, #80
	mov	x1, x22
	bl	_check_loop
	cbnz	x0, LBB0_9
; %bb.4:
	ldr	x8, [x25]
	adrp	x26, _chargen_dg.rs@PAGE
	ldr	x1, [x26, _chargen_dg.rs@PAGEOFF]
	ldr	w2, [x24]
	sub	x22, x8, x1
	mov	x0, x21
	cmp	w2, w22
	b.le	LBB0_6
; %bb.5:
	mov	x2, x22
	bl	_memmove
	add	x0, x21, w22, sxtw
Lloh12:
	adrp	x8, _ring@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ring@GOTPAGEOFF]
Lloh14:
	ldr	x1, [x8]
	ldr	w8, [x24]
	sub	w2, w8, w22
LBB0_6:
	bl	_memmove
	ldr	x8, [x26, _chargen_dg.rs@PAGEOFF]
	add	x8, x8, #1
	str	x8, [x26, _chargen_dg.rs@PAGEOFF]
	ldr	x9, [x25]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.7:
Lloh15:
	adrp	x8, _ring@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ring@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	str	x8, [x26, _chargen_dg.rs@PAGEOFF]
LBB0_8:
	ldrsw	x8, [x24]
	mov	w9, #2573
	strh	w9, [x21, x8]
	ldur	w5, [x29, #-84]
	sub	x4, x29, #80
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	mov	w3, #0
	bl	_sendto
LBB0_9:
	mov	sp, x23
	ldur	x8, [x29, #-72]
Lloh18:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh19:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	sub	sp, x29, #64
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_chargen_dg.rs,8,3 ; @chargen_dg.rs
	.comm	_LINESIZ,4,2                    ; @LINESIZ
	.comm	_endring,8,3                    ; @endring
	.comm	_ring,8,3                       ; @ring
	.no_dead_strip	_chargen_dg
.subsections_via_symbols
