Files
larp/shaders/replace/36f04a4ed0ad1d9b.compute.hlsl

3149 lines
184 KiB
HLSL

// 36f04a4ed0ad1d9b, compute: GatherAlphaVBuffer_WithFar.
//
// The layer's translation of the console program with its query sites as host ray queries (the translator's
// substitution of the walks, emit/sites.rs, by the program's entry in emit/sites/table.rs), turned into
// HLSL (dxil-spirv, then SPIRV-Cross) with its bindings restored as
// the translation makes them (README "Bindings"): heap views through ResourceDescriptorHeap typed as the
// translation's handles, at the slots it reads from the table lists (t252 space1), with this host's view
// heap clamps (null slot 999999; Bounds below says which went); user data b0 space0, 20 dwords as the translation without a table entry
// numbers them (the substituted translation numbers every dword the code reads the same); each RayQuery
// with the flags the DXIL allocates it with; [WaveSize(32)] [numthreads(32, 1, 1)]; the structure views in
// 36f04a4ed0ad1d9b.compute.views (view 0 at t248 space1, table at root parameter 1 dword 8; view 1 at t249
// space1, table at root parameter 1 dword 24). Every name is a number of the decompile. Each TraceRayInline
// is marked with its site.
// After it, the console's waterfall loops over the wave's textures (texture size reads) were made one read
// of the lane's own texture, its heap index marked NonUniformResourceIndex.
// Slots: each view table's slot is read from its list (t252) once, before the statement that holds its first
// use in the deepest block that holds every use (the nearest point that dominates them): slot_<d>_<b> is the
// descriptor at byte b of the table whose list offset is user-data dword d. Its shift (t253, shift_<d>_<b>), its
// heap index (hslot_<d>_<b>) and each handle made from it (raw_, buf_, rwbuf_, rwtex_, tex_) are made the same
// way and used again where the reads were. 30 reads of the lists became 15, 22 reads of these slots'
// shifts 7. The lists do not change within a dispatch (larp-gpu draw.rs, table_lists).
// Lanes: nothing changed. Stays: the translation's first-lane read of the thread index, which it adds to the lane
// to make the console's v0 (a thread id). The console's other first-lane reads pick descriptors in waterfall loops,
// which this file reads per lane.
// Floats: the translation's exact forms are the host's plain ones where the listing shows the two give the same
// result. The legacy multiply (0 times anything is +0; `a == 0 || b == 0 ? 0 : a * b`) differs from the plain
// product only where an operand is a zero: by NaN where the other is infinite or NaN, and by the sign of the zero.
// It is the plain product where no operand can be a zero: 0.5 plus a conversion times the reciprocal of an integer's
// conversion (0x1b8, 0x1bc), 31 times max(1/31, x) (0x3778-0x3788); where a positive literal meets a finite value
// never -0 (0x164: a sum of conversions; 0x1a8 and 0x1c0: a fraction; 0x22c: the conversion of an integer); and where
// the zero's sign is read nowhere: 0x1a4 (read only by v_exp_f32 at 0x1b0, 1 for either zero), 2047 times x at
// 0x43b0 and 0x43c0 (read only by the conversion to an integer). 12 selects went. The select before min and max (two
// zeros give the console's sign, -0 below +0) goes where the operands cannot be zeros of opposite sign: a literal of
// nonzero magnitude (0x3758-0x3768), or +0 against fma(-x, x, 1.0), never -0 (0x278): 4 went.
// Stays: 22 legacy multiplies, 15 with an operand that can be a zero while the other can be infinite or NaN (title
// data, or the reciprocal of a loaded count), 7 whose product can be -0 with its sign read on (0x2d4 and 0x2d8, by
// the direction's bits; 0x3378 and 0x3380, a sample's coordinates; 0x36fc-0x371c, by products whose bits are carried
// out); 7 min/max selects whose operands can be zeros of opposite sign, the result carried on. Stays: the forms of
// v_sin and v_cos (the reduction to a turn, the exact zeros at a quarter and a half turn), where the host's sin and
// cos give other values; the NaN tests before each trace, the trace's guard (the ray's components come from title
// memory and are not shown ordered); the conversion to half before a store, written out as the console's
// v_cvt_f16_f32 at 0x43dc computes it (round to nearest even, set at 0x43d4).
// Bounds, by kind of access (the translation's, larp-shader emit/shader.rs heap_handle, op; emit/lower.rs heap_slot):
// - the reads of the table lists (t252) at ((ud + K) >> 5) << 2: no bound, below 2^29 by their arithmetic (15);
// - buffer offsets the listing bounds: their clamp (2^31 - 64) gone, and the translation's test that the offset
// plus the view's shift (a dword of t253, the layer's 0, 4, 8 or 12: emit/shader.rs SLOT_SHIFTS) wraps gone
// where the offset is below 2^32 - 12 (43 clamps, 53 tests): a constant of the code plus the shift, as the
// console's loads at constant offsets, or the shift alone (23); offsets made from loaded words through the
// listing's masks and shifts (20): a record index (a word & 0x3fff, 0x2d24, 0x3898) times 116 plus a
// constant, and the words read from that record and from the geometry by masked fields and the 24-bit products of
// the vertex indices (v_mad_u32_u24 at 0x3084-0x3260, 0x346c-0x3504);
// - the typed element index 21, a constant (v_mov_b32 v1, 21 at 0x34 for the load at 0x4c): no bound (1);
// - the heap index of a descriptor word read from title memory (w >> 5, or (w << 5) >> 5): one bound, min(x, 606782);
// the second, 999999, gone (6).
// Stays: min(word, 999999) on each slot read from a list (14) and on the constant view's select (1): the list
// holds a null slot for an entry the title did not set and anything past the table's own entries; every index into
// the layer's root view t253 (min(slot, 2097151) and the clamp after it): a root view has no bounds of its
// own; 15 buffer offsets and 2 wrap tests made from values the listing does not bound (words of title
// memory, the constant view's slot << 4, records at loaded indices), and the 12 typed element indices, made from
// loaded counts and indices. No index here is the title's (x - 1) * stride.
//
// Each candidate loop (the loop over a query's Proceed()) stops where the console's walk stops, in place of the
// translator's bound on it (4096 passes, whose trip ended the program): it counts in its site's count, 0 at the
// trace and +1 for each candidate before its body, makes the console walk's test of its count, and where the test
// ends the walk it ends the query (Abort()) with the committed state as it stands and leaves. The code after X gets
// what the console's walk leaves it, where the translation gave it 0 (emit/sites.rs, Meaning::Zero): the cap flag,
// all ones at the cap and else 0, and the count. A pass of the console's walk is a node visit and a pass of the
// loop a candidate, and a ray has at most as many candidates as node visits: the host's stop never ends a ray the
// console would not have ended, and it may let one go on that the console would have ended. Per site:
// - Site 1: the count past 0xfffe, a constant of the code, ends the walk (0x6d4-0x6dc) with the cap flag v39
// (site1_cap) all ones. The code after X takes the flag as a hit and gives the ray the nearest back face's result
// (0xf00-0xf80).
// - Sites 2 and 3: the walk goes on while the count is below 0xffff, a constant of the code (2: 0x1418 counts,
// 0x15dc compares; 3: 0x2020, 0x21e4), from 0 again at site 3 (0x2000). The count v25 (site23_count) is read
// after the pair: past 0xfffe, as a hit with the nearest back face's result (0x2a20-0x2a94).
// - Site 4: the count reaching 0xffffffff, a constant of the code, ends the walk (0x3c14 counts, 0x3c1c compares);
// nothing after X reads the count.
//
// The reading of the sites (the comments of the program's entry in emit/sites/table.rs):
//
// CS_GatherAlphaVBuffer_WithFar (wave32, 64-bit node tests). Per thread a ray from a cell
// of the view's grid along one of 16 directions, t max a constant (10000 when negative).
// Lanes outside a sphere trace the first structure alone (site 1); the others trace the
// second (site 2) and, where that commits nothing, the first again from where the ray
// leaves the sphere with what is left of t max (site 3); then every lane traces the
// second structure straight up (site 4). Four copies of one walk, each a closest-hit
// search with a candidate body: for each candidate the body reads a record of a title
// buffer at the instance's contribution plus the geometry index and decides by its flag
// bits and the face whether to commit; it keeps the nearest t of some rejected classes
// (some with the instance's ID or a record word) in registers of its own, which the code
// after X reads. A commit sets the committed registers from the candidate's and shortens
// t max; the walk goes on. The node tests' descriptors are constants made in the walk;
// nodes are addressed from the view's base address shifted plus the node pointer. After
// sites 1 to 3 the code reads the committed instance's contribution, its index, the
// triangle's geometry and primitive (by the pointer's kind) through the committed
// pointers, each a load whose address is the view's base plus the pointer's offset.
//
// Site 1 (entry 0x518):
// First structure, alone: view at table +0x20 (s[12:15], loaded at 0x260); the
// root pointer loaded at 0x470. Entered at 0x518 (from 0x508); 0x510, which puts
// EXEC back, only by the back edge from 0xeec; leaves to 0xef0, which puts back
// the EXEC saved before the walk. Node test at 0x780. Instance mask: +48 against
// 0x48000000 (0x8c4). The cull multiplier at 0xa38 is 0: no culling. The walk's
// opacity bits are the constant 2 (0xa3c), so every triangle goes to the body:
// force non-opaque. A triangle is taken at 0 <= t < t max (0xac4, 0xadc). The
// body runs from 0xb4c to the select at 0xd7c, which commits where v53 is all
// ones. Committed: triangle pointer v18 and instance pointer v15 (0 before the
// walk), t max v11, hit kind v16, the barycentrics v6 and v5 (0 before the walk);
// v39 is all ones when the iteration cap was reached. The candidate: t v37, hit
// kind v48, triangle pointer v19, instance pointer v21. The body reads the
// candidate instance's +52 and +60 and its triangle's +48, and for one class
// the instance's +48; after X the code reads the committed instance's +52, +60
// (three times) and +112 and the triangle's +48 (twice) and +52 or +56.
//
// Site 2 (entry 0x1418):
// Second structure: view at table +0x60 (s[28:31], loaded at 0x248); the root
// pointer loaded at 0x1360. Entered at 0x1418 (from 0x1408); 0x1410 only by the
// back edge from 0x1ee4; leaves to 0x1ee8, which puts EXEC back. Node test at
// 0x1670. Mask 0x48 (0x17b4); no culling (0x1928); force non-opaque (0x192c). The
// body runs from 0x1a3c to the select at 0x1d74 (v62 all ones commits).
// Committed: triangle pointer v22, instance pointer v23, t max v28, hit kind v20,
// barycentrics v6 and v5, iteration count v25. The candidate: t v45, hit kind v55,
// triangle pointer v10, instance pointer v29. The body reads the candidate
// instance's +52, +60 (twice) and +48 (twice), its triangle's +48 and +52 or +56.
// With the next site a pair: its loads after X are those after both.
//
// Site 3 (entry 0x2020):
// First structure again, on the lanes the second site committed nothing, from
// where the ray leaves the sphere: the view load of site 1; the root pointer loaded
// at 0x1fb0. Entered at 0x2020 (from 0x2014); 0x2018 only by the back edge from
// 0x29dc; leaves to 0x29e0, which puts EXEC back. Node test at 0x2278. Mask 0x48
// (0x23bc); no culling (0x2530); force non-opaque (0x2534). The body runs from
// 0x2644 to the select at 0x286c (v57 all ones commits); it starts from the
// registers the previous site's body kept. Committed as the previous site, t max
// v27. The candidate: t v45, hit kind v55, triangle pointer v31, instance pointer
// v32. The body reads the candidate instance's +52, +60 and +48 and its
// triangle's +48.
//
// Site 4 (entry 0x3a58):
// Second structure, straight up from the cell: the view load of site 2; the root
// pointer loaded at 0x39cc. Entered at 0x3a58 (from 0x3a48); 0x3a50 only by the
// back edge from 0x4344; leaves to 0x4348, which puts EXEC back. Node test at
// 0x3cb8. Mask: +48 against 0x58000000 (0x3e04). The cull multiplier at 0x3f58 is
// 1: cull back faces. The opacity bits are the instance's flags (0x3f50) and the
// triangle's opaque bit decides with them (0x402c, 0x4038), as D3D12 does: no
// opacity flag. The body runs from 0x4040 to the select at 0x41f4 (v48 all ones
// commits). Committed: triangle pointer v23, t max v4. The candidate: t v37,
// triangle pointer v7, instance pointer v12. The body reads the candidate
// instance's +52, +60 and +48 and its triangle's +48; nothing after X reads
// structure memory.
#include "view_heap_layout.hlsli"
static uint _291;
ByteAddressBuffer table_lists : register(t252, space1);
ByteAddressBuffer view_shifts : register(t253, space1);
ByteAddressBuffer view_strides : register(t255, space1);
cbuffer _57_59 : register(b0, space0)
{
float4 _59_m0[5] : packoffset(c0);
};
// The host top level of structure view 0 (table at root parameter 1, dword 8; sites 1, 3).
uniform RaytracingAccelerationStructure _48 : register(t248, space1);
// The host top level of structure view 1 (table at root parameter 1, dword 24; sites 2, 4).
uniform RaytracingAccelerationStructure _49 : register(t249, space1);
SamplerState _62 : register(s0, space0);
// The views the code takes from the view heap by index, typed as the translation's handles.
Buffer<float4> heap_Buffer_float4(uint i) { Buffer<float4> r = ResourceDescriptorHeap[i]; return r; }
ByteAddressBuffer heap_ByteAddressBuffer(uint i) { ByteAddressBuffer r = ResourceDescriptorHeap[i]; return r; }
RWBuffer<float4> heap_RWBuffer_float4(uint i) { RWBuffer<float4> r = ResourceDescriptorHeap[i]; return r; }
RWByteAddressBuffer heap_RWByteAddressBuffer(uint i) { RWByteAddressBuffer r = ResourceDescriptorHeap[i]; return r; }
RWTexture3D<float4> heap_RWTexture3D_float4(uint i) { RWTexture3D<float4> r = ResourceDescriptorHeap[i]; return r; }
Texture1D<float4> heap_Texture1D_float4(uint i) { Texture1D<float4> r = ResourceDescriptorHeap[i]; return r; }
Texture2D<float4> heap_Texture2D_float4(uint i) { Texture2D<float4> r = ResourceDescriptorHeap[i]; return r; }
static uint3 gl_WorkGroupID;
static uint gl_LocalInvocationIndex;
struct SPIRV_Cross_Input
{
uint3 gl_WorkGroupID : SV_GroupID;
uint gl_LocalInvocationIndex : SV_GroupIndex;
};
groupshared uint _66[512];
static RayQuery<RAY_FLAG_FORCE_NON_OPAQUE> _770;
static RayQuery<RAY_FLAG_FORCE_NON_OPAQUE> _1237;
static RayQuery<RAY_FLAG_FORCE_NON_OPAQUE> _1372;
static RayQuery<RAY_FLAG_CULL_BACK_FACING_TRIANGLES> _3034;
uint spvTextureSize(Texture1D<float4> Tex, uint Level, out uint Param)
{
uint ret;
Tex.GetDimensions(Level, ret.x, Param);
return ret;
}
uint spvPackHalf2x16(float2 value)
{
uint2 Packed = f32tof16(value);
return Packed.x | (Packed.y << 16);
}
float2 spvUnpackHalf2x16(uint value)
{
return f16tof32(uint2(value & 0xffff, value >> 16));
}
void comp_main()
{
uint4 _79 = asuint(_59_m0[3u]);
uint _84 = WaveReadLaneFirst(gl_LocalInvocationIndex);
uint4 _95 = asuint(_59_m0[1u]);
uint _96 = _95.y;
uint _115 = ((gl_WorkGroupID.x + _79.x) << 5u) + (((_84 & 4294967264u) + WaveGetLaneIndex()) % 32u);
uint _124 = _95.x;
uint _127 = _79.w;
uint4 _131 = asuint(_59_m0[4u]);
uint _132 = _131.x;
uint slot_5_0 = asuint(asfloat(table_lists.Load<uint>((_96 >> 5u) << 2u)));
uint hslot_5_0 = min(slot_5_0, NULL_SLOT);
Buffer<float4> buf_5_0 = heap_Buffer_float4(hslot_5_0);
if (asuint(buf_5_0.Load(21u).x) > _115)
{
uint slot_5_160 = asuint(asfloat(table_lists.Load<uint>(((_96 + 160u) >> 5u) << 2u)));
uint hslot_5_160 = min(slot_5_160, NULL_SLOT);
Buffer<float4> buf_5_160 = heap_Buffer_float4(hslot_5_160);
uint _173 = asuint(buf_5_160.Load(min(_115, 134217727u)).x);
uint slot_4_640 = asuint(asfloat(table_lists.Load<uint>(((_124 + 640u) >> 5u) << 2u)));
uint shift_4_640 = asuint(asfloat(view_shifts.Load<uint>((min((min(slot_4_640, 2097151u) << 2u), 2147483584u) >> 2u) * 4 + 0)));
uint _174 = 1004u + shift_4_640;
uint hslot_4_640 = min(slot_4_640, NULL_SLOT);
ByteAddressBuffer raw_4_640 = heap_ByteAddressBuffer(hslot_4_640);
uint _183 = asuint(asfloat(raw_4_640.Load<uint>((_174 >> 2u) * 4 + 0)));
uint _184 = 1008u + shift_4_640;
uint _193 = asuint(asfloat(raw_4_640.Load<uint>((_184 >> 2u) * 4 + 0)));
uint _194 = 1012u + shift_4_640;
uint _203 = asuint(asfloat(raw_4_640.Load<uint>((_194 >> 2u) * 4 + 0)));
uint _204 = 1023u & _173;
uint _208 = (_173 >> 10u) & 1023u;
uint _209 = _173 >> 20u;
uint _211 = _209 & 1023u;
if (!((_183 <= _204) || ((_193 <= _208) || (_203 <= _211))))
{
float _222 = float(_208);
float _223 = float(_204);
uint _239 = 1016u + shift_4_640;
float _247 = asfloat(raw_4_640.Load<uint>((_239 >> 2u) * 4 + 0));
uint _248 = 1020u + shift_4_640;
float _256 = asfloat(raw_4_640.Load<uint>((_248 >> 2u) * 4 + 0));
precise float _263 = 0.5f + _222;
precise float _265 = 0.5f + _223;
uint _266 = _203 * _208;
precise float _267 = 1.0f / float(_183);
uint slot_5_416 = asuint(asfloat(table_lists.Load<uint>(((_96 + 416u) >> 5u) << 2u)));
bool _280 = (slot_5_416 >> 31u) != 0u;
uint _284 = _280 ? (slot_5_416 << 4u) : 0u;
uint _285 = min((_280 ? HEAP_VIEW_SLOT : slot_5_416), NULL_SLOT);
float3 _297 = asfloat(uint3(_291, _291, heap_ByteAddressBuffer(_285).Load<uint>(((min((_284 + 64u), 2147483584u) >> 2u) + 2u) * 4 + 0)));
float _298 = _297.z;
uint _334 = 1992u + shift_4_640;
float _342 = asfloat(raw_4_640.Load<uint>((_334 >> 2u) * 4 + 0));
float _347 = float((63u & (asuint(asfloat(uint3(_291, _291, heap_ByteAddressBuffer(_285).Load<uint>(((min((_284 + 80u), 2147483584u) >> 2u) + 2u) * 4 + 0))).z) + _209)) & 255u);
float _348 = mad(5.588237762451171875f, _347, _222);
precise float _351 = 0.005837149918079376220703125f * _348;
uint slot_5_128 = asuint(asfloat(table_lists.Load<uint>(((_96 + 128u) >> 5u) << 2u)));
uint shift_5_128 = asuint(asfloat(view_shifts.Load<uint>((min((min(slot_5_128, 2097151u) << 2u), 2147483584u) >> 2u) * 4 + 0)));
uint _356 = 28u + shift_5_128;
uint _365 = 32u + shift_5_128;
uint _373 = 36u + shift_5_128;
uint _382 = 40u + shift_5_128;
uint _391 = 16u + shift_5_128;
uint _400 = 20u + shift_5_128;
uint _408 = 24u + shift_5_128;
uint _417 = 44u + shift_5_128;
uint _426 = 48u + shift_5_128;
precise float _438 = 0.5f + float(_211);
float _439 = frac(mad(0.067110560834407806396484375f, mad(5.588237762451171875f, _347, _223), _351));
float _441 = (_439 >= 1.0f) ? 0.999999940395355224609375f : _439;
precise float _443 = 1.0f / float(_193);
precise float _444 = _256 * _438;
precise float _449 = 52.98291778564453125f * _441;
float _454 = frac(_449);
float _456 = (_454 >= 1.0f) ? 0.999999940395355224609375f : _454;
precise float _457 = _263 * _443;
precise float _462 = _265 * _267;
precise float _467 = 16.0f * _456;
float _471 = mad(_457, -2.0f, 1.0f);
precise float _473 = (-1.0f) + exp2(_444);
float _475 = mad(_462, 2.0f, -1.0f);
uint _477 = uint(_467);
precise float _480 = _247 * _473;
float _484 = ((_247 == 0.0f) || (_473 == 0.0f)) ? 0.0f : _480;
uint hslot_5_128 = min(slot_5_128, NULL_SLOT);
ByteAddressBuffer raw_5_128 = heap_ByteAddressBuffer(hslot_5_128);
float _489 = mad(asfloat(raw_5_128.Load<uint>((_356 >> 2u) * 4 + 0)), _475, mad(_471, asfloat(raw_5_128.Load<uint>((_365 >> 2u) * 4 + 0)), asfloat(raw_5_128.Load<uint>((_373 >> 2u) * 4 + 0))));
float _490 = mad(asfloat(raw_5_128.Load<uint>((_391 >> 2u) * 4 + 0)), _475, mad(_471, asfloat(raw_5_128.Load<uint>((_400 >> 2u) * 4 + 0)), asfloat(raw_5_128.Load<uint>((_408 >> 2u) * 4 + 0))));
float _491 = mad(asfloat(raw_5_128.Load<uint>((_382 >> 2u) * 4 + 0)), _475, mad(_471, asfloat(raw_5_128.Load<uint>((_417 >> 2u) * 4 + 0)), asfloat(raw_5_128.Load<uint>((_426 >> 2u) * 4 + 0))));
float _492 = float(reversebits(_477));
precise float _493 = 0.5f + float(_477);
precise float _494 = _484 * _489;
bool _495 = _484 == 0.0f;
float _498 = (_495 || (_489 == 0.0f)) ? 0.0f : _494;
uint _499 = asuint(_498);
precise float _500 = _484 * _490;
float _503 = (_495 || (_490 == 0.0f)) ? 0.0f : _500;
uint _504 = asuint(_503);
precise float _506 = 2.3283064365386962890625e-10f * _492;
float _510 = mad(-0.125f, _493, 1.0f);
uint _512 = asuint(_510);
precise float _513 = _498 * _498;
bool _514 = _498 == 0.0f;
precise float _516 = _484 * _491;
float _519 = (_495 || (_491 == 0.0f)) ? 0.0f : _516;
uint _520 = asuint(_519);
precise float _522 = (-0.0f) - _510;
float _524 = mad(_522, _510, 1.0f);
precise float _527 = (-0.0f) - trunc(_506);
float _528 = mad(2.3283064365386962890625e-10f, _492, _527);
float _534 = mad(_519, _519, mad(_503, _503, _514 ? 0.0f : _513));
uint _535 = asuint(_534);
uint _538 = (_499 >> 23u) & 255u;
bool _543 = _538 == 255u;
bool _544 = (_499 & 8388607u) == 0u;
uint _553 = _543 ? 9u : ((_538 == 0u) ? (_544 ? 6u : 7u) : 8u);
uint _562 = ((!_544) && _543) ? uint((_499 & 4194304u) != 0u) : (((_499 >> 31u) != 0u) ? (11u - _553) : _553);
bool _565 = ((3u >> _562) & 1u) != 0u;
uint _567 = (_504 >> 23u) & 255u;
bool _571 = _567 == 255u;
bool _572 = (_504 & 8388607u) == 0u;
uint _577 = _571 ? 9u : ((_567 == 0u) ? (_572 ? 6u : 7u) : 8u);
uint _584 = ((!_572) && _571) ? uint((_504 & 4194304u) != 0u) : (((_504 >> 31u) != 0u) ? (11u - _577) : _577);
bool _587 = ((3u >> _584) & 1u) != 0u;
precise float _589 = _528 - round(_528);
float _591 = (_528 == 0.0f) ? _528 : _589;
precise float _592 = _591 * 6.283185482025146484375f;
float _595 = abs(_591);
float _598 = (_595 == 0.25f) ? 0.0f : cos(_592);
uint _601 = (_520 >> 23u) & 255u;
bool _605 = _601 == 255u;
bool _606 = (_520 & 8388607u) == 0u;
uint _611 = _605 ? 9u : ((_601 == 0u) ? (_606 ? 6u : 7u) : 8u);
uint _618 = ((!_606) && _605) ? uint((_520 & 4194304u) != 0u) : (((_520 >> 31u) != 0u) ? (11u - _611) : _611);
bool _621 = ((3u >> _618) & 1u) != 0u;
float _624 = (_595 == 0.5f) ? 0.0f : sin(_592);
float _627 = sqrt(max(0.0f, _524));
uint _630 = (_266 + _211) + ((_203 * _204) * _193);
float _631 = sqrt(_534);
uint _633 = (_298 >= 0.0f) ? asuint(_298) : 1176256512u;
precise float _635 = _624 * _627;
bool _637 = _627 == 0.0f;
float _639 = ((_624 == 0.0f) || _637) ? 0.0f : _635;
uint _640 = asuint(_639);
precise float _641 = _598 * _627;
float _644 = ((_598 == 0.0f) || _637) ? 0.0f : _641;
uint _645 = asuint(_644);
bool _647 = _631 > abs(_342);
uint _1105;
uint _1106;
uint _1107;
uint _1108;
uint _1109;
uint _1110;
uint _1111;
uint _1112;
uint _1113;
uint _1114;
uint _1115;
uint _1116;
uint _1117;
uint _1118;
uint _1119;
uint _1120;
uint _1121;
bool _3551;
bool _3892;
uint slot_4_416 = asuint(asfloat(table_lists.Load<uint>(((_124 + 416u) >> 5u) << 2u)));
uint hslot_4_416 = min(slot_4_416, NULL_SLOT);
ByteAddressBuffer raw_4_416 = heap_ByteAddressBuffer(hslot_4_416);
uint shift_4_416 = asuint(asfloat(view_shifts.Load<uint>((min((min(slot_4_416, 2097151u) << 2u), 2147483584u) >> 2u) * 4 + 0)));
if (_647)
{
uint _3773;
uint _3779;
uint _3785;
uint _3791;
uint _3797;
uint _3803;
uint _3809;
uint _3815;
uint _3821;
uint _3827;
uint _3833;
uint _3839;
uint _3845;
uint _3851;
uint _3857;
uint _3863;
uint _3869;
bool _3891;
bool _3912;
if (_565 || (_587 || _621))
{
_3773 = 0u;
_3779 = 0u;
_3785 = 31u;
_3791 = 3212836864u;
_3797 = _512;
_3803 = _645;
_3809 = _640;
_3815 = 4294967295u;
_3821 = 0u;
_3827 = 4294967295u;
_3833 = 4294967295u;
_3839 = 0u;
_3845 = 0u;
_3851 = 4294967295u;
_3857 = _535;
_3863 = 0u;
_3869 = 0u;
_3891 = false;
_3912 = true;
}
else
{
uint _3772;
uint _3778;
uint _3784;
uint _3790;
uint _3796;
uint _3802;
uint _3808;
uint _3814;
uint _3820;
uint _3826;
uint _3832;
uint _3838;
uint _3844;
uint _3850;
uint _3856;
uint _3862;
uint _3868;
bool _3890;
bool _3911;
if ((((516u >> _562) & 1u) != 0u) || ((((516u >> _584) & 1u) != 0u) || (((516u >> _618) & 1u) != 0u)))
{
_3772 = 0u;
_3778 = 0u;
_3784 = 31u;
_3790 = 3212836864u;
_3796 = _512;
_3802 = _645;
_3808 = _640;
_3814 = 4294967295u;
_3820 = 0u;
_3826 = 4294967295u;
_3832 = 4294967295u;
_3838 = 0u;
_3844 = 0u;
_3850 = 4294967295u;
_3856 = _535;
_3862 = 0u;
_3868 = 0u;
_3890 = false;
_3911 = true;
}
else
{
uint _663 = (_640 >> 23u) & 255u;
bool _667 = _663 == 255u;
bool _668 = (_640 & 8388607u) == 0u;
uint _673 = _667 ? 9u : ((_663 == 0u) ? (_668 ? 6u : 7u) : 8u);
uint _680 = ((!_668) && _667) ? uint((_640 & 4194304u) != 0u) : (((_640 >> 31u) != 0u) ? (11u - _673) : _673);
uint _685 = (_645 >> 23u) & 255u;
bool _689 = _685 == 255u;
bool _690 = (_645 & 8388607u) == 0u;
uint _695 = _689 ? 9u : ((_685 == 0u) ? (_690 ? 6u : 7u) : 8u);
uint _702 = ((!_690) && _689) ? uint((_645 & 4194304u) != 0u) : (((_645 >> 31u) != 0u) ? (11u - _695) : _695);
uint _707 = (_512 >> 23u) & 255u;
bool _711 = _707 == 255u;
bool _712 = (_512 & 8388607u) == 0u;
uint _717 = _711 ? 9u : ((_707 == 0u) ? (_712 ? 6u : 7u) : 8u);
uint _724 = ((!_712) && _711) ? uint((_512 & 4194304u) != 0u) : (((_512 >> 31u) != 0u) ? (11u - _717) : _717);
uint _3771;
uint _3777;
uint _3783;
uint _3789;
uint _3795;
uint _3801;
uint _3807;
uint _3813;
uint _3819;
uint _3825;
uint _3831;
uint _3837;
uint _3843;
uint _3849;
uint _3855;
uint _3861;
uint _3867;
bool _3889;
bool _3910;
if ((((3u >> _680) & 1u) != 0u) || ((((3u >> _702) & 1u) != 0u) || (((3u >> _724) & 1u) != 0u)))
{
_3771 = 0u;
_3777 = 0u;
_3783 = 31u;
_3789 = 3212836864u;
_3795 = _512;
_3801 = _645;
_3807 = _640;
_3813 = 4294967295u;
_3819 = 0u;
_3825 = 4294967295u;
_3831 = 4294967295u;
_3837 = 0u;
_3843 = 0u;
_3849 = 4294967295u;
_3855 = _535;
_3861 = 0u;
_3867 = 0u;
_3889 = false;
_3910 = true;
}
else
{
uint _3770;
uint _3776;
uint _3782;
uint _3788;
uint _3794;
uint _3800;
uint _3806;
uint _3812;
uint _3818;
uint _3824;
uint _3830;
uint _3836;
uint _3842;
uint _3848;
uint _3854;
uint _3860;
uint _3866;
bool _3888;
bool _3909;
if ((((516u >> _680) & 1u) != 0u) || ((((516u >> _702) & 1u) != 0u) || (((516u >> _724) & 1u) != 0u)))
{
_3770 = 0u;
_3776 = 0u;
_3782 = 31u;
_3788 = 3212836864u;
_3794 = _512;
_3800 = _645;
_3806 = _640;
_3812 = 4294967295u;
_3818 = 0u;
_3824 = 4294967295u;
_3830 = 4294967295u;
_3836 = 0u;
_3842 = 0u;
_3848 = 4294967295u;
_3854 = _535;
_3860 = 0u;
_3866 = 0u;
_3888 = false;
_3909 = true;
}
else
{
uint _762 = uint((uint64_t(_127) | (uint64_t(_132 & 65535u) << 32ull)) >> 8ull);
_66[(countbits((WaveGetLaneIndex() >= 32u) ? 4294967295u : ((1u << (WaveGetLaneIndex() & 31u)) - 1u)) << 2u) >> 2u] = 4294967295u;
float _767 = asfloat(_633);
bool _801 = ((((((0.0f <= _767) && (!(isnan(_503) || isnan(_503)))) && (!(isnan(_498) || isnan(_498)))) && (!(isnan(_519) || isnan(_519)))) && (!(isnan(_644) || isnan(_644)))) && (!(isnan(_639) || isnan(_639)))) && (!(isnan(_510) || isnan(_510)));
if (_801)
{
RayDesc _8ident = {float3(_503, _498, _519), 0.0f, float3(_644, _639, _510), _767};
// Site 1 (console entry 0x518): structure view 0, flags RAY_FLAG_FORCE_NON_OPAQUE, mask 0x48; its candidate body runs in the Proceed() loop; told by the diagnostics build's counters.
_770.TraceRayInline(_48, 2u, 72u, _8ident);
}
uint _807;
uint _809;
uint _811;
uint _812;
uint _814;
_807 = 1176256512u;
_809 = 1176256512u;
_811 = 0u;
_812 = 1176256512u;
_814 = 31u;
uint _808;
uint _810;
uint _813;
uint _815;
uint site1_count = 0u;
uint site1_cap = 0u;
for (;;)
{
bool _817;
if (_801)
{
bool _816 = _770.Proceed();
_817 = _816;
}
else
{
_817 = false;
}
if (!(0u != uint(_817)))
{
break;
}
// The title's stop (console 0x6d4-0x6dc): the count past 0xfffe ends the walk with
// the cap flag all ones.
site1_count = site1_count + 1u;
if (site1_count > 65534u)
{
_770.Abort();
site1_cap = 4294967295u;
break;
}
float _957 = _770.CandidateTriangleRayT();
bool _958 = _770.CandidateTriangleFrontFace();
uint _959 = asuint(_957);
uint _961 = _770.CandidateInstanceID();
uint _962 = _770.CandidateInstanceContributionToHitGroupIndex();
uint _963 = _770.CandidateGeometryIndex();
uint _967 = ((_963 << 8u) >> 8u) + (16777215u & _962);
uint _968 = _967 * 116u;
uint _983 = _968 + shift_4_416;
uint _993 = asuint(asfloat(raw_4_416.Load<uint>((min(_983, 2147483584u) >> 2u) * 4 + 0)));
uint _994 = 4096u & _993;
uint _1085;
if (0u == _994)
{
uint _997 = 2048u & _993;
bool _999 = 0u == _997;
uint _1078;
uint _1079;
uint _1080;
uint _1081;
uint _1082;
if (_999)
{
uint _1000 = 245760u & _993;
bool _1002 = 0u == _1000;
uint _1062;
uint _1063;
uint _1064;
uint _1065;
if (_1002)
{
uint _1003 = _968 + 4u;
uint _1017 = _1003 + shift_4_416;
bool _1031 = 254u == (_958 ? 254u : 255u);
bool _1034 = 1u == (1u & (_993 >> 9u));
bool _1035 = 1u == (1u & (_993 >> 8u));
uint _1041 = (_1031 || (_1035 || (0u != ((asuint(asfloat(raw_4_416.Load<uint>((min(_1017, 2147483584u) >> 2u) * 4 + 0))) & 4u) | (512u & _993))))) ? 1176256512u : _959;
uint _1047 = _809 | _1041;
uint _1056;
uint _1057;
if (_1034 ? (!(_957 < asfloat(_807))) : true)
{
_1056 = _807;
_1057 = _814;
}
else
{
_1056 = _959;
_1057 = 1023u & _961;
}
_1062 = _1056;
_1063 = asuint(((_1047 & 2147483647u) == 0u) ? asfloat(_1047) : min(asfloat(_809), asfloat(_1041)));
_1064 = (_1031 ? (!_1034) : (_1034 ? false : _1035)) ? 4294967295u : 0u;
_1065 = _1057;
}
else
{
_1062 = _993;
_1063 = _967;
_1064 = _1000;
_1065 = _994;
}
uint _3870;
uint _3871;
uint _3872;
uint _3873;
uint _3874;
if (_1002)
{
_3870 = _1062;
_3871 = _1063;
_3872 = _812;
_3873 = _1065;
_3874 = _1064;
}
else
{
_3870 = _807;
_3871 = _809;
_3872 = ((_957 < asfloat(_812)) && (0u == (131072u & _1062))) ? _959 : _812;
_3873 = _814;
_3874 = 0u;
}
_1078 = _3870;
_1079 = _3871;
_1080 = _3872;
_1081 = _3873;
_1082 = _3874;
}
else
{
_1078 = _807;
_1079 = _809;
_1080 = _812;
_1081 = _814;
_1082 = _997;
}
_808 = _1078;
_810 = _1079;
_813 = _1080;
_815 = _1081;
_1085 = (!_999) ? 0u : _1082;
}
else
{
_808 = _807;
_810 = _809;
_813 = _812;
_815 = _814;
_1085 = 0u;
}
if (_1085 == 4294967295u)
{
_770.CommitNonOpaqueTriangleHit();
}
_807 = _808;
_809 = _810;
_811 = 1u;
_812 = _813;
_814 = _815;
}
uint _3769;
uint _3775;
uint _3781;
uint _3787;
uint _3793;
uint _3799;
uint _3805;
uint _3811;
uint _3817;
uint _3823;
uint _3829;
uint _3835;
uint _3841;
uint _3847;
uint _3853;
uint _3859;
uint _3865;
bool _3908;
{
bool _835;
float _836;
bool _837;
float _838;
float _839;
uint _840;
uint _841;
uint _842;
uint _843;
if (_801)
{
uint _821 = _770.CommittedStatus();
float _823 = _770.CommittedRayT();
bool _824 = _770.CommittedTriangleFrontFace();
float2 _826 = _770.CommittedTriangleBarycentrics();
float2 _828 = _770.CommittedTriangleBarycentrics();
uint _830 = _770.CommittedInstanceContributionToHitGroupIndex();
uint _831 = _770.CommittedInstanceIndex();
uint _832 = _770.CommittedGeometryIndex();
uint _834 = _770.CommittedPrimitiveIndex();
_835 = _821 == 1u;
_836 = _823;
_837 = _824;
_838 = _826.x;
_839 = _828.y;
_840 = _830;
_841 = _831;
_842 = _832 << 8u;
_843 = _834;
}
else
{
_835 = false;
_836 = 0.0f;
_837 = false;
_838 = 0.0f;
_839 = 0.0f;
_840 = 0u;
_841 = 0u;
_842 = 0u;
_843 = 0u;
}
uint _848 = _835 ? _841 : 0u;
uint _849 = _835 ? _842 : 0u;
uint _853 = uint(_835);
uint _854 = _835 ? asuint(_836) : _633;
uint _855 = _835 ? (_837 ? 254u : 255u) : 0u;
float _860 = asfloat(_854);
uint _863 = (asfloat(_807) <= _860) ? _814 : 31u;
bool _865 = 0u != _853;
uint _866 = _865 ? ((4u > (4u & _853)) ? 1u : 2u) : 0u;
// The walk's cap flag counts as a hit (0xf00, 0xf28), and the ray then takes the
// nearest back face for its result (0xf54, 0xf80).
bool _867 = (4294967295u == site1_cap) || (0u != _866);
uint _938;
uint _939;
uint _940;
uint _941;
uint _942;
uint _943;
uint _944;
uint _945;
uint _946;
uint _947;
uint _948;
uint _949;
if (!_867)
{
_938 = _854;
_939 = _866;
_940 = _645;
_941 = _640;
_942 = _853;
_943 = _855;
_944 = _809;
_945 = _811;
_946 = _812;
_947 = _811;
_948 = _814;
_949 = _499;
}
else
{
float _870 = asfloat(_809);
precise float _871 = 9.9999997473787516355514526367188e-05f + _870;
uint64_t _874 = uint64_t(_853 >> 3u) << 6ull;
uint _876 = uint(_874);
uint _878 = uint(_874 >> 32ull);
uint _879 = _876 + (_127 & 4294967040u);
uint _883 = ((_132 & 255u) + _878) + uint(_879 < _876);
bool _884 = (4294967295u == site1_cap) || (_860 > _871);
uint _885 = 16777215u & (_835 ? _840 : 0u);
bool _888 = _865 ? (!_865) : true;
uint _891;
if (_888)
{
_891 = 0u;
}
else
{
_891 = _849 >> 8u;
}
uint _892 = _891 + _885;
uint _896;
uint _897;
if (_865 ? _884 : true)
{
_896 = _885;
_897 = _884 ? 1023u : 0u;
}
else
{
_896 = _849;
_897 = _849 >> 8u;
}
uint _899 = _854 | _809;
uint _905 = _884 ? asuint(((_899 & 2147483647u) == 0u) ? asfloat(_899) : min(_860, _870)) : _854;
uint _3875;
uint _3876;
uint _3877;
uint _3878;
uint _3879;
uint _3881;
uint _3882;
uint _3883;
uint _3885;
uint _3886;
if (_884)
{
_3875 = _905;
_3876 = _896;
_3877 = _883;
_3878 = _879;
_3879 = _897;
_3881 = _884 ? 4294967295u : _809;
_3882 = _884 ? 4294967295u : _876;
_3883 = _884 ? 0u : _878;
_3885 = _892;
_3886 = _499;
}
else
{
uint _924;
uint _925;
uint _926;
uint _927;
uint _928;
if (_888)
{
_924 = _848;
_925 = _883;
_926 = _879;
_927 = 4294967295u;
_928 = _499;
}
else
{
uint _910 = 7u & _853;
uint _917 = (_865 && (_865 && (2u > _910))) ? ((_910 << 2u) + 52u) : 52u;
uint _918 = _917 + _876;
_924 = _918;
_925 = _878 + uint(_865 && (_865 && (_918 < _917)));
_926 = _918;
_927 = _835 ? _843 : 0u;
_928 = _917;
}
_3875 = _905;
_3876 = _924;
_3877 = _925;
_3878 = _926;
_3879 = _897;
_3881 = 65535u & _848;
_3882 = _927;
_3883 = uint(254u == _855);
_3885 = _892;
_3886 = _928;
}
_938 = _3875;
_939 = _3876;
_940 = _3877;
_941 = _3878;
_942 = _3879;
_943 = 1u;
_944 = _3881;
_945 = _3882;
_946 = _3883;
_947 = 1u;
_948 = _3885;
_949 = _3886;
}
uint _3768;
uint _3774;
uint _3780;
uint _3786;
uint _3792;
uint _3798;
uint _3804;
uint _3810;
uint _3816;
uint _3822;
uint _3828;
uint _3834;
uint _3840;
uint _3846;
uint _3852;
uint _3864;
if (_867)
{
_3768 = _835 ? asuint(_839) : 0u;
_3774 = _835 ? asuint(_838) : 0u;
_3780 = _863;
_3786 = _938;
_3792 = _939;
_3798 = _940;
_3804 = _941;
_3810 = _942;
_3816 = _943;
_3822 = _944;
_3828 = _945;
_3834 = _946;
_3840 = _947;
_3846 = _948;
_3852 = _949;
_3864 = _762;
}
else
{
bool _951 = 10000.0f > asfloat(_944);
_3768 = 0u;
_3774 = 0u;
_3780 = _863;
_3786 = _951 ? _944 : 3212836864u;
_3792 = _939;
_3798 = _940;
_3804 = _941;
_3810 = _951 ? 1023u : 4294967295u;
_3816 = 0u;
_3822 = 4294967295u;
_3828 = 4294967295u;
_3834 = 0u;
_3840 = uint(_951);
_3846 = 4294967295u;
_3852 = _949;
_3864 = _762;
}
_3769 = _3768;
_3775 = _3774;
_3781 = _3780;
_3787 = _3786;
_3793 = _3792;
_3799 = _3798;
_3805 = _3804;
_3811 = _3810;
_3817 = _3816;
_3823 = _3822;
_3829 = _3828;
_3835 = _3834;
_3841 = _3840;
_3847 = _3846;
_3853 = _3852;
_3859 = 1u;
_3865 = _3864;
_3908 = true;
}
_3770 = _3769;
_3776 = _3775;
_3782 = _3781;
_3788 = _3787;
_3794 = _3793;
_3800 = _3799;
_3806 = _3805;
_3812 = _3811;
_3818 = _3817;
_3824 = _3823;
_3830 = _3829;
_3836 = _3835;
_3842 = _3841;
_3848 = _3847;
_3854 = _3853;
_3860 = _3859;
_3866 = _3865;
_3888 = false;
_3909 = _3908;
}
_3771 = _3770;
_3777 = _3776;
_3783 = _3782;
_3789 = _3788;
_3795 = _3794;
_3801 = _3800;
_3807 = _3806;
_3813 = _3812;
_3819 = _3818;
_3825 = _3824;
_3831 = _3830;
_3837 = _3836;
_3843 = _3842;
_3849 = _3848;
_3855 = _3854;
_3861 = _3860;
_3867 = _3866;
_3889 = _3888;
_3910 = _3909;
}
_3772 = _3771;
_3778 = _3777;
_3784 = _3783;
_3790 = _3789;
_3796 = _3795;
_3802 = _3801;
_3808 = _3807;
_3814 = _3813;
_3820 = _3819;
_3826 = _3825;
_3832 = _3831;
_3838 = _3837;
_3844 = _3843;
_3850 = _3849;
_3856 = _3855;
_3862 = _3861;
_3868 = _3867;
_3890 = _3889;
_3911 = _3910;
}
_3773 = _3772;
_3779 = _3778;
_3785 = _3784;
_3791 = _3790;
_3797 = _3796;
_3803 = _3802;
_3809 = _3808;
_3815 = _3814;
_3821 = _3820;
_3827 = _3826;
_3833 = _3832;
_3839 = _3838;
_3845 = _3844;
_3851 = _3850;
_3857 = _3856;
_3863 = _3862;
_3869 = _3868;
_3891 = _3890;
_3912 = _3911;
}
_1105 = _3773;
_1106 = _3779;
_1107 = _3785;
_1108 = _3791;
_1109 = _3797;
_1110 = _3803;
_1111 = _3809;
_1112 = _3815;
_1113 = _3821;
_1114 = _3827;
_1115 = _3833;
_1116 = _3839;
_1117 = _3845;
_1118 = _3851;
_1119 = _3857;
_1120 = _3863;
_1121 = _3869;
_3892 = _3891;
_3551 = _3912;
}
else
{
_1105 = asuint(_598);
_1106 = asuint(_624);
_1107 = asuint(_631);
_1108 = asuint(_627);
_1109 = _512;
_1110 = _645;
_1111 = _640;
_1112 = _266;
_1113 = 0u;
_1114 = asuint(_484);
_1115 = 0u;
_1116 = 0u;
_1117 = 0u;
_1118 = 0u;
_1119 = _535;
_1120 = 0u;
_1121 = 0u;
_3892 = false;
_3551 = true;
}
bool _3549;
if (_3551)
{
uint _1861;
uint _1862;
uint _1863;
uint _1864;
uint _1865;
uint _1866;
uint _1867;
uint _1868;
uint _1869;
uint _1870;
uint _1871;
uint _1872;
uint _1873;
uint _1874;
uint _1875;
uint _1876;
uint _1877;
bool _3555;
bool _3902;
if (_647)
{
_1861 = _1105;
_1862 = _1106;
_1863 = _1107;
_1864 = _1108;
_1865 = _1112;
_1866 = _1113;
_1867 = _1114;
_1868 = 0u;
_1869 = _1115;
_1870 = _1116;
_1871 = _1117;
_1872 = 0u;
_1873 = _1118;
_1874 = 0u;
_1875 = 0u;
_1876 = _1120;
_1877 = _1121;
_3902 = _3892;
_3555 = true;
}
else
{
uint _3589;
uint _3596;
uint _3603;
uint _3610;
uint _3617;
uint _3624;
uint _3631;
uint _3638;
uint _3645;
uint _3652;
uint _3659;
uint _3666;
uint _3673;
uint _3680;
uint _3687;
uint _3694;
uint _3701;
bool _3901;
bool _3919;
if (_565 || (_587 || _621))
{
_3589 = 0u;
_3596 = 0u;
_3603 = 31u;
_3610 = 3212836864u;
_3617 = 4294967295u;
_3624 = 0u;
_3631 = 4294967295u;
_3638 = 0u;
_3645 = 4294967295u;
_3652 = 0u;
_3659 = 0u;
_3666 = 0u;
_3673 = 4294967295u;
_3680 = 0u;
_3687 = 0u;
_3694 = _1120;
_3701 = _1121;
_3901 = _3892;
_3919 = true;
}
else
{
uint _3588;
uint _3595;
uint _3602;
uint _3609;
uint _3616;
uint _3623;
uint _3630;
uint _3637;
uint _3644;
uint _3651;
uint _3658;
uint _3665;
uint _3672;
uint _3679;
uint _3686;
uint _3693;
uint _3700;
bool _3900;
bool _3918;
if ((((516u >> _562) & 1u) != 0u) || ((((516u >> _584) & 1u) != 0u) || (((516u >> _618) & 1u) != 0u)))
{
_3588 = 0u;
_3595 = 0u;
_3602 = 31u;
_3609 = 3212836864u;
_3616 = 4294967295u;
_3623 = 0u;
_3630 = 4294967295u;
_3637 = 0u;
_3644 = 4294967295u;
_3651 = 0u;
_3658 = 0u;
_3665 = 0u;
_3672 = 4294967295u;
_3679 = 0u;
_3686 = 0u;
_3693 = _1120;
_3700 = _1121;
_3900 = _3892;
_3918 = true;
}
else
{
float _1135 = asfloat(_1111);
uint _1137 = (_1111 >> 23u) & 255u;
bool _1141 = _1137 == 255u;
bool _1142 = (_1111 & 8388607u) == 0u;
uint _1147 = _1141 ? 9u : ((_1137 == 0u) ? (_1142 ? 6u : 7u) : 8u);
uint _1154 = ((!_1142) && _1141) ? uint((_1111 & 4194304u) != 0u) : (((_1111 >> 31u) != 0u) ? (11u - _1147) : _1147);
float _1158 = asfloat(_1110);
uint _1160 = (_1110 >> 23u) & 255u;
bool _1164 = _1160 == 255u;
bool _1165 = (_1110 & 8388607u) == 0u;
uint _1170 = _1164 ? 9u : ((_1160 == 0u) ? (_1165 ? 6u : 7u) : 8u);
uint _1177 = ((!_1165) && _1164) ? uint((_1110 & 4194304u) != 0u) : (((_1110 >> 31u) != 0u) ? (11u - _1170) : _1170);
float _1181 = asfloat(_1109);
uint _1183 = (_1109 >> 23u) & 255u;
bool _1187 = _1183 == 255u;
bool _1188 = (_1109 & 8388607u) == 0u;
uint _1193 = _1187 ? 9u : ((_1183 == 0u) ? (_1188 ? 6u : 7u) : 8u);
uint _1200 = ((!_1188) && _1187) ? uint((_1109 & 4194304u) != 0u) : (((_1109 >> 31u) != 0u) ? (11u - _1193) : _1193);
uint _3587;
uint _3594;
uint _3601;
uint _3608;
uint _3615;
uint _3622;
uint _3629;
uint _3636;
uint _3643;
uint _3650;
uint _3657;
uint _3664;
uint _3671;
uint _3678;
uint _3685;
uint _3692;
uint _3699;
bool _3899;
bool _3917;
if ((((3u >> _1154) & 1u) != 0u) || ((((3u >> _1177) & 1u) != 0u) || (((3u >> _1200) & 1u) != 0u)))
{
_3587 = 0u;
_3594 = 0u;
_3601 = 31u;
_3608 = 3212836864u;
_3615 = 4294967295u;
_3622 = 0u;
_3629 = 4294967295u;
_3636 = 0u;
_3643 = 4294967295u;
_3650 = 0u;
_3657 = 0u;
_3664 = 0u;
_3671 = 4294967295u;
_3678 = 0u;
_3685 = 0u;
_3692 = _1120;
_3699 = _1121;
_3899 = _3892;
_3917 = true;
}
else
{
uint _3586;
uint _3593;
uint _3600;
uint _3607;
uint _3614;
uint _3621;
uint _3628;
uint _3635;
uint _3642;
uint _3649;
uint _3656;
uint _3663;
uint _3670;
uint _3677;
uint _3684;
uint _3691;
uint _3698;
bool _3898;
bool _3916;
if ((((516u >> _1154) & 1u) != 0u) || ((((516u >> _1177) & 1u) != 0u) || (((516u >> _1200) & 1u) != 0u)))
{
_3586 = 0u;
_3593 = 0u;
_3600 = 31u;
_3607 = 3212836864u;
_3614 = 4294967295u;
_3621 = 0u;
_3628 = 4294967295u;
_3635 = 0u;
_3642 = 4294967295u;
_3649 = 0u;
_3656 = 0u;
_3663 = 0u;
_3670 = 4294967295u;
_3677 = 0u;
_3684 = 0u;
_3691 = _1120;
_3698 = _1121;
_3898 = _3892;
_3916 = true;
}
else
{
uint64_t _1229 = (uint64_t(_79.y) | (uint64_t(_79.z & 65535u) << 32ull)) >> 8ull;
uint _1230 = uint(_1229);
uint _1232 = uint(_1229 >> 32ull);
uint _1234 = (countbits((WaveGetLaneIndex() >= 32u) ? 4294967295u : ((1u << (WaveGetLaneIndex() & 31u)) - 1u)) << 2u) >> 2u;
_66[_1234] = 4294967295u;
float _1236 = asfloat(_633);
bool _1257 = !(isnan(_1158) || isnan(_1158));
bool _1262 = !(isnan(_1135) || isnan(_1135));
bool _1267 = !(isnan(_1181) || isnan(_1181));
bool _1268 = ((((((0.0f <= _1236) && (!(isnan(_503) || isnan(_503)))) && (!(isnan(_498) || isnan(_498)))) && (!(isnan(_519) || isnan(_519)))) && _1257) && _1262) && _1267;
if (_1268)
{
RayDesc _9ident = {float3(_503, _498, _519), 0.0f, float3(_1158, _1135, _1181), _1236};
// Site 2 (console entry 0x1418): structure view 1, flags RAY_FLAG_FORCE_NON_OPAQUE, mask 0x48; its candidate body runs in the Proceed() loop.
_1237.TraceRayInline(_49, 2u, 72u, _9ident);
}
uint _1273;
uint _1275;
uint _1277;
uint _1279;
uint _1281;
uint _1283;
uint _1285;
uint _1287;
_1273 = 0u;
_1275 = 1176256512u;
_1277 = 1176256512u;
_1279 = 1176256512u;
_1281 = 1176256512u;
_1283 = 1176256512u;
_1285 = 0u;
_1287 = 31u;
uint _1276;
uint _1274;
uint _1278;
uint _1280;
uint _1282;
uint _1284;
uint _1286;
uint _1288;
uint _1290;
uint site23_count = 0u;
uint _1289 = 0u;
for (;;)
{
bool _1292;
if (_1268)
{
bool _1291 = _1237.Proceed();
_1292 = _1291;
}
else
{
_1292 = false;
}
if (!(0u != uint(_1292)))
{
break;
}
// The title's stop (console 0x1418 counts, 0x15dc compares): the walk goes on
// while the count is below 0xffff; the count is read after site 2 or 3
// (0x2a20).
site23_count = site23_count + 1u;
if (!(site23_count < 65535u))
{
_1237.Abort();
break;
}
float _1701 = _1237.CandidateTriangleRayT();
bool _1702 = _1237.CandidateTriangleFrontFace();
uint _1703 = asuint(_1701);
uint _1705 = _1237.CandidateInstanceID();
uint _1706 = _1237.CandidateInstanceContributionToHitGroupIndex();
uint _1707 = _1237.CandidateGeometryIndex();
uint _1709 = _1237.CandidatePrimitiveIndex();
uint _1712 = ((_1707 << 8u) >> 8u) + (16777215u & _1706);
uint _1713 = _1712 * 116u;
uint _1727 = _1713 + shift_4_416;
uint _1737 = asuint(asfloat(raw_4_416.Load<uint>((min(_1727, 2147483584u) >> 2u) * 4 + 0)));
bool _1739 = 0u == (4096u & _1737);
uint _1848;
if (_1739)
{
uint _1740 = 2048u & _1737;
bool _1741 = 0u == _1740;
uint _1828;
uint _1829;
uint _1830;
uint _1831;
uint _1832;
uint _1833;
if (_1741)
{
uint _1742 = 245760u & _1737;
bool _1743 = 0u == _1742;
uint _1803;
uint _1804;
uint _1805;
uint _1806;
uint _1807;
uint _1808;
if (_1743)
{
uint _1744 = _1713 + 4u;
uint _1758 = _1744 + shift_4_416;
bool _1772 = 254u == (_1702 ? 254u : 255u);
bool _1775 = 1u == (1u & (_1737 >> 9u));
bool _1776 = 1u == (1u & (_1737 >> 8u));
uint _1782 = (_1772 || (_1776 || (0u != ((asuint(asfloat(raw_4_416.Load<uint>((min(_1758, 2147483584u) >> 2u) * 4 + 0))) & 4u) | (512u & _1737))))) ? 1176256512u : _1703;
uint _1788 = _1279 | _1782;
uint _1797;
uint _1798;
if (_1775 ? (!(_1701 < asfloat(_1277))) : true)
{
_1797 = _1287;
_1798 = _1277;
}
else
{
_1797 = 1023u & _1705;
_1798 = _1703;
}
_1803 = asuint(((_1788 & 2147483647u) == 0u) ? asfloat(_1788) : min(asfloat(_1279), asfloat(_1782)));
_1804 = _1797;
_1805 = _1285;
_1806 = _1283;
_1807 = (_1772 ? (!_1775) : (_1775 ? false : _1776)) ? 4294967295u : 0u;
_1808 = _1798;
}
else
{
_1803 = _1737;
_1804 = _1712;
_1805 = _1742;
_1806 = 0u;
_1807 = 0u;
_1808 = _1289;
}
uint _3711;
uint _3712;
uint _3713;
uint _3714;
uint _3715;
uint _3716;
if (_1743)
{
_3711 = _1803;
_3712 = _1804;
_3713 = _1805;
_3714 = _1806;
_3715 = _1807;
_3716 = _1808;
}
else
{
uint _1820;
uint _1821;
if ((_1701 < asfloat(_1283)) ? (!(0u == (131072u & _1803))) : true)
{
_1820 = _1285;
_1821 = _1283;
}
else
{
_1820 = (_1804 | (_1709 << 15u)) | 16384u;
_1821 = _1703;
}
_3711 = _1279;
_3712 = _1287;
_3713 = _1820;
_3714 = _1821;
_3715 = 0u;
_3716 = _1277;
}
_1828 = _3711;
_1829 = _3712;
_1830 = _3713;
_1831 = _3714;
_1832 = _3715;
_1833 = _3716;
}
else
{
_1828 = _1737;
_1829 = _1712;
_1830 = _1740;
_1831 = 0u;
_1832 = 0u;
_1833 = _1289;
}
uint _3702;
uint _3703;
uint _3704;
uint _3705;
uint _3706;
uint _3707;
uint _3708;
uint _3709;
uint _3710;
if (_1741)
{
_3702 = _1273;
_3703 = _1833;
_3704 = _1828;
_3705 = _1281;
_3706 = _1831;
_3707 = _1830;
_3708 = _1829;
_3709 = _1832;
_3710 = _1833;
}
else
{
uint _1838;
uint _1839;
if (_1701 < asfloat(_1281))
{
_1838 = 1u + (1023u & _1705);
_1839 = _1703;
}
else
{
_1838 = _1273;
_1839 = _1281;
}
_3702 = _1838;
_3703 = _1277;
_3704 = _1279;
_3705 = _1839;
_3706 = _1283;
_3707 = _1285;
_3708 = _1287;
_3709 = 0u;
_3710 = _1277;
}
_1274 = _3702;
_1278 = _3703;
_1280 = _3704;
_1282 = _3705;
_1284 = _3706;
_1286 = _3707;
_1288 = _3708;
_1848 = _3709;
_1290 = _3710;
}
else
{
_1274 = _1273;
_1278 = _1277;
_1280 = _1279;
_1282 = _1281;
_1284 = _1283;
_1286 = _1285;
_1288 = _1287;
_1848 = 0u;
_1290 = _1289;
}
bool _1849 = !_1739;
uint _1852 = _1275 | _1703;
_1276 = _1849 ? asuint(((_1852 & 2147483647u) == 0u) ? asfloat(_1852) : min(asfloat(_1275), _1701)) : _1275;
if ((_1849 ? 0u : _1848) == 4294967295u)
{
_1237.CommitNonOpaqueTriangleHit();
}
_1273 = _1274;
_1275 = _1276;
_1277 = _1278;
_1279 = _1280;
_1281 = _1282;
_1283 = _1284;
_1285 = _1286;
_1287 = _1288;
_1289 = _1290;
}
uint _3585;
uint _3592;
uint _3599;
uint _3606;
uint _3613;
uint _3620;
uint _3627;
uint _3634;
uint _3641;
uint _3648;
uint _3655;
uint _3662;
uint _3669;
uint _3676;
uint _3683;
uint _3690;
uint _3697;
bool _3897;
bool _3915;
{
bool _1308;
float _1309;
bool _1310;
float _1311;
float _1312;
uint _1313;
uint _1314;
uint _1315;
uint _1316;
if (_1268)
{
uint _1295 = _1237.CommittedStatus();
float _1297 = _1237.CommittedRayT();
bool _1298 = _1237.CommittedTriangleFrontFace();
float2 _1299 = _1237.CommittedTriangleBarycentrics();
float2 _1301 = _1237.CommittedTriangleBarycentrics();
uint _1303 = _1237.CommittedInstanceContributionToHitGroupIndex();
uint _1304 = _1237.CommittedInstanceIndex();
uint _1305 = _1237.CommittedGeometryIndex();
uint _1307 = _1237.CommittedPrimitiveIndex();
_1308 = _1295 == 1u;
_1309 = _1297;
_1310 = _1298;
_1311 = _1299.x;
_1312 = _1301.y;
_1313 = _1303;
_1314 = _1304;
_1315 = _1305 << 8u;
_1316 = _1307;
}
else
{
_1308 = false;
_1309 = 0.0f;
_1310 = false;
_1311 = 0.0f;
_1312 = 0.0f;
_1313 = 0u;
_1314 = 0u;
_1315 = 0u;
_1316 = 0u;
}
uint _1320 = _1308 ? _1313 : 0u;
uint _1321 = _1308 ? _1314 : 0u;
uint _1322 = _1308 ? _1315 : 0u;
uint _1323 = _1308 ? _1316 : 0u;
uint _1325 = uint(_1308);
uint _1326 = _1308 ? asuint(_1309) : _633;
uint _1327 = _1308 ? (_1310 ? 254u : 255u) : 0u;
uint _1328 = _1308 ? asuint(_1311) : 0u;
uint _1329 = _1308 ? asuint(_1312) : 0u;
float _1331 = asfloat(_1326);
uint _1333 = 4u & _1325;
uint _1334 = (asfloat(_1283) < _1331) ? _1285 : 0u;
uint _1337 = (asfloat(_1277) <= _1331) ? _1287 : 31u;
uint _1444;
uint _1445;
uint _1446;
uint _1447;
uint _1448;
uint _1449;
uint _1450;
uint _1451;
uint _1452;
uint _1453;
uint _1454;
uint _1455;
uint _1456;
uint _1457;
uint _1458;
uint _1459;
uint _1460;
uint _1461;
bool _3559;
bool _3896;
if (0u == _1325)
{
uint _1353;
if (_342 <= 0.0f)
{
_1353 = 0u;
}
else
{
precise float _1340 = _498 * _1135;
precise float _1345 = (-0.0f) - asfloat(_1119);
float _1348 = mad(_519, _1181, mad(_503, _1158, (_514 || (_1135 == 0.0f)) ? 0.0f : _1340));
precise float _1351 = sqrt(mad(_1348, _1348, mad(_342, _342, _1345))) - _1348;
_1353 = asuint(_1351);
}
float _1354 = asfloat(_1353);
precise float _1355 = _1236 - _1354;
uint _3733;
uint _3735;
uint _3737;
uint _3739;
uint _3741;
uint _3743;
uint _3745;
uint _3747;
uint _3749;
uint _3751;
uint _3753;
uint _3755;
uint _3757;
uint _3759;
uint _3761;
uint _3763;
uint _3765;
uint _3767;
bool _3895;
bool _3921;
if (0.0f < _1355)
{
uint _1359 = _127 & 4294967040u;
uint64_t _1364 = (uint64_t(_127) | (uint64_t(_132 & 65535u) << 32ull)) >> 8ull;
uint _1368 = _132 & 255u;
float _1369 = mad(_1354, _1158, _503);
float _1370 = mad(_1354, _1135, _498);
float _1371 = mad(_1354, _1181, _519);
_66[_1234] = 4294967295u;
bool _1391 = ((((((0.0f <= _1355) && (!(isnan(_1369) || isnan(_1369)))) && (!(isnan(_1370) || isnan(_1370)))) && (!(isnan(_1371) || isnan(_1371)))) && _1257) && _1262) && _1267;
if (_1391)
{
RayDesc _10ident = {float3(_1369, _1370, _1371), 0.0f, float3(_1158, _1135, _1181), _1355};
// Site 3 (console entry 0x2020): structure view 0, flags RAY_FLAG_FORCE_NON_OPAQUE, mask 0x48; its candidate body runs in the Proceed() loop; told by the diagnostics build's counters.
_1372.TraceRayInline(_48, 2u, 72u, _10ident);
}
uint _1396;
uint _1398;
uint _1400;
uint _1402;
_1396 = _1273;
_1398 = _1275;
_1400 = _1279;
_1402 = _1281;
uint _1399;
uint _1397;
uint _1401;
uint _1403;
site23_count = 0u;
for (;;)
{
bool _1405;
if (_1391)
{
bool _1404 = _1372.Proceed();
_1405 = _1404;
}
else
{
_1405 = false;
}
if (!(0u != uint(_1405)))
{
break;
}
// The title's stop (console 0x2020 counts, 0x21e4 compares): as
// site 2's, from 0 again (0x2000).
site23_count = site23_count + 1u;
if (!(site23_count < 65535u))
{
_1372.Abort();
break;
}
float _1577 = _1372.CandidateTriangleRayT();
bool _1578 = _1372.CandidateTriangleFrontFace();
uint _1579 = asuint(_1577);
uint _1581 = _1372.CandidateInstanceID();
uint _1582 = _1372.CandidateInstanceContributionToHitGroupIndex();
uint _1583 = _1372.CandidateGeometryIndex();
uint _1587 = _1368 + uint(_1359 < 0u);
uint _1591 = (((_1583 << 8u) >> 8u) + (16777215u & _1582)) * 116u;
uint _1605 = _1591 + shift_4_416;
uint _1615 = asuint(asfloat(raw_4_416.Load<uint>((min(_1605, 2147483584u) >> 2u) * 4 + 0)));
bool _1617 = 0u == (4096u & _1615);
uint _1688;
if (_1617)
{
bool _1619 = 0u == (2048u & _1615);
uint _1676;
uint _1677;
if (_1619)
{
uint _1620 = 245760u & _1615;
bool _1621 = 0u == _1620;
uint _1671;
uint _1672;
if (_1621)
{
uint _1622 = _1591 + 4u;
uint _1636 = _1622 + shift_4_416;
uint _1647 = 512u & _1615;
bool _1649 = 254u == (_1578 ? 254u : 255u);
bool _1650 = 0u == _1647;
bool _1652 = 1u == (1u & (_1615 >> 8u));
uint _1658 = (_1649 || (_1652 || (0u != ((asuint(asfloat(raw_4_416.Load<uint>((min(_1636, 2147483584u) >> 2u) * 4 + 0))) & 4u) | _1647)))) ? 1176256512u : _1579;
uint _1665 = _1400 | _1658;
_1671 = (_1649 ? _1650 : (_1650 && _1652)) ? 4294967295u : 0u;
_1672 = asuint(((_1665 & 2147483647u) == 0u) ? asfloat(_1665) : min(asfloat(_1400), asfloat(_1658)));
}
else
{
_1671 = _1620;
_1672 = _1359;
}
bool _1673 = !_1621;
_1676 = _1673 ? 0u : _1671;
_1677 = _1673 ? _1400 : _1672;
}
else
{
_1676 = _1587;
_1677 = _1359;
}
uint _3717;
uint _3718;
uint _3719;
uint _3720;
if (_1619)
{
_3717 = _1396;
_3718 = _1677;
_3719 = _1402;
_3720 = _1676;
}
else
{
uint _1682;
uint _1683;
if (_1577 < asfloat(_1402))
{
_1682 = 1u + (1023u & _1581);
_1683 = _1579;
}
else
{
_1682 = _1396;
_1683 = _1402;
}
_3717 = _1682;
_3718 = _1400;
_3719 = _1683;
_3720 = 0u;
}
_1397 = _3717;
_1401 = _3718;
_1403 = _3719;
_1688 = _3720;
}
else
{
_1397 = _1396;
_1401 = _1400;
_1403 = _1402;
_1688 = _1587;
}
bool _1689 = !_1617;
uint _1692 = _1398 | _1579;
_1399 = _1689 ? asuint(((_1692 & 2147483647u) == 0u) ? asfloat(_1692) : min(asfloat(_1398), _1577)) : _1398;
if ((_1689 ? 0u : _1688) == 4294967295u)
{
_1372.CommitNonOpaqueTriangleHit();
}
_1396 = _1397;
_1398 = _1399;
_1400 = _1401;
_1402 = _1403;
}
uint _3732;
uint _3734;
uint _3736;
uint _3738;
uint _3740;
uint _3742;
uint _3744;
uint _3746;
uint _3748;
uint _3750;
uint _3752;
uint _3754;
uint _3756;
uint _3758;
uint _3760;
uint _3762;
uint _3764;
uint _3766;
bool _3920;
{
bool _1421;
float _1422;
bool _1423;
float _1424;
float _1425;
uint _1426;
uint _1427;
uint _1428;
uint _1429;
if (_1391)
{
uint _1408 = _1372.CommittedStatus();
float _1410 = _1372.CommittedRayT();
bool _1411 = _1372.CommittedTriangleFrontFace();
float2 _1412 = _1372.CommittedTriangleBarycentrics();
float2 _1414 = _1372.CommittedTriangleBarycentrics();
uint _1416 = _1372.CommittedInstanceContributionToHitGroupIndex();
uint _1417 = _1372.CommittedInstanceIndex();
uint _1418 = _1372.CommittedGeometryIndex();
uint _1420 = _1372.CommittedPrimitiveIndex();
_1421 = _1408 == 1u;
_1422 = _1410;
_1423 = _1411;
_1424 = _1412.x;
_1425 = _1414.y;
_1426 = _1416;
_1427 = _1417;
_1428 = _1418 << 8u;
_1429 = _1420;
}
else
{
_1421 = false;
_1422 = 0.0f;
_1423 = false;
_1424 = 0.0f;
_1425 = 0.0f;
_1426 = 0u;
_1427 = 0u;
_1428 = 0u;
_1429 = 0u;
}
uint _1438 = uint(_1421);
_3732 = _1421 ? asuint(_1425) : _1329;
_3734 = _1421 ? asuint(_1424) : _1328;
_3736 = _1396;
_3738 = _1398;
_3740 = 1u;
_3742 = _1400;
_3744 = _1421 ? (_1423 ? 254u : 255u) : _1327;
_3746 = _1402;
_3748 = _1438;
_3750 = _1421 ? asuint(_1422) : asuint(_1355);
_3752 = _1353;
_3754 = 4u & _1438;
_3756 = uint(_1364);
_3758 = uint(_1364 >> 32ull);
_3760 = _1421 ? _1426 : 0u;
_3762 = _1421 ? _1427 : 0u;
_3764 = _1421 ? _1428 : 0u;
_3766 = _1421 ? _1429 : 0u;
_3920 = true;
}
_3733 = _3732;
_3735 = _3734;
_3737 = _3736;
_3739 = _3738;
_3741 = _3740;
_3743 = _3742;
_3745 = _3744;
_3747 = _3746;
_3749 = _3748;
_3751 = _3750;
_3753 = _3752;
_3755 = _3754;
_3757 = _3756;
_3759 = _3758;
_3761 = _3760;
_3763 = _3762;
_3765 = _3764;
_3767 = _3766;
_3895 = false;
_3921 = _3920;
}
else
{
_3733 = _1329;
_3735 = _1328;
_3737 = _1273;
_3739 = _1275;
_3741 = 0u;
_3743 = _1279;
_3745 = _1327;
_3747 = _1281;
_3749 = _1325;
_3751 = _1326;
_3753 = _1353;
_3755 = _1333;
_3757 = _1230;
_3759 = _1232;
_3761 = _1320;
_3763 = _1321;
_3765 = _1322;
_3767 = _1323;
_3895 = false;
_3921 = true;
}
_1444 = _3733;
_1445 = _3735;
_1446 = _3737;
_1447 = _3739;
_1448 = _3741;
_1449 = _3743;
_1450 = _3745;
_1451 = _3747;
_1452 = _3749;
_1453 = _3751;
_1454 = _3753;
_1455 = _3755;
_1456 = _3757;
_1457 = _3759;
_1458 = _3761;
_1459 = _3763;
_1460 = _3765;
_1461 = _3767;
_3896 = _3895;
_3559 = _3921;
}
else
{
_1444 = _1329;
_1445 = _1328;
_1446 = _1273;
_1447 = _1275;
_1448 = 0u;
_1449 = _1279;
_1450 = _1327;
_1451 = _1281;
_1452 = _1325;
_1453 = _1326;
_1454 = 0u;
_1455 = _1333;
_1456 = _1230;
_1457 = _1232;
_1458 = _1320;
_1459 = _1321;
_1460 = _1322;
_1461 = _1323;
_3896 = false;
_3559 = true;
}
uint _3584;
uint _3591;
uint _3598;
uint _3605;
uint _3612;
uint _3619;
uint _3626;
uint _3633;
uint _3640;
uint _3647;
uint _3654;
uint _3661;
uint _3668;
uint _3675;
uint _3682;
uint _3689;
uint _3696;
bool _3914;
if (_3559)
{
float _1464 = asfloat(_1453);
bool _1467 = 0u != _1452;
uint _1468 = uint(asfloat(_1447) <= _1464);
// The count of site 2 or 3 past 0xfffe counts as a hit (0x2a20, 0x2a30),
// and the ray then takes the nearest back face for its result (0x2a94).
bool _1470 = (65534u < site23_count) || (0u != (_1467 ? ((4u > _1455) ? 1u : 2u) : 0u));
uint _1558;
uint _1559;
uint _1560;
uint _1561;
uint _1562;
uint _1563;
uint _1564;
uint _1565;
uint _1566;
uint _1567;
uint _1568;
if (!_1470)
{
_1558 = _1446;
_1559 = _1447;
_1560 = _1449;
_1561 = 0u;
_1562 = _1450;
_1563 = _1451;
_1564 = _1452;
_1565 = _1452;
_1566 = _1456;
_1567 = _499;
_1568 = _1109;
}
else
{
uint64_t _1477 = (uint64_t(_1456) | (uint64_t(_1457) << 32ull)) << 8ull;
uint _1480 = uint(_1477 >> 32ull);
float _1481 = asfloat(_1449);
precise float _1482 = 9.9999997473787516355514526367188e-05f + _1481;
uint64_t _1484 = uint64_t(_1452 >> 3u) << 6ull;
uint _1485 = uint(_1484);
uint _1487 = uint(_1484 >> 32ull);
bool _1489 = (65534u < site23_count) || (_1464 > _1482);
bool _1492 = !_1467;
bool _1493 = _1467 ? _1492 : true;
uint _1500;
uint _1501;
uint _1502;
if (_1493)
{
_1500 = 0u;
_1501 = _499;
_1502 = _1109;
}
else
{
_1500 = _1460 >> 8u;
_1501 = _1487 + uint(_1467 && (_1467 && (_1485 < 0u)));
_1502 = _1485;
}
uint _1503 = _1500 + (16777215u & _1458);
uint _1514;
uint _1515;
uint _1516;
if (_1467 ? (_1489 || _1492) : true)
{
_1514 = _1489 ? 1023u : 0u;
_1515 = _1501;
_1516 = _1502;
}
else
{
_1514 = _1460 >> 8u;
_1515 = _1487 + uint(_1467 && (_1489 ? false : (_1467 && (_1485 < 0u))));
_1516 = _1485;
}
uint _1518 = _1453 | _1449;
uint _1527 = _1489 ? 0u : _1450;
float _1530 = asfloat(_1454);
precise float _1531 = asfloat(_1489 ? asuint(((_1518 & 2147483647u) == 0u) ? asfloat(_1518) : min(_1464, _1481)) : _1446) + _1530;
uint _1533 = _1489 ? asuint(_1531) : _1446;
uint _3721;
uint _3722;
uint _3723;
uint _3724;
uint _3725;
uint _3727;
uint _3728;
uint _3729;
uint _3730;
uint _3731;
if (_1489)
{
_3721 = _1533;
_3722 = _1514;
_3723 = _1489 ? 4294967295u : _1449;
_3724 = _1489 ? 4294967295u : 0u;
_3725 = _1527;
_3727 = _1489 ? 0u : _1452;
_3728 = _1503;
_3729 = _1480;
_3730 = _1515;
_3731 = _1516;
}
else
{
uint _1534 = 112u | uint(_1477);
uint _1541;
if (_1493)
{
_1541 = 4294967295u;
}
else
{
_1541 = _1461;
}
precise float _1549 = _1464 + _1530;
_3721 = asuint(_1549);
_3722 = _1514;
_3723 = 65535u & _1459;
_3724 = _1541;
_3725 = uint(254u == _1527);
_3727 = (asfloat(_1451) <= _1464) ? (130048u & (_1533 << 10u)) : 0u;
_3728 = _1503;
_3729 = (_1487 + (255u & _1480)) + uint((_1534 + _1485) < _1534);
_3730 = _1515;
_3731 = _1516;
}
_1558 = _3721;
_1559 = _3722;
_1560 = _3723;
_1561 = _3724;
_1562 = _3725;
_1563 = 1u;
_1564 = _3727;
_1565 = _3728;
_1566 = _3729;
_1567 = _3730;
_1568 = _3731;
}
uint _3583;
uint _3590;
uint _3597;
uint _3604;
uint _3611;
uint _3618;
uint _3625;
uint _3632;
uint _3639;
uint _3646;
uint _3653;
uint _3660;
uint _3667;
uint _3674;
uint _3681;
uint _3688;
uint _3695;
if (_1470)
{
_3583 = _1444;
_3590 = _1445;
_3597 = _1337;
_3604 = _1558;
_3611 = _1559;
_3618 = _1448;
_3625 = _1560;
_3632 = _1468;
_3639 = _1561;
_3646 = _1562;
_3653 = _1563;
_3660 = _1564;
_3667 = _1565;
_3674 = _1334;
_3681 = _1566;
_3688 = _1567;
_3695 = _1568;
}
else
{
float _1569 = asfloat(_1560);
bool _1570 = 10000.0f > _1569;
precise float _1572 = asfloat(_1454) + _1569;
_3583 = 0u;
_3590 = 0u;
_3597 = _1337;
_3604 = _1570 ? asuint(_1572) : 3212836864u;
_3611 = _1570 ? 1023u : 4294967295u;
_3618 = 0u;
_3625 = 4294967295u;
_3632 = _1468;
_3639 = 4294967295u;
_3646 = 0u;
_3653 = uint(_1570);
_3660 = 0u;
_3667 = 4294967295u;
_3674 = _1334;
_3681 = _1566;
_3688 = _1567;
_3695 = _1568;
}
_3584 = _3583;
_3591 = _3590;
_3598 = _3597;
_3605 = _3604;
_3612 = _3611;
_3619 = _3618;
_3626 = _3625;
_3633 = _3632;
_3640 = _3639;
_3647 = _3646;
_3654 = _3653;
_3661 = _3660;
_3668 = _3667;
_3675 = _3674;
_3682 = _3681;
_3689 = _3688;
_3696 = _3695;
_3914 = true;
}
else
{
_3584 = _291;
_3591 = _291;
_3598 = _291;
_3605 = _291;
_3612 = _291;
_3619 = _291;
_3626 = _291;
_3633 = _291;
_3640 = _291;
_3647 = _291;
_3654 = _291;
_3661 = _291;
_3668 = _291;
_3675 = _291;
_3682 = _291;
_3689 = _291;
_3696 = _291;
_3914 = false;
}
_3585 = _3584;
_3592 = _3591;
_3599 = _3598;
_3606 = _3605;
_3613 = _3612;
_3620 = _3619;
_3627 = _3626;
_3634 = _3633;
_3641 = _3640;
_3648 = _3647;
_3655 = _3654;
_3662 = _3661;
_3669 = _3668;
_3676 = _3675;
_3683 = _3682;
_3690 = _3689;
_3697 = _3696;
_3897 = _3896;
_3915 = _3914;
}
_3586 = _3585;
_3593 = _3592;
_3600 = _3599;
_3607 = _3606;
_3614 = _3613;
_3621 = _3620;
_3628 = _3627;
_3635 = _3634;
_3642 = _3641;
_3649 = _3648;
_3656 = _3655;
_3663 = _3662;
_3670 = _3669;
_3677 = _3676;
_3684 = _3683;
_3691 = _3690;
_3698 = _3697;
_3898 = _3897;
_3916 = _3915;
}
_3587 = _3586;
_3594 = _3593;
_3601 = _3600;
_3608 = _3607;
_3615 = _3614;
_3622 = _3621;
_3629 = _3628;
_3636 = _3635;
_3643 = _3642;
_3650 = _3649;
_3657 = _3656;
_3664 = _3663;
_3671 = _3670;
_3678 = _3677;
_3685 = _3684;
_3692 = _3691;
_3699 = _3698;
_3899 = _3898;
_3917 = _3916;
}
_3588 = _3587;
_3595 = _3594;
_3602 = _3601;
_3609 = _3608;
_3616 = _3615;
_3623 = _3622;
_3630 = _3629;
_3637 = _3636;
_3644 = _3643;
_3651 = _3650;
_3658 = _3657;
_3665 = _3664;
_3672 = _3671;
_3679 = _3678;
_3686 = _3685;
_3693 = _3692;
_3700 = _3699;
_3900 = _3899;
_3918 = _3917;
}
_3589 = _3588;
_3596 = _3595;
_3603 = _3602;
_3610 = _3609;
_3617 = _3616;
_3624 = _3623;
_3631 = _3630;
_3638 = _3637;
_3645 = _3644;
_3652 = _3651;
_3659 = _3658;
_3666 = _3665;
_3673 = _3672;
_3680 = _3679;
_3687 = _3686;
_3694 = _3693;
_3701 = _3700;
_3901 = _3900;
_3919 = _3918;
}
_1861 = _3589;
_1862 = _3596;
_1863 = _3603;
_1864 = _3610;
_1865 = _3617;
_1866 = _3624;
_1867 = _3631;
_1868 = _3638;
_1869 = _3645;
_1870 = _3652;
_1871 = _3659;
_1872 = _3666;
_1873 = _3673;
_1874 = _3680;
_1875 = _3687;
_1876 = _3694;
_1877 = _3701;
_3902 = _3901;
_3555 = _3919;
}
bool _3906;
if (_3555)
{
bool _1878 = 0u == _1871;
bool _1879 = 1023u == _1865;
uint _2933;
uint _2934;
uint _2935;
if (_1878 ? false : (!_1879))
{
_2933 = _1870;
_2934 = _1873;
_2935 = _1874;
}
else
{
uint _2789;
uint _2791;
uint _2792;
uint _2793;
uint _2794;
uint _2795;
if (_1878)
{
uint _3574;
uint _3576;
uint _3580;
uint _3582;
if (1u == (1u & (_1874 >> 14u)))
{
uint _1888 = (16383u & _1874) * 116u;
uint _1902 = _1888 + shift_4_416;
uint _3573;
uint _3575;
uint _3579;
uint _3581;
if (1u == (1u & (asuint(asfloat(raw_4_416.Load<uint>((_1902 >> 2u) * 4 + 0))) >> 16u)))
{
uint _1916 = _1888 + 12u;
uint _1931 = _1916 + shift_4_416;
uint _1942 = _1888 + 16u;
uint _1943 = _1942 + shift_4_416;
uint _1959 = min(((asuint(asfloat(raw_4_416.Load<uint>((_1931 >> 2u) * 4 + 0))) << 5u) >> 5u), TITLE_LIMIT);
uint _1961 = _1959;
uint _1965 = min((min(_1959, 2097151u) << 2u), 2147483584u);
uint _1972 = asuint(asfloat(view_shifts.Load<uint>((_1965 >> 2u) * 4 + 0))) >> 2u;
float2 _1980 = asfloat(uint2(heap_ByteAddressBuffer(NonUniformResourceIndex(_1961)).Load<uint>(_1972 * 4 + 0), heap_ByteAddressBuffer(NonUniformResourceIndex(_1961)).Load<uint>((_1972 + 1u) * 4 + 0)));
uint _1992 = ((asuint(_1980.x) << 4u) & 2097136u) | 12u;
uint _1993 = _1992 + (262140u & (_1874 >> 13u));
uint _1998 = asuint(asfloat(view_shifts.Load<uint>((_1965 >> 2u) * 4 + 0)));
uint _1999 = _1993 + _1998;
uint _2007 = asuint(asfloat(heap_ByteAddressBuffer(NonUniformResourceIndex(_1961)).Load<uint>((_1999 >> 2u) * 4 + 0)));
uint _2016 = asuint(asfloat(view_shifts.Load<uint>((_1965 >> 2u) * 4 + 0)));
uint _2017 = 12u + (32752u & (_2007 >> 17u));
uint _2018 = _2017 + _2016;
uint _2022 = _2018 >> 2u;
float2 _2029 = asfloat(uint2(heap_ByteAddressBuffer(NonUniformResourceIndex(_1961)).Load<uint>(_2022 * 4 + 0), heap_ByteAddressBuffer(NonUniformResourceIndex(_1961)).Load<uint>((_2022 + 1u) * 4 + 0)));
uint _2044 = (_1992 + (asuint(_1980.y) << 2u)) + ((((asuint(_2029.x) << 2u) & 65536u) | (65535u & asuint(_2029.y))) << 1u);
uint _2045 = _2044 + (254u & (_2007 << 1u));
uint _2046 = 2147483644u & _2045;
uint _2052 = asuint(asfloat(view_shifts.Load<uint>((_1965 >> 2u) * 4 + 0)));
uint _2053 = _2046 + _2052;
uint _2061 = asuint(asfloat(heap_ByteAddressBuffer(NonUniformResourceIndex(_1961)).Load<uint>((min(_2053, 2147483584u) >> 2u) * 4 + 0)));
uint _2068 = _2044 + (254u & (_2007 >> 6u));
uint _2071 = 2147483644u & _2068;
uint _2076 = asuint(asfloat(view_shifts.Load<uint>((_1965 >> 2u) * 4 + 0)));
uint _2077 = _2071 + _2076;
uint _2085 = asuint(asfloat(heap_ByteAddressBuffer(NonUniformResourceIndex(_1961)).Load<uint>((min(_2077, 2147483584u) >> 2u) * 4 + 0)));
uint _2092 = _2044 + (254u & (_2007 >> 13u));
uint _2094 = 2147483644u & _2092;
uint _2100 = asuint(asfloat(view_shifts.Load<uint>((_1965 >> 2u) * 4 + 0)));
uint _2101 = _2094 + _2100;
uint _2109 = asuint(asfloat(heap_ByteAddressBuffer(NonUniformResourceIndex(_1961)).Load<uint>((min(_2101, 2147483584u) >> 2u) * 4 + 0)));
uint _2110 = _1888 + 108u;
uint _2125 = _2110 + shift_4_416;
uint _2137 = asuint(asfloat(raw_4_416.Load<uint>((_2125 >> 2u) * 4 + 0))) * 48u;
uint slot_4_1152 = asuint(asfloat(table_lists.Load<uint>(((_124 + 1152u) >> 5u) << 2u)));
uint shift_4_1152 = asuint(asfloat(view_shifts.Load<uint>((min((min(slot_4_1152, 2097151u) << 2u), 2147483584u) >> 2u) * 4 + 0)));
uint _2151 = _2137 + shift_4_1152;
uint _2170 = min(((asuint(asfloat(raw_4_416.Load<uint>((_1943 >> 2u) * 4 + 0))) << 5u) >> 5u), TITLE_LIMIT);
uint _2171 = _2170;
uint _2175 = min((min(_2170, 2097151u) << 2u), 2147483584u);
uint _2180 = asuint(asfloat(view_shifts.Load<uint>((_2175 >> 2u) * 4 + 0)));
uint _2181 = 12u + _2180;
uint _2189 = asuint(asfloat(heap_ByteAddressBuffer(NonUniformResourceIndex(_2171)).Load<uint>((_2181 >> 2u) * 4 + 0)));
uint _2191 = _2189 >> 7u;
uint _2192 = 15u & _2189;
uint _2195 = 33554428u & _2191;
bool _2197 = 2u == _2192;
uint _2199 = ((60u & (_2189 >> 3u)) << 8u) >> 8u;
uint _2201 = (((1u == (1u & (_2045 >> 1u))) ? (_2061 >> 16u) : (65535u & _2061)) << 8u) >> 8u;
uint _2203 = (_2199 * _2201) + _2195;
uint _2225;
uint _2226;
if (_2197)
{
uint _2208 = asuint(asfloat(view_shifts.Load<uint>((_2175 >> 2u) * 4 + 0)));
uint _2209 = _2203 + _2208;
uint _2213 = _2209 >> 2u;
float2 _2220 = asfloat(uint2(heap_ByteAddressBuffer(NonUniformResourceIndex(_2171)).Load<uint>(_2213 * 4 + 0), heap_ByteAddressBuffer(NonUniformResourceIndex(_2171)).Load<uint>((_2213 + 1u) * 4 + 0)));
_2225 = asuint(_2220.x);
_2226 = asuint(_2220.y);
}
else
{
_2225 = _2191;
_2226 = _2192;
}
uint _2281;
uint _2282;
uint _2283;
if (_2197)
{
_2281 = _2225;
_2282 = _2226;
_2283 = _1875;
}
else
{
uint _2231 = asuint(asfloat(view_shifts.Load<uint>((_2175 >> 2u) * 4 + 0)));
uint _2232 = 124u + _2231;
float _2240 = asfloat(heap_ByteAddressBuffer(NonUniformResourceIndex(_2171)).Load<uint>((_2232 >> 2u) * 4 + 0));
uint _2245 = asuint(asfloat(view_shifts.Load<uint>((_2175 >> 2u) * 4 + 0)));
uint _2246 = _2203 + _2245;
uint _2254 = asuint(asfloat(heap_ByteAddressBuffer(NonUniformResourceIndex(_2171)).Load<uint>((_2246 >> 2u) * 4 + 0)));
precise float _2259 = float(int(uint(int((_2254 & 65535u) << 16u) >> int(16u)))) / 32767.0f;
float _2261 = max(_2259, -1.0f);
precise float _2268 = float(int(uint(int(((_2254 >> 16u) & 65535u) << 16u) >> int(16u)))) / 32767.0f;
float _2269 = max(_2268, -1.0f);
precise float _2270 = _2261 * _2240;
bool _2272 = _2240 == 0.0f;
precise float _2276 = _2269 * _2240;
_2281 = asuint(((_2261 == 0.0f) || _2272) ? 0.0f : _2270);
_2282 = asuint(((_2269 == 0.0f) || _2272) ? 0.0f : _2276);
_2283 = asuint(_2261);
}
uint _2285 = (((1u == (1u & (_2068 >> 1u))) ? (_2085 >> 16u) : (65535u & _2085)) << 8u) >> 8u;
uint _2287 = (_2199 * _2285) + _2195;
uint _2309;
uint _2310;
if (_2197)
{
uint _2292 = asuint(asfloat(view_shifts.Load<uint>((_2175 >> 2u) * 4 + 0)));
uint _2293 = _2287 + _2292;
uint _2297 = _2293 >> 2u;
float2 _2304 = asfloat(uint2(heap_ByteAddressBuffer(NonUniformResourceIndex(_2171)).Load<uint>(_2297 * 4 + 0), heap_ByteAddressBuffer(NonUniformResourceIndex(_2171)).Load<uint>((_2297 + 1u) * 4 + 0)));
_2309 = asuint(_2304.x);
_2310 = asuint(_2304.y);
}
else
{
_2309 = _1876;
_2310 = _1877;
}
uint _2363;
uint _2364;
uint _2365;
if (_2197)
{
_2363 = _2283;
_2364 = _2309;
_2365 = _2310;
}
else
{
uint _2315 = asuint(asfloat(view_shifts.Load<uint>((_2175 >> 2u) * 4 + 0)));
uint _2316 = 124u + _2315;
float _2323 = asfloat(heap_ByteAddressBuffer(NonUniformResourceIndex(_2171)).Load<uint>((_2316 >> 2u) * 4 + 0));
uint _2329 = asuint(asfloat(view_shifts.Load<uint>((_2175 >> 2u) * 4 + 0)));
uint _2330 = _2287 + _2329;
uint _2338 = asuint(asfloat(heap_ByteAddressBuffer(NonUniformResourceIndex(_2171)).Load<uint>((_2330 >> 2u) * 4 + 0)));
precise float _2343 = float(int(uint(int((_2338 & 65535u) << 16u) >> int(16u)))) / 32767.0f;
float _2344 = max(_2343, -1.0f);
precise float _2350 = float(int(uint(int(((_2338 >> 16u) & 65535u) << 16u) >> int(16u)))) / 32767.0f;
float _2351 = max(_2350, -1.0f);
precise float _2352 = _2344 * _2323;
bool _2354 = _2323 == 0.0f;
precise float _2358 = _2351 * _2323;
_2363 = asuint(_2323);
_2364 = asuint(((_2344 == 0.0f) || _2354) ? 0.0f : _2352);
_2365 = asuint(((_2351 == 0.0f) || _2354) ? 0.0f : _2358);
}
precise float _2368 = asfloat(_2364) + asfloat(_2281);
precise float _2371 = asfloat(_2365) + asfloat(_2282);
uint _2373 = (((1u == (1u & (_2092 >> 1u))) ? (_2109 >> 16u) : (65535u & _2109)) << 8u) >> 8u;
uint _2375 = (_2199 * _2373) + _2195;
uint _2397;
uint _2398;
if (_2197)
{
uint _2380 = asuint(asfloat(view_shifts.Load<uint>((_2175 >> 2u) * 4 + 0)));
uint _2381 = _2375 + _2380;
uint _2385 = _2381 >> 2u;
float2 _2392 = asfloat(uint2(heap_ByteAddressBuffer(NonUniformResourceIndex(_2171)).Load<uint>(_2385 * 4 + 0), heap_ByteAddressBuffer(NonUniformResourceIndex(_2171)).Load<uint>((_2385 + 1u) * 4 + 0)));
_2397 = asuint(_2392.x);
_2398 = asuint(_2392.y);
}
else
{
_2397 = _2287;
_2398 = _2363;
}
uint _2450;
uint _2451;
if (_2197)
{
_2450 = _2397;
_2451 = _2398;
}
else
{
uint _2403 = asuint(asfloat(view_shifts.Load<uint>((_2175 >> 2u) * 4 + 0)));
uint _2404 = 124u + _2403;
float _2411 = asfloat(heap_ByteAddressBuffer(NonUniformResourceIndex(_2171)).Load<uint>((_2404 >> 2u) * 4 + 0));
uint _2416 = asuint(asfloat(view_shifts.Load<uint>((_2175 >> 2u) * 4 + 0)));
uint _2417 = _2375 + _2416;
uint _2425 = asuint(asfloat(heap_ByteAddressBuffer(NonUniformResourceIndex(_2171)).Load<uint>((_2417 >> 2u) * 4 + 0)));
precise float _2430 = float(int(uint(int((_2425 & 65535u) << 16u) >> int(16u)))) / 32767.0f;
float _2431 = max(_2430, -1.0f);
precise float _2437 = float(int(uint(int(((_2425 >> 16u) & 65535u) << 16u) >> int(16u)))) / 32767.0f;
float _2438 = max(_2437, -1.0f);
precise float _2439 = _2431 * _2411;
bool _2441 = _2411 == 0.0f;
precise float _2445 = _2438 * _2411;
_2450 = asuint(((_2431 == 0.0f) || _2441) ? 0.0f : _2439);
_2451 = asuint(((_2438 == 0.0f) || _2441) ? 0.0f : _2445);
}
uint _2452 = _1888 + 52u;
uint _2466 = _2452 + shift_4_416;
precise float _2483 = _2368 + asfloat(_2450);
precise float _2485 = _2371 + asfloat(_2451);
precise float _2486 = 0.3333333432674407958984375f * _2483;
precise float _2490 = 0.3333333432674407958984375f * _2485;
float4 _2503 = heap_Texture2D_float4(NonUniformResourceIndex(min(((asuint(asfloat(raw_4_416.Load<uint>((min(_2466, 2147483584u) >> 2u) * 4 + 0))) << 5u) >> 5u), TITLE_LIMIT))).SampleLevel(_62, float2((_2483 == 0.0f) ? 0.0f : _2486, (_2485 == 0.0f) ? 0.0f : _2490), 0.0f);
float _2505 = _2503.x;
float _2506 = _2503.y;
float _2507 = _2503.z;
uint hslot_4_1152 = min(slot_4_1152, NULL_SLOT);
ByteAddressBuffer raw_4_1152 = heap_ByteAddressBuffer(hslot_4_1152);
uint _2508 = (65535u & asuint(asfloat(raw_4_1152.Load<uint>((min(((_2151 < shift_4_1152) ? _2137 : _2151), 2147483584u) >> 2u) * 4 + 0)))) * 8u;
uint slot_4_928 = asuint(asfloat(table_lists.Load<uint>(((_124 + 928u) >> 5u) << 2u)));
uint shift_4_928 = asuint(asfloat(view_shifts.Load<uint>((min((min(slot_4_928, 2097151u) << 2u), 2147483584u) >> 2u) * 4 + 0)));
uint _2522 = _2508 + shift_4_928;
uint hslot_4_928 = min(slot_4_928, NULL_SLOT);
ByteAddressBuffer raw_4_928 = heap_ByteAddressBuffer(hslot_4_928);
float _2531 = asfloat(raw_4_928.Load<uint>((_2522 >> 2u) * 4 + 0));
uint _2563;
if (0.0f > _2531)
{
uint _2534 = _1888 + 112u;
uint _2548 = _2534 + shift_4_416;
_2563 = asuint(spvUnpackHalf2x16(asuint(asfloat(raw_4_416.Load<uint>((_2548 >> 2u) * 4 + 0))) & 65535u).x);
}
else
{
_2563 = asuint(_2531);
}
uint _2568 = asuint(asfloat(view_shifts.Load<uint>((_2175 >> 2u) * 4 + 0)));
uint _2569 = 4u + _2568;
uint _2577 = asuint(asfloat(heap_ByteAddressBuffer(NonUniformResourceIndex(_2171)).Load<uint>((_2569 >> 2u) * 4 + 0)));
uint _2581 = 33554428u & (_2577 >> 7u);
uint _2583 = ((60u & (_2577 >> 3u)) << 8u) >> 8u;
uint _2585 = (_2583 * _2201) + _2581;
uint _2590 = asuint(asfloat(view_shifts.Load<uint>((_2175 >> 2u) * 4 + 0)));
uint _2591 = _2585 + _2590;
uint _2604 = (_2583 * _2285) + _2581;
uint _2609 = asuint(asfloat(view_shifts.Load<uint>((_2175 >> 2u) * 4 + 0)));
uint _2610 = _2604 + _2609;
uint _2623 = (_2583 * _2373) + _2581;
uint _2628 = asuint(asfloat(view_shifts.Load<uint>((_2175 >> 2u) * 4 + 0)));
uint _2629 = _2623 + _2628;
uint _2638 = _1888 + 60u;
uint _2652 = _2638 + shift_4_416;
uint _2666 = asuint(asfloat(raw_4_416.Load<uint>((_2652 >> 2u) * 4 + 0))) << 5u;
uint _2670;
// The lane's own texture (on the console a waterfall loop over the wave's textures).
{
uint _2671 = _2666;
uint _2679_dummy_parameter;
uint _2680 = spvTextureSize(heap_Texture1D_float4(NonUniformResourceIndex(min((_2671 >> 5u), TITLE_LIMIT))), 0u, _2679_dummy_parameter) - 1u;
_2670 = ((_2680 << 30u) >> 30u) | (((_2680 >> 2u) & 16383u) << 2u);
}
uint _2708;
// The lane's own texture (on the console a waterfall loop over the wave's textures).
{
uint _2695 = _2666;
uint _2702;
spvTextureSize(heap_Texture1D_float4(NonUniformResourceIndex(min((_2695 >> 5u), TITLE_LIMIT))), 0u, _2702);
_2708 = ((2147487660u | ((_2702 - 1u) << 16u)) >> 12u) & 15u;
}
uint _2712 = (1u + ((_2670 << 16u) >> 16u)) >> (_2708 & 31u);
uint _2713 = _2712 & 7u;
uint _2715 = uint(asfloat(_2563));
uint _2721 = _2712 >> ((8u - _2713) & 31u);
precise float _2725 = 0.5f + float((asuint(asfloat(heap_ByteAddressBuffer(NonUniformResourceIndex(_2171)).Load<uint>((_2591 >> 2u) * 4 + 0))) >> 16u) & 255u);
uint _2726 = ((_2715 >= _2721) ? (4294967295u + _2721) : _2715) * (256u >> (_2713 & 31u));
uint _2731 = min((_2666 >> 5u), TITLE_LIMIT);
float4 _2734 = heap_Texture1D_float4(NonUniformResourceIndex(_2731)).Load(int2(_2726 + uint(_2725), 0u));
precise float _2738 = 0.5f + float((asuint(asfloat(heap_ByteAddressBuffer(NonUniformResourceIndex(_2171)).Load<uint>((_2610 >> 2u) * 4 + 0))) >> 16u) & 255u);
float4 _2741 = heap_Texture1D_float4(NonUniformResourceIndex(_2731)).Load(int2(_2726 + uint(_2738), 0u));
precise float _2745 = 0.5f + float((asuint(asfloat(heap_ByteAddressBuffer(NonUniformResourceIndex(_2171)).Load<uint>((_2629 >> 2u) * 4 + 0))) >> 16u) & 255u);
precise float _2746 = _2741.x + _2734.x;
precise float _2747 = _2741.y + _2734.y;
precise float _2748 = _2741.z + _2734.z;
float4 _2751 = heap_Texture1D_float4(NonUniformResourceIndex(_2731)).Load(int2(_2726 + uint(_2745), 0u));
precise float _2755 = 0.3333333432674407958984375f * _2505;
float _2757 = (_2505 == 0.0f) ? 0.0f : _2755;
precise float _2758 = _2746 + _2751.x;
precise float _2759 = _2748 + _2751.z;
precise float _2760 = _2747 + _2751.y;
precise float _2761 = 0.3333333432674407958984375f * _2506;
float _2763 = (_2506 == 0.0f) ? 0.0f : _2761;
precise float _2764 = 0.3333333432674407958984375f * _2507;
float _2766 = (_2507 == 0.0f) ? 0.0f : _2764;
precise float _2767 = _2757 * _2758;
precise float _2773 = _2763 * _2760;
precise float _2779 = _2766 * _2759;
_3573 = asuint(((_2766 == 0.0f) || (_2759 == 0.0f)) ? 0.0f : _2779);
_3575 = asuint(((_2763 == 0.0f) || (_2760 == 0.0f)) ? 0.0f : _2773);
_3579 = asuint(((_2757 == 0.0f) || (_2758 == 0.0f)) ? 0.0f : _2767);
_3581 = _1870;
}
else
{
_3573 = 1065353216u;
_3575 = 1065353216u;
_3579 = 1065353216u;
_3581 = _1870;
}
_3574 = _3573;
_3576 = _3575;
_3580 = _3579;
_3582 = _3581;
}
else
{
_3574 = 1065353216u;
_3576 = 1065353216u;
_3580 = 1065353216u;
_3582 = _1870;
}
_2789 = 32768u;
_2791 = _3574;
_2792 = _3576;
_2793 = 1176256512u;
_2794 = _3580;
_2795 = _3582;
}
else
{
_2789 = 0u;
_2791 = 0u;
_2792 = 0u;
_2793 = 0u;
_2794 = 0u;
_2795 = 0u;
}
uint _2811 = 1008u + shift_4_640;
uint _2820 = 1012u + shift_4_640;
uint _2828 = asuint(asfloat(raw_4_640.Load<uint>((_2820 >> 2u) * 4 + 0)));
float _2838 = max(0.0322580635547637939453125f, asfloat(_2791));
float _2846 = max(0.0322580635547637939453125f, asfloat(_2792));
float _2854 = max(0.0322580635547637939453125f, asfloat(_2794));
precise float _2855 = 31.0f * _2838;
precise float _2859 = 31.0f * _2846;
precise float _2862 = 31.0f * _2854;
uint _2870 = (uint(_2859) << 5u) | uint(_2862);
uint _2906 = ((_2828 * _208) + _211) + ((_2828 * _204) * asuint(asfloat(raw_4_640.Load<uint>((_2811 >> 2u) * 4 + 0))));
uint _2910 = (_2906 << 2u) + (_2906 << 1u);
uint slot_5_256 = asuint(asfloat(table_lists.Load<uint>(((_96 + 256u) >> 5u) << 2u)));
uint hslot_5_256 = min(slot_5_256, NULL_SLOT);
RWBuffer<float4> rwbuf_5_256 = heap_RWBuffer_float4(hslot_5_256);
rwbuf_5_256[min(_2910, 134217727u)] = 0.0f.xxxx;
rwbuf_5_256[min((1u | _2910), 134217727u)] = 0.0f.xxxx;
rwbuf_5_256[min((2u + _2910), 134217727u)] = asfloat(255u & _2870).xxxx;
rwbuf_5_256[min((3u + _2910), 134217727u)] = asfloat(((((uint(_2855) << 10u) | _2789) | _2870) >> 8u) & 255u).xxxx;
rwbuf_5_256[min((4u + _2910), 134217727u)] = 0.0f.xxxx;
float _2928 = asfloat(_2793);
uint slot_5_352 = asuint(asfloat(table_lists.Load<uint>(((_96 + 352u) >> 5u) << 2u)));
uint hslot_5_352 = min(slot_5_352, NULL_SLOT);
RWTexture3D<float4> rwtex3_5_352 = heap_RWTexture3D_float4(hslot_5_352);
rwtex3_5_352[uint3(_204, _208, _211)] = float4(_2928, 0.0f, 0.0f, _2928);
rwbuf_5_256[min((5u + _2910), 134217727u)] = 0.0f.xxxx;
_2933 = _2795;
_2934 = _2793;
_2935 = _2793;
}
if (!(_1878 || _1879))
{
uint _2937 = 16383u & _2934;
uint _2938 = _2937 * 116u;
uint _2952 = _2938 + shift_4_416;
if (4290772992u > asuint(asfloat(raw_4_416.Load<uint>((_2952 >> 2u) * 4 + 0))))
{
uint _2986 = _2937 * 4u;
uint slot_5_288 = asuint(asfloat(table_lists.Load<uint>(((_96 + 288u) >> 5u) << 2u)));
uint shift_5_288 = asuint(asfloat(view_shifts.Load<uint>((min((min(slot_5_288, 2097151u) << 2u), 2147483584u) >> 2u) * 4 + 0)));
uint _2987 = _2986 + shift_5_288;
uint _2993;
uint hslot_5_288 = min(slot_5_288, NULL_SLOT);
RWByteAddressBuffer rwraw_5_288 = heap_RWByteAddressBuffer(hslot_5_288);
rwraw_5_288.InterlockedAdd((_2987 >> 2u) * 4 + 0, 1u, _2993);
}
uint slot_5_320 = asuint(asfloat(table_lists.Load<uint>(((_96 + 320u) >> 5u) << 2u)));
uint hslot_5_320 = min(slot_5_320, NULL_SLOT);
RWBuffer<float4> rwbuf_5_320 = heap_RWBuffer_float4(hslot_5_320);
rwbuf_5_320[min(_630, 134217727u)] = asfloat(_2935).xxxx;
}
uint _3140;
bool _3563;
bool _3905;
if (_565 || (_587 || _621))
{
_3140 = 31u;
_3905 = _3902;
_3563 = true;
}
else
{
uint _3567;
bool _3904;
bool _3923;
if ((((516u >> _562) & 1u) != 0u) || ((((516u >> _584) & 1u) != 0u) || (((516u >> _618) & 1u) != 0u)))
{
_3567 = 31u;
_3904 = _3902;
_3923 = true;
}
else
{
_66[(countbits((WaveGetLaneIndex() >= 32u) ? 4294967295u : ((1u << (WaveGetLaneIndex() & 31u)) - 1u)) << 2u) >> 2u] = 4294967295u;
float _3033 = asfloat(_633);
bool _3050 = (((0.0f <= _3033) && (!(isnan(_503) || isnan(_503)))) && (!(isnan(_498) || isnan(_498)))) && (!(isnan(_519) || isnan(_519)));
if (_3050)
{
RayDesc _11ident = {float3(_503, _498, _519), 0.0f, float3(0.0f, 0.0f, 1.0f), _3033};
// Site 4 (console entry 0x3a58): structure view 1, flags RAY_FLAG_CULL_BACK_FACING_TRIANGLES, mask 0x58; its candidate body runs in the Proceed() loop.
_3034.TraceRayInline(_49, 16u, 88u, _11ident);
}
uint _3056;
uint _3058;
_3056 = 1176256512u;
_3058 = 31u;
uint _3057;
uint _3059;
uint site4_count = 0u;
for (;;)
{
bool _3061;
if (_3050)
{
bool _3060 = _3034.Proceed();
_3061 = _3060;
}
else
{
_3061 = false;
}
if (!(0u != uint(_3061)))
{
break;
}
// The title's stop (console 0x3c14 counts, 0x3c1c compares): the count reaching
// 0xffffffff ends the walk; nothing after it reads the count.
site4_count = site4_count + 1u;
if (site4_count == 4294967295u)
{
_3034.Abort();
break;
}
float _3075 = _3034.CandidateTriangleRayT();
uint _3077 = _3034.CandidateInstanceID();
uint _3078 = _3034.CandidateInstanceContributionToHitGroupIndex();
uint _3079 = _3034.CandidateGeometryIndex();
uint _3084 = (((_3079 << 8u) >> 8u) + (16777215u & _3078)) * 116u;
uint _3098 = _3084 + shift_4_416;
uint _3108 = asuint(asfloat(raw_4_416.Load<uint>((min(_3098, 2147483584u) >> 2u) * 4 + 0)));
uint _3109 = 4096u & _3108;
uint _3137;
if (0u == _3109)
{
uint _3111 = 2048u & _3108;
bool _3112 = 0u == _3111;
uint _3132;
uint _3133;
uint _3134;
if (_3112)
{
uint _3113 = 245760u & _3108;
bool _3114 = 0u == _3113;
uint _3126;
uint _3127;
uint _3128;
if (_3114)
{
bool _3120 = !(1u == (1u & (_3108 >> 9u)));
uint _3123;
uint _3124;
if ((_3075 < asfloat(_3056)) ? _3120 : true)
{
_3123 = _3056;
_3124 = _3058;
}
else
{
_3123 = asuint(_3075);
_3124 = 1023u & _3077;
}
_3126 = _3123;
_3127 = _3120 ? 4294967295u : 0u;
_3128 = _3124;
}
else
{
_3126 = _3108;
_3127 = _3113;
_3128 = _3109;
}
uint _3568;
uint _3569;
uint _3570;
if (_3114)
{
_3568 = _3126;
_3569 = _3128;
_3570 = _3127;
}
else
{
_3568 = _3056;
_3569 = _3058;
_3570 = 0u;
}
_3132 = _3568;
_3133 = _3569;
_3134 = _3570;
}
else
{
_3132 = _3056;
_3133 = _3058;
_3134 = _3111;
}
_3057 = _3132;
_3059 = _3133;
_3137 = (!_3112) ? 0u : _3134;
}
else
{
_3057 = _3056;
_3059 = _3058;
_3137 = 0u;
}
if (_3137 == 4294967295u)
{
_3034.CommitNonOpaqueTriangleHit();
}
_3056 = _3057;
_3058 = _3059;
}
uint _3566;
bool _3922;
{
bool _3067;
float _3068;
if (_3050)
{
uint _3064 = _3034.CommittedStatus();
float _3066 = _3034.CommittedRayT();
_3067 = _3064 == 1u;
_3068 = _3066;
}
else
{
_3067 = false;
_3068 = 0.0f;
}
_3566 = (asfloat(_3056) <= asfloat(_3067 ? asuint(_3068) : _633)) ? _3058 : 31u;
_3922 = true;
}
_3567 = _3566;
_3904 = false;
_3923 = _3922;
}
_3140 = _3567;
_3905 = _3904;
_3563 = _3923;
}
if (_3563)
{
if (31u != _3140)
{
uint _3162 = _3140 * 4u;
uint slot_4_480 = asuint(asfloat(table_lists.Load<uint>(((_124 + 480u) >> 5u) << 2u)));
uint shift_4_480 = asuint(asfloat(view_shifts.Load<uint>((min((min(slot_4_480, 2097151u) << 2u), 2147483584u) >> 2u) * 4 + 0)));
uint _3163 = _3162 + shift_4_480;
uint slot_5_224 = asuint(asfloat(table_lists.Load<uint>(((_96 + 224u) >> 5u) << 2u)));
uint hslot_5_224 = min(slot_5_224, NULL_SLOT);
RWBuffer<float4> rwbuf_5_224 = heap_RWBuffer_float4(hslot_5_224);
uint hslot_4_480 = min(slot_4_480, NULL_SLOT);
ByteAddressBuffer raw_4_480 = heap_ByteAddressBuffer(hslot_4_480);
rwbuf_5_224[min(_630, 134217727u)] = asfloat(65535u & asuint(asfloat(raw_4_480.Load<uint>((min(((_3163 < shift_4_480) ? _3162 : _3163), 2147483584u) >> 2u) * 4 + 0)))).xxxx;
}
float _3189 = asfloat(_1862);
precise float _3190 = 2047.0f * _3189;
float _3195 = asfloat(_1861);
precise float _3196 = 2047.0f * _3195;
uint _3203 = _1864 & 2147483647u;
uint _3204 = _3203 - 939524096u;
uint _3211 = ((_3204 + 4095u) + ((_3204 >> 13u) & 1u)) >> 13u;
uint _3218 = _3203 >> 23u;
uint _3219 = 126u - _3218;
uint _3222 = (_3219 > 31u) ? 31u : _3219;
uint _3227 = (_3218 == 0u) ? 0u : ((_3203 & 8388607u) | 8388608u);
uint _3228 = _3227 >> _3222;
uint _3229 = _3222 - 1u;
uint _3283 = (_630 << 1u) + _630;
uint slot_5_192 = asuint(asfloat(table_lists.Load<uint>(((_96 + 192u) >> 5u) << 2u)));
uint hslot_5_192 = min(slot_5_192, NULL_SLOT);
RWBuffer<float4> rwbuf_5_192 = heap_RWBuffer_float4(hslot_5_192);
rwbuf_5_192[min(_3283, 134217727u)] = asfloat((((uint(_3196) << 16u) | ((0u != _1868) ? 32768u : 0u)) | (_1863 << 27u)) | (32767u & ((_1862 & 4294901760u) | ((((_3203 > 2139095040u) ? (((_3203 >> 13u) & 1023u) | 32256u) : ((_3203 < 947912704u) ? (_3228 + (((_3227 >> _3229) & 1u) & (uint((_3227 & ((1u << _3229) - 1u)) != 0u) | (_3228 & 1u)))) : ((_3203 == 2139095040u) ? 31744u : ((_3211 >= 31744u) ? 31744u : _3211)))) | ((_1864 >> 16u) & 32768u)) & 65535u)))).xxxx;
rwbuf_5_192[min((1u + _3283), 134217727u)] = asfloat((_1872 | (1023u & _1865)) | (_1867 << 17u)).xxxx;
rwbuf_5_192[min((2u + _3283), 134217727u)] = asfloat(((((268433408u & (_1869 << 11u)) | ((0u != _1866) ? 536870912u : 0u)) | uint(_3190)) | ((0u != _1871) ? 2147483648u : 0u)) | ((0u != _2933) ? 1073741824u : 0u)).xxxx;
}
_3906 = _3905;
}
else
{
_3906 = _3902;
}
_3549 = _3906;
}
else
{
_3549 = _3892;
}
if (_3549)
{
return;
}
}
}
}
[WaveSize(32)]
[numthreads(32, 1, 1)]
void main(SPIRV_Cross_Input stage_input)
{
gl_WorkGroupID = stage_input.gl_WorkGroupID;
gl_LocalInvocationIndex = stage_input.gl_LocalInvocationIndex;
comp_main();
}