[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[csmith-dev] Unions in C program: referee needed



Hello,

something funny is happening with a Csmith-generated program.
Csmith claims it is defined (I think. I didn't use dangerous options),
Frama-C's value analysis thinks it's not, and I am not quite sure
how to arbitrate between them.

This is with version, options and seed:

 * Git version: 01a9384
 * Options:   --max-pointer-depth 3 --max-funcs 2 --max-array-dim 2 --max-array-len-per-dim 3 --max-struct-fields 5 --no-volatiles --no-argc --unions
 * Seed:      1647756027

Executing the program works fine (with 64-bit, little-endian GCC):
checksum = 682193FB

On the other hand, the value analysis chokes shortly after line 628:
    transparent_crc(g_118.f0, "g_118.f0", print_hash_value);

Instrumenting the program to get details, it says it thinks that at that point:

        g_118{.f0[bits 0 to 7]; .f1.f0; .f2.f0.f0.f0; .f3.f0.f0.f0[bits 0 to 7]; } ∈
             {77}
             {.f0[bits 8 to 31]; .f1.[bits 8 to 31]; .f2.f0.f0.[bits 8 to 31]; .f3.f0.f0{.f0[bits 8 to 15]; .f1; }; } ∈
             UNINITIALIZED
             {.f0[bits 32 to 63]; .f1.[bits 32 to 63]; .f2.f0.f0.f1; .f3.f0.f0.f2; } ∈
             {2683586253}
             {.f0[bits 64 to 71]; .f1; .f2.f0.f0.f2; .f3.f0.f1[bits 0 to 7]; } ∈
             {0}
             {.f0[bits 72 to 95]; .f1.[bits 72 to 95]; .f2.f0.f0.[bits 72 to 95]; .f3.f0.f1[bits 8 to 31]; } ∈
             UNINITIALIZED
             {.f0[bits 96 to 447]; .f1.[bits 96 to 447]; .f2.[bits 96 to 447]; .f3{.f0{.f1[bits 32 to 63]; .f2; .[bits 224 to 255]; }; .f1; .f2; .f3; .[bits 288 to 319]; }; } ∈
             {0}

There are quite a few uninitialized bits in member g_118.f0, so it is right to complain, but the question is whether the values it has computed can be trusted.

My computer does not support the awatch command in GDB for some reason, so I am a little naked here. The best continuation I know is:

$ gdb a.out
...
(gdb) break transparent_crc
Breakpoint 1 at 0x4016f3: file runtime/csmith.h, line 113.
(gdb) run
Starting program: /home/cuoq/csmith_new/a.out

Breakpoint 1, transparent_crc (val=123, vname=0x403688 "g_4.f0.f0.f0", flag=0) at runtime/csmith.h:113
113        crc32_8bytes(val);
(gdb) print g_118
$1 = {f0 = 11525915192630181965, f1 = {f0 = 77 'M'}, f2 = {f0 = {f0 = {f0 = 77 'M', f1 = 2683586253, f2 = 0 '\000'}}}, f3 = {f0 = {f0 = {f0 = 77,
        f1 = 0, f2 = 2683586253}, f1 = 0, f2 = {f0 = 0 '\000', f1 = 0, f2 = 0 '\000'}}, f1 = 0, f2 = 0, f3 = 0}}

So execution and analysis seem to agree for the members that are initialized. Does anyone know how to determine for sure whether the second byte (for instance) is initialized or not? I tried executing twice, but the same result comes out (which does not prove anything. The program is deterministic and the stack may naturally always hold the same values part of it is used without initialization).

Pascal





/*
 * This is a RANDOMLY GENERATED PROGRAM.
 *
 * Generator: csmith 2.1.0
 * Git version: 01a9384
 * Options:   --max-pointer-depth 3 --max-funcs 2 --max-array-dim 2 --max-array-len-per-dim 3 --max-struct-fields 5 --no-volatiles --no-argc --unions
 * Seed:      1647756027
 */

#include "csmith.h"


static long __undefined;

/* --- Struct/Union Declarations --- */
struct S0 {
   int8_t  f0;
   uint32_t  f1;
   int8_t  f2;
};

struct S2 {
   const int16_t  f0;
   int16_t  f1;
   uint32_t  f2;
};

struct S3 {
   uint32_t  f0;
   uint32_t  f1;
};

struct S4 {
   const struct S2  f0;
   uint64_t  f1;
   struct S0  f2;
};

struct S5 {
   struct S0  f0;
};

struct S6 {
   struct S3  f0;
   uint32_t  f1;
   int16_t  f2;
   uint8_t  f3;
   struct S4  f4;
};

struct S8 {
   int8_t  f0;
};

struct S9 {
   struct S5  f0;
};

union U10 {
   struct S0  f0;
   const uint32_t  f1;
};

union U11 {
   const uint32_t  f0;
};

struct S7 {
   struct S4  f0;
   uint32_t  f1;
   uint64_t  f2;
   int64_t  f3;
};

union U12 {
   uint64_t  f0;
   const struct S8  f1;
   struct S9  f2;
   struct S7  f3;
};

union U13 {
   const int8_t * f0;
};

/* --- GLOBAL VARIABLES --- */
static struct S9 g_4 = {{{0x7BL,0x35240CA7L,0x05L}}};
static union U10 g_6 = {{-8L,4294967295UL,0xC4L}};
static struct S6 g_7[3] = {{{1UL,0x8F0BD907L},0x4E7CCCE1L,-2L,0UL,{{0L,0xBBDAL,4294967295UL},0x51CD25BB5A27557BLL,{9L,4UL,0x75L}}}, {{1UL,0x8F0BD907L},0x4E7CCCE1L,-2L,0UL,{{0L,0xBBDAL,4294967295UL},0x51CD25BB5A27557BLL,{9L,4UL,0x75L}}}, {{1UL,0x8F0BD907L},0x4E7CCCE1L,-2L,0UL,{{0L,0xBBDAL,4294967295UL},0x51CD25BB5A27557BLL,{9L,4UL,0x75L}}}};
static int32_t g_11 = 6L;
static const struct S9 g_17 = {{{0x84L,0xCF466DF4L,0L}}};
static const struct S9 g_19 = {{{6L,0x5584D571L,0x7FL}}};
static const struct S9 *g_18 = &g_19;
static const struct S9 g_21 = {{{0xACL,0xDEA28050L,0xB3L}}};
static const struct S9 *g_20 = &g_21;
static const struct S9 *g_22 = &g_4;
static const struct S5 *g_23 = &g_19.f0;
static int16_t g_45 = (-4L);
static struct S8 g_48 = {1L};
static struct S8 g_51 = {0xC8L};
static struct S2 g_53 = {0x9311L,0x0996L,0x0D2C1345L};
static struct S2 *g_52[2][1] = {{&g_53}, {&g_53}};
static struct S2 g_62[1] = {{0x9C3BL,0xD0C5L,0UL}};
static union U13 g_67 = {0};
static union U13 *g_66 = &g_67;
static uint32_t g_73 = 4294967295UL;
static uint16_t g_85 = 0x77B5L;
static struct S5 g_103 = {{1L,0xA85F2F1DL,0xF4L}};
static int32_t g_116 = 0x3B5FD391L;
static union U12 g_118 = {18446744073709551607UL};
static union U12 *g_117 = &g_118;
static struct S5 *g_126 = (void*)0;
static struct S4 *g_131 = &g_7[2].f4;
static struct S4 **g_130 = &g_131;
static struct S4 ***g_129[3] = {&g_130, &g_130, &g_130};
static union U11 g_148 = {8UL};
static uint32_t g_161 = 4294967295UL;
static int64_t g_198 = 0xE5330FB9BA10F666LL;
static int32_t g_199 = 5L;
static int16_t g_200 = (-5L);
static int8_t g_208 = 1L;


/* --- FORWARD DECLARATIONS --- */
static const int8_t  func_1(void);
static int32_t  func_2(struct S9  p_3);


/* --- FUNCTIONS --- */
/* ------------------------------------------ */
/* 
 * reads : g_4 g_6 g_7 g_11 g_6.f0.f0 g_23 g_45 g_48 g_52 g_66 g_73 g_6.f0.f2 g_17.f0.f0.f1 g_62.f2 g_116 g_117 g_21.f0.f0.f0 g_51.f0 g_129 g_118.f3.f0.f1 g_148 g_148.f0 g_161 g_118.f3.f0.f2.f1 g_21.f0.f0.f1 g_118.f2.f0.f0.f1 g_103.f0.f0 g_118.f3.f1 g_6.f0.f1 g_19.f0 g_200 g_208 g_85
 * writes: g_7.f1 g_11 g_6.f0.f0 g_18 g_20 g_22 g_23 g_45 g_48 g_51 g_52 g_4.f0.f0.f1 g_73 g_4.f0.f0.f2 g_85 g_4.f0 g_103 g_117 g_6.f0.f2 g_126 g_129 g_118.f2.f0 g_118.f3.f0.f1 g_7.f4.f1 g_161 g_118.f3.f0.f2.f1 g_7.f0 g_118.f3.f1 g_6.f0.f1 g_200 g_208
 */
static const int8_t  func_1(void)
{ /* block id: 0 */
    int32_t *l_203 = &g_11;
    int32_t *l_204 = &g_11;
    int32_t *l_205 = &g_199;
    int32_t *l_206 = &g_199;
    int32_t *l_207[3][1];
    int i, j;
    for (i = 0; i < 3; i++)
    {
        for (j = 0; j < 1; j++)
            l_207[i][j] = (void*)0;
    }
    (*l_203) = func_2(g_4);
    g_208++;
    return g_85;
}


/* ------------------------------------------ */
/* 
 * reads : g_6 g_7 g_11 g_6.f0.f0 g_23 g_45 g_48 g_52 g_66 g_73 g_4.f0.f0.f2 g_4.f0.f0 g_6.f0.f2 g_17.f0.f0.f1 g_62.f2 g_116 g_117 g_21.f0.f0.f0 g_51.f0 g_129 g_118.f3.f0.f1 g_148 g_148.f0 g_161 g_118.f3.f0.f2.f1 g_21.f0.f0.f1 g_118.f2.f0.f0.f1 g_103.f0.f0 g_118.f3.f1 g_6.f0.f1 g_19.f0 g_200
 * writes: g_7.f1 g_11 g_6.f0.f0 g_18 g_20 g_22 g_23 g_45 g_48 g_51 g_52 g_4.f0.f0.f1 g_73 g_4.f0.f0.f2 g_85 g_4.f0 g_103 g_117 g_6.f0.f2 g_126 g_129 g_118.f2.f0 g_118.f3.f0.f1 g_7.f4.f1 g_161 g_118.f3.f0.f2.f1 g_7.f0 g_118.f3.f1 g_6.f0.f1 g_200
 */
static int32_t  func_2(struct S9  p_3)
{ /* block id: 1 */
    struct S9 l_5 = {{{0x4DL,0x9FF446CDL,0xFEL}}};
    uint32_t *l_8 = &g_7[2].f1;
    int32_t l_9 = 0x9ADD9258L;
    int32_t *l_10 = &g_11;
    struct S8 l_50 = {-8L};
    struct S5 *l_58[2];
    struct S4 *l_65 = (void*)0;
    int32_t l_123 = (-6L);
    int i;
    for (i = 0; i < 2; i++)
        l_58[i] = &l_5.f0;
    p_3 = l_5;
    (*l_10) |= (g_6 , (p_3.f0.f0.f2 < (p_3.f0.f0.f0 >= (g_7[2] , ((g_7[2].f4.f0.f2 | (((l_9 &= ((*l_8) = g_7[2].f4.f2.f0)) , (((l_5.f0.f0.f0 && g_7[2].f4.f2.f0) , g_7[2].f2) , p_3.f0.f0.f0)) , 0x43FDL)) && l_5.f0.f0.f1)))));
    if (p_3.f0.f0.f2)
    { /* block id: 6 */
        uint16_t l_27[1];
        int32_t l_40 = 1L;
        int32_t *l_77 = &g_11;
        struct S9 l_86 = {{{1L,0x679535C3L,0xBFL}}};
        int16_t *l_110 = &g_45;
        struct S5 **l_112[3];
        int i;
        for (i = 0; i < 1; i++)
            l_27[i] = 65535UL;
        for (i = 0; i < 3; i++)
            l_112[i] = &l_58[1];
        if (p_3.f0.f0.f1)
        { /* block id: 7 */
            union U12 l_14 = {0x5AEBC5F7C0CB0A75LL};
            uint32_t l_30 = 0UL;
            int32_t l_42 = 0x8F49E03BL;
            struct S5 *l_57 = &l_5.f0;
            struct S2 *l_61 = &g_62[0];
            struct S4 l_72 = {{-1L,0xD5B7L,4294967293UL},1UL,{0x82L,0xD6D778B1L,0x88L}};
            struct S2 **l_88[1][2];
            int i, j;
            for (i = 0; i < 1; i++)
            {
                for (j = 0; j < 2; j++)
                    l_88[i][j] = &g_52[0][0];
            }
            for (g_6.f0.f0 = 0; (g_6.f0.f0 >= 8); g_6.f0.f0++)
            { /* block id: 10 */
                uint16_t l_32 = 0UL;
                struct S8 *l_49[1];
                struct S2 **l_54[2][2];
                int16_t *l_55 = (void*)0;
                int32_t l_56 = (-1L);
                int i, j;
                for (i = 0; i < 1; i++)
                    l_49[i] = &g_48;
                for (i = 0; i < 2; i++)
                {
                    for (j = 0; j < 2; j++)
                        l_54[i][j] = &g_52[1][0];
                }
                if (g_7[2].f0.f0)
                { /* block id: 11 */
                    const struct S9 *l_16 = &g_17;
                    const struct S9 **l_15[2][1];
                    int i, j;
                    for (i = 0; i < 2; i++)
                    {
                        for (j = 0; j < 1; j++)
                            l_15[i][j] = &l_16;
                    }
                    g_22 = (l_14 , (g_20 = (g_18 = (void*)0)));
                }
                else
                { /* block id: 15 */
                    const struct S5 **l_24[3];
                    int i;
                    for (i = 0; i < 3; i++)
                        l_24[i] = &g_23;
                    g_23 = g_23;
                    for (l_14.f3.f0.f2.f0 = 0; (l_14.f3.f0.f2.f0 != (-14)); l_14.f3.f0.f2.f0--)
                    { /* block id: 19 */
                        int32_t *l_31 = &l_9;
                        if (g_7[2].f1)
                            break;
                        l_27[0]--;
                        l_32 |= ((*l_31) = (g_11 = (g_7[2].f0 , l_30)));
                    }
                    for (l_14.f2.f0.f0.f1 = 9; (l_14.f2.f0.f0.f1 == 25); l_14.f2.f0.f0.f1++)
                    { /* block id: 28 */
                        if (p_3.f0.f0.f1)
                            break;
                    }
                    for (l_5.f0.f0.f1 = 12; (l_5.f0.f0.f1 < 58); l_5.f0.f0.f1 = safe_add_func_int32_t_s_s(l_5.f0.f0.f1, 2))
                    { /* block id: 33 */
                        int32_t *l_37 = &l_9;
                        int32_t *l_41 = &l_9;
                        int32_t *l_43 = &l_9;
                        int32_t *l_44[3];
                        int i;
                        for (i = 0; i < 3; i++)
                            l_44[i] = &g_11;
                        if (l_32)
                            break;
                        (*l_37) &= ((*l_10) = (p_3.f0.f0.f0 , l_30));
                        l_40 ^= (!(safe_add_func_uint64_t_u_u(p_3.f0.f0.f2, l_27[0])));
                        g_45++;
                    }
                }
                g_51 = (l_50 = (g_48 = g_48));
                g_52[0][0] = g_52[0][0];
                l_58[1] = ((l_56 &= (l_30 , 0xB8BFL)) , l_57);
            }
            for (g_11 = 26; (g_11 != 24); --g_11)
            { /* block id: 50 */
                struct S4 *l_63[2];
                int32_t *l_69[2];
                int i;
                for (i = 0; i < 2; i++)
                    l_63[i] = (void*)0;
                for (i = 0; i < 2; i++)
                    l_69[i] = &l_42;
                l_61 = &g_53;
                for (g_45 = 0; (g_45 <= 0); g_45 += 1)
                { /* block id: 54 */
                    union U13 *l_68 = &g_67;
                    int32_t **l_70 = (void*)0;
                    int32_t **l_71 = &l_10;
                    for (g_4.f0.f0.f1 = 0; (g_4.f0.f0.f1 <= 1); g_4.f0.f0.f1 += 1)
                    { /* block id: 57 */
                        struct S4 **l_64[3];
                        int i;
                        for (i = 0; i < 3; i++)
                            l_64[i] = &l_63[0];
                        l_65 = l_63[0];
                        l_40 |= l_27[g_45];
                    }
                    l_68 = g_66;
                    (*l_71) = (l_69[1] = l_69[1]);
                    g_73 &= (((l_72 , &l_72) == l_65) , (-6L));
                }
            }
            if ((+((g_45 | 0x73237F32L) && ((*l_10) != (252UL | (1L == (*l_10)))))))
            { /* block id: 67 */
                union U11 l_76[1] = {{0xA9E6B2CFL}};
                struct S2 **l_90[3][1];
                int32_t l_92[3];
                int i, j;
                for (i = 0; i < 3; i++)
                {
                    for (j = 0; j < 1; j++)
                        l_90[i][j] = &g_52[0][0];
                }
                for (i = 0; i < 3; i++)
                    l_92[i] = 6L;
                for (g_11 = 0; (g_11 <= (-16)); g_11 = safe_sub_func_uint8_t_u_u(g_11, 9))
                { /* block id: 70 */
                    int32_t **l_78 = &l_10;
                    int32_t **l_79 = (void*)0;
                    int32_t **l_80 = &l_77;
                    int32_t *l_93 = &l_42;
                    (*l_80) = ((*l_78) = (l_76[0] , l_77));
                    for (g_4.f0.f0.f2 = (-28); (g_4.f0.f0.f2 == 28); g_4.f0.f0.f2 = safe_add_func_int8_t_s_s(g_4.f0.f0.f2, 8))
                    { /* block id: 75 */
                        struct S9 *l_87 = &l_86;
                        struct S2 ***l_89[1][1];
                        int32_t *l_91 = (void*)0;
                        int i, j;
                        for (i = 0; i < 1; i++)
                        {
                            for (j = 0; j < 1; j++)
                                l_89[i][j] = &l_88[0][0];
                        }
                        g_85 = (safe_add_func_int8_t_s_s(p_3.f0.f0.f2, p_3.f0.f0.f2));
                        (*l_87) = l_86;
                        l_90[2][0] = l_88[0][0];
                        l_92[2] &= 0x6A621C59L;
                    }
                    (*l_93) = p_3.f0.f0.f0;
                }
            }
            else
            { /* block id: 83 */
                int32_t **l_94 = &l_77;
                const uint32_t l_97 = 4294967293UL;
                (*l_94) = &l_40;
                for (l_14.f2.f0.f0.f0 = 0; (l_14.f2.f0.f0.f0 < (-10)); --l_14.f2.f0.f0.f0)
                { /* block id: 87 */
                    (*l_77) |= l_97;
                    for (l_86.f0.f0.f1 = 0; (l_86.f0.f0.f1 > 55); l_86.f0.f0.f1 = safe_add_func_uint64_t_u_u(l_86.f0.f0.f1, 7))
                    { /* block id: 91 */
                        struct S9 *l_101 = &l_86;
                        struct S9 **l_100 = &l_101;
                        struct S0 *l_102 = &l_72.f2;
                        (*l_100) = &p_3;
                        if (p_3.f0.f0.f0)
                            break;
                        (*l_102) = g_4.f0.f0;
                    }
                    (*l_10) |= g_7[2].f2;
                    (*l_10) = (*l_10);
                }
            }
        }
        else
        { /* block id: 100 */
            uint16_t l_113 = 0x8598L;
            int32_t l_121 = (-7L);
            g_103 = (g_4.f0 = p_3.f0);
            for (g_45 = 1; (g_45 == (-7)); g_45 = safe_sub_func_uint16_t_u_u(g_45, 2))
            { /* block id: 105 */
                int16_t *l_108 = &g_62[0].f1;
                int16_t **l_109 = &l_108;
                int32_t **l_111 = &l_10;
                if ((safe_mul_func_int16_t_s_s((((((*l_109) = l_108) == l_110) & (&l_40 == ((*l_111) = &g_11))) ^ p_3.f0.f0.f0), (l_5.f0.f0.f2 , ((g_73 ^ (l_113 &= (((g_6.f0.f2 > (((*l_77) = (l_112[1] != &l_58[1])) & 0x96D85D56L)) ^ p_3.f0.f0.f1) , p_3.f0.f0.f0))) != g_17.f0.f0.f1)))))
                { /* block id: 110 */
                    g_11 = ((**l_111) || 65533UL);
                    (*l_10) ^= g_17.f0.f0.f1;
                    for (l_40 = 0; (l_40 <= (-7)); l_40 = safe_sub_func_int8_t_s_s(l_40, 3))
                    { /* block id: 115 */
                        return (*l_77);
                    }
                }
                else
                { /* block id: 118 */
                    int32_t l_120 = 5L;
                    if (g_62[0].f2)
                    { /* block id: 119 */
                        union U12 **l_119 = &g_117;
                        if (g_116)
                            break;
                        (*l_119) = g_117;
                        if (l_120)
                            break;
                        (*l_111) = &g_11;
                    }
                    else
                    { /* block id: 124 */
                        int32_t *l_122[1];
                        int i;
                        for (i = 0; i < 1; i++)
                            l_122[i] = &l_9;
                        l_40 = ((*l_77) = (l_121 ^= l_120));
                        if ((*l_10))
                            break;
                        return g_21.f0.f0.f0;
                    }
                }
                if (l_123)
                    break;
                for (g_6.f0.f2 = 0; (g_6.f0.f2 >= (-15)); g_6.f0.f2--)
                { /* block id: 135 */
                    g_126 = &g_103;
                }
            }
        }
        for (g_51.f0 = 0; (g_51.f0 > (-9)); g_51.f0 = safe_sub_func_int8_t_s_s(g_51.f0, 8))
        { /* block id: 142 */
            struct S4 ****l_132 = &g_129[0];
            (*l_132) = g_129[1];
            if (g_7[2].f4.f2.f2)
                continue;
            g_11 = (safe_div_func_uint16_t_u_u(p_3.f0.f0.f1, p_3.f0.f0.f2));
        }
        for (p_3.f0.f0.f2 = 0; (p_3.f0.f0.f2 >= 0); p_3.f0.f0.f2 -= 1)
        { /* block id: 149 */
            int i;
            g_118.f2.f0 = p_3.f0;
            return l_27[p_3.f0.f0.f2];
        }
    }
    else
    { /* block id: 153 */
        int32_t *l_137 = &l_9;
        int32_t l_147 = 0xDCEE3382L;
        int32_t **l_160 = &l_137;
        uint16_t l_170 = 0UL;
        struct S9 l_181[1][1] = {{{{{4L,1UL,0x90L}}}}};
        struct S3 l_184 = {4294967289UL,0UL};
        int32_t l_197 = 9L;
        int i, j;
        if (((*l_137) ^= (safe_lshift_func_uint8_t_u_s((5UL && (*l_10)), 1))))
        { /* block id: 155 */
            struct S4 **l_144 = &g_131;
            int32_t l_169 = 0xDC4DC97BL;
            struct S6 * const l_173[2][1] = {{&g_7[2]}, {&g_7[2]}};
            struct S6 *l_175 = &g_7[2];
            struct S6 **l_174 = &l_175;
            int i, j;
            for (g_48.f0 = 0; (g_48.f0 >= 16); g_48.f0 = safe_add_func_uint64_t_u_u(g_48.f0, 2))
            { /* block id: 158 */
                const struct S4 *l_143[2][1];
                const struct S4 **l_142 = &l_143[0][0];
                int i, j;
                for (i = 0; i < 2; i++)
                {
                    for (j = 0; j < 1; j++)
                        l_143[i][j] = (void*)0;
                }
                for (g_118.f3.f0.f1 = 0; (g_118.f3.f0.f1 > 60); g_118.f3.f0.f1++)
                { /* block id: 161 */
                    union U12 *l_145 = &g_118;
                    union U12 **l_146 = &g_117;
                    int32_t l_157[3][2];
                    int i, j;
                    for (i = 0; i < 3; i++)
                    {
                        for (j = 0; j < 2; j++)
                            l_157[i][j] = 0L;
                    }
                    (*l_137) &= (l_142 == l_144);
                    if ((&g_118 != ((*l_146) = l_145)))
                    { /* block id: 164 */
                        uint8_t l_155 = 0UL;
                        uint64_t *l_156 = &g_7[2].f4.f1;
                        int32_t **l_158[3];
                        int32_t ***l_159[2];
                        int i;
                        for (i = 0; i < 3; i++)
                            l_158[i] = &l_10;
                        for (i = 0; i < 2; i++)
                            l_159[i] = &l_158[0];
                        (*l_137) |= (l_147 | ((g_148 , (p_3.f0.f0.f0 , (safe_mod_func_int16_t_s_s((g_148.f0 , (safe_rshift_func_uint8_t_u_s(g_7[2].f4.f2.f1, ((safe_mod_func_int64_t_s_s(l_155, ((*l_156) |= ((*l_10) == p_3.f0.f0.f2)))) || l_157[0][0])))), g_7[2].f4.f0.f2)))) && 3L));
                        l_160 = (g_7[2] , l_158[2]);
                        ++g_161;
                        (*l_10) = (-1L);
                    }
                    else
                    { /* block id: 170 */
                        int64_t l_164 = 1L;
                        (*l_137) ^= l_164;
                        (*l_10) &= (safe_rshift_func_uint16_t_u_s(p_3.f0.f0.f1, 11));
                    }
                    return p_3.f0.f0.f2;
                }
                for (g_118.f3.f0.f2.f1 = 28; (g_118.f3.f0.f2.f1 <= 13); --g_118.f3.f0.f2.f1)
                { /* block id: 178 */
                    for (g_161 = 0; (g_161 <= 0); g_161 += 1)
                    { /* block id: 181 */
                        return l_169;
                    }
                    for (l_147 = 0; (l_147 <= 0); l_147 += 1)
                    { /* block id: 186 */
                        (**l_160) ^= l_170;
                    }
                    (**l_160) &= (g_11 <= (safe_sub_func_int64_t_s_s(g_116, g_21.f0.f0.f1)));
                }
            }
            (*l_174) = l_173[1][0];
        }
        else
        { /* block id: 193 */
            uint64_t l_176 = 1UL;
            int32_t *l_196[3][3];
            int i, j;
            for (i = 0; i < 3; i++)
            {
                for (j = 0; j < 3; j++)
                    l_196[i][j] = (void*)0;
            }
            if (l_176)
            { /* block id: 194 */
                struct S2 **l_189 = &g_52[0][0];
                struct S2 ***l_188 = &l_189;
                for (g_118.f2.f0.f0.f1 = 0; (g_118.f2.f0.f0.f1 <= 56); ++g_118.f2.f0.f0.f1)
                { /* block id: 197 */
                    for (g_103.f0.f0 = 0; (g_103.f0.f0 != 25); g_103.f0.f0 = safe_add_func_uint32_t_u_u(g_103.f0.f0, 8))
                    { /* block id: 200 */
                        return (*l_10);
                    }
                }
                (*l_137) ^= (l_181[0][0] , g_103.f0.f0);
                for (g_4.f0.f0.f0 = 0; (g_4.f0.f0.f0 == 18); g_4.f0.f0.f0 = safe_add_func_uint32_t_u_u(g_4.f0.f0.f0, 7))
                { /* block id: 207 */
                    struct S3 *l_185 = &g_7[2].f0;
                    const int32_t l_191[2][1] = {{(-5L)}, {(-5L)}};
                    int i, j;
                    (*l_185) = l_184;
                    if (p_3.f0.f0.f2)
                        continue;
                    for (g_118.f3.f1 = 0; (g_118.f3.f1 != 41); g_118.f3.f1 = safe_add_func_uint64_t_u_u(g_118.f3.f1, 8))
                    { /* block id: 212 */
                        struct S2 ****l_190 = &l_188;
                        (*l_160) = (g_11 , (void*)0);
                        (*l_190) = l_188;
                        return l_176;
                    }
                    (*l_137) = l_191[0][0];
                }
            }
            else
            { /* block id: 219 */
                uint64_t l_195 = 1UL;
                (*l_137) = (-8L);
                (**l_160) = ((*l_10) = 0xD4D0539EL);
                for (g_6.f0.f1 = 0; (g_6.f0.f1 <= 14); g_6.f0.f1 = safe_add_func_uint64_t_u_u(g_6.f0.f1, 1))
                { /* block id: 225 */
                    p_3.f0 = (*g_23);
                    (*l_10) ^= ((safe_unary_minus_func_uint64_t_u(((+p_3.f0.f0.f2) <= g_7[2].f0.f1))) >= l_195);
                    (*l_10) |= g_148.f0;
                }
            }
            g_200++;
        }
    }
    return g_17.f0.f0.f1;
}




/* ---------------------------------------- */
int main (void)
{
    int i, j;
    int print_hash_value = 0;
    platform_main_begin();
    crc32_gentab();
    func_1();
    transparent_crc(g_4.f0.f0.f0, "g_4.f0.f0.f0", print_hash_value);
    transparent_crc(g_4.f0.f0.f1, "g_4.f0.f0.f1", print_hash_value);
    transparent_crc(g_4.f0.f0.f2, "g_4.f0.f0.f2", print_hash_value);
    transparent_crc(g_6.f0.f0, "g_6.f0.f0", print_hash_value);
    transparent_crc(g_6.f0.f1, "g_6.f0.f1", print_hash_value);
    transparent_crc(g_6.f0.f2, "g_6.f0.f2", print_hash_value);
    for (i = 0; i < 3; i++)
    {
        transparent_crc(g_7[i].f0.f0, "g_7[i].f0.f0", print_hash_value);
        transparent_crc(g_7[i].f0.f1, "g_7[i].f0.f1", print_hash_value);
        transparent_crc(g_7[i].f1, "g_7[i].f1", print_hash_value);
        transparent_crc(g_7[i].f2, "g_7[i].f2", print_hash_value);
        transparent_crc(g_7[i].f3, "g_7[i].f3", print_hash_value);
        transparent_crc(g_7[i].f4.f0.f0, "g_7[i].f4.f0.f0", print_hash_value);
        transparent_crc(g_7[i].f4.f0.f1, "g_7[i].f4.f0.f1", print_hash_value);
        transparent_crc(g_7[i].f4.f0.f2, "g_7[i].f4.f0.f2", print_hash_value);
        transparent_crc(g_7[i].f4.f1, "g_7[i].f4.f1", print_hash_value);
        transparent_crc(g_7[i].f4.f2.f0, "g_7[i].f4.f2.f0", print_hash_value);
        transparent_crc(g_7[i].f4.f2.f1, "g_7[i].f4.f2.f1", print_hash_value);
        transparent_crc(g_7[i].f4.f2.f2, "g_7[i].f4.f2.f2", print_hash_value);
        if (print_hash_value) printf("index = [%d]\n", i);

    }
    transparent_crc(g_11, "g_11", print_hash_value);
    transparent_crc(g_17.f0.f0.f0, "g_17.f0.f0.f0", print_hash_value);
    transparent_crc(g_17.f0.f0.f1, "g_17.f0.f0.f1", print_hash_value);
    transparent_crc(g_17.f0.f0.f2, "g_17.f0.f0.f2", print_hash_value);
    transparent_crc(g_19.f0.f0.f0, "g_19.f0.f0.f0", print_hash_value);
    transparent_crc(g_19.f0.f0.f1, "g_19.f0.f0.f1", print_hash_value);
    transparent_crc(g_19.f0.f0.f2, "g_19.f0.f0.f2", print_hash_value);
    transparent_crc(g_21.f0.f0.f0, "g_21.f0.f0.f0", print_hash_value);
    transparent_crc(g_21.f0.f0.f1, "g_21.f0.f0.f1", print_hash_value);
    transparent_crc(g_21.f0.f0.f2, "g_21.f0.f0.f2", print_hash_value);
    transparent_crc(g_45, "g_45", print_hash_value);
    transparent_crc(g_48.f0, "g_48.f0", print_hash_value);
    transparent_crc(g_51.f0, "g_51.f0", print_hash_value);
    transparent_crc(g_53.f0, "g_53.f0", print_hash_value);
    transparent_crc(g_53.f1, "g_53.f1", print_hash_value);
    transparent_crc(g_53.f2, "g_53.f2", print_hash_value);
    for (i = 0; i < 1; i++)
    {
        transparent_crc(g_62[i].f0, "g_62[i].f0", print_hash_value);
        transparent_crc(g_62[i].f1, "g_62[i].f1", print_hash_value);
        transparent_crc(g_62[i].f2, "g_62[i].f2", print_hash_value);
        if (print_hash_value) printf("index = [%d]\n", i);

    }
    transparent_crc(g_73, "g_73", print_hash_value);
    transparent_crc(g_85, "g_85", print_hash_value);
    transparent_crc(g_103.f0.f0, "g_103.f0.f0", print_hash_value);
    transparent_crc(g_103.f0.f1, "g_103.f0.f1", print_hash_value);
    transparent_crc(g_103.f0.f2, "g_103.f0.f2", print_hash_value);
    transparent_crc(g_116, "g_116", print_hash_value);
    transparent_crc(g_118.f0, "g_118.f0", print_hash_value);
    transparent_crc(g_148.f0, "g_148.f0", print_hash_value);
    transparent_crc(g_161, "g_161", print_hash_value);
    transparent_crc(g_198, "g_198", print_hash_value);
    transparent_crc(g_199, "g_199", print_hash_value);
    transparent_crc(g_200, "g_200", print_hash_value);
    transparent_crc(g_208, "g_208", print_hash_value);
    platform_main_end(crc32_context ^ 0xFFFFFFFFUL, print_hash_value);
    return 0;
}

/************************ statistics *************************
XXX max struct depth: 5
breakdown:
   depth: 0, occurrence: 65
   depth: 1, occurrence: 4
   depth: 2, occurrence: 1
   depth: 3, occurrence: 5
   depth: 4, occurrence: 0
   depth: 5, occurrence: 1
XXX total union variables: 4

XXX max expression depth: 18
breakdown:
   depth: 1, occurrence: 125
   depth: 2, occurrence: 39
   depth: 3, occurrence: 7
   depth: 4, occurrence: 5
   depth: 6, occurrence: 1
   depth: 12, occurrence: 1
   depth: 14, occurrence: 1
   depth: 18, occurrence: 1

XXX total number of pointers: 80

XXX times a variable address is taken: 25
XXX times a pointer is dereferenced on RHS: 10
breakdown:
   depth: 1, occurrence: 9
   depth: 2, occurrence: 1
XXX times a pointer is dereferenced on LHS: 46
breakdown:
   depth: 1, occurrence: 43
   depth: 2, occurrence: 3
XXX times a pointer is compared with null: 0
XXX times a pointer is compared with address of another variable: 1
XXX times a pointer is compared with another pointer: 1
XXX times a pointer is qualified to be dereferenced: 247

XXX max dereference level: 2
breakdown:
   level: 0, occurrence: 0
   level: 1, occurrence: 101
   level: 2, occurrence: 16
XXX number of pointers point to pointers: 31
XXX number of pointers point to scalars: 24
XXX number of pointers point to structs: 21
XXX percent of pointers has null in alias set: 18.8
XXX average alias set size: 1.12

XXX times a non-volatile is read: 164
XXX times a non-volatile is write: 161
XXX times a volatile is read: 0
XXX    times read thru a pointer: 0
XXX times a volatile is write: 0
XXX    times written thru a pointer: 0
XXX times a volatile is available for access: 0
XXX percentage of non-volatile access: 100

XXX forward jumps: 0
XXX backward jumps: 0

XXX stmts: 117
XXX max block depth: 5
breakdown:
   depth: 0, occurrence: 7
   depth: 1, occurrence: 4
   depth: 2, occurrence: 14
   depth: 3, occurrence: 20
   depth: 4, occurrence: 35
   depth: 5, occurrence: 37

XXX percentage a fresh-made variable is used: 38.6
XXX percentage an existing variable is used: 61.4
********************* end of statistics **********************/