//====================================================================================
// Auto-generated code. Original source + changes are
// sphere flake bvh raytracer (c) 2005, thierry berger-perrin <tbptbp@gmail.com>
// (c) 2010, azakai (Emscripten)
// this code is released under the GNU Public License.
//
// Optimized using Closure Compiler
//====================================================================================
function l() {
return function() {
}
}
function m() {
}
FUNCTION_TABLE = [];
var o = [];
function q(a, b) {
if(!a) {
b = "Assertion failed: " + b;
print(b + ":\n" + Error().stack);
throw"Assertion: " + b;
}
}
ALLOC_NORMAL = 0;
ALLOC_STACK = 1;
ALLOC_STATIC = 2;
function r(a, b, c) {
function d(g) {
if(!g || g.length === undefined || typeof g === "function") {
return[g]
}
return g.map(d).reduce(function(i, j) {
return i.concat(j)
}, [])
}
b = b ? b : 0;
if(a === HEAP) {
return b
}
a = d(a);
c = [_malloc, aa, u][c ? c : ALLOC_STATIC](Math.max(a.length - b, 1));
for(var e = 0;e < a.length - b;e++) {
var h = a[b + e];
if(typeof h === "number" || typeof h === "boolean") {
IHEAP[c + e] = h;
FHEAP[c + e] = h
}else {
HEAP[c + e] = h
}
}
return c
}
function ba(a) {
a = {e:IHEAP, d:a};
for(var b = "", c = 0, d;;) {
if(a.d + c >= a.e.length) {
break
}
d = String.fromCharCode(a.e[a.d + c]);
if(d == "\u0000") {
break
}
b += d;
c += 1
}
return b
}
PAGE_SIZE = 4096;
if(!this.f) {
_malloc = u;
_free = l()
}
__Znwm = __Znam = __Znaj = __Znwj = _malloc;
__ZdaPv = __ZdlPv = _free;
function ia() {
HEAP = x("(null)");
this.TOTAL_MEMORY || (TOTAL_MEMORY = 52428800);
if(this.Int32Array) {
IHEAP = new Int32Array(TOTAL_MEMORY);
for(var a = 0;a < HEAP.length;a++) {
IHEAP[a] = HEAP[a]
}
}else {
IHEAP = HEAP
}
FHEAP = this.Float64Array ? new Float64Array(TOTAL_MEMORY) : HEAP;
STACK_ROOT = STACKTOP = Math.ceil(10 / PAGE_SIZE) * PAGE_SIZE;
this.TOTAL_STACK || (TOTAL_STACK = 1048576);
STACK_MAX = STACK_ROOT + TOTAL_STACK;
STATICTOP = Math.ceil(STACK_MAX / PAGE_SIZE) * PAGE_SIZE
}
function ja(a, b, c) {
for(var d = 0;d < c;d++) {
HEAP[a + d] = HEAP[b + d];
IHEAP[a + d] = IHEAP[b + d];
FHEAP[a + d] = FHEAP[b + d]
}
}
_llvm_memcpy_p0i8_p0i8_i32 = _llvm_memcpy_i64 = ja;
_llvm_memset_p0i8_i32 = function(a, b, c) {
for(var d = 0;d < c;d++) {
HEAP[a + d] = IHEAP[a + d] = FHEAP[a + d] = b
}
};
PRINTBUFFER = "";
function x(a) {
for(var b = [], c = 0;c < a.length;) {
b.push(a.charCodeAt(c));
c += 1
}
b.push(0);
return b
}
function aa(a) {
var b = STACKTOP;
q(a > 0);
STACKTOP += a;
STACKTOP = Math.ceil(STACKTOP / 4) * 4;
q(STACKTOP < STACK_ROOT + STACK_MAX);
return b
}
function u(a) {
var b = STATICTOP;
q(a > 0);
STATICTOP += a;
STATICTOP = Math.ceil(STATICTOP / 4) * 4;
return b
}
var ka = [0, 1, 2, 3, 4, 5, 6, 7, 8, 12, 13, 14, 15, 16];
this.__defineGetter__("_screen", function() {
delete _screen;
return _screen = r([0], 0, ALLOC_STATIC)
});
this.__defineGetter__("__ZStL8__ioinit", function() {
delete __ZStL8__ioinit;
return __ZStL8__ioinit = r([0], 0, ALLOC_STATIC)
});
var la = 0;