	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function Q3_SurfacePlane
LCPI0_0:
	.quad	0x3feccccccccccccd              ## double 0.90000000000000002
LCPI0_1:
	.quad	0x0000000000000000              ## double 0
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_Q3_SurfacePlane
	.p2align	4, 0x90
_Q3_SurfacePlane:                       ## @Q3_SurfacePlane
	.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	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	movq	_q3_drawVerts@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movq	(%rdi), %rcx
	movq	(%rax,%rcx,8), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	$1, %r13d
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	8(%r15), %ecx
	leal	-1(%rcx), %eax
	cmpl	%eax, %r13d
	jge	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	(%r12), %rsi
	movq	(%r15), %rdi
	movl	%r13d, %eax
	cltd
	idivl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
	addq	%rdi, %rdx
	movq	(%rsi,%rdx,8), %r14
	incl	%r13d
	movl	%r13d, %eax
	cltd
	idivl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
	addq	%rdi, %rdx
	movq	%r15, %rbx
	movq	%r12, %r15
	movq	(%rsi,%rdx,8), %r12
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_VectorSubtract
	movq	%r12, %rdi
	movq	%r15, %r12
	movq	%rbx, %r15
	movq	%r14, %rsi
	callq	_VectorSubtract
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdx
	callq	_CrossProduct
	movq	%rbx, %rdi
	callq	_VectorNormalize
	movq	%rbx, %rdi
	callq	_VectorLength
	ucomisd	LCPI0_1(%rip), %xmm0
	jne	LBB0_3
	jnp	LBB0_1
LBB0_3:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_VectorLength
	movsd	LCPI0_0(%rip), %xmm1            ## xmm1 = mem[0],zero
	ucomisd	%xmm0, %xmm1
	jbe	LBB0_7
## %bb.4:
	movq	_q3_drawSurfaces@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	shlq	$4, %rax
	movq	%r15, %rsi
	subq	%rax, %rsi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movsd	(%rax), %xmm0                   ## xmm0 = mem[0],zero
	movsd	8(%rax), %xmm1                  ## xmm1 = mem[0],zero
	movsd	16(%rax), %xmm2                 ## xmm2 = mem[0],zero
	leaq	L_.str(%rip), %rdi
	movb	$3, %al
	callq	_printf
	leaq	L_.str.1(%rip), %rdi
	movb	$6, %al
	callq	_printf
	movl	8(%r15), %ecx
	testl	%ecx, %ecx
	jle	LBB0_7
## %bb.5:
	xorl	%ebx, %ebx
	leaq	L_.str.2(%rip), %r14
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rsi
	movl	%ebx, %eax
	cltd
	idivl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
	addq	(%r15), %rdx
	movq	(%rsi,%rdx,8), %rax
	movss	(%rax), %xmm0                   ## xmm0 = mem[0],zero,zero,zero
	movss	4(%rax), %xmm1                  ## xmm1 = mem[0],zero,zero,zero
	movss	8(%rax), %xmm2                  ## xmm2 = mem[0],zero,zero,zero
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_Log_Print
	incl	%ebx
	movl	8(%r15), %ecx
	cmpl	%ecx, %ebx
	jl	LBB0_6
LBB0_7:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_DotProduct
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movss	%xmm0, (%rax)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_q3_drawVerts,8,3               ## @q3_drawVerts
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"surface %td bogus normal vector %f %f %f\n"

	.comm	_q3_drawSurfaces,4,2            ## @q3_drawSurfaces
L_.str.1:                               ## @.str.1
	.asciz	"t1 = %f %f %f, t2 = %f %f %f\n"

L_.str.2:                               ## @.str.2
	.asciz	"p%d = %f %f %f\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Q3_SurfacePlane                ; -- Begin function Q3_SurfacePlane
	.p2align	2
_Q3_SurfacePlane:                       ; @Q3_SurfacePlane
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x25, _q3_drawVerts@GOTPAGE
Lloh1:
	ldr	x25, [x25, _q3_drawVerts@GOTPAGEOFF]
	ldr	x8, [x25]
	ldr	x9, [x0]
	ldr	x22, [x8, x9, lsl #3]
	mov	w26, #1
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x21, #8]
	sub	w9, w8, #1
	cmp	w26, w9
	b.ge	LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x9, [x25]
	ldr	x10, [x21]
	sdiv	w11, w26, w8
	msub	w11, w11, w8, w26
	add	x11, x10, x11
	ldr	x23, [x9, x11, lsl #3]
	add	w26, w26, #1
	sdiv	w11, w26, w8
	msub	w8, w11, w8, w26
	add	x8, x10, x8
	ldr	x24, [x9, x8, lsl #3]
	mov	x0, x22
	mov	x1, x23
	bl	_VectorSubtract
	mov	x0, x24
	mov	x1, x23
	bl	_VectorSubtract
	mov	x2, x20
	bl	_CrossProduct
	mov	x0, x20
	bl	_VectorNormalize
	mov	x0, x20
	bl	_VectorLength
	fcmp	d0, #0.0
	b.eq	LBB0_1
LBB0_3:
	mov	x0, x20
	bl	_VectorLength
	mov	x8, #-3689348814741910324
	movk	x8, #52429
	movk	x8, #16364, lsl #48
	fmov	d1, x8
	fcmp	d0, d1
	b.pl	LBB0_7
; %bb.4:
Lloh2:
	adrp	x8, _q3_drawSurfaces@GOTPAGE
Lloh3:
	ldr	x8, [x8, _q3_drawSurfaces@GOTPAGEOFF]
Lloh4:
	ldrsw	x8, [x8]
	sub	x8, x21, x8, lsl #4
	ldr	q0, [x20]
	ldr	d1, [x20, #16]
	str	d1, [sp, #24]
	stur	q0, [sp, #8]
	str	x8, [sp]
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_printf
	ldr	w8, [x21, #8]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.5:
	mov	w23, #0
Lloh9:
	adrp	x24, l_.str.2@PAGE
Lloh10:
	add	x24, x24, l_.str.2@PAGEOFF
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x25]
	ldr	x10, [x21]
	sdiv	w11, w23, w8
	msub	w8, w11, w8, w23
	add	x8, x10, x8
	ldr	x8, [x9, x8, lsl #3]
	ldp	s0, s1, [x8]
	ldr	s2, [x8, #8]
	mov	x0, x24
	mov	x1, x23
	bl	_Log_Print
	add	w23, w23, #1
	ldr	w8, [x21, #8]
	cmp	w23, w8
	b.lt	LBB0_6
LBB0_7:
	mov	x0, x22
	mov	x1, x20
	bl	_DotProduct
	str	s0, [x19]
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_q3_drawVerts,8,3               ; @q3_drawVerts
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"surface %td bogus normal vector %f %f %f\n"

	.comm	_q3_drawSurfaces,4,2            ; @q3_drawSurfaces
l_.str.1:                               ; @.str.1
	.asciz	"t1 = %f %f %f, t2 = %f %f %f\n"

l_.str.2:                               ; @.str.2
	.asciz	"p%d = %f %f %f\n"

.subsections_via_symbols
