/* strek_enemy_subs.f -- translated by f2c (version of 19 December 1990  16:50:21).
   You must link the resulting object file with the libraries:
	-lF77 -lI77 -lm -lc   (in that order)
*/

#include "f2c.h"

/* Table of constant values */

static real c_b6 = (float)1e-7;
static real c_b7 = (float)180.;
static real c_b9 = (float).05;
static real c_b11 = (float).5;
static real c_b13 = (float)-3.5;
static real c_b14 = (float)3.5;
static real c_b19 = (float).1;
static integer c__4 = 4;
static integer c__1 = 1;
static integer c__0 = 0;

/* Subroutine */ int strek_find_free_ob__(object, first, free_ob__, found)
logical *object;
integer *first, *free_ob__;
logical *found;
{


/*    ******************************************************************* 
*/
/*    *****                                                         ***** 
*/
/*    *****                STAR TREK VERSION 3.0                    ***** 
*/
/*    *****                                                         ***** 
*/
/*    *****                     written by                          ***** 
*/
/*    *****                                                         ***** 
*/
/*    *****                Justin S. Revenaugh                      ***** 
*/
/*    *****                                                         ***** 
*/
/*    *****                       7/87                              ***** 
*/
/*    *****                                                         ***** 
*/
/*    *****        Massachussetts Institute of Technology           ***** 
*/
/*    *****  Department of Earth, Atmospheric and Planetary Science ***** 
*/
/*    *****                                                         ***** 
*/
/*    ******************************************************************* 
*/
/*    STREK_FIND_FREE_OB finds a free (unused) object number within */
/*    the range [first, first+2]. If no such object exists then */
/*    found is false. Used for finding free photon objects numbers. */



/*    find first free object */

    *found = FALSE_;
    if (! object[*first]) {
	*found = TRUE_;
	*free_ob__ = *first;
    } else if (! object[*first + 1]) {
	*found = TRUE_;
	*free_ob__ = *first + 1;
    } else if (! object[*first + 2]) {
	*found = TRUE_;
	*free_ob__ = *first + 2;
    }
    return 0;
} /* strek_find_free_ob__ */

/* Subroutine */ int strek_place_nemian__(xc, yc, zc, obx, oby, obz, oazm, 
	oangle, ospeed, seed)
real *xc, *yc, *zc, *obx, *oby, *obz, *oazm, *oangle, *ospeed, *seed;
{
    /* Initialized data */

    static real pi = (float)3.14159265;

    /* Builtin functions */
    double sin(), cos();

    /* Local variables */
    extern /* Subroutine */ int rand_();
    static real theta, sp, radius, phi;


/*    STREK_PLACE_NEMIAN places a nubian freighter ship near */
/*    the players ship. It will always fall in the distance */
/*    range 600 - 1000. */

/*    version 1 */
/*                                          -jsr 8/85 */


/*    find azm and angle totally at random */

    rand_(seed);
    *oazm = pi * *seed;
    rand_(seed);
    *oangle = pi * *seed;

/*    find displacement using spherical coordinate geometry */

    rand_(seed);
    radius = *seed * (float)400. + (float)600.;
    rand_(seed);
    theta = pi * (float)2. * *seed;
    rand_(seed);
    phi = pi * *seed;
    sp = sin(phi);
    *obx = radius * cos(theta) * sp + *xc;
    *oby = radius * sin(theta) * sp + *yc;
    *obz = radius * cos(phi) + *zc;

/*    pick a speed at random */

    rand_(seed);
    *ospeed = *seed * (float).15 + (float).25;
    return 0;
} /* strek_place_nemian__ */

/* Subroutine */ int strek_place_enemy__(xc, yc, zc, obx, oby, obz, oazm, 
	oangle, ospeed, seed)
