--- VHDL generated by LogSynth framework (c) Petr Fiser
Library IEEE;
use IEEE.std_logic_1164.all;

entity top is 
  Port (
    pi0,pi1,pi2,pi3,pi4,pi5,pi6,pi7,pi8: in std_logic;
    po0: inout std_logic
  );
end top;

architecture top_behav of top is
signal n11,n12,n13,n14,n15,n16,n17,n18,n19,n20,n21,n22,n23,n24,n25,n26,n27,n28,n29,n30,n31,n32,n33,n34,n35,n36,n37,n38,n39,n40,n41,n42,n43,n44,n45,n46,n47,n48,n49,n50,n51,n52: std_logic;
begin
    po0 <= ( not pi1 and n13 )
      or ( not pi8 and n14 )
      or ( pi1 and n15 )
      or ( not pi0 and n16 )
      or ( not pi3 and n17 )
      or ( pi8 and n18 )
      or ( pi0 and not pi5 and n11 and n12 );
    n11 <= ( not pi3 and pi4 )
      or ( pi3 and not pi4 );
    n12 <= ( not pi1 and pi2 )
      or ( pi1 and not pi2 );
    n13 <= ( pi0 and n37 )
      or ( pi2 and not pi4 and pi5 and n35 )
      or ( pi3 and pi4 and not pi5 and n36 );
    n14 <= ( pi4 and n32 )
      or ( pi0 and pi5 and n33 )
      or ( pi2 and not pi6 and n34 )
      or ( pi3 and not pi4 and pi6 and n31 );
    n15 <= ( not pi5 and n29 )
      or ( not pi2 and n30 )
      or ( not pi0 and not pi4 and pi5 and n28 );
    n16 <= ( pi7 and n26 )
      or ( pi2 and not pi4 and n27 )
      or ( pi3 and pi5 and not pi7 and n25 );
    n17 <= ( pi6 and n23 )
      or ( pi2 and n24 )
      or ( pi0 and pi7 and n22 );
    n18 <= ( pi5 and n21 )
      or ( not pi5 and n19 and n11 )
      or ( not pi6 and not pi7 and n20 );
    n19 <= ( not pi6 and pi7 )
      or ( pi6 and not pi7 );
    n20 <= ( pi1 and n28 )
      or ( pi2 and n38 )
      or ( not pi0 and pi4 and pi5 );
    n21 <= ( not pi0 and not pi1 and n19 )
      or ( not pi2 and not pi6 and n35 )
      or ( pi2 and not pi3 and not pi4 and not pi7 );
    n22 <= ( not pi1 and not pi2 and pi6 )
      or ( pi1 and not pi4 and not pi6 );
    n23 <= ( not pi1 and pi2 and n41 )
      or ( pi5 and not pi8 and n42 )
      or ( pi1 and not pi2 and pi4 and not pi7 );
    n24 <= ( pi1 and not pi8 and n19 )
      or ( pi0 and not pi1 and n39 )
      or ( not pi0 and pi4 and n40 );
    n25 <= ( not pi2 and pi4 )
      or ( pi2 and not pi8 );
    n26 <= ( not pi8 and n43 )
      or ( pi2 and not pi5 and n44 )
      or ( not pi1 and not pi2 and pi6 and pi8 );
    n27 <= ( pi1 and pi3 and not pi6 )
      or ( pi6 and not pi7 and pi8 );
    n28 <= ( not pi2 and pi3 )
      or ( pi2 and not pi3 );
    n29 <= ( not pi0 and pi3 and n46 )
      or ( not pi2 and pi8 and n47 )
      or ( pi0 and not pi3 and not pi4 and pi6 );
    n30 <= ( not pi4 and pi5 and n39 )
      or ( not pi3 and pi8 and n41 )
      or ( pi7 and not pi8 and n45 );
    n31 <= ( pi2 and not pi5 )
      or ( not pi1 and pi7 )
      or ( pi5 and not pi7 );
    n32 <= ( not pi1 and pi5 and n19 )
      or ( pi1 and not pi7 and n49 )
      or ( not pi5 and pi6 and n50 );
    n33 <= ( n22 )
      or ( not pi1 and n48 );
    n34 <= ( pi3 and not pi5 and pi7 )
      or ( pi0 and pi1 and not pi7 );
    n35 <= ( not pi0 and pi3 )
      or ( pi0 and not pi3 );
    n36 <= ( pi0 and not pi2 )
      or ( not pi0 and pi8 )
      or ( pi2 and not pi8 );
    n37 <= ( n19 and n38 )
      or ( not pi2 and pi8 and n51 )
      or ( pi3 and pi5 and not pi6 and not pi7 );
    n38 <= ( pi3 and not pi4 )
      or ( pi4 and not pi5 );
    n39 <= ( not pi6 and pi7 )
      or ( not pi7 and pi8 );
    n40 <= ( pi1 and not pi5 )
      or ( pi5 and not pi6 )
      or ( pi6 and not pi7 );
    n41 <= ( pi0 and not pi4 )
      or ( not pi0 and pi7 );
    n42 <= ( pi1 and not pi2 )
      or ( pi2 and not pi4 );
    n43 <= ( pi5 and n52 )
      or ( not pi2 and pi3 and pi4 )
      or ( pi2 and not pi3 and pi6 );
    n44 <= ( pi4 and not pi6 )
      or ( not pi4 and pi8 );
    n45 <= ( pi3 and not pi5 )
      or ( not pi4 and pi6 )
      or ( pi4 and not pi6 );
    n46 <= ( not pi2 and pi6 )
      or ( pi2 and not pi7 );
    n47 <= ( pi4 and not pi6 )
      or ( pi6 and not pi7 );
    n48 <= ( not pi3 and pi4 )
      or ( not pi4 and pi7 );
    n49 <= ( not pi2 and pi5 )
      or ( pi3 and not pi5 );
    n50 <= ( not pi0 and pi3 )
      or ( not pi3 and pi7 );
    n51 <= ( n19 )
      or ( n11 );
    n52 <= ( pi2 and not pi4 )
      or ( not pi1 and pi6 )
      or ( pi3 and not pi6 );
end top_behav;
