
-- 1: with Ada.Text_IO; use Ada.Text_IO;
with ada;
with ada.ada__text_io;
use ada.ada__text_io;
with system.system__img_int;
with system.system__concat_3;
with ada.ada__tags;
with system.system__concat_5;

-- 2:

-- 3: procedure Debug_Dup_Output (S : String) is
procedure debug_dup_output (s : string) is
   subtype debug_dup_output__S1b is string (s'first(1) .. s'last(1));
   c : character;
   first : integer;

-- 4:

-- 5:    C : Character;

-- 6:    First : Integer;

-- 7:

-- 8:    procedure Put_Chunk (Last : Integer) is
   procedure debug_dup_output__put_chunk (last : integer) is

-- 9:    begin
   begin

-- 10:       if First = Last then
      if first = last then

-- 11:          Put (Integer'Image (First));
         subtype debug_dup_output__put_chunk__TS2bS is string (1 ..
           11);
         S2b : string (1 .. 11);
         P3b : natural;
         $system__img_int__image_integer (first, S2b, P3b);
         R4b : constant natural := P3b;
         ada__text_io__put__4 (S2b (1 .. R4b));

-- 12:       else
      else

-- 13:          Put (Integer'Image (First) & " .." & Integer'Image (Last));
         B7b : declare
         begin
            subtype debug_dup_output__put_chunk__B7b__TS8bS is string (
              1 .. 11);
            S8b : string (1 .. 11);
            P9b : natural;
            $system__img_int__image_integer (first, S8b, P9b);
            R10b : constant natural := P9b;
            subtype debug_dup_output__put_chunk__B7b__TS14bS is string
              (1 .. 11);
            S14b : string (1 .. 11);
            P15b : natural;
            $system__img_int__image_integer (last, S14b, P15b);
            R16b : constant natural := P15b;
            L20b : constant integer := S8b (1 .. R10b)'length;
            L22b : constant integer := L20b + 3;
            L24b : constant integer := S14b (1 .. R16b)'length;
            L26b : constant integer := L22b + L24b;
            L27b : constant integer := (if L20b /= 0 then 1 else 1);
            subtype debug_dup_output__put_chunk__B7b__TS28bS is string
              (L27b .. L27b + (L26b - 1));
            S28b : string (L27b .. L27b + (L26b - 1));
            $system__concat_3__str_concat_3 (S28b, S8b (1 .. R10b), " ..",
              S14b (1 .. R16b));
            ada__text_io__put__4 (S28b);

-- 14:       end if;
         end B7b;
      end if;

-- 15:       Put (" => '" & C & "'");
      B29b : declare
      begin
         subtype debug_dup_output__put_chunk__B29b__TS32bS is string (
           1 .. 7);
         S32b : string (1 .. 7);
         null;
         null;
         $system__concat_3__str_concat_3 (S32b, " => '", (c), "'");
         ada__text_io__put__4 (S32b);

-- 16:    end Put_Chunk;
      end B29b;
      return;
   end debug_dup_output__put_chunk;

   L_1 : label

-- 17: begin
begin

-- 18:    if S'Length <= 0 then
   if s'length <= 0 then

-- 19:       Put ("(" & Integer'Image (S'First) & " .." & Integer'Image (S'Last) & " => <>)");
      B37b : declare
      begin
         subtype debug_dup_output__B37b__TS38bS is string (1 .. 11);
         S38b : string (1 .. 11);
         P39b : natural;
         $system__img_int__image_integer (integer(s'first), S38b, P39b);
         R40b : constant natural := P39b;
         subtype debug_dup_output__B37b__TS45bS is string (1 .. 11);
         S45b : string (1 .. 11);
         P46b : natural;
         $system__img_int__image_integer (integer(s'last), S45b, P46b);
         R47b : constant natural := P46b;
         L52b : constant integer := S38b (1 .. R40b)'length;
         L54b : constant integer := 1 + L52b;
         L55b : constant integer := L54b + 3;
         L57b : constant integer := S45b (1 .. R47b)'length;
         L59b : constant integer := L55b + L57b;
         L60b : constant integer := L59b + 7;
         subtype debug_dup_output__B37b__TS61bS is string (1 .. 1 + (
           L60b - 1));
         S61b : string (1 .. 1 + (L60b - 1));
         $system__concat_5__str_concat_5 (S61b, "(", S38b (1 .. R40b),
           " ..", S45b (1 .. R47b), " => <>)");
         ada__text_io__put__4 (S61b);
      end B37b;

-- 20:       return;
      return;

-- 21:    end if;
   end if;

-- 22:

-- 23:    Put ("(");
   ada__text_io__put__4 ("(");

-- 24:

-- 25:    C := S (S'First);
   [constraint_error when
     not (s'first <= s'last)
     "index check failed"]
   c := s (s'first);

-- 26:    First := S'First;
   first := s'first;
   S64b : integer;

-- 27:

-- 28:    for i in S'First + 1 .. S'Last loop
   S64b := s'first {+} 1;
   S65b : constant integer := s'last;
   L_1 : for i in S64b .. S65b loop

-- 29:       if S (i) /= C then
      [constraint_error when
        not (integer(i) in s'first .. s'last)
        "index check failed"]
      if s (i) /= c then

-- 30:          Put_Chunk (i - 1);
         debug_dup_output__put_chunk (i {-} 1);

-- 31:          Put (",");
         ada__text_io__put__4 (",");

-- 32:          C := S (i);
         [constraint_error when
           not (integer(i) in s'first .. s'last)
           "index check failed"]
         c := s (i);

-- 33:          First := i;
         first := i;

-- 34:       end if;
      end if;

-- 35:    end loop;
   end loop L_1;

-- 36:

-- 37:    Put_Chunk (S'Last);
   debug_dup_output__put_chunk (s'last);

-- 38:    Put (")");
   ada__text_io__put__4 (")");

-- 39: end Debug_Dup_Output;
   return;
end debug_dup_output;
