Geometry 5
Geometry 5
Geometry 5
#define CITRA_GLES
#if defined(GL_ANDROID_extension_pack_es31a)
#extension GL_ANDROID_extension_pack_es31a : enable
#endif // defined(GL_ANDROID_extension_pack_es31a)
#if defined(GL_EXT_clip_cull_distance)
#extension GL_EXT_clip_cull_distance : enable
#endif // defined(GL_EXT_clip_cull_distance)
#define mul_s(x, y) (x * y)
#define fma_s(x, y, z) fma(x, y, z)
#define dot_s(x, y) dot(x, y)
#define dot_3(x, y) dot(x, y)
int vtx_idx = 0;
bool prim_emit = false;
bool winding = false;
void SetEmit(int i, bool p, bool w) {
vtx_idx = i;
prim_emit = p;
winding = w;
}
void Emit() {
gs_out_attr[vtx_idx] = vtx_regs;
if (prim_emit) {
if (winding) {
EmitPrim(1,0,2);
winding = false;
} else {
EmitPrim(0,1,2);
}
}
}
void main() {
ExecGS();
}
bvec2 bool_regs = bvec2(false);
ivec3 addr_regs = ivec3(0);
bool Gfn0();
bool Gfn3();
bool Gfn11();
vec4 tmp_reg0;
vec4 tmp_reg1;
vec4 tmp_reg2;
vec4 tmp_reg3;
vec4 tmp_reg5;
vec4 tmp_reg6;
vec4 tmp_reg7;
vec4 tmp_reg11;
vec4 tmp_reg12;
vec4 tmp_reg13;
vec4 tmp_reg14;
vec4 tmp_reg15;
bool ExecGS() {tmp_reg0 = vec4(0, 0, 0, 1);
tmp_reg1 = vec4(0, 0, 0, 1);
tmp_reg2 = vec4(0, 0, 0, 1);
tmp_reg3 = vec4(0, 0, 0, 1);
tmp_reg5 = vec4(0, 0, 0, 1);
tmp_reg6 = vec4(0, 0, 0, 1);
tmp_reg7 = vec4(0, 0, 0, 1);
tmp_reg11 = vec4(0, 0, 0, 1);
tmp_reg12 = vec4(0, 0, 0, 1);
tmp_reg13 = vec4(0, 0, 0, 1);
tmp_reg14 = vec4(0, 0, 0, 1);
tmp_reg15 = vec4(0, 0, 0, 1);
Gfn0();
return true;
}
bool Gfn0() {
uint jmp_to = 60u;
while (true) {
switch (jmp_to) {
case 60u:
bool_regs = lessThan(gs_pica.f[82].zz, vs_out_reg3[0].ww);
if (bool_regs.x) {
jmp_to = 130u; break;
}
tmp_reg1.xy = (tmp_reg15.xxxx).xy;
bool_regs = lessThan(gs_pica.f[81].xx, tmp_reg1.xy);
if (bool_regs.x) {
tmp_reg0 = vs_out_reg3[0].xyzz;
tmp_reg0.w = (gs_pica.f[81].xxxx).w;
tmp_reg0 = mul_s(tmp_reg0, vs_out_reg4[0].wwww);
} else {
tmp_reg0.xyz = (vs_out_reg4[0].xyzz).xyz;
tmp_reg1.xyz = (vs_out_reg3[0].xyzz).xyz;
tmp_reg2.xyz = (mul_s(tmp_reg0.yzxx, tmp_reg1.zxyy)).xyz;
tmp_reg2.xyz = (fma_s(-tmp_reg1.yzxx, tmp_reg0.zxyy, tmp_reg2)).xyz;
tmp_reg2.w = (gs_pica.f[81].xxxx).w;
tmp_reg0.x = dot_s(tmp_reg2, tmp_reg2);
tmp_reg0.x = rsq_s(tmp_reg0.x);
tmp_reg0 = mul_s(tmp_reg2, tmp_reg0.xxxx);
tmp_reg0.xyz = (mul_s(tmp_reg0.xyzz, vs_out_reg4[0].wwww)).xyz;
tmp_reg7.x = (vs_out_reg5[0].zzzz).x;
tmp_reg7.y = (vs_out_reg6[0].zzzz).y;
tmp_reg7.z = (vs_out_reg7[0].zzzz).z;
tmp_reg7.xyz = (mul_s(tmp_reg7.xyzz, tmp_reg15.zzzz)).xyz;
}
bool_regs.x = gs_pica.f[81].xxxx.x == tmp_reg15.wwww.x;
bool_regs.y = gs_pica.f[81].xxxx.y != tmp_reg15.wwww.y;
if (bool_regs.x) {
jmp_to = 97u; break;
}
bool_regs = equal(gs_pica.f[81].zw, tmp_reg15.ww);
if (bool_regs.x) {
jmp_to = 108u; break;
}
if (bool_regs.y) {
jmp_to = 119u; break;
}
tmp_reg6.xyz = (tmp_reg0.xyzz).xyz;
Gfn3();
vtx_regs[2].xy = (vs_out_reg2[0].xyyy).xy;
SetEmit(0, true, false);
Emit();
tmp_reg6.xyz = (-tmp_reg0.xyzz).xyz;
Gfn3();
vtx_regs[2].xy = (vs_out_reg2[0].zwww).xy;
SetEmit(1, true, true);
Emit();
tmp_reg15.w = (gs_pica.f[81].zzzz).w;
return true;
case 97u:
tmp_reg6.xyz = (tmp_reg0.xyzz).xyz;
Gfn3();
vtx_regs[2].xy = (vs_out_reg2[0].xyyy).xy;
SetEmit(0, false, false);
Emit();
tmp_reg6.xyz = (-tmp_reg0.xyzz).xyz;
Gfn3();
vtx_regs[2].xy = (vs_out_reg2[0].zwww).xy;
SetEmit(1, false, false);
Emit();
Gfn11();
return true;
case 108u:
tmp_reg6.xyz = (tmp_reg0.xyzz).xyz;
Gfn3();
vtx_regs[2].xy = (vs_out_reg2[0].xyyy).xy;
SetEmit(2, true, false);
Emit();
tmp_reg6.xyz = (-tmp_reg0.xyzz).xyz;
Gfn3();
vtx_regs[2].xy = (vs_out_reg2[0].zwww).xy;
SetEmit(0, true, true);
Emit();
Gfn11();
return true;
case 119u:
tmp_reg6.xyz = (tmp_reg0.xyzz).xyz;
Gfn3();
vtx_regs[2].xy = (vs_out_reg2[0].xyyy).xy;
SetEmit(1, true, false);
Emit();
tmp_reg6.xyz = (-tmp_reg0.xyzz).xyz;
Gfn3();
vtx_regs[2].xy = (vs_out_reg2[0].zwww).xy;
SetEmit(2, true, true);
Emit();
Gfn11();
return true;
case 130u:
tmp_reg11 = vs_out_reg4[0];
tmp_reg12 = vs_out_reg5[0];
tmp_reg13 = vs_out_reg6[0];
tmp_reg14 = vs_out_reg7[0];
tmp_reg15.w = (gs_pica.f[81].xxxx).w;
tmp_reg15.z = (vs_out_reg0[0].wwww).z;
tmp_reg15.x = (vs_out_reg3[0].zzzz).x;
return true;
default: return false;
}
}
return false;
}
bool Gfn3() {
tmp_reg1.xy = (tmp_reg15.xxxx).xy;
bool_regs = lessThan(gs_pica.f[81].xx, tmp_reg1.xy);
if (bool_regs.x) {
tmp_reg5.xyz = (vs_out_reg0[0].xyzz + tmp_reg6.xyzz).xyz;
tmp_reg5.w = (gs_pica.f[81].zzzz).w;
vtx_regs[0].x = dot_s(tmp_reg5, tmp_reg11);
vtx_regs[0].y = dot_s(tmp_reg5, tmp_reg12);
vtx_regs[0].z = dot_s(tmp_reg5, tmp_reg13);
vtx_regs[0].w = dot_s(tmp_reg5, tmp_reg14);
} else {
tmp_reg5.xyz = (vs_out_reg0[0].xyzz + tmp_reg6.xyzz).xyz;
tmp_reg5.w = (gs_pica.f[81].zzzz).w;
vtx_regs[0].x = dot_s(tmp_reg5, tmp_reg11);
vtx_regs[0].y = dot_s(tmp_reg5, tmp_reg12);
tmp_reg1.w = dot_s(tmp_reg5, tmp_reg14);
tmp_reg2.xyz = (tmp_reg7.xyzz + tmp_reg5.xyzz).xyz;
tmp_reg2.w = (gs_pica.f[81].zzzz).w;
tmp_reg3.w = dot_s(tmp_reg2, tmp_reg14);
tmp_reg3.z = dot_s(tmp_reg2, -tmp_reg13);
tmp_reg3.z = (mul_s(tmp_reg1.wwww, tmp_reg3.zzzz)).z;
tmp_reg2 = vec4(rcp_s(tmp_reg3.w));
vtx_regs[0].z = (mul_s(tmp_reg3.zzzz, tmp_reg2.zzzz)).z;
vtx_regs[0].w = (tmp_reg1.wwww).w;
}
vtx_regs[1] = vs_out_reg1[0];
return false;
}
bool Gfn11() {
tmp_reg15.w = (gs_pica.f[81].zzzz + tmp_reg15.wwww).w;
return false;
}