/* Generated by Frama-C */
#include "pthread.h"
#include "sched.h"
#include "signal.h"
#include "stddef.h"
#include "stdint.h"
#include "stdio.h"
#include "stdlib.h"
#include "string.h"
#include "time.h"
char *__gen_e_acsl_literal_string;
extern  __attribute__((__FC_BUILTIN__)) int __e_acsl_sound_verdict;

/*@ requires valid_nstring_src: valid_read_nstring(src, n);
    requires room_nstring: \valid(dest + (0 .. n - 1));
    requires separation: \separated(dest + (0 .. n - 1), src + (0 .. n - 1));
    ensures result_ptr: \result == \old(dest);
    ensures initialization: \initialized(\old(dest) + (0 .. \old(n) - 1));
    assigns *(dest + (0 .. n - 1)), \result;
    assigns *(dest + (0 .. n - 1)) \from *(src + (0 .. n - 1));
    assigns \result \from dest;
    
    behavior complete:
      assumes src_fits: strlen(src) < n;
      ensures equal_after_copy: strcmp(\old(dest), \old(src)) == 0;
    
    behavior partial:
      assumes src_too_long: n <= strlen(src);
      ensures
        equal_prefix: memcmp{Post, Post}(\old(dest), \old(src), \old(n)) == 0;
 */
char *__gen_e_acsl_strncpy(char * restrict dest, char const * restrict src,
                           size_t n);

/*@ requires valid_nstring_src: valid_read_nstring(src, n);
    requires room_nstring: \valid(dest + (0 .. n - 1));
    requires separation: \separated(dest + (0 .. n - 1), src + (0 .. n - 1));
    ensures result_ptr: \result == \old(dest);
    ensures initialization: \initialized(\old(dest) + (0 .. \old(n) - 1));
    assigns *(dest + (0 .. n - 1)), \result;
    assigns *(dest + (0 .. n - 1)) \from *(src + (0 .. n - 1));
    assigns \result \from dest;
    
    behavior complete:
      assumes src_fits: strlen(src) < n;
      ensures equal_after_copy: strcmp(\old(dest), \old(src)) == 0;
    
    behavior partial:
      assumes src_too_long: n <= strlen(src);
      ensures
        equal_prefix: memcmp{Post, Post}(\old(dest), \old(src), \old(n)) == 0;
 */
