	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TH_CreateTetrahedron           ## -- Begin function TH_CreateTetrahedron
	.p2align	4, 0x90
_TH_CreateTetrahedron:                  ## @TH_CreateTetrahedron
	.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, %r12
	movq	_thworld@GOTPCREL(%rip), %rax
	movq	%rax, %rbx
	movl	(%rax), %eax
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movl	$1, (%rbx)
	movl	$1, %eax
LBB0_2:
	movq	_MAX_TH_TETRAHEDRONS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jl	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	callq	_Error
	movl	(%rbx), %eax
LBB0_4:
	movq	16(%rbx), %rdx
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	leal	1(%rax), %ecx
	movl	%ecx, (%rbx)
	movslq	%eax, %rcx
	shlq	$4, %rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movl	(%r12), %eax
	movq	(%rdx,%rcx), %rcx
	movl	%eax, (%rcx)
	movq	8(%rbx), %r13
	movl	(%r12), %edi
	callq	_abs
	movl	(%r13,%rax,8), %r13d
	movl	(%rbx), %r15d
	movq	8(%rbx), %r14
	movl	(%r12), %edi
	callq	_abs
	testl	%r13d, %r13d
	leaq	(%r14,%rax,8), %rcx
	leaq	4(%r14,%rax,8), %rax
	cmoveq	%rcx, %rax
	decl	%r15d
	movl	%r15d, (%rax)
	movl	4(%r12), %eax
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	(%r14,%r13), %rcx
	movl	%eax, 4(%rcx)
	movq	%rbx, %r15
	movq	8(%rbx), %rbx
	movl	4(%r12), %edi
	callq	_abs
	movl	(%rbx,%rax,8), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	(%r15), %ebx
	movq	8(%r15), %r15
	movl	4(%r12), %edi
	callq	_abs
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	leaq	(%r15,%rax,8), %rcx
	leaq	4(%r15,%rax,8), %rax
	cmoveq	%rcx, %rax
	decl	%ebx
	movl	%ebx, (%rax)
	movl	8(%r12), %eax
	movq	(%r14,%r13), %rcx
	movq	%r14, %r13
	movl	%eax, 8(%rcx)
	movq	_thworld@GOTPCREL(%rip), %r15
	movq	8(%r15), %rbx
	movl	8(%r12), %edi
	callq	_abs
	movl	(%rbx,%rax,8), %r14d
	movl	(%r15), %ebx
	movq	8(%r15), %r15
	movl	8(%r12), %edi
	callq	_abs
	testl	%r14d, %r14d
	leaq	(%r15,%rax,8), %rcx
	leaq	4(%r15,%rax,8), %rax
	cmoveq	%rcx, %rax
	decl	%ebx
	movl	%ebx, (%rax)
	movl	12(%r12), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	(%r13,%rcx), %rcx
	movl	%eax, 12(%rcx)
	movq	_thworld@GOTPCREL(%rip), %r15
	movq	8(%r15), %rbx
	movl	12(%r12), %edi
	callq	_abs
	movl	(%rbx,%rax,8), %r14d
	movl	(%r15), %ebx
	movq	8(%r15), %r15
	movl	12(%r12), %edi
	callq	_abs
	testl	%r14d, %r14d
	leaq	(%r15,%rax,8), %rcx
	leaq	4(%r15,%rax,8), %rax
	cmoveq	%rcx, %rax
	decl	%ebx
	movl	%ebx, (%rax)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	$0, 8(%r13,%rax)
	movq	_thworld@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	decl	%eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_thworld,24,3                   ## @thworld
	.comm	_MAX_TH_TETRAHEDRONS,4,2        ## @MAX_TH_TETRAHEDRONS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MAX_TH_TETRAHEDRONS"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TH_CreateTetrahedron           ; -- Begin function TH_CreateTetrahedron
	.p2align	2
_TH_CreateTetrahedron:                  ; @TH_CreateTetrahedron
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	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_TETRAHEDRONS@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MAX_TH_TETRAHEDRONS@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:
	add	w9, w8, #1
	str	w9, [x20]
	ldp	x22, x9, [x20, #8]
	add	x21, x9, w8, sxtw #4
	ldr	w8, [x19]
	ldr	x9, [x21]
	str	w8, [x9]
	ldr	w0, [x19]
	bl	_abs
	lsl	x8, x0, #3
	ldr	w22, [x22, x8]
	ldr	w8, [x20]
	sub	w23, w8, #1
	ldr	x24, [x20, #8]
	ldr	w0, [x19]
	bl	_abs
	add	x8, x24, x0, lsl #3
	add	x9, x8, #4
	cmp	w22, #0
	csel	x8, x8, x9, eq
	str	w23, [x8]
	ldr	w8, [x19, #4]
	ldr	x9, [x21]
	str	w8, [x9, #4]
	ldr	x22, [x20, #8]
	ldr	w0, [x19, #4]
	bl	_abs
	lsl	x8, x0, #3
	ldr	w22, [x22, x8]
	ldr	w8, [x20]
	sub	w23, w8, #1
	ldr	x24, [x20, #8]
	ldr	w0, [x19, #4]
	bl	_abs
	add	x8, x24, x0, lsl #3
	add	x9, x8, #4
	cmp	w22, #0
	csel	x8, x8, x9, eq
	str	w23, [x8]
	ldr	w8, [x19, #8]
	ldr	x9, [x21]
	str	w8, [x9, #8]
	ldr	x22, [x20, #8]
	ldr	w0, [x19, #8]
	bl	_abs
	lsl	x8, x0, #3
	ldr	w22, [x22, x8]
	ldr	w8, [x20]
	sub	w23, w8, #1
	ldr	x24, [x20, #8]
	ldr	w0, [x19, #8]
	bl	_abs
	add	x8, x24, x0, lsl #3
	add	x9, x8, #4
	cmp	w22, #0
	csel	x8, x8, x9, eq
	str	w23, [x8]
	ldr	w8, [x19, #12]
	ldr	x9, [x21]
	str	w8, [x9, #12]
	ldr	x22, [x20, #8]
	ldr	w0, [x19, #12]
	bl	_abs
	lsl	x8, x0, #3
	ldr	w22, [x22, x8]
	ldr	w8, [x20]
	sub	w23, w8, #1
	ldr	x24, [x20, #8]
	ldr	w0, [x19, #12]
	bl	_abs
	add	x8, x24, x0, lsl #3
	add	x9, x8, #4
	cmp	w22, #0
	csel	x8, x8, x9, eq
	str	w23, [x8]
	str	xzr, [x21, #8]
	ldr	w8, [x20]
	sub	w0, w8, #1
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_thworld,24,3                   ; @thworld
	.comm	_MAX_TH_TETRAHEDRONS,4,2        ; @MAX_TH_TETRAHEDRONS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MAX_TH_TETRAHEDRONS"

.subsections_via_symbols
