175 lines
3.9 KiB
Plaintext
175 lines
3.9 KiB
Plaintext
#include <metal_stdlib>
|
|
|
|
using namespace metal;
|
|
struct tint_array_wrapper {
|
|
int arr[1];
|
|
};
|
|
struct tmp_struct {
|
|
tint_array_wrapper nmb;
|
|
};
|
|
struct buf0 {
|
|
/* 0x0000 */ packed_float2 injectionSwitch;
|
|
};
|
|
struct main_out {
|
|
float4 x_GLF_color_1;
|
|
};
|
|
struct tint_symbol_1 {
|
|
float4 x_GLF_color_1 [[color(0)]];
|
|
};
|
|
|
|
void main_1(constant buf0& x_11, thread float4* const tint_symbol_6) {
|
|
tint_array_wrapper x_24 = {};
|
|
bool x_68 = false;
|
|
int x_17 = 0;
|
|
int x_18 = 0;
|
|
int x_19 = 0;
|
|
int x_20 = 0;
|
|
bool x_69 = false;
|
|
float tmp_float = 0.0f;
|
|
float3 color = 0.0f;
|
|
while (true) {
|
|
int x_25 = 0;
|
|
float3 x_101 = 0.0f;
|
|
bool x_79_phi = false;
|
|
int x_26_phi = 0;
|
|
float const x_75 = x_11.injectionSwitch.y;
|
|
tmp_float = x_75;
|
|
float3 const x_76 = float3(x_75, x_75, x_75);
|
|
color = x_76;
|
|
tint_array_wrapper const tint_symbol_3 = {.arr={0}};
|
|
tmp_struct const tint_symbol_4 = {.nmb=tint_symbol_3};
|
|
x_24 = tint_symbol_4.nmb;
|
|
x_68 = false;
|
|
x_79_phi = false;
|
|
while (true) {
|
|
int x_21_phi = 0;
|
|
int x_25_phi = 0;
|
|
bool x_93_phi = false;
|
|
bool const x_79 = x_79_phi;
|
|
x_18 = 1;
|
|
x_21_phi = 1;
|
|
while (true) {
|
|
int const x_21 = x_21_phi;
|
|
x_25_phi = 0;
|
|
x_93_phi = x_79;
|
|
if ((x_21 > 10)) {
|
|
} else {
|
|
break;
|
|
}
|
|
int const x_22 = as_type<int>((as_type<uint>(x_21) - as_type<uint>(1)));
|
|
x_19 = x_22;
|
|
int const x_23 = x_24.arr[x_22];
|
|
if ((x_23 == 1)) {
|
|
x_68 = true;
|
|
x_17 = 1;
|
|
x_25_phi = 1;
|
|
x_93_phi = true;
|
|
break;
|
|
}
|
|
x_18 = x_22;
|
|
{
|
|
x_21_phi = x_22;
|
|
}
|
|
}
|
|
x_25 = x_25_phi;
|
|
bool const x_93 = x_93_phi;
|
|
x_26_phi = x_25;
|
|
if (x_93) {
|
|
break;
|
|
}
|
|
x_68 = true;
|
|
x_17 = -1;
|
|
x_26_phi = -1;
|
|
break;
|
|
{
|
|
x_79_phi = false;
|
|
}
|
|
}
|
|
int const x_26 = x_26_phi;
|
|
x_20 = x_26;
|
|
if ((x_26 == -1)) {
|
|
discard_fragment();
|
|
} else {
|
|
*(tint_symbol_6) = float4(0.0f, 0.0f, 0.0f, 0.0f);
|
|
float2 const x_100 = (float2(x_76.y, x_76.z) + float2(1.0f, 1.0f));
|
|
x_101 = float3(x_76.x, x_100.x, x_100.y);
|
|
color = x_101;
|
|
float const x_103 = x_11.injectionSwitch.x;
|
|
if ((x_103 > 1.0f)) {
|
|
x_69 = true;
|
|
break;
|
|
}
|
|
}
|
|
*(tint_symbol_6) = float4(x_101.x, x_101.y, x_101.z, 1.0f);
|
|
x_69 = true;
|
|
break;
|
|
}
|
|
return;
|
|
}
|
|
|
|
fragment tint_symbol_1 tint_symbol(constant buf0& x_11 [[buffer(0)]]) {
|
|
thread float4 tint_symbol_7 = 0.0f;
|
|
main_1(x_11, &(tint_symbol_7));
|
|
main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_7};
|
|
tint_symbol_1 const tint_symbol_5 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
|
|
return tint_symbol_5;
|
|
}
|
|
|
|
int binarySearch_struct_tmp_struct_i1_1_1_(thread tmp_struct* const obj) {
|
|
bool x_112 = false;
|
|
int x_16 = 0;
|
|
int one = 0;
|
|
int zero = 0;
|
|
int x_27 = 0;
|
|
bool x_114_phi = false;
|
|
int x_28_phi = 0;
|
|
x_114_phi = false;
|
|
while (true) {
|
|
int x_15_phi = 0;
|
|
int x_27_phi = 0;
|
|
bool x_128_phi = false;
|
|
bool const x_114 = x_114_phi;
|
|
one = 1;
|
|
x_15_phi = 1;
|
|
while (true) {
|
|
int const x_15 = x_15_phi;
|
|
x_27_phi = 0;
|
|
x_128_phi = x_114;
|
|
if ((x_15 > 10)) {
|
|
} else {
|
|
break;
|
|
}
|
|
int const x_13 = as_type<int>((as_type<uint>(x_15) - as_type<uint>(1)));
|
|
zero = x_13;
|
|
int const x_14 = (*(obj)).nmb.arr[x_13];
|
|
if ((x_14 == 1)) {
|
|
x_112 = true;
|
|
x_16 = 1;
|
|
x_27_phi = 1;
|
|
x_128_phi = true;
|
|
break;
|
|
}
|
|
one = x_13;
|
|
{
|
|
x_15_phi = x_13;
|
|
}
|
|
}
|
|
x_27 = x_27_phi;
|
|
bool const x_128 = x_128_phi;
|
|
x_28_phi = x_27;
|
|
if (x_128) {
|
|
break;
|
|
}
|
|
x_112 = true;
|
|
x_16 = -1;
|
|
x_28_phi = -1;
|
|
break;
|
|
{
|
|
x_114_phi = false;
|
|
}
|
|
}
|
|
int const x_28 = x_28_phi;
|
|
return x_28;
|
|
}
|
|
|