char *__gen_e_acsl_strncpy(char * restrict dest, char const * restrict src,
                           size_t n)
{
  __e_acsl_contract_t *__gen_e_acsl_contract;
  __e_acsl_mpz_t __gen_e_acsl_at_2;
  char *__gen_e_acsl_at;
  char *__retres;
  {
    __e_acsl_mpz_t __gen_e_acsl_n;
    unsigned long __gen_e_acsl_size;
    __e_acsl_mpz_t __gen_e_acsl_n_2;
    __e_acsl_mpz_t __gen_e_acsl_;
    __e_acsl_mpz_t __gen_e_acsl_sub;
    __e_acsl_mpz_t __gen_e_acsl__2;
    __e_acsl_mpz_t __gen_e_acsl_sub_2;
    __e_acsl_mpz_t __gen_e_acsl_add;
    unsigned long __gen_e_acsl__3;
    unsigned long __gen_e_acsl_if;
    int __gen_e_acsl_valid;
    unsigned long __gen_e_acsl_size_2;
    unsigned long __gen_e_acsl__4;
    unsigned long __gen_e_acsl_if_2;
    int __gen_e_acsl_valid_read;
    unsigned long __gen_e_acsl_size_3;
    unsigned long __gen_e_acsl__5;
    unsigned long __gen_e_acsl_if_3;
    int __gen_e_acsl_valid_read_2;
    unsigned long __gen_e_acsl_size_4;
    unsigned long __gen_e_acsl__6;
    unsigned long __gen_e_acsl_if_4;
    unsigned long __gen_e_acsl_size_5;
    unsigned long __gen_e_acsl__7;
    unsigned long __gen_e_acsl_if_5;
    int __gen_e_acsl_separated;
    __e_acsl_store_block((void *)(& src),8UL);
    __e_acsl_store_block((void *)(& dest),8UL);
    __gen_e_acsl_at = dest;
    __gmpz_init_set_ui(__gen_e_acsl_n,n);
    __gmpz_init_set(__gen_e_acsl_at_2,
                    (__e_acsl_mpz_struct const *)(__gen_e_acsl_n));
    __gen_e_acsl_contract = __e_acsl_contract_init(2UL);
    __e_acsl_assert_data_t __gen_e_acsl_assert_data_2 =
      {.values = (void *)0};
    __e_acsl_assert_register_ptr(& __gen_e_acsl_assert_data_2,"dest",
                                 (void *)dest);
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_2,"sizeof(char)",
                                 0,1);
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_2,"sizeof(char)",
                                 0,1);
    __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data_2,"n",0,n);
    __gmpz_init_set_ui(__gen_e_acsl_n_2,n);
    __gmpz_init_set_si(__gen_e_acsl_,1L);
    __gmpz_init(__gen_e_acsl_sub);
    __gmpz_sub(__gen_e_acsl_sub,
               (__e_acsl_mpz_struct const *)(__gen_e_acsl_n_2),
               (__e_acsl_mpz_struct const *)(__gen_e_acsl_));
    __gmpz_init_set_si(__gen_e_acsl__2,0L);
    __gmpz_init(__gen_e_acsl_sub_2);
    __gmpz_sub(__gen_e_acsl_sub_2,
               (__e_acsl_mpz_struct const *)(__gen_e_acsl_sub),
               (__e_acsl_mpz_struct const *)(__gen_e_acsl__2));
    __gmpz_init(__gen_e_acsl_add);
    __gmpz_add(__gen_e_acsl_add,
               (__e_acsl_mpz_struct const *)(__gen_e_acsl_sub_2),
               (__e_acsl_mpz_struct const *)(__gen_e_acsl_));
    __gen_e_acsl__3 = __gmpz_get_ui((__e_acsl_mpz_struct const *)(__gen_e_acsl_add));
    __gen_e_acsl_size = 1UL * __gen_e_acsl__3;
    __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data_2,"size",0,
                                   __gen_e_acsl_size);
    if (__gen_e_acsl_size <= 0UL) __gen_e_acsl_if = 0UL;
    else {
      __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data_2,"size",0,
                                     __gen_e_acsl_size);
      __gen_e_acsl_if = __gen_e_acsl_size;
    }
    __gen_e_acsl_valid = __e_acsl_valid((void *)(dest + 1 * 0),
                                        __gen_e_acsl_if,(void *)dest,
                                        (void *)(& dest));
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_2,
                                 "room_nstring: \\valid(dest + (0 .. n - 1))",
                                 0,__gen_e_acsl_valid);
    __gen_e_acsl_assert_data_2.blocking = 1;
    __gen_e_acsl_assert_data_2.kind = "Precondition";
    __gen_e_acsl_assert_data_2.pred_txt = "\\valid(dest + (0 .. n - 1))";
    __gen_e_acsl_assert_data_2.file = "FRAMAC_SHARE/libc/string.h";
    __gen_e_acsl_assert_data_2.fct = "strncpy";
    __gen_e_acsl_assert_data_2.line = 380;
    __gen_e_acsl_assert_data_2.name = "room_nstring";
    __e_acsl_assert(__gen_e_acsl_valid,& __gen_e_acsl_assert_data_2);
    __e_acsl_assert_clean(& __gen_e_acsl_assert_data_2);
    __e_acsl_assert_data_t __gen_e_acsl_assert_data_3 =
      {.values = (void *)0};
    __e_acsl_assert_data_t __gen_e_acsl_assert_data_4 =
      {.values = (void *)0};
    __e_acsl_assert_register_ptr(& __gen_e_acsl_assert_data_4,"dest",
                                 (void *)dest);
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_4,"sizeof(char)",
                                 0,1);
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_4,"sizeof(char)",
                                 0,1);
    __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data_4,"n",0,n);
    __gen_e_acsl__4 = __gmpz_get_ui((__e_acsl_mpz_struct const *)(__gen_e_acsl_add));
    __gen_e_acsl_size_2 = 1UL * __gen_e_acsl__4;
    __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data_4,"size",0,
                                   __gen_e_acsl_size_2);
    if (__gen_e_acsl_size_2 <= 0UL) __gen_e_acsl_if_2 = 0UL;
    else {
      __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data_4,"size",0,
                                     __gen_e_acsl_size_2);
      __gen_e_acsl_if_2 = __gen_e_acsl_size_2;
    }
    __gen_e_acsl_valid_read = __e_acsl_valid_read((void *)(dest + 1 * 0),
                                                  __gen_e_acsl_if_2,
                                                  (void *)dest,
                                                  (void *)(& dest));
    __gen_e_acsl_assert_data_4.blocking = 1;
    __gen_e_acsl_assert_data_4.kind = "RTE";
    __gen_e_acsl_assert_data_4.pred_txt = "\\valid_read(dest + (0 .. n - 1))";
    __gen_e_acsl_assert_data_4.file = "FRAMAC_SHARE/libc/string.h";
    __gen_e_acsl_assert_data_4.fct = "strncpy";
    __gen_e_acsl_assert_data_4.line = 382;
    __gen_e_acsl_assert_data_4.name = "separated_guard";
    __e_acsl_assert(__gen_e_acsl_valid_read,& __gen_e_acsl_assert_data_4);
    __e_acsl_assert_clean(& __gen_e_acsl_assert_data_4);
    __e_acsl_assert_data_t __gen_e_acsl_assert_data_5 =
      {.values = (void *)0};
    __e_acsl_assert_register_ptr(& __gen_e_acsl_assert_data_5,"src",
                                 (void *)src);
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_5,
                                 "sizeof(char const)",0,1);
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_5,
                                 "sizeof(char const)",0,1);
    __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data_5,"n",0,n);
    __gen_e_acsl__5 = __gmpz_get_ui((__e_acsl_mpz_struct const *)(__gen_e_acsl_add));
    __gen_e_acsl_size_3 = 1UL * __gen_e_acsl__5;
    __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data_5,"size",0,
                                   __gen_e_acsl_size_3);
    if (__gen_e_acsl_size_3 <= 0UL) __gen_e_acsl_if_3 = 0UL;
    else {
      __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data_5,"size",0,
                                     __gen_e_acsl_size_3);
      __gen_e_acsl_if_3 = __gen_e_acsl_size_3;
    }
    __gen_e_acsl_valid_read_2 = __e_acsl_valid_read((void *)(src + 1 * 0),
                                                    __gen_e_acsl_if_3,
                                                    (void *)src,
                                                    (void *)(& src));
    __gen_e_acsl_assert_data_5.blocking = 1;
    __gen_e_acsl_assert_data_5.kind = "RTE";
    __gen_e_acsl_assert_data_5.pred_txt = "\\valid_read(src + (0 .. n - 1))";
    __gen_e_acsl_assert_data_5.file = "FRAMAC_SHARE/libc/string.h";
    __gen_e_acsl_assert_data_5.fct = "strncpy";
    __gen_e_acsl_assert_data_5.line = 382;
    __gen_e_acsl_assert_data_5.name = "separated_guard";
    __e_acsl_assert(__gen_e_acsl_valid_read_2,& __gen_e_acsl_assert_data_5);
    __e_acsl_assert_clean(& __gen_e_acsl_assert_data_5);
    __e_acsl_assert_register_ptr(& __gen_e_acsl_assert_data_3,"dest",
                                 (void *)dest);
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_3,"sizeof(char)",
                                 0,1);
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_3,"sizeof(char)",
                                 0,1);
    __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data_3,"n",0,n);
    __gen_e_acsl__6 = __gmpz_get_ui((__e_acsl_mpz_struct const *)(__gen_e_acsl_add));
    __gen_e_acsl_size_4 = 1UL * __gen_e_acsl__6;
    __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data_3,"size",0,
                                   __gen_e_acsl_size_4);
    if (__gen_e_acsl_size_4 <= 0UL) __gen_e_acsl_if_4 = 0UL;
    else {
      __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data_3,"size",0,
                                     __gen_e_acsl_size_4);
      __gen_e_acsl_if_4 = __gen_e_acsl_size_4;
    }
    __e_acsl_assert_register_ptr(& __gen_e_acsl_assert_data_3,"src",
                                 (void *)src);
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_3,
                                 "sizeof(char const)",0,1);
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_3,
                                 "sizeof(char const)",0,1);
    __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data_3,"n",0,n);
    __gen_e_acsl__7 = __gmpz_get_ui((__e_acsl_mpz_struct const *)(__gen_e_acsl_add));
    __gen_e_acsl_size_5 = 1UL * __gen_e_acsl__7;
    __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data_3,"size",0,
                                   __gen_e_acsl_size_5);
    if (__gen_e_acsl_size_5 <= 0UL) __gen_e_acsl_if_5 = 0UL;
    else {
      __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data_3,"size",0,
                                     __gen_e_acsl_size_5);
      __gen_e_acsl_if_5 = __gen_e_acsl_size_5;
    }
    __gen_e_acsl_separated = __e_acsl_separated(2UL,dest + 1 * 0,
                                                __gen_e_acsl_if_4,
                                                src + 1 * 0,
                                                __gen_e_acsl_if_5);
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_3,
                                 "separation: \\separated(dest + (0 .. n - 1), src + (0 .. n - 1))",
                                 0,__gen_e_acsl_separated);
    __gen_e_acsl_assert_data_3.blocking = 1;
    __gen_e_acsl_assert_data_3.kind = "Precondition";
    __gen_e_acsl_assert_data_3.pred_txt = "\\separated(dest + (0 .. n - 1), src + (0 .. n - 1))";
    __gen_e_acsl_assert_data_3.file = "FRAMAC_SHARE/libc/string.h";
    __gen_e_acsl_assert_data_3.fct = "strncpy";
    __gen_e_acsl_assert_data_3.line = 382;
    __gen_e_acsl_assert_data_3.name = "separation";
    __e_acsl_assert(__gen_e_acsl_separated,& __gen_e_acsl_assert_data_3);
    __e_acsl_assert_clean(& __gen_e_acsl_assert_data_3);
    __gmpz_clear(__gen_e_acsl_n);
    __gmpz_clear(__gen_e_acsl_n_2);
    __gmpz_clear(__gen_e_acsl_);
    __gmpz_clear(__gen_e_acsl_sub);
    __gmpz_clear(__gen_e_acsl__2);
    __gmpz_clear(__gen_e_acsl_sub_2);
    __gmpz_clear(__gen_e_acsl_add);
  }
  __retres = strncpy(dest,src,n);
  __e_acsl_initialize((void *)dest,n);
  {
    unsigned long __gen_e_acsl_size_6;
    __e_acsl_mpz_t __gen_e_acsl__8;
    __e_acsl_mpz_t __gen_e_acsl_sub_3;
    __e_acsl_mpz_t __gen_e_acsl__9;
    __e_acsl_mpz_t __gen_e_acsl_sub_4;
    __e_acsl_mpz_t __gen_e_acsl_add_2;
    unsigned long __gen_e_acsl__10;
    unsigned long __gen_e_acsl_if_6;
    int __gen_e_acsl_initialized;
    __e_acsl_assert_data_t __gen_e_acsl_assert_data_6 =
      {.values = (void *)0};
    __e_acsl_assert_register_ptr(& __gen_e_acsl_assert_data_6,"\\result",
                                 (void *)__retres);
    __e_acsl_assert_register_ptr(& __gen_e_acsl_assert_data_6,"\\old(dest)",
                                 (void *)__gen_e_acsl_at);
    __gen_e_acsl_assert_data_6.blocking = 1;
    __gen_e_acsl_assert_data_6.kind = "Postcondition";
    __gen_e_acsl_assert_data_6.pred_txt = "\\result == \\old(dest)";
    __gen_e_acsl_assert_data_6.file = "FRAMAC_SHARE/libc/string.h";
    __gen_e_acsl_assert_data_6.fct = "strncpy";
    __gen_e_acsl_assert_data_6.line = 385;
    __gen_e_acsl_assert_data_6.name = "result_ptr";
    __e_acsl_assert(__retres == __gen_e_acsl_at,& __gen_e_acsl_assert_data_6);
    __e_acsl_assert_clean(& __gen_e_acsl_assert_data_6);
    __e_acsl_assert_data_t __gen_e_acsl_assert_data_7 =
      {.values = (void *)0};
    __e_acsl_assert_register_ptr(& __gen_e_acsl_assert_data_7,"\\old(dest)",
                                 (void *)__gen_e_acsl_at);
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_7,"sizeof(char)",
                                 0,1);
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_7,"sizeof(char)",
                                 0,1);
    __e_acsl_assert_register_mpz(& __gen_e_acsl_assert_data_7,"\\old(n)",0,
                                 (__e_acsl_mpz_struct const *)(__gen_e_acsl_at_2));
    __gmpz_init_set_si(__gen_e_acsl__8,1L);
    __gmpz_init(__gen_e_acsl_sub_3);
    __gmpz_sub(__gen_e_acsl_sub_3,
               (__e_acsl_mpz_struct const *)(__gen_e_acsl_at_2),
               (__e_acsl_mpz_struct const *)(__gen_e_acsl__8));
    __gmpz_init_set_si(__gen_e_acsl__9,0L);
    __gmpz_init(__gen_e_acsl_sub_4);
    __gmpz_sub(__gen_e_acsl_sub_4,
               (__e_acsl_mpz_struct const *)(__gen_e_acsl_sub_3),
               (__e_acsl_mpz_struct const *)(__gen_e_acsl__9));
    __gmpz_init(__gen_e_acsl_add_2);
    __gmpz_add(__gen_e_acsl_add_2,
               (__e_acsl_mpz_struct const *)(__gen_e_acsl_sub_4),
               (__e_acsl_mpz_struct const *)(__gen_e_acsl__8));
    __gen_e_acsl__10 = __gmpz_get_ui((__e_acsl_mpz_struct const *)(__gen_e_acsl_add_2));
    __gen_e_acsl_size_6 = 1UL * __gen_e_acsl__10;
    __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data_7,"size",0,
                                   __gen_e_acsl_size_6);
    if (__gen_e_acsl_size_6 <= 0UL) __gen_e_acsl_if_6 = 0UL;
    else {
      __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data_7,"size",0,
                                     __gen_e_acsl_size_6);
      __gen_e_acsl_if_6 = __gen_e_acsl_size_6;
    }
    __gen_e_acsl_initialized = __e_acsl_initialized((void *)(__gen_e_acsl_at + 
                                                             1 * 0),
                                                    __gen_e_acsl_if_6);
    __e_acsl_assert_register_int(& __gen_e_acsl_assert_data_7,
                                 "initialization: \\initialized(\\old(dest) + (0 .. \\old(n) - 1))",
                                 0,__gen_e_acsl_initialized);
    __gen_e_acsl_assert_data_7.blocking = 1;
    __gen_e_acsl_assert_data_7.kind = "Postcondition";
    __gen_e_acsl_assert_data_7.pred_txt = "\\initialized(\\old(dest) + (0 .. \\old(n) - 1))";
    __gen_e_acsl_assert_data_7.file = "FRAMAC_SHARE/libc/string.h";
    __gen_e_acsl_assert_data_7.fct = "strncpy";
    __gen_e_acsl_assert_data_7.line = 386;
    __gen_e_acsl_assert_data_7.name = "initialization";
    __e_acsl_assert(__gen_e_acsl_initialized,& __gen_e_acsl_assert_data_7);
    __e_acsl_assert_clean(& __gen_e_acsl_assert_data_7);
    __e_acsl_contract_clean(__gen_e_acsl_contract);
    __e_acsl_delete_block((void *)(& src));
    __e_acsl_delete_block((void *)(& dest));
    __gmpz_clear(__gen_e_acsl__8);
    __gmpz_clear(__gen_e_acsl_sub_3);
    __gmpz_clear(__gen_e_acsl__9);
    __gmpz_clear(__gen_e_acsl_sub_4);
    __gmpz_clear(__gen_e_acsl_add_2);
    __gmpz_clear(__gen_e_acsl_at_2);
    return __retres;
  }
}

