uniform mat4 _LightMatrix0;
uniform vec4 _MainTex_ST;
uniform mat4 _Object2World;
uniform vec4 _Scale;
uniform float _SquashAmount;
uniform vec4 _SquashPlaneNormal;
uniform vec4 _Time;
uniform vec4 _Wind;
uniform mat4 _World2Object;
uniform vec3 _WorldSpaceCameraPos;
uniform vec4 _WorldSpaceLightPos0;
uniform mat4 glstate_matrix_invtrans_modelview0;
uniform mat4 glstate_matrix_mvp;
uniform vec4 unity_Scale;
attribute vec4 TANGENT;
varying vec2 xlv_TEXCOORD0;
varying vec4 xlv_COLOR0;
varying vec3 xlv_TEXCOORD1;
varying vec3 xlv_TEXCOORD2;
varying vec2 xlv_TEXCOORD3;
void main ()
{
  vec3 binormal_1;
  vec4 tmpvar_2;
  vec4 tmpvar_3;
  vec4 pos_4;
  float isBillboard_5;
  isBillboard_5 = (1.0 - abs(TANGENT.w));
  vec4 tmpvar_6;
  tmpvar_6.w = 0.0;
  tmpvar_6.xyz = gl_Normal;
  vec4 tmpvar_7;
  tmpvar_7.w = 0.0;
  tmpvar_7.xyz = TANGENT.xyz;
  vec4 tmpvar_8;
  tmpvar_8.zw = vec2(0.0, 0.0);
  tmpvar_8.xy = gl_Normal.xy;
  pos_4 = (gl_Vertex + ((tmpvar_8 * glstate_matrix_invtrans_modelview0) * isBillboard_5));
  vec3 tmpvar_9;
  tmpvar_9 = mix (gl_Normal, normalize((tmpvar_6 * glstate_matrix_invtrans_modelview0)).xyz, vec3(isBillboard_5));
  vec4 tmpvar_10;
  tmpvar_10.w = -1.0;
  tmpvar_10.xyz = normalize((tmpvar_7 * glstate_matrix_invtrans_modelview0)).xyz;
  vec4 tmpvar_11;
  tmpvar_11 = mix (TANGENT, tmpvar_10, vec4(isBillboard_5));
  tmpvar_2.w = pos_4.w;
  tmpvar_3.w = tmpvar_11.w;
  tmpvar_2.xyz = (pos_4.xyz * _Scale.xyz);
  vec4 pos_12;
  pos_12.w = tmpvar_2.w;
  vec3 bend_13;
  vec2 vWavesSum_14;
  vec4 vWaves_15;
  float fBranchPhase_16;
  fBranchPhase_16 = (dot (_Object2World[3].xyz, vec3(1.0, 1.0, 1.0)) + gl_Color.x);
  vec2 tmpvar_17;
  tmpvar_17.x = dot (tmpvar_2.xyz, vec3((gl_Color.y + fBranchPhase_16)));
  tmpvar_17.y = fBranchPhase_16;
  vWaves_15 = ((fract(
    ((_Time.yy + tmpvar_17).xxyy * vec4(1.975, 0.793, 0.375, 0.193))
  ) * 2.0) - 1.0);
  vec4 tmpvar_18;
  tmpvar_18 = abs(((
    fract((vWaves_15 + 0.5))
   * 2.0) - 1.0));
  vec4 tmpvar_19;
  tmpvar_19 = ((tmpvar_18 * tmpvar_18) * (3.0 - (2.0 * tmpvar_18)));
  vWaves_15 = tmpvar_19;
  vWavesSum_14 = (tmpvar_19.xz + tmpvar_19.yw);
  bend_13.xz = ((gl_Color.y * 0.1) * tmpvar_9).xz;
  bend_13.y = (gl_MultiTexCoord1.y * 0.3);
  pos_12.xyz = (tmpvar_2.xyz + ((
    (vWavesSum_14.xyx * bend_13)
   + 
    ((_Wind.xyz * vWavesSum_14.y) * gl_MultiTexCoord1.y)
  ) * _Wind.w));
  pos_12.xyz = (pos_12.xyz + (gl_MultiTexCoord1.x * _Wind.xyz));
  vec3 tmpvar_20;
  tmpvar_20 = mix ((pos_12.xyz - (
    (dot (_SquashPlaneNormal.xyz, pos_12.xyz) + _SquashPlaneNormal.w)
   * _SquashPlaneNormal.xyz)), pos_12.xyz, vec3(_SquashAmount));
  vec4 tmpvar_21;
  tmpvar_21.w = 1.0;
  tmpvar_21.xyz = tmpvar_20;
  tmpvar_2 = tmpvar_21;
  vec4 tmpvar_22;
  tmpvar_22.xyz = vec3(1.0, 1.0, 1.0);
  tmpvar_22.w = gl_Color.w;
  vec3 tmpvar_23;
  tmpvar_23 = normalize(tmpvar_9);
  tmpvar_3.xyz = normalize(tmpvar_11.xyz);
  binormal_1 = (((tmpvar_23.yzx * tmpvar_3.zxy) - (tmpvar_23.zxy * tmpvar_3.yzx)) * tmpvar_11.w);
  mat3 tmpvar_24;
  tmpvar_24[0].x = tmpvar_3.x;
  tmpvar_24[0].y = binormal_1.x;
  tmpvar_24[0].z = tmpvar_23.x;
  tmpvar_24[1].x = tmpvar_3.y;
  tmpvar_24[1].y = binormal_1.y;
  tmpvar_24[1].z = tmpvar_23.y;
  tmpvar_24[2].x = tmpvar_3.z;
  tmpvar_24[2].y = binormal_1.z;
  tmpvar_24[2].z = tmpvar_23.z;
  vec4 tmpvar_25;
  tmpvar_25.w = 1.0;
  tmpvar_25.xyz = _WorldSpaceCameraPos;
  gl_Position = (glstate_matrix_mvp * tmpvar_21);
  xlv_TEXCOORD0 = ((gl_MultiTexCoord0.xy * _MainTex_ST.xy) + _MainTex_ST.zw);
  xlv_COLOR0 = tmpvar_22;
  xlv_TEXCOORD1 = (tmpvar_24 * (_World2Object * _WorldSpaceLightPos0).xyz);
  xlv_TEXCOORD2 = (tmpvar_24 * ((
    (_World2Object * tmpvar_25)
  .xyz * unity_Scale.w) - tmpvar_20));
  xlv_TEXCOORD3 = (_LightMatrix0 * (_Object2World * tmpvar_21)).xy;
}


