	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TH_TetrahedralDecomposition    ## -- Begin function TH_TetrahedralDecomposition
	.p2align	4, 0x90
_TH_TetrahedralDecomposition:           ## @TH_TetrahedralDecomposition
	.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	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_thworld@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	leaq	L_.str(%rip), %rdi
	callq	_qprintf
	movl	4(%r12), %ecx
	leaq	-64(%rbp), %r15
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_1:                                 ##   in Loop: Header=BB0_2 Depth=1
	testl	%r13d, %r13d
	je	LBB0_19
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
                                        ##     Child Loop BB0_13 Depth 2
	cmpl	$2, %ecx
	jl	LBB0_18
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r13d, %r13d
	movl	$1, %ebx
	movl	$16, %r14d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_5 Depth=2
	incq	%rbx
	movslq	4(%r12), %rcx
	addq	$16, %r14
	cmpq	%rcx, %rbx
	jge	LBB0_9
LBB0_5:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	8(%r12), %rdi
	cmpq	$0, 8(%rdi,%r14)
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=2
	cmpq	$0, (%rdi,%r14)
	jne	LBB0_4
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=2
	addq	%r14, %rdi
	movq	%r15, %rsi
	callq	_TH_FindTetrahedron1
	testl	%eax, %eax
	je	LBB0_4
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=2
	incl	%r13d
	movq	%r15, %rdi
	callq	_TH_CreateTetrahedron
	movl	(%r12), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_qprintf
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	testl	%r13d, %r13d
	jne	LBB0_2
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$2, %ecx
	jl	LBB0_18
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r13d, %r13d
	movl	$1, %r14d
	movl	$16, %ebx
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_13 Depth=2
	incq	%r14
	movslq	4(%r12), %rcx
	addq	$16, %rbx
	cmpq	%rcx, %r14
	jge	LBB0_1
LBB0_13:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	8(%r12), %rdi
	cmpq	$0, 8(%rdi,%rbx)
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=2
	cmpq	$0, (%rdi,%rbx)
	jne	LBB0_12
LBB0_15:                                ##   in Loop: Header=BB0_13 Depth=2
	addq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_TH_FindTetrahedron2
	testl	%eax, %eax
	je	LBB0_12
## %bb.16:                              ##   in Loop: Header=BB0_13 Depth=2
	incl	%r13d
	movq	%r15, %rdi
	callq	_TH_CreateTetrahedron
	movl	(%r12), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_qprintf
	jmp	LBB0_12
LBB0_18:
	xorl	%esi, %esi
LBB0_25:
	leaq	L_.str.2(%rip), %rdi
	callq	_Log_Print
	movl	(%r12), %esi
	decl	%esi
	leaq	L_.str.3(%rip), %rdi
	callq	_Log_Print
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_33
## %bb.26:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_19:
	xorl	%esi, %esi
	cmpl	$2, %ecx
	jl	LBB0_25
## %bb.20:
	movl	%ecx, %ebx
	movq	8(%r12), %r8
	decq	%rbx
	cmpl	$2, %ecx
	jne	LBB0_27
## %bb.21:
	xorl	%esi, %esi
	movl	$1, %edx
LBB0_22:
	testb	$1, %bl
	je	LBB0_25
## %bb.23:
	shlq	$4, %rdx
	cmpq	$0, 8(%r8,%rdx)
	jne	LBB0_25
## %bb.24:
	cmpq	$1, (%r8,%rdx)
	adcl	$0, %esi
	jmp	LBB0_25
LBB0_27:
	leaq	40(%r8), %rdi
	movq	%rbx, %rcx
	andq	$-2, %rcx
	negq	%rcx
	xorl	%esi, %esi
	movl	$1, %edx
	jmp	LBB0_29
	.p2align	4, 0x90
LBB0_31:                                ##   in Loop: Header=BB0_29 Depth=1
	cmpq	$1, -24(%rdi)
	adcl	$0, %esi
	cmpq	$0, (%rdi)
	je	LBB0_32
LBB0_28:                                ##   in Loop: Header=BB0_29 Depth=1
	addq	$32, %rdi
	leaq	(%rcx,%rdx), %rax
	addq	$2, %rax
	addq	$2, %rdx
	cmpq	$1, %rax
	je	LBB0_22
LBB0_29:                                ## =>This Inner Loop Header: Depth=1
	cmpq	$0, -16(%rdi)
	je	LBB0_31
## %bb.30:                              ##   in Loop: Header=BB0_29 Depth=1
	cmpq	$0, (%rdi)
	jne	LBB0_28
LBB0_32:                                ##   in Loop: Header=BB0_29 Depth=1
	cmpq	$1, -8(%rdi)
	adcl	$0, %esi
	jmp	LBB0_28
