	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TH_CreateEdge                  ## -- Begin function TH_CreateEdge
	.p2align	4, 0x90
_TH_CreateEdge:                         ## @TH_CreateEdge
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movl	%edi, %r15d
	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_EDGES@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
	leal	1(%rax), %edx
	movl	%edx, (%rbx)
	cltq
	leaq	(%rcx,%rax,8), %rdi
	movq	(%rcx,%rax,8), %rax
	movl	%r15d, (%rax)
	movl	%r14d, 4(%rax)
	callq	_TH_AddEdgeToHash
	movl	(%rbx), %eax
	decl	%eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_thworld,16,3                   ## @thworld
	.comm	_MAX_TH_EDGES,4,2               ## @MAX_TH_EDGES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MAX_TH_EDGES"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TH_CreateEdge                  ; -- Begin function TH_CreateEdge
	.p2align	2
_TH_CreateEdge:                         ; @TH_CreateEdge
	.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, x1
	mov	x20, x0
Lloh0:
	adrp	x21, _thworld@GOTPAGE
Lloh1:
	ldr	x21, [x21, _thworld@GOTPAGEOFF]
	ldr	w8, [x21]
	cbnz	w8, LBB0_2
; %bb.1:
	mov	w8, #1
	str	w8, [x21]
LBB0_2:
Lloh2:
	adrp	x9, _MAX_TH_EDGES@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MAX_TH_EDGES@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, [x21]
LBB0_4:
	ldr	x9, [x21, #8]
	add	w10, w8, #1
	str	w10, [x21]
	add	x0, x9, w8, sxtw #3
	ldr	x8, [x0]
	stp	w20, w19, [x8]
	bl	_TH_AddEdgeToHash
	ldr	w8, [x21]
	sub	w0, w8, #1
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_thworld,16,3                   ; @thworld
	.comm	_MAX_TH_EDGES,4,2               ; @MAX_TH_EDGES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MAX_TH_EDGES"

.subsections_via_symbols
