	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TH_CreateVertex                ## -- Begin function TH_CreateVertex
	.p2align	4, 0x90
_TH_CreateVertex:                       ## @TH_CreateVertex
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edi, %r14d
	movq	_thworld@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movl	$1, (%rbx)
	movl	$1, %eax
LBB0_2:
	movq	_MAX_TH_VERTEXES@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jl	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	callq	_Error
	movl	(%rbx), %eax
LBB0_4:
	movq	8(%rbx), %rcx
	cltq
	shlq	$4, %rax
	movl	8(%rcx,%rax), %esi
	movl	%r14d, %edi
	callq	_VectorCopy
	movq	8(%rbx), %rax
	movslq	(%rbx), %rcx
	shlq	$4, %rcx
	leaq	(%rax,%rcx), %rdi
	movq	$0, (%rax,%rcx)
	callq	_TH_AddVertexToHash
	movl	(%rbx), %eax
	leal	1(%rax), %ecx
	movl	%ecx, (%rbx)
                                        ## kill: def $eax killed $eax killed $rax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_thworld,16,3                   ## @thworld
	.comm	_MAX_TH_VERTEXES,4,2            ## @MAX_TH_VERTEXES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MAX_TH_VERTEXES"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TH_CreateVertex                ; -- Begin function TH_CreateVertex
	.p2align	2
_TH_CreateVertex:                       ; @TH_CreateVertex
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x20, _thworld@GOTPAGE
Lloh1:
	ldr	x20, [x20, _thworld@GOTPAGEOFF]
	ldr	w8, [x20]
	cbnz	w8, LBB0_2
; %bb.1:
	mov	w8, #1
	str	w8, [x20]
LBB0_2:
Lloh2:
	adrp	x9, _MAX_TH_VERTEXES@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MAX_TH_VERTEXES@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	cmp	w8, w9
	b.lt	LBB0_4
; %bb.3:
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_Error
	ldr	w8, [x20]
LBB0_4:
	ldr	x9, [x20, #8]
	add	x8, x9, w8, sxtw #4
	ldr	w1, [x8, #8]
	mov	x0, x19
	bl	_VectorCopy
	ldr	x8, [x20, #8]
	ldrsw	x9, [x20]
	add	x0, x8, x9, lsl #4
	str	xzr, [x0]
	bl	_TH_AddVertexToHash
	ldr	w0, [x20]
	add	w8, w0, #1
	str	w8, [x20]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_thworld,16,3                   ; @thworld
	.comm	_MAX_TH_VERTEXES,4,2            ; @MAX_TH_VERTEXES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MAX_TH_VERTEXES"

.subsections_via_symbols