// stats: 71 alu 0 tex 0 flow
// inputs: 6
//  #0: gl_MultiTexCoord1 (high float) 4x1 [-1] loc 9
//  #1: gl_MultiTexCoord0 (high float) 4x1 [-1] loc 8
//  #2: gl_Color (high float) 4x1 [-1] loc 3
//  #3: gl_Normal (high float) 3x1 [-1] loc 2
//  #4: gl_Vertex (high float) 4x1 [-1] loc 0
//  #5: TANGENT (high float) 4x1 [-1]
// uniforms: 14 (total size: 0)
//  #0: _LightMatrix0 (high float) 4x4 [-1]
//  #1: _MainTex_ST (high float) 4x1 [-1]
//  #2: _Object2World (high float) 4x4 [-1]
//  #3: _Scale (high float) 4x1 [-1]
//  #4: _SquashAmount (high float) 1x1 [-1]
//  #5: _SquashPlaneNormal (high float) 4x1 [-1]
//  #6: _Time (high float) 4x1 [-1]
//  #7: _Wind (high float) 4x1 [-1]
//  #8: _World2Object (high float) 4x4 [-1]
//  #9: _WorldSpaceCameraPos (high float) 3x1 [-1]
//  #10: _WorldSpaceLightPos0 (high float) 4x1 [-1]
//  #11: glstate_matrix_invtrans_modelview0 (high float) 4x4 [-1]
//  #12: glstate_matrix_mvp (high float) 4x4 [-1]
//  #13: unity_Scale (high float) 4x1 [-1]
