#version 310 es

layout(binding = 0, std430)
buffer s_block_1_ssbo {
  float inner;
} v;
float f1(float a[4]) {
  return a[3];
}
float f2(float a[3][4]) {
  return a[2][3];
}
float f3(float a[2][3][4]) {
  return a[1][2][3];
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
  float a1[4] = float[4](0.0f, 0.0f, 0.0f, 0.0f);
  float a2[3][4] = float[3][4](float[4](0.0f, 0.0f, 0.0f, 0.0f), float[4](0.0f, 0.0f, 0.0f, 0.0f), float[4](0.0f, 0.0f, 0.0f, 0.0f));
  float a3[2][3][4] = float[2][3][4](float[3][4](float[4](0.0f, 0.0f, 0.0f, 0.0f), float[4](0.0f, 0.0f, 0.0f, 0.0f), float[4](0.0f, 0.0f, 0.0f, 0.0f)), float[3][4](float[4](0.0f, 0.0f, 0.0f, 0.0f), float[4](0.0f, 0.0f, 0.0f, 0.0f), float[4](0.0f, 0.0f, 0.0f, 0.0f)));
  float v1 = f1(a1);
  float v2 = f2(a2);
  float v3 = f3(a3);
  v.inner = ((v1 + v2) + v3);
}
