/**********************************************************************/
/*   ____  ____                                                       */
/*  /   /\/   /                                                       */
/* /___/  \  /                                                        */
/* \   \   \/                                                         */
/*  \   \        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/HelloSynchronousWorldTB.v";
static int ng1[] = {0, 0};
static int ng2[] = {1, 0};



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

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

LAB3:    goto *t2;

LAB2:    xsi_set_current_line(43, ng0);

LAB4:    xsi_set_current_line(44, ng0);
    t2 = ((char*)((ng1)));
    t3 = (t0 + 920);
    xsi_vlogvar_assign_value(t3, t2, 0, 0, 1);
    xsi_set_current_line(45, ng0);

LAB5:    xsi_set_current_line(45, ng0);
    t2 = (t0 + 1436);
    xsi_process_wait(t2, 100000LL);
    *((char **)t1) = &&LAB6;

LAB1:    return;
LAB6:    xsi_set_current_line(45, ng0);
    t3 = (t0 + 920);
    t5 = (t3 + 36U);
    t6 = *((char **)t5);
    memset(t4, 0, 8);
    t7 = (t4 + 4);
    t8 = (t6 + 4);
    t9 = *((unsigned int *)t6);
    t10 = (~(t9));
    *((unsigned int *)t4) = t10;
    *((unsigned int *)t7) = 0;
    if (*((unsigned int *)t8) != 0)
        goto LAB8;

LAB7:    t15 = *((unsigned int *)t4);
    *((unsigned int *)t4) = (t15 & 1U);
    t16 = *((unsigned int *)t7);
    *((unsigned int *)t7) = (t16 & 1U);
    t17 = (t0 + 920);
    xsi_vlogvar_assign_value(t17, t4, 0, 0, 1);
    goto LAB5;

LAB8:    t11 = *((unsigned int *)t4);
    t12 = *((unsigned int *)t8);
    *((unsigned int *)t4) = (t11 | t12);
    t13 = *((unsigned int *)t7);
    t14 = *((unsigned int *)t8);
    *((unsigned int *)t7) = (t13 | t14);
    goto LAB7;

LAB9:    goto LAB1;

}

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

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

LAB3:    goto *t2;

LAB2:    xsi_set_current_line(48, ng0);

LAB4:    xsi_set_current_line(50, ng0);
    t2 = ((char*)((ng1)));
    t3 = (t0 + 1012);
    xsi_vlogvar_assign_value(t3, t2, 0, 0, 1);
    xsi_set_current_line(52, ng0);
    t2 = (t0 + 1580);
    xsi_process_wait(t2, 50000LL);
    *((char **)t1) = &&LAB5;

LAB1:    return;
LAB5:    xsi_set_current_line(52, ng0);
    t3 = ((char*)((ng2)));
    t4 = (t0 + 1012);
    xsi_vlogvar_assign_value(t4, t3, 0, 0, 1);
    xsi_set_current_line(53, ng0);
    t2 = (t0 + 1580);
    xsi_process_wait(t2, 50000LL);
    *((char **)t1) = &&LAB6;
    goto LAB1;

LAB6:    xsi_set_current_line(53, ng0);
    t3 = ((char*)((ng1)));
    t4 = (t0 + 1012);
    xsi_vlogvar_assign_value(t4, t3, 0, 0, 1);
    xsi_set_current_line(54, ng0);
    t2 = (t0 + 1580);
    xsi_process_wait(t2, 200000LL);
    *((char **)t1) = &&LAB7;
    goto LAB1;

LAB7:    xsi_set_current_line(54, ng0);
    t3 = ((char*)((ng2)));
    t4 = (t0 + 1012);
    xsi_vlogvar_assign_value(t4, t3, 0, 0, 1);
    xsi_set_current_line(55, ng0);
    t2 = (t0 + 1580);
    xsi_process_wait(t2, 200000LL);
    *((char **)t1) = &&LAB8;
    goto LAB1;

LAB8:    xsi_set_current_line(55, ng0);
    t3 = ((char*)((ng1)));
    t4 = (t0 + 1012);
    xsi_vlogvar_assign_value(t4, t3, 0, 0, 1);
    xsi_set_current_line(56, ng0);
    t2 = (t0 + 1580);
    xsi_process_wait(t2, 20000LL);
    *((char **)t1) = &&LAB9;
    goto LAB1;

LAB9:    xsi_set_current_line(56, ng0);
    t3 = (t0 + 1012);
    t4 = (t3 + 36U);
    t6 = *((char **)t4);
    memset(t5, 0, 8);
    t7 = (t5 + 4);
    t8 = (t6 + 4);
    t9 = *((unsigned int *)t6);
    t10 = (~(t9));
    *((unsigned int *)t5) = t10;
    *((unsigned int *)t7) = 0;
    if (*((unsigned int *)t8) != 0)
        goto LAB11;

LAB10:    t15 = *((unsigned int *)t5);
    *((unsigned int *)t5) = (t15 & 1U);
    t16 = *((unsigned int *)t7);
    *((unsigned int *)t7) = (t16 & 1U);
    t17 = (t0 + 1012);
    xsi_vlogvar_assign_value(t17, t5, 0, 0, 1);
    xsi_set_current_line(57, ng0);
    t2 = (t0 + 1580);
    xsi_process_wait(t2, 20000LL);
    *((char **)t1) = &&LAB12;
    goto LAB1;

LAB11:    t11 = *((unsigned int *)t5);
    t12 = *((unsigned int *)t8);
    *((unsigned int *)t5) = (t11 | t12);
    t13 = *((unsigned int *)t7);
    t14 = *((unsigned int *)t8);
    *((unsigned int *)t7) = (t13 | t14);
    goto LAB10;

LAB12:    xsi_set_current_line(57, ng0);
    t3 = (t0 + 1012);
    t4 = (t3 + 36U);
    t6 = *((char **)t4);
    memset(t5, 0, 8);
    t7 = (t5 + 4);
    t8 = (t6 + 4);
    t9 = *((unsigned int *)t6);
    t10 = (~(t9));
    *((unsigned int *)t5) = t10;
    *((unsigned int *)t7) = 0;
    if (*((unsigned int *)t8) != 0)
        goto LAB14;

LAB13:    t15 = *((unsigned int *)t5);
    *((unsigned int *)t5) = (t15 & 1U);
    t16 = *((unsigned int *)t7);
    *((unsigned int *)t7) = (t16 & 1U);
    t17 = (t0 + 1012);
    xsi_vlogvar_assign_value(t17, t5, 0, 0, 1);
    xsi_set_current_line(58, ng0);
    t2 = (t0 + 1580);
    xsi_process_wait(t2, 20000LL);
    *((char **)t1) = &&LAB15;
    goto LAB1;

LAB14:    t11 = *((unsigned int *)t5);
    t12 = *((unsigned int *)t8);
    *((unsigned int *)t5) = (t11 | t12);
    t13 = *((unsigned int *)t7);
    t14 = *((unsigned int *)t8);
    *((unsigned int *)t7) = (t13 | t14);
    goto LAB13;

LAB15:    xsi_set_current_line(58, ng0);
    t3 = (t0 + 1012);
    t4 = (t3 + 36U);
    t6 = *((char **)t4);
    memset(t5, 0, 8);
    t7 = (t5 + 4);
    t8 = (t6 + 4);
    t9 = *((unsigned int *)t6);
    t10 = (~(t9));
    *((unsigned int *)t5) = t10;
    *((unsigned int *)t7) = 0;
    if (*((unsigned int *)t8) != 0)
        goto LAB17;

LAB16:    t15 = *((unsigned int *)t5);
    *((unsigned int *)t5) = (t15 & 1U);
    t16 = *((unsigned int *)t7);
    *((unsigned int *)t7) = (t16 & 1U);
    t17 = (t0 + 1012);
    xsi_vlogvar_assign_value(t17, t5, 0, 0, 1);
    xsi_set_current_line(59, ng0);
    t2 = (t0 + 1580);
    xsi_process_wait(t2, 20000LL);
    *((char **)t1) = &&LAB18;
    goto LAB1;

LAB17:    t11 = *((unsigned int *)t5);
    t12 = *((unsigned int *)t8);
    *((unsigned int *)t5) = (t11 | t12);
    t13 = *((unsigned int *)t7);
    t14 = *((unsigned int *)t8);
    *((unsigned int *)t7) = (t13 | t14);
    goto LAB16;

LAB18:    xsi_set_current_line(59, ng0);
    t3 = (t0 + 1012);
    t4 = (t3 + 36U);
    t6 = *((char **)t4);
    memset(t5, 0, 8);
    t7 = (t5 + 4);
    t8 = (t6 + 4);
    t9 = *((unsigned int *)t6);
    t10 = (~(t9));
    *((unsigned int *)t5) = t10;
    *((unsigned int *)t7) = 0;
    if (*((unsigned int *)t8) != 0)
        goto LAB20;

LAB19:    t15 = *((unsigned int *)t5);
    *((unsigned int *)t5) = (t15 & 1U);
    t16 = *((unsigned int *)t7);
    *((unsigned int *)t7) = (t16 & 1U);
    t17 = (t0 + 1012);
    xsi_vlogvar_assign_value(t17, t5, 0, 0, 1);
    xsi_set_current_line(60, ng0);
    t2 = (t0 + 1580);
    xsi_process_wait(t2, 20000LL);
    *((char **)t1) = &&LAB21;
    goto LAB1;

LAB20:    t11 = *((unsigned int *)t5);
    t12 = *((unsigned int *)t8);
    *((unsigned int *)t5) = (t11 | t12);
    t13 = *((unsigned int *)t7);
    t14 = *((unsigned int *)t8);
    *((unsigned int *)t7) = (t13 | t14);
    goto LAB19;

LAB21:    xsi_set_current_line(60, ng0);
    t3 = (t0 + 1012);
    t4 = (t3 + 36U);
    t6 = *((char **)t4);
    memset(t5, 0, 8);
    t7 = (t5 + 4);
    t8 = (t6 + 4);
    t9 = *((unsigned int *)t6);
    t10 = (~(t9));
    *((unsigned int *)t5) = t10;
    *((unsigned int *)t7) = 0;
    if (*((unsigned int *)t8) != 0)
        goto LAB23;

LAB22:    t15 = *((unsigned int *)t5);
    *((unsigned int *)t5) = (t15 & 1U);
    t16 = *((unsigned int *)t7);
    *((unsigned int *)t7) = (t16 & 1U);
    t17 = (t0 + 1012);
    xsi_vlogvar_assign_value(t17, t5, 0, 0, 1);
    xsi_set_current_line(61, ng0);
    t2 = (t0 + 1580);
    xsi_process_wait(t2, 20000LL);
    *((char **)t1) = &&LAB24;
    goto LAB1;

LAB23:    t11 = *((unsigned int *)t5);
    t12 = *((unsigned int *)t8);
    *((unsigned int *)t5) = (t11 | t12);
    t13 = *((unsigned int *)t7);
    t14 = *((unsigned int *)t8);
    *((unsigned int *)t7) = (t13 | t14);
    goto LAB22;

LAB24:    xsi_set_current_line(61, ng0);
    t3 = (t0 + 1012);
    t4 = (t3 + 36U);
    t6 = *((char **)t4);
    memset(t5, 0, 8);
    t7 = (t5 + 4);
    t8 = (t6 + 4);
    t9 = *((unsigned int *)t6);
    t10 = (~(t9));
    *((unsigned int *)t5) = t10;
    *((unsigned int *)t7) = 0;
    if (*((unsigned int *)t8) != 0)
        goto LAB26;

LAB25:    t15 = *((unsigned int *)t5);
    *((unsigned int *)t5) = (t15 & 1U);
    t16 = *((unsigned int *)t7);
    *((unsigned int *)t7) = (t16 & 1U);
    t17 = (t0 + 1012);
    xsi_vlogvar_assign_value(t17, t5, 0, 0, 1);
    xsi_set_current_line(62, ng0);
    t2 = (t0 + 1580);
    xsi_process_wait(t2, 20000LL);
    *((char **)t1) = &&LAB27;
    goto LAB1;

LAB26:    t11 = *((unsigned int *)t5);
    t12 = *((unsigned int *)t8);
    *((unsigned int *)t5) = (t11 | t12);
    t13 = *((unsigned int *)t7);
    t14 = *((unsigned int *)t8);
    *((unsigned int *)t7) = (t13 | t14);
    goto LAB25;

LAB27:    xsi_set_current_line(62, ng0);
    t3 = (t0 + 1012);
    t4 = (t3 + 36U);
    t6 = *((char **)t4);
    memset(t5, 0, 8);
    t7 = (t5 + 4);
    t8 = (t6 + 4);
    t9 = *((unsigned int *)t6);
    t10 = (~(t9));
    *((unsigned int *)t5) = t10;
    *((unsigned int *)t7) = 0;
    if (*((unsigned int *)t8) != 0)
        goto LAB29;

LAB28:    t15 = *((unsigned int *)t5);
    *((unsigned int *)t5) = (t15 & 1U);
    t16 = *((unsigned int *)t7);
    *((unsigned int *)t7) = (t16 & 1U);
    t17 = (t0 + 1012);
    xsi_vlogvar_assign_value(t17, t5, 0, 0, 1);
    xsi_set_current_line(63, ng0);
    t2 = (t0 + 1580);
    xsi_process_wait(t2, 20000LL);
    *((char **)t1) = &&LAB30;
    goto LAB1;

LAB29:    t11 = *((unsigned int *)t5);
    t12 = *((unsigned int *)t8);
    *((unsigned int *)t5) = (t11 | t12);
    t13 = *((unsigned int *)t7);
    t14 = *((unsigned int *)t8);
    *((unsigned int *)t7) = (t13 | t14);
    goto LAB28;

LAB30:    xsi_set_current_line(63, ng0);
    t3 = (t0 + 1012);
    t4 = (t3 + 36U);
    t6 = *((char **)t4);
    memset(t5, 0, 8);
    t7 = (t5 + 4);
    t8 = (t6 + 4);
    t9 = *((unsigned int *)t6);
    t10 = (~(t9));
    *((unsigned int *)t5) = t10;
    *((unsigned int *)t7) = 0;
    if (*((unsigned int *)t8) != 0)
        goto LAB32;

LAB31:    t15 = *((unsigned int *)t5);
    *((unsigned int *)t5) = (t15 & 1U);
    t16 = *((unsigned int *)t7);
    *((unsigned int *)t7) = (t16 & 1U);
    t17 = (t0 + 1012);
    xsi_vlogvar_assign_value(t17, t5, 0, 0, 1);
    xsi_set_current_line(64, ng0);
    t2 = (t0 + 1580);
    xsi_process_wait(t2, 20000LL);
    *((char **)t1) = &&LAB33;
    goto LAB1;

LAB32:    t11 = *((unsigned int *)t5);
    t12 = *((unsigned int *)t8);
    *((unsigned int *)t5) = (t11 | t12);
    t13 = *((unsigned int *)t7);
    t14 = *((unsigned int *)t8);
    *((unsigned int *)t7) = (t13 | t14);
    goto LAB31;

LAB33:    xsi_set_current_line(64, ng0);
    t3 = (t0 + 1012);
    t4 = (t3 + 36U);
    t6 = *((char **)t4);
    memset(t5, 0, 8);
    t7 = (t5 + 4);
    t8 = (t6 + 4);
    t9 = *((unsigned int *)t6);
    t10 = (~(t9));
    *((unsigned int *)t5) = t10;
    *((unsigned int *)t7) = 0;
    if (*((unsigned int *)t8) != 0)
        goto LAB35;

LAB34:    t15 = *((unsigned int *)t5);
    *((unsigned int *)t5) = (t15 & 1U);
    t16 = *((unsigned int *)t7);
    *((unsigned int *)t7) = (t16 & 1U);
    t17 = (t0 + 1012);
    xsi_vlogvar_assign_value(t17, t5, 0, 0, 1);
    xsi_set_current_line(67, ng0);
    t2 = (t0 + 1580);
    xsi_process_wait(t2, 100000LL);
    *((char **)t1) = &&LAB36;
    goto LAB1;

LAB35:    t11 = *((unsigned int *)t5);
    t12 = *((unsigned int *)t8);
    *((unsigned int *)t5) = (t11 | t12);
    t13 = *((unsigned int *)t7);
    t14 = *((unsigned int *)t8);
    *((unsigned int *)t7) = (t13 | t14);
    goto LAB34;

LAB36:    goto LAB1;

}


extern void work_m_00000000000656308057_2876201699_init()
{
	static char *pe[] = {(void *)Initial_43_0,(void *)Initial_48_1};
	xsi_register_didat("work_m_00000000000656308057_2876201699", "isim/HelloSynchronousWorldTB_isim_beh.exe.sim/work/m_00000000000656308057_2876201699.didat");
	xsi_register_executes(pe);
}
