pragma Warnings (Off);
pragma Ada_95;
pragma Source_File_Name (ada_main, Spec_File_Name => "b_gnatl.ads");
pragma Source_File_Name (ada_main, Body_File_Name => "b_gnatl.adb");
pragma Suppress (Overflow_Check);

package body ada_main is

   E079 : Short_Integer; pragma Import (Ada, E079, "system__os_lib_E");
   E012 : Short_Integer; pragma Import (Ada, E012, "ada__exceptions_E");
   E016 : Short_Integer; pragma Import (Ada, E016, "system__soft_links_E");
   E026 : Short_Integer; pragma Import (Ada, E026, "system__exception_table_E");
   E049 : Short_Integer; pragma Import (Ada, E049, "ada__containers_E");
   E075 : Short_Integer; pragma Import (Ada, E075, "ada__io_exceptions_E");
   E033 : Short_Integer; pragma Import (Ada, E033, "ada__numerics_E");
   E061 : Short_Integer; pragma Import (Ada, E061, "ada__strings_E");
   E063 : Short_Integer; pragma Import (Ada, E063, "ada__strings__maps_E");
   E066 : Short_Integer; pragma Import (Ada, E066, "ada__strings__maps__constants_E");
   E086 : Short_Integer; pragma Import (Ada, E086, "interfaces__c_E");
   E027 : Short_Integer; pragma Import (Ada, E027, "system__exceptions_E");
   E090 : Short_Integer; pragma Import (Ada, E090, "system__object_reader_E");
   E056 : Short_Integer; pragma Import (Ada, E056, "system__dwarf_lines_E");
   E018 : Short_Integer; pragma Import (Ada, E018, "system__soft_links__initialize_E");
   E048 : Short_Integer; pragma Import (Ada, E048, "system__traceback__symbolic_E");
   E032 : Short_Integer; pragma Import (Ada, E032, "system__img_int_E");
   E070 : Short_Integer; pragma Import (Ada, E070, "system__img_uns_E");
   E116 : Short_Integer; pragma Import (Ada, E116, "ada__assertions_E");
   E108 : Short_Integer; pragma Import (Ada, E108, "gnat_E");
   E167 : Short_Integer; pragma Import (Ada, E167, "interfaces__c__strings_E");
   E142 : Short_Integer; pragma Import (Ada, E142, "gnat__dynamic_htables_E");
   E121 : Short_Integer; pragma Import (Ada, E121, "types_E");
   E154 : Short_Integer; pragma Import (Ada, E154, "gnatvsn_E");
   E117 : Short_Integer; pragma Import (Ada, E117, "hostparm_E");
   E110 : Short_Integer; pragma Import (Ada, E110, "opt_E");
   E127 : Short_Integer; pragma Import (Ada, E127, "output_E");
   E165 : Short_Integer; pragma Import (Ada, E165, "indepsw_E");
   E133 : Short_Integer; pragma Import (Ada, E133, "widechar_E");
   E129 : Short_Integer; pragma Import (Ada, E129, "namet_E");
   E107 : Short_Integer; pragma Import (Ada, E107, "butil_E");
   E163 : Short_Integer; pragma Import (Ada, E163, "casing_E");
   E146 : Short_Integer; pragma Import (Ada, E146, "fmap_E");
   E144 : Short_Integer; pragma Import (Ada, E144, "osint_E");
   E156 : Short_Integer; pragma Import (Ada, E156, "sdefault_E");
   E158 : Short_Integer; pragma Import (Ada, E158, "targparm_E");
   E140 : Short_Integer; pragma Import (Ada, E140, "fname_E");
   E161 : Short_Integer; pragma Import (Ada, E161, "snames_E");
   E105 : Short_Integer; pragma Import (Ada, E105, "ali_E");
   E171 : Short_Integer; pragma Import (Ada, E171, "switch_E");
   E002 : Short_Integer; pragma Import (Ada, E002, "gnatlink_E");

   Sec_Default_Sized_Stacks : array (1 .. 1) of aliased System.Secondary_Stack.SS_Stack (System.Parameters.Runtime_Default_Sec_Stack_Size);

   Local_Priority_Specific_Dispatching : constant String := "";
   Local_Interrupt_States : constant String := "";

   Is_Elaborated : Boolean := False;

   procedure adafinal is
      procedure s_stalib_adafinal;
      pragma Import (Ada, s_stalib_adafinal, "system__standard_library__adafinal");

      procedure Runtime_Finalize;
      pragma Import (C, Runtime_Finalize, "__gnat_runtime_finalize");

   begin
      if not Is_Elaborated then
         return;
      end if;
      Is_Elaborated := False;
      Runtime_Finalize;
      s_stalib_adafinal;
   end adafinal;

   type No_Param_Proc is access procedure;
   pragma Favor_Top_Level (No_Param_Proc);

   procedure adainit is
      Main_Priority : Integer;
      pragma Import (C, Main_Priority, "__gl_main_priority");
      Time_Slice_Value : Integer;
      pragma Import (C, Time_Slice_Value, "__gl_time_slice_val");
      WC_Encoding : Character;
      pragma Import (C, WC_Encoding, "__gl_wc_encoding");
      Locking_Policy : Character;
      pragma Import (C, Locking_Policy, "__gl_locking_policy");
      Queuing_Policy : Character;
      pragma Import (C, Queuing_Policy, "__gl_queuing_policy");
      Task_Dispatching_Policy : Character;
      pragma Import (C, Task_Dispatching_Policy, "__gl_task_dispatching_policy");
      Priority_Specific_Dispatching : System.Address;
      pragma Import (C, Priority_Specific_Dispatching, "__gl_priority_specific_dispatching");
      Num_Specific_Dispatching : Integer;
      pragma Import (C, Num_Specific_Dispatching, "__gl_num_specific_dispatching");
      Main_CPU : Integer;
      pragma Import (C, Main_CPU, "__gl_main_cpu");
      Interrupt_States : System.Address;
      pragma Import (C, Interrupt_States, "__gl_interrupt_states");
      Num_Interrupt_States : Integer;
      pragma Import (C, Num_Interrupt_States, "__gl_num_interrupt_states");
      Unreserve_All_Interrupts : Integer;
      pragma Import (C, Unreserve_All_Interrupts, "__gl_unreserve_all_interrupts");
      Detect_Blocking : Integer;
      pragma Import (C, Detect_Blocking, "__gl_detect_blocking");
      Default_Stack_Size : Integer;
      pragma Import (C, Default_Stack_Size, "__gl_default_stack_size");
      Default_Secondary_Stack_Size : System.Parameters.Size_Type;
      pragma Import (C, Default_Secondary_Stack_Size, "__gnat_default_ss_size");
      Bind_Env_Addr : System.Address;
      pragma Import (C, Bind_Env_Addr, "__gl_bind_env_addr");

      procedure Runtime_Initialize (Install_Handler : Integer);
      pragma Import (C, Runtime_Initialize, "__gnat_runtime_initialize");

      Finalize_Library_Objects : No_Param_Proc;
      pragma Import (C, Finalize_Library_Objects, "__gnat_finalize_library_objects");
      Binder_Sec_Stacks_Count : Natural;
      pragma Import (Ada, Binder_Sec_Stacks_Count, "__gnat_binder_ss_count");
      Default_Sized_SS_Pool : System.Address;
      pragma Import (Ada, Default_Sized_SS_Pool, "__gnat_default_ss_pool");

   begin
      if Is_Elaborated then
         return;
      end if;
      Is_Elaborated := True;
      Main_Priority := -1;
      Time_Slice_Value := -1;
      WC_Encoding := 'b';
      Locking_Policy := ' ';
      Queuing_Policy := ' ';
      Task_Dispatching_Policy := ' ';
      Priority_Specific_Dispatching :=
        Local_Priority_Specific_Dispatching'Address;
      Num_Specific_Dispatching := 0;
      Main_CPU := -1;
      Interrupt_States := Local_Interrupt_States'Address;
      Num_Interrupt_States := 0;
      Unreserve_All_Interrupts := 0;
      Detect_Blocking := 0;
      Default_Stack_Size := -1;

      ada_main'Elab_Body;
      Default_Secondary_Stack_Size := System.Parameters.Runtime_Default_Sec_Stack_Size;
      Binder_Sec_Stacks_Count := 1;
      Default_Sized_SS_Pool := Sec_Default_Sized_Stacks'Address;

      Runtime_Initialize (1);

      Finalize_Library_Objects := null;

      Ada.Exceptions'Elab_Spec;
      System.Soft_Links'Elab_Spec;
      System.Exception_Table'Elab_Body;
      E026 := E026 + 1;
      Ada.Containers'Elab_Spec;
      E049 := E049 + 1;
      Ada.Io_Exceptions'Elab_Spec;
      E075 := E075 + 1;
      Ada.Numerics'Elab_Spec;
      E033 := E033 + 1;
      Ada.Strings'Elab_Spec;
      E061 := E061 + 1;
      Ada.Strings.Maps'Elab_Spec;
      E063 := E063 + 1;
      Ada.Strings.Maps.Constants'Elab_Spec;
      E066 := E066 + 1;
      Interfaces.C'Elab_Spec;
      E086 := E086 + 1;
      System.Exceptions'Elab_Spec;
      E027 := E027 + 1;
      System.Object_Reader'Elab_Spec;
      E090 := E090 + 1;
      System.Dwarf_Lines'Elab_Spec;
      System.Os_Lib'Elab_Body;
      E079 := E079 + 1;
      System.Soft_Links.Initialize'Elab_Body;
      E018 := E018 + 1;
      E016 := E016 + 1;
      System.Traceback.Symbolic'Elab_Body;
      E048 := E048 + 1;
      System.Img_Int'Elab_Spec;
      E032 := E032 + 1;
      E012 := E012 + 1;
      System.Img_Uns'Elab_Spec;
      E070 := E070 + 1;
      E056 := E056 + 1;
      Ada.Assertions'Elab_Spec;
      E116 := E116 + 1;
      Gnat'Elab_Spec;
      E108 := E108 + 1;
      Interfaces.C.Strings'Elab_Spec;
      E167 := E167 + 1;
      E142 := E142 + 1;
      Types'Elab_Spec;
      E121 := E121 + 1;
      E154 := E154 + 1;
      Hostparm'Elab_Spec;
      E117 := E117 + 1;
      Opt'Elab_Spec;
      E110 := E110 + 1;
      Output'Elab_Body;
      E127 := E127 + 1;
      E165 := E165 + 1;
      E133 := E133 + 1;
      Namet'Elab_Spec;
      Namet'Elab_Body;
      E129 := E129 + 1;
      E107 := E107 + 1;
      E163 := E163 + 1;
      Osint'Elab_Spec;
      Fmap'Elab_Body;
      E146 := E146 + 1;
      E156 := E156 + 1;
      E158 := E158 + 1;
      Osint'Elab_Body;
      E144 := E144 + 1;
      E140 := E140 + 1;
      Snames'Elab_Body;
      E161 := E161 + 1;
      ALI'ELAB_SPEC;
      ALI'ELAB_BODY;
      E105 := E105 + 1;
      E171 := E171 + 1;
      E002 := E002 + 1;
   end adainit;

   procedure Ada_Main_Program;
   pragma Import (Ada, Ada_Main_Program, "_ada_gnatlink");

   function main
     (argc : Integer;
      argv : System.Address;
      envp : System.Address)
      return Integer
   is
      procedure Initialize (Addr : System.Address);
      pragma Import (C, Initialize, "__gnat_initialize");

      procedure Finalize;
      pragma Import (C, Finalize, "__gnat_finalize");
      SEH : aliased array (1 .. 2) of Integer;

      Ensure_Reference : aliased System.Address := Ada_Main_Program_Name'Address;
      pragma Volatile (Ensure_Reference);

   begin
      if gnat_argc = 0 then
         gnat_argc := argc;
         gnat_argv := argv;
      end if;
      gnat_envp := envp;

      Initialize (SEH'Address);
      adainit;
      Ada_Main_Program;
      adafinal;
      Finalize;
      return (gnat_exit_status);
   end;

--  BEGIN Object file/option list
   --   ../rts/ada.o
   --   ../rts/a-charac.o
   --   ../rts/a-chlat1.o
   --   ../rts/interfac.o
   --   ../rts/system.o
   --   ../rts/s-addope.o
   --   ../rts/s-atoope.o
   --   ../rts/s-io.o
   --   ../rts/s-parame.o
   --   ../rts/s-crtl.o
   --   ../rts/i-cstrea.o
   --   ../rts/s-stoele.o
   --   ../rts/s-stache.o
   --   ../rts/s-strhas.o
   --   ../rts/s-htable.o
   --   ../rts/s-string.o
   --   ../rts/s-traent.o
   --   ../rts/s-unstyp.o
   --   ../rts/s-wchcon.o
   --   ../rts/s-wchjis.o
   --   ../rts/s-wchcnv.o
   --   ../rts/s-carun8.o
   --   ../rts/s-conca2.o
   --   ../rts/s-traceb.o
   --   ../rts/s-excdeb.o
   --   ../rts/s-valllu.o
   --   ../rts/s-vallli.o
   --   ../rts/s-valuns.o
   --   ../rts/s-valint.o
   --   ../rts/s-valuti.o
   --   ../rts/s-wchstw.o
   --   ../rts/a-elchha.o
   --   ../rts/a-exctra.o
   --   ../rts/s-addima.o
   --   ../rts/s-bitops.o
   --   ../rts/s-boustr.o
   --   ../rts/s-casuti.o
   --   ../rts/s-exctab.o
   --   ../rts/a-contai.o
   --   ../rts/a-ioexce.o
   --   ../rts/a-numeri.o
   --   ../rts/a-nubinu.o
   --   ../rts/a-string.o
   --   ../rts/a-strmap.o
   --   ../rts/a-stmaco.o
   --   ../rts/i-c.o
   --   ../rts/s-atopri.o
   --   ../rts/s-except.o
   --   ../rts/s-excmac.o
   --   ../rts/s-win32.o
   --   ../rts/a-chahan.o
   --   ../rts/s-aotase.o
   --   ../rts/s-exctra.o
   --   ../rts/s-memory.o
   --   ../rts/s-mmosin.o
   --   ../rts/s-mmap.o
   --   ../rts/s-objrea.o
   --   ../rts/s-os_lib.o
   --   ../rts/s-secsta.o
   --   ../rts/s-soliin.o
   --   ../rts/s-soflin.o
   --   ../rts/s-stalib.o
   --   ../rts/s-trasym.o
   --   ../rts/s-widuns.o
   --   ../rts/s-imgint.o
   --   ../rts/a-except.o
   --   ../rts/s-imguns.o
   --   ../rts/s-dwalin.o
   --   ../rts/a-assert.o
   --   ../rts/a-comlin.o
   --   ../rts/gnat.o
   --   ../rts/g-htable.o
   --   ../rts/i-cstrin.o
   --   ../rts/g-dynhta.o
   --   ../rts/s-assert.o
   --   ./debug.o
   --   ./types.o
   --   ./alloc.o
   --   ./gnatvsn.o
   --   ./hostparm.o
   --   ./csets.o
   --   ./opt.o
   --   ./output.o
   --   ./indepsw.o
   --   ./rident.o
   --   ./table.o
   --   ./widechar.o
   --   ./namet.o
   --   ./butil.o
   --   ./casing.o
   --   ./fmap.o
   --   ./sdefault.o
   --   ./targparm.o
   --   ./osint.o
   --   ./fname.o
   --   ./snames.o
   --   ./ali.o
   --   ./switch.o
   --   ./gnatlink.o
   --   -L../rts/
   --   -L./
   --   -L/mnt/share/packages/gccmake/gcc-13/gcc/gcc.x86_64/src/gcc-13.4.0/gcc/ada/
   --   -L/usr/lib/gcc/x86_64-pc-cygwin/13/adalib/
   --   -static
   --   -lgnat
   --   -Wl,--stack=0x2000000
--  END Object file/option list   

end ada_main;
