	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ReadPolysetGeometry
_ReadPolysetGeometry:                   ## @ReadPolysetGeometry
	.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	%rsi, -48(%rbp)                 ## 8-byte Spill
	testl	%edx, %edx
	jle	LBB0_5
## %bb.1:
	movq	%rcx, %r15
	movl	%edx, %r14d
	leaq	16(%rcx), %r13
	subq	%rdi, %r15
	addq	$24, %r15
	leaq	-56(%rbp), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	addq	$24, %r13
	addq	$24, %r15
	decl	%r14d
	je	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	$8, %esi
	movl	$1, %edx
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	callq	_fread
	movq	%r12, %rdi
	callq	_ByteSwapTri
	movq	-56(%rbp), %rax
	movq	(%r13), %r9
	movq	-16(%r13), %r8
	movq	-8(%r13), %r10
	movq	8(%rax), %rdi
	movq	16(%rax), %rcx
	movq	(%r9), %rbx
	movq	(%r10), %rdx
	movl	(%rcx), %esi
	movl	%esi, (%rbx)
	movl	(%rdi), %esi
	movl	%esi, (%rdx)
	movl	4(%rcx), %esi
	movl	%esi, 4(%rbx)
	movl	4(%rdi), %esi
	movl	%esi, 4(%rdx)
	movl	8(%rcx), %ecx
	movl	%ecx, 8(%rbx)
	movl	8(%rdi), %ecx
	movl	%ecx, 8(%rdx)
	movl	4(%rax), %ecx
	movq	(%r8), %rdx
	movl	%ecx, (%rdx)
	movl	(%rax), %ecx
	movl	%ecx, 4(%rdx)
	movq	32(%rax), %rcx
	movq	40(%rax), %rdx
	movq	8(%r9), %rsi
	movq	8(%r10), %rdi
	movl	(%rdx), %ebx
	movl	%ebx, (%rsi)
	movl	(%rcx), %ebx
	movl	%ebx, (%rdi)
	movl	4(%rdx), %ebx
	movl	%ebx, 4(%rsi)
	movl	4(%rcx), %ebx
	movl	%ebx, 4(%rdi)
	movl	8(%rdx), %edx
	movl	%edx, 8(%rsi)
	movl	8(%rcx), %ecx
	movl	%ecx, 8(%rdi)
	movl	28(%rax), %ecx
	movq	8(%r8), %rdx
	movl	%ecx, (%rdx)
	movl	24(%rax), %ecx
	movl	%ecx, 4(%rdx)
	movq	56(%rax), %rcx
	movq	64(%rax), %rdx
	movq	16(%r9), %rsi
	movq	16(%r10), %rdi
	movl	(%rdx), %ebx
	movl	%ebx, (%rsi)
	movl	(%rcx), %ebx
	movl	%ebx, (%rdi)
	movl	4(%rdx), %ebx
	movl	%ebx, 4(%rsi)
	movl	4(%rcx), %ebx
	movl	%ebx, 4(%rdi)
	movl	8(%rdx), %edx
	movl	%edx, 8(%rsi)
	movl	8(%rcx), %ecx
	movl	%ecx, 8(%rdi)
	movl	52(%rax), %ecx
	movq	16(%r8), %rdx
	movl	%ecx, (%rdx)
	movl	48(%rax), %eax
	movl	%eax, 4(%rdx)
	movq	%r15, %rax
	sarq	$3, %rax
	movabsq	$-6148914691236517205, %rcx     ## imm = 0xAAAAAAAAAAAAAAAB
	imulq	%rcx, %rax
	movq	_POLYSET_MAXTRIANGLES@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	cmpq	%rcx, %rax
	jl	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str(%rip), %rdi
	callq	_Error
	jmp	LBB0_4
LBB0_5:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_POLYSET_MAXTRIANGLES,4,2       ## @POLYSET_MAXTRIANGLES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error: too many triangles; increase POLYSET_MAXTRIANGLES\n"

	.no_dead_strip	_ReadPolysetGeometry
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ReadPolysetGeometry
_ReadPolysetGeometry:                   ; @ReadPolysetGeometry
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	cmp	w2, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x19, x2
	mov	x20, x1
	add	x22, x3, #16
	sub	x8, x3, x0
	add	x23, x8, #24
	mov	x24, #-6148914691236517206
	movk	x24, #43691
Lloh0:
	adrp	x25, _POLYSET_MAXTRIANGLES@GOTPAGE
Lloh1:
	ldr	x25, [x25, _POLYSET_MAXTRIANGLES@GOTPAGEOFF]
Lloh2:
	adrp	x21, l_.str@PAGE
Lloh3:
	add	x21, x21, l_.str@PAGEOFF
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x22, x22, #24
	add	x23, x23, #24
	subs	w19, w19, #1
	b.eq	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #8
	mov	w1, #8
	mov	w2, #1
	mov	x3, x20
	bl	_fread
	add	x0, sp, #8
	bl	_ByteSwapTri
	ldr	x8, [sp, #8]
	ldp	x11, x10, [x22, #-8]
	ldur	x9, [x22, #-16]
	ldp	x13, x12, [x8, #8]
	ldr	w14, [x12]
	ldp	x15, x16, [x10]
	str	w14, [x15]
	ldr	w14, [x13]
	ldp	x17, x0, [x11]
	str	w14, [x17]
	ldr	w14, [x12, #4]
	str	w14, [x15, #4]
	ldr	w14, [x13, #4]
	str	w14, [x17, #4]
	ldr	w12, [x12, #8]
	str	w12, [x15, #8]
	ldr	w12, [x13, #8]
	str	w12, [x17, #8]
	ldr	w12, [x8, #4]
	ldp	x13, x14, [x9]
	str	w12, [x13]
	ldr	w12, [x8]
	str	w12, [x13, #4]
	ldp	x13, x12, [x8, #32]
	ldr	w15, [x12]
	str	w15, [x16]
	ldr	w15, [x13]
	str	w15, [x0]
	ldr	w15, [x12, #4]
	str	w15, [x16, #4]
	ldr	w15, [x13, #4]
	str	w15, [x0, #4]
	ldr	w12, [x12, #8]
	str	w12, [x16, #8]
	ldr	w12, [x13, #8]
	str	w12, [x0, #8]
	ldr	w12, [x8, #28]
	str	w12, [x14]
	ldr	w12, [x8, #24]
	str	w12, [x14, #4]
	ldr	x10, [x10, #16]
	ldp	x13, x12, [x8, #56]
	ldr	x11, [x11, #16]
	ldr	w14, [x12]
	str	w14, [x10]
	ldr	w14, [x13]
	str	w14, [x11]
	ldr	w14, [x12, #4]
	str	w14, [x10, #4]
	ldr	w14, [x13, #4]
	str	w14, [x11, #4]
	ldr	w12, [x12, #8]
	str	w12, [x10, #8]
	ldr	w10, [x13, #8]
	str	w10, [x11, #8]
	ldr	w10, [x8, #52]
	ldr	x9, [x9, #16]
	str	w10, [x9]
	ldr	w8, [x8, #48]
	str	w8, [x9, #4]
	asr	x8, x23, #3
	mul	x8, x8, x24
	ldrsw	x9, [x25]
	cmp	x8, x9
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
	bl	_Error
	b	LBB0_2
LBB0_5:
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_POLYSET_MAXTRIANGLES,4,2       ; @POLYSET_MAXTRIANGLES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error: too many triangles; increase POLYSET_MAXTRIANGLES\n"

	.no_dead_strip	_ReadPolysetGeometry
.subsections_via_symbols
