�P����>�BJ�䡻|_<ɿ���qZ��~g�?
#ifdef __clang__
#pragma clang diagnostic ignored "-Wall"
#endif
#include <metal_stdlib>
using namespace metal;
struct tint_struct {
uint tint_member;
float2 tint_member_1;
float2 tint_member_2;
float tint_member_3;
float tint_member_4;
float4 tint_member_5;
float4 tint_member_6;
float4 tint_member_7;
float4 tint_member_8;
float tint_member_9;
uint2 tint_member_10;
float3 tint_member_11;
float3 tint_member_12;
float3 tint_member_13;
};
struct tint_struct_1 {
float4 tint_member_14;
uint2 tint_member_15;
float2 tint_member_16;
float4 tint_member_17;
float4 tint_member_18;
float4 tint_member_19;
float4 tint_member_20;
float2 tint_member_21;
float2 tint_member_22;
};
template<typename T, size_t N>
struct tint_array {
const constant T& operator[](size_t i) const constant { return elements[i]; }
device T& operator[](size_t i) device { return elements[i]; }
const device T& operator[](size_t i) const device { return elements[i]; }
thread T& operator[](size_t i) thread { return elements[i]; }
const thread T& operator[](size_t i) const thread { return elements[i]; }
threadgroup T& operator[](size_t i) threadgroup { return elements[i]; }
const threadgroup T& operator[](size_t i) const threadgroup { return elements[i]; }
T elements[N];
};
struct tint_struct_5 {
/* 0x0000 */ packed_float3 tint_member_32;
/* 0x000c */ tint_array<int8_t, 4> tint_pad_2;
};
struct tint_struct_4 {
/* 0x0000 */ float4 tint_member_25;
/* 0x0010 */ float2 tint_member_26;
/* 0x0018 */ float2 tint_member_27;
/* 0x0020 */ float2 tint_member_28;
/* 0x0028 */ tint_array<int8_t, 8> tint_pad;
/* 0x0030 */ float4 tint_member_29;
/* 0x0040 */ float2 tint_member_30;
/* 0x0048 */ tint_array<int8_t, 8> tint_pad_1;
/* 0x0050 */ tint_array<tint_struct_5, 3> tint_member_31;
/* 0x0080 */ float4 tint_member_33;
/* 0x0090 */ float2 tint_member_34;
/* 0x0098 */ tint_array<int8_t, 8> tint_pad_3;
};
struct tint_struct_3 {
/* 0x0000 */ tint_array<tint_struct_4, 1> tint_member_24;
};
struct tint_struct_7 {
/* 0x0000 */ float4 tint_member_37;
/* 0x0010 */ float4 tint_member_38;
};
struct tint_struct_6 {
/* 0x0000 */ tint_struct_7 tint_member_36;
/* 0x0020 */ tint_array<uint4, 1> tint_member_39;
};
struct tint_struct_2 {
const device tint_struct_3* tint_member_23;
const constant tint_struct_6* tint_member_35;
};
struct tint_struct_8 {
float4 tint_member_40 [[position]];
uint2 tint_member_41 [[user(locn0)]] [[flat]];
float2 tint_member_42 [[user(locn1)]];
float4 tint_member_43 [[user(locn2)]];
float4 tint_member_44 [[user(locn3)]];
float4 tint_member_45 [[user(locn4)]];
float4 tint_member_46 [[user(locn5)]];
float2 tint_member_47 [[user(locn6)]];
float2 tint_member_48 [[user(locn7)]];
};
struct tint_struct_9 {
uint tint_member_49 [[attribute(0)]];
float2 tint_member_50 [[attribute(1)]];
float2 tint_member_51 [[attribute(2)]];
float tint_member_52 [[attribute(3)]];
float tint_member_53 [[attribute(4)]];
float4 tint_member_54 [[attribute(5)]];
float4 tint_member_55 [[attribute(6)]];
float4 tint_member_56 [[attribute(7)]];
float4 tint_member_57 [[attribute(8)]];
float tint_member_58 [[attribute(9)]];
uint2 tint_member_59 [[attribute(10)]];
float3 tint_member_60 [[attribute(11)]];
float3 tint_member_61 [[attribute(12)]];
float3 tint_member_62 [[attribute(13)]];
};
float3x3 v(float3x3 v_1) {
float const v_2 = v_1[0].x;
float const v_3 = v_1[0].y;
float const v_4 = v_1[0].z;
float const v_5 = v_1[1].x;
float const v_6 = v_1[1].y;
float const v_7 = v_1[1].z;
float const v_8 = v_1[2].x;
float const v_9 = v_1[2].y;
float const v_10 = v_1[2].z;
float const v_11 = ((v_10 * v_6) - (v_7 * v_9));
float const v_12 = ((-(v_10) * v_5) + (v_7 * v_8));
float const v_13 = ((v_9 * v_5) - (v_6 * v_8));
float const v_14 = (((v_2 * v_11) + (v_3 * v_12)) + (v_4 * v_13));
float3 const v_15 = float3(v_11, ((-(v_10) * v_3) + (v_4 * v_9)), ((v_7 * v_3) - (v_4 * v_6)));
float3 const v_16 = float3(v_12, ((v_10 * v_2) - (v_4 * v_8)), ((-(v_7) * v_2) + (v_4 * v_5)));
return (float3x3(v_15, v_16, float3(v_13, ((-(v_9) * v_2) + (v_3 * v_8)), ((v_6 * v_2) - (v_3 * v_5)))) * (1.0f / v_14));
}
float2 v_17(float2 v_18) {
return float2(-(v_18.y), v_18.x);
}
uint v_19(uint v_20, uint v_21) {
return (v_20 - ((v_20 / select(v_21, 1u, (v_21 == 0u))) * select(v_21, 1u, (v_21 == 0u))));
}
float4 v_22(uint v_23, float2 v_24, float2 v_25, float v_26, float v_27, float4 v_28, float4 v_29, float4 v_30, float4 v_31, float v_32, float3x3 v_33, thread float4* const v_34, thread float4* const v_35, thread float4* const v_36, thread float4* const v_37, thread float2* const v_38, thread float2* const v_39, thread float2* const v_40) {
float v_41 = 1.0f;
uint const v_42 = v_19((v_23 + 1u), 4u);
bool const v_43 = (v_31.z <= 0.0f);
bool v_44 = false;
float4 v_45 = 0.0f;
float4 v_46 = 0.0f;
float4 v_47 = float4(1.0f);
bool v_48 = false;
if ((v_28.x < -1.0f)) {
v_48 = (v_28.y > 0.0f);
v_45 = select(v_30.xzzx, v_30.xxzz, bool4(v_48));
v_46 = v_30.yyww;
if ((v_28.y < 0.0f)) {
(*v_36) = (-(v_28) - 2.0f);
(*v_37) = v_29;
(*v_38) = float2(0.0f, 1.0f);
} else {
(*v_36) = v_29;
(*v_37) = (*v_36);
(*v_38) = v_28.zw;
float v_49 = 0.0f;
if (((*v_38).y < 0.0f)) {
v_49 = 0.41421356797218322754f;
} else {
float const v_50 = sign((*v_38).y);
v_49 = v_50;
}
v_41 = v_49;
}
} else {
bool const v_51 = any((v_28 > float4(0.0f)));
if (v_51) {
v_45 = v_30.xzzx;
v_46 = v_30.yyww;
(*v_36) = v_28;
(*v_37) = v_29;
(*v_38) = float2(0.0f, -1.0f);
} else {
v_45 = v_29;
v_46 = v_30;
v_47 = -(v_28);
(*v_36) = float4(0.0f);
(*v_37) = float4(0.0f);
(*v_38) = float2(0.0f, 1.0f);
v_44 = true;
}
}
float2 v_52 = float2((*v_36)[v_23], (*v_37)[v_23]);
if ((v_19(v_23, 2u) != 0u)) {
v_52 = v_52.yx;
}
float2 v_53 = float2(1.0f);
bool const v_54 = all((v_52 > float2(0.0f)));
if (v_54) {
v_41 = 0.41421356797218322754f;
v_53 = v_52.yx;
}
float4 v_55 = (v_45 - v_45.wxyz);
float4 v_56 = (v_46 - v_46.wxyz);
float4 const v_57 = abs(v_55);
float4 const v_58 = abs(v_56);
float4 const v_59 = max(v_58, float4(1.0f));
float4 const v_60 = max(v_57, v_59);
float4 const v_61 = (1.0f / v_60);
v_55 = (v_55 * v_61);
v_56 = (v_56 * v_61);
float4 v_62 = ((v_55 * v_55) + (v_56 * v_56));
float4 const v_63 = sign(v_62);
float4 const v_64 = v_63;
float4 v_65 = float4(0.0f);
float2 v_66 = float2((*v_38).x);
bool const v_67 = any((v_64 == float4(0.0f)));
if (v_67) {
bool const v_68 = all((v_64 == float4(0.0f)));
if (v_68) {
v_55 = float4(0.0f, 1.0f, 0.0f, -1.0f);
v_56 = float4(-1.0f, 0.0f, 1.0f, 0.0f);
v_62 = float4(1.0f);
} else {
bool const v_69 = ((((v_64.x + v_64.y) + v_64.z) + v_64.w) > 2.5f);
float4 const v_70 = v_56.yzwx;
float4 const v_71 = v_55.yzwx;
float4 const v_72 = select(v_70, v_71, bool4(v_69));
float4 const v_73 = -(v_55.yzwx);
float4 const v_74 = v_56.yzwx;
float4 const v_75 = select(v_73, v_74, bool4(v_69));
float4 const v_76 = mix(v_72, v_55, v_64);
v_55 = v_76;
float4 const v_77 = mix(v_75, v_56, v_64);
v_56 = v_77;
float4 const v_78 = mix(v_62.yzwx, v_62, v_64);
v_62 = v_78;
float4 const v_79 = mix(v_47.yzwx, v_47, v_64);
v_47 = v_79;
bool v_80 = false;
if (!(v_69)) {
v_80 = (v_41 == 0.0f);
} else {
v_80 = false;
}
if (v_80) {
float2 const v_81 = v_66;
v_66 = (v_81 * float2(v_64[v_23], v_64[v_42]));
v_65 = ((v_64 - 1.0f) * (*v_38).x);
(*v_38).y = 1.0f;
v_41 = 1.0f;
}
}
}
float4 const v_82 = rsqrt(v_62);
float4 const v_83 = v_82;
v_55 = (v_55 * v_83);
v_56 = (v_56 * v_83);
float2 const v_84 = -(float2(v_55[v_42], v_56[v_42]));
float2 const v_85 = float2(v_55[v_23], v_56[v_23]);
float2 v_86 = 0.0f;
bool v_87 = false;
if ((v_26 < 0.0f)) {
bool v_88 = false;
if ((v_31.w < 0.0f)) {
v_88 = true;
} else {
v_88 = ((v_27 * v_31.z) != 0.0f);
}
if (v_88) {
v_87 = true;
} else {
float const v_89 = v_31.w;
float2 const v_90 = v_52;
float2 const v_91 = v_66;
float2 const v_92 = -(v_66);
float2 const v_93 = (v_90 + select(v_91, v_92, bool2(v_43)));
bool const v_94 = any((v_93 <= float2(v_89)));
bool v_95 = false;
if ((v_41 == 1.0f)) {
v_95 = true;
} else {
v_95 = v_94;
}
if (v_95) {
v_86 = (v_93 - v_89);
} else {
v_86 = ((v_93 * v_24) - (v_89 * v_25));
}
}
} else {
v_86 = ((v_52 + v_66) * (v_24 + (v_41 * v_24.yx)));
}
if (v_87) {
v_86 = v_31.xy;
} else {
v_86 = (v_86 - v_52);
float2 const v_96 = float2(v_45[v_23], v_46[v_23]);
v_86 = ((v_96 + (v_84 * v_86.x)) + (v_85 * v_86.y));
}
(*v_35) = (((v_56 * (v_45 - v_86.x)) - (v_55 * (v_46 - v_86.y))) + v_65);
float3x3 const v_97 = v(v_33);
float3x3 const v_98 = v_97;
float3 v_99 = (v_33 * float3(v_86, 1.0f));
(*v_34) = float4((v_98[0].xy - (v_98[0].z * v_86)), (v_98[1].xy - (v_98[1].z * v_86)));
if (v_44) {
float4 const v_100 = ((-(v_56) * (v_98[0].x - (v_98[0].z * v_45))) + (v_55 * (v_98[0].y - (v_98[0].z * v_46))));
float4 const v_101 = ((-(v_56) * (v_98[1].x - (v_98[1].z * v_45))) + (v_55 * (v_98[1].y - (v_98[1].z * v_46))));
float4 const v_102 = rsqrt(((v_100 * v_100) + (v_101 * v_101)));
(*v_35) = ((*v_35) * v_102);
float const v_103 = abs(v_99.z);
(*v_35) = ((*v_35) + ((1.0f - v_47) * v_103));
float4 const v_104 = abs(((v_55 * v_55.yzwx) + (v_56 * v_56.yzwx)));
float const v_105 = dot(v_104, float4(1.0f));
bool v_106 = false;
if (all((v_47 == float4(1.0f)))) {
v_106 = (v_105 < 0.00023999999393709004f);
} else {
v_106 = false;
}
bool const v_107 = v_106;
if (v_107) {
float2 const v_108 = ((*v_35).xy + (*v_35).zw);
float const v_109 = min(v_108.x, v_108.y);
float const v_110 = abs(v_99.z);
float const v_111 = min(v_109, v_110);
(*v_39).y = (1.0f + v_111);
} else {
float const v_112 = abs(v_99.z);
(*v_39).y = (1.0f + v_112);
}
}
bool v_113 = false;
if ((v_26 > 0.0f)) {
v_113 = (v_99.z > 0.0f);
} else {
v_113 = false;
}
if (v_113) {
float const v_114 = (*v_34).z;
float const v_115 = (*v_34).w;
float2 const v_116 = float2((*v_34).x, (*v_34).y);
float2x2 const v_117 = float2x2(v_116, float2(v_114, v_115));
float2 const v_118 = (float2(v_47[v_23], v_47[v_42]) * v_25);
float2 const v_119 = v_17(-(v_85));
float2 v_120 = (((v_53.x * v_118.x) * v_119) * v_117);
float2 const v_121 = v_17(v_84);
float2 v_122 = (((v_53.y * v_118.y) * v_121) * v_117);
bool const v_123 = all((v_118 != float2(0.0f)));
bool const v_124 = v_123;
bool v_125 = false;
if ((v_41 == 1.0f)) {
v_125 = v_124;
} else {
v_125 = false;
}
if (v_125) {
float2 const v_126 = normalize(v_120);
v_120 = v_126;
float2 const v_127 = normalize(v_122);
v_122 = v_127;
float const v_128 = dot(v_120, v_122);
if ((v_128 < -0.80000001192092895508f)) {
float const v_129 = v_122.x;
float const v_130 = v_122.y;
float2 const v_131 = float2(v_120.x, v_120.y);
float const v_132 = determinant(float2x2(v_131, float2(v_129, v_130)));
float const v_133 = sign(v_132);
float const v_134 = v_133;
float2 const v_135 = v_17(v_120);
v_120 = (v_134 * v_135);
float2 const v_136 = v_17(v_122);
v_122 = (-(v_134) * v_136);
}
}
float2 const v_137 = normalize((v_120 + v_122));
v_99 = float3((v_99.xy + (v_99.z * v_137)), v_99.z);
if (v_44) {
(*v_35) = ((*v_35) - v_99.z);
} else {
(*v_39).y = -(v_99.z);
}
} else {
if (!(v_44)) {
(*v_39).y = 0.0f;
}
}
float v_138 = 0.0f;
if ((v_27 != 0.0f)) {
v_138 = 1.0f;
} else {
v_138 = select(0.0f, -1.0f, v_43);
}
(*v_39).x = float(v_138);
if (v_48) {
float const v_139 = -(v_55.x);
float const v_140 = v_55.y;
float2 const v_141 = float2(v_56.x, -(v_56.y));
float2x2 const v_142 = float2x2(v_141, float2(v_139, v_140));
float const v_143 = (*v_34).z;
float const v_144 = (*v_34).w;
float2 const v_145 = float2((*v_34).x, (*v_34).y);
float2x2 const v_146 = (v_142 * float2x2(v_145, float2(v_143, v_144)));
(*v_34) = float4(v_146[0], v_146[1]);
}
(*v_40) = v_86;
return float4(v_99.xy, (v_99.z * v_32), v_99.z);
}
void v_147(tint_struct v_148, thread tint_struct_1* const v_149, tint_struct_2 v_150) {
float2 v_151 = float2(0.0f);
float4 v_152 = 0.0f;
float4 v_153 = 0.0f;
float4 v_154 = 0.0f;
float4 v_155 = 0.0f;
float2 v_156 = 0.0f;
float2 v_157 = 0.0f;
float2 v_158 = 0.0f;
float3 const v_159 = float3(v_148.tint_member_11.x, v_148.tint_member_11.y, v_148.tint_member_11.z);
float3 const v_160 = float3(v_148.tint_member_12.x, v_148.tint_member_12.y, v_148.tint_member_12.z);
float4 const v_161 = v_22(v_148.tint_member, v_148.tint_member_1, v_148.tint_member_2, v_148.tint_member_3, v_148.tint_member_4, v_148.tint_member_5, v_148.tint_member_6, v_148.tint_member_7, v_148.tint_member_8, v_148.tint_member_9, float3x3(v_159, v_160, float3(v_148.tint_member_13.x, v_148.tint_member_13.y, v_148.tint_member_13.z)), (&v_152), (&v_153), (&v_154), (&v_155), (&v_156), (&v_157), (&v_158));
(*v_149).tint_member_17 = v_152;
(*v_149).tint_member_18 = v_153;
(*v_149).tint_member_19 = v_154;
(*v_149).tint_member_20 = v_155;
(*v_149).tint_member_21 = v_156;
(*v_149).tint_member_22 = v_157;
v_151 = v_158;
float4 const v_162 = v_161;
float2 const v_163 = sign((*v_150.tint_member_35).tint_member_36.tint_member_37.zw);
(*v_149).tint_member_14 = float4((((*v_150.tint_member_35).tint_member_36.tint_member_37.zw * v_162.xy) - (v_163 * v_162.ww)), v_162.zw);
(*v_149).tint_member_15 = v_148.tint_member_10;
uint const v_164 = v_148.tint_member_10.y;
float2 const v_165 = (*v_150.tint_member_23).tint_member_24[v_164].tint_member_25.xy;
float2 const v_166 = (*v_150.tint_member_23).tint_member_24[v_164].tint_member_25.zw;
float2 const v_167 = float2(v_165.x, v_165.y);
float2x2 const v_168 = float2x2(v_167, float2(v_166.x, v_166.y));
(*v_149).tint_member_16 = ((v_168 * v_151) + (*v_150.tint_member_23).tint_member_24[v_164].tint_member_26);
}
tint_struct_1 v_169(tint_struct v_170, tint_struct_2 v_171) {
tint_struct_1 v_172 = {};
v_147(v_170, (&v_172), v_171);
return v_172;
}
vertex tint_struct_8 dawn_entry_point(tint_struct_9 v_174 [[stage_in]], const device tint_struct_3* v_175 [[buffer(2)]], const constant tint_struct_6* v_176 [[buffer(30)]]) {
tint_struct_2 const v_177 = tint_struct_2{.tint_member_23=v_175, .tint_member_35=v_176};
tint_struct_1 const v_178 = v_169(tint_struct{.tint_member=v_174.tint_member_49, .tint_member_1=v_174.tint_member_50, .tint_member_2=v_174.tint_member_51, .tint_member_3=v_174.tint_member_52, .tint_member_4=v_174.tint_member_53, .tint_member_5=v_174.tint_member_54, .tint_member_6=v_174.tint_member_55, .tint_member_7=v_174.tint_member_56, .tint_member_8=v_174.tint_member_57, .tint_member_9=v_174.tint_member_58, .tint_member_10=v_174.tint_member_59, .tint_member_11=v_174.tint_member_60, .tint_member_12=v_174.tint_member_61, .tint_member_13=v_174.tint_member_62}, v_177);
tint_struct_8 v_179 = {};
v_179.tint_member_40 = v_178.tint_member_14;
v_179.tint_member_41 = v_178.tint_member_15;
v_179.tint_member_42 = v_178.tint_member_16;
v_179.tint_member_43 = v_178.tint_member_17;
v_179.tint_member_44 = v_178.tint_member_18;
v_179.tint_member_45 = v_178.tint_member_19;
v_179.tint_member_46 = v_178.tint_member_20;
v_179.tint_member_47 = v_178.tint_member_21;
v_179.tint_member_48 = v_178.tint_member_22;
return v_179;
}
dawn_entry_point