real *xc, *yc, *zc, *obx, *oby, *obz, *oazm, *oangle, *ospeed, *seed;
{
    /* Initialized data */

    static real pi = (float)3.14159265;

    /* Builtin functions */
    double sin(), cos();

    /* Local variables */
    extern /* Subroutine */ int rand_();
    static real theta, sp, radius, phi;


/*    STREK_PLACE_ENEMY places a single enemy ship in the vicinity of */
/*    the player ship. Initial azm and angle are random. */

/*    version 1 */
/*                                             -jsr 8/85 */


/*    find displacement */

    rand_(seed);
    radius = *seed * (float)600. + (float)1e3;
    rand_(seed);
    theta = pi * (float)2. * *seed;
    rand_(seed);
    phi = pi * *seed;
    sp = sin(phi);
    *obx = radius * cos(theta) * sp + *xc;
    *oby = radius * sin(theta) * sp + *yc;
    *obz = radius * cos(phi) + *zc;
    rand_(seed);
    *oazm = pi * (float)2. * *seed;
    rand_(seed);
    *oangle = pi * *seed;
    rand_(seed);
    *ospeed = *seed * (float)3.5;
    return 0;
} /* strek_place_enemy__ */

/* Subroutine */ int strek_enemy_setup__(damage, agr, kling, maxd, object, 
	seed, two, photons)
real *damage;
logical *agr, *kling;
real *maxd;
logical *object;
real *seed;
logical *two;
integer *photons;
{
    extern /* Subroutine */ int rand_();
    static integer i, j;


/*    STREK_ENEMY_SETUP initializes many of the enemy ship variables */
/*    Ensures that there is only one klingon at a time. */

/*    version 1 */
/*                                              -jsr 8/85 */


/*    set 'em up */

    /* Parameter adjustments */
    --photons;
    --maxd;
    --kling;
    --agr;

    /* Function Body */
    i = 2;
    j = 3;

/*    set initial damage to zero */

    damage[i] = (float)0.;
    damage[j] = (float)0.;
    photons[i] = 3;
    photons[j] = 3;

/*    pick aggression level. Aggressive enemies come after the player */
/*    ship. Unaggressive enemies shoot nemians */

    agr[i] = TRUE_;
    agr[j] = TRUE_;
    rand_(seed);
    if (*seed > (float).9) {
	agr[i] = FALSE_;
    }
    rand_(seed);
    if (*seed > (float).9) {
	agr[j] = FALSE_;
    }
    rand_(seed);

/*    check for klingons */

    rand_(seed);
    if (*seed >= (float).5) {
	kling[i] = TRUE_;
	maxd[i] = (float)50.;
    } else {
	kling[i] = FALSE_;
	kling[j] = FALSE_;
	maxd[i] = (float)40.;
	maxd[j] = (float)40.;
    }

/*    determine the number of 'em */

    rand_(seed);
    if (*seed > (float).5) {
	*two = TRUE_;
	object[i] = TRUE_;
	object[j] = TRUE_;
    } else {
	*two = FALSE_;
	object[i] = TRUE_;
	object[j] = FALSE_;
    }
    if (kling[i]) {
	*two = FALSE_;
	object[j] = FALSE_;
    }
    return 0;
} /* strek_enemy_setup__ */

/* Subroutine */ int strek_move_enemy__(j, obx, oby, obz, oazm, oangle, 
	ospeed, xc, yc, zc, azm, angle, speed, agr, object, rox, roy, roz, 
	odamage, photons, distance, kling, count_m__, count_s__, orange, razm,
	 rangle, brake, damage, photon_c__, phase_c__, pro_x__, pro_y__, seed,
	 pcen)
integer *j;
real *obx, *oby, *obz, *oazm, *oangle, *ospeed, *xc, *yc, *zc, *azm, *angle, *
	speed;
