dawn-cmake/test/vk-gl-cts/graphicsfuzz/cov-instruction-simplify-in.../0-opt.spvasm.expected.msl

189 lines
6.1 KiB
Plaintext

#include <metal_stdlib>
using namespace metal;
struct tint_padded_array_element {
/* 0x0000 */ int el;
/* 0x0004 */ int8_t tint_pad[12];
};
struct tint_array_wrapper {
/* 0x0000 */ tint_padded_array_element arr[12];
};
struct buf0 {
/* 0x0000 */ tint_array_wrapper x_GLF_uniform_int_values;
};
struct tint_array_wrapper_1 {
int arr[10];
};
struct main_out {
float4 x_GLF_color_1;
};
struct tint_symbol_1 {
float4 x_GLF_color_1 [[color(0)]];
};
int f_i1_(constant buf0& x_8, thread int* const a) {
int i = 0;
int const x_16 = x_8.x_GLF_uniform_int_values.arr[0].el;
i = x_16;
while (true) {
int const x_17 = i;
int const x_18 = x_8.x_GLF_uniform_int_values.arr[6].el;
if ((x_17 < x_18)) {
} else {
break;
}
int const x_19 = i;
int const x_20 = x_8.x_GLF_uniform_int_values.arr[2].el;
if ((x_19 > x_20)) {
int const x_21 = *(a);
return x_21;
}
{
int const x_22 = i;
i = as_type<int>((as_type<uint>(x_22) + as_type<uint>(1)));
}
}
int const x_24 = x_8.x_GLF_uniform_int_values.arr[0].el;
return x_24;
}
void main_1(constant buf0& x_8, thread float4* const tint_symbol_4) {
tint_array_wrapper_1 ref = {};
int i_1 = 0;
tint_array_wrapper_1 a_1 = {};
int param = 0;
int param_1 = 0;
int i_2 = 0;
int const x_25 = x_8.x_GLF_uniform_int_values.arr[0].el;
int const x_26 = x_8.x_GLF_uniform_int_values.arr[1].el;
ref.arr[x_25] = x_26;
int const x_27 = x_8.x_GLF_uniform_int_values.arr[11].el;
int const x_28 = x_8.x_GLF_uniform_int_values.arr[2].el;
ref.arr[x_27] = x_28;
int const x_29 = x_8.x_GLF_uniform_int_values.arr[1].el;
int const x_30 = x_8.x_GLF_uniform_int_values.arr[3].el;
ref.arr[x_29] = x_30;
int const x_31 = x_8.x_GLF_uniform_int_values.arr[2].el;
int const x_32 = x_8.x_GLF_uniform_int_values.arr[4].el;
ref.arr[x_31] = x_32;
int const x_33 = x_8.x_GLF_uniform_int_values.arr[3].el;
int const x_34 = x_8.x_GLF_uniform_int_values.arr[5].el;
ref.arr[x_33] = x_34;
int const x_35 = x_8.x_GLF_uniform_int_values.arr[4].el;
int const x_36 = x_8.x_GLF_uniform_int_values.arr[6].el;
ref.arr[x_35] = x_36;
int const x_37 = x_8.x_GLF_uniform_int_values.arr[5].el;
int const x_38 = x_8.x_GLF_uniform_int_values.arr[7].el;
ref.arr[x_37] = x_38;
int const x_39 = x_8.x_GLF_uniform_int_values.arr[8].el;
int const x_40 = x_8.x_GLF_uniform_int_values.arr[8].el;
ref.arr[x_39] = x_40;
int const x_41 = x_8.x_GLF_uniform_int_values.arr[9].el;
int const x_42 = x_8.x_GLF_uniform_int_values.arr[9].el;
ref.arr[x_41] = x_42;
int const x_43 = x_8.x_GLF_uniform_int_values.arr[10].el;
int const x_44 = x_8.x_GLF_uniform_int_values.arr[10].el;
ref.arr[x_43] = x_44;
int const x_45 = x_8.x_GLF_uniform_int_values.arr[0].el;
i_1 = x_45;
while (true) {
int const x_46 = i_1;
int const x_47 = x_8.x_GLF_uniform_int_values.arr[6].el;
if ((x_46 < x_47)) {
} else {
break;
}
int const x_48 = i_1;
int const x_49 = i_1;
a_1.arr[x_48] = x_49;
int const x_50 = i_1;
int const x_51 = x_8.x_GLF_uniform_int_values.arr[6].el;
int const x_52 = x_8.x_GLF_uniform_int_values.arr[1].el;
if ((x_50 < (x_51 / x_52))) {
int const x_54 = i_1;
int const x_55 = i_1;
int const x_56 = x_8.x_GLF_uniform_int_values.arr[1].el;
a_1.arr[x_54] = as_type<int>((as_type<uint>(x_55) + as_type<uint>(x_56)));
int const x_58 = i_1;
int const x_59 = x_8.x_GLF_uniform_int_values.arr[6].el;
if ((x_58 < x_59)) {
{
int const x_79 = i_1;
i_1 = as_type<int>((as_type<uint>(x_79) + as_type<uint>(1)));
}
continue;
}
int const x_60 = i_1;
int const x_61 = i_1;
int const x_62 = x_8.x_GLF_uniform_int_values.arr[8].el;
a_1.arr[x_60] = as_type<int>((as_type<uint>(x_61) + as_type<uint>(x_62)));
int const x_64 = i_1;
int const x_65 = a_1.arr[x_64];
param = x_65;
int const x_66 = f_i1_(x_8, &(param));
int const x_67 = x_8.x_GLF_uniform_int_values.arr[8].el;
if ((x_66 < x_67)) {
int const x_68 = i_1;
int const x_182_save = x_68;
int const x_69 = a_1.arr[x_182_save];
a_1.arr[x_182_save] = as_type<int>((as_type<uint>(x_69) - as_type<uint>(1)));
}
} else {
int const x_71 = i_1;
int const x_72 = a_1.arr[x_71];
param_1 = x_72;
int const x_73 = f_i1_(x_8, &(param_1));
int const x_74 = x_8.x_GLF_uniform_int_values.arr[8].el;
if ((x_73 < x_74)) {
int const x_75 = i_1;
int const x_76 = x_8.x_GLF_uniform_int_values.arr[4].el;
int const x_77 = a_1.arr[x_75];
a_1.arr[x_75] = as_type<int>((as_type<uint>(x_77) + as_type<uint>(x_76)));
}
}
{
int const x_79 = i_1;
i_1 = as_type<int>((as_type<uint>(x_79) + as_type<uint>(1)));
}
}
int const x_81 = x_8.x_GLF_uniform_int_values.arr[0].el;
i_2 = x_81;
while (true) {
int const x_82 = i_2;
int const x_83 = x_8.x_GLF_uniform_int_values.arr[6].el;
if ((x_82 < x_83)) {
} else {
break;
}
int const x_84 = i_2;
int const x_85 = a_1.arr[x_84];
int const x_86 = i_2;
int const x_87 = ref.arr[x_86];
if ((x_85 != x_87)) {
int const x_88 = x_8.x_GLF_uniform_int_values.arr[0].el;
float const x_205 = float(x_88);
*(tint_symbol_4) = float4(x_205, x_205, x_205, x_205);
return;
}
{
int const x_89 = i_2;
i_2 = as_type<int>((as_type<uint>(x_89) + as_type<uint>(1)));
}
}
int const x_91 = x_8.x_GLF_uniform_int_values.arr[11].el;
int const x_92 = x_8.x_GLF_uniform_int_values.arr[0].el;
int const x_93 = x_8.x_GLF_uniform_int_values.arr[0].el;
int const x_94 = x_8.x_GLF_uniform_int_values.arr[11].el;
*(tint_symbol_4) = float4(float(x_91), float(x_92), float(x_93), float(x_94));
return;
}
fragment tint_symbol_1 tint_symbol(constant buf0& x_8 [[buffer(0)]]) {
thread float4 tint_symbol_5 = 0.0f;
main_1(x_8, &(tint_symbol_5));
main_out const tint_symbol_2 = {.x_GLF_color_1=tint_symbol_5};
tint_symbol_1 const tint_symbol_3 = {.x_GLF_color_1=tint_symbol_2.x_GLF_color_1};
return tint_symbol_3;
}