void __e_acsl_globals_init(void)
{
  static char __e_acsl_already_run = 0;
  if (! __e_acsl_already_run) {
    __e_acsl_already_run = 1;
    __gen_e_acsl_literal_string = "Test Code";
    __e_acsl_store_block((void *)__gen_e_acsl_literal_string,
                         sizeof("Test Code"));
    __e_acsl_full_init((void *)__gen_e_acsl_literal_string);
    __e_acsl_mark_readonly((void *)__gen_e_acsl_literal_string);
  }
  return;
}

int main(void)
{
  int __retres;
  int i;
  __e_acsl_memory_init((int *)0,(char ***)0,8UL);
  __e_acsl_globals_init();
  char *srcbuf = (char *)__gen_e_acsl_literal_string;
  __e_acsl_store_block((void *)(& srcbuf),8UL);
  __e_acsl_full_init((void *)(& srcbuf));
  int loc = 1;
  char *destbuf = malloc((unsigned long)10 * sizeof(char));
  __e_acsl_store_block((void *)(& destbuf),8UL);
  __e_acsl_full_init((void *)(& destbuf));
  char ch = (char)'o';
  if (destbuf != (char *)0) {
    i = -1;
    while (i < 0) {
      {
        int __gen_e_acsl_valid_read;
        __e_acsl_assert_data_t __gen_e_acsl_assert_data =
          {.values = (void *)0};
        __e_acsl_assert_register_ptr(& __gen_e_acsl_assert_data,"srcbuf",
                                     (void *)srcbuf);
        __e_acsl_assert_register_int(& __gen_e_acsl_assert_data,"i",0,i);
        __e_acsl_assert_register_ulong(& __gen_e_acsl_assert_data,
                                       "sizeof(char)",0,sizeof(char));
        __gen_e_acsl_valid_read = __e_acsl_valid_read((void *)(srcbuf + i),
                                                      sizeof(char),
                                                      (void *)srcbuf,
                                                      (void *)(& srcbuf));
        __e_acsl_assert_register_int(& __gen_e_acsl_assert_data,
                                     "\\valid_read(srcbuf + i)",0,
                                     __gen_e_acsl_valid_read);
        __gen_e_acsl_assert_data.blocking = 1;
        __gen_e_acsl_assert_data.kind = "Assertion";
        __gen_e_acsl_assert_data.pred_txt = "!\\valid_read(srcbuf + i)";
        __gen_e_acsl_assert_data.file = "bts2252.c";
        __gen_e_acsl_assert_data.fct = "main";
        __gen_e_acsl_assert_data.line = 17;
        __e_acsl_assert(! __gen_e_acsl_valid_read,& __gen_e_acsl_assert_data);
        __e_acsl_assert_clean(& __gen_e_acsl_assert_data);
      }
      /*@ assert !\valid_read(srcbuf + i); */ ;
      /*@ assert Eva: mem_access: \valid_read(srcbuf + i); */
      if ((int)*(srcbuf + i) == (int)ch) loc = i;
      i ++;
    }
    __gen_e_acsl_strncpy(destbuf + loc,(char const *)(srcbuf + loc),
                         (size_t)1);
    free((void *)destbuf);
  }
  __retres = 0;
  __e_acsl_delete_block((void *)(& destbuf));
  __e_acsl_delete_block((void *)(& srcbuf));
  __e_acsl_memory_clean();
  return __retres;
}


