	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_G_AddSpawnVarToken             ## -- Begin function G_AddSpawnVarToken
	.p2align	4, 0x90
_G_AddSpawnVarToken:                    ## @G_AddSpawnVarToken
	.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	%rdi, %r14
	callq	_strlen
	movq	_level@GOTPCREL(%rip), %r15
	movq	(%r15), %rbx
	movslq	%eax, %r12
	leaq	(%rbx,%r12), %rax
	movq	_MAX_SPAWN_VARS_CHARS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_G_Error
	movq	(%r15), %rbx
LBB0_2:
	addq	8(%r15), %rbx
	leal	1(%r12), %edx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_memcpy
	movq	(%r15), %rax
	addq	%r12, %rax
	incq	%rax
	movq	%rax, (%r15)
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_level,16,3                     ## @level
	.comm	_MAX_SPAWN_VARS_CHARS,8,3       ## @MAX_SPAWN_VARS_CHARS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"G_AddSpawnVarToken: MAX_SPAWN_VARS_CHARS"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_G_AddSpawnVarToken             ; -- Begin function G_AddSpawnVarToken
	.p2align	2
_G_AddSpawnVarToken:                    ; @G_AddSpawnVarToken
	.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	x19, x0
	bl	_strlen
	mov	x20, x0
Lloh0:
	adrp	x22, _level@GOTPAGE
Lloh1:
	ldr	x22, [x22, _level@GOTPAGEOFF]
	ldr	x8, [x22]
	add	x9, x8, w0, sxtw
Lloh2:
	adrp	x10, _MAX_SPAWN_VARS_CHARS@GOTPAGE
Lloh3:
	ldr	x10, [x10, _MAX_SPAWN_VARS_CHARS@GOTPAGEOFF]
Lloh4:
	ldr	x10, [x10]
	cmp	x9, x10
	b.lt	LBB0_2
; %bb.1:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_G_Error
	ldr	x8, [x22]
LBB0_2:
	ldr	x9, [x22, #8]
	add	x21, x9, x8
	add	w20, w20, #1
	mov	x0, x21
	mov	x1, x19
	mov	x2, x20
	bl	_memcpy
	ldr	x8, [x22]
	add	x8, x8, w20, sxtw
	str	x8, [x22]
	mov	x0, x21
	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
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_level,16,3                     ; @level
	.comm	_MAX_SPAWN_VARS_CHARS,8,3       ; @MAX_SPAWN_VARS_CHARS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"G_AddSpawnVarToken: MAX_SPAWN_VARS_CHARS"

.subsections_via_symbols
