function FindSection(buf, id) {
  let pos = 8;
  while (pos < buf.byteLength) {
    const sec_start = pos;
    const [sec_id, pos2] = read_uint(buf, pos);
    const [sec_size, body_pos] = read_uint(buf, pos2);
    pos = body_pos + sec_size;
    if (sec_id == 0) {
      const [name_len, name_pos] = read_uint(buf, body_pos);
      const name = buf.slice(name_pos, name_pos + name_len);
      const nameString = ab2str(name);
      if (nameString == id) {
        return [
          sec_start,
          sec_size + 1 + (body_pos - pos2),
          name_pos + name_len,
        ];
      }
    }
  }
  return [-1, null, null];
}
Search the module sections of a WASM buffer to find
a section with a given identifier.
@param {Buffer} buf
@param {String} id
@returns {Array.<Number>} An array with the index of
  the section, the length of the section, and the index
  of the beginning of the body of the section.