LBB0_33:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%6d tetrahedrons"

	.comm	_thworld,16,3                   ## @thworld
L_.str.1:                               ## @.str.1
	.asciz	"\r%6d"

L_.str.2:                               ## @.str.2
	.asciz	"\r%6d triangles with front only\n"

L_.str.3:                               ## @.str.3
	.asciz	"\r%6d tetrahedrons\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TH_TetrahedralDecomposition    ; -- Begin function TH_TetrahedralDecomposition
	.p2align	2
_TH_TetrahedralDecomposition:           ; @TH_TetrahedralDecomposition
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
Lloh3:
	adrp	x20, _thworld@GOTPAGE
Lloh4:
	ldr	x20, [x20, _thworld@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_qprintf
	ldr	w8, [x20, #4]
Lloh7:
	adrp	x19, l_.str.1@PAGE
Lloh8:
	add	x19, x19, l_.str.1@PAGEOFF
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x8, x9
	cbz	w21, LBB0_17
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
                                        ;     Child Loop BB0_13 Depth 2
	cmp	w8, #2
	b.lt	LBB0_22
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x22, #0
	mov	w21, #0
	mov	w23, #1
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=2
	add	x23, x23, #1
	ldrsw	x8, [x20, #4]
	add	x22, x22, #16
	cmp	x23, x8
	b.ge	LBB0_9
LBB0_5:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x20, #8]
	add	x8, x8, x22
	ldr	x9, [x8, #24]
	cbz	x9, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	ldr	x9, [x8, #16]
	cbnz	x9, LBB0_4
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=2
	add	x0, x8, #16
	add	x1, sp, #8
	bl	_TH_FindTetrahedron1
	cbz	w0, LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=2
	add	w21, w21, #1
	add	x0, sp, #8
	bl	_TH_CreateTetrahedron
	ldr	w1, [x20]
	mov	x0, x19
	bl	_qprintf
	b	LBB0_4
LBB0_9:                                 ;   in Loop: Header=BB0_2 Depth=1
	cbnz	w21, LBB0_2
; %bb.10:                               ;   in Loop: Header=BB0_2 Depth=1
	cmp	w8, #2
	b.lt	LBB0_22
; %bb.11:                               ;   in Loop: Header=BB0_2 Depth=1
	mov	x22, #0
	mov	w21, #0
	mov	w23, #1
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=2
	add	x23, x23, #1
	ldrsw	x9, [x20, #4]
	add	x22, x22, #16
	cmp	x23, x9
	b.ge	LBB0_1
LBB0_13:                                ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x8, [x20, #8]
	add	x8, x8, x22
	ldr	x9, [x8, #24]
	cbz	x9, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=2
	ldr	x9, [x8, #16]
	cbnz	x9, LBB0_12
LBB0_15:                                ;   in Loop: Header=BB0_13 Depth=2
	add	x0, x8, #16
	add	x1, sp, #8
	bl	_TH_FindTetrahedron2
	cbz	w0, LBB0_12
; %bb.16:                               ;   in Loop: Header=BB0_13 Depth=2
	add	w21, w21, #1
	add	x0, sp, #8
	bl	_TH_CreateTetrahedron
	ldr	w1, [x20]
	mov	x0, x19
	bl	_qprintf
	b	LBB0_12
LBB0_17:
	cmp	w9, #2
	b.lt	LBB0_22
; %bb.18:
	mov	w1, #0
	and	x9, x9, #0xffffffff
	ldr	x8, [x20, #8]
	add	x8, x8, #24
	sub	x9, x9, #1
	b	LBB0_20
LBB0_19:                                ;   in Loop: Header=BB0_20 Depth=1
	add	x8, x8, #16
	subs	x9, x9, #1
	b.eq	LBB0_23
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x8]
	cbnz	x10, LBB0_19
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=1
	ldur	x10, [x8, #-8]
	cmp	x10, #0
	cinc	w1, w1, eq
	b	LBB0_19
LBB0_22:
	mov	w1, #0
LBB0_23:
Lloh9:
	adrp	x0, l_.str.2@PAGE
Lloh10:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_Log_Print
	ldr	w8, [x20]
	sub	w1, w8, #1
Lloh11:
	adrp	x0, l_.str.3@PAGE
Lloh12:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_Log_Print
	ldr	x8, [sp, #24]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_25
; %bb.24:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_25:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%6d tetrahedrons"

	.comm	_thworld,16,3                   ; @thworld
l_.str.1:                               ; @.str.1
	.asciz	"\r%6d"

l_.str.2:                               ; @.str.2
	.asciz	"\r%6d triangles with front only\n"

l_.str.3:                               ; @.str.3
	.asciz	"\r%6d tetrahedrons\n"

.subsections_via_symbols
