/**********************************************************************/
/*   ____  ____                                                       */
/*  /   /\/   /                                                       */
/* /___/  \  /                                                        */
/* \   \   \/                                                         */
/*  \   \        Copyright (c) 2003-2007 Xilinx, Inc.                 */
/*  /   /        All Right Reserved.                                  */
/* /---/   /\                                                         */
/* \   \  /  \                                                        */
/*  \___\/\___\                                                       */
/**********************************************************************/

/* This file is designed for use with ISim build 0x3dc07899 */

#include "xsi.h"
#include <memory.h>
#ifdef __GNUC__
#include <stdlib.h>
#else
#include <malloc.h>
#define alloca _alloca
#endif
static const char *ng0 = "//tf204.see.ed.ac.uk/kbenkrid/myhome/Teaching/2009_2010/Gateway/HelloWorldSynchronous_Lab3/HelloSynchronousWorld.v";



static void Always_28_0(char *t0)
{
    char t6[8];
    char *t1;
    char *t2;
    char *t3;
    char *t4;
    char *t5;
    unsigned int t7;
    unsigned int t8;
    unsigned int t9;
    unsigned int t10;
    unsigned int t11;
    unsigned int t12;
    unsigned int t13;
    unsigned int t14;

LAB0:    t1 = (t0 + 1536U);
    t2 = *((char **)t1);
    if (t2 == 0)
        goto LAB2;

LAB3:    goto *t2;

LAB2:    xsi_set_current_line(28, ng0);
    t2 = (t0 + 1732);
    *((int *)t2) = 1;
    t3 = (t0 + 1564);
    *((char **)t3) = t2;
    *((char **)t1) = &&LAB4;

LAB1:    return;
LAB4:    xsi_set_current_line(28, ng0);

LAB5:    xsi_set_current_line(29, ng0);
    t4 = (t0 + 692U);
    t5 = *((char **)t4);
    t4 = (t0 + 920);
    xsi_vlogvar_generic_wait_assign_value(t4, t5, 2, 0, 0, 1, 0LL);
    xsi_set_current_line(30, ng0);
    t2 = (t0 + 692U);
    t3 = *((char **)t2);
    memset(t6, 0, 8);
    t2 = (t6 + 4);
    t4 = (t3 + 4);
    t7 = *((unsigned int *)t3);
    t8 = (~(t7));
    *((unsigned int *)t6) = t8;
    *((unsigned int *)t2) = 0;
    if (*((unsigned int *)t4) != 0)
        goto LAB7;

LAB6:    t13 = *((unsigned int *)t6);
    *((unsigned int *)t6) = (t13 & 1U);
    t14 = *((unsigned int *)t2);
    *((unsigned int *)t2) = (t14 & 1U);
    t5 = (t0 + 1012);
    xsi_vlogvar_generic_wait_assign_value(t5, t6, 2, 0, 0, 1, 0LL);
    goto LAB2;

LAB7:    t9 = *((unsigned int *)t6);
    t10 = *((unsigned int *)t4);
    *((unsigned int *)t6) = (t9 | t10);
    t11 = *((unsigned int *)t2);
    t12 = *((unsigned int *)t4);
    *((unsigned int *)t2) = (t11 | t12);
    goto LAB6;

}


extern void work_m_00000000000583616868_2288942171_init()
{
	static char *pe[] = {(void *)Always_28_0};
	xsi_register_didat("work_m_00000000000583616868_2288942171", "isim/HelloSynchronousWorldTB_isim_beh.exe.sim/work/m_00000000000583616868_2288942171.didat");
	xsi_register_executes(pe);
}
