// PARAM: --set ana.base.structs.domain "keyed"
// NOCHECK
// This is shortened from aget.c in the bench repository
// There was an issue when testing arrays, as they init to bottom and this code triggers narrowing.
/* Generated by CIL v. 1.3.6 */
/* print_CIL_Input is true */

typedef unsigned int size_t;
typedef long long __quad_t;
typedef long __off_t;
typedef __quad_t __off64_t;
typedef long __time_t;
typedef __time_t time_t;
struct __anonstruct___sigset_t_7 {
   unsigned long __val[1024U / (8U * sizeof(unsigned long ))] ;
};
typedef struct __anonstruct___sigset_t_7 __sigset_t;
typedef __sigset_t sigset_t;
typedef unsigned long pthread_t;
union __anonunion_pthread_attr_t_9 {
   char __size[36] ;
   long __align ;
};
typedef union __anonunion_pthread_attr_t_9 pthread_attr_t;
struct _IO_FILE;
typedef struct _IO_FILE FILE;
typedef void _IO_lock_t;
struct _IO_marker {
   struct _IO_marker *_next ;
   struct _IO_FILE *_sbuf ;
   int _pos ;
};
struct _IO_FILE {
   int _flags ;
   char *_IO_read_ptr ;
   char *_IO_read_end ;
   char *_IO_read_base ;
   char *_IO_write_base ;
   char *_IO_write_ptr ;
   char *_IO_write_end ;
   char *_IO_buf_base ;
   char *_IO_buf_end ;
   char *_IO_save_base ;
   char *_IO_backup_base ;
   char *_IO_save_end ;
   struct _IO_marker *_markers ;
   struct _IO_FILE *_chain ;
   int _fileno ;
   int _flags2 ;
   __off_t _old_offset ;
   unsigned short _cur_column ;
   signed char _vtable_offset ;
   char _shortbuf[1] ;
   _IO_lock_t *_lock ;
   __off64_t _offset ;
   void *__pad1 ;
   void *__pad2 ;
   void *__pad3 ;
   void *__pad4 ;
   size_t __pad5 ;
   int _mode ;
   char _unused2[(15U * sizeof(int ) - 4U * sizeof(void *)) - sizeof(size_t )] ;
};
typedef unsigned short uint16_t;
typedef unsigned int uint32_t;
typedef unsigned short sa_family_t;
struct sockaddr {
   sa_family_t sa_family ;
   char sa_data[14] ;
};
typedef uint16_t in_port_t;
typedef uint32_t in_addr_t;
struct in_addr {
   in_addr_t s_addr ;
};
struct sockaddr_in {
   sa_family_t sin_family ;
   in_port_t sin_port ;
   struct in_addr sin_addr ;
   unsigned char sin_zero[((sizeof(struct sockaddr ) - sizeof(unsigned short )) - sizeof(in_port_t )) - sizeof(struct in_addr )] ;
};
struct request {
   char host[1024] ;
   char url[1024] ;
   char file[512] ;
   char lfile[512] ;
   char ip[16] ;
   char username[512] ;
   char password[512] ;
   int port ;
   int clength ;
   unsigned char proto ;
};
struct thread_data {
   struct sockaddr_in sin ;
   char getstr[256] ;
   long soffset ;
   long foffset ;
   long offset ;
   long clength ;
   int fd ;
   pthread_t tid ;
   unsigned char status ;
};
struct hist_data {
   struct request req ;
   int nthreads ;
   int bwritten ;
   struct thread_data wthread[25] ;
};

time_t t_start  ;
time_t t_finish  ;
sigset_t signal_set  ;
char *fullurl  ;
int nthreads  ;
int fsuggested  =    0;
struct request *req  ;
pthread_t hthread  ;
struct thread_data *wthread  ;
int main(int argc , char **argv )
{ int c ;
  int error ;
  struct hist_data h ;

  {
  while (1) { // This can cause leq issues as it triggers narrowing in struct - arrays on uninitialized hist_data!
    if (! error) {
      if (! (c != -1)) {
        break;
      }
    } else {
      break;
    }
  }

  return (0);
}
}