logical *agr, *object;
real *rox, *roy, *roz, *odamage;
integer *photons;
real *distance;
logical *kling;
integer *count_m__, *count_s__;
real *orange, *razm, *rangle, *brake, *damage;
integer *photon_c__, *phase_c__;
real *pro_x__, *pro_y__, *seed;
shortint *pcen;
{
    /* Initialized data */

    static real pi = (float)3.14159265;

    /* System generated locals */
    real r__1, r__2;

    /* Builtin functions */
    double sqrt(), sin(), cos(), r_sign(), atan();

    /* Local variables */
    extern /* Subroutine */ int strek_phaser_nemian__();
    static integer free;
    extern /* Subroutine */ int rand_();
    static real dist, tazm;
    static logical man_1__, man_2__, man_3__, found, shoot;
    static real t1, t2, t3, t4, ca, sa, cp;
    extern /* Subroutine */ int strek_phaser_ship__();
    static real dx, dy, dz, sp;
    extern /* Subroutine */ int strek_aim_photons__();
    static real tangle, xt, yt, zt, rootor;
    extern /* Subroutine */ int strek_find_free_ob__();
    static real pox, poy, poz;
    static integer num_forward__;
    extern /* Subroutine */ int strek_phaser_damage__();


/*    STREK_MOVE_ENEMY contains the enemy ship movement and attack */
/*    logic. When chasing nemians (which is rare) there is only a */
/*    chase algorithm. When chasing player ships there are two */
/*    modes: 1. similar to chasing nemians, used when not in ships */
/*    firing arc or at a distance. 2. randomly choosen dodges which */
/*    can be: stop fast, accelerate, turn hard or a combination. */
/*    Movement is recalculated every 10 turn. Attacks are based on */
/*    range and the same firing limitations as the player ship, i.e. */
/*    target in firing arc, in range and phasers active. Photons */
/*    follow the course of the ship when shot. */

/*    version 1 */
/*                                      - jsr 8/85 */

    /* Parameter adjustments */
    --pcen;
    --photon_c__;
    --distance;

    /* Function Body */

/*    increment move and shoot counters */

    ++(*count_m__);
    ++(*count_s__);

/*    if a move is indicated then do it */

    if (*count_m__ >= 10) {
	*count_m__ = 0;
	if (! (*agr) && orange[*j] > (float)9e4) {

/*    chase the nemian unless the bad guy is too close */

	    if ((r__1 = ospeed[*j], dabs(r__1)) > (float).001) {
		num_forward__ = sqrt(distance[*j + 3]) / ospeed[*j];
	    } else {
		num_forward__ = 20;
	    }
	    xt = -num_forward__ * ospeed[1] * sin(oazm[1]) * cos(oangle[1]) + 
		    obx[1];
	    yt = num_forward__ * ospeed[1] * cos(oazm[1]) * cos(oangle[1]) + 
		    oby[1];
	    zt = num_forward__ * ospeed[1] * sin(oangle[1]) + obz[1];
	    dx = xt - obx[*j];
	    dy = yt - oby[*j];
	    dz = zt - obz[*j];
	    if (dabs(dy) < (float)1e-7) {
		dy = r_sign(&c_b6, &dy);
	    }
	    if (dy <= (float)0.) {
		tazm = -(doublereal)atan(dx / dy) + c_b7 * pi / (float)180.;
	    } else {
		tazm = -(doublereal)atan(dx / dy);
	    }
/* Computing 2nd power */
	    r__1 = dx;
/* Computing 2nd power */
	    r__2 = dy;
	    dist = sqrt(r__1 * r__1 + r__2 * r__2);
	    if (dabs(dist) < (float)1e-7) {
		dist = r_sign(&c_b6, &dist);
	    }
	    tangle = atan(dz / dist);
	    t1 = (tazm - oazm[*j]) / (float)10.;
	    t2 = (tangle - oangle[*j]) / (float)10.;
	    t3 = (tazm - (oazm[*j] - (float)360.)) / (float)10.;
	    t4 = (tangle - (oangle[*j] - (float)360.)) / (float)10.;
	    if (dabs(t3) < dabs(t1)) {
		t1 = t3;
	    }
	    if (dabs(t4) < dabs(t2)) {
		t2 = t4;
	    }
	    if (dabs(t1) > (float).05) {
		t1 = r_sign(&c_b9, &t1);
	    }
	    if (dabs(t2) > (float).05) {
		t2 = r_sign(&c_b9, &t2);
	    }
	    *razm = t1;
	    *rangle = t2;

/*    adjust speed */

	    if (distance[*j + 3] > (float)3600.) {
		*brake = ((float)3.5 - ospeed[*j]) / (float)10.;
	    } else {
		*brake = (ospeed[1] - ospeed[*j] + (float).5) / (float)10.;
	    }

/*    adjust max acceleration */

	    t1 = dabs(*brake);
	    if (t1 > (float).5) {
		*brake = r_sign(&c_b11, brake);
	    }
	} else {

/*    chase the bad guy. Two options here: */
/*    1. in his front arc => get out of it! */
/*    2. in his rear arc  => stay in it but approach. */

/* Computing 2nd power */
	    r__1 = *rox;
/* Computing 2nd power */
	    r__2 = *roz;
	    t1 = sqrt(r__1 * r__1 + r__2 * r__2);
	    t2 = t1 / *roy;
	    if (*roy > (float)0. && *roy < (float)300. && t2 < (float).75 || *
		    roy > (float)0. && *roy < (float)820. && t2 < (float).18) 
		    {
		rand_(seed);

/*    if seed < .10 then brake hard, .10 < seed < .25 then swe
rve */
/*    if .25 < seed < .50 then do both, .40 < seed < .60 then 
accel */
/*    else actively pursue. */

		if (*seed < (float).1) {
		    man_1__ = TRUE_;
		    man_2__ = FALSE_;
		    man_3__ = FALSE_;
		} else if (*seed < (float).3 && *seed >= (float).1) {
		    man_1__ = FALSE_;
		    man_2__ = TRUE_;
		    man_3__ = FALSE_;
		} else if (*seed < (float).5 && *seed >= (float).3) {
		    man_1__ = TRUE_;
		    man_2__ = TRUE_;
		    man_3__ = FALSE_;
		} else if (*seed < (float).6 && *seed >= (float).5) {
		    man_1__ = FALSE_;
		    man_2__ = FALSE_;
		    man_3__ = TRUE_;
		} else if (t2 > (float).33) {
		    goto L10;
		} else {
		    man_1__ = TRUE_;
		    man_2__ = TRUE_;
		    man_3__ = FALSE_;
		}
		if (man_1__ && (*speed > (float)3.5 && *roy < (float)75.)) {
		    *brake = ((float)0. - ospeed[*j]) / (float)10.;
		}
		if (man_2__) {

/*     get polarity of the swerve */

		    rand_(seed);
		    *razm = (float)0.;
		    *rangle = (float)0.;
		    if (*seed < (float).25) {
			*razm = c_b13 * pi / (float)180.;
		    } else if (*seed >= (float).25 && *seed < (float).5) {
			*razm = c_b14 * pi / (float)180.;
		    } else if (*seed >= (float).5 && *seed < (float).75) {
			*rangle = c_b13 * pi / (float)180.;
		    } else {
			*rangle = c_b14 * pi / (float)180.;
		    }
		}

/*     if man_3 then accelerate */

		if (man_3__) {
		    *brake = ((float)3.5 - ospeed[*j]) / (float)10.;
		}
	    } else {
L10:

/*     in rear arc then pursue */

		rootor = sqrt(orange[*j]);
		num_forward__ = sqrt(orange[*j]) / (float)20.;
		if (num_forward__ > 20) {
		    num_forward__ = 20;
		}
		xt = -num_forward__ * *speed * sin(*azm * pi / (float)180.) * 
			cos(*angle * pi / (float)180.) + *xc;
		yt = num_forward__ * *speed * cos(*azm * pi / (float)180.) * 
			cos(*angle * pi / (float)180.) + *yc;
		zt = num_forward__ * *speed * sin(*angle * pi / (float)180.) 
			+ *zc;
		dx = xt - obx[*j];
		dy = yt - oby[*j];
		dz = zt - obz[*j];
		if (dabs(dy) < (float)1e-7) {
		    dy = r_sign(&c_b6, &dy);
		}
		if (dy <= (float)0.) {
		    tazm = -(doublereal)atan(dx / dy) + pi;
		} else {
		    tazm = -(doublereal)atan(dx / dy);
		}
/* Computing 2nd power */
		r__1 = dx;
/* Computing 2nd power */
		r__2 = dy;
		dist = sqrt(r__1 * r__1 + r__2 * r__2);
		if (dabs(dist) < (float)1e-7) {
		    dist = r_sign(&c_b6, &dist);
		}
		tangle = atan(dz / dist);

/*    pick smallest angle (needed due to arctan being only in 
quads */
/*    I and IV) */

		t1 = (tazm - oazm[*j]) / (float)10.;
		t2 = (tangle - oangle[*j]) / (float)10.;
		t3 = (tazm - (oazm[*j] - (float)360.)) / (float)10.;
		t4 = (tangle - (oangle[*j] - (float)360.)) / (float)10.;
		if (dabs(t3) < dabs(t1)) {
		    t1 = t3;
		}
		if (dabs(t4) < dabs(t2)) {
		    t2 = t4;
		}
		if (dabs(t1) > (float).1) {
		    t1 = r_sign(&c_b19, &t1);
		}
		if (dabs(t2) > (float).1) {
		    t2 = r_sign(&c_b19, &t2);
		}
		*razm = t1;
		*rangle = t2;

/*    adjust speed */

		if (distance[*j + 3] > (float)1e4) {
		    *brake = ((float)4. - ospeed[*j]) / (float)10.;
		} else {
		    *brake = (*speed - ospeed[*j] + (float).75) / (float)10.;
		}

/*    adjust max acceleration */

		t1 = dabs(*brake);
		if (t1 > (float).5) {
		    *brake = r_sign(&c_b11, brake);
		}
	    }
	}
    }

/*    formulate attacks */

    if (*count_s__ >= 20) {
	*count_s__ = 0;

/*    check for photon firing */

	if (*kling) {
	    if (*photons > 0 && orange[*j] < (float)102400.) {
		strek_find_free_ob__(object, &c__4, &free, &found);
		if (found) {
		    t1 = *azm * pi / (float)180.;
		    t2 = *angle * pi / (float)180.;
		    strek_aim_photons__(xc, yc, zc, &t1, &t2, speed, &obx[*j],
			     &oby[*j], &obz[*j], &oazm[*j], &oangle[*j], &
			    shoot);
		    rand_(seed);
		    if (*seed < (float).7) {
			if (shoot) {
			    object[free] = TRUE_;
			    ospeed[free] = (float)11.;
			    obx[free] = obx[*j];
			    oby[free] = oby[*j];
			    obz[free] = obz[*j];
			    oazm[free] = oazm[*j];
			    oangle[free] = oangle[*j];
			    odamage[free] = (float)0.;
			    photon_c__[free - 3] = 0;
			    --(*photons);
			}
		    }
		}
	    }

/*    if ship is a klingon then consider phasers */

	    if ((real) (*phase_c__) > (float)40. && orange[*j] < (float)4e4) {

		xt = *xc - obx[*j];
		yt = *yc - oby[*j];
		zt = *zc - obz[*j];
		ca = cos(oazm[*j]);
		sa = sin(oazm[*j]);
		cp = cos(oangle[*j]);
		sp = sin(oangle[*j]);
		pox = xt * ca + yt * sa;
		poy = -(doublereal)xt * sa * cp + yt * ca * cp + zt * sp;
		poz = xt * sa * sp - yt * ca * sp + zt * cp;
		if (poy > (float)1e-7) {
		    t1 = pox / poy;
		    t2 = poz / poy;
		    if (t1 < (float)1. && t2 < (float)1.) {
			rand_(seed);
			if (*seed > (float).2) {
			    strek_phaser_damage__(&orange[*j], damage, seed, &
				    c__1);
			    strek_phaser_ship__(&pro_x__[*j], &pro_y__[*j], &
				    pcen[1], seed);
			    *phase_c__ = 0;
			}
		    }
		}
	    } else if (! (*agr) && ((real) (*phase_c__) > (float)60. && 
		    distance[*j + 3] < (float)1e4)) {
		xt = obx[1] - obx[*j];
		yt = oby[1] - oby[*j];
		zt = obz[1] - obz[*j];
		ca = cos(oazm[*j]);
		sa = sin(oazm[*j]);
		cp = cos(oangle[*j]);
		sp = sin(oangle[*j]);
		pox = xt * ca + yt * sa;
		poy = -(doublereal)xt * sa * cp + yt * ca * cp + zt * sp;
		poz = xt * sa * sp - yt * ca * sp + zt * cp;
		if (poy > (float)1e-7) {
		    t1 = pox / poy;
		    t2 = poz / poy;
		    if (t1 < (float)1. && t2 < (float)1.) {
			rand_(seed);
			if (*seed > (float).6) {
			    strek_phaser_damage__(&distance[*j + 3], &odamage[
				    1], seed, &c__0);
			    strek_phaser_nemian__(pro_x__, pro_y__);
			    *phase_c__ = 0;
			}
		    }
		}
	    }
	} else {

/*    this is a romulan, either photon player or nemian */

	    if (*photons > 0 && orange[*j] < (float)9e4) {
		strek_find_free_ob__(object, &c__4, &free, &found);
		if (found) {
		    t1 = *azm * pi / (float)180.;
		    t2 = *angle * pi / (float)180.;
		    strek_aim_photons__(xc, yc, zc, &t1, &t2, speed, &obx[*j],
			     &oby[*j], &obz[*j], &oazm[*j], &oangle[*j], &
			    shoot);
		    rand_(seed);
		    if (*seed < (float).5) {
			if (shoot) {
			    object[free] = TRUE_;
			    ospeed[free] = (float)11.;
			    obx[free] = obx[*j];
			    oby[free] = oby[*j];
			    obz[free] = obz[*j];
			    oazm[free] = oazm[*j];
			    oangle[free] = oangle[*j];
			    odamage[free] = (float)0.;
			    photon_c__[free - 3] = 0;
			}
		    }
		}
	    } else if (distance[*j + 3] < (float)4e4) {
		strek_find_free_ob__(object, &c__4, &free, &found);
		if (found) {
		    strek_aim_photons__(&obx[1], &oby[1], &obz[1], &oazm[1], &
			    oangle[1], &ospeed[1], &obx[*j], &oby[*j], &obz[*
			    j], &oazm[*j], &oangle[*j], &shoot);
		    rand_(seed);
		    if (*seed < (float).4) {
			if (shoot) {
			    object[free] = TRUE_;
			    ospeed[free] = (float)11.;
			    obx[free] = obx[*j];
			    oby[free] = oby[*j];
			    obz[free] = obz[*j];
			    oazm[free] = oazm[*j];
			    oangle[free] = oangle[*j];
			    odamage[free] = (float)0.;
			    photon_c__[free - 3] = 0;
			}
		    }
		}
	    }
	}
    }

/*    adjust angles and stuff */

    ospeed[*j] += *brake;
    if (ospeed[*j] > (float)4.) {
	ospeed[*j] = (float)4.;
    }
    if (ospeed[*j] < (float)0.) {
	ospeed[*j] = (float).1;
    }
    oazm[*j] += *razm;
    oangle[*j] += *rangle;
    ++(*phase_c__);
    return 0;
} /* strek_move_enemy__ */

