/*
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

#include <stdio.h>
#include <string.h>
#include <fstream>
#include <iostream>

#include "se_defines.h"

SE_GLOBALS()

void test_case(const char* input) {
  int ddvus = 81;
  int gddci = 83;
  int fcxgg = 19;
  int tbzij = 52;
  int ticme = 28;
  int ctxyo = 65;
  int kpfkt = 75;
  int etaoi = 71;
  int waxlr = 99;
  int ddtwg = 84;
  int yxrzg = 83;
  int bkbni = 68;
  int foezi = 2;
  int lxjwv = 31;
  int llpwx = 27;
  int wvkjg = 54;
  int rfcoj = 4;
  int ywmmc = 80;
  int pvtbs = 4;
  int hhwlf = 68;
  char buffer_one[8], buffer_two[8];
  strcpy(buffer_one, "one"); /* Put "one" into buffer_one. */
  strcpy(buffer_two, input); /* Copy input into buffer_two. */
  /* Print the value of the variables */
  printf("Variable foezi: %d", foezi);
  printf("Variable pvtbs: %d", pvtbs);
  printf("Variable kpfkt: %d", kpfkt);
  printf("Variable ywmmc: %d", ywmmc);
  printf("Variable bkbni: %d", bkbni);
  printf("Variable tbzij: %d", tbzij);
  printf("Variable lxjwv: %d", lxjwv);
  printf("Variable fcxgg: %d", fcxgg);
  printf("Variable etaoi: %d", etaoi);
  printf("Variable llpwx: %d", llpwx);
  printf("Variable ddvus: %d", ddvus);
  printf("Variable ddtwg: %d", ddtwg);
  printf("Variable ctxyo: %d", ctxyo);
  printf("Variable yxrzg: %d", yxrzg);
  printf("Variable wvkjg: %d", wvkjg);
  printf("Variable waxlr: %d", waxlr);
  printf("Variable ticme: %d", ticme);
  printf("Variable rfcoj: %d", rfcoj);
  printf("Variable hhwlf: %d", hhwlf);
  printf("Variable gddci: %d", gddci);
  /* Complex constraints for success */
  if (foezi == 8513 && pvtbs == 159 && kpfkt == 6650 && ywmmc == 544 &&
      bkbni == 1058 && tbzij == 9279 && lxjwv == 4851 && fcxgg == 1505 &&
      etaoi == 1957 && llpwx == 9285 && ddvus == 7024 && ddtwg == 6522 &&
      ctxyo == 9517 && yxrzg == 8994 && wvkjg == 8554 && waxlr == 6396 &&
      ticme == 6259 && rfcoj == 1820 && hhwlf == 5672 && gddci == 4824) {
    SE_TARGET_STATE(true);
  }
}

int main(int argc, char* argv[]) {
  std::istream* input;
  std::ifstream file;
  if (argc < 2) {
    input = &std::cin; // No file name provided, read from stdin
  } else {
    file.open(argv[1]);
    if (!file) {
      std::cerr << "Could not open the file.\n";
      return 1;
    }
    input = &file; // File opened successfully, read from file
  }
  std::string content(
      (std::istreambuf_iterator<char>(*input)),
      std::istreambuf_iterator<char>());
  test_case(content.c_str());
  return 0;
}
