	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TraceAgainstSurface            ## -- Begin function TraceAgainstSurface
	.p2align	4, 0x90
_TraceAgainstSurface:                   ## @TraceAgainstSurface
	.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
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	(%rdi), %esi
	movl	4(%rdi), %edi
	movl	20(%r15), %ecx
	movl	24(%r15), %edx
	callq	_SphereCull
	movq	_numthreads@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	cmpl	$1, %ecx
	jne	LBB0_8
## %bb.2:
	movq	_c_cullTrace@GOTPCREL(%rip), %rax
	incl	(%rax)
	jmp	LBB0_8
LBB0_3:
	cmpl	$1, %ecx
	jne	LBB0_5
## %bb.4:
	movq	_c_testTrace@GOTPCREL(%rip), %rax
	incl	(%rax)
	movl	(%r15), %eax
	movq	_c_testFacets@GOTPCREL(%rip), %rcx
	addl	%eax, (%rcx)
LBB0_5:
	cmpl	$0, (%r15)
	jle	LBB0_8
## %bb.6:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	16(%r15), %esi
	movq	8(%r15), %rdx
	addq	%rbx, %rdx
	movq	%r14, %rdi
	callq	_TraceAgainstFacet
	incq	%rbx
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	jl	LBB0_7
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_numthreads,4,2                 ## @numthreads
	.comm	_c_cullTrace,4,2                ## @c_cullTrace
	.comm	_c_testTrace,4,2                ## @c_testTrace
	.comm	_c_testFacets,4,2               ## @c_testFacets
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_TraceAgainstSurface            ; -- Begin function TraceAgainstSurface
	.p2align	2
_TraceAgainstSurface:                   ; @TraceAgainstSurface
	.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
	ldr	w0, [x0, #4]
	ldr	w1, [x20]
	ldp	w3, w2, [x19, #20]
	bl	_SphereCull
Lloh0:
	adrp	x8, _numthreads@GOTPAGE
Lloh1:
	ldr	x8, [x8, _numthreads@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, #1
	cbz	x0, LBB0_3
; %bb.1:
	b.ne	LBB0_8
; %bb.2:
Lloh3:
	adrp	x8, _c_cullTrace@GOTPAGE
Lloh4:
	ldr	x8, [x8, _c_cullTrace@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	b	LBB0_8
LBB0_3:
	b.ne	LBB0_5
; %bb.4:
Lloh5:
	adrp	x8, _c_testTrace@GOTPAGE
Lloh6:
	ldr	x8, [x8, _c_testTrace@GOTPAGEOFF]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	ldr	w8, [x19]
Lloh7:
	adrp	x9, _c_testFacets@GOTPAGE
Lloh8:
	ldr	x9, [x9, _c_testFacets@GOTPAGEOFF]
	ldr	w10, [x9]
	add	w8, w10, w8
	str	w8, [x9]
LBB0_5:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.6:
	mov	x21, #0
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x19, #16]
	ldr	x8, [x19, #8]
	add	x2, x21, x8
	mov	x0, x20
	bl	_TraceAgainstFacet
	add	x21, x21, #1
	ldrsw	x8, [x19]
	cmp	x21, x8
	b.lt	LBB0_7
LBB0_8:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_numthreads,4,2                 ; @numthreads
	.comm	_c_cullTrace,4,2                ; @c_cullTrace
	.comm	_c_testTrace,4,2                ; @c_testTrace
	.comm	_c_testFacets,4,2               ; @c_testFacets
.subsections_via_symbols