/* Subroutine */ int strek_aim_photons__(xc, yc, zc, azm, angle, speed, obx, 
	oby, obz, oazm, oangle, shoot)
real *xc, *yc, *zc, *azm, *angle, *speed, *obx, *oby, *obz, *oazm, *oangle;
logical *shoot;
{
    /* System generated locals */
    real r__1, r__2, r__3;

    /* Builtin functions */
    double sin(), cos();

    /* Local variables */
    static real dist, a, b, c;
    static integer j;
    static real ca, da, db, dc, oa, ob, oc, cp, sa, dx, dy, dz, sp, ospeed, 
	    tol;


/*    STREK_AIM_PHOTONS projects the enemy photons, shoot is true if */
/*    the projection falls within 40 units of the projected player */
/*    ship. Photons do not inherit the parents ship's velocity. */

/*    version 1 */
/*                                  -jsr 8/85 */


/*    figure all pertinent angles (note that ship angles are converted */
/*    to radians in STREK_MOVE_ENEMY). */

    sa = sin(*azm);
    ca = cos(*azm);
    sp = sin(*angle);
    cp = cos(*angle);
    a = -(doublereal)sa * cp * *speed;
    b = ca * cp * *speed;
    c = sp * *speed;
    sa = sin(*oazm);
    ca = cos(*oazm);
    sp = sin(*oangle);
    cp = cos(*oangle);
    ospeed = (float)11.;
    oa = -(doublereal)sa * cp * ospeed;
    ob = ca * cp * ospeed;
    oc = sp * ospeed;
    da = a - oa;
    db = b - ob;
    dc = c - oc;
    dx = *xc - *obx;
    dy = *yc - *oby;
    dz = *zc - *obz;

/*    check for an intersection within tolerance (which is 40**2 in */
/*    an all out attempt not to do sqrt's) */

    tol = (float)900.;
    *shoot = FALSE_;
    j = 1;
L10:
    if (j > 50) {
	return 0;
    }
/* Computing 2nd power */
    r__1 = j * da + dx;
/* Computing 2nd power */
    r__2 = j * db + dy;
/* Computing 2nd power */
    r__3 = j * dc + dz;
    dist = r__1 * r__1 + r__2 * r__2 + r__3 * r__3;
    if (dist <= tol) {
	*shoot = TRUE_;
	return 0;
    }
    ++j;
    goto L10;
} /* strek_aim_photons__ */

