(TranslationUnit
    [(Module
        template_nested_m
        (TriviaNode
            []
            [(EndOfLine)
            (EndOfLine)]
        )
        []
        [(ImplicitNone
            []
            ()
        )]
        [(Declaration
            ()
            [(SimpleAttribute
                AttrPrivate
            )]
            []
            ()
        )
        (Declaration
            ()
            [(SimpleAttribute
                AttrPublic
            )]
            [(add_t
            []
            []
            ()
            ()
            None
            ())
            (test_template
            []
            []
            ()
            ()
            None
            ())]
            (TriviaNode
                []
                [(EndOfLine)
                (EndOfLine)]
            )
        )
        (Requirement
            R
            [T
            F]
            [(DerivedType
                T
                []
                ()
                [(SimpleAttribute
                    AttrDeferred
                )]
                []
                []
            )]
            [(Function
                F
                [(x)
                (y)]
                []
                z
                ()
                ()
                []
                []
                []
                [(Declaration
                    (AttrType
                        TypeType
                        []
                        ()
                        T
                        None
                    )
                    [(AttrIntent
                        In
                    )]
                    [(x
                    []
                    []
                    ()
                    ()
                    None
                    ())
                    (y
                    []
                    []
                    ()
                    ()
                    None
                    ())]
                    ()
                )
                (Declaration
                    (AttrType
                        TypeType
                        []
                        ()
                        T
                        None
                    )
                    []
                    [(z
                    []
                    []
                    ()
                    ()
                    None
                    ())]
                    ()
                )]
                []
                []
                []
            )]
        )
        (Template
            add_t
            [T
            F]
            [(Require
                [(UnitRequire
                    R
                    [(AttrName
                        T
                    )
                    (AttrName
                        F
                    )]
                )]
            )
            (Declaration
                ()
                [(SimpleAttribute
                    AttrPrivate
                )]
                []
                ()
            )
            (Declaration
                ()
                [(SimpleAttribute
                    AttrPublic
                )]
                [(add_generic
                []
                []
                ()
                ()
                None
                ())]
                ()
            )]
            [(Function
                add_generic
                [(x)
                (y)]
                []
                z
                ()
                ()
                []
                []
                []
                [(Declaration
                    (AttrType
                        TypeType
                        []
                        ()
                        T
                        None
                    )
                    [(AttrIntent
                        In
                    )]
                    [(x
                    []
                    []
                    ()
                    ()
                    None
                    ())
                    (y
                    []
                    []
                    ()
                    ()
                    None
                    ())]
                    ()
                )
                (Declaration
                    (AttrType
                        TypeType
                        []
                        ()
                        T
                        None
                    )
                    []
                    [(z
                    []
                    []
                    ()
                    ()
                    None
                    ())]
                    ()
                )]
                [(Assignment
                    0
                    z
                    (FuncCallOrArray
                        F
                        []
                        [(()
                        x
                        ()
                        0)
                        (()
                        y
                        ()
                        0)]
                        []
                        []
                        []
                    )
                    ()
                )]
                []
                []
            )
            (Function
                call_add_generic
                [(x)
                (y)]
                []
                z
                ()
                ()
                []
                []
                []
                [(Declaration
                    (AttrType
                        TypeType
                        []
                        ()
                        T
                        None
                    )
                    [(AttrIntent
                        In
                    )]
                    [(x
                    []
                    []
                    ()
                    ()
                    None
                    ())
                    (y
                    []
                    []
                    ()
                    ()
                    None
                    ())]
                    ()
                )
                (Declaration
                    (AttrType
                        TypeType
                        []
                        ()
                        T
                        None
                    )
                    []
                    [(z
                    []
                    []
                    ()
                    ()
                    None
                    ())]
                    ()
                )]
                [(Assignment
                    0
                    z
                    (FuncCallOrArray
                        add_generic
                        []
                        [(()
                        x
                        ()
                        0)
                        (()
                        y
                        ()
                        0)]
                        []
                        []
                        []
                    )
                    ()
                )]
                []
                []
            )]
        )]
        []
        [(Function
            func_arg_real
            [(x)
            (y)]
            [(AttrType
                TypeReal
                []
                ()
                ()
                None
            )]
            z
            ()
            (TriviaNode
                []
                [(EndOfLine)
                (EndOfLine)]
            )
            []
            []
            []
            [(Declaration
                (AttrType
                    TypeReal
                    []
                    ()
                    ()
                    None
                )
                [(AttrIntent
                    In
                )]
                [(x
                []
                []
                ()
                ()
                None
                ())
                (y
                []
                []
                ()
                ()
                None
                ())]
                ()
            )]
            [(Assignment
                0
                z
                (+ x y)
                ()
            )]
            []
            []
        )
        (Subroutine
            test_template
            []
            []
            ()
            ()
            []
            []
            []
            [(Instantiate
                add_t
                [(AttrType
                    TypeReal
                    []
                    ()
                    ()
                    None
                )
                (AttrName
                    func_arg_real
                )]
                [(UseSymbol
                    call_add_generic
                    add_real
                )]
            )
            (Declaration
                (AttrType
                    TypeReal
                    []
                    ()
                    ()
                    None
                )
                []
                [(x
                []
                []
                ()
                ()
                None
                ())
                (y
                []
                []
                ()
                ()
                None
                ())]
                ()
            )
            (Declaration
                (AttrType
                    TypeInteger
                    []
                    ()
                    ()
                    None
                )
                []
                [(a
                []
                []
                ()
                ()
                None
                ())
                (b
                []
                []
                ()
                ()
                None
                ())]
                ()
            )]
            [(Assignment
                0
                x
                (Real "5.1")
                ()
            )
            (Assignment
                0
                y
                (Real "7.2")
                ()
            )
            (Print
                0
                ()
                [(String "The result is " ())
                (FuncCallOrArray
                    add_real
                    []
                    [(()
                    x
                    ()
                    0)
                    (()
                    y
                    ()
                    0)]
                    []
                    []
                    []
                )]
                ()
            )
            (If
                0
                ()
                (> (FuncCallOrArray
                    abs
                    []
                    [(()
                    (- (FuncCallOrArray
                        add_real
                        []
                        [(()
                        x
                        ()
                        0)
                        (()
                        y
                        ()
                        0)]
                        []
                        []
                        []
                    ) (Real "12.3"))
                    ()
                    0)]
                    []
                    []
                    []
                ) (Real "1e-5"))
                [(ErrorStop
                    0
                    ()
                    ()
                    ()
                )]
                []
                ()
                ()
                ()
            )]
            []
            []
        )]
    )
    (Program
        template_nested
        ()
        [(Use
            []
            template_nested_m
            []
            .false.
            ()
        )]
        [(ImplicitNone
            []
            (TriviaNode
                []
                [(EndOfLine)
                (EndOfLine)]
            )
        )]
        []
        [(SubroutineCall
            0
            test_template
            []
            []
            []
            []
            (TriviaNode
                []
                [(EndOfLine)
                (EndOfLine)]
            )
        )]
        []
    )]
)
