This page gives a short overview of the translation process SL# will perform.

Assume we have implemented a simplex noise shader in SimplexNoiseShader.cs that is defined as:
public abstract class SimplexNoiseShader: Shaders.Shader
{
    [Uniform] protected abstract Sampler1D PermGradSampler { set; get; }
    [Uniform] protected abstract Sampler2D PermSampler2D { set; get;  }

    [FragmentShader]
    protected vec3 Fade(vec3 t)
    {
        return t * t * t * (t * (t * 6.0f - 15.0f) + 10.0f); // new curve
    }

    [FragmentShader]
    protected vec4 Perm2D(vec2 p)
    {
        return texture2D(PermSampler2D, p);
    }

    [FragmentShader]
    protected float Gradperm(float x, vec3 p)
    {
        return dot(texture1D(PermGradSampler, x).xyz, p);
    }

    [FragmentShader]
    protected float Inoise(vec3 p)
    {
        vec3 q = mod(floor(p), 256.0f);
        p -= floor(p);
        vec3 f = Fade(p);

        q = q / 256.0f;
        const float one = 1.0f / 256.0f;

        var aa = Perm2D(q.xy) + q.z;
        var zo = new vec2(0.0f, 1.0f);
        return mix(mix(mix(Gradperm(aa.x, p), Gradperm(aa.z, p - zo.yxx), f.x),
                            mix(Gradperm(aa.y, p - zo.xyx), Gradperm(aa.w, p - zo.yyx), f.x),
                            f.y),
                    mix(mix(Gradperm(aa.x + one, p - zo.xxy), Gradperm(aa.z + one, p - zo.yxy), f.x),
                            mix(Gradperm(aa.y + one, p - zo.xyy), Gradperm(aa.w + one, p - zo.yyy), f.x),
                            f.y),
                    f.z);
    }

    [FragmentShader]
    public float FBm(vec3 p, int octaves, float lacunarity, float gain)
    {
        var freq = 1.0f;
        var amp = 1.0f;
        var sum = 0.0f;

        for (var i = 0; i < octaves; i++)
        {
            sum += Inoise(p * freq) * amp;
            freq *= lacunarity;
            amp *= gain;
        }

        return sum;
    }
    ... some non shader related details are ommited here see SimplexNoiseShader.cs for a full implementation ...
}
Let's specifically look at the FBm() function as this is the most interesting one due to having a loop.

The first thing SL# does is fetch the IL of SimplexNoiseShader.FBm which, in our case, looks like this:

0 : ldc.r4 1
5 : stloc.0
6 : ldc.r4 1
11: stloc.1
12: ldc.r4 0
17: stloc.2
18: ldc.i4.0
19: stloc.3
20: br.s 53
22: ldloc.2
23: ldarg.0
24: ldarg.1
25: ldloc.0
26: call vec3 op_Multiply(vec3, Single)
31: call Single Inoise(vec3)
36: ldloc.1
37: mul
38: add
39: stloc.2
40: ldloc.0
41: ldarg.3
42: mul
43: stloc.0
44: ldloc.1
45: ldarg.s Single gain
47: mul
48: stloc.1
49: ldloc.3
50: ldc.i4.1
51: add
52: stloc.3
53: ldloc.3
54: ldarg.2
55: blt.s 22
57: ldloc.2
58: ret
The next stage SL# does is reconstruct an expression stream, which will then be translated to GLSL. The result of this process looks like this:
float M_GeoClip_Shaders_SimplexNoiseShader_FBm(vec3 p,int octaves,float lacunarity,float gain)
{
    float _l0;
    float _l1;
    float _l2;
    int _l3;
    float _l4;
    _l0=1.0;
    _l1=1.0;
    _l2=0.0;
    _l3=0;
    while ((octaves<_l3))
    {
        _l2=(_l2+(M_GeoClip_Shaders_SimplexNoiseShader_Inoise((p*_l0))*_l1));
        _l0=(_l0*lacunarity);
        _l1=(_l1*gain);
        _l3=(_l3+1);
    }
    _l4=_l2;
    return _l4;
}
Unfortunately, not everything can be reconstructed to the original form. Most obvious things are that you lose all comments as these won't be compiled to IL. But you also lose local variable names. For common cases this however should not be a problem, as you won't export the shaders but consume them just within your application/library.

SL# names all uniforms, varyings, attributes, and function names according to the class/namespace the shader is defined within. This avoids clashes due to shared names if you build shader libraries. All calls or accesses to foreign shaders will be translated properly.

In release build the default behavior is to obfuscate all names. The whole shader above translated to GLSL in release build is given below.

#version 120
uniform sampler1D _v23;
uniform sampler2D _v24;
vec3 _v25(vec3 t);
vec4 _v26(vec2 p);
float _v27(float x,vec3 p);
float _v0(vec3 p);

vec3 _v25(vec3 t)
{
    return (((t*t)*t)*((t*((t*6.0)-15.0))+10.0));
}

vec4 _v26(vec2 p)
{
    return texture2D(_v24,p);
}

float _v27(float x,vec3 p)
{
    return dot(texture1D(_v23,x).xyz,p);
}

float _v0(vec3 p)
{
    vec3 _l0;
    vec3 _l1;
    vec4 _l2;
    vec2 _l3;
    _l0=mod(floor(p),256.0);
    p=(p-floor(p));
    _l1=_v25(p);
    _l0=(_l0/256.0);
    _l2=(_v26(_l0.xy)+_l0.z);
    _l3=vec2(0.0,1.0);
    return mix(mix(mix(_v27(_l2.x,p),_v27(_l2.z,(p-_l3.yxx)),_l1.x),
           mix(_v27(_l2.y,(p-_l3.xyx)),_v27(_l2.w,(p-_l3.yyx)),_l1.x),_l1.y),
           mix(mix(_v27((_l2.x+0.00390625),(p-_l3.xxy)),_v27((_l2.z+0.00390625),
           (p-_l3.yxy)),_l1.x),mix(_v27((_l2.y+0.00390625),(p-_l3.xyy)),
           _v27((_l2.w+0.00390625),(p-_l3.yyy)),_l1.x),_l1.y),_l1.z);
}

float _v1(vec3 _a1,int _a2,float _a3,float _a4)
{
    float _l0;float _l1;float _l2;int _l3;
    _l0=1.0; _l1=1.0; _l2=0.0; _l3=0;
    while ((_l3<_a2))
    {
        _l2=(_l2+(_v0((_a1*_l0))*_l1));
        _l0=(_l0*_a3);
        _l1=(_l1*_a4);
        _l3=(_l3+1);
    }
    return _l2;
}