1  /* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
       2  
       3  typedef __SIZE_TYPE__ size_t;
       4  typedef unsigned char Bufbyte;
       5  typedef int Bytecount;
       6  typedef int Charcount;
       7  typedef struct lstream Lstream;
       8  typedef int  Lisp_Object;
       9  extern Lisp_Object Qnil;
      10  extern inline  int
      11  TRUE_LIST_P (Lisp_Object object)
      12  {
      13    return ((  object  ) == (  Qnil ))  ;
      14  }
      15  struct Lisp_String
      16  {
      17    Bytecount _size;
      18    Bufbyte *_data;
      19  };
      20  typedef enum lstream_buffering
      21  {
      22    LSTREAM_LINE_BUFFERED,
      23  } Lstream_buffering;
      24  struct lstream
      25  {
      26    Lstream_buffering buffering;  
      27    unsigned char *out_buffer;  
      28    size_t out_buffer_size;  
      29    size_t out_buffer_ind;  
      30    size_t byte_count;
      31    long flags;   
      32    char data[1];
      33  };
      34  typedef struct printf_spec printf_spec;
      35  struct printf_spec
      36  {
      37  };
      38  typedef union printf_arg printf_arg;
      39  union printf_arg
      40  {
      41  };
      42  typedef struct
      43  {
      44     int cur;
      45  } printf_spec_dynarr;
      46  typedef struct
      47  {
      48  } printf_arg_dynarr;
      49  static void
      50  doprnt_1 (Lisp_Object stream, const  Bufbyte *string, Bytecount len,
      51  	  Charcount minlen, Charcount maxlen, int minus_flag, int zero_flag)
      52  {
      53    Charcount cclen;
      54    Bufbyte pad;
      55    Lstream *lstr = ((  struct lstream  *) ((void *)((((    stream    ) & ((1UL << ((4   * 8 )  - 4 ) ) - 1UL) ) ) | 0x40000000 )) )  ;
      56    cclen = (  len ) ;
      57    if (zero_flag)
      58      pad = '0';
      59    pad = ' ';
      60  #if 0
      61    if (minlen > cclen && !minus_flag)
      62  #endif
      63      {
      64        int to_add = minlen - cclen;
      65        while (to_add > 0)
      66  	{
      67  	  (( lstr )->out_buffer_ind >= ( lstr )->out_buffer_size ?	Lstream_fputc ( lstr ,   pad ) :	(( lstr )->out_buffer[( lstr )->out_buffer_ind++] =	(unsigned char) (  pad ),	( lstr )->byte_count++,	( lstr )->buffering == LSTREAM_LINE_BUFFERED &&	( lstr )->out_buffer[( lstr )->out_buffer_ind - 1] == '\n' ?	Lstream_flush_out ( lstr ) : 0)) ;
      68  	  to_add--;
      69  	}
      70      }
      71    if (maxlen >= 0)
      72      len = (  ((( maxlen ) <= (  cclen )) ? ( maxlen ) : (  cclen ))  ) ;
      73    Lstream_write (lstr, string, len);
      74    if (minlen > cclen && minus_flag)
      75      {
      76        int to_add = minlen - cclen;
      77        while (to_add > 0)
      78  	{
      79  	  (( lstr )->out_buffer_ind >= ( lstr )->out_buffer_size ?	Lstream_fputc ( lstr ,   pad ) :	(( lstr )->out_buffer[( lstr )->out_buffer_ind++] =	(unsigned char) (  pad ),	( lstr )->byte_count++,	( lstr )->buffering == LSTREAM_LINE_BUFFERED &&	( lstr )->out_buffer[( lstr )->out_buffer_ind - 1] == '\n' ?	Lstream_flush_out ( lstr ) : 0)) ;
      80  	  to_add--;
      81  	}
      82      }
      83  }
      84  static Bytecount
      85  emacs_doprnt_1 (Lisp_Object stream, const  Bufbyte *format_nonreloc,
      86  		Lisp_Object format_reloc, Bytecount format_length,
      87  		int nargs,
      88  		const  Lisp_Object *largs)
      89  {
      90    int i;
      91    printf_spec_dynarr *specs = 0;
      92    format_nonreloc = (( ((  struct Lisp_String  *) ((void *)((((     format_reloc     ) & ((1UL << ((4   * 8 )  - 4 ) ) - 1UL) ) ) | 0x40000000 )) )   )->_data + 0)  ;
      93    format_length = (( ((  struct Lisp_String  *) ((void *)((((     format_reloc     ) & ((1UL << ((4   * 8 )  - 4 ) ) - 1UL) ) ) | 0x40000000 )) )   )->_size)  ;
      94    specs = parse_doprnt_spec (format_nonreloc, format_length);
      95    for (i = 0; i < (( specs )->cur) ; i++)
      96      {
      97        char ch;
      98        doprnt_1 (stream, (Bufbyte *) &ch, 1, 0, -1, 0, 0);
      99      }
     100  }