#version 310 es
precision highp float;
precision highp int;

layout(binding = 0, std430)
buffer tint_symbol_1_1_ssbo {
  uint tint_symbol;
} v;
layout(binding = 1, std430)
buffer SB_RW_1_ssbo {
  int arg_0[];
} sb_rw;
uint arrayLength_61b1c7() {
  uint res = uint(sb_rw.arg_0.length());
  return res;
}
void main() {
  v.tint_symbol = arrayLength_61b1c7();
}
#version 310 es

layout(binding = 0, std430)
buffer tint_symbol_1_1_ssbo {
  uint tint_symbol;
} v;
layout(binding = 1, std430)
buffer SB_RW_1_ssbo {
  int arg_0[];
} sb_rw;
uint arrayLength_61b1c7() {
  uint res = uint(sb_rw.arg_0.length());
  return res;
}
layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
void main() {
  v.tint_symbol = arrayLength_61b1c7();
}
