3D ASCII Block Building Challenge

Write a program that takes an 11x11 array of integers, and constructs a 3D ASCII block building, where each value in the array represents the height of a column of blocks at the coordinates matching the array position. A negative height is a "floating" column - only the top block is visible.

Example

                                                        __________________
                                        ___            /\__\__\__\__\__\__\
 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,      /\__\          /\/\__\__\__\__\__\__\
 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,     /\/__/         /\/\/__/__/__/__/__/__/
 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,    /\/\__\        /\/\/\__\      /\/\/__/
 1, 0, 0, 7,-7,-7,-7,-7, 7, 0, 0,    \/\/\__\      /\/\/\/__/     /\/\/__/
 0, 0, 0, 7,-7,-7,-7,-7, 7, 0, 0,     \/\/__/     /\/\/\/\__\    /\/\/__/
 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0,      \/\__\    /\/\/\/\/__/   /\/\/__/
 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0,       \/__/    \/\/\/\/\__\_  \/\/__/
 1, 0, 0, 4, 3, 2, 1, 0, 0, 0, 1,                 \/\/\/\/__/_\_ \/__/
 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,            ___   \/\/\/__/__/_\_         ___
 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,           /\__\   \/\/__/__/__/_\       /\__\
 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1,           \/\__\   \/__/__/__/__/       \/\__\
                                             \/\__\_________         ______\/\__\
                                              \/\__\__\__\__\       /\__\__\__\__\
                                               \/__/__/__/__/       \/__/__/__/__/


Input

The input will be a list of 121 integers, either read from stdin (choice of separator is up to you), or passed in as an array (can be 1D or 2D).

Heights will be in the range -11 to 11.

Output

The generated building can be written to stdout, displayed directly on the screen, or returned as a newline-separated string.

Leading and trailing whitespace is allowed.

Building Rules

The shape of an individual 3D block looks like this:

 ___
/\__\
\/__/


And a 2x2x2 cube of blocks looks like this:

  ______
 /\__\__\
/\/\__\__\
\/\/__/__/
 \/__/__/


When blocks overlap, a higher block takes precedence over a lower one, blocks in front take precedence over those further back, and blocks to the left takes precedence over those to the right. The only special case is that the top line of a block should never overwrite any non-space character behind it. 

The interpretation of column heights can best be explained by looking at a 2D representation from the side.

HEIGHT:  1    2    3   -3   -2   -1
                  __   __
             __  |__| |__|  __
        __  |__| |__|      |__|  __
       |__| |__| |__|           |__|


Test Cases

If you want to try out your solution on a few more inputs, I've put together a couple of test cases here.

Winning

This is code-golf, so the shortest submission (in bytes) wins.
C,  376   350   313   309  285 bytes

Thanks to @Jonathan Frech for saving four bytes!



#define F for(
char*t,G[26][67],*s;i,j,e,k,v,x,y;b(){F s="\\/__//\\__\\ ___ ";*s;--y,s+=5)F e=5;e--;*t=*s&lt;33&amp;*t&gt;32?*t:s[e])t=G[y]+x+e;}f(int*M){F;e&lt;1716;++e)G[e/66][e%66]=32;F k=0;++k&lt;12;)F i=0;i&lt;11;++i)F j=11;j--;v+k||b())x=i+j*3+k,y=14+i-k,(v=M[i*11+j])&gt;=k&amp;&amp;b();F;++e&lt;26;)puts(G+e);}


Try it online!

Unrolled:

#define F for(

char *t, G[26][67], *s;
i, j, e, k, v, x, y;

b()
{
    F s="\\/__//\\__\\ ___ "; *s; --y, s+=5)
        F e=5; e--; *t=*s&lt;33&amp;*t&gt;32?*t:s[e])
            t = G[y]+x+e;
}

f(int*M)
{
    F; e&lt;1716; ++e)
        G[e/66][e%66] = 32;

    F k=0; ++k&lt;12;)
        F i=0; i&lt;11; ++i)
            F j=11; j--; v+k||b())
                x = i+j*3+k,
                y = 14+i-k,
                (v=M[i*11+j])&gt;=k &amp;&amp; b();

    F; ++e&lt;26;)
        puts(G+e);
}