/*
 *      Copyright (c) 2023, an unpublished work by CodeSecure, Inc.
 *                      ALL RIGHTS RESERVED
 *
 *      Copyright (c) 2008-2023, an unpublished work by GrammaTech, Inc.
 *                      ALL RIGHTS RESERVED
 *
 *      This software is furnished under a license and may be used and
 *      copied only in accordance with the terms of such license and the       
 *      inclusion of the above copyright notice.  This software or any
 *      other copies thereof may not be provided or otherwise made
 *      available to any other person.  Title to and ownership of the
 *      software is retained by CodeSecure, Inc.
 */

void openParen(void){putchar( '(' );}
void closeParen(void){putchar( ')' );}
void openBracket(void){putchar( '[' );}
void closeBracket(void){putchar( ']' );}

int unknown_value(void);

void foo(void)
{
    int i = unknown_value(), j = unknown_value();
    if( j )
    {
        openParen();
    }
    else
    {
        openBracket();
    }
    closeParen();
    openParen();
    if( i )
    {
        closeParen();
        i = 5;
    }
    else
    {
        i = 6;
    }
    if( j )
        closeParen();
}

void bar(void)
{
    int i = unknown_value(), j = unknown_value();
    if( i )
        openParen();
    if( j )
    {
        openParen();
    }
    else
    {
        openBracket();
    }
    if( j )
    {
        closeParen();
    }
    else
    {
        closeBracket();
    }
    if( i )
        closeParen();
}
