;;-*-Lisp-*- (in-package goal) ;; definition for method 15 of type collide-cache ;; WARN: Return type mismatch int vs none. (defmethod reset ((this collide-cache)) (set! (-> this num-tris) 0) (set! (-> this num-prims) 0) (set! (-> this ignore-processes 0) #f) (set! (-> this ignore-processes 1) #f) (set! *already-printed-exeeded-max-cache-tris* #f) 0 (none) ) ;; definition for method 18 of type collide-cache ;; WARN: Return type mismatch int vs none. (defmethod fill-from-bg ((this collide-cache) (arg0 (function collide-hash int collide-list collide-query int)) (arg1 (function collide-cache collide-list collide-query none)) (arg2 collide-query) ) (set! *already-printed-exeeded-max-cache-tris* #f) (set! (-> *collide-list* num-items) 0) (if *collide-list-boxes* (add-debug-box #t (bucket-id debug) (-> arg2 bbox min) (-> arg2 bbox max) (new 'static 'rgba :g #xff :b #xff :a #x80) ) ) (dotimes (s3-0 (-> *level* length)) (let ((v1-7 (-> *level* level s3-0))) (if (= (-> v1-7 status) 'active) (arg0 (-> v1-7 bsp collide-hash) 0 *collide-list* arg2) ) ) ) (if (> (-> *collide-list* num-items) 0) (arg1 *collide-cache* *collide-list* arg2) ) 0 (none) ) ;; definition for method 21 of type collide-cache ;; INFO: Used lq/sq ;; WARN: Return type mismatch int vs none. ;; WARN: Function (method 21 collide-cache) has a return type of none, but the expression builder found a return statement. (defmethod fill-from-water ((this collide-cache) (arg0 water-control)) (rlet ((vf0 :class vf) (vf1 :class vf) (vf2 :class vf) (vf3 :class vf) (vf4 :class vf) (vf5 :class vf) ) (init-vf0-vector) (if (or (not arg0) (zero? arg0)) (return #f) ) (when (= (-> this num-prims) 100) (if (and (= *cheat-mode* 'debug) (not *display-capture-mode*)) (format 0 "ERROR: Exceeded max number of collide-cache prims!~%") ) (return #f) ) (when (< 460 (+ (-> this num-tris) 2)) (if (and (= *cheat-mode* 'debug) (not *display-capture-mode*)) (print-exceeded-max-cache-tris) ) (return #f) ) (if (not (and (logtest? (-> arg0 flags) (water-flag active)) (logtest? (-> arg0 flags) (water-flag can-ground)) (logtest? (-> arg0 flags) (water-flag swim-ground under-water)) (logtest? (water-flag over-water) (-> arg0 flags)) (not (logtest? (water-flag jump-out) (-> arg0 flags))) ) ) (return #f) ) (let ((v1-31 (-> arg0 collide-height))) (.lvf vf1 (&-> this collide-box min quad)) (.lvf vf3 (&-> this collide-box max quad)) (let ((a2-6 (-> this num-prims-u32)) (a3-4 (the-as (inline-array collide-cache-tri) (-> this tris (-> this num-tris)))) ) (.mov vf5 v1-31) (.add.x.vf.y vf1 vf0 vf5) (set! (-> a3-4 0 clear-flags) (the-as uint128 0)) (set! (-> a3-4 0 prim-index) a2-6) (.add.x.vf.y vf3 vf0 vf5) (set! (-> a3-4 1 clear-flags) (the-as uint128 0)) (set! (-> a3-4 1 prim-index) a2-6) (.mov.vf vf2 vf1) (.mov.vf vf4 vf1) (.add.z.vf.z vf2 vf0 vf3) (.add.x.vf.x vf4 vf0 vf3) (.svf (&-> a3-4 0 vertex 0 quad) vf1) (.svf (&-> a3-4 0 vertex 1 quad) vf2) (.svf (&-> a3-4 0 vertex 2 quad) vf3) (set! (-> a3-4 0 pat) (new 'static 'pat-surface :material (pat-material waterbottom) :nogrind #x1)) (set! (-> a3-4 0 collide-ptr) arg0) (.svf (&-> a3-4 1 vertex 0 quad) vf1) (.svf (&-> a3-4 1 vertex 1 quad) vf3) (.svf (&-> a3-4 1 vertex 2 quad) vf4) (set! (-> a3-4 1 pat) (new 'static 'pat-surface :material (pat-material waterbottom))) (set! (-> a3-4 1 collide-ptr) arg0) ) ) (let ((v1-34 *collide-shape-prim-water*) (a1-5 (-> this prims (-> this num-prims))) ) (set! (-> a1-5 first-tri) (the-as uint (-> this num-tris))) (set! (-> a1-5 num-tris) (the-as uint 2)) (set! (-> a1-5 prim) v1-34) (set! (-> a1-5 ccache) this) (set! (-> a1-5 prim-core world-sphere quad) (-> v1-34 prim-core world-sphere quad)) (set! (-> a1-5 prim-core quad 1) (-> v1-34 prim-core quad 1)) ) (+! (-> this num-prims) 1) (+! (-> this num-tris) 2) 0 (none) ) ) ;; definition for method 12 of type collide-cache ;; INFO: Used lq/sq ;; WARN: Return type mismatch int vs none. (defmethod fill-using-bounding-box ((this collide-cache) (arg0 collide-query)) (rlet ((vf0 :class vf) (vf1 :class vf) (vf2 :class vf) (vf3 :class vf) (vf4 :class vf) ) (init-vf0-vector) (+! (-> *collide-stats* calls) 1) (new 'static 'vector :x 0.5) (nop!) (let ((v1-4 (-> arg0 collide-with-s32))) (nop!) (let ((a0-2 (-> arg0 ignore-process0))) (nop!) (let ((a1-1 (-> arg0 ignore-process1))) (nop!) (let ((a2-0 (-> arg0 ignore-pat-s32))) (nop!) (.lvf vf1 (&-> arg0 bbox min quad)) (nop!) (.lvf vf2 (&-> arg0 bbox max quad)) (nop!) (set! (-> this ignore-processes 0) (the-as process a0-2)) (nop!) (set! (-> this ignore-processes 1) (the-as process a1-1)) (.mov.vf.w vf1 vf0) (nop!) (.mov.vf.w vf2 vf0) (set! (-> this ignore-mask) (the-as pat-surface a2-0)) ) ) ) (.ftoi.vf vf3 vf1) (nop!) (.ftoi.vf vf4 vf2) (set! (-> this num-tris) 0) (nop!) (.svf (&-> this collide-box min quad) vf1) (nop!) (.svf (&-> this collide-box max quad) vf2) (nop!) (.svf (&-> this collide-box4w min quad) vf3) (nop!) (.svf (&-> this collide-box4w max quad) vf4) (nop!) (.svf (&-> arg0 bbox4w min quad) vf3) (nop!) (.svf (&-> arg0 bbox4w max quad) vf4) (nop!) (set! (-> this num-prims) 0) (nop!) (set! (-> this collide-with) (the-as collide-spec v1-4)) ) 0 (when (logtest? (-> arg0 collide-with) (collide-spec backgnd)) (fill-from-bg this (the-as (function collide-hash int collide-list collide-query int) (method-of-type collide-hash drawable-method-11) ) collide-list-fill-bg-using-box arg0 ) (dotimes (s4-0 (-> *level* length)) (let ((v1-15 (-> *level* level s4-0))) (when (= (-> v1-15 status) 'active) (let ((a0-6 (-> v1-15 bsp hfrag-drawable))) (if (nonzero? a0-6) (bounding-box-query (the-as hfragment a0-6) this arg0) ) ) ) ) ) (let ((a0-7 (-> this num-tris))) (when (> a0-7 0) (let ((v1-22 (-> this prims)) (a1-9 *collide-shape-prim-backgnd*) ) (set! (-> v1-22 0 num-tris) (the-as uint a0-7)) (set! (-> v1-22 0 prim) a1-9) (set! (-> this num-prims) 1) (set! (-> v1-22 0 first-tri) (the-as uint 0)) (set! (-> v1-22 0 ccache) this) (set! (-> v1-22 0 prim-core world-sphere quad) (-> a1-9 prim-core world-sphere quad)) (set! (-> v1-22 0 prim-core quad 1) (-> a1-9 prim-core quad 1)) ) ) ) (+! (-> *collide-stats* output) (-> this num-tris)) ) (when (logtest? (-> arg0 collide-with) (collide-spec water)) (let ((v1-29 (-> arg0 ignore-process0))) (if v1-29 (fill-from-water this (-> (the-as process-drawable v1-29) water)) ) ) ) (if (logtest? (-> arg0 collide-with) (collide-spec hit-by-player-list hit-by-others-list player-list)) (fill-from-fg-boxes this) ) 0 (none) ) ) ;; definition for method 13 of type collide-cache ;; ERROR: function was not converted to expressions. Cannot decompile. ;; definition for method 19 of type collide-cache ;; WARN: Return type mismatch int vs none. (defmethod fill-from-fg-boxes ((this collide-cache)) (let ((s5-0 (-> this collide-with))) (set! *actor-list-length* 0) (if (logtest? s5-0 (collide-spec hit-by-others-list)) (set! *actor-list-length* (add-an-object *actor-hash* (-> this collide-box) *actor-list* 256)) ) (when (logtest? s5-0 (collide-spec player-list)) (let ((a0-2 (-> *collide-player-list* alive-list next0))) *collide-player-list* (let ((v1-13 (-> a0-2 next0))) (while (!= a0-2 (-> *collide-player-list* alive-list-end)) (let* ((a0-3 (-> (the-as connection a0-2) param1)) (a1-1 (-> (the-as collide-shape a0-3) root-prim)) ) (when (logtest? s5-0 (-> a1-1 prim-core collide-as)) (let ((a1-2 (-> a1-1 prim-core))) (when (and (>= (+ (-> a1-2 world-sphere x) (-> a1-2 world-sphere w)) (-> this collide-box min x)) (>= (-> this collide-box max x) (- (-> a1-2 world-sphere x) (-> a1-2 world-sphere w))) (>= (+ (-> a1-2 world-sphere y) (-> a1-2 world-sphere w)) (-> this collide-box min y)) (>= (-> this collide-box max y) (- (-> a1-2 world-sphere y) (-> a1-2 world-sphere w))) (>= (+ (-> a1-2 world-sphere z) (-> a1-2 world-sphere w)) (-> this collide-box min z)) (>= (-> this collide-box max z) (- (-> a1-2 world-sphere z) (-> a1-2 world-sphere w))) ) (when (< *actor-list-length* 256) (set! (-> *actor-list* *actor-list-length*) (the-as collide-shape a0-3)) (set! *actor-list-length* (+ *actor-list-length* 1)) ) ) ) ) ) (set! a0-2 v1-13) *collide-player-list* (set! v1-13 (-> v1-13 next0)) ) ) ) ) (when (logtest? s5-0 (collide-spec hit-by-player-list)) (let ((a0-5 (-> *collide-hit-by-player-list* alive-list next0))) *collide-hit-by-player-list* (let ((v1-21 (-> a0-5 next0))) (while (!= a0-5 (-> *collide-hit-by-player-list* alive-list-end)) (let* ((a0-6 (-> (the-as connection a0-5) param1)) (a1-13 (-> (the-as collide-shape a0-6) root-prim)) ) (when (logtest? s5-0 (-> a1-13 prim-core collide-as)) (let ((a1-14 (-> a1-13 prim-core))) (when (and (>= (+ (-> a1-14 world-sphere x) (-> a1-14 world-sphere w)) (-> this collide-box min x)) (>= (-> this collide-box max x) (- (-> a1-14 world-sphere x) (-> a1-14 world-sphere w))) (>= (+ (-> a1-14 world-sphere y) (-> a1-14 world-sphere w)) (-> this collide-box min y)) (>= (-> this collide-box max y) (- (-> a1-14 world-sphere y) (-> a1-14 world-sphere w))) (>= (+ (-> a1-14 world-sphere z) (-> a1-14 world-sphere w)) (-> this collide-box min z)) (>= (-> this collide-box max z) (- (-> a1-14 world-sphere z) (-> a1-14 world-sphere w))) ) (when (< *actor-list-length* 256) (set! (-> *actor-list* *actor-list-length*) (the-as collide-shape a0-6)) (set! *actor-list-length* (+ *actor-list-length* 1)) ) ) ) ) ) (set! a0-5 v1-21) *collide-hit-by-player-list* (set! v1-21 (-> v1-21 next0)) ) ) ) ) (dotimes (s4-0 *actor-list-length*) (let ((v1-26 (-> *actor-list* s4-0))) (when (logtest? s5-0 (-> v1-26 root-prim prim-core collide-as)) (let ((a0-13 (-> v1-26 process))) (if (not (or (= a0-13 (-> this ignore-processes 0)) (= a0-13 (-> this ignore-processes 1)))) (add-fg-prim-using-box (-> v1-26 root-prim) this) ) ) ) ) ) ) 0 (none) ) ;; definition for method 10 of type collide-shape-prim ;; WARN: Return type mismatch object vs none. (defmethod add-fg-prim-using-box ((this collide-shape-prim) (arg0 collide-cache)) (format 0 "ERROR: Illegal collide-shape-prim type passed to collide-shape-prim::add-fg-prim-using-box!~%") (none) ) ;; definition for method 10 of type collide-shape-prim-mesh ;; INFO: function output is handled by mips2c (defmethod-mips2c "(method 10 collide-shape-prim-mesh)" 10 collide-shape-prim-mesh) ;; definition for method 10 of type collide-shape-prim-sphere ;; INFO: function output is handled by mips2c (defmethod-mips2c "(method 10 collide-shape-prim-sphere)" 10 collide-shape-prim-sphere) ;; definition for method 10 of type collide-shape-prim-group ;; INFO: function output is handled by mips2c (defmethod-mips2c "(method 10 collide-shape-prim-group)" 10 collide-shape-prim-group) ;; definition for method 20 of type collide-cache ;; WARN: Return type mismatch int vs none. (defmethod fill-from-fg-line-sphere ((this collide-cache) (arg0 collide-query)) (let ((s4-0 (-> arg0 collide-with))) (set! *actor-list-length* 0) (if (logtest? s4-0 (collide-spec hit-by-others-list)) (set! *actor-list-length* (fill-actor-list-for-sphere *actor-hash* (-> arg0 start-pos) (-> arg0 move-dist) (-> arg0 radius) *actor-list* 256 -1 ) ) ) (let ((f30-0 0.0) (s3-0 (new 'stack-no-clear 'matrix)) ) (let ((f0-1 (vector-length-squared (-> arg0 move-dist)))) (if (< 0.0 f0-1) (set! f30-0 (/ 1.0 f0-1)) ) ) (when (logtest? s4-0 (collide-spec player-list)) (let ((v1-17 (-> *collide-player-list* alive-list next0))) *collide-player-list* (let ((s2-0 (-> v1-17 next0))) (while (!= v1-17 (-> *collide-player-list* alive-list-end)) (let* ((s1-0 (-> (the-as connection v1-17) param1)) (v1-18 (-> (the-as collide-shape s1-0) root-prim)) ) (when (logtest? s4-0 (-> v1-18 prim-core collide-as)) (let ((s0-0 (-> v1-18 prim-core))) (vector-! (-> s3-0 uvec) (-> s0-0 world-sphere) (-> arg0 start-pos)) (let* ((f1-2 (* (vector-dot (-> arg0 move-dist) (-> s3-0 uvec)) f30-0)) (f0-6 (fmax 0.0 (fmin 1.0 f1-2))) ) (vector+float*! (-> s3-0 rvec) (-> arg0 start-pos) (-> arg0 move-dist) f0-6) ) (when (< (vector-vector-distance-squared (-> s3-0 rvec) (-> s0-0 world-sphere)) (square (+ (-> arg0 radius) (-> s0-0 world-sphere w))) ) (when (< *actor-list-length* 256) (set! (-> *actor-list* *actor-list-length*) (the-as collide-shape s1-0)) (set! *actor-list-length* (+ *actor-list-length* 1)) ) ) ) ) ) (set! v1-17 s2-0) *collide-player-list* (set! s2-0 (-> s2-0 next0)) ) ) ) ) (when (logtest? s4-0 (collide-spec hit-by-player-list)) (let ((v1-38 (-> *collide-hit-by-player-list* alive-list next0))) *collide-hit-by-player-list* (let ((s2-1 (-> v1-38 next0))) (while (!= v1-38 (-> *collide-hit-by-player-list* alive-list-end)) (let* ((s1-1 (-> (the-as connection v1-38) param1)) (v1-39 (-> (the-as collide-shape s1-1) root-prim)) ) (when (logtest? s4-0 (-> v1-39 prim-core collide-as)) (let ((s0-1 (-> v1-39 prim-core))) (vector-! (-> s3-0 uvec) (-> s0-1 world-sphere) (-> arg0 start-pos)) (let* ((f1-8 (* (vector-dot (-> arg0 move-dist) (-> s3-0 uvec)) f30-0)) (f0-11 (fmax 0.0 (fmin 1.0 f1-8))) ) (vector+float*! (-> s3-0 rvec) (-> arg0 start-pos) (-> arg0 move-dist) f0-11) ) (when (< (vector-vector-distance-squared (-> s3-0 rvec) (-> s0-1 world-sphere)) (square (+ (-> arg0 radius) (-> s0-1 world-sphere w))) ) (when (< *actor-list-length* 256) (set! (-> *actor-list* *actor-list-length*) (the-as collide-shape s1-1)) (set! *actor-list-length* (+ *actor-list-length* 1)) ) ) ) ) ) (set! v1-38 s2-1) *collide-hit-by-player-list* (set! s2-1 (-> s2-1 next0)) ) ) ) ) ) (dotimes (s3-1 *actor-list-length*) (let ((v1-58 (-> *actor-list* s3-1))) (when (logtest? s4-0 (-> v1-58 root-prim prim-core collide-as)) (let ((a0-37 (-> v1-58 process))) (if (not (or (= a0-37 (-> this ignore-processes 0)) (= a0-37 (-> this ignore-processes 1)))) (add-fg-prim-using-line-sphere (-> v1-58 root-prim) this arg0) ) ) ) ) ) ) 0 (none) ) ;; definition for method 11 of type collide-shape-prim ;; WARN: Return type mismatch object vs none. (defmethod add-fg-prim-using-line-sphere ((this collide-shape-prim) (arg0 collide-cache) (arg1 object)) (format 0 "ERROR: Illegal collide-shape-prim type passed to collide-shape-prim::add-fg-prim-using-line-sphere!~%" ) (none) ) ;; definition for method 11 of type collide-shape-prim-mesh ;; INFO: function output is handled by mips2c (defmethod-mips2c "(method 11 collide-shape-prim-mesh)" 11 collide-shape-prim-mesh) ;; definition for method 11 of type collide-shape-prim-sphere ;; INFO: function output is handled by mips2c (defmethod-mips2c "(method 11 collide-shape-prim-sphere)" 11 collide-shape-prim-sphere) ;; definition for method 11 of type collide-shape-prim-group ;; INFO: function output is handled by mips2c (defmethod-mips2c "(method 11 collide-shape-prim-group)" 11 collide-shape-prim-group) ;; definition for method 10 of type collide-cache (defmethod fill-and-probe-using-line-sphere ((this collide-cache) (arg0 collide-query)) (fill-using-line-sphere this arg0) (probe-using-line-sphere this arg0) ) ;; definition of type collide-puls-work (deftype collide-puls-work (structure) ((ignore-pat pat-surface) (bsphere sphere :inline) (move-dist vector :inline) ) ) ;; definition for method 3 of type collide-puls-work (defmethod inspect ((this collide-puls-work)) (when (not this) (set! this this) (goto cfg-4) ) (format #t "[~8x] ~A~%" this 'collide-puls-work) (format #t "~1Tignore-pat: ~D~%" (-> this ignore-pat)) (format #t "~1Tbsphere: #~%" (-> this bsphere)) (format #t "~1Tmove-dist: #~%" (-> this move-dist)) (label cfg-4) this ) ;; definition for method 16 of type collide-cache (defmethod probe-using-line-sphere ((this collide-cache) (arg0 collide-query)) (rlet ((vf0 :class vf) (vf2 :class vf) (vf3 :class vf) (vf4 :class vf) ) (init-vf0-vector) (let ((s5-0 (new 'stack-no-clear 'collide-puls-work))) (.lvf vf4 (&-> arg0 exit-planes 0 quad)) (.lvf vf3 (&-> arg0 start-pos quad)) (.lvf vf2 (&-> arg0 move-dist quad)) (set! (-> s5-0 ignore-pat) (-> arg0 ignore-pat)) (.mul.w.vf.w vf3 vf0 vf4) (.svf (&-> s5-0 move-dist quad) vf2) (.svf (&-> s5-0 bsphere quad) vf3) (let ((s4-0 (the-as object (-> this prims))) (f30-0 -100000000.0) ) (countdown (s3-0 (-> this num-prims)) (when (and (logtest? (-> arg0 collide-with) (-> (the-as collide-cache-prim s4-0) prim-core collide-as)) (logtest? (-> arg0 action-mask) (-> (the-as collide-cache-prim s4-0) prim-core action)) ) (cond ((>= (-> (the-as collide-cache-prim s4-0) prim-core prim-type) 0) (let ((f0-0 ((method-of-type collide-cache-prim resolve-moving-sphere-tri) (the-as collide-cache-prim s4-0) arg0 (-> s5-0 bsphere) (-> s5-0 move-dist) f30-0 (collide-action solid) ) ) ) (if (>= f0-0 0.0) (set! f30-0 f0-0) ) ) ) (else (when (not (logtest? (-> arg0 ignore-pat) (-> (the-as collide-shape-prim-sphere (-> (the-as collide-cache-prim s4-0) prim)) pat) ) ) (let ((f0-1 ((method-of-type collide-cache-prim resolve-moving-sphere-sphere) (the-as collide-cache-prim s4-0) arg0 (-> s5-0 bsphere) (-> s5-0 move-dist) f30-0 (collide-action solid) ) ) ) (if (>= f0-1 0.0) (set! f30-0 f0-1) ) ) ) ) ) ) (set! s4-0 (-> (the-as (inline-array collide-cache-prim) s4-0) 1)) ) f30-0 ) ) ) ) ;; definition of type lsmi-work (deftype lsmi-work (structure) ((best-u float) (orig-best-u float) (action uint32) (cquery collide-query :inline) ) ) ;; definition for method 3 of type lsmi-work (defmethod inspect ((this lsmi-work)) (when (not this) (set! this this) (goto cfg-4) ) (format #t "[~8x] ~A~%" this 'lsmi-work) (format #t "~1Tbest-u: ~f~%" (-> this best-u)) (format #t "~1Torig-best-u: ~f~%" (-> this orig-best-u)) (format #t "~1Taction: ~D~%" (-> this action)) (format #t "~1Tcquery: #~%" (-> this cquery)) (label cfg-4) this ) ;; definition for method 9 of type collide-cache-prim ;; INFO: function output is handled by mips2c (defmethod-mips2c "(method 9 collide-cache-prim)" 9 collide-cache-prim) ;; definition for method 10 of type collide-cache-prim ;; INFO: function output is handled by mips2c (defmethod-mips2c "(method 10 collide-cache-prim)" 10 collide-cache-prim) ;; definition for method 11 of type collide-cache (defmethod fill-and-probe-using-spheres ((this collide-cache) (arg0 collide-query)) (fill-using-spheres this arg0) (probe-using-spheres this arg0) ) ;; definition for method 14 of type collide-cache (defmethod fill-using-spheres ((this collide-cache) (arg0 collide-query)) (new 'stack-no-clear 'bounding-box) (set-from-spheres! (-> arg0 bbox) (the-as (inline-array sphere) (-> arg0 best-dist)) (the-as int (-> arg0 best-other-prim)) ) (fill-using-bounding-box this arg0) (none) ) ;; definition for method 17 of type collide-cache ;; INFO: function output is handled by mips2c (defmethod-mips2c "(method 17 collide-cache)" 17 collide-cache) ;; definition for method 9 of type collide-puss-work ;; INFO: function output is handled by mips2c (defmethod-mips2c "(method 9 collide-puss-work)" 9 collide-puss-work) ;; definition for method 10 of type collide-puss-work ;; INFO: function output is handled by mips2c (defmethod-mips2c "(method 10 collide-puss-work)" 10 collide-puss-work) ;; definition for function test-closest-pt-in-triangle ;; INFO: Used lq/sq ;; ERROR: failed type prop at 20: add failed: object ;; ERROR: Failed to guess stack use for 16 in test-closest-pt-in-triangle:0 (defun test-closest-pt-in-triangle ((a0-0 collide-cache)) (local-vars (v0-0 vector) (v0-1 vector) (v0-2 none) (v0-3 float) (v0-4 symbol) (v1-1 int) (v1-2 vector) (v1-3 uint128) (v1-4 symbol) (v1-5 symbol) (v1-7 none) (a0-1 int) (a0-2 none) (a0-3 none) (a0-4 none) (a0-5 none) (a0-6 none) (a1-0 collide-cache-tri) (a1-1 none) (a1-2 none) (a2-0 vector) (a2-1 collide-cache-tri) (a3-0 vector) (a3-1 none) (s0-0 none) (s1-0 int) (s2-0 none) (s3-0 none) (s4-0 none) (s5-0 object) (t9-0 (function int vector)) (t9-1 (function vector vector vector vector vector)) (t9-2 (function vector vector matrix vector none)) (t9-3 (function vector vector float)) (gp-0 none) (sp-0 none) (f0-0 float) (f1-0 float) (f30-0 number) ) (set! gp-0 (the-as none (+ sp-0 16))) (set! v1-1 -1082130432) (set! f30-0 (gpr->fpr v1-1)) (set! s5-0 (-> a0-0 tris)) (set! s4-0 (the-as none (+ sp-0 32))) (set! s3-0 (the-as none (+ sp-0 48))) (set! s2-0 (the-as none (+ sp-0 64))) (set! s1-0 (-> a0-0 num-tris)) (set! s0-0 (the-as none s4-0)) (set! t9-0 target-pos) (set! a0-1 0) (set! v0-0 (call! a0-1)) (set! v1-2 v0-0) (set! v1-3 (-> v1-2 quad)) (s.q! s0-0 v1-3) (while (nonzero? s1-0) (when (begin (or (begin (set! s1-0 (+ s1-0 -1)) (set! t9-1 normal-of-plane) (set! a0-2 (the-as none s2-0)) (set! a1-0 (+ s5-0 0)) (set! a2-0 (+ s5-0 16)) (set! a3-0 (+ s5-0 32)) (call! a0-2 a1-0 a2-0 a3-0) (set! t9-2 closest-pt-in-triangle) (set! a0-3 (the-as none s3-0)) (set! a1-1 (the-as none s4-0)) (set! a2-1 (+ s5-0 0)) (set! a3-1 (the-as none s2-0)) (call! a0-3 a1-1 a2-1 a3-1) (set! t9-3 vector-vector-distance-squared) (set! a0-4 (the-as none s3-0)) (set! a1-2 (the-as none s4-0)) (set! v0-3 (call! a0-4 a1-2)) (set! f0-0 (gpr->fpr v0-3)) (set! f1-0 (the-as float 0)) (set! v1-4 (<.s f30-0 f1-0)) v1-4 ) (set! v1-5 (<.s f0-0 f30-0)) ) v1-5 ) (set! f30-0 f0-0) (set! v1-7 (the-as none gp-0)) (set! a0-5 (the-as none s3-0)) (set! a0-6 (the-as none (l.q a0-5))) (s.q! v1-7 a0-6) (set! v1-8 s5-0) ) (set! s5-0 (-> s5-0 1)) ) (set! v0-4 #f) (ret-value v0-4) )