From 92ab7a9837575316c371e0f0243f4e5cbd6db692 Mon Sep 17 00:00:00 2001
From: David Malcolm <dmalcolm@redhat.com>
Date: Wed, 14 Feb 2018 11:05:45 -0500
Subject: [PATCH 20/49] FIXME: WIP on rhbz#1545282

---
 rhbz1545282.c | 9784 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 9784 insertions(+)
 create mode 100644 rhbz1545282.c

diff --git a/rhbz1545282.c b/rhbz1545282.c
new file mode 100644
index 0000000..1b0466f
--- /dev/null
+++ b/rhbz1545282.c
@@ -0,0 +1,9784 @@
+// Target: ppc64le-redhat-linux
+// Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-targets=powerpcle-linux --disable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --disable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-secureplt --with-long-double-128 --with-cpu-32=power8 --with-tune-32=power8 --with-cpu-64=power8 --with-tune-64=power8 --build=ppc64le-redhat-linux
+// Thread model: posix
+// gcc version 8.0.1 20180210 (Red Hat 8.0.1-0.13) (GCC) 
+// 
+// sanei_scsi.c: In function 'sanei_scsi_find_devices':
+// sanei_scsi.c:2990:2: warning: 'readdir_r' is deprecated [-Wdeprecated-declarations]
+//   ret = readdir_r(scsidevs, &buf, &de);
+//   ^~~
+// In file included from sanei_scsi.c:232:
+// /usr/include/dirent.h:183:12: note: declared here
+//  extern int readdir_r (DIR *__restrict __dirp,
+//             ^~~~~~~~~
+// In file included from sanei_scsi.c:240:
+// sanei_scsi.c: In function 'issue':
+// sanei_scsi.c:1948:9: warning: ignoring return value of 'system', declared with attribute warn_unused_result [-Wunused-result]
+//          system ("cat /proc/scsi/sg/debug 1>&2");)
+//          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// ../include/sane/sanei_debug.h:149:25: note: in definition of macro 'IF_DBG'
+//  # define IF_DBG(x)      x
+//                          ^
+// sanei_scsi.c: In function 'sanei_scsi_req_wait':
+// sanei_scsi.c:2262:7: warning: ignoring return value of 'system', declared with attribute warn_unused_result [-Wunused-result]
+//        system ("cat /proc/scsi/sg/debug 1>&2");)
+//        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// ../include/sane/sanei_debug.h:149:25: note: in definition of macro 'IF_DBG'
+//  # define IF_DBG(x)      x
+//                          ^
+// sanei_scsi.c: In function 'sanei_proc_scsi_find_devices':
+// sanei_scsi.c:2820:2: warning: ignoring return value of 'fgets', declared with attribute warn_unused_result [-Wunused-result]
+//   fgets (line, sizeof (line), proc_fp);
+//   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+// *** WARNING *** there are active plugins, do not report this as a bug unless you can reproduce it without enabling any plugins.
+// Event                            | Plugins
+// PLUGIN_FINISH_UNIT               | annobin: Generate final annotations
+// PLUGIN_START_UNIT                | annobin: Generate global annotations
+// PLUGIN_ALL_PASSES_END            | annobin: Generate per-function annotations
+// during GIMPLE pass: strlen
+// sanei_scsi.c: In function 'sanei_scsi_find_devices':
+// sanei_scsi.c:2939:1: internal compiler error: Segmentation fault
+//  sanei_scsi_find_devices (const char *findvendor, const char *findmodel,
+//  ^~~~~~~~~~~~~~~~~~~~~~~
+// Please submit a full bug report,
+// with preprocessed source if appropriate.
+// See <http://bugzilla.redhat.com/bugzilla> for instructions.
+
+// /usr/libexec/gcc/ppc64le-redhat-linux/8/cc1 -quiet -I . -I ../include/sane -I . -I . -I ../include -I ../include -I /usr/include/libusb-1.0 -D__unix__ -D__gnu_linux__ -D__linux__ -Dunix -D__unix -Dlinux -D__linux -Asystem=linux -Asystem=unix -Asystem=posix -D HAVE_CONFIG_H -D _REENTRANT -D PATH_SANE_CONFIG_DIR=/etc/sane.d -D PATH_SANE_DATA_DIR=/usr/share -D PATH_SANE_LOCK_DIR=/var/lock/sane -D V_MAJOR=1 -D V_MINOR=0 -D PIC -D_FORTIFY_SOURCE=2 -D_GLIBCXX_ASSERTIONS sanei_scsi.c -msecure-plt -quiet -dumpbase sanei_scsi.c -m64 -mcpu=power8 -mtune=power8 -auxbase-strip .libs/sanei_scsi.o -g -grecord-gcc-switches -O2 -Wall -Werror=format-security -fexceptions -fstack-protector-strong -fstack-clash-protection -fno-strict-aliasing -fPIC -iplugindir=/usr/lib/gcc/ppc64le-redhat-linux/8/plugin -fplugin=annobin -o - -frandom-seed=0 -fdump-noaddr
+
+# 1 "sanei_scsi.c"
+# 1 "/builddir/build/BUILD/sane-backends-1.0.27/sanei//"
+# 1 "<built-in>"
+# 1 "<command-line>"
+# 1 "/usr/include/stdc-predef.h" 1 3 4
+# 1 "<command-line>" 2
+# 1 "sanei_scsi.c"
+# 48 "sanei_scsi.c"
+# 1 "../include/sane/config.h" 1
+# 49 "sanei_scsi.c" 2
+# 1 "../include/lalloca.h" 1
+# 50 "sanei_scsi.c" 2
+# 1 "../include/lassert.h" 1
+# 59 "../include/lassert.h"
+# 1 "/usr/include/assert.h" 1 3 4
+# 35 "/usr/include/assert.h" 3 4
+# 1 "/usr/include/features.h" 1 3 4
+# 428 "/usr/include/features.h" 3 4
+# 1 "/usr/include/sys/cdefs.h" 1 3 4
+# 427 "/usr/include/sys/cdefs.h" 3 4
+# 1 "/usr/include/bits/wordsize.h" 1 3 4
+# 428 "/usr/include/sys/cdefs.h" 2 3 4
+# 1 "/usr/include/bits/long-double.h" 1 3 4
+# 429 "/usr/include/sys/cdefs.h" 2 3 4
+# 429 "/usr/include/features.h" 2 3 4
+# 452 "/usr/include/features.h" 3 4
+# 1 "/usr/include/gnu/stubs.h" 1 3 4
+
+
+
+
+# 1 "/usr/include/bits/wordsize.h" 1 3 4
+# 6 "/usr/include/gnu/stubs.h" 2 3 4
+# 14 "/usr/include/gnu/stubs.h" 3 4
+# 1 "/usr/include/gnu/stubs-64-v2.h" 1 3 4
+# 15 "/usr/include/gnu/stubs.h" 2 3 4
+# 453 "/usr/include/features.h" 2 3 4
+# 36 "/usr/include/assert.h" 2 3 4
+# 64 "/usr/include/assert.h" 3 4
+
+
+
+
+# 67 "/usr/include/assert.h" 3 4
+extern void __assert_fail (const char *__assertion, const char *__file,
+      unsigned int __line, const char *__function)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
+
+
+extern void __assert_perror_fail (int __errnum, const char *__file,
+      unsigned int __line, const char *__function)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
+
+
+
+
+extern void __assert (const char *__assertion, const char *__file, int __line)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
+
+
+
+# 60 "../include/lassert.h" 2
+# 51 "sanei_scsi.c" 2
+
+# 1 "/usr/include/ctype.h" 1 3 4
+# 26 "/usr/include/ctype.h" 3 4
+# 1 "/usr/include/bits/types.h" 1 3 4
+# 27 "/usr/include/bits/types.h" 3 4
+# 1 "/usr/include/bits/wordsize.h" 1 3 4
+# 28 "/usr/include/bits/types.h" 2 3 4
+
+
+typedef unsigned char __u_char;
+typedef unsigned short int __u_short;
+typedef unsigned int __u_int;
+typedef unsigned long int __u_long;
+
+
+typedef signed char __int8_t;
+typedef unsigned char __uint8_t;
+typedef signed short int __int16_t;
+typedef unsigned short int __uint16_t;
+typedef signed int __int32_t;
+typedef unsigned int __uint32_t;
+
+typedef signed long int __int64_t;
+typedef unsigned long int __uint64_t;
+
+
+
+
+
+
+
+typedef long int __quad_t;
+typedef unsigned long int __u_quad_t;
+
+
+
+
+
+
+
+typedef long int __intmax_t;
+typedef unsigned long int __uintmax_t;
+# 130 "/usr/include/bits/types.h" 3 4
+# 1 "/usr/include/bits/typesizes.h" 1 3 4
+# 131 "/usr/include/bits/types.h" 2 3 4
+
+
+typedef unsigned long int __dev_t;
+typedef unsigned int __uid_t;
+typedef unsigned int __gid_t;
+typedef unsigned long int __ino_t;
+typedef unsigned long int __ino64_t;
+typedef unsigned int __mode_t;
+typedef unsigned long int __nlink_t;
+typedef long int __off_t;
+typedef long int __off64_t;
+typedef int __pid_t;
+typedef struct { int __val[2]; } __fsid_t;
+typedef long int __clock_t;
+typedef unsigned long int __rlim_t;
+typedef unsigned long int __rlim64_t;
+typedef unsigned int __id_t;
+typedef long int __time_t;
+typedef unsigned int __useconds_t;
+typedef long int __suseconds_t;
+
+typedef int __daddr_t;
+typedef int __key_t;
+
+
+typedef int __clockid_t;
+
+
+typedef void * __timer_t;
+
+
+typedef long int __blksize_t;
+
+
+
+
+typedef long int __blkcnt_t;
+typedef long int __blkcnt64_t;
+
+
+typedef unsigned long int __fsblkcnt_t;
+typedef unsigned long int __fsblkcnt64_t;
+
+
+typedef unsigned long int __fsfilcnt_t;
+typedef unsigned long int __fsfilcnt64_t;
+
+
+typedef long int __fsword_t;
+
+typedef long int __ssize_t;
+
+
+typedef long int __syscall_slong_t;
+
+typedef unsigned long int __syscall_ulong_t;
+
+
+
+typedef __off64_t __loff_t;
+typedef char *__caddr_t;
+
+
+typedef long int __intptr_t;
+
+
+typedef unsigned int __socklen_t;
+
+
+
+
+typedef int __sig_atomic_t;
+# 27 "/usr/include/ctype.h" 2 3 4
+
+
+# 39 "/usr/include/ctype.h" 3 4
+# 1 "/usr/include/endian.h" 1 3 4
+# 36 "/usr/include/endian.h" 3 4
+# 1 "/usr/include/bits/endian.h" 1 3 4
+# 37 "/usr/include/endian.h" 2 3 4
+# 60 "/usr/include/endian.h" 3 4
+# 1 "/usr/include/bits/byteswap.h" 1 3 4
+# 34 "/usr/include/bits/byteswap.h" 3 4
+# 1 "/usr/include/bits/byteswap-16.h" 1 3 4
+# 35 "/usr/include/bits/byteswap.h" 2 3 4
+# 43 "/usr/include/bits/byteswap.h" 3 4
+static __inline unsigned int
+__bswap_32 (unsigned int __bsx)
+{
+  return __builtin_bswap32 (__bsx);
+}
+# 74 "/usr/include/bits/byteswap.h" 3 4
+static __inline __uint64_t
+__bswap_64 (__uint64_t __bsx)
+{
+  return __builtin_bswap64 (__bsx);
+}
+# 61 "/usr/include/endian.h" 2 3 4
+# 1 "/usr/include/bits/uintn-identity.h" 1 3 4
+# 32 "/usr/include/bits/uintn-identity.h" 3 4
+static __inline __uint16_t
+__uint16_identity (__uint16_t __x)
+{
+  return __x;
+}
+
+static __inline __uint32_t
+__uint32_identity (__uint32_t __x)
+{
+  return __x;
+}
+
+static __inline __uint64_t
+__uint64_identity (__uint64_t __x)
+{
+  return __x;
+}
+# 62 "/usr/include/endian.h" 2 3 4
+# 40 "/usr/include/ctype.h" 2 3 4
+
+
+
+
+
+
+enum
+{
+  _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)),
+  _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)),
+  _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)),
+  _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)),
+  _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)),
+  _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)),
+  _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)),
+  _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)),
+  _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)),
+  _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)),
+  _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)),
+  _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8))
+};
+# 79 "/usr/include/ctype.h" 3 4
+extern const unsigned short int **__ctype_b_loc (void)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
+extern const __int32_t **__ctype_tolower_loc (void)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
+extern const __int32_t **__ctype_toupper_loc (void)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
+# 108 "/usr/include/ctype.h" 3 4
+extern int isalnum (int) __attribute__ ((__nothrow__ , __leaf__));
+extern int isalpha (int) __attribute__ ((__nothrow__ , __leaf__));
+extern int iscntrl (int) __attribute__ ((__nothrow__ , __leaf__));
+extern int isdigit (int) __attribute__ ((__nothrow__ , __leaf__));
+extern int islower (int) __attribute__ ((__nothrow__ , __leaf__));
+extern int isgraph (int) __attribute__ ((__nothrow__ , __leaf__));
+extern int isprint (int) __attribute__ ((__nothrow__ , __leaf__));
+extern int ispunct (int) __attribute__ ((__nothrow__ , __leaf__));
+extern int isspace (int) __attribute__ ((__nothrow__ , __leaf__));
+extern int isupper (int) __attribute__ ((__nothrow__ , __leaf__));
+extern int isxdigit (int) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+extern int tolower (int __c) __attribute__ ((__nothrow__ , __leaf__));
+
+
+extern int toupper (int __c) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+
+extern int isblank (int) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+
+extern int isctype (int __c, int __mask) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+
+
+
+extern int isascii (int __c) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+extern int toascii (int __c) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+extern int _toupper (int) __attribute__ ((__nothrow__ , __leaf__));
+extern int _tolower (int) __attribute__ ((__nothrow__ , __leaf__));
+# 206 "/usr/include/ctype.h" 3 4
+extern __inline __attribute__ ((__gnu_inline__)) int
+__attribute__ ((__nothrow__ , __leaf__)) tolower (int __c)
+{
+  return __c >= -128 && __c < 256 ? (*__ctype_tolower_loc ())[__c] : __c;
+}
+
+extern __inline __attribute__ ((__gnu_inline__)) int
+__attribute__ ((__nothrow__ , __leaf__)) toupper (int __c)
+{
+  return __c >= -128 && __c < 256 ? (*__ctype_toupper_loc ())[__c] : __c;
+}
+# 237 "/usr/include/ctype.h" 3 4
+# 1 "/usr/include/bits/types/locale_t.h" 1 3 4
+# 22 "/usr/include/bits/types/locale_t.h" 3 4
+# 1 "/usr/include/bits/types/__locale_t.h" 1 3 4
+# 28 "/usr/include/bits/types/__locale_t.h" 3 4
+struct __locale_struct
+{
+
+  struct __locale_data *__locales[13];
+
+
+  const unsigned short int *__ctype_b;
+  const int *__ctype_tolower;
+  const int *__ctype_toupper;
+
+
+  const char *__names[13];
+};
+
+typedef struct __locale_struct *__locale_t;
+# 23 "/usr/include/bits/types/locale_t.h" 2 3 4
+
+typedef __locale_t locale_t;
+# 238 "/usr/include/ctype.h" 2 3 4
+# 251 "/usr/include/ctype.h" 3 4
+extern int isalnum_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__));
+extern int isalpha_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__));
+extern int iscntrl_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__));
+extern int isdigit_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__));
+extern int islower_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__));
+extern int isgraph_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__));
+extern int isprint_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__));
+extern int ispunct_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__));
+extern int isspace_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__));
+extern int isupper_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__));
+extern int isxdigit_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__));
+
+extern int isblank_l (int, locale_t) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+extern int __tolower_l (int __c, locale_t __l) __attribute__ ((__nothrow__ , __leaf__));
+extern int tolower_l (int __c, locale_t __l) __attribute__ ((__nothrow__ , __leaf__));
+
+
+extern int __toupper_l (int __c, locale_t __l) __attribute__ ((__nothrow__ , __leaf__));
+extern int toupper_l (int __c, locale_t __l) __attribute__ ((__nothrow__ , __leaf__));
+# 327 "/usr/include/ctype.h" 3 4
+
+# 53 "sanei_scsi.c" 2
+# 1 "/usr/include/errno.h" 1 3 4
+# 28 "/usr/include/errno.h" 3 4
+# 1 "/usr/include/bits/errno.h" 1 3 4
+# 26 "/usr/include/bits/errno.h" 3 4
+# 1 "/usr/include/linux/errno.h" 1 3 4
+# 1 "/usr/include/asm/errno.h" 1 3 4
+
+
+
+
+# 1 "/usr/include/asm-generic/errno.h" 1 3 4
+
+
+
+
+# 1 "/usr/include/asm-generic/errno-base.h" 1 3 4
+# 6 "/usr/include/asm-generic/errno.h" 2 3 4
+# 6 "/usr/include/asm/errno.h" 2 3 4
+# 1 "/usr/include/linux/errno.h" 2 3 4
+# 27 "/usr/include/bits/errno.h" 2 3 4
+# 29 "/usr/include/errno.h" 2 3 4
+
+
+
+
+
+
+
+
+extern int *__errno_location (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
+
+
+
+
+
+
+
+extern char *program_invocation_name;
+extern char *program_invocation_short_name;
+
+
+
+
+
+typedef int error_t;
+
+
+
+
+
+# 54 "sanei_scsi.c" 2
+# 1 "/usr/include/fcntl.h" 1 3 4
+# 28 "/usr/include/fcntl.h" 3 4
+
+
+
+
+
+
+
+# 1 "/usr/include/bits/fcntl.h" 1 3 4
+# 23 "/usr/include/bits/fcntl.h" 3 4
+# 1 "/usr/include/bits/wordsize.h" 1 3 4
+# 24 "/usr/include/bits/fcntl.h" 2 3 4
+# 36 "/usr/include/bits/fcntl.h" 3 4
+struct flock
+  {
+    short int l_type;
+    short int l_whence;
+
+    __off_t l_start;
+    __off_t l_len;
+
+
+
+
+    __pid_t l_pid;
+  };
+
+
+struct flock64
+  {
+    short int l_type;
+    short int l_whence;
+    __off64_t l_start;
+    __off64_t l_len;
+    __pid_t l_pid;
+  };
+
+
+
+# 1 "/usr/include/bits/fcntl-linux.h" 1 3 4
+# 38 "/usr/include/bits/fcntl-linux.h" 3 4
+# 1 "/usr/include/bits/types/struct_iovec.h" 1 3 4
+# 23 "/usr/include/bits/types/struct_iovec.h" 3 4
+# 1 "/usr/lib/gcc/ppc64le-redhat-linux/8/include/stddef.h" 1 3 4
+# 216 "/usr/lib/gcc/ppc64le-redhat-linux/8/include/stddef.h" 3 4
+typedef long unsigned int size_t;
+# 24 "/usr/include/bits/types/struct_iovec.h" 2 3 4
+
+
+struct iovec
+  {
+    void *iov_base;
+    size_t iov_len;
+  };
+# 39 "/usr/include/bits/fcntl-linux.h" 2 3 4
+# 265 "/usr/include/bits/fcntl-linux.h" 3 4
+enum __pid_type
+  {
+    F_OWNER_TID = 0,
+    F_OWNER_PID,
+    F_OWNER_PGRP,
+    F_OWNER_GID = F_OWNER_PGRP
+  };
+
+
+struct f_owner_ex
+  {
+    enum __pid_type type;
+    __pid_t pid;
+  };
+# 346 "/usr/include/bits/fcntl-linux.h" 3 4
+# 1 "/usr/include/linux/falloc.h" 1 3 4
+# 347 "/usr/include/bits/fcntl-linux.h" 2 3 4
+
+
+
+struct file_handle
+{
+  unsigned int handle_bytes;
+  int handle_type;
+
+  unsigned char f_handle[0];
+};
+
+
+
+
+
+
+
+
+
+
+extern __ssize_t readahead (int __fd, __off64_t __offset, size_t __count)
+    __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+
+
+
+extern int sync_file_range (int __fd, __off64_t __offset, __off64_t __count,
+       unsigned int __flags);
+
+
+
+
+
+
+extern __ssize_t vmsplice (int __fdout, const struct iovec *__iov,
+      size_t __count, unsigned int __flags);
+
+
+
+
+
+extern __ssize_t splice (int __fdin, __off64_t *__offin, int __fdout,
+    __off64_t *__offout, size_t __len,
+    unsigned int __flags);
+
+
+
+
+
+extern __ssize_t tee (int __fdin, int __fdout, size_t __len,
+        unsigned int __flags);
+
+
+
+
+
+
+extern int fallocate (int __fd, int __mode, __off_t __offset, __off_t __len);
+# 417 "/usr/include/bits/fcntl-linux.h" 3 4
+extern int fallocate64 (int __fd, int __mode, __off64_t __offset,
+   __off64_t __len);
+
+
+
+
+extern int name_to_handle_at (int __dfd, const char *__name,
+         struct file_handle *__handle, int *__mnt_id,
+         int __flags) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+
+
+extern int open_by_handle_at (int __mountdirfd, struct file_handle *__handle,
+         int __flags);
+
+
+
+
+# 62 "/usr/include/bits/fcntl.h" 2 3 4
+# 36 "/usr/include/fcntl.h" 2 3 4
+# 50 "/usr/include/fcntl.h" 3 4
+typedef __mode_t mode_t;
+
+
+
+
+
+typedef __off_t off_t;
+
+
+
+
+
+
+
+typedef __off64_t off64_t;
+
+
+
+
+typedef __pid_t pid_t;
+
+
+
+
+
+# 1 "/usr/include/bits/types/struct_timespec.h" 1 3 4
+
+
+
+
+
+
+
+struct timespec
+{
+  __time_t tv_sec;
+  __syscall_slong_t tv_nsec;
+};
+# 76 "/usr/include/fcntl.h" 2 3 4
+
+
+# 1 "/usr/include/bits/stat.h" 1 3 4
+# 25 "/usr/include/bits/stat.h" 3 4
+# 1 "/usr/include/bits/wordsize.h" 1 3 4
+# 26 "/usr/include/bits/stat.h" 2 3 4
+# 141 "/usr/include/bits/stat.h" 3 4
+struct stat
+  {
+    __dev_t st_dev;
+
+    __ino_t st_ino;
+
+
+
+    __nlink_t st_nlink;
+    __mode_t st_mode;
+    __uid_t st_uid;
+    __gid_t st_gid;
+    int __pad2;
+    __dev_t st_rdev;
+
+    __off_t st_size;
+
+
+
+    __blksize_t st_blksize;
+
+
+    __blkcnt_t st_blocks;
+# 174 "/usr/include/bits/stat.h" 3 4
+    struct timespec st_atim;
+    struct timespec st_mtim;
+    struct timespec st_ctim;
+# 188 "/usr/include/bits/stat.h" 3 4
+    unsigned long int __glibc_reserved4;
+    unsigned long int __glibc_reserved5;
+    unsigned long int __glibc_reserved6;
+  };
+
+
+struct stat64
+  {
+    __dev_t st_dev;
+    __ino64_t st_ino;
+    __nlink_t st_nlink;
+    __mode_t st_mode;
+    __uid_t st_uid;
+    __gid_t st_gid;
+    int __pad2;
+    __dev_t st_rdev;
+    __off64_t st_size;
+    __blksize_t st_blksize;
+    __blkcnt64_t st_blocks;
+
+
+
+
+
+
+
+    struct timespec st_atim;
+    struct timespec st_mtim;
+    struct timespec st_ctim;
+# 228 "/usr/include/bits/stat.h" 3 4
+    unsigned long int __glibc_reserved4;
+    unsigned long int __glibc_reserved5;
+    unsigned long int __glibc_reserved6;
+  };
+# 79 "/usr/include/fcntl.h" 2 3 4
+# 170 "/usr/include/fcntl.h" 3 4
+extern int fcntl (int __fd, int __cmd, ...);
+# 180 "/usr/include/fcntl.h" 3 4
+extern int open (const char *__file, int __oflag, ...) __attribute__ ((__nonnull__ (1)));
+# 190 "/usr/include/fcntl.h" 3 4
+extern int open64 (const char *__file, int __oflag, ...) __attribute__ ((__nonnull__ (1)));
+# 204 "/usr/include/fcntl.h" 3 4
+extern int openat (int __fd, const char *__file, int __oflag, ...)
+     __attribute__ ((__nonnull__ (2)));
+# 215 "/usr/include/fcntl.h" 3 4
+extern int openat64 (int __fd, const char *__file, int __oflag, ...)
+     __attribute__ ((__nonnull__ (2)));
+# 226 "/usr/include/fcntl.h" 3 4
+extern int creat (const char *__file, mode_t __mode) __attribute__ ((__nonnull__ (1)));
+# 236 "/usr/include/fcntl.h" 3 4
+extern int creat64 (const char *__file, mode_t __mode) __attribute__ ((__nonnull__ (1)));
+# 255 "/usr/include/fcntl.h" 3 4
+extern int lockf (int __fd, int __cmd, off_t __len);
+# 264 "/usr/include/fcntl.h" 3 4
+extern int lockf64 (int __fd, int __cmd, off64_t __len);
+
+
+
+
+
+
+
+extern int posix_fadvise (int __fd, off_t __offset, off_t __len,
+     int __advise) __attribute__ ((__nothrow__ , __leaf__));
+# 284 "/usr/include/fcntl.h" 3 4
+extern int posix_fadvise64 (int __fd, off64_t __offset, off64_t __len,
+       int __advise) __attribute__ ((__nothrow__ , __leaf__));
+# 294 "/usr/include/fcntl.h" 3 4
+extern int posix_fallocate (int __fd, off_t __offset, off_t __len);
+# 305 "/usr/include/fcntl.h" 3 4
+extern int posix_fallocate64 (int __fd, off64_t __offset, off64_t __len);
+
+
+
+
+
+
+
+# 1 "/usr/include/bits/fcntl2.h" 1 3 4
+# 26 "/usr/include/bits/fcntl2.h" 3 4
+extern int __open_2 (const char *__path, int __oflag) __attribute__ ((__nonnull__ (1)));
+extern int __open_alias (const char *__path, int __oflag, ...) __asm__ ("" "open")
+               __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+
+extern void __open_too_many_args (void) __attribute__((__error__ ("open can be called either with 2 or 3 arguments, not more")))
+                                                                  ;
+extern void __open_missing_mode (void) __attribute__((__error__ ("open with O_CREAT or O_TMPFILE in second argument needs 3 arguments")))
+                                                                            ;
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
+open (const char *__path, int __oflag, ...)
+{
+  if (__builtin_va_arg_pack_len () > 1)
+    __open_too_many_args ();
+
+  if (__builtin_constant_p (__oflag))
+    {
+      if ((((__oflag) & 0100) != 0 || ((__oflag) & (020000000 | 040000)) == (020000000 | 040000)) && __builtin_va_arg_pack_len () < 1)
+ {
+   __open_missing_mode ();
+   return __open_2 (__path, __oflag);
+ }
+      return __open_alias (__path, __oflag, __builtin_va_arg_pack ());
+    }
+
+  if (__builtin_va_arg_pack_len () < 1)
+    return __open_2 (__path, __oflag);
+
+  return __open_alias (__path, __oflag, __builtin_va_arg_pack ());
+}
+
+
+
+extern int __open64_2 (const char *__path, int __oflag) __attribute__ ((__nonnull__ (1)));
+extern int __open64_alias (const char *__path, int __oflag, ...) __asm__ ("" "open64")
+                   __attribute__ ((__nonnull__ (1)));
+extern void __open64_too_many_args (void) __attribute__((__error__ ("open64 can be called either with 2 or 3 arguments, not more")))
+                                                                    ;
+extern void __open64_missing_mode (void) __attribute__((__error__ ("open64 with O_CREAT or O_TMPFILE in second argument needs 3 arguments")))
+                                                                              ;
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
+open64 (const char *__path, int __oflag, ...)
+{
+  if (__builtin_va_arg_pack_len () > 1)
+    __open64_too_many_args ();
+
+  if (__builtin_constant_p (__oflag))
+    {
+      if ((((__oflag) & 0100) != 0 || ((__oflag) & (020000000 | 040000)) == (020000000 | 040000)) && __builtin_va_arg_pack_len () < 1)
+ {
+   __open64_missing_mode ();
+   return __open64_2 (__path, __oflag);
+ }
+      return __open64_alias (__path, __oflag, __builtin_va_arg_pack ());
+    }
+
+  if (__builtin_va_arg_pack_len () < 1)
+    return __open64_2 (__path, __oflag);
+
+  return __open64_alias (__path, __oflag, __builtin_va_arg_pack ());
+}
+
+
+
+
+
+extern int __openat_2 (int __fd, const char *__path, int __oflag)
+     __attribute__ ((__nonnull__ (2)));
+extern int __openat_alias (int __fd, const char *__path, int __oflag, ...) __asm__ ("" "openat")
+
+     __attribute__ ((__nonnull__ (2)));
+# 111 "/usr/include/bits/fcntl2.h" 3 4
+extern void __openat_too_many_args (void) __attribute__((__error__ ("openat can be called either with 3 or 4 arguments, not more")))
+                                                                    ;
+extern void __openat_missing_mode (void) __attribute__((__error__ ("openat with O_CREAT or O_TMPFILE in third argument needs 4 arguments")))
+                                                                             ;
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
+openat (int __fd, const char *__path, int __oflag, ...)
+{
+  if (__builtin_va_arg_pack_len () > 1)
+    __openat_too_many_args ();
+
+  if (__builtin_constant_p (__oflag))
+    {
+      if ((((__oflag) & 0100) != 0 || ((__oflag) & (020000000 | 040000)) == (020000000 | 040000)) && __builtin_va_arg_pack_len () < 1)
+ {
+   __openat_missing_mode ();
+   return __openat_2 (__fd, __path, __oflag);
+ }
+      return __openat_alias (__fd, __path, __oflag, __builtin_va_arg_pack ());
+    }
+
+  if (__builtin_va_arg_pack_len () < 1)
+    return __openat_2 (__fd, __path, __oflag);
+
+  return __openat_alias (__fd, __path, __oflag, __builtin_va_arg_pack ());
+}
+
+
+
+extern int __openat64_2 (int __fd, const char *__path, int __oflag)
+     __attribute__ ((__nonnull__ (2)));
+extern int __openat64_alias (int __fd, const char *__path, int __oflag, ...) __asm__ ("" "openat64")
+
+     __attribute__ ((__nonnull__ (2)));
+extern void __openat64_too_many_args (void) __attribute__((__error__ ("openat64 can be called either with 3 or 4 arguments, not more")))
+                                                                      ;
+extern void __openat64_missing_mode (void) __attribute__((__error__ ("openat64 with O_CREAT or O_TMPFILE in third argument needs 4 arguments")))
+                                                                               ;
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
+openat64 (int __fd, const char *__path, int __oflag, ...)
+{
+  if (__builtin_va_arg_pack_len () > 1)
+    __openat64_too_many_args ();
+
+  if (__builtin_constant_p (__oflag))
+    {
+      if ((((__oflag) & 0100) != 0 || ((__oflag) & (020000000 | 040000)) == (020000000 | 040000)) && __builtin_va_arg_pack_len () < 1)
+ {
+   __openat64_missing_mode ();
+   return __openat64_2 (__fd, __path, __oflag);
+ }
+      return __openat64_alias (__fd, __path, __oflag, __builtin_va_arg_pack ());
+    }
+
+  if (__builtin_va_arg_pack_len () < 1)
+    return __openat64_2 (__fd, __path, __oflag);
+
+  return __openat64_alias (__fd, __path, __oflag, __builtin_va_arg_pack ());
+}
+# 314 "/usr/include/fcntl.h" 2 3 4
+
+
+
+# 55 "sanei_scsi.c" 2
+# 1 "/usr/include/stdlib.h" 1 3 4
+# 25 "/usr/include/stdlib.h" 3 4
+# 1 "/usr/include/bits/libc-header-start.h" 1 3 4
+# 26 "/usr/include/stdlib.h" 2 3 4
+
+
+
+
+
+# 1 "/usr/lib/gcc/ppc64le-redhat-linux/8/include/stddef.h" 1 3 4
+# 328 "/usr/lib/gcc/ppc64le-redhat-linux/8/include/stddef.h" 3 4
+typedef int wchar_t;
+# 32 "/usr/include/stdlib.h" 2 3 4
+
+
+
+
+
+
+
+# 1 "/usr/include/bits/waitflags.h" 1 3 4
+# 40 "/usr/include/stdlib.h" 2 3 4
+# 1 "/usr/include/bits/waitstatus.h" 1 3 4
+# 41 "/usr/include/stdlib.h" 2 3 4
+# 55 "/usr/include/stdlib.h" 3 4
+# 1 "/usr/include/bits/floatn.h" 1 3 4
+# 23 "/usr/include/bits/floatn.h" 3 4
+# 1 "/usr/include/bits/long-double.h" 1 3 4
+# 24 "/usr/include/bits/floatn.h" 2 3 4
+# 116 "/usr/include/bits/floatn.h" 3 4
+# 1 "/usr/include/bits/floatn-common.h" 1 3 4
+# 24 "/usr/include/bits/floatn-common.h" 3 4
+# 1 "/usr/include/bits/long-double.h" 1 3 4
+# 25 "/usr/include/bits/floatn-common.h" 2 3 4
+# 117 "/usr/include/bits/floatn.h" 2 3 4
+# 56 "/usr/include/stdlib.h" 2 3 4
+
+
+typedef struct
+  {
+    int quot;
+    int rem;
+  } div_t;
+
+
+
+typedef struct
+  {
+    long int quot;
+    long int rem;
+  } ldiv_t;
+
+
+
+
+
+__extension__ typedef struct
+  {
+    long long int quot;
+    long long int rem;
+  } lldiv_t;
+# 97 "/usr/include/stdlib.h" 3 4
+extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
+
+
+
+extern double atof (const char *__nptr)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+
+extern int atoi (const char *__nptr)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+
+extern long int atol (const char *__nptr)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+
+
+
+__extension__ extern long long int atoll (const char *__nptr)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+
+
+
+extern double strtod (const char *__restrict __nptr,
+        char **__restrict __endptr)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+extern float strtof (const char *__restrict __nptr,
+       char **__restrict __endptr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+extern long double strtold (const char *__restrict __nptr,
+       char **__restrict __endptr)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+# 140 "/usr/include/stdlib.h" 3 4
+extern _Float32 strtof32 (const char *__restrict __nptr,
+     char **__restrict __endptr)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+extern _Float64 strtof64 (const char *__restrict __nptr,
+     char **__restrict __endptr)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+extern _Float128 strtof128 (const char *__restrict __nptr,
+       char **__restrict __endptr)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+extern _Float32x strtof32x (const char *__restrict __nptr,
+       char **__restrict __endptr)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+extern _Float64x strtof64x (const char *__restrict __nptr,
+       char **__restrict __endptr)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+# 176 "/usr/include/stdlib.h" 3 4
+extern long int strtol (const char *__restrict __nptr,
+   char **__restrict __endptr, int __base)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+extern unsigned long int strtoul (const char *__restrict __nptr,
+      char **__restrict __endptr, int __base)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+__extension__
+extern long long int strtoq (const char *__restrict __nptr,
+        char **__restrict __endptr, int __base)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+__extension__
+extern unsigned long long int strtouq (const char *__restrict __nptr,
+           char **__restrict __endptr, int __base)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+__extension__
+extern long long int strtoll (const char *__restrict __nptr,
+         char **__restrict __endptr, int __base)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+__extension__
+extern unsigned long long int strtoull (const char *__restrict __nptr,
+     char **__restrict __endptr, int __base)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+extern int strfromd (char *__dest, size_t __size, const char *__format,
+       double __f)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
+
+extern int strfromf (char *__dest, size_t __size, const char *__format,
+       float __f)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
+
+extern int strfroml (char *__dest, size_t __size, const char *__format,
+       long double __f)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
+# 232 "/usr/include/stdlib.h" 3 4
+extern int strfromf32 (char *__dest, size_t __size, const char * __format,
+         _Float32 __f)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
+
+
+
+extern int strfromf64 (char *__dest, size_t __size, const char * __format,
+         _Float64 __f)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
+
+
+
+extern int strfromf128 (char *__dest, size_t __size, const char * __format,
+   _Float128 __f)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
+
+
+
+extern int strfromf32x (char *__dest, size_t __size, const char * __format,
+   _Float32x __f)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
+
+
+
+extern int strfromf64x (char *__dest, size_t __size, const char * __format,
+   _Float64x __f)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3)));
+# 274 "/usr/include/stdlib.h" 3 4
+extern long int strtol_l (const char *__restrict __nptr,
+     char **__restrict __endptr, int __base,
+     locale_t __loc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4)));
+
+extern unsigned long int strtoul_l (const char *__restrict __nptr,
+        char **__restrict __endptr,
+        int __base, locale_t __loc)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4)));
+
+__extension__
+extern long long int strtoll_l (const char *__restrict __nptr,
+    char **__restrict __endptr, int __base,
+    locale_t __loc)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4)));
+
+__extension__
+extern unsigned long long int strtoull_l (const char *__restrict __nptr,
+       char **__restrict __endptr,
+       int __base, locale_t __loc)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 4)));
+
+extern double strtod_l (const char *__restrict __nptr,
+   char **__restrict __endptr, locale_t __loc)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
+
+extern float strtof_l (const char *__restrict __nptr,
+         char **__restrict __endptr, locale_t __loc)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
+
+extern long double strtold_l (const char *__restrict __nptr,
+         char **__restrict __endptr,
+         locale_t __loc)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
+# 316 "/usr/include/stdlib.h" 3 4
+extern _Float32 strtof32_l (const char *__restrict __nptr,
+       char **__restrict __endptr,
+       locale_t __loc)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
+
+
+
+extern _Float64 strtof64_l (const char *__restrict __nptr,
+       char **__restrict __endptr,
+       locale_t __loc)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
+
+
+
+extern _Float128 strtof128_l (const char *__restrict __nptr,
+         char **__restrict __endptr,
+         locale_t __loc)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
+
+
+
+extern _Float32x strtof32x_l (const char *__restrict __nptr,
+         char **__restrict __endptr,
+         locale_t __loc)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
+
+
+
+extern _Float64x strtof64x_l (const char *__restrict __nptr,
+         char **__restrict __endptr,
+         locale_t __loc)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3)));
+# 360 "/usr/include/stdlib.h" 3 4
+extern __inline __attribute__ ((__gnu_inline__)) int
+__attribute__ ((__nothrow__ , __leaf__)) atoi (const char *__nptr)
+{
+  return (int) strtol (__nptr, (char **) ((void *)0), 10);
+}
+extern __inline __attribute__ ((__gnu_inline__)) long int
+__attribute__ ((__nothrow__ , __leaf__)) atol (const char *__nptr)
+{
+  return strtol (__nptr, (char **) ((void *)0), 10);
+}
+
+
+__extension__ extern __inline __attribute__ ((__gnu_inline__)) long long int
+__attribute__ ((__nothrow__ , __leaf__)) atoll (const char *__nptr)
+{
+  return strtoll (__nptr, (char **) ((void *)0), 10);
+}
+# 385 "/usr/include/stdlib.h" 3 4
+extern char *l64a (long int __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
+
+
+extern long int a64l (const char *__s)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+# 1 "/usr/include/sys/types.h" 1 3 4
+# 27 "/usr/include/sys/types.h" 3 4
+
+
+
+
+
+
+typedef __u_char u_char;
+typedef __u_short u_short;
+typedef __u_int u_int;
+typedef __u_long u_long;
+typedef __quad_t quad_t;
+typedef __u_quad_t u_quad_t;
+typedef __fsid_t fsid_t;
+
+
+
+
+typedef __loff_t loff_t;
+
+
+
+typedef __ino_t ino_t;
+
+
+
+
+
+
+typedef __ino64_t ino64_t;
+
+
+
+
+typedef __dev_t dev_t;
+
+
+
+
+typedef __gid_t gid_t;
+# 75 "/usr/include/sys/types.h" 3 4
+typedef __nlink_t nlink_t;
+
+
+
+
+typedef __uid_t uid_t;
+# 104 "/usr/include/sys/types.h" 3 4
+typedef __id_t id_t;
+
+
+
+
+typedef __ssize_t ssize_t;
+
+
+
+
+
+typedef __daddr_t daddr_t;
+typedef __caddr_t caddr_t;
+
+
+
+
+
+typedef __key_t key_t;
+
+
+
+
+# 1 "/usr/include/bits/types/clock_t.h" 1 3 4
+
+
+
+
+
+
+typedef __clock_t clock_t;
+# 128 "/usr/include/sys/types.h" 2 3 4
+
+# 1 "/usr/include/bits/types/clockid_t.h" 1 3 4
+
+
+
+
+
+
+typedef __clockid_t clockid_t;
+# 130 "/usr/include/sys/types.h" 2 3 4
+# 1 "/usr/include/bits/types/time_t.h" 1 3 4
+
+
+
+
+
+
+typedef __time_t time_t;
+# 131 "/usr/include/sys/types.h" 2 3 4
+# 1 "/usr/include/bits/types/timer_t.h" 1 3 4
+
+
+
+
+
+
+typedef __timer_t timer_t;
+# 132 "/usr/include/sys/types.h" 2 3 4
+
+
+
+typedef __useconds_t useconds_t;
+
+
+
+typedef __suseconds_t suseconds_t;
+
+
+
+
+
+# 1 "/usr/lib/gcc/ppc64le-redhat-linux/8/include/stddef.h" 1 3 4
+# 146 "/usr/include/sys/types.h" 2 3 4
+
+
+
+typedef unsigned long int ulong;
+typedef unsigned short int ushort;
+typedef unsigned int uint;
+
+
+
+
+# 1 "/usr/include/bits/stdint-intn.h" 1 3 4
+# 24 "/usr/include/bits/stdint-intn.h" 3 4
+typedef __int8_t int8_t;
+typedef __int16_t int16_t;
+typedef __int32_t int32_t;
+typedef __int64_t int64_t;
+# 157 "/usr/include/sys/types.h" 2 3 4
+# 178 "/usr/include/sys/types.h" 3 4
+typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__)));
+typedef unsigned int u_int16_t __attribute__ ((__mode__ (__HI__)));
+typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__)));
+typedef unsigned int u_int64_t __attribute__ ((__mode__ (__DI__)));
+
+typedef int register_t __attribute__ ((__mode__ (__word__)));
+# 197 "/usr/include/sys/types.h" 3 4
+# 1 "/usr/include/sys/select.h" 1 3 4
+# 30 "/usr/include/sys/select.h" 3 4
+# 1 "/usr/include/bits/select.h" 1 3 4
+# 31 "/usr/include/sys/select.h" 2 3 4
+
+
+# 1 "/usr/include/bits/types/sigset_t.h" 1 3 4
+
+
+
+# 1 "/usr/include/bits/types/__sigset_t.h" 1 3 4
+
+
+
+
+typedef struct
+{
+  unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
+} __sigset_t;
+# 5 "/usr/include/bits/types/sigset_t.h" 2 3 4
+
+
+typedef __sigset_t sigset_t;
+# 34 "/usr/include/sys/select.h" 2 3 4
+
+
+
+# 1 "/usr/include/bits/types/struct_timeval.h" 1 3 4
+
+
+
+
+
+
+
+struct timeval
+{
+  __time_t tv_sec;
+  __suseconds_t tv_usec;
+};
+# 38 "/usr/include/sys/select.h" 2 3 4
+# 49 "/usr/include/sys/select.h" 3 4
+typedef long int __fd_mask;
+# 59 "/usr/include/sys/select.h" 3 4
+typedef struct
+  {
+
+
+
+    __fd_mask fds_bits[1024 / (8 * (int) sizeof (__fd_mask))];
+
+
+
+
+
+  } fd_set;
+
+
+
+
+
+
+typedef __fd_mask fd_mask;
+# 91 "/usr/include/sys/select.h" 3 4
+
+# 101 "/usr/include/sys/select.h" 3 4
+extern int select (int __nfds, fd_set *__restrict __readfds,
+     fd_set *__restrict __writefds,
+     fd_set *__restrict __exceptfds,
+     struct timeval *__restrict __timeout);
+# 113 "/usr/include/sys/select.h" 3 4
+extern int pselect (int __nfds, fd_set *__restrict __readfds,
+      fd_set *__restrict __writefds,
+      fd_set *__restrict __exceptfds,
+      const struct timespec *__restrict __timeout,
+      const __sigset_t *__restrict __sigmask);
+
+
+
+
+
+# 1 "/usr/include/bits/select2.h" 1 3 4
+# 24 "/usr/include/bits/select2.h" 3 4
+extern long int __fdelt_chk (long int __d);
+extern long int __fdelt_warn (long int __d)
+  __attribute__((__warning__ ("bit outside of fd_set selected")));
+# 124 "/usr/include/sys/select.h" 2 3 4
+
+
+
+# 198 "/usr/include/sys/types.h" 2 3 4
+
+
+
+
+
+
+
+# 1 "/usr/include/sys/sysmacros.h" 1 3 4
+# 41 "/usr/include/sys/sysmacros.h" 3 4
+# 1 "/usr/include/bits/sysmacros.h" 1 3 4
+# 42 "/usr/include/sys/sysmacros.h" 2 3 4
+# 71 "/usr/include/sys/sysmacros.h" 3 4
+
+
+extern unsigned int gnu_dev_major (__dev_t __dev) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
+extern unsigned int gnu_dev_minor (__dev_t __dev) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
+extern __dev_t gnu_dev_makedev (unsigned int __major, unsigned int __minor) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
+
+
+
+__extension__ extern __inline __attribute__ ((__gnu_inline__)) __attribute__ ((__const__)) unsigned int __attribute__ ((__nothrow__ , __leaf__)) gnu_dev_major (__dev_t __dev) { unsigned int __major; __major = ((__dev & (__dev_t) 0x00000000000fff00u) >> 8); __major |= ((__dev & (__dev_t) 0xfffff00000000000u) >> 32); return __major; }
+__extension__ extern __inline __attribute__ ((__gnu_inline__)) __attribute__ ((__const__)) unsigned int __attribute__ ((__nothrow__ , __leaf__)) gnu_dev_minor (__dev_t __dev) { unsigned int __minor; __minor = ((__dev & (__dev_t) 0x00000000000000ffu) >> 0); __minor |= ((__dev & (__dev_t) 0x00000ffffff00000u) >> 12); return __minor; }
+__extension__ extern __inline __attribute__ ((__gnu_inline__)) __attribute__ ((__const__)) __dev_t __attribute__ ((__nothrow__ , __leaf__)) gnu_dev_makedev (unsigned int __major, unsigned int __minor) { __dev_t __dev; __dev = (((__dev_t) (__major & 0x00000fffu)) << 8); __dev |= (((__dev_t) (__major & 0xfffff000u)) << 32); __dev |= (((__dev_t) (__minor & 0x000000ffu)) << 0); __dev |= (((__dev_t) (__minor & 0xffffff00u)) << 12); return __dev; }
+
+
+
+
+# 206 "/usr/include/sys/types.h" 2 3 4
+
+
+
+
+
+
+typedef __blksize_t blksize_t;
+
+
+
+
+
+
+typedef __blkcnt_t blkcnt_t;
+
+
+
+typedef __fsblkcnt_t fsblkcnt_t;
+
+
+
+typedef __fsfilcnt_t fsfilcnt_t;
+# 246 "/usr/include/sys/types.h" 3 4
+typedef __blkcnt64_t blkcnt64_t;
+typedef __fsblkcnt64_t fsblkcnt64_t;
+typedef __fsfilcnt64_t fsfilcnt64_t;
+
+
+
+
+
+# 1 "/usr/include/bits/pthreadtypes.h" 1 3 4
+# 23 "/usr/include/bits/pthreadtypes.h" 3 4
+# 1 "/usr/include/bits/thread-shared-types.h" 1 3 4
+# 77 "/usr/include/bits/thread-shared-types.h" 3 4
+# 1 "/usr/include/bits/pthreadtypes-arch.h" 1 3 4
+# 22 "/usr/include/bits/pthreadtypes-arch.h" 3 4
+# 1 "/usr/include/bits/wordsize.h" 1 3 4
+# 23 "/usr/include/bits/pthreadtypes-arch.h" 2 3 4
+# 51 "/usr/include/bits/pthreadtypes-arch.h" 3 4
+struct __pthread_rwlock_arch_t
+{
+  unsigned int __readers;
+  unsigned int __writers;
+  unsigned int __wrphase_futex;
+  unsigned int __writers_futex;
+  unsigned int __pad3;
+  unsigned int __pad4;
+
+  int __cur_writer;
+  int __shared;
+  unsigned char __rwelision;
+  unsigned char __pad1[7];
+  unsigned long int __pad2;
+
+
+  unsigned int __flags;
+# 79 "/usr/include/bits/pthreadtypes-arch.h" 3 4
+};
+# 78 "/usr/include/bits/thread-shared-types.h" 2 3 4
+
+
+
+
+typedef struct __pthread_internal_list
+{
+  struct __pthread_internal_list *__prev;
+  struct __pthread_internal_list *__next;
+} __pthread_list_t;
+# 118 "/usr/include/bits/thread-shared-types.h" 3 4
+struct __pthread_mutex_s
+{
+  int __lock ;
+  unsigned int __count;
+  int __owner;
+
+  unsigned int __nusers;
+
+
+
+  int __kind;
+ 
+
+
+
+
+  short __spins; short __elision;
+  __pthread_list_t __list;
+# 145 "/usr/include/bits/thread-shared-types.h" 3 4
+ 
+};
+
+
+
+
+struct __pthread_cond_s
+{
+  __extension__ union
+  {
+    __extension__ unsigned long long int __wseq;
+    struct
+    {
+      unsigned int __low;
+      unsigned int __high;
+    } __wseq32;
+  };
+  __extension__ union
+  {
+    __extension__ unsigned long long int __g1_start;
+    struct
+    {
+      unsigned int __low;
+      unsigned int __high;
+    } __g1_start32;
+  };
+  unsigned int __g_refs[2] ;
+  unsigned int __g_size[2];
+  unsigned int __g1_orig_size;
+  unsigned int __wrefs;
+  unsigned int __g_signals[2];
+};
+# 24 "/usr/include/bits/pthreadtypes.h" 2 3 4
+
+
+
+typedef unsigned long int pthread_t;
+
+
+
+
+typedef union
+{
+  char __size[4];
+  int __align;
+} pthread_mutexattr_t;
+
+
+
+
+typedef union
+{
+  char __size[4];
+  int __align;
+} pthread_condattr_t;
+
+
+
+typedef unsigned int pthread_key_t;
+
+
+
+typedef int pthread_once_t;
+
+
+union pthread_attr_t
+{
+  char __size[56];
+  long int __align;
+};
+
+typedef union pthread_attr_t pthread_attr_t;
+
+
+
+
+typedef union
+{
+  struct __pthread_mutex_s __data;
+  char __size[40];
+  long int __align;
+} pthread_mutex_t;
+
+
+typedef union
+{
+  struct __pthread_cond_s __data;
+  char __size[48];
+  __extension__ long long int __align;
+} pthread_cond_t;
+
+
+
+
+
+typedef union
+{
+  struct __pthread_rwlock_arch_t __data;
+  char __size[56];
+  long int __align;
+} pthread_rwlock_t;
+
+typedef union
+{
+  char __size[8];
+  long int __align;
+} pthread_rwlockattr_t;
+
+
+
+
+
+typedef volatile int pthread_spinlock_t;
+
+
+
+
+typedef union
+{
+  char __size[32];
+  long int __align;
+} pthread_barrier_t;
+
+typedef union
+{
+  char __size[4];
+  int __align;
+} pthread_barrierattr_t;
+# 255 "/usr/include/sys/types.h" 2 3 4
+
+
+
+# 395 "/usr/include/stdlib.h" 2 3 4
+
+
+
+
+
+
+extern long int random (void) __attribute__ ((__nothrow__ , __leaf__));
+
+
+extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+
+
+extern char *initstate (unsigned int __seed, char *__statebuf,
+   size_t __statelen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
+
+
+
+extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+
+
+struct random_data
+  {
+    int32_t *fptr;
+    int32_t *rptr;
+    int32_t *state;
+    int rand_type;
+    int rand_deg;
+    int rand_sep;
+    int32_t *end_ptr;
+  };
+
+extern int random_r (struct random_data *__restrict __buf,
+       int32_t *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
+
+extern int srandom_r (unsigned int __seed, struct random_data *__buf)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
+
+extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
+   size_t __statelen,
+   struct random_data *__restrict __buf)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4)));
+
+extern int setstate_r (char *__restrict __statebuf,
+         struct random_data *__restrict __buf)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+
+
+extern int rand (void) __attribute__ ((__nothrow__ , __leaf__));
+
+extern void srand (unsigned int __seed) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+
+
+
+
+extern double drand48 (void) __attribute__ ((__nothrow__ , __leaf__));
+extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern long int lrand48 (void) __attribute__ ((__nothrow__ , __leaf__));
+extern long int nrand48 (unsigned short int __xsubi[3])
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern long int mrand48 (void) __attribute__ ((__nothrow__ , __leaf__));
+extern long int jrand48 (unsigned short int __xsubi[3])
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern void srand48 (long int __seedval) __attribute__ ((__nothrow__ , __leaf__));
+extern unsigned short int *seed48 (unsigned short int __seed16v[3])
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+struct drand48_data
+  {
+    unsigned short int __x[3];
+    unsigned short int __old_x[3];
+    unsigned short int __c;
+    unsigned short int __init;
+    __extension__ unsigned long long int __a;
+
+  };
+
+
+extern int drand48_r (struct drand48_data *__restrict __buffer,
+        double *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
+extern int erand48_r (unsigned short int __xsubi[3],
+        struct drand48_data *__restrict __buffer,
+        double *__restrict __result) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern int lrand48_r (struct drand48_data *__restrict __buffer,
+        long int *__restrict __result)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
+extern int nrand48_r (unsigned short int __xsubi[3],
+        struct drand48_data *__restrict __buffer,
+        long int *__restrict __result)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern int mrand48_r (struct drand48_data *__restrict __buffer,
+        long int *__restrict __result)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
+extern int jrand48_r (unsigned short int __xsubi[3],
+        struct drand48_data *__restrict __buffer,
+        long int *__restrict __result)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
+
+extern int seed48_r (unsigned short int __seed16v[3],
+       struct drand48_data *__buffer) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
+
+extern int lcong48_r (unsigned short int __param[7],
+        struct drand48_data *__buffer)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+
+extern void *malloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__));
+
+extern void *calloc (size_t __nmemb, size_t __size)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+
+extern void *realloc (void *__ptr, size_t __size)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+
+
+extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
+
+
+
+extern void free (void *__ptr) __attribute__ ((__nothrow__ , __leaf__));
+
+
+# 1 "/usr/include/alloca.h" 1 3 4
+# 24 "/usr/include/alloca.h" 3 4
+# 1 "/usr/lib/gcc/ppc64le-redhat-linux/8/include/stddef.h" 1 3 4
+# 25 "/usr/include/alloca.h" 2 3 4
+
+
+
+
+
+
+
+extern void *alloca (size_t __size) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+
+
+
+# 567 "/usr/include/stdlib.h" 2 3 4
+
+
+
+
+
+extern void *valloc (size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern void *aligned_alloc (size_t __alignment, size_t __size)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__alloc_size__ (2))) __attribute__ ((__warn_unused_result__));
+
+
+
+extern void abort (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
+
+
+
+extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+
+
+extern int at_quick_exit (void (*__func) (void)) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+
+extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+extern void exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
+
+
+
+
+
+extern void quick_exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
+
+
+
+
+
+extern void _Exit (int __status) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
+
+
+
+
+extern char *getenv (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern char *secure_getenv (const char *__name)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+
+extern int putenv (char *__string) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+extern int setenv (const char *__name, const char *__value, int __replace)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
+
+
+extern int unsetenv (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+
+extern int clearenv (void) __attribute__ ((__nothrow__ , __leaf__));
+# 672 "/usr/include/stdlib.h" 3 4
+extern char *mktemp (char *__template) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+# 685 "/usr/include/stdlib.h" 3 4
+extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+# 695 "/usr/include/stdlib.h" 3 4
+extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+# 707 "/usr/include/stdlib.h" 3 4
+extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+# 717 "/usr/include/stdlib.h" 3 4
+extern int mkstemps64 (char *__template, int __suffixlen)
+     __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+# 728 "/usr/include/stdlib.h" 3 4
+extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+# 739 "/usr/include/stdlib.h" 3 4
+extern int mkostemp (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+# 749 "/usr/include/stdlib.h" 3 4
+extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+# 759 "/usr/include/stdlib.h" 3 4
+extern int mkostemps (char *__template, int __suffixlen, int __flags)
+     __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+# 771 "/usr/include/stdlib.h" 3 4
+extern int mkostemps64 (char *__template, int __suffixlen, int __flags)
+     __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+# 781 "/usr/include/stdlib.h" 3 4
+extern int system (const char *__command) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+extern char *canonicalize_file_name (const char *__name)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+# 797 "/usr/include/stdlib.h" 3 4
+extern char *realpath (const char *__restrict __name,
+         char *__restrict __resolved) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+
+typedef int (*__compar_fn_t) (const void *, const void *);
+
+
+typedef __compar_fn_t comparison_fn_t;
+
+
+
+typedef int (*__compar_d_fn_t) (const void *, const void *, void *);
+
+
+
+
+extern void *bsearch (const void *__key, const void *__base,
+        size_t __nmemb, size_t __size, __compar_fn_t __compar)
+     __attribute__ ((__nonnull__ (1, 2, 5))) __attribute__ ((__warn_unused_result__));
+
+
+# 1 "/usr/include/bits/stdlib-bsearch.h" 1 3 4
+# 19 "/usr/include/bits/stdlib-bsearch.h" 3 4
+extern __inline __attribute__ ((__gnu_inline__)) void *
+bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size,
+  __compar_fn_t __compar)
+{
+  size_t __l, __u, __idx;
+  const void *__p;
+  int __comparison;
+
+  __l = 0;
+  __u = __nmemb;
+  while (__l < __u)
+    {
+      __idx = (__l + __u) / 2;
+      __p = (void *) (((const char *) __base) + (__idx * __size));
+      __comparison = (*__compar) (__key, __p);
+      if (__comparison < 0)
+ __u = __idx;
+      else if (__comparison > 0)
+ __l = __idx + 1;
+      else
+ return (void *) __p;
+    }
+
+  return ((void *)0);
+}
+# 823 "/usr/include/stdlib.h" 2 3 4
+
+
+
+
+extern void qsort (void *__base, size_t __nmemb, size_t __size,
+     __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4)));
+
+extern void qsort_r (void *__base, size_t __nmemb, size_t __size,
+       __compar_d_fn_t __compar, void *__arg)
+  __attribute__ ((__nonnull__ (1, 4)));
+
+
+
+
+extern int abs (int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
+extern long int labs (long int __x) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
+
+
+__extension__ extern long long int llabs (long long int __x)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+
+extern div_t div (int __numer, int __denom)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
+extern ldiv_t ldiv (long int __numer, long int __denom)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
+
+
+__extension__ extern lldiv_t lldiv (long long int __numer,
+        long long int __denom)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
+# 869 "/usr/include/stdlib.h" 3 4
+extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
+     int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
+     int *__restrict __sign) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern char *gcvt (double __value, int __ndigit, char *__buf)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern char *qecvt (long double __value, int __ndigit,
+      int *__restrict __decpt, int *__restrict __sign)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
+extern char *qfcvt (long double __value, int __ndigit,
+      int *__restrict __decpt, int *__restrict __sign)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
+extern char *qgcvt (long double __value, int __ndigit, char *__buf)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
+     int *__restrict __sign, char *__restrict __buf,
+     size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
+extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
+     int *__restrict __sign, char *__restrict __buf,
+     size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
+
+extern int qecvt_r (long double __value, int __ndigit,
+      int *__restrict __decpt, int *__restrict __sign,
+      char *__restrict __buf, size_t __len)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
+extern int qfcvt_r (long double __value, int __ndigit,
+      int *__restrict __decpt, int *__restrict __sign,
+      char *__restrict __buf, size_t __len)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (3, 4, 5)));
+
+
+
+
+
+extern int mblen (const char *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__));
+
+
+extern int mbtowc (wchar_t *__restrict __pwc,
+     const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ , __leaf__));
+
+
+extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+extern size_t mbstowcs (wchar_t *__restrict __pwcs,
+   const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ , __leaf__));
+
+extern size_t wcstombs (char *__restrict __s,
+   const wchar_t *__restrict __pwcs, size_t __n)
+     __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+
+
+
+
+extern int rpmatch (const char *__response) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+# 954 "/usr/include/stdlib.h" 3 4
+extern int getsubopt (char **__restrict __optionp,
+        char *const *__restrict __tokens,
+        char **__restrict __valuep)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+
+
+extern int posix_openpt (int __oflag) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+
+
+extern int grantpt (int __fd) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+extern int unlockpt (int __fd) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+
+extern char *ptsname (int __fd) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+
+extern int ptsname_r (int __fd, char *__buf, size_t __buflen)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
+
+
+extern int getpt (void);
+
+
+
+
+
+
+extern int getloadavg (double __loadavg[], int __nelem)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+# 1010 "/usr/include/stdlib.h" 3 4
+# 1 "/usr/include/bits/stdlib-float.h" 1 3 4
+# 24 "/usr/include/bits/stdlib-float.h" 3 4
+extern __inline __attribute__ ((__gnu_inline__)) double
+__attribute__ ((__nothrow__ , __leaf__)) atof (const char *__nptr)
+{
+  return strtod (__nptr, (char **) ((void *)0));
+}
+# 1011 "/usr/include/stdlib.h" 2 3 4
+
+
+
+# 1 "/usr/include/bits/stdlib.h" 1 3 4
+# 23 "/usr/include/bits/stdlib.h" 3 4
+extern char *__realpath_chk (const char *__restrict __name,
+        char *__restrict __resolved,
+        size_t __resolvedlen) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
+extern char *__realpath_alias (const char *__restrict __name, char *__restrict __resolved) __asm__ ("" "realpath") __attribute__ ((__nothrow__ , __leaf__))
+
+                                                 __attribute__ ((__warn_unused_result__));
+extern char *__realpath_chk_warn (const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen) __asm__ ("" "__realpath_chk") __attribute__ ((__nothrow__ , __leaf__))
+
+
+                                                __attribute__ ((__warn_unused_result__))
+     __attribute__((__warning__ ("second argument of realpath must be either NULL or at " "least PATH_MAX bytes long buffer")))
+                                      ;
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char *
+__attribute__ ((__nothrow__ , __leaf__)) realpath (const char *__restrict __name, char *__restrict __resolved)
+{
+  if (__builtin_object_size (__resolved, 2 > 1) != (size_t) -1)
+    {
+
+
+
+
+      return __realpath_chk (__name, __resolved, __builtin_object_size (__resolved, 2 > 1));
+    }
+
+  return __realpath_alias (__name, __resolved);
+}
+
+
+extern int __ptsname_r_chk (int __fd, char *__buf, size_t __buflen,
+       size_t __nreal) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
+extern int __ptsname_r_alias (int __fd, char *__buf, size_t __buflen) __asm__ ("" "ptsname_r") __attribute__ ((__nothrow__ , __leaf__))
+
+     __attribute__ ((__nonnull__ (2)));
+extern int __ptsname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__ptsname_r_chk") __attribute__ ((__nothrow__ , __leaf__))
+
+
+     __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ptsname_r called with buflen bigger than " "size of buf")))
+                   ;
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
+__attribute__ ((__nothrow__ , __leaf__)) ptsname_r (int __fd, char *__buf, size_t __buflen)
+{
+  if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
+    {
+      if (!__builtin_constant_p (__buflen))
+ return __ptsname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1));
+      if (__buflen > __builtin_object_size (__buf, 2 > 1))
+ return __ptsname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1));
+    }
+  return __ptsname_r_alias (__fd, __buf, __buflen);
+}
+
+
+extern int __wctomb_chk (char *__s, wchar_t __wchar, size_t __buflen)
+  __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
+extern int __wctomb_alias (char *__s, wchar_t __wchar) __asm__ ("" "wctomb") __attribute__ ((__nothrow__ , __leaf__))
+              __attribute__ ((__warn_unused_result__));
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) int
+__attribute__ ((__nothrow__ , __leaf__)) wctomb (char *__s, wchar_t __wchar)
+{
+
+
+
+
+
+
+
+  if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 && 16 > __builtin_object_size (__s, 2 > 1))
+    return __wctomb_chk (__s, __wchar, __builtin_object_size (__s, 2 > 1));
+  return __wctomb_alias (__s, __wchar);
+}
+
+
+extern size_t __mbstowcs_chk (wchar_t *__restrict __dst,
+         const char *__restrict __src,
+         size_t __len, size_t __dstlen) __attribute__ ((__nothrow__ , __leaf__));
+extern size_t __mbstowcs_alias (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len) __asm__ ("" "mbstowcs") __attribute__ ((__nothrow__ , __leaf__))
+
+
+                                  ;
+extern size_t __mbstowcs_chk_warn (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__mbstowcs_chk") __attribute__ ((__nothrow__ , __leaf__))
+
+
+
+     __attribute__((__warning__ ("mbstowcs called with dst buffer smaller than len " "* sizeof (wchar_t)")))
+                        ;
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t
+__attribute__ ((__nothrow__ , __leaf__)) mbstowcs (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len)
+
+{
+  if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1)
+    {
+      if (!__builtin_constant_p (__len))
+ return __mbstowcs_chk (__dst, __src, __len,
+          __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t));
+
+      if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t))
+ return __mbstowcs_chk_warn (__dst, __src, __len,
+         __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t));
+    }
+  return __mbstowcs_alias (__dst, __src, __len);
+}
+
+
+extern size_t __wcstombs_chk (char *__restrict __dst,
+         const wchar_t *__restrict __src,
+         size_t __len, size_t __dstlen) __attribute__ ((__nothrow__ , __leaf__));
+extern size_t __wcstombs_alias (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len) __asm__ ("" "wcstombs") __attribute__ ((__nothrow__ , __leaf__))
+
+
+                                  ;
+extern size_t __wcstombs_chk_warn (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__wcstombs_chk") __attribute__ ((__nothrow__ , __leaf__))
+
+
+
+     __attribute__((__warning__ ("wcstombs called with dst buffer smaller than len")));
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t
+__attribute__ ((__nothrow__ , __leaf__)) wcstombs (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len)
+
+{
+  if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1)
+    {
+      if (!__builtin_constant_p (__len))
+ return __wcstombs_chk (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1));
+      if (__len > __builtin_object_size (__dst, 2 > 1))
+ return __wcstombs_chk_warn (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1));
+    }
+  return __wcstombs_alias (__dst, __src, __len);
+}
+# 1015 "/usr/include/stdlib.h" 2 3 4
+
+
+
+
+
+
+# 56 "sanei_scsi.c" 2
+# 1 "/usr/include/string.h" 1 3 4
+# 26 "/usr/include/string.h" 3 4
+# 1 "/usr/include/bits/libc-header-start.h" 1 3 4
+# 27 "/usr/include/string.h" 2 3 4
+
+
+
+
+
+
+# 1 "/usr/lib/gcc/ppc64le-redhat-linux/8/include/stddef.h" 1 3 4
+# 34 "/usr/include/string.h" 2 3 4
+# 42 "/usr/include/string.h" 3 4
+extern void *memcpy (void *__restrict __dest, const void *__restrict __src,
+       size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern void *memmove (void *__dest, const void *__src, size_t __n)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+
+
+extern void *memccpy (void *__restrict __dest, const void *__restrict __src,
+        int __c, size_t __n)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+
+extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int memcmp (const void *__s1, const void *__s2, size_t __n)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+# 90 "/usr/include/string.h" 3 4
+extern void *memchr (const void *__s, int __c, size_t __n)
+      __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
+# 103 "/usr/include/string.h" 3 4
+extern void *rawmemchr (const void *__s, int __c)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
+# 114 "/usr/include/string.h" 3 4
+extern void *memrchr (const void *__s, int __c, size_t __n)
+      __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
+
+extern char *strncpy (char *__restrict __dest,
+        const char *__restrict __src, size_t __n)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern char *strcat (char *__restrict __dest, const char *__restrict __src)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
+
+extern char *strncat (char *__restrict __dest, const char *__restrict __src,
+        size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern int strcmp (const char *__s1, const char *__s2)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+
+extern int strncmp (const char *__s1, const char *__s2, size_t __n)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern int strcoll (const char *__s1, const char *__s2)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+
+extern size_t strxfrm (char *__restrict __dest,
+         const char *__restrict __src, size_t __n)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
+
+
+
+
+
+
+extern int strcoll_l (const char *__s1, const char *__s2, locale_t __l)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
+
+
+extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n,
+    locale_t __l) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4)));
+
+
+
+
+
+extern char *strdup (const char *__s)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+
+extern char *strndup (const char *__string, size_t __n)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
+# 225 "/usr/include/string.h" 3 4
+extern char *strchr (const char *__s, int __c)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
+# 252 "/usr/include/string.h" 3 4
+extern char *strrchr (const char *__s, int __c)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
+# 265 "/usr/include/string.h" 3 4
+extern char *strchrnul (const char *__s, int __c)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+extern size_t strcspn (const char *__s, const char *__reject)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern size_t strspn (const char *__s, const char *__accept)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+# 302 "/usr/include/string.h" 3 4
+extern char *strpbrk (const char *__s, const char *__accept)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+# 329 "/usr/include/string.h" 3 4
+extern char *strstr (const char *__haystack, const char *__needle)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+
+extern char *strtok (char *__restrict __s, const char *__restrict __delim)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
+
+
+
+extern char *__strtok_r (char *__restrict __s,
+    const char *__restrict __delim,
+    char **__restrict __save_ptr)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
+
+extern char *strtok_r (char *__restrict __s, const char *__restrict __delim,
+         char **__restrict __save_ptr)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
+# 359 "/usr/include/string.h" 3 4
+extern char *strcasestr (const char *__haystack, const char *__needle)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+
+
+
+
+extern void *memmem (const void *__haystack, size_t __haystacklen,
+       const void *__needle, size_t __needlelen)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3)));
+
+
+
+extern void *__mempcpy (void *__restrict __dest,
+   const void *__restrict __src, size_t __n)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
+extern void *mempcpy (void *__restrict __dest,
+        const void *__restrict __src, size_t __n)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+
+extern size_t strlen (const char *__s)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+extern size_t strnlen (const char *__string, size_t __maxlen)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+extern char *strerror (int __errnum) __attribute__ ((__nothrow__ , __leaf__));
+# 420 "/usr/include/string.h" 3 4
+extern char *strerror_r (int __errnum, char *__buf, size_t __buflen)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+extern char *strerror_l (int __errnum, locale_t __l) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+# 1 "/usr/include/strings.h" 1 3 4
+# 23 "/usr/include/strings.h" 3 4
+# 1 "/usr/lib/gcc/ppc64le-redhat-linux/8/include/stddef.h" 1 3 4
+# 24 "/usr/include/strings.h" 2 3 4
+
+
+
+
+
+
+
+
+
+
+extern int bcmp (const void *__s1, const void *__s2, size_t __n)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern void bcopy (const void *__src, void *__dest, size_t __n)
+  __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+# 68 "/usr/include/strings.h" 3 4
+extern char *index (const char *__s, int __c)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
+# 96 "/usr/include/strings.h" 3 4
+extern char *rindex (const char *__s, int __c)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+
+extern int ffs (int __i) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
+
+
+
+
+
+extern int ffsl (long int __l) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
+__extension__ extern int ffsll (long long int __ll)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
+
+
+
+extern int strcasecmp (const char *__s1, const char *__s2)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern int strncasecmp (const char *__s1, const char *__s2, size_t __n)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+
+
+
+extern int strcasecmp_l (const char *__s1, const char *__s2, locale_t __loc)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
+
+
+
+extern int strncasecmp_l (const char *__s1, const char *__s2,
+     size_t __n, locale_t __loc)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4)));
+
+
+
+
+
+
+
+
+# 1 "/usr/include/bits/strings_fortified.h" 1 3 4
+# 22 "/usr/include/bits/strings_fortified.h" 3 4
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void
+__attribute__ ((__nothrow__ , __leaf__)) bcopy (const void *__src, void *__dest, size_t __len)
+{
+  (void) __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0));
+}
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void
+__attribute__ ((__nothrow__ , __leaf__)) bzero (void *__dest, size_t __len)
+{
+  (void) __builtin___memset_chk (__dest, '\0', __len, __builtin_object_size (__dest, 0));
+}
+# 145 "/usr/include/strings.h" 2 3 4
+# 432 "/usr/include/string.h" 2 3 4
+
+
+
+extern void explicit_bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+extern char *strsep (char **__restrict __stringp,
+       const char *__restrict __delim)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+
+extern char *strsignal (int __sig) __attribute__ ((__nothrow__ , __leaf__));
+
+
+extern char *__stpcpy (char *__restrict __dest, const char *__restrict __src)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
+extern char *stpcpy (char *__restrict __dest, const char *__restrict __src)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+extern char *__stpncpy (char *__restrict __dest,
+   const char *__restrict __src, size_t __n)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
+extern char *stpncpy (char *__restrict __dest,
+        const char *__restrict __src, size_t __n)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+
+extern int strverscmp (const char *__s1, const char *__s2)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+extern char *strfry (char *__string) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern void *memfrob (void *__s, size_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+# 486 "/usr/include/string.h" 3 4
+extern char *basename (const char *__filename) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+
+
+# 1 "/usr/include/bits/string_fortified.h" 1 3 4
+# 30 "/usr/include/bits/string_fortified.h" 3 4
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void *
+__attribute__ ((__nothrow__ , __leaf__)) memcpy (void *__restrict __dest, const void *__restrict __src, size_t __len)
+
+{
+  return __builtin___memcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0));
+}
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void *
+__attribute__ ((__nothrow__ , __leaf__)) memmove (void *__dest, const void *__src, size_t __len)
+{
+  return __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0));
+}
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void *
+__attribute__ ((__nothrow__ , __leaf__)) mempcpy (void *__restrict __dest, const void *__restrict __src, size_t __len)
+
+{
+  return __builtin___mempcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0));
+}
+# 58 "/usr/include/bits/string_fortified.h" 3 4
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void *
+__attribute__ ((__nothrow__ , __leaf__)) memset (void *__dest, int __ch, size_t __len)
+{
+# 71 "/usr/include/bits/string_fortified.h" 3 4
+  return __builtin___memset_chk (__dest, __ch, __len, __builtin_object_size (__dest, 0));
+}
+
+
+
+
+void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen)
+  __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) void
+__attribute__ ((__nothrow__ , __leaf__)) explicit_bzero (void *__dest, size_t __len)
+{
+  __explicit_bzero_chk (__dest, __len, __builtin_object_size (__dest, 0));
+}
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
+__attribute__ ((__nothrow__ , __leaf__)) strcpy (char *__restrict __dest, const char *__restrict __src)
+{
+  return __builtin___strcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1));
+}
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
+__attribute__ ((__nothrow__ , __leaf__)) stpcpy (char *__restrict __dest, const char *__restrict __src)
+{
+  return __builtin___stpcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1));
+}
+
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
+__attribute__ ((__nothrow__ , __leaf__)) strncpy (char *__restrict __dest, const char *__restrict __src, size_t __len)
+
+{
+  return __builtin___strncpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1));
+}
+
+
+extern char *__stpncpy_chk (char *__dest, const char *__src, size_t __n,
+       size_t __destlen) __attribute__ ((__nothrow__ , __leaf__));
+extern char *__stpncpy_alias (char *__dest, const char *__src, size_t __n) __asm__ ("" "stpncpy") __attribute__ ((__nothrow__ , __leaf__))
+                                 ;
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
+__attribute__ ((__nothrow__ , __leaf__)) stpncpy (char *__dest, const char *__src, size_t __n)
+{
+  if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1
+      && (!__builtin_constant_p (__n) || __n > __builtin_object_size (__dest, 2 > 1)))
+    return __stpncpy_chk (__dest, __src, __n, __builtin_object_size (__dest, 2 > 1));
+  return __stpncpy_alias (__dest, __src, __n);
+}
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
+__attribute__ ((__nothrow__ , __leaf__)) strcat (char *__restrict __dest, const char *__restrict __src)
+{
+  return __builtin___strcat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1));
+}
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char *
+__attribute__ ((__nothrow__ , __leaf__)) strncat (char *__restrict __dest, const char *__restrict __src, size_t __len)
+
+{
+  return __builtin___strncat_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1));
+}
+# 495 "/usr/include/string.h" 2 3 4
+
+
+
+
+# 57 "sanei_scsi.c" 2
+# 1 "/usr/include/unistd.h" 1 3 4
+# 27 "/usr/include/unistd.h" 3 4
+
+# 202 "/usr/include/unistd.h" 3 4
+# 1 "/usr/include/bits/posix_opt.h" 1 3 4
+# 203 "/usr/include/unistd.h" 2 3 4
+
+
+
+# 1 "/usr/include/bits/environments.h" 1 3 4
+# 22 "/usr/include/bits/environments.h" 3 4
+# 1 "/usr/include/bits/wordsize.h" 1 3 4
+# 23 "/usr/include/bits/environments.h" 2 3 4
+# 207 "/usr/include/unistd.h" 2 3 4
+# 226 "/usr/include/unistd.h" 3 4
+# 1 "/usr/lib/gcc/ppc64le-redhat-linux/8/include/stddef.h" 1 3 4
+# 227 "/usr/include/unistd.h" 2 3 4
+# 267 "/usr/include/unistd.h" 3 4
+typedef __intptr_t intptr_t;
+
+
+
+
+
+
+typedef __socklen_t socklen_t;
+# 287 "/usr/include/unistd.h" 3 4
+extern int access (const char *__name, int __type) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+extern int euidaccess (const char *__name, int __type)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int eaccess (const char *__name, int __type)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+
+extern int faccessat (int __fd, const char *__file, int __type, int __flag)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__));
+# 334 "/usr/include/unistd.h" 3 4
+extern __off_t lseek (int __fd, __off_t __offset, int __whence) __attribute__ ((__nothrow__ , __leaf__));
+# 345 "/usr/include/unistd.h" 3 4
+extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence)
+     __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+
+
+
+extern int close (int __fd);
+
+
+
+
+
+
+extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+extern ssize_t write (int __fd, const void *__buf, size_t __n) __attribute__ ((__warn_unused_result__));
+# 376 "/usr/include/unistd.h" 3 4
+extern ssize_t pread (int __fd, void *__buf, size_t __nbytes,
+        __off_t __offset) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+
+extern ssize_t pwrite (int __fd, const void *__buf, size_t __n,
+         __off_t __offset) __attribute__ ((__warn_unused_result__));
+# 404 "/usr/include/unistd.h" 3 4
+extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes,
+   __off64_t __offset) __attribute__ ((__warn_unused_result__));
+
+
+extern ssize_t pwrite64 (int __fd, const void *__buf, size_t __n,
+    __off64_t __offset) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+
+
+extern int pipe (int __pipedes[2]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern int pipe2 (int __pipedes[2], int __flags) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
+# 432 "/usr/include/unistd.h" 3 4
+extern unsigned int alarm (unsigned int __seconds) __attribute__ ((__nothrow__ , __leaf__));
+# 444 "/usr/include/unistd.h" 3 4
+extern unsigned int sleep (unsigned int __seconds);
+
+
+
+
+
+
+
+extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval)
+     __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+
+
+
+extern int usleep (__useconds_t __useconds);
+# 469 "/usr/include/unistd.h" 3 4
+extern int pause (void);
+
+
+
+extern int chown (const char *__file, __uid_t __owner, __gid_t __group)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+
+
+
+extern int fchown (int __fd, __uid_t __owner, __gid_t __group) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern int lchown (const char *__file, __uid_t __owner, __gid_t __group)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+
+extern int fchownat (int __fd, const char *__file, __uid_t __owner,
+       __gid_t __group, int __flag)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__));
+
+
+
+extern int chdir (const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+
+
+
+extern int fchdir (int __fd) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
+# 511 "/usr/include/unistd.h" 3 4
+extern char *getcwd (char *__buf, size_t __size) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+extern char *get_current_dir_name (void) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+
+
+
+
+extern char *getwd (char *__buf)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern int dup (int __fd) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
+
+
+extern int dup2 (int __fd, int __fd2) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+
+extern int dup3 (int __fd, int __fd2, int __flags) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+extern char **__environ;
+
+extern char **environ;
+
+
+
+
+
+extern int execve (const char *__path, char *const __argv[],
+     char *const __envp[]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+
+extern int fexecve (int __fd, char *const __argv[], char *const __envp[])
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
+
+
+
+
+extern int execv (const char *__path, char *const __argv[])
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+extern int execle (const char *__path, const char *__arg, ...)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+extern int execl (const char *__path, const char *__arg, ...)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+extern int execvp (const char *__file, char *const __argv[])
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+
+extern int execlp (const char *__file, const char *__arg, ...)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+
+extern int execvpe (const char *__file, char *const __argv[],
+      char *const __envp[])
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+
+
+extern int nice (int __inc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern void _exit (int __status) __attribute__ ((__noreturn__));
+
+
+
+
+
+# 1 "/usr/include/bits/confname.h" 1 3 4
+# 24 "/usr/include/bits/confname.h" 3 4
+enum
+  {
+    _PC_LINK_MAX,
+
+    _PC_MAX_CANON,
+
+    _PC_MAX_INPUT,
+
+    _PC_NAME_MAX,
+
+    _PC_PATH_MAX,
+
+    _PC_PIPE_BUF,
+
+    _PC_CHOWN_RESTRICTED,
+
+    _PC_NO_TRUNC,
+
+    _PC_VDISABLE,
+
+    _PC_SYNC_IO,
+
+    _PC_ASYNC_IO,
+
+    _PC_PRIO_IO,
+
+    _PC_SOCK_MAXBUF,
+
+    _PC_FILESIZEBITS,
+
+    _PC_REC_INCR_XFER_SIZE,
+
+    _PC_REC_MAX_XFER_SIZE,
+
+    _PC_REC_MIN_XFER_SIZE,
+
+    _PC_REC_XFER_ALIGN,
+
+    _PC_ALLOC_SIZE_MIN,
+
+    _PC_SYMLINK_MAX,
+
+    _PC_2_SYMLINKS
+
+  };
+
+
+enum
+  {
+    _SC_ARG_MAX,
+
+    _SC_CHILD_MAX,
+
+    _SC_CLK_TCK,
+
+    _SC_NGROUPS_MAX,
+
+    _SC_OPEN_MAX,
+
+    _SC_STREAM_MAX,
+
+    _SC_TZNAME_MAX,
+
+    _SC_JOB_CONTROL,
+
+    _SC_SAVED_IDS,
+
+    _SC_REALTIME_SIGNALS,
+
+    _SC_PRIORITY_SCHEDULING,
+
+    _SC_TIMERS,
+
+    _SC_ASYNCHRONOUS_IO,
+
+    _SC_PRIORITIZED_IO,
+
+    _SC_SYNCHRONIZED_IO,
+
+    _SC_FSYNC,
+
+    _SC_MAPPED_FILES,
+
+    _SC_MEMLOCK,
+
+    _SC_MEMLOCK_RANGE,
+
+    _SC_MEMORY_PROTECTION,
+
+    _SC_MESSAGE_PASSING,
+
+    _SC_SEMAPHORES,
+
+    _SC_SHARED_MEMORY_OBJECTS,
+
+    _SC_AIO_LISTIO_MAX,
+
+    _SC_AIO_MAX,
+
+    _SC_AIO_PRIO_DELTA_MAX,
+
+    _SC_DELAYTIMER_MAX,
+
+    _SC_MQ_OPEN_MAX,
+
+    _SC_MQ_PRIO_MAX,
+
+    _SC_VERSION,
+
+    _SC_PAGESIZE,
+
+
+    _SC_RTSIG_MAX,
+
+    _SC_SEM_NSEMS_MAX,
+
+    _SC_SEM_VALUE_MAX,
+
+    _SC_SIGQUEUE_MAX,
+
+    _SC_TIMER_MAX,
+
+
+
+
+    _SC_BC_BASE_MAX,
+
+    _SC_BC_DIM_MAX,
+
+    _SC_BC_SCALE_MAX,
+
+    _SC_BC_STRING_MAX,
+
+    _SC_COLL_WEIGHTS_MAX,
+
+    _SC_EQUIV_CLASS_MAX,
+
+    _SC_EXPR_NEST_MAX,
+
+    _SC_LINE_MAX,
+
+    _SC_RE_DUP_MAX,
+
+    _SC_CHARCLASS_NAME_MAX,
+
+
+    _SC_2_VERSION,
+
+    _SC_2_C_BIND,
+
+    _SC_2_C_DEV,
+
+    _SC_2_FORT_DEV,
+
+    _SC_2_FORT_RUN,
+
+    _SC_2_SW_DEV,
+
+    _SC_2_LOCALEDEF,
+
+
+    _SC_PII,
+
+    _SC_PII_XTI,
+
+    _SC_PII_SOCKET,
+
+    _SC_PII_INTERNET,
+
+    _SC_PII_OSI,
+
+    _SC_POLL,
+
+    _SC_SELECT,
+
+    _SC_UIO_MAXIOV,
+
+    _SC_IOV_MAX = _SC_UIO_MAXIOV,
+
+    _SC_PII_INTERNET_STREAM,
+
+    _SC_PII_INTERNET_DGRAM,
+
+    _SC_PII_OSI_COTS,
+
+    _SC_PII_OSI_CLTS,
+
+    _SC_PII_OSI_M,
+
+    _SC_T_IOV_MAX,
+
+
+
+    _SC_THREADS,
+
+    _SC_THREAD_SAFE_FUNCTIONS,
+
+    _SC_GETGR_R_SIZE_MAX,
+
+    _SC_GETPW_R_SIZE_MAX,
+
+    _SC_LOGIN_NAME_MAX,
+
+    _SC_TTY_NAME_MAX,
+
+    _SC_THREAD_DESTRUCTOR_ITERATIONS,
+
+    _SC_THREAD_KEYS_MAX,
+
+    _SC_THREAD_STACK_MIN,
+
+    _SC_THREAD_THREADS_MAX,
+
+    _SC_THREAD_ATTR_STACKADDR,
+
+    _SC_THREAD_ATTR_STACKSIZE,
+
+    _SC_THREAD_PRIORITY_SCHEDULING,
+
+    _SC_THREAD_PRIO_INHERIT,
+
+    _SC_THREAD_PRIO_PROTECT,
+
+    _SC_THREAD_PROCESS_SHARED,
+
+
+    _SC_NPROCESSORS_CONF,
+
+    _SC_NPROCESSORS_ONLN,
+
+    _SC_PHYS_PAGES,
+
+    _SC_AVPHYS_PAGES,
+
+    _SC_ATEXIT_MAX,
+
+    _SC_PASS_MAX,
+
+
+    _SC_XOPEN_VERSION,
+
+    _SC_XOPEN_XCU_VERSION,
+
+    _SC_XOPEN_UNIX,
+
+    _SC_XOPEN_CRYPT,
+
+    _SC_XOPEN_ENH_I18N,
+
+    _SC_XOPEN_SHM,
+
+
+    _SC_2_CHAR_TERM,
+
+    _SC_2_C_VERSION,
+
+    _SC_2_UPE,
+
+
+    _SC_XOPEN_XPG2,
+
+    _SC_XOPEN_XPG3,
+
+    _SC_XOPEN_XPG4,
+
+
+    _SC_CHAR_BIT,
+
+    _SC_CHAR_MAX,
+
+    _SC_CHAR_MIN,
+
+    _SC_INT_MAX,
+
+    _SC_INT_MIN,
+
+    _SC_LONG_BIT,
+
+    _SC_WORD_BIT,
+
+    _SC_MB_LEN_MAX,
+
+    _SC_NZERO,
+
+    _SC_SSIZE_MAX,
+
+    _SC_SCHAR_MAX,
+
+    _SC_SCHAR_MIN,
+
+    _SC_SHRT_MAX,
+
+    _SC_SHRT_MIN,
+
+    _SC_UCHAR_MAX,
+
+    _SC_UINT_MAX,
+
+    _SC_ULONG_MAX,
+
+    _SC_USHRT_MAX,
+
+
+    _SC_NL_ARGMAX,
+
+    _SC_NL_LANGMAX,
+
+    _SC_NL_MSGMAX,
+
+    _SC_NL_NMAX,
+
+    _SC_NL_SETMAX,
+
+    _SC_NL_TEXTMAX,
+
+
+    _SC_XBS5_ILP32_OFF32,
+
+    _SC_XBS5_ILP32_OFFBIG,
+
+    _SC_XBS5_LP64_OFF64,
+
+    _SC_XBS5_LPBIG_OFFBIG,
+
+
+    _SC_XOPEN_LEGACY,
+
+    _SC_XOPEN_REALTIME,
+
+    _SC_XOPEN_REALTIME_THREADS,
+
+
+    _SC_ADVISORY_INFO,
+
+    _SC_BARRIERS,
+
+    _SC_BASE,
+
+    _SC_C_LANG_SUPPORT,
+
+    _SC_C_LANG_SUPPORT_R,
+
+    _SC_CLOCK_SELECTION,
+
+    _SC_CPUTIME,
+
+    _SC_THREAD_CPUTIME,
+
+    _SC_DEVICE_IO,
+
+    _SC_DEVICE_SPECIFIC,
+
+    _SC_DEVICE_SPECIFIC_R,
+
+    _SC_FD_MGMT,
+
+    _SC_FIFO,
+
+    _SC_PIPE,
+
+    _SC_FILE_ATTRIBUTES,
+
+    _SC_FILE_LOCKING,
+
+    _SC_FILE_SYSTEM,
+
+    _SC_MONOTONIC_CLOCK,
+
+    _SC_MULTI_PROCESS,
+
+    _SC_SINGLE_PROCESS,
+
+    _SC_NETWORKING,
+
+    _SC_READER_WRITER_LOCKS,
+
+    _SC_SPIN_LOCKS,
+
+    _SC_REGEXP,
+
+    _SC_REGEX_VERSION,
+
+    _SC_SHELL,
+
+    _SC_SIGNALS,
+
+    _SC_SPAWN,
+
+    _SC_SPORADIC_SERVER,
+
+    _SC_THREAD_SPORADIC_SERVER,
+
+    _SC_SYSTEM_DATABASE,
+
+    _SC_SYSTEM_DATABASE_R,
+
+    _SC_TIMEOUTS,
+
+    _SC_TYPED_MEMORY_OBJECTS,
+
+    _SC_USER_GROUPS,
+
+    _SC_USER_GROUPS_R,
+
+    _SC_2_PBS,
+
+    _SC_2_PBS_ACCOUNTING,
+
+    _SC_2_PBS_LOCATE,
+
+    _SC_2_PBS_MESSAGE,
+
+    _SC_2_PBS_TRACK,
+
+    _SC_SYMLOOP_MAX,
+
+    _SC_STREAMS,
+
+    _SC_2_PBS_CHECKPOINT,
+
+
+    _SC_V6_ILP32_OFF32,
+
+    _SC_V6_ILP32_OFFBIG,
+
+    _SC_V6_LP64_OFF64,
+
+    _SC_V6_LPBIG_OFFBIG,
+
+
+    _SC_HOST_NAME_MAX,
+
+    _SC_TRACE,
+
+    _SC_TRACE_EVENT_FILTER,
+
+    _SC_TRACE_INHERIT,
+
+    _SC_TRACE_LOG,
+
+
+    _SC_LEVEL1_ICACHE_SIZE,
+
+    _SC_LEVEL1_ICACHE_ASSOC,
+
+    _SC_LEVEL1_ICACHE_LINESIZE,
+
+    _SC_LEVEL1_DCACHE_SIZE,
+
+    _SC_LEVEL1_DCACHE_ASSOC,
+
+    _SC_LEVEL1_DCACHE_LINESIZE,
+
+    _SC_LEVEL2_CACHE_SIZE,
+
+    _SC_LEVEL2_CACHE_ASSOC,
+
+    _SC_LEVEL2_CACHE_LINESIZE,
+
+    _SC_LEVEL3_CACHE_SIZE,
+
+    _SC_LEVEL3_CACHE_ASSOC,
+
+    _SC_LEVEL3_CACHE_LINESIZE,
+
+    _SC_LEVEL4_CACHE_SIZE,
+
+    _SC_LEVEL4_CACHE_ASSOC,
+
+    _SC_LEVEL4_CACHE_LINESIZE,
+
+
+
+    _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50,
+
+    _SC_RAW_SOCKETS,
+
+
+    _SC_V7_ILP32_OFF32,
+
+    _SC_V7_ILP32_OFFBIG,
+
+    _SC_V7_LP64_OFF64,
+
+    _SC_V7_LPBIG_OFFBIG,
+
+
+    _SC_SS_REPL_MAX,
+
+
+    _SC_TRACE_EVENT_NAME_MAX,
+
+    _SC_TRACE_NAME_MAX,
+
+    _SC_TRACE_SYS_MAX,
+
+    _SC_TRACE_USER_EVENT_MAX,
+
+
+    _SC_XOPEN_STREAMS,
+
+
+    _SC_THREAD_ROBUST_PRIO_INHERIT,
+
+    _SC_THREAD_ROBUST_PRIO_PROTECT
+
+  };
+
+
+enum
+  {
+    _CS_PATH,
+
+
+    _CS_V6_WIDTH_RESTRICTED_ENVS,
+
+
+
+    _CS_GNU_LIBC_VERSION,
+
+    _CS_GNU_LIBPTHREAD_VERSION,
+
+
+    _CS_V5_WIDTH_RESTRICTED_ENVS,
+
+
+
+    _CS_V7_WIDTH_RESTRICTED_ENVS,
+
+
+
+    _CS_LFS_CFLAGS = 1000,
+
+    _CS_LFS_LDFLAGS,
+
+    _CS_LFS_LIBS,
+
+    _CS_LFS_LINTFLAGS,
+
+    _CS_LFS64_CFLAGS,
+
+    _CS_LFS64_LDFLAGS,
+
+    _CS_LFS64_LIBS,
+
+    _CS_LFS64_LINTFLAGS,
+
+
+    _CS_XBS5_ILP32_OFF32_CFLAGS = 1100,
+
+    _CS_XBS5_ILP32_OFF32_LDFLAGS,
+
+    _CS_XBS5_ILP32_OFF32_LIBS,
+
+    _CS_XBS5_ILP32_OFF32_LINTFLAGS,
+
+    _CS_XBS5_ILP32_OFFBIG_CFLAGS,
+
+    _CS_XBS5_ILP32_OFFBIG_LDFLAGS,
+
+    _CS_XBS5_ILP32_OFFBIG_LIBS,
+
+    _CS_XBS5_ILP32_OFFBIG_LINTFLAGS,
+
+    _CS_XBS5_LP64_OFF64_CFLAGS,
+
+    _CS_XBS5_LP64_OFF64_LDFLAGS,
+
+    _CS_XBS5_LP64_OFF64_LIBS,
+
+    _CS_XBS5_LP64_OFF64_LINTFLAGS,
+
+    _CS_XBS5_LPBIG_OFFBIG_CFLAGS,
+
+    _CS_XBS5_LPBIG_OFFBIG_LDFLAGS,
+
+    _CS_XBS5_LPBIG_OFFBIG_LIBS,
+
+    _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS,
+
+
+    _CS_POSIX_V6_ILP32_OFF32_CFLAGS,
+
+    _CS_POSIX_V6_ILP32_OFF32_LDFLAGS,
+
+    _CS_POSIX_V6_ILP32_OFF32_LIBS,
+
+    _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS,
+
+    _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS,
+
+    _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS,
+
+    _CS_POSIX_V6_ILP32_OFFBIG_LIBS,
+
+    _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS,
+
+    _CS_POSIX_V6_LP64_OFF64_CFLAGS,
+
+    _CS_POSIX_V6_LP64_OFF64_LDFLAGS,
+
+    _CS_POSIX_V6_LP64_OFF64_LIBS,
+
+    _CS_POSIX_V6_LP64_OFF64_LINTFLAGS,
+
+    _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS,
+
+    _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS,
+
+    _CS_POSIX_V6_LPBIG_OFFBIG_LIBS,
+
+    _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS,
+
+
+    _CS_POSIX_V7_ILP32_OFF32_CFLAGS,
+
+    _CS_POSIX_V7_ILP32_OFF32_LDFLAGS,
+
+    _CS_POSIX_V7_ILP32_OFF32_LIBS,
+
+    _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS,
+
+    _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS,
+
+    _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS,
+
+    _CS_POSIX_V7_ILP32_OFFBIG_LIBS,
+
+    _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS,
+
+    _CS_POSIX_V7_LP64_OFF64_CFLAGS,
+
+    _CS_POSIX_V7_LP64_OFF64_LDFLAGS,
+
+    _CS_POSIX_V7_LP64_OFF64_LIBS,
+
+    _CS_POSIX_V7_LP64_OFF64_LINTFLAGS,
+
+    _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS,
+
+    _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS,
+
+    _CS_POSIX_V7_LPBIG_OFFBIG_LIBS,
+
+    _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS,
+
+
+    _CS_V6_ENV,
+
+    _CS_V7_ENV
+
+  };
+# 610 "/usr/include/unistd.h" 2 3 4
+
+
+extern long int pathconf (const char *__path, int __name)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern long int fpathconf (int __fd, int __name) __attribute__ ((__nothrow__ , __leaf__));
+
+
+extern long int sysconf (int __name) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+extern size_t confstr (int __name, char *__buf, size_t __len) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+
+extern __pid_t getpid (void) __attribute__ ((__nothrow__ , __leaf__));
+
+
+extern __pid_t getppid (void) __attribute__ ((__nothrow__ , __leaf__));
+
+
+extern __pid_t getpgrp (void) __attribute__ ((__nothrow__ , __leaf__));
+
+
+extern __pid_t __getpgid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__));
+
+extern __pid_t getpgid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+
+
+
+extern int setpgid (__pid_t __pid, __pid_t __pgid) __attribute__ ((__nothrow__ , __leaf__));
+# 660 "/usr/include/unistd.h" 3 4
+extern int setpgrp (void) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+
+
+
+extern __pid_t setsid (void) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+extern __pid_t getsid (__pid_t __pid) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+extern __uid_t getuid (void) __attribute__ ((__nothrow__ , __leaf__));
+
+
+extern __uid_t geteuid (void) __attribute__ ((__nothrow__ , __leaf__));
+
+
+extern __gid_t getgid (void) __attribute__ ((__nothrow__ , __leaf__));
+
+
+extern __gid_t getegid (void) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+
+extern int getgroups (int __size, __gid_t __list[]) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
+
+
+
+extern int group_member (__gid_t __gid) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+
+
+
+extern int setuid (__uid_t __uid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern int setreuid (__uid_t __ruid, __uid_t __euid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern int seteuid (__uid_t __uid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+
+extern int setgid (__gid_t __gid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern int setregid (__gid_t __rgid, __gid_t __egid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern int setegid (__gid_t __gid) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+extern int getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid)
+     __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid)
+     __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
+
+
+
+extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+
+extern __pid_t fork (void) __attribute__ ((__nothrow__));
+
+
+
+
+
+
+
+extern __pid_t vfork (void) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+
+
+extern char *ttyname (int __fd) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+extern int ttyname_r (int __fd, char *__buf, size_t __buflen)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__));
+
+
+
+extern int isatty (int __fd) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+
+extern int ttyslot (void) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+
+extern int link (const char *__from, const char *__to)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern int linkat (int __fromfd, const char *__from, int __tofd,
+     const char *__to, int __flags)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern int symlink (const char *__from, const char *__to)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern ssize_t readlink (const char *__restrict __path,
+    char *__restrict __buf, size_t __len)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern int symlinkat (const char *__from, int __tofd,
+        const char *__to) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__));
+
+
+extern ssize_t readlinkat (int __fd, const char *__restrict __path,
+      char *__restrict __buf, size_t __len)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__));
+
+
+
+extern int unlink (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+extern int unlinkat (int __fd, const char *__name, int __flag)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
+
+
+
+extern int rmdir (const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+extern __pid_t tcgetpgrp (int __fd) __attribute__ ((__nothrow__ , __leaf__));
+
+
+extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+
+
+
+extern char *getlogin (void);
+
+
+
+
+
+
+
+extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+extern int setlogin (const char *__name) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+
+
+# 1 "/usr/include/bits/getopt_posix.h" 1 3 4
+# 27 "/usr/include/bits/getopt_posix.h" 3 4
+# 1 "/usr/include/bits/getopt_core.h" 1 3 4
+# 28 "/usr/include/bits/getopt_core.h" 3 4
+
+
+
+
+
+
+
+
+extern char *optarg;
+# 50 "/usr/include/bits/getopt_core.h" 3 4
+extern int optind;
+
+
+
+
+extern int opterr;
+
+
+
+extern int optopt;
+# 91 "/usr/include/bits/getopt_core.h" 3 4
+extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
+       __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3)));
+
+
+# 28 "/usr/include/bits/getopt_posix.h" 2 3 4
+
+
+# 49 "/usr/include/bits/getopt_posix.h" 3 4
+
+# 870 "/usr/include/unistd.h" 2 3 4
+
+
+
+
+
+
+
+extern int gethostname (char *__name, size_t __len) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+
+extern int sethostname (const char *__name, size_t __len)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+
+
+
+extern int sethostid (long int __id) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+extern int getdomainname (char *__name, size_t __len)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+extern int setdomainname (const char *__name, size_t __len)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+extern int vhangup (void) __attribute__ ((__nothrow__ , __leaf__));
+
+
+extern int revoke (const char *__file) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+
+
+extern int profil (unsigned short int *__sample_buffer, size_t __size,
+     size_t __offset, unsigned int __scale)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+extern int acct (const char *__name) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+extern char *getusershell (void) __attribute__ ((__nothrow__ , __leaf__));
+extern void endusershell (void) __attribute__ ((__nothrow__ , __leaf__));
+extern void setusershell (void) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+
+
+extern int daemon (int __nochdir, int __noclose) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+
+extern int chroot (const char *__path) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+
+
+
+extern char *getpass (const char *__prompt) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+
+
+extern int fsync (int __fd);
+
+
+
+
+
+extern int syncfs (int __fd) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+
+
+
+extern long int gethostid (void);
+
+
+extern void sync (void) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+
+
+extern int getpagesize (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__const__));
+
+
+
+
+extern int getdtablesize (void) __attribute__ ((__nothrow__ , __leaf__));
+# 991 "/usr/include/unistd.h" 3 4
+extern int truncate (const char *__file, __off_t __length)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+# 1003 "/usr/include/unistd.h" 3 4
+extern int truncate64 (const char *__file, __off64_t __length)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+# 1014 "/usr/include/unistd.h" 3 4
+extern int ftruncate (int __fd, __off_t __length) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
+# 1024 "/usr/include/unistd.h" 3 4
+extern int ftruncate64 (int __fd, __off64_t __length) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
+# 1035 "/usr/include/unistd.h" 3 4
+extern int brk (void *__addr) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+extern void *sbrk (intptr_t __delta) __attribute__ ((__nothrow__ , __leaf__));
+# 1056 "/usr/include/unistd.h" 3 4
+extern long int syscall (long int __sysno, ...) __attribute__ ((__nothrow__ , __leaf__));
+# 1107 "/usr/include/unistd.h" 3 4
+ssize_t copy_file_range (int __infd, __off64_t *__pinoff,
+    int __outfd, __off64_t *__poutoff,
+    size_t __length, unsigned int __flags);
+
+
+
+
+
+extern int fdatasync (int __fildes);
+
+
+
+
+
+
+
+extern void swab (const void *__restrict __from, void *__restrict __to,
+    ssize_t __n) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2)));
+# 1151 "/usr/include/unistd.h" 3 4
+int getentropy (void *__buffer, size_t __length) __attribute__ ((__warn_unused_result__));
+
+
+
+
+# 1 "/usr/include/bits/unistd.h" 1 3 4
+# 23 "/usr/include/bits/unistd.h" 3 4
+extern ssize_t __read_chk (int __fd, void *__buf, size_t __nbytes,
+      size_t __buflen) __attribute__ ((__warn_unused_result__));
+extern ssize_t __read_alias (int __fd, void *__buf, size_t __nbytes) __asm__ ("" "read")
+                               __attribute__ ((__warn_unused_result__));
+extern ssize_t __read_chk_warn (int __fd, void *__buf, size_t __nbytes, size_t __buflen) __asm__ ("" "__read_chk")
+
+
+     __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("read called with bigger length than size of " "the destination buffer")))
+                                  ;
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t
+read (int __fd, void *__buf, size_t __nbytes)
+{
+  if (__builtin_object_size (__buf, 0) != (size_t) -1)
+    {
+      if (!__builtin_constant_p (__nbytes))
+ return __read_chk (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0));
+
+      if (__nbytes > __builtin_object_size (__buf, 0))
+ return __read_chk_warn (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0));
+    }
+  return __read_alias (__fd, __buf, __nbytes);
+}
+
+
+extern ssize_t __pread_chk (int __fd, void *__buf, size_t __nbytes,
+       __off_t __offset, size_t __bufsize) __attribute__ ((__warn_unused_result__));
+extern ssize_t __pread64_chk (int __fd, void *__buf, size_t __nbytes,
+         __off64_t __offset, size_t __bufsize) __attribute__ ((__warn_unused_result__));
+extern ssize_t __pread_alias (int __fd, void *__buf, size_t __nbytes, __off_t __offset) __asm__ ("" "pread")
+
+                                 __attribute__ ((__warn_unused_result__));
+extern ssize_t __pread64_alias (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pread64")
+
+                                     __attribute__ ((__warn_unused_result__));
+extern ssize_t __pread_chk_warn (int __fd, void *__buf, size_t __nbytes, __off_t __offset, size_t __bufsize) __asm__ ("" "__pread_chk")
+
+
+     __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread called with bigger length than size of " "the destination buffer")))
+                                  ;
+extern ssize_t __pread64_chk_warn (int __fd, void *__buf, size_t __nbytes, __off64_t __offset, size_t __bufsize) __asm__ ("" "__pread64_chk")
+
+
+
+     __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("pread64 called with bigger length than size of " "the destination buffer")))
+                                  ;
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t
+pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset)
+{
+  if (__builtin_object_size (__buf, 0) != (size_t) -1)
+    {
+      if (!__builtin_constant_p (__nbytes))
+ return __pread_chk (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0));
+
+      if ( __nbytes > __builtin_object_size (__buf, 0))
+ return __pread_chk_warn (__fd, __buf, __nbytes, __offset,
+     __builtin_object_size (__buf, 0));
+    }
+  return __pread_alias (__fd, __buf, __nbytes, __offset);
+}
+# 104 "/usr/include/bits/unistd.h" 3 4
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) ssize_t
+pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset)
+{
+  if (__builtin_object_size (__buf, 0) != (size_t) -1)
+    {
+      if (!__builtin_constant_p (__nbytes))
+ return __pread64_chk (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0));
+
+      if ( __nbytes > __builtin_object_size (__buf, 0))
+ return __pread64_chk_warn (__fd, __buf, __nbytes, __offset,
+       __builtin_object_size (__buf, 0));
+    }
+
+  return __pread64_alias (__fd, __buf, __nbytes, __offset);
+}
+
+
+
+
+extern ssize_t __readlink_chk (const char *__restrict __path,
+          char *__restrict __buf, size_t __len,
+          size_t __buflen)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__));
+extern ssize_t __readlink_alias (const char *__restrict __path, char *__restrict __buf, size_t __len) __asm__ ("" "readlink") __attribute__ ((__nothrow__ , __leaf__))
+
+
+     __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__));
+extern ssize_t __readlink_chk_warn (const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __asm__ ("" "__readlink_chk") __attribute__ ((__nothrow__ , __leaf__))
+
+
+
+     __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlink called with bigger length " "than size of destination buffer")))
+                                         ;
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) ssize_t
+__attribute__ ((__nothrow__ , __leaf__)) readlink (const char *__restrict __path, char *__restrict __buf, size_t __len)
+
+{
+  if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
+    {
+      if (!__builtin_constant_p (__len))
+ return __readlink_chk (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1));
+
+      if ( __len > __builtin_object_size (__buf, 2 > 1))
+ return __readlink_chk_warn (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1));
+    }
+  return __readlink_alias (__path, __buf, __len);
+}
+
+
+
+extern ssize_t __readlinkat_chk (int __fd, const char *__restrict __path,
+     char *__restrict __buf, size_t __len,
+     size_t __buflen)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__));
+extern ssize_t __readlinkat_alias (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len) __asm__ ("" "readlinkat") __attribute__ ((__nothrow__ , __leaf__))
+
+
+
+     __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__));
+extern ssize_t __readlinkat_chk_warn (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __asm__ ("" "__readlinkat_chk") __attribute__ ((__nothrow__ , __leaf__))
+
+
+
+     __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("readlinkat called with bigger " "length than size of destination " "buffer")))
+
+                ;
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) ssize_t
+__attribute__ ((__nothrow__ , __leaf__)) readlinkat (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len)
+
+{
+  if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
+    {
+      if (!__builtin_constant_p (__len))
+ return __readlinkat_chk (__fd, __path, __buf, __len, __builtin_object_size (__buf, 2 > 1));
+
+      if (__len > __builtin_object_size (__buf, 2 > 1))
+ return __readlinkat_chk_warn (__fd, __path, __buf, __len,
+          __builtin_object_size (__buf, 2 > 1));
+    }
+  return __readlinkat_alias (__fd, __path, __buf, __len);
+}
+
+
+extern char *__getcwd_chk (char *__buf, size_t __size, size_t __buflen)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
+extern char *__getcwd_alias (char *__buf, size_t __size) __asm__ ("" "getcwd") __attribute__ ((__nothrow__ , __leaf__))
+                                              __attribute__ ((__warn_unused_result__));
+extern char *__getcwd_chk_warn (char *__buf, size_t __size, size_t __buflen) __asm__ ("" "__getcwd_chk") __attribute__ ((__nothrow__ , __leaf__))
+
+
+     __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getcwd caller with bigger length than size of " "destination buffer")))
+                              ;
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char *
+__attribute__ ((__nothrow__ , __leaf__)) getcwd (char *__buf, size_t __size)
+{
+  if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
+    {
+      if (!__builtin_constant_p (__size))
+ return __getcwd_chk (__buf, __size, __builtin_object_size (__buf, 2 > 1));
+
+      if (__size > __builtin_object_size (__buf, 2 > 1))
+ return __getcwd_chk_warn (__buf, __size, __builtin_object_size (__buf, 2 > 1));
+    }
+  return __getcwd_alias (__buf, __size);
+}
+
+
+extern char *__getwd_chk (char *__buf, size_t buflen)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+extern char *__getwd_warn (char *__buf) __asm__ ("" "getwd") __attribute__ ((__nothrow__ , __leaf__))
+     __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("please use getcwd instead, as getwd " "doesn't specify buffer size")))
+                                         ;
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)) char *
+__attribute__ ((__nothrow__ , __leaf__)) getwd (char *__buf)
+{
+  if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
+    return __getwd_chk (__buf, __builtin_object_size (__buf, 2 > 1));
+  return __getwd_warn (__buf);
+}
+
+
+extern size_t __confstr_chk (int __name, char *__buf, size_t __len,
+        size_t __buflen) __attribute__ ((__nothrow__ , __leaf__));
+extern size_t __confstr_alias (int __name, char *__buf, size_t __len) __asm__ ("" "confstr") __attribute__ ((__nothrow__ , __leaf__))
+                             ;
+extern size_t __confstr_chk_warn (int __name, char *__buf, size_t __len, size_t __buflen) __asm__ ("" "__confstr_chk") __attribute__ ((__nothrow__ , __leaf__))
+
+
+     __attribute__((__warning__ ("confstr called with bigger length than size of destination " "buffer")))
+            ;
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) size_t
+__attribute__ ((__nothrow__ , __leaf__)) confstr (int __name, char *__buf, size_t __len)
+{
+  if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
+    {
+      if (!__builtin_constant_p (__len))
+ return __confstr_chk (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1));
+
+      if (__builtin_object_size (__buf, 2 > 1) < __len)
+ return __confstr_chk_warn (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1));
+    }
+  return __confstr_alias (__name, __buf, __len);
+}
+
+
+extern int __getgroups_chk (int __size, __gid_t __list[], size_t __listlen)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
+extern int __getgroups_alias (int __size, __gid_t __list[]) __asm__ ("" "getgroups") __attribute__ ((__nothrow__ , __leaf__))
+                 __attribute__ ((__warn_unused_result__));
+extern int __getgroups_chk_warn (int __size, __gid_t __list[], size_t __listlen) __asm__ ("" "__getgroups_chk") __attribute__ ((__nothrow__ , __leaf__))
+
+
+     __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getgroups called with bigger group count than what " "can fit into destination buffer")))
+                                           ;
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
+__attribute__ ((__nothrow__ , __leaf__)) getgroups (int __size, __gid_t __list[])
+{
+  if (__builtin_object_size (__list, 2 > 1) != (size_t) -1)
+    {
+      if (!__builtin_constant_p (__size) || __size < 0)
+ return __getgroups_chk (__size, __list, __builtin_object_size (__list, 2 > 1));
+
+      if (__size * sizeof (__gid_t) > __builtin_object_size (__list, 2 > 1))
+ return __getgroups_chk_warn (__size, __list, __builtin_object_size (__list, 2 > 1));
+    }
+  return __getgroups_alias (__size, __list);
+}
+
+
+extern int __ttyname_r_chk (int __fd, char *__buf, size_t __buflen,
+       size_t __nreal) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2)));
+extern int __ttyname_r_alias (int __fd, char *__buf, size_t __buflen) __asm__ ("" "ttyname_r") __attribute__ ((__nothrow__ , __leaf__))
+
+     __attribute__ ((__nonnull__ (2)));
+extern int __ttyname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__ttyname_r_chk") __attribute__ ((__nothrow__ , __leaf__))
+
+
+     __attribute__ ((__nonnull__ (2))) __attribute__((__warning__ ("ttyname_r called with bigger buflen than " "size of destination buffer")))
+                                  ;
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
+__attribute__ ((__nothrow__ , __leaf__)) ttyname_r (int __fd, char *__buf, size_t __buflen)
+{
+  if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
+    {
+      if (!__builtin_constant_p (__buflen))
+ return __ttyname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1));
+
+      if (__buflen > __builtin_object_size (__buf, 2 > 1))
+ return __ttyname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1));
+    }
+  return __ttyname_r_alias (__fd, __buf, __buflen);
+}
+
+
+
+extern int __getlogin_r_chk (char *__buf, size_t __buflen, size_t __nreal)
+     __attribute__ ((__nonnull__ (1)));
+extern int __getlogin_r_alias (char *__buf, size_t __buflen) __asm__ ("" "getlogin_r")
+                     __attribute__ ((__nonnull__ (1)));
+extern int __getlogin_r_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__getlogin_r_chk")
+
+
+     __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("getlogin_r called with bigger buflen than " "size of destination buffer")))
+                                  ;
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
+getlogin_r (char *__buf, size_t __buflen)
+{
+  if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
+    {
+      if (!__builtin_constant_p (__buflen))
+ return __getlogin_r_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
+
+      if (__buflen > __builtin_object_size (__buf, 2 > 1))
+ return __getlogin_r_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
+    }
+  return __getlogin_r_alias (__buf, __buflen);
+}
+
+
+
+
+extern int __gethostname_chk (char *__buf, size_t __buflen, size_t __nreal)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+extern int __gethostname_alias (char *__buf, size_t __buflen) __asm__ ("" "gethostname") __attribute__ ((__nothrow__ , __leaf__))
+                   __attribute__ ((__nonnull__ (1)));
+extern int __gethostname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__gethostname_chk") __attribute__ ((__nothrow__ , __leaf__))
+
+
+     __attribute__ ((__nonnull__ (1))) __attribute__((__warning__ ("gethostname called with bigger buflen than " "size of destination buffer")))
+                                  ;
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
+__attribute__ ((__nothrow__ , __leaf__)) gethostname (char *__buf, size_t __buflen)
+{
+  if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
+    {
+      if (!__builtin_constant_p (__buflen))
+ return __gethostname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
+
+      if (__buflen > __builtin_object_size (__buf, 2 > 1))
+ return __gethostname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
+    }
+  return __gethostname_alias (__buf, __buflen);
+}
+
+
+
+
+extern int __getdomainname_chk (char *__buf, size_t __buflen, size_t __nreal)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+extern int __getdomainname_alias (char *__buf, size_t __buflen) __asm__ ("" "getdomainname") __attribute__ ((__nothrow__ , __leaf__))
+
+                     __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
+extern int __getdomainname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__getdomainname_chk") __attribute__ ((__nothrow__ , __leaf__))
+
+
+     __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("getdomainname called with bigger " "buflen than size of destination " "buffer")))
+
+                    ;
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
+__attribute__ ((__nothrow__ , __leaf__)) getdomainname (char *__buf, size_t __buflen)
+{
+  if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
+    {
+      if (!__builtin_constant_p (__buflen))
+ return __getdomainname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
+
+      if (__buflen > __builtin_object_size (__buf, 2 > 1))
+ return __getdomainname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
+    }
+  return __getdomainname_alias (__buf, __buflen);
+}
+# 1157 "/usr/include/unistd.h" 2 3 4
+
+
+
+# 58 "sanei_scsi.c" 2
+
+
+# 1 "/usr/include/sys/ioctl.h" 1 3 4
+# 23 "/usr/include/sys/ioctl.h" 3 4
+
+
+
+# 1 "/usr/include/bits/ioctls.h" 1 3 4
+# 23 "/usr/include/bits/ioctls.h" 3 4
+# 1 "/usr/include/asm/ioctls.h" 1 3 4
+
+
+
+
+# 1 "/usr/include/asm/ioctl.h" 1 3 4
+# 12 "/usr/include/asm/ioctl.h" 3 4
+# 1 "/usr/include/asm-generic/ioctl.h" 1 3 4
+# 13 "/usr/include/asm/ioctl.h" 2 3 4
+# 6 "/usr/include/asm/ioctls.h" 2 3 4
+# 24 "/usr/include/bits/ioctls.h" 2 3 4
+# 27 "/usr/include/sys/ioctl.h" 2 3 4
+
+
+# 1 "/usr/include/bits/ioctl-types.h" 1 3 4
+# 27 "/usr/include/bits/ioctl-types.h" 3 4
+struct winsize
+  {
+    unsigned short int ws_row;
+    unsigned short int ws_col;
+    unsigned short int ws_xpixel;
+    unsigned short int ws_ypixel;
+  };
+
+
+struct termio
+  {
+    unsigned short int c_iflag;
+    unsigned short int c_oflag;
+    unsigned short int c_cflag;
+    unsigned short int c_lflag;
+    unsigned char c_line;
+    unsigned char c_cc[10];
+};
+# 30 "/usr/include/sys/ioctl.h" 2 3 4
+
+
+
+
+
+
+# 1 "/usr/include/sys/ttydefaults.h" 1 3 4
+# 37 "/usr/include/sys/ioctl.h" 2 3 4
+
+
+
+
+extern int ioctl (int __fd, unsigned long int __request, ...) __attribute__ ((__nothrow__ , __leaf__));
+
+
+# 61 "sanei_scsi.c" 2
+
+# 1 "/usr/include/sys/param.h" 1 3 4
+# 23 "/usr/include/sys/param.h" 3 4
+# 1 "/usr/lib/gcc/ppc64le-redhat-linux/8/include/stddef.h" 1 3 4
+# 24 "/usr/include/sys/param.h" 2 3 4
+
+
+# 1 "/usr/lib/gcc/ppc64le-redhat-linux/8/include/limits.h" 1 3 4
+# 34 "/usr/lib/gcc/ppc64le-redhat-linux/8/include/limits.h" 3 4
+# 1 "/usr/lib/gcc/ppc64le-redhat-linux/8/include/syslimits.h" 1 3 4
+
+
+
+
+
+
+# 1 "/usr/lib/gcc/ppc64le-redhat-linux/8/include/limits.h" 1 3 4
+# 194 "/usr/lib/gcc/ppc64le-redhat-linux/8/include/limits.h" 3 4
+# 1 "/usr/include/limits.h" 1 3 4
+# 26 "/usr/include/limits.h" 3 4
+# 1 "/usr/include/bits/libc-header-start.h" 1 3 4
+# 27 "/usr/include/limits.h" 2 3 4
+# 183 "/usr/include/limits.h" 3 4
+# 1 "/usr/include/bits/posix1_lim.h" 1 3 4
+# 160 "/usr/include/bits/posix1_lim.h" 3 4
+# 1 "/usr/include/bits/local_lim.h" 1 3 4
+# 38 "/usr/include/bits/local_lim.h" 3 4
+# 1 "/usr/include/linux/limits.h" 1 3 4
+# 39 "/usr/include/bits/local_lim.h" 2 3 4
+# 161 "/usr/include/bits/posix1_lim.h" 2 3 4
+# 184 "/usr/include/limits.h" 2 3 4
+
+
+
+# 1 "/usr/include/bits/posix2_lim.h" 1 3 4
+# 188 "/usr/include/limits.h" 2 3 4
+
+
+
+# 1 "/usr/include/bits/xopen_lim.h" 1 3 4
+# 64 "/usr/include/bits/xopen_lim.h" 3 4
+# 1 "/usr/include/bits/uio_lim.h" 1 3 4
+# 65 "/usr/include/bits/xopen_lim.h" 2 3 4
+# 192 "/usr/include/limits.h" 2 3 4
+# 195 "/usr/lib/gcc/ppc64le-redhat-linux/8/include/limits.h" 2 3 4
+# 8 "/usr/lib/gcc/ppc64le-redhat-linux/8/include/syslimits.h" 2 3 4
+# 35 "/usr/lib/gcc/ppc64le-redhat-linux/8/include/limits.h" 2 3 4
+# 27 "/usr/include/sys/param.h" 2 3 4
+
+# 1 "/usr/include/signal.h" 1 3 4
+# 27 "/usr/include/signal.h" 3 4
+
+
+
+# 1 "/usr/include/bits/signum.h" 1 3 4
+# 26 "/usr/include/bits/signum.h" 3 4
+# 1 "/usr/include/bits/signum-generic.h" 1 3 4
+# 27 "/usr/include/bits/signum.h" 2 3 4
+# 31 "/usr/include/signal.h" 2 3 4
+
+# 1 "/usr/include/bits/types/sig_atomic_t.h" 1 3 4
+
+
+
+
+
+
+
+typedef __sig_atomic_t sig_atomic_t;
+# 33 "/usr/include/signal.h" 2 3 4
+# 57 "/usr/include/signal.h" 3 4
+# 1 "/usr/include/bits/types/siginfo_t.h" 1 3 4
+
+
+
+# 1 "/usr/include/bits/wordsize.h" 1 3 4
+# 5 "/usr/include/bits/types/siginfo_t.h" 2 3 4
+
+# 1 "/usr/include/bits/types/__sigval_t.h" 1 3 4
+# 24 "/usr/include/bits/types/__sigval_t.h" 3 4
+union sigval
+{
+  int sival_int;
+  void *sival_ptr;
+};
+
+typedef union sigval __sigval_t;
+# 7 "/usr/include/bits/types/siginfo_t.h" 2 3 4
+# 16 "/usr/include/bits/types/siginfo_t.h" 3 4
+# 1 "/usr/include/bits/siginfo-arch.h" 1 3 4
+# 17 "/usr/include/bits/types/siginfo_t.h" 2 3 4
+# 36 "/usr/include/bits/types/siginfo_t.h" 3 4
+typedef struct
+  {
+    int si_signo;
+
+    int si_errno;
+
+    int si_code;
+
+
+
+
+
+    int __pad0;
+
+
+    union
+      {
+ int _pad[((128 / sizeof (int)) - 4)];
+
+
+ struct
+   {
+     __pid_t si_pid;
+     __uid_t si_uid;
+   } _kill;
+
+
+ struct
+   {
+     int si_tid;
+     int si_overrun;
+     __sigval_t si_sigval;
+   } _timer;
+
+
+ struct
+   {
+     __pid_t si_pid;
+     __uid_t si_uid;
+     __sigval_t si_sigval;
+   } _rt;
+
+
+ struct
+   {
+     __pid_t si_pid;
+     __uid_t si_uid;
+     int si_status;
+     __clock_t si_utime;
+     __clock_t si_stime;
+   } _sigchld;
+
+
+ struct
+   {
+     void *si_addr;
+    
+     short int si_addr_lsb;
+     union
+       {
+
+  struct
+    {
+      void *_lower;
+      void *_upper;
+    } _addr_bnd;
+
+  __uint32_t _pkey;
+       } _bounds;
+   } _sigfault;
+
+
+ struct
+   {
+     long int si_band;
+     int si_fd;
+   } _sigpoll;
+
+
+
+ struct
+   {
+     void *_call_addr;
+     int _syscall;
+     unsigned int _arch;
+   } _sigsys;
+
+      } _sifields;
+  } siginfo_t ;
+# 58 "/usr/include/signal.h" 2 3 4
+# 1 "/usr/include/bits/siginfo-consts.h" 1 3 4
+# 35 "/usr/include/bits/siginfo-consts.h" 3 4
+enum
+{
+  SI_ASYNCNL = -60,
+  SI_TKILL = -6,
+  SI_SIGIO,
+
+  SI_ASYNCIO,
+  SI_MESGQ,
+  SI_TIMER,
+
+
+
+
+
+  SI_QUEUE,
+  SI_USER,
+  SI_KERNEL = 0x80
+# 63 "/usr/include/bits/siginfo-consts.h" 3 4
+};
+
+
+
+
+enum
+{
+  ILL_ILLOPC = 1,
+
+  ILL_ILLOPN,
+
+  ILL_ILLADR,
+
+  ILL_ILLTRP,
+
+  ILL_PRVOPC,
+
+  ILL_PRVREG,
+
+  ILL_COPROC,
+
+  ILL_BADSTK
+
+};
+
+
+enum
+{
+  FPE_INTDIV = 1,
+
+  FPE_INTOVF,
+
+  FPE_FLTDIV,
+
+  FPE_FLTOVF,
+
+  FPE_FLTUND,
+
+  FPE_FLTRES,
+
+  FPE_FLTINV,
+
+  FPE_FLTSUB
+
+};
+
+
+enum
+{
+  SEGV_MAPERR = 1,
+
+  SEGV_ACCERR,
+
+  SEGV_BNDERR,
+
+  SEGV_PKUERR
+
+};
+
+
+enum
+{
+  BUS_ADRALN = 1,
+
+  BUS_ADRERR,
+
+  BUS_OBJERR,
+
+  BUS_MCEERR_AR,
+
+  BUS_MCEERR_AO
+
+};
+
+
+
+
+enum
+{
+  TRAP_BRKPT = 1,
+
+  TRAP_TRACE
+
+};
+
+
+
+
+enum
+{
+  CLD_EXITED = 1,
+
+  CLD_KILLED,
+
+  CLD_DUMPED,
+
+  CLD_TRAPPED,
+
+  CLD_STOPPED,
+
+  CLD_CONTINUED
+
+};
+
+
+enum
+{
+  POLL_IN = 1,
+
+  POLL_OUT,
+
+  POLL_MSG,
+
+  POLL_ERR,
+
+  POLL_PRI,
+
+  POLL_HUP
+
+};
+
+
+
+
+
+# 1 "/usr/include/bits/siginfo-consts-arch.h" 1 3 4
+# 189 "/usr/include/bits/siginfo-consts.h" 2 3 4
+# 59 "/usr/include/signal.h" 2 3 4
+
+
+
+# 1 "/usr/include/bits/types/sigval_t.h" 1 3 4
+# 16 "/usr/include/bits/types/sigval_t.h" 3 4
+typedef __sigval_t sigval_t;
+# 63 "/usr/include/signal.h" 2 3 4
+
+
+
+# 1 "/usr/include/bits/types/sigevent_t.h" 1 3 4
+
+
+
+# 1 "/usr/include/bits/wordsize.h" 1 3 4
+# 5 "/usr/include/bits/types/sigevent_t.h" 2 3 4
+# 22 "/usr/include/bits/types/sigevent_t.h" 3 4
+typedef struct sigevent
+  {
+    __sigval_t sigev_value;
+    int sigev_signo;
+    int sigev_notify;
+
+    union
+      {
+ int _pad[((64 / sizeof (int)) - 4)];
+
+
+
+ __pid_t _tid;
+
+ struct
+   {
+     void (*_function) (__sigval_t);
+     pthread_attr_t *_attribute;
+   } _sigev_thread;
+      } _sigev_un;
+  } sigevent_t;
+# 67 "/usr/include/signal.h" 2 3 4
+# 1 "/usr/include/bits/sigevent-consts.h" 1 3 4
+# 27 "/usr/include/bits/sigevent-consts.h" 3 4
+enum
+{
+  SIGEV_SIGNAL = 0,
+
+  SIGEV_NONE,
+
+  SIGEV_THREAD,
+
+
+  SIGEV_THREAD_ID = 4
+
+
+};
+# 68 "/usr/include/signal.h" 2 3 4
+
+
+
+
+typedef void (*__sighandler_t) (int);
+
+
+
+
+extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler)
+     __attribute__ ((__nothrow__ , __leaf__));
+
+extern __sighandler_t sysv_signal (int __sig, __sighandler_t __handler)
+     __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+
+
+
+extern __sighandler_t signal (int __sig, __sighandler_t __handler)
+     __attribute__ ((__nothrow__ , __leaf__));
+# 112 "/usr/include/signal.h" 3 4
+extern int kill (__pid_t __pid, int __sig) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+
+
+
+extern int killpg (__pid_t __pgrp, int __sig) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+extern int raise (int __sig) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+extern __sighandler_t ssignal (int __sig, __sighandler_t __handler)
+     __attribute__ ((__nothrow__ , __leaf__));
+extern int gsignal (int __sig) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+
+extern void psignal (int __sig, const char *__s);
+
+
+extern void psiginfo (const siginfo_t *__pinfo, const char *__s);
+# 151 "/usr/include/signal.h" 3 4
+extern int sigpause (int __sig) __asm__ ("__xpg_sigpause");
+# 170 "/usr/include/signal.h" 3 4
+extern int sigblock (int __mask) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__));
+
+
+extern int sigsetmask (int __mask) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__));
+
+
+extern int siggetmask (void) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__));
+# 185 "/usr/include/signal.h" 3 4
+typedef __sighandler_t sighandler_t;
+
+
+
+
+typedef __sighandler_t sig_t;
+
+
+
+
+
+extern int sigemptyset (sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int sigfillset (sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int sigaddset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int sigdelset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int sigismember (const sigset_t *__set, int __signo)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+extern int sigisemptyset (const sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int sigandset (sigset_t *__set, const sigset_t *__left,
+        const sigset_t *__right) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3)));
+
+
+extern int sigorset (sigset_t *__set, const sigset_t *__left,
+       const sigset_t *__right) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1, 2, 3)));
+
+
+
+
+# 1 "/usr/include/bits/sigaction.h" 1 3 4
+# 24 "/usr/include/bits/sigaction.h" 3 4
+struct sigaction
+  {
+
+
+    union
+      {
+
+ __sighandler_t sa_handler;
+
+ void (*sa_sigaction) (int, siginfo_t *, void *);
+      }
+    __sigaction_handler;
+
+
+
+
+
+
+
+    __sigset_t sa_mask;
+
+
+    int sa_flags;
+
+
+    void (*sa_restorer) (void);
+  };
+# 227 "/usr/include/signal.h" 2 3 4
+
+
+extern int sigprocmask (int __how, const sigset_t *__restrict __set,
+   sigset_t *__restrict __oset) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+
+
+
+extern int sigsuspend (const sigset_t *__set) __attribute__ ((__nonnull__ (1)));
+
+
+extern int sigaction (int __sig, const struct sigaction *__restrict __act,
+        struct sigaction *__restrict __oact) __attribute__ ((__nothrow__ , __leaf__));
+
+
+extern int sigpending (sigset_t *__set) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+
+
+extern int sigwait (const sigset_t *__restrict __set, int *__restrict __sig)
+     __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+
+
+
+
+extern int sigwaitinfo (const sigset_t *__restrict __set,
+   siginfo_t *__restrict __info) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+
+extern int sigtimedwait (const sigset_t *__restrict __set,
+    siginfo_t *__restrict __info,
+    const struct timespec *__restrict __timeout)
+     __attribute__ ((__nonnull__ (1)));
+
+
+
+extern int sigqueue (__pid_t __pid, int __sig, const union sigval __val)
+     __attribute__ ((__nothrow__ , __leaf__));
+# 286 "/usr/include/signal.h" 3 4
+extern const char *const _sys_siglist[(64 + 1)];
+extern const char *const sys_siglist[(64 + 1)];
+
+
+
+# 1 "/usr/include/bits/sigcontext.h" 1 3 4
+# 30 "/usr/include/bits/sigcontext.h" 3 4
+# 1 "/usr/include/asm/sigcontext.h" 1 3 4
+# 12 "/usr/include/asm/sigcontext.h" 3 4
+# 1 "/usr/include/asm/ptrace.h" 1 3 4
+# 28 "/usr/include/asm/ptrace.h" 3 4
+# 1 "/usr/include/linux/types.h" 1 3 4
+
+
+
+
+# 1 "/usr/include/asm/types.h" 1 3 4
+# 26 "/usr/include/asm/types.h" 3 4
+# 1 "/usr/include/asm-generic/int-l64.h" 1 3 4
+# 12 "/usr/include/asm-generic/int-l64.h" 3 4
+# 1 "/usr/include/asm/bitsperlong.h" 1 3 4
+# 11 "/usr/include/asm/bitsperlong.h" 3 4
+# 1 "/usr/include/asm-generic/bitsperlong.h" 1 3 4
+# 12 "/usr/include/asm/bitsperlong.h" 2 3 4
+# 13 "/usr/include/asm-generic/int-l64.h" 2 3 4
+
+
+
+
+
+
+
+typedef __signed__ char __s8;
+typedef unsigned char __u8;
+
+typedef __signed__ short __s16;
+typedef unsigned short __u16;
+
+typedef __signed__ int __s32;
+typedef unsigned int __u32;
+
+typedef __signed__ long __s64;
+typedef unsigned long __u64;
+# 27 "/usr/include/asm/types.h" 2 3 4
+
+
+
+
+
+
+
+typedef struct {
+ __u32 u[4];
+} __attribute__((aligned(16))) __vector128;
+# 6 "/usr/include/linux/types.h" 2 3 4
+
+
+
+# 1 "/usr/include/linux/posix_types.h" 1 3 4
+
+
+
+
+# 1 "/usr/include/linux/stddef.h" 1 3 4
+# 6 "/usr/include/linux/posix_types.h" 2 3 4
+# 25 "/usr/include/linux/posix_types.h" 3 4
+typedef struct {
+ unsigned long fds_bits[1024 / (8 * sizeof(long))];
+} __kernel_fd_set;
+
+
+typedef void (*__kernel_sighandler_t)(int);
+
+
+typedef int __kernel_key_t;
+typedef int __kernel_mqd_t;
+
+# 1 "/usr/include/asm/posix_types.h" 1 3 4
+# 12 "/usr/include/asm/posix_types.h" 3 4
+typedef unsigned long __kernel_old_dev_t;
+# 24 "/usr/include/asm/posix_types.h" 3 4
+# 1 "/usr/include/asm-generic/posix_types.h" 1 3 4
+# 15 "/usr/include/asm-generic/posix_types.h" 3 4
+typedef long __kernel_long_t;
+typedef unsigned long __kernel_ulong_t;
+
+
+
+typedef __kernel_ulong_t __kernel_ino_t;
+
+
+
+typedef unsigned int __kernel_mode_t;
+
+
+
+typedef int __kernel_pid_t;
+
+
+
+typedef int __kernel_ipc_pid_t;
+
+
+
+typedef unsigned int __kernel_uid_t;
+typedef unsigned int __kernel_gid_t;
+
+
+
+typedef __kernel_long_t __kernel_suseconds_t;
+
+
+
+typedef int __kernel_daddr_t;
+
+
+
+typedef unsigned int __kernel_uid32_t;
+typedef unsigned int __kernel_gid32_t;
+
+
+
+typedef __kernel_uid_t __kernel_old_uid_t;
+typedef __kernel_gid_t __kernel_old_gid_t;
+# 72 "/usr/include/asm-generic/posix_types.h" 3 4
+typedef __kernel_ulong_t __kernel_size_t;
+typedef __kernel_long_t __kernel_ssize_t;
+typedef __kernel_long_t __kernel_ptrdiff_t;
+
+
+
+
+typedef struct {
+ int val[2];
+} __kernel_fsid_t;
+
+
+
+
+
+typedef __kernel_long_t __kernel_off_t;
+typedef long long __kernel_loff_t;
+typedef __kernel_long_t __kernel_time_t;
+typedef __kernel_long_t __kernel_clock_t;
+typedef int __kernel_timer_t;
+typedef int __kernel_clockid_t;
+typedef char * __kernel_caddr_t;
+typedef unsigned short __kernel_uid16_t;
+typedef unsigned short __kernel_gid16_t;
+# 25 "/usr/include/asm/posix_types.h" 2 3 4
+# 37 "/usr/include/linux/posix_types.h" 2 3 4
+# 10 "/usr/include/linux/types.h" 2 3 4
+# 24 "/usr/include/linux/types.h" 3 4
+typedef __u16 __le16;
+typedef __u16 __be16;
+typedef __u32 __le32;
+typedef __u32 __be32;
+typedef __u64 __le64;
+typedef __u64 __be64;
+
+typedef __u16 __sum16;
+typedef __u32 __wsum;
+# 50 "/usr/include/linux/types.h" 3 4
+typedef unsigned __poll_t;
+# 29 "/usr/include/asm/ptrace.h" 2 3 4
+
+
+
+struct pt_regs {
+ unsigned long gpr[32];
+ unsigned long nip;
+ unsigned long msr;
+ unsigned long orig_gpr3;
+ unsigned long ctr;
+ unsigned long link;
+ unsigned long xer;
+ unsigned long ccr;
+
+ unsigned long softe;
+
+
+
+
+ unsigned long trap;
+
+
+ unsigned long dar;
+ unsigned long dsisr;
+ unsigned long result;
+};
+# 196 "/usr/include/asm/ptrace.h" 3 4
+struct ppc_debug_info {
+ __u32 version;
+ __u32 num_instruction_bps;
+ __u32 num_data_bps;
+ __u32 num_condition_regs;
+ __u32 data_bp_alignment;
+ __u32 sizeof_condition;
+ __u64 features;
+};
+# 219 "/usr/include/asm/ptrace.h" 3 4
+struct ppc_hw_breakpoint {
+ __u32 version;
+ __u32 trigger_type;
+ __u32 addr_mode;
+ __u32 condition_mode;
+ __u64 addr;
+ __u64 addr2;
+ __u64 condition_value;
+};
+# 13 "/usr/include/asm/sigcontext.h" 2 3 4
+
+# 1 "/usr/include/asm/elf.h" 1 3 4
+# 17 "/usr/include/asm/elf.h" 3 4
+# 1 "/usr/include/asm/cputable.h" 1 3 4
+# 18 "/usr/include/asm/elf.h" 2 3 4
+# 1 "/usr/include/asm/auxvec.h" 1 3 4
+# 19 "/usr/include/asm/elf.h" 2 3 4
+# 102 "/usr/include/asm/elf.h" 3 4
+typedef unsigned long elf_greg_t64;
+typedef elf_greg_t64 elf_gregset_t64[48];
+
+typedef unsigned int elf_greg_t32;
+typedef elf_greg_t32 elf_gregset_t32[48];
+typedef elf_gregset_t32 compat_elf_gregset_t;
+# 119 "/usr/include/asm/elf.h" 3 4
+typedef elf_greg_t64 elf_greg_t;
+typedef elf_gregset_t64 elf_gregset_t;
+# 138 "/usr/include/asm/elf.h" 3 4
+typedef double elf_fpreg_t;
+typedef elf_fpreg_t elf_fpregset_t[33];
+# 160 "/usr/include/asm/elf.h" 3 4
+typedef __vector128 elf_vrreg_t;
+typedef elf_vrreg_t elf_vrregset_t[34];
+
+typedef elf_vrreg_t elf_vrregset_t32[33];
+typedef elf_fpreg_t elf_vsrreghalf_t32[32];
+# 293 "/usr/include/asm/elf.h" 3 4
+struct ppc64_opd_entry
+{
+ unsigned long funcaddr;
+ unsigned long r2;
+};
+# 15 "/usr/include/asm/sigcontext.h" 2 3 4
+
+
+struct sigcontext {
+ unsigned long _unused[4];
+ int signal;
+
+ int _pad0;
+
+ unsigned long handler;
+ unsigned long oldmask;
+ struct pt_regs *regs;
+
+ elf_gregset_t gp_regs;
+ elf_fpregset_t fp_regs;
+# 83 "/usr/include/asm/sigcontext.h" 3 4
+ elf_vrreg_t *v_regs;
+ long vmx_reserve[34 + 34 + 1 + 32];
+
+};
+# 31 "/usr/include/bits/sigcontext.h" 2 3 4
+
+
+
+# 1 "/usr/lib/gcc/ppc64le-redhat-linux/8/include/stddef.h" 1 3 4
+# 35 "/usr/include/bits/sigcontext.h" 2 3 4
+# 292 "/usr/include/signal.h" 2 3 4
+
+
+extern int sigreturn (struct sigcontext *__scp) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+
+
+
+# 1 "/usr/lib/gcc/ppc64le-redhat-linux/8/include/stddef.h" 1 3 4
+# 302 "/usr/include/signal.h" 2 3 4
+
+# 1 "/usr/include/bits/types/stack_t.h" 1 3 4
+# 23 "/usr/include/bits/types/stack_t.h" 3 4
+# 1 "/usr/lib/gcc/ppc64le-redhat-linux/8/include/stddef.h" 1 3 4
+# 24 "/usr/include/bits/types/stack_t.h" 2 3 4
+
+
+typedef struct
+  {
+    void *ss_sp;
+    int ss_flags;
+    size_t ss_size;
+  } stack_t;
+# 304 "/usr/include/signal.h" 2 3 4
+
+
+# 1 "/usr/include/sys/ucontext.h" 1 3 4
+# 33 "/usr/include/sys/ucontext.h" 3 4
+struct pt_regs;
+# 93 "/usr/include/sys/ucontext.h" 3 4
+typedef unsigned long gregset_t[48];
+typedef double fpregset_t[33];
+
+
+
+
+typedef struct _libc_vscr
+{
+ unsigned int __pad[3];
+ unsigned int vscr_word;
+} vscr_t;
+
+
+
+typedef struct _libc_vrstate
+{
+ unsigned int vrregs[32][4];
+ vscr_t vscr;
+ unsigned int vrsave;
+ unsigned int __pad[3];
+} vrregset_t __attribute__((__aligned__(16)));
+
+typedef struct {
+ unsigned long __glibc_reserved[4];
+ int signal;
+ int __pad0;
+ unsigned long handler;
+ unsigned long oldmask;
+ struct pt_regs *regs;
+ gregset_t gp_regs;
+ fpregset_t fp_regs;
+# 143 "/usr/include/sys/ucontext.h" 3 4
+ vrregset_t *v_regs;
+ long vmx_reserve[34 +34 +1];
+} mcontext_t;
+
+
+
+
+typedef struct ucontext_t
+  {
+    unsigned long int uc_flags;
+    struct ucontext_t *uc_link;
+    stack_t uc_stack;
+# 188 "/usr/include/sys/ucontext.h" 3 4
+    sigset_t uc_sigmask;
+    mcontext_t uc_mcontext;
+
+  } ucontext_t;
+# 307 "/usr/include/signal.h" 2 3 4
+
+
+
+
+
+
+
+extern int siginterrupt (int __sig, int __interrupt) __attribute__ ((__nothrow__ , __leaf__));
+
+# 1 "/usr/include/bits/sigstack.h" 1 3 4
+# 317 "/usr/include/signal.h" 2 3 4
+# 1 "/usr/include/bits/ss_flags.h" 1 3 4
+# 27 "/usr/include/bits/ss_flags.h" 3 4
+enum
+{
+  SS_ONSTACK = 1,
+
+  SS_DISABLE
+
+};
+# 318 "/usr/include/signal.h" 2 3 4
+
+
+
+extern int sigaltstack (const stack_t *__restrict __ss,
+   stack_t *__restrict __oss) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+
+# 1 "/usr/include/bits/types/struct_sigstack.h" 1 3 4
+# 23 "/usr/include/bits/types/struct_sigstack.h" 3 4
+struct sigstack
+  {
+    void *ss_sp;
+    int ss_onstack;
+  };
+# 328 "/usr/include/signal.h" 2 3 4
+
+
+
+
+
+
+
+extern int sigstack (struct sigstack *__ss, struct sigstack *__oss)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__deprecated__));
+
+
+
+
+
+
+extern int sighold (int __sig) __attribute__ ((__nothrow__ , __leaf__));
+
+
+extern int sigrelse (int __sig) __attribute__ ((__nothrow__ , __leaf__));
+
+
+extern int sigignore (int __sig) __attribute__ ((__nothrow__ , __leaf__));
+
+
+extern __sighandler_t sigset (int __sig, __sighandler_t __disp) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+
+
+
+# 1 "/usr/include/bits/sigthread.h" 1 3 4
+# 31 "/usr/include/bits/sigthread.h" 3 4
+extern int pthread_sigmask (int __how,
+       const __sigset_t *__restrict __newmask,
+       __sigset_t *__restrict __oldmask)__attribute__ ((__nothrow__ , __leaf__));
+
+
+extern int pthread_kill (pthread_t __threadid, int __signo) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+extern int pthread_sigqueue (pthread_t __threadid, int __signo,
+        const union sigval __value) __attribute__ ((__nothrow__ , __leaf__));
+# 360 "/usr/include/signal.h" 2 3 4
+
+
+
+
+
+
+extern int __libc_current_sigrtmin (void) __attribute__ ((__nothrow__ , __leaf__));
+
+extern int __libc_current_sigrtmax (void) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+
+
+# 29 "/usr/include/sys/param.h" 2 3 4
+
+
+# 1 "/usr/include/bits/param.h" 1 3 4
+# 28 "/usr/include/bits/param.h" 3 4
+# 1 "/usr/include/linux/param.h" 1 3 4
+
+
+
+
+# 1 "/usr/include/asm/param.h" 1 3 4
+# 1 "/usr/include/asm-generic/param.h" 1 3 4
+# 1 "/usr/include/asm/param.h" 2 3 4
+# 6 "/usr/include/linux/param.h" 2 3 4
+# 29 "/usr/include/bits/param.h" 2 3 4
+# 32 "/usr/include/sys/param.h" 2 3 4
+# 63 "sanei_scsi.c" 2
+# 95 "sanei_scsi.c"
+# 1 "/usr/include/scsi/sg.h" 1 3 4
+# 30 "/usr/include/scsi/sg.h" 3 4
+# 1 "/usr/lib/gcc/ppc64le-redhat-linux/8/include/stddef.h" 1 3 4
+# 31 "/usr/include/scsi/sg.h" 2 3 4
+
+
+
+
+
+
+typedef struct sg_iovec
+{
+  void * iov_base;
+  size_t iov_len;
+} sg_iovec_t;
+
+
+typedef struct sg_io_hdr
+{
+  int interface_id;
+  int dxfer_direction;
+  unsigned char cmd_len;
+  unsigned char mx_sb_len;
+  unsigned short int iovec_count;
+  unsigned int dxfer_len;
+  void * dxferp;
+
+  unsigned char * cmdp;
+  unsigned char * sbp;
+  unsigned int timeout;
+  unsigned int flags;
+  int pack_id;
+  void * usr_ptr;
+  unsigned char status;
+  unsigned char masked_status;
+  unsigned char msg_status;
+  unsigned char sb_len_wr;
+  unsigned short int host_status;
+  unsigned short int driver_status;
+  int resid;
+  unsigned int duration;
+  unsigned int info;
+} sg_io_hdr_t;
+# 102 "/usr/include/scsi/sg.h" 3 4
+struct sg_scsi_id {
+
+  int host_no;
+  int channel;
+
+  int scsi_id;
+  int lun;
+
+  int scsi_type;
+
+  short int h_cmd_per_lun;
+
+  short int d_queue_depth;
+
+  int unused[2];
+};
+
+
+typedef struct sg_req_info {
+    char req_state;
+    char orphan;
+    char sg_io_owned;
+    char problem;
+    int pack_id;
+    void * usr_ptr;
+    unsigned int duration;
+
+    int unused;
+} sg_req_info_t;
+# 210 "/usr/include/scsi/sg.h" 3 4
+typedef struct sg_io_hdr Sg_io_hdr;
+typedef struct sg_io_vec Sg_io_vec;
+typedef struct sg_scsi_id Sg_scsi_id;
+typedef struct sg_req_info Sg_req_info;
+# 222 "/usr/include/scsi/sg.h" 3 4
+struct sg_header
+ {
+
+   int pack_len;
+
+   int reply_len;
+
+   int pack_id;
+
+   int result;
+
+   unsigned int twelve_byte:1;
+
+   unsigned int target_status:5;
+
+   unsigned int host_status:8;
+
+   unsigned int driver_status:8;
+
+   unsigned int other_flags:10;
+
+
+
+
+   unsigned char sense_buffer[16];
+ };
+# 96 "sanei_scsi.c" 2
+# 232 "sanei_scsi.c"
+# 1 "/usr/include/dirent.h" 1 3 4
+# 27 "/usr/include/dirent.h" 3 4
+
+# 61 "/usr/include/dirent.h" 3 4
+# 1 "/usr/include/bits/dirent.h" 1 3 4
+# 22 "/usr/include/bits/dirent.h" 3 4
+struct dirent
+  {
+
+    __ino_t d_ino;
+    __off_t d_off;
+
+
+
+
+    unsigned short int d_reclen;
+    unsigned char d_type;
+    char d_name[256];
+  };
+
+
+struct dirent64
+  {
+    __ino64_t d_ino;
+    __off64_t d_off;
+    unsigned short int d_reclen;
+    unsigned char d_type;
+    char d_name[256];
+  };
+# 62 "/usr/include/dirent.h" 2 3 4
+# 97 "/usr/include/dirent.h" 3 4
+enum
+  {
+    DT_UNKNOWN = 0,
+
+    DT_FIFO = 1,
+
+    DT_CHR = 2,
+
+    DT_DIR = 4,
+
+    DT_BLK = 6,
+
+    DT_REG = 8,
+
+    DT_LNK = 10,
+
+    DT_SOCK = 12,
+
+    DT_WHT = 14
+
+  };
+# 127 "/usr/include/dirent.h" 3 4
+typedef struct __dirstream DIR;
+
+
+
+
+
+
+extern DIR *opendir (const char *__name) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+
+extern DIR *fdopendir (int __fd);
+
+
+
+
+
+
+
+extern int closedir (DIR *__dirp) __attribute__ ((__nonnull__ (1)));
+# 162 "/usr/include/dirent.h" 3 4
+extern struct dirent *readdir (DIR *__dirp) __attribute__ ((__nonnull__ (1)));
+# 173 "/usr/include/dirent.h" 3 4
+extern struct dirent64 *readdir64 (DIR *__dirp) __attribute__ ((__nonnull__ (1)));
+# 183 "/usr/include/dirent.h" 3 4
+extern int readdir_r (DIR *__restrict __dirp,
+        struct dirent *__restrict __entry,
+        struct dirent **__restrict __result)
+     __attribute__ ((__nonnull__ (1, 2, 3))) __attribute__ ((__deprecated__));
+# 201 "/usr/include/dirent.h" 3 4
+extern int readdir64_r (DIR *__restrict __dirp,
+   struct dirent64 *__restrict __entry,
+   struct dirent64 **__restrict __result)
+  __attribute__ ((__nonnull__ (1, 2, 3))) __attribute__ ((__deprecated__));
+
+
+
+
+extern void rewinddir (DIR *__dirp) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+extern void seekdir (DIR *__dirp, long int __pos) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern long int telldir (DIR *__dirp) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+
+extern int dirfd (DIR *__dirp) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+# 245 "/usr/include/dirent.h" 3 4
+# 1 "/usr/lib/gcc/ppc64le-redhat-linux/8/include/stddef.h" 1 3 4
+# 246 "/usr/include/dirent.h" 2 3 4
+# 255 "/usr/include/dirent.h" 3 4
+extern int scandir (const char *__restrict __dir,
+      struct dirent ***__restrict __namelist,
+      int (*__selector) (const struct dirent *),
+      int (*__cmp) (const struct dirent **,
+      const struct dirent **))
+     __attribute__ ((__nonnull__ (1, 2)));
+# 278 "/usr/include/dirent.h" 3 4
+extern int scandir64 (const char *__restrict __dir,
+        struct dirent64 ***__restrict __namelist,
+        int (*__selector) (const struct dirent64 *),
+        int (*__cmp) (const struct dirent64 **,
+        const struct dirent64 **))
+     __attribute__ ((__nonnull__ (1, 2)));
+# 293 "/usr/include/dirent.h" 3 4
+extern int scandirat (int __dfd, const char *__restrict __dir,
+        struct dirent ***__restrict __namelist,
+        int (*__selector) (const struct dirent *),
+        int (*__cmp) (const struct dirent **,
+        const struct dirent **))
+     __attribute__ ((__nonnull__ (2, 3)));
+# 315 "/usr/include/dirent.h" 3 4
+extern int scandirat64 (int __dfd, const char *__restrict __dir,
+   struct dirent64 ***__restrict __namelist,
+   int (*__selector) (const struct dirent64 *),
+   int (*__cmp) (const struct dirent64 **,
+          const struct dirent64 **))
+     __attribute__ ((__nonnull__ (2, 3)));
+
+
+
+
+extern int alphasort (const struct dirent **__e1,
+        const struct dirent **__e2)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+# 340 "/usr/include/dirent.h" 3 4
+extern int alphasort64 (const struct dirent64 **__e1,
+   const struct dirent64 **__e2)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+# 353 "/usr/include/dirent.h" 3 4
+extern __ssize_t getdirentries (int __fd, char *__restrict __buf,
+    size_t __nbytes,
+    __off_t *__restrict __basep)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4)));
+# 370 "/usr/include/dirent.h" 3 4
+extern __ssize_t getdirentries64 (int __fd, char *__restrict __buf,
+      size_t __nbytes,
+      __off64_t *__restrict __basep)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (2, 4)));
+
+
+
+
+
+
+extern int versionsort (const struct dirent **__e1,
+   const struct dirent **__e2)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+# 396 "/usr/include/dirent.h" 3 4
+extern int versionsort64 (const struct dirent64 **__e1,
+     const struct dirent64 **__e2)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
+
+
+
+
+# 233 "sanei_scsi.c" 2
+
+
+# 1 "../include/sane/sanei.h" 1
+# 90 "../include/sane/sanei.h"
+# 1 "../include/sane/sane.h" 1
+# 42 "../include/sane/sane.h"
+
+# 42 "../include/sane/sane.h"
+typedef unsigned char SANE_Byte;
+typedef int SANE_Word;
+typedef SANE_Word SANE_Bool;
+typedef SANE_Word SANE_Int;
+typedef char SANE_Char;
+typedef SANE_Char *SANE_String;
+typedef const SANE_Char *SANE_String_Const;
+typedef void *SANE_Handle;
+typedef SANE_Word SANE_Fixed;
+
+
+
+
+
+typedef enum
+  {
+    SANE_STATUS_GOOD = 0,
+    SANE_STATUS_UNSUPPORTED,
+    SANE_STATUS_CANCELLED,
+    SANE_STATUS_DEVICE_BUSY,
+    SANE_STATUS_INVAL,
+    SANE_STATUS_EOF,
+    SANE_STATUS_JAMMED,
+    SANE_STATUS_NO_DOCS,
+    SANE_STATUS_COVER_OPEN,
+    SANE_STATUS_IO_ERROR,
+    SANE_STATUS_NO_MEM,
+    SANE_STATUS_ACCESS_DENIED
+  }
+SANE_Status;
+
+
+
+
+
+
+
+typedef enum
+  {
+    SANE_TYPE_BOOL = 0,
+    SANE_TYPE_INT,
+    SANE_TYPE_FIXED,
+    SANE_TYPE_STRING,
+    SANE_TYPE_BUTTON,
+    SANE_TYPE_GROUP
+  }
+SANE_Value_Type;
+
+typedef enum
+  {
+    SANE_UNIT_NONE = 0,
+    SANE_UNIT_PIXEL,
+    SANE_UNIT_BIT,
+    SANE_UNIT_MM,
+    SANE_UNIT_DPI,
+    SANE_UNIT_PERCENT,
+    SANE_UNIT_MICROSECOND
+  }
+SANE_Unit;
+
+typedef struct
+  {
+    SANE_String_Const name;
+    SANE_String_Const vendor;
+    SANE_String_Const model;
+    SANE_String_Const type;
+  }
+SANE_Device;
+# 126 "../include/sane/sane.h"
+typedef enum
+  {
+    SANE_CONSTRAINT_NONE = 0,
+    SANE_CONSTRAINT_RANGE,
+    SANE_CONSTRAINT_WORD_LIST,
+    SANE_CONSTRAINT_STRING_LIST
+  }
+SANE_Constraint_Type;
+
+typedef struct
+  {
+    SANE_Word min;
+    SANE_Word max;
+    SANE_Word quant;
+  }
+SANE_Range;
+
+typedef struct
+  {
+    SANE_String_Const name;
+    SANE_String_Const title;
+    SANE_String_Const desc;
+    SANE_Value_Type type;
+    SANE_Unit unit;
+    SANE_Int size;
+    SANE_Int cap;
+
+    SANE_Constraint_Type constraint_type;
+    union
+      {
+ const SANE_String_Const *string_list;
+ const SANE_Word *word_list;
+ const SANE_Range *range;
+      }
+    constraint;
+  }
+SANE_Option_Descriptor;
+
+typedef enum
+  {
+    SANE_ACTION_GET_VALUE = 0,
+    SANE_ACTION_SET_VALUE,
+    SANE_ACTION_SET_AUTO
+  }
+SANE_Action;
+
+typedef enum
+  {
+    SANE_FRAME_GRAY,
+    SANE_FRAME_RGB,
+    SANE_FRAME_RED,
+    SANE_FRAME_GREEN,
+    SANE_FRAME_BLUE
+  }
+SANE_Frame;
+# 198 "../include/sane/sane.h"
+typedef struct
+  {
+    SANE_Frame format;
+    SANE_Bool last_frame;
+    SANE_Int bytes_per_line;
+    SANE_Int pixels_per_line;
+    SANE_Int lines;
+    SANE_Int depth;
+  }
+SANE_Parameters;
+
+struct SANE_Auth_Data;
+
+
+
+
+typedef void (*SANE_Auth_Callback) (SANE_String_Const resource,
+        SANE_Char *username,
+        SANE_Char *password);
+
+extern SANE_Status sane_init (SANE_Int * version_code,
+         SANE_Auth_Callback authorize);
+extern void sane_exit (void);
+extern SANE_Status sane_get_devices (const SANE_Device *** device_list,
+         SANE_Bool local_only);
+extern SANE_Status sane_open (SANE_String_Const devicename,
+         SANE_Handle * handle);
+extern void sane_close (SANE_Handle handle);
+extern const SANE_Option_Descriptor *
+  sane_get_option_descriptor (SANE_Handle handle, SANE_Int option);
+extern SANE_Status sane_control_option (SANE_Handle handle, SANE_Int option,
+     SANE_Action action, void *value,
+     SANE_Int * info);
+extern SANE_Status sane_get_parameters (SANE_Handle handle,
+     SANE_Parameters * params);
+extern SANE_Status sane_start (SANE_Handle handle);
+extern SANE_Status sane_read (SANE_Handle handle, SANE_Byte * data,
+         SANE_Int max_length, SANE_Int * length);
+extern void sane_cancel (SANE_Handle handle);
+extern SANE_Status sane_set_io_mode (SANE_Handle handle,
+         SANE_Bool non_blocking);
+extern SANE_Status sane_get_select_fd (SANE_Handle handle,
+           SANE_Int * fd);
+extern SANE_String_Const sane_strstatus (SANE_Status status);
+# 91 "../include/sane/sanei.h" 2
+# 164 "../include/sane/sanei.h"
+extern SANE_Status sanei_check_value (const SANE_Option_Descriptor * opt,
+          void * value);
+
+extern SANE_Status sanei_constrain_value (const SANE_Option_Descriptor * opt,
+       void * value, SANE_Word * info);
+# 236 "sanei_scsi.c" 2
+# 1 "../include/sane/sanei_config.h" 1
+# 52 "../include/sane/sanei_config.h"
+# 1 "/usr/include/stdio.h" 1 3 4
+# 27 "/usr/include/stdio.h" 3 4
+# 1 "/usr/include/bits/libc-header-start.h" 1 3 4
+# 28 "/usr/include/stdio.h" 2 3 4
+
+
+
+
+
+# 1 "/usr/lib/gcc/ppc64le-redhat-linux/8/include/stddef.h" 1 3 4
+# 34 "/usr/include/stdio.h" 2 3 4
+
+
+# 1 "/usr/include/bits/types/__FILE.h" 1 3 4
+
+
+
+
+# 4 "/usr/include/bits/types/__FILE.h" 3 4
+struct _IO_FILE;
+typedef struct _IO_FILE __FILE;
+# 37 "/usr/include/stdio.h" 2 3 4
+# 1 "/usr/include/bits/types/FILE.h" 1 3 4
+
+
+
+struct _IO_FILE;
+
+
+typedef struct _IO_FILE FILE;
+# 38 "/usr/include/stdio.h" 2 3 4
+
+
+
+# 1 "/usr/include/bits/libio.h" 1 3 4
+# 35 "/usr/include/bits/libio.h" 3 4
+# 1 "/usr/include/bits/_G_config.h" 1 3 4
+# 19 "/usr/include/bits/_G_config.h" 3 4
+# 1 "/usr/lib/gcc/ppc64le-redhat-linux/8/include/stddef.h" 1 3 4
+# 20 "/usr/include/bits/_G_config.h" 2 3 4
+
+# 1 "/usr/include/bits/types/__mbstate_t.h" 1 3 4
+# 13 "/usr/include/bits/types/__mbstate_t.h" 3 4
+typedef struct
+{
+  int __count;
+  union
+  {
+    unsigned int __wch;
+    char __wchb[4];
+  } __value;
+} __mbstate_t;
+# 22 "/usr/include/bits/_G_config.h" 2 3 4
+
+
+
+
+typedef struct
+{
+  __off_t __pos;
+  __mbstate_t __state;
+} _G_fpos_t;
+typedef struct
+{
+  __off64_t __pos;
+  __mbstate_t __state;
+} _G_fpos64_t;
+# 36 "/usr/include/bits/libio.h" 2 3 4
+# 53 "/usr/include/bits/libio.h" 3 4
+# 1 "/usr/lib/gcc/ppc64le-redhat-linux/8/include/stdarg.h" 1 3 4
+# 40 "/usr/lib/gcc/ppc64le-redhat-linux/8/include/stdarg.h" 3 4
+typedef __builtin_va_list __gnuc_va_list;
+# 54 "/usr/include/bits/libio.h" 2 3 4
+# 149 "/usr/include/bits/libio.h" 3 4
+struct _IO_jump_t; struct _IO_FILE;
+
+
+
+
+typedef void _IO_lock_t;
+
+
+
+
+
+struct _IO_marker {
+  struct _IO_marker *_next;
+  struct _IO_FILE *_sbuf;
+
+
+
+  int _pos;
+# 177 "/usr/include/bits/libio.h" 3 4
+};
+
+
+enum __codecvt_result
+{
+  __codecvt_ok,
+  __codecvt_partial,
+  __codecvt_error,
+  __codecvt_noconv
+};
+# 245 "/usr/include/bits/libio.h" 3 4
+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;
+# 293 "/usr/include/bits/libio.h" 3 4
+  __off64_t _offset;
+
+
+
+
+
+
+
+  void *__pad1;
+  void *__pad2;
+  void *__pad3;
+  void *__pad4;
+
+  size_t __pad5;
+  int _mode;
+
+  char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];
+
+};
+
+
+typedef struct _IO_FILE _IO_FILE;
+
+
+struct _IO_FILE_plus;
+
+extern struct _IO_FILE_plus _IO_2_1_stdin_;
+extern struct _IO_FILE_plus _IO_2_1_stdout_;
+extern struct _IO_FILE_plus _IO_2_1_stderr_;
+# 337 "/usr/include/bits/libio.h" 3 4
+typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);
+
+
+
+
+
+
+
+typedef __ssize_t __io_write_fn (void *__cookie, const char *__buf,
+     size_t __n);
+
+
+
+
+
+
+
+typedef int __io_seek_fn (void *__cookie, __off64_t *__pos, int __w);
+
+
+typedef int __io_close_fn (void *__cookie);
+
+
+
+
+typedef __io_read_fn cookie_read_function_t;
+typedef __io_write_fn cookie_write_function_t;
+typedef __io_seek_fn cookie_seek_function_t;
+typedef __io_close_fn cookie_close_function_t;
+
+
+typedef struct
+{
+  __io_read_fn *read;
+  __io_write_fn *write;
+  __io_seek_fn *seek;
+  __io_close_fn *close;
+} _IO_cookie_io_functions_t;
+typedef _IO_cookie_io_functions_t cookie_io_functions_t;
+
+struct _IO_cookie_file;
+
+
+extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write,
+        void *__cookie, _IO_cookie_io_functions_t __fns);
+
+
+
+
+
+
+
+extern int __underflow (_IO_FILE *);
+extern int __uflow (_IO_FILE *);
+extern int __overflow (_IO_FILE *, int);
+# 433 "/usr/include/bits/libio.h" 3 4
+extern int _IO_getc (_IO_FILE *__fp);
+extern int _IO_putc (int __c, _IO_FILE *__fp);
+extern int _IO_feof (_IO_FILE *__fp) __attribute__ ((__nothrow__ , __leaf__));
+extern int _IO_ferror (_IO_FILE *__fp) __attribute__ ((__nothrow__ , __leaf__));
+
+extern int _IO_peekc_locked (_IO_FILE *__fp);
+
+
+
+
+
+extern void _IO_flockfile (_IO_FILE *) __attribute__ ((__nothrow__ , __leaf__));
+extern void _IO_funlockfile (_IO_FILE *) __attribute__ ((__nothrow__ , __leaf__));
+extern int _IO_ftrylockfile (_IO_FILE *) __attribute__ ((__nothrow__ , __leaf__));
+# 462 "/usr/include/bits/libio.h" 3 4
+extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict,
+   __gnuc_va_list, int *__restrict);
+extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict,
+    __gnuc_va_list);
+extern __ssize_t _IO_padn (_IO_FILE *, int, __ssize_t);
+extern size_t _IO_sgetn (_IO_FILE *, void *, size_t);
+
+extern __off64_t _IO_seekoff (_IO_FILE *, __off64_t, int, int);
+extern __off64_t _IO_seekpos (_IO_FILE *, __off64_t, int);
+
+extern void _IO_free_backup_area (_IO_FILE *) __attribute__ ((__nothrow__ , __leaf__));
+# 42 "/usr/include/stdio.h" 2 3 4
+
+
+
+
+typedef __gnuc_va_list va_list;
+# 78 "/usr/include/stdio.h" 3 4
+typedef _G_fpos_t fpos_t;
+
+
+
+
+typedef _G_fpos64_t fpos64_t;
+# 131 "/usr/include/stdio.h" 3 4
+# 1 "/usr/include/bits/stdio_lim.h" 1 3 4
+# 132 "/usr/include/stdio.h" 2 3 4
+
+
+
+extern struct _IO_FILE *stdin;
+extern struct _IO_FILE *stdout;
+extern struct _IO_FILE *stderr;
+
+
+
+
+
+
+extern int remove (const char *__filename) __attribute__ ((__nothrow__ , __leaf__));
+
+extern int rename (const char *__old, const char *__new) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+extern int renameat (int __oldfd, const char *__old, int __newfd,
+       const char *__new) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+
+
+
+
+extern FILE *tmpfile (void) __attribute__ ((__warn_unused_result__));
+# 169 "/usr/include/stdio.h" 3 4
+extern FILE *tmpfile64 (void) __attribute__ ((__warn_unused_result__));
+
+
+
+extern char *tmpnam (char *__s) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
+# 190 "/usr/include/stdio.h" 3 4
+extern char *tempnam (const char *__dir, const char *__pfx)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+
+
+extern int fclose (FILE *__stream);
+
+
+
+
+extern int fflush (FILE *__stream);
+# 213 "/usr/include/stdio.h" 3 4
+extern int fflush_unlocked (FILE *__stream);
+# 223 "/usr/include/stdio.h" 3 4
+extern int fcloseall (void);
+# 232 "/usr/include/stdio.h" 3 4
+extern FILE *fopen (const char *__restrict __filename,
+      const char *__restrict __modes) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern FILE *freopen (const char *__restrict __filename,
+        const char *__restrict __modes,
+        FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
+# 256 "/usr/include/stdio.h" 3 4
+extern FILE *fopen64 (const char *__restrict __filename,
+        const char *__restrict __modes) __attribute__ ((__warn_unused_result__));
+extern FILE *freopen64 (const char *__restrict __filename,
+   const char *__restrict __modes,
+   FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern FILE *fdopen (int __fd, const char *__modes) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+extern FILE *fopencookie (void *__restrict __magic_cookie,
+     const char *__restrict __modes,
+     _IO_cookie_io_functions_t __io_funcs) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern FILE *fmemopen (void *__s, size_t __len, const char *__modes)
+  __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
+      int __modes, size_t __n) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+
+extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
+         size_t __size) __attribute__ ((__nothrow__ , __leaf__));
+
+
+extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+
+
+
+
+extern int fprintf (FILE *__restrict __stream,
+      const char *__restrict __format, ...);
+
+
+
+
+extern int printf (const char *__restrict __format, ...);
+
+extern int sprintf (char *__restrict __s,
+      const char *__restrict __format, ...) __attribute__ ((__nothrow__));
+
+
+
+
+
+extern int vfprintf (FILE *__restrict __s, const char *__restrict __format,
+       __gnuc_va_list __arg);
+
+
+
+
+extern int vprintf (const char *__restrict __format, __gnuc_va_list __arg);
+
+extern int vsprintf (char *__restrict __s, const char *__restrict __format,
+       __gnuc_va_list __arg) __attribute__ ((__nothrow__));
+
+
+
+extern int snprintf (char *__restrict __s, size_t __maxlen,
+       const char *__restrict __format, ...)
+     __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4)));
+
+extern int vsnprintf (char *__restrict __s, size_t __maxlen,
+        const char *__restrict __format, __gnuc_va_list __arg)
+     __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0)));
+
+
+
+
+
+extern int vasprintf (char **__restrict __ptr, const char *__restrict __f,
+        __gnuc_va_list __arg)
+     __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0))) __attribute__ ((__warn_unused_result__));
+extern int __asprintf (char **__restrict __ptr,
+         const char *__restrict __fmt, ...)
+     __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__));
+extern int asprintf (char **__restrict __ptr,
+       const char *__restrict __fmt, ...)
+     __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern int vdprintf (int __fd, const char *__restrict __fmt,
+       __gnuc_va_list __arg)
+     __attribute__ ((__format__ (__printf__, 2, 0)));
+extern int dprintf (int __fd, const char *__restrict __fmt, ...)
+     __attribute__ ((__format__ (__printf__, 2, 3)));
+
+
+
+
+
+
+
+extern int fscanf (FILE *__restrict __stream,
+     const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern int scanf (const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__));
+
+extern int sscanf (const char *__restrict __s,
+     const char *__restrict __format, ...) __attribute__ ((__nothrow__ , __leaf__));
+# 420 "/usr/include/stdio.h" 3 4
+extern int vfscanf (FILE *__restrict __s, const char *__restrict __format,
+      __gnuc_va_list __arg)
+     __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg)
+     __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__));
+
+
+extern int vsscanf (const char *__restrict __s,
+      const char *__restrict __format, __gnuc_va_list __arg)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__scanf__, 2, 0)));
+# 477 "/usr/include/stdio.h" 3 4
+extern int fgetc (FILE *__stream);
+extern int getc (FILE *__stream);
+
+
+
+
+
+extern int getchar (void);
+# 495 "/usr/include/stdio.h" 3 4
+extern int getc_unlocked (FILE *__stream);
+extern int getchar_unlocked (void);
+# 506 "/usr/include/stdio.h" 3 4
+extern int fgetc_unlocked (FILE *__stream);
+# 517 "/usr/include/stdio.h" 3 4
+extern int fputc (int __c, FILE *__stream);
+extern int putc (int __c, FILE *__stream);
+
+
+
+
+
+extern int putchar (int __c);
+# 537 "/usr/include/stdio.h" 3 4
+extern int fputc_unlocked (int __c, FILE *__stream);
+
+
+
+
+
+
+
+extern int putc_unlocked (int __c, FILE *__stream);
+extern int putchar_unlocked (int __c);
+
+
+
+
+
+
+extern int getw (FILE *__stream);
+
+
+extern int putw (int __w, FILE *__stream);
+
+
+
+
+
+
+
+extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
+     __attribute__ ((__warn_unused_result__));
+# 587 "/usr/include/stdio.h" 3 4
+extern char *fgets_unlocked (char *__restrict __s, int __n,
+        FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
+# 603 "/usr/include/stdio.h" 3 4
+extern __ssize_t __getdelim (char **__restrict __lineptr,
+          size_t *__restrict __n, int __delimiter,
+          FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
+extern __ssize_t getdelim (char **__restrict __lineptr,
+        size_t *__restrict __n, int __delimiter,
+        FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+
+
+extern __ssize_t getline (char **__restrict __lineptr,
+       size_t *__restrict __n,
+       FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+
+
+extern int fputs (const char *__restrict __s, FILE *__restrict __stream);
+
+
+
+
+
+extern int puts (const char *__s);
+
+
+
+
+
+
+extern int ungetc (int __c, FILE *__stream);
+
+
+
+
+
+
+extern size_t fread (void *__restrict __ptr, size_t __size,
+       size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern size_t fwrite (const void *__restrict __ptr, size_t __size,
+        size_t __n, FILE *__restrict __s);
+# 662 "/usr/include/stdio.h" 3 4
+extern int fputs_unlocked (const char *__restrict __s,
+      FILE *__restrict __stream);
+# 673 "/usr/include/stdio.h" 3 4
+extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
+         size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
+extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size,
+          size_t __n, FILE *__restrict __stream);
+
+
+
+
+
+
+
+extern int fseek (FILE *__stream, long int __off, int __whence);
+
+
+
+
+extern long int ftell (FILE *__stream) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern void rewind (FILE *__stream);
+# 707 "/usr/include/stdio.h" 3 4
+extern int fseeko (FILE *__stream, __off_t __off, int __whence);
+
+
+
+
+extern __off_t ftello (FILE *__stream) __attribute__ ((__warn_unused_result__));
+# 731 "/usr/include/stdio.h" 3 4
+extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);
+
+
+
+
+extern int fsetpos (FILE *__stream, const fpos_t *__pos);
+# 750 "/usr/include/stdio.h" 3 4
+extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence);
+extern __off64_t ftello64 (FILE *__stream) __attribute__ ((__warn_unused_result__));
+extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos);
+extern int fsetpos64 (FILE *__stream, const fpos64_t *__pos);
+
+
+
+extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
+
+extern int feof (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
+
+extern int ferror (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
+
+
+
+extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
+extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
+extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+
+
+extern void perror (const char *__s);
+
+
+
+
+
+# 1 "/usr/include/bits/sys_errlist.h" 1 3 4
+# 26 "/usr/include/bits/sys_errlist.h" 3 4
+extern int sys_nerr;
+extern const char *const sys_errlist[];
+
+
+extern int _sys_nerr;
+extern const char *const _sys_errlist[];
+# 782 "/usr/include/stdio.h" 2 3 4
+
+
+
+
+extern int fileno (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
+
+
+
+
+extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
+# 800 "/usr/include/stdio.h" 3 4
+extern FILE *popen (const char *__command, const char *__modes) __attribute__ ((__warn_unused_result__));
+
+
+
+
+
+extern int pclose (FILE *__stream);
+
+
+
+
+
+extern char *ctermid (char *__s) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+
+
+extern char *cuserid (char *__s);
+
+
+
+
+struct obstack;
+
+
+extern int obstack_printf (struct obstack *__restrict __obstack,
+      const char *__restrict __format, ...)
+     __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3)));
+extern int obstack_vprintf (struct obstack *__restrict __obstack,
+       const char *__restrict __format,
+       __gnuc_va_list __args)
+     __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0)));
+
+
+
+
+
+
+
+extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__warn_unused_result__));
+
+
+extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__ , __leaf__));
+# 859 "/usr/include/stdio.h" 3 4
+# 1 "/usr/include/bits/stdio.h" 1 3 4
+# 43 "/usr/include/bits/stdio.h" 3 4
+extern __inline __attribute__ ((__gnu_inline__)) int
+getchar (void)
+{
+  return _IO_getc (stdin);
+}
+
+
+
+
+extern __inline __attribute__ ((__gnu_inline__)) int
+fgetc_unlocked (FILE *__fp)
+{
+  return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++);
+}
+
+
+
+
+
+extern __inline __attribute__ ((__gnu_inline__)) int
+getc_unlocked (FILE *__fp)
+{
+  return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++);
+}
+
+
+extern __inline __attribute__ ((__gnu_inline__)) int
+getchar_unlocked (void)
+{
+  return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++);
+}
+
+
+
+
+extern __inline __attribute__ ((__gnu_inline__)) int
+putchar (int __c)
+{
+  return _IO_putc (__c, stdout);
+}
+
+
+
+
+extern __inline __attribute__ ((__gnu_inline__)) int
+fputc_unlocked (int __c, FILE *__stream)
+{
+  return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
+}
+
+
+
+
+
+extern __inline __attribute__ ((__gnu_inline__)) int
+putc_unlocked (int __c, FILE *__stream)
+{
+  return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
+}
+
+
+extern __inline __attribute__ ((__gnu_inline__)) int
+putchar_unlocked (int __c)
+{
+  return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c)));
+}
+
+
+
+
+
+extern __inline __attribute__ ((__gnu_inline__)) __ssize_t
+getline (char **__lineptr, size_t *__n, FILE *__stream)
+{
+  return __getdelim (__lineptr, __n, '\n', __stream);
+}
+
+
+
+
+
+extern __inline __attribute__ ((__gnu_inline__)) int
+__attribute__ ((__nothrow__ , __leaf__)) feof_unlocked (FILE *__stream)
+{
+  return (((__stream)->_flags & 0x10) != 0);
+}
+
+
+extern __inline __attribute__ ((__gnu_inline__)) int
+__attribute__ ((__nothrow__ , __leaf__)) ferror_unlocked (FILE *__stream)
+{
+  return (((__stream)->_flags & 0x20) != 0);
+}
+# 860 "/usr/include/stdio.h" 2 3 4
+
+
+# 1 "/usr/include/bits/stdio2.h" 1 3 4
+# 23 "/usr/include/bits/stdio2.h" 3 4
+extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen,
+     const char *__restrict __format, ...) __attribute__ ((__nothrow__ , __leaf__));
+extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen,
+      const char *__restrict __format,
+      __gnuc_va_list __ap) __attribute__ ((__nothrow__ , __leaf__));
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
+__attribute__ ((__nothrow__ , __leaf__)) sprintf (char *__restrict __s, const char *__restrict __fmt, ...)
+{
+  return __builtin___sprintf_chk (__s, 2 - 1,
+      __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ());
+}
+
+
+
+
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
+__attribute__ ((__nothrow__ , __leaf__)) vsprintf (char *__restrict __s, const char *__restrict __fmt, __gnuc_va_list __ap)
+
+{
+  return __builtin___vsprintf_chk (__s, 2 - 1,
+       __builtin_object_size (__s, 2 > 1), __fmt, __ap);
+}
+
+
+
+extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag,
+      size_t __slen, const char *__restrict __format,
+      ...) __attribute__ ((__nothrow__ , __leaf__));
+extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag,
+       size_t __slen, const char *__restrict __format,
+       __gnuc_va_list __ap) __attribute__ ((__nothrow__ , __leaf__));
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
+__attribute__ ((__nothrow__ , __leaf__)) snprintf (char *__restrict __s, size_t __n, const char *__restrict __fmt, ...)
+
+{
+  return __builtin___snprintf_chk (__s, __n, 2 - 1,
+       __builtin_object_size (__s, 2 > 1), __fmt, __builtin_va_arg_pack ());
+}
+
+
+
+
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
+__attribute__ ((__nothrow__ , __leaf__)) vsnprintf (char *__restrict __s, size_t __n, const char *__restrict __fmt, __gnuc_va_list __ap)
+
+{
+  return __builtin___vsnprintf_chk (__s, __n, 2 - 1,
+        __builtin_object_size (__s, 2 > 1), __fmt, __ap);
+}
+
+
+
+
+
+extern int __fprintf_chk (FILE *__restrict __stream, int __flag,
+     const char *__restrict __format, ...);
+extern int __printf_chk (int __flag, const char *__restrict __format, ...);
+extern int __vfprintf_chk (FILE *__restrict __stream, int __flag,
+      const char *__restrict __format, __gnuc_va_list __ap);
+extern int __vprintf_chk (int __flag, const char *__restrict __format,
+     __gnuc_va_list __ap);
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
+fprintf (FILE *__restrict __stream, const char *__restrict __fmt, ...)
+{
+  return __fprintf_chk (__stream, 2 - 1, __fmt,
+   __builtin_va_arg_pack ());
+}
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
+printf (const char *__restrict __fmt, ...)
+{
+  return __printf_chk (2 - 1, __fmt, __builtin_va_arg_pack ());
+}
+
+
+
+
+
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
+vprintf (const char *__restrict __fmt, __gnuc_va_list __ap)
+{
+
+  return __vfprintf_chk (stdout, 2 - 1, __fmt, __ap);
+
+
+
+}
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
+vfprintf (FILE *__restrict __stream,
+   const char *__restrict __fmt, __gnuc_va_list __ap)
+{
+  return __vfprintf_chk (__stream, 2 - 1, __fmt, __ap);
+}
+
+
+extern int __dprintf_chk (int __fd, int __flag, const char *__restrict __fmt,
+     ...) __attribute__ ((__format__ (__printf__, 3, 4)));
+extern int __vdprintf_chk (int __fd, int __flag,
+      const char *__restrict __fmt, __gnuc_va_list __arg)
+     __attribute__ ((__format__ (__printf__, 3, 0)));
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
+dprintf (int __fd, const char *__restrict __fmt, ...)
+{
+  return __dprintf_chk (__fd, 2 - 1, __fmt,
+   __builtin_va_arg_pack ());
+}
+
+
+
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
+vdprintf (int __fd, const char *__restrict __fmt, __gnuc_va_list __ap)
+{
+  return __vdprintf_chk (__fd, 2 - 1, __fmt, __ap);
+}
+
+
+
+
+extern int __asprintf_chk (char **__restrict __ptr, int __flag,
+      const char *__restrict __fmt, ...)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__printf__, 3, 4))) __attribute__ ((__warn_unused_result__));
+extern int __vasprintf_chk (char **__restrict __ptr, int __flag,
+       const char *__restrict __fmt, __gnuc_va_list __arg)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__printf__, 3, 0))) __attribute__ ((__warn_unused_result__));
+extern int __obstack_printf_chk (struct obstack *__restrict __obstack,
+     int __flag, const char *__restrict __format,
+     ...)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__printf__, 3, 4)));
+extern int __obstack_vprintf_chk (struct obstack *__restrict __obstack,
+      int __flag,
+      const char *__restrict __format,
+      __gnuc_va_list __args)
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__format__ (__printf__, 3, 0)));
+
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
+__attribute__ ((__nothrow__ , __leaf__)) asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...)
+{
+  return __asprintf_chk (__ptr, 2 - 1, __fmt,
+    __builtin_va_arg_pack ());
+}
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
+__attribute__ ((__nothrow__ , __leaf__)) __asprintf (char **__restrict __ptr, const char *__restrict __fmt, ...)
+
+{
+  return __asprintf_chk (__ptr, 2 - 1, __fmt,
+    __builtin_va_arg_pack ());
+}
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
+__attribute__ ((__nothrow__ , __leaf__)) obstack_printf (struct obstack *__restrict __obstack, const char *__restrict __fmt, ...)
+
+{
+  return __obstack_printf_chk (__obstack, 2 - 1, __fmt,
+          __builtin_va_arg_pack ());
+}
+# 206 "/usr/include/bits/stdio2.h" 3 4
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
+__attribute__ ((__nothrow__ , __leaf__)) vasprintf (char **__restrict __ptr, const char *__restrict __fmt, __gnuc_va_list __ap)
+
+{
+  return __vasprintf_chk (__ptr, 2 - 1, __fmt, __ap);
+}
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) int
+__attribute__ ((__nothrow__ , __leaf__)) obstack_vprintf (struct obstack *__restrict __obstack, const char *__restrict __fmt, __gnuc_va_list __ap)
+
+{
+  return __obstack_vprintf_chk (__obstack, 2 - 1, __fmt,
+    __ap);
+}
+# 240 "/usr/include/bits/stdio2.h" 3 4
+extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n,
+     FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
+extern char *__fgets_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets")
+
+                                        __attribute__ ((__warn_unused_result__));
+extern char *__fgets_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_chk")
+
+
+     __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets called with bigger size than length " "of destination buffer")))
+                                 ;
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char *
+fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
+{
+  if (__builtin_object_size (__s, 2 > 1) != (size_t) -1)
+    {
+      if (!__builtin_constant_p (__n) || __n <= 0)
+ return __fgets_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream);
+
+      if ((size_t) __n > __builtin_object_size (__s, 2 > 1))
+ return __fgets_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream);
+    }
+  return __fgets_alias (__s, __n, __stream);
+}
+
+extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen,
+      size_t __size, size_t __n,
+      FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
+extern size_t __fread_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread")
+
+
+            __attribute__ ((__warn_unused_result__));
+extern size_t __fread_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_chk")
+
+
+
+
+     __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread called with bigger size * nmemb than length " "of destination buffer")))
+                                 ;
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) size_t
+fread (void *__restrict __ptr, size_t __size, size_t __n,
+       FILE *__restrict __stream)
+{
+  if (__builtin_object_size (__ptr, 0) != (size_t) -1)
+    {
+      if (!__builtin_constant_p (__size)
+   || !__builtin_constant_p (__n)
+   || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2)))
+ return __fread_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream);
+
+      if (__size * __n > __builtin_object_size (__ptr, 0))
+ return __fread_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream);
+    }
+  return __fread_alias (__ptr, __size, __n, __stream);
+}
+
+
+extern char *__fgets_unlocked_chk (char *__restrict __s, size_t __size,
+       int __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
+extern char *__fgets_unlocked_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets_unlocked")
+
+                                                 __attribute__ ((__warn_unused_result__));
+extern char *__fgets_unlocked_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_unlocked_chk")
+
+
+     __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fgets_unlocked called with bigger size than length " "of destination buffer")))
+                                 ;
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) char *
+fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream)
+{
+  if (__builtin_object_size (__s, 2 > 1) != (size_t) -1)
+    {
+      if (!__builtin_constant_p (__n) || __n <= 0)
+ return __fgets_unlocked_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream);
+
+      if ((size_t) __n > __builtin_object_size (__s, 2 > 1))
+ return __fgets_unlocked_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream);
+    }
+  return __fgets_unlocked_alias (__s, __n, __stream);
+}
+
+
+
+
+extern size_t __fread_unlocked_chk (void *__restrict __ptr, size_t __ptrlen,
+        size_t __size, size_t __n,
+        FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
+extern size_t __fread_unlocked_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread_unlocked")
+
+
+                     __attribute__ ((__warn_unused_result__));
+extern size_t __fread_unlocked_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_unlocked_chk")
+
+
+
+
+     __attribute__ ((__warn_unused_result__)) __attribute__((__warning__ ("fread_unlocked called with bigger size * nmemb than " "length of destination buffer")))
+                                        ;
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) __attribute__ ((__warn_unused_result__)) size_t
+fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n,
+  FILE *__restrict __stream)
+{
+  if (__builtin_object_size (__ptr, 0) != (size_t) -1)
+    {
+      if (!__builtin_constant_p (__size)
+   || !__builtin_constant_p (__n)
+   || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2)))
+ return __fread_unlocked_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n,
+         __stream);
+
+      if (__size * __n > __builtin_object_size (__ptr, 0))
+ return __fread_unlocked_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n,
+       __stream);
+    }
+
+
+  if (__builtin_constant_p (__size)
+      && __builtin_constant_p (__n)
+      && (__size | __n) < (((size_t) 1) << (8 * sizeof (size_t) / 2))
+      && __size * __n <= 8)
+    {
+      size_t __cnt = __size * __n;
+      char *__cptr = (char *) __ptr;
+      if (__cnt == 0)
+ return 0;
+
+      for (; __cnt > 0; --__cnt)
+ {
+   int __c = (__builtin_expect (((__stream)->_IO_read_ptr >= (__stream)->_IO_read_end), 0) ? __uflow (__stream) : *(unsigned char *) (__stream)->_IO_read_ptr++);
+   if (__c == (-1))
+     break;
+   *__cptr++ = __c;
+ }
+      return (__cptr - (char *) __ptr) / __size;
+    }
+
+  return __fread_unlocked_alias (__ptr, __size, __n, __stream);
+}
+# 863 "/usr/include/stdio.h" 2 3 4
+
+
+
+
+
+
+# 53 "../include/sane/sanei_config.h" 2
+# 67 "../include/sane/sanei_config.h"
+
+# 67 "../include/sane/sanei_config.h"
+extern FILE *sanei_config_open (const char *name);
+# 80 "../include/sane/sanei_config.h"
+extern char *sanei_config_read (char *str, int n, FILE *stream);
+# 89 "../include/sane/sanei_config.h"
+extern const char *sanei_config_skip_whitespace (const char *str);
+# 105 "../include/sane/sanei_config.h"
+extern const char *sanei_config_get_string (const char *str,
+         char **string_const);
+# 125 "../include/sane/sanei_config.h"
+extern void sanei_config_attach_matching_devices (const char *name,
+        SANE_Status (*attach)
+        (const char *dev));
+
+
+
+
+
+
+typedef struct
+{
+
+  SANE_Int count;
+
+
+  SANE_Option_Descriptor **descriptors;
+
+
+  void **values;
+
+} SANEI_Config;
+# 162 "../include/sane/sanei_config.h"
+extern SANE_Status sanei_configure_attach (
+  const char *config_file,
+  SANEI_Config *config,
+  SANE_Status (*config_attach)(SANEI_Config *config, const char *devname)
+);
+
+
+
+
+
+
+extern const char *sanei_config_get_paths (void);
+# 237 "sanei_scsi.c" 2
+# 1 "../include/sane/sanei_scsi.h" 1
+# 53 "../include/sane/sanei_scsi.h"
+# 1 "../include/sane/config.h" 1
+# 54 "../include/sane/sanei_scsi.h" 2
+# 68 "../include/sane/sanei_scsi.h"
+typedef SANE_Status (*SANEI_SCSI_Sense_Handler) (int fd,
+       u_char *sense_buffer,
+       void *arg);
+
+
+extern int sanei_scsi_max_request_size;
+# 94 "../include/sane/sanei_scsi.h"
+extern void sanei_scsi_find_devices (const char *vendor, const char *model,
+         const char *type,
+         int bus, int channel, int id, int lun,
+         SANE_Status (*attach) (const char *dev));
+# 120 "../include/sane/sanei_scsi.h"
+extern SANE_Status sanei_scsi_open (const char * device_name, int * fd,
+        SANEI_SCSI_Sense_Handler sense_handler,
+        void *sense_arg);
+# 151 "../include/sane/sanei_scsi.h"
+extern SANE_Status sanei_scsi_open_extended (
+       const char * device_name, int * fd,
+       SANEI_SCSI_Sense_Handler sense_handler,
+       void *sense_arg, int *buffersize);
+# 193 "../include/sane/sanei_scsi.h"
+extern SANE_Status sanei_scsi_req_enter (int fd,
+      const void * src, size_t src_size,
+      void * dst, size_t * dst_size,
+      void **idp);
+# 230 "../include/sane/sanei_scsi.h"
+extern SANE_Status sanei_scsi_req_enter2 (int fd,
+      const void * cmd, size_t cmd_size,
+      const void * src, size_t src_size,
+      void * dst, size_t * dst_size,
+      void **idp);
+# 247 "../include/sane/sanei_scsi.h"
+extern SANE_Status sanei_scsi_req_wait (void *id);
+# 271 "../include/sane/sanei_scsi.h"
+extern SANE_Status sanei_scsi_cmd (int fd,
+       const void * src, size_t src_size,
+       void * dst, size_t * dst_size);
+# 298 "../include/sane/sanei_scsi.h"
+extern SANE_Status sanei_scsi_cmd2 (int fd,
+       const void * cmd, size_t cmd_size,
+       const void * src, size_t src_size,
+       void * dst, size_t * dst_size);
+# 310 "../include/sane/sanei_scsi.h"
+extern void sanei_scsi_req_flush_all (void);
+# 320 "../include/sane/sanei_scsi.h"
+extern void sanei_scsi_req_flush_all_extended (int fd);
+
+
+
+
+
+
+extern void sanei_scsi_close (int fd);
+# 238 "sanei_scsi.c" 2
+
+
+# 1 "../include/sane/sanei_debug.h" 1
+# 10 "../include/sane/sanei_debug.h"
+# 1 "../include/sane/sanei.h" 1
+# 11 "../include/sane/sanei_debug.h" 2
+# 90 "../include/sane/sanei_debug.h"
+int sanei_debug_sanei_scsi = 0;
+# 114 "../include/sane/sanei_debug.h"
+# 1 "/usr/lib/gcc/ppc64le-redhat-linux/8/include/stdarg.h" 1 3 4
+# 115 "../include/sane/sanei_debug.h" 2
+
+extern void sanei_debug_msg
+  (int level, int max_level, const char *be, const char *fmt, va_list ap);
+
+
+
+static
+
+void sanei_debug_sanei_scsi_call (int level, const char *msg, ...) __attribute__ ((format (printf, 2, 3)));
+
+
+
+static
+
+void
+sanei_debug_sanei_scsi_call (int level, const char *msg, ...)
+{
+  va_list ap;
+
+  
+# 134 "../include/sane/sanei_debug.h" 3 4
+ __builtin_va_start(
+# 134 "../include/sane/sanei_debug.h"
+ ap
+# 134 "../include/sane/sanei_debug.h" 3 4
+ ,
+# 134 "../include/sane/sanei_debug.h"
+ msg
+# 134 "../include/sane/sanei_debug.h" 3 4
+ )
+# 134 "../include/sane/sanei_debug.h"
+                   ;
+  sanei_debug_msg (level, sanei_debug_sanei_scsi, "sanei_scsi", msg, ap);
+  
+# 136 "../include/sane/sanei_debug.h" 3 4
+ __builtin_va_end(
+# 136 "../include/sane/sanei_debug.h"
+ ap
+# 136 "../include/sane/sanei_debug.h" 3 4
+ )
+# 136 "../include/sane/sanei_debug.h"
+            ;
+}
+# 146 "../include/sane/sanei_debug.h"
+extern void sanei_init_debug (const char * backend, int * debug_level_var);
+# 241 "sanei_scsi.c" 2
+# 316 "sanei_scsi.c"
+static int sane_scsicmd_timeout = 120;
+int sanei_scsi_max_request_size = 
+# 317 "sanei_scsi.c" 3 4
+                                 (8 * 4096)
+# 317 "sanei_scsi.c"
+                                         ;
+
+
+
+
+
+# 1 "linux_sg3_err.h" 1
+# 324 "sanei_scsi.c" 2
+# 355 "sanei_scsi.c"
+typedef struct xsg_scsi_id
+{
+  int host_no;
+  int channel;
+  int scsi_id;
+  int lun;
+  int scsi_type;
+  short h_cmd_per_lun;
+  short d_queue_depth;
+  int unused1;
+  int unused2;
+}
+SG_scsi_id;
+
+typedef struct req
+{
+  struct req *next;
+  int fd;
+  u_int running:1, done:1;
+  SANE_Status status;
+  size_t *dst_len;
+  void *dst;
+
+
+
+  union
+  {
+    struct
+    {
+      struct sg_header hdr;
+
+
+      u_int8_t data[1];
+    }
+    cdb;
+
+
+
+
+
+
+
+    struct
+    {
+      struct sg_io_hdr hdr;
+      u_char sense_buffer[64];
+      u_int8_t data[1];
+    }
+    sg3;
+
+  }
+  sgdata;
+}
+req;
+
+typedef struct Fdparms
+{
+  int sg_queue_used, sg_queue_max;
+  size_t buffersize;
+  req *sane_qhead, *sane_qtail, *sane_free_list;
+}
+fdparms;
+# 425 "sanei_scsi.c"
+static struct
+{
+  u_int in_use:1;
+  u_int fake_fd:1;
+  u_int bus, target, lun;
+  SANEI_SCSI_Sense_Handler sense_handler;
+  void *sense_handler_arg;
+  void *pdata;
+}
+ *fd_info;
+
+static u_char cdb_sizes[8] = {
+  6, 10, 10, 12, 12, 12, 10, 10
+};
+# 797 "sanei_scsi.c"
+static int num_alloced = 0;
+
+
+
+static int sg_version = 0;
+
+static SANE_Status
+get_max_buffer_size (const char *file)
+{
+  int fd = -1;
+  int buffersize = 131072, i;
+  size_t len;
+  char *cc, *cc1, buf[32];
+
+
+
+
+
+  if (fd == -1)
+    fd = open (file, 
+# 816 "sanei_scsi.c" 3 4
+                    02
+# 816 "sanei_scsi.c"
+                          );
+
+  if (fd > 0)
+    {
+      cc = getenv ("SANE_SG_BUFFERSIZE");
+      if (cc)
+ {
+   i = strtol (cc, &cc1, 10);
+   if (cc != cc1 && i >= 32768)
+     buffersize = i;
+ }
+
+      ioctl (fd, 
+# 828 "sanei_scsi.c" 3 4
+                0x2275
+# 828 "sanei_scsi.c"
+                                    , &buffersize);
+      if (0 == ioctl (fd, 
+# 829 "sanei_scsi.c" 3 4
+                         0x2272
+# 829 "sanei_scsi.c"
+                                             , &buffersize))
+ {
+   if (buffersize < sanei_scsi_max_request_size)
+     sanei_scsi_max_request_size = buffersize;
+   close (fd);
+   sanei_debug_sanei_scsi_call (4, "get_max_buffer_size for %s: %i\n", file,
+        sanei_scsi_max_request_size);
+   return SANE_STATUS_GOOD;
+ }
+      else
+ {
+   close (fd);
+
+   fd = open ("/proc/sys/kernel/sg-big-buff", 
+# 842 "sanei_scsi.c" 3 4
+                                             00
+# 842 "sanei_scsi.c"
+                                                     );
+   if (fd > 0 && (len = read (fd, buf, sizeof (buf) - 1)) > 0)
+     {
+       buf[len] = '\0';
+       sanei_scsi_max_request_size = atoi (buf);
+       close (fd);
+     }
+   else
+     sanei_scsi_max_request_size = buffersize < 
+# 850 "sanei_scsi.c" 3 4
+                                               (8 * 4096) 
+# 850 "sanei_scsi.c"
+                                                           ?
+       buffersize : 
+# 851 "sanei_scsi.c" 3 4
+                   (8 * 4096)
+# 851 "sanei_scsi.c"
+                              ;
+   return SANE_STATUS_IO_ERROR;
+ }
+    }
+  else
+    return SANE_STATUS_GOOD;
+}
+
+
+SANE_Status
+sanei_scsi_open_extended (const char *dev, int *fdp,
+     SANEI_SCSI_Sense_Handler handler,
+     void *handler_arg, int *buffersize)
+
+
+
+
+
+
+{
+  u_int bus = 0, target = 0, lun = 0, fake_fd = 0;
+  char *real_dev = 0;
+  void *pdata = 0;
+  char *cc, *cc1;
+  int fd, i;
+
+  static int first_time = 1;
+
+
+
+
+
+
+  cc = getenv ("SANE_SCSICMD_TIMEOUT");
+  if (cc)
+    {
+      i = strtol (cc, &cc1, 10);
+
+      if (cc != cc1 && i > 0 && i <= 1200)
+ {
+   sane_scsicmd_timeout = i;
+ }
+      else
+ {
+   sanei_debug_sanei_scsi_call (1,
+        "sanei_scsi_open: timeout value must be between 1 and 1200 seconds\n");
+ }
+    }
+
+  sanei_init_debug ("sanei_scsi", &sanei_debug_sanei_scsi);
+
+
+  if (first_time)
+    {
+      first_time = 0;
+# 920 "sanei_scsi.c"
+      sanei_scsi_max_request_size = 131072;
+      cc = getenv ("SANE_SG_BUFFERSIZE");
+      if (cc)
+ {
+   i = strtol (cc, &cc1, 10);
+   if (cc != cc1 && i >= 32768)
+     sanei_scsi_max_request_size = i;
+ }
+      sanei_scsi_find_devices (0, 0, "Scanner", -1, -1, -1, -1,
+          get_max_buffer_size);
+      sanei_scsi_find_devices (0, 0, "Processor", -1, -1, -1, -1,
+          get_max_buffer_size);
+      sanei_debug_sanei_scsi_call (4, "sanei_scsi_open: sanei_scsi_max_request_size=%d bytes\n",
+    sanei_scsi_max_request_size);
+    }
+# 1275 "sanei_scsi.c"
+  fd = -1;
+
+
+
+
+  if (fd == -1)
+    fd = open (dev, 
+# 1281 "sanei_scsi.c" 3 4
+                   02 
+# 1281 "sanei_scsi.c"
+                          | 
+# 1281 "sanei_scsi.c" 3 4
+                            0200
+
+      
+# 1283 "sanei_scsi.c"
+     | 
+# 1283 "sanei_scsi.c" 3 4
+       04000
+
+    
+# 1285 "sanei_scsi.c"
+   );
+  if (fd < 0)
+    {
+      SANE_Status status = SANE_STATUS_INVAL;
+
+      if (
+# 1290 "sanei_scsi.c" 3 4
+         (*__errno_location ()) 
+# 1290 "sanei_scsi.c"
+               == 
+# 1290 "sanei_scsi.c" 3 4
+                  13
+# 1290 "sanei_scsi.c"
+                        )
+ status = SANE_STATUS_ACCESS_DENIED;
+      else if (
+# 1292 "sanei_scsi.c" 3 4
+              (*__errno_location ()) 
+# 1292 "sanei_scsi.c"
+                    == 
+# 1292 "sanei_scsi.c" 3 4
+                       16
+# 1292 "sanei_scsi.c"
+                            )
+ status = SANE_STATUS_DEVICE_BUSY;
+
+      sanei_debug_sanei_scsi_call (1, "sanei_scsi_open: open of `%s' failed: %s\n",
+    dev, strerror (
+# 1296 "sanei_scsi.c" 3 4
+                  (*__errno_location ())
+# 1296 "sanei_scsi.c"
+                       ));
+      return status;
+    }
+
+  if (real_dev)
+    free (real_dev);
+
+
+
+
+  {
+    int timeout;
+    timeout = sane_scsicmd_timeout * sysconf(
+# 1308 "sanei_scsi.c" 3 4
+                                    _SC_CLK_TCK
+# 1308 "sanei_scsi.c"
+                                    );
+    ioctl (fd, 
+# 1309 "sanei_scsi.c" 3 4
+              0x2201
+# 1309 "sanei_scsi.c"
+                            , &timeout);
+  }
+# 1328 "sanei_scsi.c"
+  {
+    SG_scsi_id sid;
+    int ioctl_val;
+    int real_buffersize;
+    fdparms *fdpa = 0;
+    SG_scsi_id devinfo;
+
+    pdata = fdpa = malloc (sizeof (fdparms));
+    if (!pdata)
+      {
+ close (fd);
+ return SANE_STATUS_NO_MEM;
+      }
+    memset (fdpa, 0, sizeof (fdparms));
+
+
+    fdpa->sg_queue_max = 1;
+
+
+
+
+
+
+
+    if (0 == ioctl (fd, 
+# 1352 "sanei_scsi.c" 3 4
+                       0x2282
+# 1352 "sanei_scsi.c"
+                                         , &sg_version))
+      {
+ sanei_debug_sanei_scsi_call (1, "sanei_scsi_open: SG driver version: %i\n", sg_version);
+
+ ioctl_val = ioctl (fd, 
+# 1356 "sanei_scsi.c" 3 4
+                       0x2276
+# 1356 "sanei_scsi.c"
+                                     , &devinfo);
+ if (ioctl_val == 
+# 1357 "sanei_scsi.c" 3 4
+                 22 
+# 1357 "sanei_scsi.c"
+                        || ioctl_val == 
+# 1357 "sanei_scsi.c" 3 4
+                                        25
+# 1357 "sanei_scsi.c"
+                                              )
+   {
+     sanei_debug_sanei_scsi_call (1, "sanei_scsi_open: The file %s is not an SG device file\n",
+   dev);
+     close (fd);
+     return SANE_STATUS_INVAL;
+   }
+
+ if (devinfo.scsi_type != 6 && devinfo.scsi_type != 3)
+   {
+     sanei_debug_sanei_scsi_call (1,
+   "sanei_scsi_open: The device found for %s does not look like a scanner\n",
+   dev);
+     close (fd);
+     return SANE_STATUS_INVAL;
+   }
+
+
+
+ ioctl (fd, 
+# 1376 "sanei_scsi.c" 3 4
+           0x2275
+# 1376 "sanei_scsi.c"
+                               , buffersize);
+
+
+
+
+ if (0 == ioctl (fd, 
+# 1381 "sanei_scsi.c" 3 4
+                    0x2272
+# 1381 "sanei_scsi.c"
+                                        , &real_buffersize))
+   {
+
+
+
+
+     if (real_buffersize < *buffersize)
+       *buffersize = real_buffersize;
+     fdpa->buffersize = *buffersize;
+   }
+ else
+   {
+     sanei_debug_sanei_scsi_call (1, "sanei_scsi_open: cannot read SG buffer size - %s\n",
+   strerror (
+# 1394 "sanei_scsi.c" 3 4
+            (*__errno_location ())
+# 1394 "sanei_scsi.c"
+                 ));
+     close (fd);
+     return SANE_STATUS_NO_MEM;
+   }
+ sanei_debug_sanei_scsi_call (1, "sanei_scsi_open_extended: using %i bytes as SCSI buffer\n",
+      *buffersize);
+
+ if (sg_version >= 20135)
+   {
+     sanei_debug_sanei_scsi_call (1, "trying to enable low level command queueing\n");
+
+     if (0 == ioctl (fd, 
+# 1405 "sanei_scsi.c" 3 4
+                        0x2276
+# 1405 "sanei_scsi.c"
+                                      , &sid))
+       {
+  sanei_debug_sanei_scsi_call (1, "sanei_scsi_open: Host adapter queue depth: %i\n",
+       sid.d_queue_depth);
+
+  ioctl_val = 1;
+  if (0 == ioctl (fd, 
+# 1411 "sanei_scsi.c" 3 4
+                     0x2271
+# 1411 "sanei_scsi.c"
+                                     , &ioctl_val))
+    {
+      fdpa->sg_queue_max = sid.d_queue_depth;
+      if (fdpa->sg_queue_max <= 0)
+        fdpa->sg_queue_max = 1;
+    }
+       }
+   }
+      }
+    else
+      {
+
+
+
+ if (ioctl (fd, 
+# 1425 "sanei_scsi.c" 3 4
+               0x2202
+# 1425 "sanei_scsi.c"
+                             , &ioctl_val) < 0)
+   {
+     sanei_debug_sanei_scsi_call (1, "sanei_scsi_open: The file %s is not an SG device file\n",
+   dev);
+     close (fd);
+     return SANE_STATUS_INVAL;
+   }
+ if (sanei_scsi_max_request_size < *buffersize)
+   *buffersize = sanei_scsi_max_request_size;
+ fdpa->buffersize = *buffersize;
+      }
+    if (sg_version == 0)
+      {
+ sanei_debug_sanei_scsi_call (1, "sanei_scsi_open: using old SG driver logic\n");
+      }
+    else
+      {
+ sanei_debug_sanei_scsi_call (1,
+      "sanei_scsi_open: SG driver can change buffer size at run time\n");
+ if (fdpa->sg_queue_max > 1)
+   sanei_debug_sanei_scsi_call (1, "sanei_scsi_open: low level command queueing enabled\n");
+
+ if (sg_version >= 30000)
+   {
+     sanei_debug_sanei_scsi_call (1, "sanei_scsi_open: using new SG header structure\n");
+   }
+
+      }
+  }
+
+
+
+
+
+  if (fd >= num_alloced)
+    {
+      size_t new_size, old_size;
+
+      old_size = num_alloced * sizeof (fd_info[0]);
+      num_alloced = fd + 8;
+      new_size = num_alloced * sizeof (fd_info[0]);
+      if (fd_info)
+ fd_info = realloc (fd_info, new_size);
+      else
+ fd_info = malloc (new_size);
+      memset ((char *) fd_info + old_size, 0, new_size - old_size);
+      if (!fd_info)
+ {
+   if (!fake_fd)
+     close (fd);
+   return SANE_STATUS_NO_MEM;
+ }
+    }
+  fd_info[fd].in_use = 1;
+  fd_info[fd].sense_handler = handler;
+  fd_info[fd].sense_handler_arg = handler_arg;
+  fd_info[fd].fake_fd = fake_fd;
+  fd_info[fd].bus = bus;
+  fd_info[fd].target = target;
+  fd_info[fd].lun = lun;
+  fd_info[fd].pdata = pdata;
+# 1499 "sanei_scsi.c"
+  if (fdp)
+    *fdp = fd;
+
+  return SANE_STATUS_GOOD;
+}
+
+
+
+SANE_Status
+sanei_scsi_open (const char *dev, int *fdp,
+   SANEI_SCSI_Sense_Handler handler, void *handler_arg)
+{
+  int i = 0;
+  int wanted_buffersize = 131072, real_buffersize;
+  SANE_Status res;
+  char *cc, *cc1;
+  static int first_time = 1;
+
+  if (first_time)
+    {
+      cc = getenv ("SANE_SG_BUFFERSIZE");
+      if (cc)
+ {
+   i = strtol (cc, &cc1, 10);
+   if (cc != cc1 && i >= 32768)
+     wanted_buffersize = i;
+ }
+    }
+  else
+    wanted_buffersize = sanei_scsi_max_request_size;
+
+  real_buffersize = wanted_buffersize;
+  res = sanei_scsi_open_extended (dev, fdp, handler, handler_arg,
+      &real_buffersize);
+
+
+
+
+  if (!first_time && real_buffersize != wanted_buffersize)
+    {
+      sanei_debug_sanei_scsi_call (1, "sanei_scsi_open: could not allocate SG buffer memory "
+    "wanted: %i got: %i\n", wanted_buffersize, real_buffersize);
+      sanei_scsi_close (*fdp);
+      return SANE_STATUS_NO_MEM;
+    }
+
+  first_time = 0;
+  return res;
+}
+# 1563 "sanei_scsi.c"
+void
+sanei_scsi_close (int fd)
+{
+
+  if (fd_info[fd].pdata)
+    {
+      req *req, *next_req;
+
+
+      sanei_scsi_req_flush_all_extended (fd);
+
+      req = ((fdparms *) fd_info[fd].pdata)->sane_free_list;
+      while (req)
+ {
+   next_req = req->next;
+   free (req);
+   req = next_req;
+ }
+      free (fd_info[fd].pdata);
+    }
+
+
+  fd_info[fd].in_use = 0;
+  fd_info[fd].sense_handler = 0;
+  fd_info[fd].sense_handler_arg = 0;
+
+
+
+
+  if (!fd_info[fd].fake_fd)
+    close (fd);
+# 1650 "sanei_scsi.c"
+}
+# 1841 "sanei_scsi.c"
+# 1 "/usr/include/sys/time.h" 1 3 4
+# 34 "/usr/include/sys/time.h" 3 4
+
+# 52 "/usr/include/sys/time.h" 3 4
+
+# 52 "/usr/include/sys/time.h" 3 4
+struct timezone
+  {
+    int tz_minuteswest;
+    int tz_dsttime;
+  };
+
+typedef struct timezone *__restrict __timezone_ptr_t;
+# 68 "/usr/include/sys/time.h" 3 4
+extern int gettimeofday (struct timeval *__restrict __tv,
+    __timezone_ptr_t __tz) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+
+extern int settimeofday (const struct timeval *__tv,
+    const struct timezone *__tz)
+     __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+
+
+extern int adjtime (const struct timeval *__delta,
+      struct timeval *__olddelta) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+
+enum __itimer_which
+  {
+
+    ITIMER_REAL = 0,
+
+
+    ITIMER_VIRTUAL = 1,
+
+
+
+    ITIMER_PROF = 2
+
+  };
+
+
+
+struct itimerval
+  {
+
+    struct timeval it_interval;
+
+    struct timeval it_value;
+  };
+
+
+
+
+typedef enum __itimer_which __itimer_which_t;
+
+
+
+
+
+
+extern int getitimer (__itimer_which_t __which,
+        struct itimerval *__value) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+
+extern int setitimer (__itimer_which_t __which,
+        const struct itimerval *__restrict __new,
+        struct itimerval *__restrict __old) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+
+extern int utimes (const char *__file, const struct timeval __tvp[2])
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+
+
+extern int lutimes (const char *__file, const struct timeval __tvp[2])
+     __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+
+extern int futimes (int __fd, const struct timeval __tvp[2]) __attribute__ ((__nothrow__ , __leaf__));
+
+
+
+
+
+
+extern int futimesat (int __fd, const char *__file,
+        const struct timeval __tvp[2]) __attribute__ ((__nothrow__ , __leaf__));
+# 186 "/usr/include/sys/time.h" 3 4
+
+# 1842 "sanei_scsi.c" 2
+
+
+
+
+
+# 1846 "sanei_scsi.c"
+static int pack_id = 0;
+static int need_init = 1;
+static sigset_t all_signals;
+# 1866 "sanei_scsi.c"
+static void
+issue (struct req *req)
+{
+  ssize_t nwritten;
+  fdparms *fdp;
+  struct req *rp;
+  int retries;
+  int ret;
+
+  if (!req)
+    return;
+
+  fdp = (fdparms *) fd_info[req->fd].pdata;
+  sanei_debug_sanei_scsi_call (4, "sanei_scsi.issue: %p\n", (void *) req);
+
+  rp = fdp->sane_qhead;
+  while (rp && rp->running)
+    rp = rp->next;
+
+  while (rp && fdp->sg_queue_used < fdp->sg_queue_max)
+    {
+      retries = 20;
+      while (retries)
+ {
+   
+# 1890 "sanei_scsi.c" 3 4
+  (*__errno_location ()) 
+# 1890 "sanei_scsi.c"
+        = 0;
+
+   if (sg_version < 30000)
+     {
+
+       do { sigset_t old_mask; if (need_init) { need_init = 0; sigfillset (&all_signals); } sigprocmask (
+# 1895 "sanei_scsi.c" 3 4
+      0
+# 1895 "sanei_scsi.c"
+      , &all_signals, &old_mask); {rp->running = 1; nwritten = write (rp->fd, &rp->sgdata.cdb, rp->sgdata.cdb.hdr.pack_len); ret = 0; if (nwritten != rp->sgdata.cdb.hdr.pack_len) { if (
+# 1895 "sanei_scsi.c" 3 4
+      (*__errno_location ()) 
+# 1895 "sanei_scsi.c"
+      == 
+# 1895 "sanei_scsi.c" 3 4
+      11 
+# 1895 "sanei_scsi.c"
+      || (
+# 1895 "sanei_scsi.c" 3 4
+      (*__errno_location ()) 
+# 1895 "sanei_scsi.c"
+      == 
+# 1895 "sanei_scsi.c" 3 4
+      12 
+# 1895 "sanei_scsi.c"
+      && rp != fdp->sane_qhead)) { rp->running = 0;} };} sigprocmask (
+# 1895 "sanei_scsi.c" 3 4
+      2
+# 1895 "sanei_scsi.c"
+      , &old_mask, 0); } while (0)
+# 1915 "sanei_scsi.c"
+        ;
+
+     }
+   else
+     {
+       do { sigset_t old_mask; if (need_init) { need_init = 0; sigfillset (&all_signals); } sigprocmask (
+# 1920 "sanei_scsi.c" 3 4
+      0
+# 1920 "sanei_scsi.c"
+      , &all_signals, &old_mask); {rp->running = 1; ret = ioctl(rp->fd, 
+# 1920 "sanei_scsi.c" 3 4
+      0x2285
+# 1920 "sanei_scsi.c"
+      , &rp->sgdata.sg3.hdr); nwritten = 0; if (ret < 0) { if (
+# 1920 "sanei_scsi.c" 3 4
+      (*__errno_location ()) 
+# 1920 "sanei_scsi.c"
+      == 
+# 1920 "sanei_scsi.c" 3 4
+      11 
+# 1920 "sanei_scsi.c"
+      || (
+# 1920 "sanei_scsi.c" 3 4
+      (*__errno_location ()) 
+# 1920 "sanei_scsi.c"
+      == 
+# 1920 "sanei_scsi.c" 3 4
+      12 
+# 1920 "sanei_scsi.c"
+      && rp != fdp->sane_qhead)) { rp->running = 0; } else { rp->running = 0; rp->done = 1; rp->status = SANE_STATUS_IO_ERROR; } };} sigprocmask (
+# 1920 "sanei_scsi.c" 3 4
+      2
+# 1920 "sanei_scsi.c"
+      , &old_mask, 0); } while (0)
+# 1946 "sanei_scsi.c"
+        ;
+       if (sanei_debug_sanei_scsi >= 255) system ("cat /proc/scsi/sg/debug 1>&2");
+
+  }
+
+  if (rp == fdp->sane_qhead && 
+# 1951 "sanei_scsi.c" 3 4
+                              (*__errno_location ()) 
+# 1951 "sanei_scsi.c"
+                                    == 
+# 1951 "sanei_scsi.c" 3 4
+                                       11
+# 1951 "sanei_scsi.c"
+                                             )
+    {
+      retries--;
+      usleep (10000);
+    }
+  else
+    retries = 0;
+     }
+
+
+
+
+   if ((sg_version < 30000 && nwritten != rp->sgdata.cdb.hdr.pack_len)
+       || (sg_version >= 30000 && ret < 0))
+
+     {
+       if (rp->running)
+  {
+
+    if (sg_version < 30000)
+
+      sanei_debug_sanei_scsi_call (1, "sanei_scsi.issue: bad write (errno=%i) %s %li\n",
+    
+# 1973 "sanei_scsi.c" 3 4
+   (*__errno_location ())
+# 1973 "sanei_scsi.c"
+        , strerror (
+# 1973 "sanei_scsi.c" 3 4
+                    (*__errno_location ())
+# 1973 "sanei_scsi.c"
+                         ), (long)nwritten);
+
+    else if (sg_version > 30000)
+      sanei_debug_sanei_scsi_call (1, "sanei_scsi.issue: SG_IO ioctl error (errno=%i, ret=%d) %s\n",
+    
+# 1977 "sanei_scsi.c" 3 4
+   (*__errno_location ())
+# 1977 "sanei_scsi.c"
+        , ret, strerror (
+# 1977 "sanei_scsi.c" 3 4
+                         (*__errno_location ())
+# 1977 "sanei_scsi.c"
+                              ));
+
+    rp->done = 1;
+    if (
+# 1980 "sanei_scsi.c" 3 4
+       (*__errno_location ()) 
+# 1980 "sanei_scsi.c"
+             == 
+# 1980 "sanei_scsi.c" 3 4
+                12
+# 1980 "sanei_scsi.c"
+                      )
+      {
+        sanei_debug_sanei_scsi_call (1, "sanei_scsi.issue: SG_BIG_BUF inconsistency? "
+      "Check file PROBLEMS.\n");
+        rp->status = SANE_STATUS_NO_MEM;
+      }
+    else
+      rp->status = SANE_STATUS_IO_ERROR;
+  }
+       else
+  {
+    if (
+# 1991 "sanei_scsi.c" 3 4
+       (*__errno_location ()) 
+# 1991 "sanei_scsi.c"
+             == 
+# 1991 "sanei_scsi.c" 3 4
+                12
+# 1991 "sanei_scsi.c"
+                      )
+      sanei_debug_sanei_scsi_call (1, "issue: ENOMEM - cannot queue SCSI command. "
+    "Trying again later.\n");
+    else
+      sanei_debug_sanei_scsi_call (1, "issue: EAGAIN - cannot queue SCSI command. "
+    "Trying again later.\n");
+  }
+       break;
+     }
+   else
+     {
+
+       if (sg_version < 30000)
+
+  req->status = SANE_STATUS_IO_ERROR;
+
+       else if (sg_version > 30000)
+  req->status = SANE_STATUS_GOOD;
+
+     }
+   fdp->sg_queue_used++;
+   rp = rp->next;
+    }
+}
+
+  void sanei_scsi_req_flush_all_extended (int fd)
+  {
+    fdparms *fdp;
+    struct req *req, *next_req;
+    int len, count;
+
+    fdp = (fdparms *) fd_info[fd].pdata;
+    for (req = fdp->sane_qhead; req; req = next_req)
+      {
+ if (req->running && !req->done)
+   {
+     count = sane_scsicmd_timeout * 10;
+     while (count)
+       {
+  
+# 2030 "sanei_scsi.c" 3 4
+ (*__errno_location ()) 
+# 2030 "sanei_scsi.c"
+       = 0;
+
+  if (sg_version < 30000)
+
+    len =
+      read (fd, &req->sgdata.cdb,
+     req->sgdata.cdb.hdr.reply_len);
+
+  else
+    len = read (fd, &req->sgdata.sg3.hdr, sizeof (Sg_io_hdr));
+
+  if (len >= 0 || (len < 0 && 
+# 2041 "sanei_scsi.c" 3 4
+                             (*__errno_location ()) 
+# 2041 "sanei_scsi.c"
+                                   != 
+# 2041 "sanei_scsi.c" 3 4
+                                      11
+# 2041 "sanei_scsi.c"
+                                            ))
+    break;
+  usleep (100000);
+  count--;
+       }
+     ((fdparms *) fd_info[req->fd].pdata)->sg_queue_used--;
+   }
+ next_req = req->next;
+
+ req->next = fdp->sane_free_list;
+ fdp->sane_free_list = req;
+      }
+
+    fdp->sane_qhead = fdp->sane_qtail = 0;
+  }
+
+  void sanei_scsi_req_flush_all ()
+  {
+    int fd, i, j = 0;
+
+
+
+
+
+    fd = num_alloced;
+    for (i = 0; i < num_alloced; i++)
+      if (fd_info[i].in_use)
+ {
+   j++;
+   fd = i;
+ }
+
+    
+# 2073 "sanei_scsi.c" 3 4
+   ((void) sizeof ((
+# 2073 "sanei_scsi.c"
+   j < 2
+# 2073 "sanei_scsi.c" 3 4
+   ) ? 1 : 0), __extension__ ({ if (
+# 2073 "sanei_scsi.c"
+   j < 2
+# 2073 "sanei_scsi.c" 3 4
+   ) ; else __assert_fail (
+# 2073 "sanei_scsi.c"
+   "j < 2"
+# 2073 "sanei_scsi.c" 3 4
+   , "sanei_scsi.c", 2073, __extension__ __PRETTY_FUNCTION__); }))
+# 2073 "sanei_scsi.c"
+                 ;
+
+    if (fd < num_alloced)
+      sanei_scsi_req_flush_all_extended (fd);
+  }
+
+  SANE_Status
+    sanei_scsi_req_enter2 (int fd,
+      const void *cmd, size_t cmd_size,
+      const void *src, size_t src_size,
+      void *dst, size_t * dst_size, void **idp)
+  {
+    struct req *req;
+    size_t size;
+    fdparms *fdp;
+
+    fdp = (fdparms *) fd_info[fd].pdata;
+
+    if (fdp->sane_free_list)
+      {
+ req = fdp->sane_free_list;
+ fdp->sane_free_list = req->next;
+ req->next = 0;
+      }
+    else
+      {
+
+ if (sg_version < 30000)
+
+   size = (sizeof (*req) - sizeof (req->sgdata.cdb.data)
+    + fdp->buffersize);
+
+ else
+   size = sizeof (*req) + 12 + fdp->buffersize
+     - sizeof (req->sgdata.sg3.data);
+
+ req = malloc (size);
+ if (!req)
+   {
+     sanei_debug_sanei_scsi_call (1, "sanei_scsi_req_enter: failed to malloc %lu bytes\n",
+   (u_long) size);
+     return SANE_STATUS_NO_MEM;
+   }
+      }
+    req->fd = fd;
+    req->running = 0;
+    req->done = 0;
+    req->status = SANE_STATUS_GOOD;
+    req->dst = dst;
+    req->dst_len = dst_size;
+
+    if (sg_version < 30000)
+      {
+
+ memset (&req->sgdata.cdb.hdr, 0, sizeof (req->sgdata.cdb.hdr));
+ req->sgdata.cdb.hdr.pack_id = pack_id++;
+ req->sgdata.cdb.hdr.pack_len = cmd_size + src_size
+   + sizeof (req->sgdata.cdb.hdr);
+ req->sgdata.cdb.hdr.reply_len = (dst_size ? *dst_size : 0)
+   + sizeof (req->sgdata.cdb.hdr);
+ memcpy (&req->sgdata.cdb.data, cmd, cmd_size);
+ memcpy (&req->sgdata.cdb.data[cmd_size], src, src_size);
+ if (cdb_sizes[(((*(const u_char *) cmd) >> 5) & 7)] != cmd_size)
+   {
+     if (ioctl (fd, 
+# 2137 "sanei_scsi.c" 3 4
+                   0x2283
+# 2137 "sanei_scsi.c"
+                                  , &cmd_size))
+       {
+  sanei_debug_sanei_scsi_call (1,
+       "sanei_scsi_req_enter2: ioctl to set command length failed\n");
+       }
+   }
+
+      }
+    else
+      {
+ memset (&req->sgdata.sg3.hdr, 0, sizeof (req->sgdata.sg3.hdr));
+ req->sgdata.sg3.hdr.interface_id = 'S';
+ req->sgdata.sg3.hdr.cmd_len = cmd_size;
+ req->sgdata.sg3.hdr.iovec_count = 0;
+ req->sgdata.sg3.hdr.mx_sb_len = 64;
+
+ if (dst_size && *dst_size)
+   {
+     req->sgdata.sg3.hdr.dxfer_direction = 
+# 2155 "sanei_scsi.c" 3 4
+                                          -3
+# 2155 "sanei_scsi.c"
+                                                           ;
+     req->sgdata.sg3.hdr.dxfer_len = *dst_size;
+     req->sgdata.sg3.hdr.dxferp = dst;
+   }
+ else if (src_size)
+   {
+     req->sgdata.sg3.hdr.dxfer_direction = 
+# 2161 "sanei_scsi.c" 3 4
+                                          -2
+# 2161 "sanei_scsi.c"
+                                                         ;
+     if (src_size > fdp->buffersize)
+       {
+  sanei_debug_sanei_scsi_call (1,
+       "sanei_scsi_req_enter2 warning: truncating write data "
+       "from requested %li bytes to allowed %li bytes\n",
+       (long)src_size, (long)fdp->buffersize);
+  src_size = fdp->buffersize;
+       }
+     req->sgdata.sg3.hdr.dxfer_len = src_size;
+     memcpy (&req->sgdata.sg3.data[12], src, src_size);
+     req->sgdata.sg3.hdr.dxferp = &req->sgdata.sg3.data[12];
+   }
+ else
+   {
+     req->sgdata.sg3.hdr.dxfer_direction = 
+# 2176 "sanei_scsi.c" 3 4
+                                          -1
+# 2176 "sanei_scsi.c"
+                                                       ;
+   }
+ if (cmd_size > 12)
+   {
+     sanei_debug_sanei_scsi_call (1, "sanei_scsi_req_enter2 warning: truncating write data "
+   "from requested %li bytes to allowed %i bytes\n",
+   (long)cmd_size, 12);
+     cmd_size = 12;
+   }
+ memcpy (req->sgdata.sg3.data, cmd, cmd_size);
+ req->sgdata.sg3.hdr.cmdp = req->sgdata.sg3.data;
+ req->sgdata.sg3.hdr.sbp = &(req->sgdata.sg3.sense_buffer[0]);
+ req->sgdata.sg3.hdr.timeout = 1000 * sane_scsicmd_timeout;
+# 2197 "sanei_scsi.c"
+ req->sgdata.sg3.hdr.flags = 0;
+
+ req->sgdata.sg3.hdr.pack_id = pack_id++;
+ req->sgdata.sg3.hdr.usr_ptr = 0;
+      }
+
+
+    req->next = 0;
+    do { sigset_t old_mask; if (need_init) { need_init = 0; sigfillset (&all_signals); } sigprocmask (
+# 2205 "sanei_scsi.c" 3 4
+   0
+# 2205 "sanei_scsi.c"
+   , &all_signals, &old_mask); {if (fdp->sane_qtail) { fdp->sane_qtail->next = req; fdp->sane_qtail = req;} else fdp->sane_qhead = fdp->sane_qtail = req;} sigprocmask (
+# 2205 "sanei_scsi.c" 3 4
+   2
+# 2205 "sanei_scsi.c"
+   , &old_mask, 0); } while (0)
+
+
+
+                                             ;
+
+    sanei_debug_sanei_scsi_call (4, "scsi_req_enter: entered %p\n", (void *) req);
+
+    *idp = req;
+    issue (req);
+
+    sanei_debug_sanei_scsi_call (10, "scsi_req_enter: queue_used: %i, queue_max: %i\n",
+  ((fdparms *) fd_info[fd].pdata)->sg_queue_used,
+  ((fdparms *) fd_info[fd].pdata)->sg_queue_max);
+
+    return SANE_STATUS_GOOD;
+  }
+
+  SANE_Status sanei_scsi_req_wait (void *id)
+  {
+    SANE_Status status = SANE_STATUS_GOOD;
+    struct req *req = id;
+    ssize_t nread = 0;
+
+
+    
+# 2230 "sanei_scsi.c" 3 4
+   ((void) sizeof ((
+# 2230 "sanei_scsi.c"
+   req == ((fdparms *) fd_info[req->fd].pdata)->sane_qhead
+# 2230 "sanei_scsi.c" 3 4
+   ) ? 1 : 0), __extension__ ({ if (
+# 2230 "sanei_scsi.c"
+   req == ((fdparms *) fd_info[req->fd].pdata)->sane_qhead
+# 2230 "sanei_scsi.c" 3 4
+   ) ; else __assert_fail (
+# 2230 "sanei_scsi.c"
+   "req == ((fdparms *) fd_info[req->fd].pdata)->sane_qhead"
+# 2230 "sanei_scsi.c" 3 4
+   , "sanei_scsi.c", 2230, __extension__ __PRETTY_FUNCTION__); }))
+# 2230 "sanei_scsi.c"
+                                                                   ;
+
+    sanei_debug_sanei_scsi_call (4, "sanei_scsi_req_wait: waiting for %p\n", (void *) req);
+
+    issue (req);
+    if (req->done)
+      {
+ issue (req->next);
+ status = req->status;
+      }
+    else
+      {
+
+ if (sg_version < 30000)
+   {
+
+     fd_set readable;
+
+
+     
+# 2249 "sanei_scsi.c" 3 4
+    do { unsigned int __i; fd_set *__arr = (
+# 2249 "sanei_scsi.c"
+    &readable
+# 2249 "sanei_scsi.c" 3 4
+    ); for (__i = 0; __i < sizeof (fd_set) / sizeof (__fd_mask); ++__i) ((__arr)->fds_bits)[__i] = 0; } while (0)
+# 2249 "sanei_scsi.c"
+                       ;
+     
+# 2250 "sanei_scsi.c" 3 4
+    ((void) (((
+# 2250 "sanei_scsi.c"
+    &readable
+# 2250 "sanei_scsi.c" 3 4
+    )->fds_bits)[__extension__ ({ long int __d = (
+# 2250 "sanei_scsi.c"
+    req->fd
+# 2250 "sanei_scsi.c" 3 4
+    ); (__builtin_constant_p (__d) ? (0 <= __d && __d < 1024 ? (__d / (8 * (int) sizeof (__fd_mask))) : __fdelt_warn (__d)) : __fdelt_chk (__d)); })] |= ((__fd_mask) (1UL << ((
+# 2250 "sanei_scsi.c"
+    req->fd
+# 2250 "sanei_scsi.c" 3 4
+    ) % (8 * (int) sizeof (__fd_mask)))))))
+# 2250 "sanei_scsi.c"
+                               ;
+     select (req->fd + 1, &readable, 0, 0, 0);
+
+
+     do { sigset_t old_mask; if (need_init) { need_init = 0; sigfillset (&all_signals); } sigprocmask (
+# 2254 "sanei_scsi.c" 3 4
+    0
+# 2254 "sanei_scsi.c"
+    , &all_signals, &old_mask); {nread = read (req->fd, &req->sgdata.cdb, req->sgdata.cdb.hdr.reply_len); req->done = 1;} sigprocmask (
+# 2254 "sanei_scsi.c" 3 4
+    2
+# 2254 "sanei_scsi.c"
+    , &old_mask, 0); } while (0)
+
+                    ;
+
+   }
+ else
+   {
+     if (sanei_debug_sanei_scsi >= 255) system ("cat /proc/scsi/sg/debug 1>&2");
+
+
+
+       nread = 0;
+       req->done = 1;
+   }
+
+
+ if (fd_info[req->fd].pdata)
+   ((fdparms *) fd_info[req->fd].pdata)->sg_queue_used--;
+
+
+
+
+ issue (req->next);
+
+ sanei_debug_sanei_scsi_call (4, "sanei_scsi_req_wait: read %ld bytes\n", (long) nread);
+
+ if (nread < 0)
+   {
+     sanei_debug_sanei_scsi_call (1, "sanei_scsi_req_wait: read returned %ld (errno=%d)\n",
+   (long) nread, 
+# 2283 "sanei_scsi.c" 3 4
+                (*__errno_location ())
+# 2283 "sanei_scsi.c"
+                     );
+     status = SANE_STATUS_IO_ERROR;
+   }
+ else
+   {
+
+     if (sg_version < 30000)
+       {
+
+  nread -= sizeof (req->sgdata.cdb.hdr);
+
+
+  if ((req->sgdata.cdb.hdr.result != 0) ||
+      (((req->sgdata.cdb.hdr.sense_buffer[0] & 0x7f) != 0)
+
+
+
+
+
+
+       && (req->sgdata.cdb.hdr.driver_status & 0x08)
+
+      ))
+    {
+      SANEI_SCSI_Sense_Handler handler
+        = fd_info[req->fd].sense_handler;
+      void *arg = fd_info[req->fd].sense_handler_arg;
+
+      sanei_debug_sanei_scsi_call (1,
+    "sanei_scsi_req_wait: SCSI command complained: %s\n",
+    strerror (req->sgdata.cdb.hdr.result));
+      sanei_debug_sanei_scsi_call (10,
+    "sense buffer: %02x %02x %02x %02x %02x %02x %02x %02x"
+    " %02x %02x %02x %02x %02x %02x %02x %02x\n",
+    req->sgdata.cdb.hdr.sense_buffer[0],
+    req->sgdata.cdb.hdr.sense_buffer[1],
+    req->sgdata.cdb.hdr.sense_buffer[2],
+    req->sgdata.cdb.hdr.sense_buffer[3],
+    req->sgdata.cdb.hdr.sense_buffer[4],
+    req->sgdata.cdb.hdr.sense_buffer[5],
+    req->sgdata.cdb.hdr.sense_buffer[6],
+    req->sgdata.cdb.hdr.sense_buffer[7],
+    req->sgdata.cdb.hdr.sense_buffer[8],
+    req->sgdata.cdb.hdr.sense_buffer[9],
+    req->sgdata.cdb.hdr.sense_buffer[10],
+    req->sgdata.cdb.hdr.sense_buffer[11],
+    req->sgdata.cdb.hdr.sense_buffer[12],
+    req->sgdata.cdb.hdr.sense_buffer[13],
+    req->sgdata.cdb.hdr.sense_buffer[14],
+    req->sgdata.cdb.hdr.sense_buffer[15]);
+
+
+
+
+      sanei_debug_sanei_scsi_call (10, "target status: %02x host status: %02x"
+    " driver status: %02x\n",
+    req->sgdata.cdb.hdr.target_status,
+    req->sgdata.cdb.hdr.host_status,
+    req->sgdata.cdb.hdr.driver_status);
+
+      if (req->sgdata.cdb.hdr.host_status == 0x01 || req->sgdata.cdb.hdr.host_status == 0x02 || req->sgdata.cdb.hdr.host_status == 0x03 || req->sgdata.cdb.hdr.driver_status == 0x01 || req->sgdata.cdb.hdr.target_status == 0x04)
+
+
+
+        status = SANE_STATUS_DEVICE_BUSY;
+      else if (handler)
+
+
+        status =
+   (*handler) (req->fd, req->sgdata.cdb.hdr.sense_buffer,
+        arg);
+      else
+        status = SANE_STATUS_IO_ERROR;
+    }
+
+
+  if (status == SANE_STATUS_GOOD)
+    {
+      if (req->dst)
+        memcpy (req->dst, req->sgdata.cdb.data, nread);
+
+      if (req->dst_len)
+        *req->dst_len = nread;
+    }
+
+       }
+     else
+       {
+
+  if (((req->sgdata.sg3.hdr.info & 
+# 2372 "sanei_scsi.c" 3 4
+                                  0x1
+# 2372 "sanei_scsi.c"
+                                               ) != 0)
+      || ((req->sgdata.sg3.hdr.sb_len_wr > 0)
+   && ((req->sgdata.sg3.sense_buffer[0] & 0x7f) != 0)
+   && (req->sgdata.sg3.hdr.
+       driver_status & 0x08)))
+    {
+      SANEI_SCSI_Sense_Handler handler
+        = fd_info[req->fd].sense_handler;
+      void *arg = fd_info[req->fd].sense_handler_arg;
+
+      sanei_debug_sanei_scsi_call (1,
+    "sanei_scsi_req_wait: SCSI command complained: %s\n",
+    strerror (
+# 2384 "sanei_scsi.c" 3 4
+             (*__errno_location ())
+# 2384 "sanei_scsi.c"
+                  ));
+      sanei_debug_sanei_scsi_call (10,
+    "sense buffer: %02x %02x %02x %02x %02x %02x %02x %02x"
+    " %02x %02x %02x %02x %02x %02x %02x %02x\n",
+    req->sgdata.sg3.sense_buffer[0],
+    req->sgdata.sg3.sense_buffer[1],
+    req->sgdata.sg3.sense_buffer[2],
+    req->sgdata.sg3.sense_buffer[3],
+    req->sgdata.sg3.sense_buffer[4],
+    req->sgdata.sg3.sense_buffer[5],
+    req->sgdata.sg3.sense_buffer[6],
+    req->sgdata.sg3.sense_buffer[7],
+    req->sgdata.sg3.sense_buffer[8],
+    req->sgdata.sg3.sense_buffer[9],
+    req->sgdata.sg3.sense_buffer[10],
+    req->sgdata.sg3.sense_buffer[11],
+    req->sgdata.sg3.sense_buffer[12],
+    req->sgdata.sg3.sense_buffer[13],
+    req->sgdata.sg3.sense_buffer[14],
+    req->sgdata.sg3.sense_buffer[15]);
+      sanei_debug_sanei_scsi_call (10,
+    "target status: %02x host status: %04x"
+    " driver status: %04x\n", req->sgdata.sg3.hdr.status,
+    req->sgdata.sg3.hdr.host_status,
+    req->sgdata.sg3.hdr.driver_status);
+
+
+
+
+
+      if (req->sgdata.sg3.hdr.host_status == 0x01 || req->sgdata.sg3.hdr.host_status == 0x02 || req->sgdata.sg3.hdr.host_status == 0x03 || req->sgdata.sg3.hdr.driver_status == 0x01 || req->sgdata.sg3.hdr.masked_status == 0x04)
+        status = SANE_STATUS_DEVICE_BUSY;
+      else if (handler && req->sgdata.sg3.hdr.sb_len_wr)
+
+
+        status =
+   (*handler) (req->fd, req->sgdata.sg3.sense_buffer,
+        arg);
+
+
+
+
+      else if (((req->sgdata.sg3.hdr.status & 0x2a) == 0)
+        && (req->sgdata.sg3.hdr.host_status ==
+     0x00)
+        &&
+        ((req->sgdata.sg3.hdr.
+          driver_status & ~0x08) ==
+         0x00))
+        status = SANE_STATUS_GOOD;
+      else
+        status = SANE_STATUS_IO_ERROR;
+    }
+# 2451 "sanei_scsi.c"
+  if (req->sgdata.sg3.hdr.resid)
+    {
+      sanei_debug_sanei_scsi_call (1,
+    "sanei_scsi_req_wait: SG driver returned resid %i\n",
+    req->sgdata.sg3.hdr.resid);
+      sanei_debug_sanei_scsi_call (1,
+    "                     NOTE: This value may be bogus\n");
+    }
+       }
+
+   }
+      }
+
+
+    do { sigset_t old_mask; if (need_init) { need_init = 0; sigfillset (&all_signals); } sigprocmask (
+# 2465 "sanei_scsi.c" 3 4
+   0
+# 2465 "sanei_scsi.c"
+   , &all_signals, &old_mask); {((fdparms *) fd_info[req->fd].pdata)->sane_qhead = ((fdparms *) fd_info[req->fd].pdata)->sane_qhead->next; if (!((fdparms *) fd_info[req->fd].pdata)->sane_qhead) ((fdparms *) fd_info[req->fd].pdata)->sane_qtail = 0; req->next = ((fdparms *) fd_info[req->fd].pdata)->sane_free_list; ((fdparms *) fd_info[req->fd].pdata)->sane_free_list = req;} sigprocmask (
+# 2465 "sanei_scsi.c" 3 4
+   2
+# 2465 "sanei_scsi.c"
+   , &old_mask, 0); } while (0)
+
+
+
+
+                                                                ;
+    return status;
+  }
+
+  SANE_Status
+    sanei_scsi_cmd2 (int fd,
+       const void *cmd, size_t cmd_size,
+       const void *src, size_t src_size,
+       void *dst, size_t * dst_size)
+  {
+    SANE_Status status;
+    void *id;
+
+    status =
+      sanei_scsi_req_enter2 (fd, cmd, cmd_size, src, src_size, dst, dst_size,
+        &id);
+    if (status != SANE_STATUS_GOOD)
+      return status;
+    return sanei_scsi_req_wait (id);
+  }
+# 2505 "sanei_scsi.c"
+  static int lx_sg_dev_base = -1;
+  static int lx_devfs = -1;
+
+  static const struct lx_device_name_list_tag
+  {
+    const char *prefix;
+    char base;
+  }
+  lx_dnl[] =
+  {
+    {
+    "/dev/sg", 0}
+    ,
+    {
+    "/dev/sg", 'a'}
+    ,
+    {
+    "/dev/uk", 0}
+    ,
+    {
+    "/dev/gsc", 0}
+  };
+
+  static int
+
+    lx_mk_devicename (int guess_devnum, char *name, size_t name_len)
+  {
+    int dev_fd, k, dnl_len;
+    const struct lx_device_name_list_tag *dnp;
+
+    dnl_len = ((int)(sizeof (lx_dnl) / sizeof (lx_dnl[0])));
+    k = ((-1 == lx_sg_dev_base) ? 0 : lx_sg_dev_base);
+    for (; k < dnl_len; ++k)
+      {
+ dnp = &lx_dnl[k];
+ if (dnp->base)
+   snprintf (name, name_len, "%s%c", dnp->prefix,
+      dnp->base + guess_devnum);
+ else
+   snprintf (name, name_len, "%s%d", dnp->prefix, guess_devnum);
+   dev_fd = -1;
+
+
+
+   if (dev_fd == -1)
+     dev_fd = open (name, 
+# 2550 "sanei_scsi.c" 3 4
+                         02 
+# 2550 "sanei_scsi.c"
+                                | 
+# 2550 "sanei_scsi.c" 3 4
+                                  04000
+# 2550 "sanei_scsi.c"
+                                            );
+ if (dev_fd >= 0)
+   {
+     lx_sg_dev_base = k;
+     return dev_fd;
+   }
+ else if ((
+# 2556 "sanei_scsi.c" 3 4
+          13 
+# 2556 "sanei_scsi.c"
+                 == 
+# 2556 "sanei_scsi.c" 3 4
+                    (*__errno_location ())
+# 2556 "sanei_scsi.c"
+                         ) || (
+# 2556 "sanei_scsi.c" 3 4
+                               16 
+# 2556 "sanei_scsi.c"
+                                     == 
+# 2556 "sanei_scsi.c" 3 4
+                                        (*__errno_location ())
+# 2556 "sanei_scsi.c"
+                                             ))
+   {
+     lx_sg_dev_base = k;
+     return -1;
+   }
+ if (-1 != lx_sg_dev_base)
+   return -2;
+      }
+    return -2;
+  }
+
+  static int
+    lx_chk_id (int dev_fd, int host, int channel, int id, int lun)
+  {
+
+    struct sg_scsi_id ssid;
+
+    if ((ioctl (dev_fd, 
+# 2573 "sanei_scsi.c" 3 4
+                       0x2276
+# 2573 "sanei_scsi.c"
+                                     , &ssid) >= 0))
+      {
+ sanei_debug_sanei_scsi_call (2, "lx_chk_id: %d,%d  %d,%d  %d,%d  %d,%d\n", host, ssid.host_no,
+      channel, ssid.channel, id, ssid.scsi_id, lun, ssid.lun);
+ if ((host == ssid.host_no) &&
+     (channel == ssid.channel) &&
+     (id == ssid.scsi_id) && (lun == ssid.lun))
+   return 1;
+ else
+   return 0;
+      }
+
+    {
+      struct my_scsi_idlun
+      {
+ int dev_id;
+ int host_unique_id;
+      }
+      my_idlun;
+      if (ioctl (dev_fd, 0x5382, &my_idlun) >= 0)
+ {
+   if (((my_idlun.dev_id & 0xff) == id) &&
+       (((my_idlun.dev_id >> 8) & 0xff) == lun) &&
+       (((my_idlun.dev_id >> 16) & 0xff) == channel))
+     return 1;
+ }
+    }
+    return 0;
+  }
+
+  static int
+
+    lx_scan_sg (int exclude_devnum, char *name, size_t name_len,
+  int host, int channel, int id, int lun)
+  {
+    int dev_fd, k, missed;
+
+    if (-1 == lx_sg_dev_base)
+      return 0;
+    for (k = 0, missed = 0; (missed < 5) && (k < 255);
+  ++k, ++missed)
+      {
+ sanei_debug_sanei_scsi_call (2, "lx_scan_sg: k=%d, exclude=%d, missed=%d\n", k,
+      exclude_devnum, missed);
+ if (k == exclude_devnum)
+   {
+     missed = 0;
+     continue;
+   }
+ if ((dev_fd = lx_mk_devicename (k, name, name_len)) >= 0)
+   {
+     missed = 0;
+     if (lx_chk_id (dev_fd, host, channel, id, lun))
+       {
+  close (dev_fd);
+  return 1;
+       }
+     close (dev_fd);
+   }
+ else if (-1 == dev_fd)
+   missed = 0;
+      }
+    return 0;
+  }
+
+  static int
+
+    lx_chk_devicename (int guess_devnum, char *name, size_t name_len,
+         int host, int channel, int id, int lun)
+  {
+    int dev_fd;
+
+    if (host < 0)
+      return 0;
+    if (0 != lx_devfs)
+      {
+ if (-1 == lx_devfs)
+   {
+     if ((dev_fd =
+   lx_mk_devicename (guess_devnum, name, name_len)) >= 0)
+       close (dev_fd);
+   }
+ snprintf (name, name_len, "/dev/scsi/host%d/bus%d/target%d/lun%d/generic", host, channel, id, lun);
+ dev_fd = open (name, 
+# 2656 "sanei_scsi.c" 3 4
+                     02 
+# 2656 "sanei_scsi.c"
+                            | 
+# 2656 "sanei_scsi.c" 3 4
+                              04000
+# 2656 "sanei_scsi.c"
+                                        );
+ if (dev_fd >= 0)
+   {
+     close (dev_fd);
+     lx_devfs = 1;
+     sanei_debug_sanei_scsi_call (1, "lx_chk_devicename: matched device(devfs): %s\n", name);
+     return 1;
+   }
+ else if (
+# 2664 "sanei_scsi.c" 3 4
+         2 
+# 2664 "sanei_scsi.c"
+                == 
+# 2664 "sanei_scsi.c" 3 4
+                   (*__errno_location ())
+# 2664 "sanei_scsi.c"
+                        )
+   lx_devfs = 0;
+      }
+
+    if ((dev_fd = lx_mk_devicename (guess_devnum, name, name_len)) < -1)
+      {
+ if ((dev_fd = lx_mk_devicename (0, name, name_len)) < -1)
+   {
+     if ((dev_fd = lx_mk_devicename (1, name, name_len)) < -1)
+       return 0;
+   }
+      }
+    if (dev_fd >= 0)
+      {
+
+ if (lx_chk_id (dev_fd, host, channel, id, lun))
+   {
+     close (dev_fd);
+     sanei_debug_sanei_scsi_call (1, "lx_chk_devicename: matched device(direct): %s\n", name);
+     return 1;
+   }
+ close (dev_fd);
+      }
+
+    if (lx_scan_sg (guess_devnum, name, name_len, host, channel, id, lun))
+      {
+ sanei_debug_sanei_scsi_call (1, "lx_chk_devicename: matched device(scan): %s\n", name);
+ return 1;
+      }
+    return 0;
+  }
+
+
+static void
+sanei_proc_scsi_find_devices (const char *findvendor, const char *findmodel,
+         const char *findtype,
+         int findbus, int findchannel, int findid,
+         int findlun,
+         SANE_Status (*attach) (const char *dev))
+  {
+# 2714 "sanei_scsi.c"
+    char *me = "sanei_proc_scsi_find_devices";
+
+    size_t findvendor_len = 0, findmodel_len = 0, findtype_len = 0;
+    char vendor[32], model[32], type[32], revision[32];
+    int bus, channel, id, lun;
+
+    int number, i, j, definedd;
+    char line[256], dev_name[128], *c1, *c2, ctmp;
+    char *string;
+    FILE *proc_fp;
+    char *end;
+    struct
+    {
+      const char *name;
+      size_t name_len;
+      int is_int;
+      union
+      {
+ void *v;
+ char *str;
+ int *i;
+      }
+      u;
+    }
+    param[] =
+    {
+      {
+ "Vendor:", 7, 0,
+ {
+ 0}
+      }
+      ,
+      {
+ "Model:", 6, 0,
+ {
+ 0}
+      }
+      ,
+      {
+ "Type:", 5, 0,
+ {
+ 0}
+      }
+      ,
+      {
+ "Rev:", 4, 0,
+ {
+ 0}
+      }
+      ,
+      {
+ "scsi", 4, 1,
+ {
+ 0}
+      }
+      ,
+      {
+ "Channel:", 8, 1,
+ {
+ 0}
+      }
+      ,
+      {
+ "Id:", 3, 1,
+ {
+ 0}
+      }
+      ,
+      {
+ "Lun:", 4, 1,
+ {
+ 0}
+      }
+    };
+
+    param[0].u.str = vendor;
+    param[1].u.str = model;
+    param[2].u.str = type;
+    param[3].u.str = revision;
+    param[4].u.i = &bus;
+    param[5].u.i = &channel;
+    param[6].u.i = &id;
+    param[7].u.i = &lun;
+
+    sanei_init_debug ("sanei_scsi", &sanei_debug_sanei_scsi);
+
+    proc_fp = fopen ("/proc/scsi/scsi", "r");
+    if (!proc_fp)
+      {
+ sanei_debug_sanei_scsi_call (1, "%s: could not open %s for reading\n", me, "/proc/scsi/scsi");
+ return;
+      }
+
+    number = bus = channel = id = lun = -1;
+
+    vendor[0] = model[0] = type[0] = '\0';
+    if (findvendor)
+      findvendor_len = strlen (findvendor);
+    if (findmodel)
+      findmodel_len = strlen (findmodel);
+    if (findtype)
+      findtype_len = strlen (findtype);
+
+    definedd = 0;
+    while (!feof (proc_fp))
+      {
+ fgets (line, sizeof (line), proc_fp);
+ string = (char *) sanei_config_skip_whitespace (line);
+
+ while (*string)
+   {
+     for (i = 0; i < ((int)(sizeof (param) / sizeof (param[0]))); ++i)
+       {
+  if (strncmp (string, param[i].name, param[i].name_len) == 0)
+    {
+      string += param[i].name_len;
+
+
+
+      c2 = string + strlen (string);
+      for (j = 0; j < ((int)(sizeof (param) / sizeof (param[0]))); ++j)
+        {
+   c1 = strstr (string, param[j].name);
+   if ((j != i) && c1 && (c1 < c2))
+     c2 = c1;
+        }
+      ctmp = *c2;
+      *c2 = 0;
+      string = (char *) sanei_config_skip_whitespace (string);
+
+      if (param[i].is_int)
+        {
+   if (*string)
+     {
+       *param[i].u.i = strtol (string, &end, 10);
+       string = (char *) end;
+     }
+   else
+     *param[i].u.i = 0;
+        }
+      else
+        {
+   strncpy (param[i].u.str, string, 32);
+   param[i].u.str[31] = '\0';
+
+
+
+        }
+
+      *c2 = ctmp;
+      string = c2;
+      definedd |= 1 << i;
+
+      if (param[i].u.v == &bus)
+        {
+   ++number;
+   definedd = 16;
+        }
+      break;
+    }
+       }
+     if (i >= ((int)(sizeof (param) / sizeof (param[0]))))
+       ++string;
+   }
+
+ if (255 != definedd)
+
+   continue;
+
+ definedd = 0;
+ if ((!findvendor || strncmp (vendor, findvendor, findvendor_len) == 0)
+     && (!findmodel || strncmp (model, findmodel, findmodel_len) == 0)
+     && (!findtype || strncmp (type, findtype, findtype_len) == 0)
+     && (findbus == -1 || bus == findbus)
+     && (findchannel == -1 || channel == findchannel)
+     && (findid == -1 || id == findid)
+     && (findlun == -1 || lun == findlun))
+   {
+     sanei_debug_sanei_scsi_call (2, "%s: found: vendor=%s model=%s type=%s\n\t"
+   "bus=%d chan=%d id=%d lun=%d num=%d\n",
+   me, findvendor, findmodel, findtype,
+   bus, channel, id, lun, number);
+     if (lx_chk_devicename (number, dev_name, sizeof (dev_name), bus,
+       channel, id, lun)
+  && ((*attach) (dev_name) != SANE_STATUS_GOOD))
+       {
+  sanei_debug_sanei_scsi_call(1,"sanei_scsi_find_devices: bad attach\n");
+       }
+   }
+ else
+   {
+     sanei_debug_sanei_scsi_call (2, "%s: no match\n", me);
+   }
+ vendor[0] = model[0] = type[0] = 0;
+ bus = channel = id = lun = -1;
+      }
+    fclose (proc_fp);
+  }
+
+
+
+
+static char *lnxscsi_device_types[] = {
+  "Direct-Access    ",
+  "Sequential-Access",
+  "Printer          ",
+  "Processor        ",
+  "WORM             ",
+  "CD-ROM           ",
+  "Scanner          ",
+  "Optical Device   ",
+  "Medium Changer   ",
+  "Communications   ",
+  "ASC IT8          ",
+  "ASC IT8          ",
+  "RAID             ",
+  "Enclosure        ",
+  "Direct-Access-RBC",
+  "Optical card     ",
+  "Bridge controller",
+  "Object storage   ",
+  "Automation/Drive "
+};
+
+void
+sanei_scsi_find_devices (const char *findvendor, const char *findmodel,
+    const char *findtype,
+    int findbus, int findchannel, int findid,
+    int findlun,
+    SANE_Status (*attach) (const char *dev))
+  {
+    char *me = "sanei_scsi_find_devices";
+    char path[
+# 2946 "sanei_scsi.c" 3 4
+             4096
+# 2946 "sanei_scsi.c"
+                     ];
+    char dev_name[128];
+    struct dirent buf;
+    struct dirent *de;
+    DIR *scsidevs;
+    FILE *fp;
+    char *ptr;
+    char *end;
+    int bcil[4];
+    char vmt[3][33];
+    int vmt_len[3];
+    char *vmtfiles[3] = { "vendor", "model", "type" };
+    int lastbus;
+    int number;
+    int i;
+    long val;
+    int ret;
+
+    sanei_init_debug ("sanei_scsi", &sanei_debug_sanei_scsi);
+
+    sanei_debug_sanei_scsi_call (2, "%s: looking for: v=%s m=%s t=%s b=%d c=%d i=%d l=%d\n",
+  me, findvendor, findmodel, findtype,
+  findbus, findchannel, findid, findlun);
+
+    scsidevs = opendir ("/sys/bus/scsi/devices");
+    if (!scsidevs)
+      {
+ sanei_debug_sanei_scsi_call (1, "%s: could not open %s; falling back to /proc\n",
+      me, "/sys/bus/scsi/devices");
+
+ sanei_proc_scsi_find_devices (findvendor, findmodel, findtype,
+          findbus, findchannel, findid, findlun,
+          attach);
+ return;
+      }
+
+    vmt_len[0] = (findvendor) ? strlen(findvendor) : 0;
+    vmt_len[1] = (findmodel) ? strlen(findmodel) : 0;
+    vmt_len[2] = (findtype) ? strlen(findtype) : 0;
+
+    lastbus = -1;
+    number = -1;
+    for (;;)
+      {
+ ret = readdir_r(scsidevs, &buf, &de);
+ if (ret != 0)
+   {
+     sanei_debug_sanei_scsi_call (1, "%s: could not read directory %s: %s\n",
+   me, "/sys/bus/scsi/devices", strerror(
+# 2994 "sanei_scsi.c" 3 4
+                                   (*__errno_location ())
+# 2994 "sanei_scsi.c"
+                                        ));
+
+     break;
+   }
+
+ if (de == 
+# 2999 "sanei_scsi.c" 3 4
+          ((void *)0)
+# 2999 "sanei_scsi.c"
+              )
+   break;
+
+ if (buf.d_name[0] == '.')
+   continue;
+
+
+ ptr = buf.d_name;
+ for (i = 0; i < 4; i++)
+   {
+     
+# 3009 "sanei_scsi.c" 3 4
+    (*__errno_location ()) 
+# 3009 "sanei_scsi.c"
+          = 0;
+     val = strtol (ptr, &end, 10);
+     if (((
+# 3011 "sanei_scsi.c" 3 4
+          (*__errno_location ()) 
+# 3011 "sanei_scsi.c"
+                == 
+# 3011 "sanei_scsi.c" 3 4
+                   34
+# 3011 "sanei_scsi.c"
+                         ) && ((val == 0x7fffffffffffffffL) || (val == 
+# 3011 "sanei_scsi.c" 3 4
+                                                            (-0x7fffffffffffffffL - 1L)
+# 3011 "sanei_scsi.c"
+                                                                    )))
+  || ((
+# 3012 "sanei_scsi.c" 3 4
+      (*__errno_location ()) 
+# 3012 "sanei_scsi.c"
+            != 0) && (val == 0)))
+       {
+  sanei_debug_sanei_scsi_call (1, "%s: invalid integer in string (%s): %s\n",
+       me, ptr, strerror(
+# 3015 "sanei_scsi.c" 3 4
+                        (*__errno_location ())
+# 3015 "sanei_scsi.c"
+                             ));
+
+  i = 12;
+  break;
+       }
+
+     if (end == ptr)
+       {
+  sanei_debug_sanei_scsi_call (1, "%s: no integer found in string: %s (%d)\n", me, ptr, i);
+
+  i = 12;
+  break;
+       }
+
+     if (*end && (*end != ':'))
+       {
+  sanei_debug_sanei_scsi_call (1, "%s: parse error on string %s (%d)\n", me, buf.d_name, i);
+
+  i = 12;
+  break;
+       }
+
+     if (val > 0x7fffffff)
+       {
+  sanei_debug_sanei_scsi_call (1, "%s: integer value too large (%s)\n", me, buf.d_name);
+
+  i = 12;
+  break;
+       }
+
+     bcil[i] = (int) val;
+     ptr = end + 1;
+   }
+
+
+ if (i == 12)
+   continue;
+
+ if (bcil[0] != lastbus)
+   {
+     lastbus = bcil[0];
+     number++;
+   }
+
+ for (i = 0; i < 3; i++)
+   {
+     ret = snprintf (path, 
+# 3061 "sanei_scsi.c" 3 4
+                          4096
+# 3061 "sanei_scsi.c"
+                                  , "%s/%s/%s",
+      "/sys/bus/scsi/devices", buf.d_name, vmtfiles[i]);
+     if ((ret < 0) || (ret >= 
+# 3063 "sanei_scsi.c" 3 4
+                             4096
+# 3063 "sanei_scsi.c"
+                                     ))
+       {
+  sanei_debug_sanei_scsi_call (1, "%s: skipping %s/%s, PATH_MAX exceeded on %s\n",
+       me, "/sys/bus/scsi/devices", buf.d_name, vmtfiles[i]);
+
+  i = 12;
+  break;
+       }
+
+     memset (vmt[i], 0, sizeof(vmt[i]));
+
+     fp = fopen(path, "r");
+     if (!fp)
+       {
+  sanei_debug_sanei_scsi_call (1, "%s: could not open %s: %s\n", me, path, strerror(
+# 3077 "sanei_scsi.c" 3 4
+                                                           (*__errno_location ())
+# 3077 "sanei_scsi.c"
+                                                                ));
+
+  i = 12;
+  break;
+       }
+
+     ret = fread (vmt[i], 1, sizeof(vmt[i]) - 1, fp);
+     if (ret <= 0)
+       {
+  if (ferror(fp))
+    {
+      sanei_debug_sanei_scsi_call (1, "%s: error reading %s\n", me, path);
+
+      i = 12;
+      break;
+    }
+       }
+
+     if (vmt[i][ret - 1] == '\n')
+       vmt[i][ret - 1] = '\0';
+
+     fclose (fp);
+   }
+
+
+ if (i == 12)
+   continue;
+
+
+ 
+# 3106 "sanei_scsi.c" 3 4
+(*__errno_location ()) 
+# 3106 "sanei_scsi.c"
+      = 0;
+ val = strtol (vmt[2], &end, 10);
+ if (((
+# 3108 "sanei_scsi.c" 3 4
+      (*__errno_location ()) 
+# 3108 "sanei_scsi.c"
+            == 
+# 3108 "sanei_scsi.c" 3 4
+               34
+# 3108 "sanei_scsi.c"
+                     ) && ((val == 0x7fffffffffffffffL) || (val == 
+# 3108 "sanei_scsi.c" 3 4
+                                                        (-0x7fffffffffffffffL - 1L)
+# 3108 "sanei_scsi.c"
+                                                                )))
+     || ((
+# 3109 "sanei_scsi.c" 3 4
+         (*__errno_location ()) 
+# 3109 "sanei_scsi.c"
+               != 0) && (val == 0)))
+   {
+     sanei_debug_sanei_scsi_call (1, "%s: invalid integer in type string (%s): %s\n",
+   me, vmt[2], strerror(
+# 3112 "sanei_scsi.c" 3 4
+                       (*__errno_location ())
+# 3112 "sanei_scsi.c"
+                            ));
+     continue;
+   }
+
+ if (end == vmt[2])
+   {
+     sanei_debug_sanei_scsi_call (1, "%s: no integer found in type string: %s\n", me, vmt[2]);
+     continue;
+   }
+
+ if ((val < 0) || (val >= (int)(sizeof(lnxscsi_device_types) / sizeof(lnxscsi_device_types[0]))))
+   {
+     sanei_debug_sanei_scsi_call (1, "%s: invalid type %ld\n", me, val);
+     continue;
+   }
+
+ strncpy(vmt[2], lnxscsi_device_types[val], sizeof(vmt[2]) - 1);
+
+ if ((!findvendor || strncmp (vmt[0], findvendor, vmt_len[0]) == 0)
+     && (!findmodel || strncmp (vmt[1], findmodel, vmt_len[1]) == 0)
+     && (!findtype || strncmp (vmt[2], findtype, vmt_len[2]) == 0)
+     && (findbus == -1 || bcil[0] == findbus)
+     && (findchannel == -1 || bcil[1] == findchannel)
+     && (findid == -1 || bcil[2] == findid)
+     && (findlun == -1 || bcil[3] == findlun))
+   {
+     sanei_debug_sanei_scsi_call (2, "%s: found: vendor=%s model=%s type=%s\n\t"
+   "bus=%d chan=%d id=%d lun=%d num=%d\n",
+   me, vmt[0], vmt[1], vmt[2],
+   bcil[0], bcil[1], bcil[2], bcil[3], number);
+
+     if (lx_chk_devicename (number, dev_name, sizeof (dev_name),
+       bcil[0], bcil[1], bcil[2], bcil[3])
+  && ((*attach) (dev_name) != SANE_STATUS_GOOD))
+       {
+  sanei_debug_sanei_scsi_call (1, "%s: bad attach\n", me);
+       }
+   }
+ else
+   {
+     sanei_debug_sanei_scsi_call (2, "%s: no match\n", me);
+   }
+      }
+
+    closedir(scsidevs);
+  }
+# 6140 "sanei_scsi.c"
+  SANE_Status sanei_scsi_req_enter (int fd,
+        const void *src, size_t src_size,
+        void *dst, size_t * dst_size, void **idp)
+  {
+    size_t cmd_size = cdb_sizes[(((*(const char *) src) >> 5) & 7)];
+
+    if (dst_size && *dst_size)
+      
+# 6147 "sanei_scsi.c" 3 4
+     ((void) sizeof ((
+# 6147 "sanei_scsi.c"
+     src_size == cmd_size
+# 6147 "sanei_scsi.c" 3 4
+     ) ? 1 : 0), __extension__ ({ if (
+# 6147 "sanei_scsi.c"
+     src_size == cmd_size
+# 6147 "sanei_scsi.c" 3 4
+     ) ; else __assert_fail (
+# 6147 "sanei_scsi.c"
+     "src_size == cmd_size"
+# 6147 "sanei_scsi.c" 3 4
+     , "sanei_scsi.c", 6147, __extension__ __PRETTY_FUNCTION__); }))
+# 6147 "sanei_scsi.c"
+                                  ;
+    else
+      
+# 6149 "sanei_scsi.c" 3 4
+     ((void) sizeof ((
+# 6149 "sanei_scsi.c"
+     src_size >= cmd_size
+# 6149 "sanei_scsi.c" 3 4
+     ) ? 1 : 0), __extension__ ({ if (
+# 6149 "sanei_scsi.c"
+     src_size >= cmd_size
+# 6149 "sanei_scsi.c" 3 4
+     ) ; else __assert_fail (
+# 6149 "sanei_scsi.c"
+     "src_size >= cmd_size"
+# 6149 "sanei_scsi.c" 3 4
+     , "sanei_scsi.c", 6149, __extension__ __PRETTY_FUNCTION__); }))
+# 6149 "sanei_scsi.c"
+                                  ;
+
+    return sanei_scsi_req_enter2 (fd, src, cmd_size,
+      (const char *) src + cmd_size,
+      src_size - cmd_size, dst, dst_size, idp);
+  }
+
+  SANE_Status
+    sanei_scsi_cmd (int fd, const void *src, size_t src_size,
+      void *dst, size_t * dst_size)
+  {
+    size_t cmd_size = cdb_sizes[(((*(const char *) src) >> 5) & 7)];
+
+    if (dst_size && *dst_size)
+      
+# 6163 "sanei_scsi.c" 3 4
+     ((void) sizeof ((
+# 6163 "sanei_scsi.c"
+     src_size == cmd_size
+# 6163 "sanei_scsi.c" 3 4
+     ) ? 1 : 0), __extension__ ({ if (
+# 6163 "sanei_scsi.c"
+     src_size == cmd_size
+# 6163 "sanei_scsi.c" 3 4
+     ) ; else __assert_fail (
+# 6163 "sanei_scsi.c"
+     "src_size == cmd_size"
+# 6163 "sanei_scsi.c" 3 4
+     , "sanei_scsi.c", 6163, __extension__ __PRETTY_FUNCTION__); }))
+# 6163 "sanei_scsi.c"
+                                  ;
+    else
+      
+# 6165 "sanei_scsi.c" 3 4
+     ((void) sizeof ((
+# 6165 "sanei_scsi.c"
+     src_size >= cmd_size
+# 6165 "sanei_scsi.c" 3 4
+     ) ? 1 : 0), __extension__ ({ if (
+# 6165 "sanei_scsi.c"
+     src_size >= cmd_size
+# 6165 "sanei_scsi.c" 3 4
+     ) ; else __assert_fail (
+# 6165 "sanei_scsi.c"
+     "src_size >= cmd_size"
+# 6165 "sanei_scsi.c" 3 4
+     , "sanei_scsi.c", 6165, __extension__ __PRETTY_FUNCTION__); }))
+# 6165 "sanei_scsi.c"
+                                  ;
+
+    return sanei_scsi_cmd2 (fd, src, cmd_size,
+       (const char *) src + cmd_size,
+       src_size - cmd_size, dst, dst_size);
+  }
-- 
1.8.5.3

