/* Generated by CIL v. 1.3.5 */
/* print_CIL_Input is true */

//#line 10 "include//*asm*//posix_types.h"
typedef unsigned long __kernel_ino_t;
//#line 11 "include//*asm*//posix_types.h"
typedef unsigned short __kernel_mode_t;
//#line 13 "include//*asm*//posix_types.h"
typedef long __kernel_off_t;
//#line 14 "include//*asm*//posix_types.h"
typedef int __kernel_pid_t;
//#line 18 "include//*asm*//posix_types.h"
typedef unsigned int __kernel_size_t;
//#line 19 "include//*asm*//posix_types.h"
typedef int __kernel_ssize_t;
//#line 21 "include//*asm*//posix_types.h"
typedef long __kernel_time_t;
//#line 23 "include//*asm*//posix_types.h"
typedef long __kernel_clock_t;
//#line 24 "include//*asm*//posix_types.h"
typedef int __kernel_timer_t;
//#line 30 "include//*asm*//posix_types.h"
typedef unsigned int __kernel_uid32_t;
//#line 31 "include//*asm*//posix_types.h"
typedef unsigned int __kernel_gid32_t;
//#line 38 "include//*asm*//posix_types.h"
typedef long long __kernel_loff_t;
//#line 6 "include//*asm*//types.h"
typedef unsigned short umode_t;
//#line 13 "include//*asm*//types.h"
typedef signed char __s8;
//#line 14 "include//*asm*//types.h"
typedef unsigned char __u8;
//#line 16 "include//*asm*//types.h"
typedef short __s16;
//#line 17 "include//*asm*//types.h"
typedef unsigned short __u16;
//#line 19 "include//*asm*//types.h"
typedef int __s32;
//#line 20 "include//*asm*//types.h"
typedef unsigned int __u32;
//#line 23 "include//*asm*//types.h"
typedef long long __s64;
//#line 24 "include//*asm*//types.h"
typedef unsigned long long __u64;
//#line 41 "include//*asm*//types.h"
typedef unsigned char u8;
//#line 44 "include//*asm*//types.h"
typedef unsigned short u16;
//#line 47 "include//*asm*//types.h"
typedef unsigned int u32;
//#line 50 "include//*asm*//types.h"
typedef unsigned long long u64;
//#line 57 "include//*asm*//types.h"
typedef u32 dma_addr_t;
//#line 62 "include//*asm*//types.h"
typedef u64 sector_t;
//#line 18 "include/linux/types.h"
typedef __u32 __kernel_dev_t;
//#line 21 "include/linux/types.h"
typedef __kernel_dev_t dev_t;
//#line 22 "include/linux/types.h"
typedef __kernel_ino_t ino_t;
//#line 23 "include/linux/types.h"
typedef __kernel_mode_t mode_t;
//#line 25 "include/linux/types.h"
typedef __kernel_off_t off_t;
//#line 26 "include/linux/types.h"
typedef __kernel_pid_t pid_t;
//#line 30 "include/linux/types.h"
typedef __kernel_timer_t timer_t;
//#line 35 "include/linux/types.h"
typedef __kernel_uid32_t uid_t;
//#line 36 "include/linux/types.h"
typedef __kernel_gid32_t gid_t;
//#line 55 "include/linux/types.h"
typedef __kernel_loff_t loff_t;
//#line 64 "include/linux/types.h"
typedef __kernel_size_t size_t;
//#line 69 "include/linux/types.h"
typedef __kernel_ssize_t ssize_t;
//#line 79 "include/linux/types.h"
typedef __kernel_time_t time_t;
//#line 84 "include/linux/types.h"
typedef __kernel_clock_t clock_t;
//#line 169 "include/linux/types.h"
typedef unsigned int gfp_t;
//#line 49 "include/linux/kernel.h"
struct completion;
//#line 13 "include/linux/thread_info.h"
struct restart_block {
   long (*fn)(struct restart_block * ) ;
   unsigned long arg0 ;
   unsigned long arg1 ;
   unsigned long arg2 ;
   unsigned long arg3 ;
};
//#line 58 "include//*asm*//page.h"
struct __anonstruct_pgd_t_6 {
   unsigned long pgd ;
};
//#line 58 "include//*asm*//page.h"
typedef struct __anonstruct_pgd_t_6 pgd_t;
//#line 59 "include//*asm*//page.h"
struct __anonstruct_pgprot_t_7 {
   unsigned long pgprot ;
};
//#line 59 "include//*asm*//page.h"
typedef struct __anonstruct_pgprot_t_7 pgprot_t;
//#line 68 "include//*asm*//vm86.h"
struct vm86_regs {
   long ebx ;
   long ecx ;
   long edx ;
   long esi ;
   long edi ;
   long ebp ;
   long eax ;
   long __null_ds ;
   long __null_es ;
   long __null_fs ;
   long __null_gs ;
   long orig_eax ;
   long eip ;
   unsigned short cs ;
   unsigned short __csh ;
   long eflags ;
   long esp ;
   unsigned short ss ;
   unsigned short __ssh ;
   unsigned short es ;
   unsigned short __esh ;
   unsigned short ds ;
   unsigned short __dsh ;
   unsigned short fs ;
   unsigned short __fsh ;
   unsigned short gs ;
   unsigned short __gsh ;
};
//#line 98 "include//*asm*//vm86.h"
struct revectored_struct {
   unsigned long __map[8] ;
};
//#line 102 "include//*asm*//vm86.h"
struct vm86_struct {
   struct vm86_regs regs ;
   unsigned long flags ;
   unsigned long screen_bitmap ;
   unsigned long cpu_type ;
   struct revectored_struct int_revectored ;
   struct revectored_struct int21_revectored ;
};
//#line 173
struct pt_regs;
//#line 13 "include//*asm*//math_emu.h"
struct info {
   long ___orig_eip ;
   long ___ebx ;
   long ___ecx ;
   long ___edx ;
   long ___esi ;
   long ___edi ;
   long ___ebp ;
   long ___eax ;
   long ___ds ;
   long ___es ;
   long ___orig_eax ;
   long ___eip ;
   long ___cs ;
   long ___eflags ;
   long ___esp ;
   long ___ss ;
   long ___vm86_es ;
   long ___vm86_ds ;
   long ___vm86_fs ;
   long ___vm86_gs ;
};
//#line 12 "include//*asm*//system.h"
struct task_struct;
//#line 27 "include//*asm*//processor.h"
struct desc_struct {
   unsigned long a ;
   unsigned long b ;
};
//#line 334 "include//*asm*//processor.h"
struct i387_fsave_struct {
   long cwd ;
   long swd ;
   long twd ;
   long fip ;
   long fcs ;
   long foo ;
   long fos ;
   long st_space[20] ;
   long status ;
};
//#line 346 "include//*asm*//processor.h"
struct i387_fxsave_struct {
   unsigned short cwd ;
   unsigned short swd ;
   unsigned short twd ;
   unsigned short fop ;
   long fip ;
   long fcs ;
   long foo ;
   long fos ;
   long mxcsr ;
   long mxcsr_mask ;
   long st_space[32] ;
   long xmm_space[32] ;
   long padding[56] ;
} /*__attribute__((__aligned__(16)))*/ ;
//#line 362 "include//*asm*//processor.h"
struct i387_soft_struct {
   long cwd ;
   long swd ;
   long twd ;
   long fip ;
   long fcs ;
   long foo ;
   long fos ;
   long st_space[20] ;
   unsigned char ftop ;
   unsigned char changed ;
   unsigned char lookahead ;
   unsigned char no_update ;
   unsigned char rm ;
   unsigned char alimit ;
   struct info *info ;
   unsigned long entry_eip ;
};
//#line 376 "include//*asm*//processor.h"
union i387_union {
   struct i387_fsave_struct fsave ;
   struct i387_fxsave_struct fxsave ;
   struct i387_soft_struct soft ;
};
//#line 382 "include//*asm*//processor.h"
struct __anonstruct_mm_segment_t_8 {
   unsigned long seg ;
};
//#line 382 "include//*asm*//processor.h"
typedef struct __anonstruct_mm_segment_t_8 mm_segment_t;
//#line 386
struct thread_struct;
//#line 436 "include//*asm*//processor.h"
struct thread_struct {
   struct desc_struct tls_array[3] ;
   unsigned long esp0 ;
   unsigned long sysenter_cs ;
   unsigned long eip ;
   unsigned long esp ;
   unsigned long fs ;
   unsigned long gs ;
   unsigned long debugreg[8] ;
   unsigned long cr2 ;
   unsigned long trap_no ;
   unsigned long error_code ;
   union i387_union i387 ;
   struct vm86_struct *vm86_info ;
   unsigned long screen_bitmap ;
   unsigned long v86flags ;
   unsigned long v86mask ;
   unsigned long saved_esp0 ;
   unsigned int saved_fs ;
   unsigned int saved_gs ;
   unsigned long *io_bitmap_ptr ;
   unsigned long iopl ;
   unsigned long io_bitmap_max ;
};
//#line 533
struct mm_struct;
//#line 28 "include//*asm*//thread_info.h"
struct exec_domain;
//#line 28 "include//*asm*//thread_info.h"
struct thread_info {
   struct task_struct *task ;
   struct exec_domain *exec_domain ;
   unsigned long flags ;
   unsigned long status ;
   __u32 cpu ;
   int preempt_count ;
   mm_segment_t addr_limit ;
   struct restart_block restart_block ;
   unsigned long previous_esp ;
   __u8 supervisor_stack[1]/*[0]*/;
};
//#line 8 "include//*asm*//spinlock_types.h"
struct __anonstruct_raw_spinlock_t_9 {
   unsigned int volatile   slock ;
};
//#line 8 "include//*asm*//spinlock_types.h"
typedef struct __anonstruct_raw_spinlock_t_9 raw_spinlock_t;
//#line 14 "include//*asm*//spinlock_types.h"
struct __anonstruct_raw_rwlock_t_10 {
   unsigned int volatile   lock ;
};
//#line 14 "include//*asm*//spinlock_types.h"
typedef struct __anonstruct_raw_rwlock_t_10 raw_rwlock_t;
//#line 18 "include/linux/spinlock_types.h"
struct __anonstruct_spinlock_t_11 {
   raw_spinlock_t raw_lock ;
   unsigned int magic ;
   unsigned int owner_cpu ;
   void *owner ;
};
//#line 18 "include/linux/spinlock_types.h"
typedef struct __anonstruct_spinlock_t_11 spinlock_t;
//#line 31 "include/linux/spinlock_types.h"
struct __anonstruct_rwlock_t_12 {
   raw_rwlock_t raw_lock ;
   unsigned int magic ;
   unsigned int owner_cpu ;
   void *owner ;
};
//#line 31 "include/linux/spinlock_types.h"
typedef struct __anonstruct_rwlock_t_12 rwlock_t;
//#line 24 "include//*asm*//atomic.h"
struct __anonstruct_atomic_t_13 {
   int volatile   counter ;
};
//#line 24 "include//*asm*//atomic.h"
typedef struct __anonstruct_atomic_t_13 atomic_t;
//#line 57 "include/linux/capability.h"
typedef __u32 kernel_cap_t;
//#line 105 "include/linux/seqlock.h"
struct seqcount {
   unsigned int sequence ;
};
//#line 105 "include/linux/seqlock.h"
typedef struct seqcount seqcount_t;
//#line 12 "include/linux/time.h"
struct timespec {
   time_t tv_sec ;
   long tv_nsec ;
};
//#line 100 "include/linux/rbtree.h"
struct rb_node {
   struct rb_node *rb_parent ;
   int rb_color ;
   struct rb_node *rb_right ;
   struct rb_node *rb_left ;
};
//#line 110 "include/linux/rbtree.h"
struct rb_root {
   struct rb_node *rb_node ;
};
//#line 85 "include/linux/cpumask.h"
struct __anonstruct_cpumask_t_15 {
   unsigned long bits[1] ;
};
//#line 85 "include/linux/cpumask.h"
typedef struct __anonstruct_cpumask_t_15 cpumask_t;
//#line 85 "include/linux/nodemask.h"
struct __anonstruct_nodemask_t_16 {
   unsigned long bits[1] ;
};
//#line 85 "include/linux/nodemask.h"
typedef struct __anonstruct_nodemask_t_16 nodemask_t;
//#line 28 "include/linux/list.h"
struct list_head {
   struct list_head *next ;
   struct list_head *prev ;
};
//#line 509
struct hlist_node;
//#line 509 "include/linux/list.h"
struct hlist_head {
   struct hlist_node *first ;
};
//#line 513 "include/linux/list.h"
struct hlist_node {
   struct hlist_node *next ;
   struct hlist_node **pprev ;
};
//#line 29 "include/linux/wait.h"
struct __wait_queue;
//#line 29 "include/linux/wait.h"
typedef struct __wait_queue wait_queue_t;
//#line 33 "include/linux/wait.h"
struct __wait_queue {
   unsigned int flags ;
   void *private ;
   int (*func)(wait_queue_t *wait , unsigned int mode , int sync , void *key ) ;
   struct list_head task_list ;
};
//#line 51 "include/linux/wait.h"
struct __wait_queue_head {
   spinlock_t lock ;
   struct list_head task_list ;
};
//#line 55 "include/linux/wait.h"
typedef struct __wait_queue_head wait_queue_head_t;
//#line 22 "include/linux/rwsem.h"
struct rw_semaphore;
//#line 54 "include//*asm*//rwsem.h"
struct rw_semaphore {
   long count ;
   spinlock_t wait_lock ;
   struct list_head wait_list ;
};
//#line 44 "include//*asm*//semaphore.h"
struct semaphore {
   atomic_t count ;
   int sleepers ;
   wait_queue_head_t wait ;
};
//#line 26 "include//*asm*//ptrace.h"
struct pt_regs {
   long ebx ;
   long ecx ;
   long edx ;
   long esi ;
   long edi ;
   long ebp ;
   long eax ;
   int xds ;
   int xes ;
   long orig_eax ;
   long eip ;
   int xcs ;
   long eflags ;
   long esp ;
   int xss ;
};
//#line 11 "include//*asm*//mmu.h"
struct __anonstruct_mm_context_t_17 {
   int size ;
   struct semaphore sem ;
   void *ldt ;
};
//#line 11 "include//*asm*//mmu.h"
typedef struct __anonstruct_mm_context_t_17 mm_context_t;
//#line 7 "include//*asm*/-generic/cputime.h"
typedef unsigned long cputime_t;
//#line 187 "include/linux/pm.h"
struct device;
//#line 189 "include/linux/pm.h"
struct pm_message {
   int event ;
};
//#line 189 "include/linux/pm.h"
typedef struct pm_message pm_message_t;
//#line 220 "include/linux/pm.h"
struct dev_pm_info {
   pm_message_t power_state ;
   pm_message_t prev_state ;
   void *saved_state ;
   atomic_t pm_users ;
   struct device *pm_parent ;
   struct list_head entry ;
};
//#line 24 "include/linux/sem.h"
struct sem_undo;
//#line 119 "include/linux/sem.h"
struct sem_undo {
   struct sem_undo *proc_next ;
   struct sem_undo *id_next ;
   int semid ;
   short *semadj ;
};
//#line 129 "include/linux/sem.h"
struct sem_undo_list {
   atomic_t refcnt ;
   spinlock_t lock ;
   struct sem_undo *proc_list ;
};
//#line 135 "include/linux/sem.h"
struct sysv_sem {
   struct sem_undo_list *undo_list ;
};
//#line 10 "include//*asm*//signal.h"
struct siginfo;
//#line 22 "include//*asm*//signal.h"
struct __anonstruct_sigset_t_72 {
   unsigned long sig[2] ;
};
//#line 22 "include//*asm*//signal.h"
typedef struct __anonstruct_sigset_t_72 sigset_t;
//#line 12 "include//*asm*/-generic/signal.h"
typedef void __signalfn_t(int  );
//#line 13 "include//*asm*/-generic/signal.h"
typedef __signalfn_t *__sighandler_t;
//#line 15 "include//*asm*/-generic/signal.h"
typedef void __restorefn_t(void);
//#line 16 "include//*asm*/-generic/signal.h"
typedef __restorefn_t *__sigrestore_t;
//#line 123 "include//*asm*//signal.h"
struct sigaction {
   __sighandler_t sa_handler ;
   unsigned long sa_flags ;
   __sigrestore_t sa_restorer ;
   sigset_t sa_mask ;
};
//#line 130 "include//*asm*//signal.h"
struct k_sigaction {
   struct sigaction sa ;
};
//#line 7 "include//*asm*/-generic/siginfo.h"
union sigval {
   int sival_int ;
   void *sival_ptr ;
};
//#line 7 "include//*asm*/-generic/siginfo.h"
typedef union sigval sigval_t;
//#line 40 "include//*asm*/-generic/siginfo.h"
struct __anonstruct__kill_74 {
   pid_t _pid ;
   uid_t _uid ;
};
//#line 40 "include//*asm*/-generic/siginfo.h"
struct __anonstruct__timer_75 {
   timer_t _tid ;
   int _overrun ;
//   char _pad[(int )(/*xxxjmorsesizeof(uid_t ) - sizeof(int )*/0)] ;
   sigval_t _sigval ;
   int _sys_private ;
};
//#line 40 "include//*asm*/-generic/siginfo.h"
struct __anonstruct__rt_76 {
   pid_t _pid ;
   uid_t _uid ;
   sigval_t _sigval ;
};
//#line 40 "include//*asm*/-generic/siginfo.h"
struct __anonstruct__sigchld_77 {
   pid_t _pid ;
   uid_t _uid ;
   int _status ;
   clock_t _utime ;
   clock_t _stime ;
};
//#line 40 "include//*asm*/-generic/siginfo.h"
struct __anonstruct__sigfault_78 {
   void *_addr ;
};
//#line 40 "include//*asm*/-generic/siginfo.h"
struct __anonstruct__sigpoll_79 {
   long _band ;
   int _fd ;
};
//#line 40 "include//*asm*/-generic/siginfo.h"
union __anonunion__sifields_73 {
   int _pad[(int )((128U - 3U * sizeof(int )) / sizeof(int ))] ;
   struct __anonstruct__kill_74 _kill ;
   struct __anonstruct__timer_75 _timer ;
   struct __anonstruct__rt_76 _rt ;
   struct __anonstruct__sigchld_77 _sigchld ;
   struct __anonstruct__sigfault_78 _sigfault ;
   struct __anonstruct__sigpoll_79 _sigpoll ;
};
//#line 40 "include//*asm*/-generic/siginfo.h"
struct siginfo {
   int si_signo ;
   int si_errno ;
   int si_code ;
   union __anonunion__sifields_73 _sifields ;
};
//#line 40 "include//*asm*/-generic/siginfo.h"
typedef struct siginfo siginfo_t;
//#line 26 "include/linux/signal.h"
struct user_struct;
//#line 37 "include/linux/signal.h"
struct sigpending {
   struct list_head list ;
   sigset_t signal ;
};
//#line 4 "include/linux/fs_struct.h"
struct dentry;
//#line 5
struct vfsmount;
//#line 7 "include/linux/fs_struct.h"
struct fs_struct {
   atomic_t count ;
   rwlock_t lock ;
   int umask ;
   struct dentry *root ;
   struct dentry *pwd ;
   struct dentry *altroot ;
   struct vfsmount *rootmnt ;
   struct vfsmount *pwdmnt ;
   struct vfsmount *altrootmnt ;
};
//#line 13 "include/linux/completion.h"
struct completion {
   unsigned int done ;
   wait_queue_head_t wait ;
};
//#line 13 "include/linux/pid.h"
struct pid {
   int nr ;
   struct hlist_node pid_chain ;
   struct list_head pid_list ;
};
//#line 12 "include/linux/slab.h"
struct kmem_cache_s;
//#line 12 "include/linux/slab.h"
typedef struct kmem_cache_s kmem_cache_t;
//#line 117 "include/linux/mmzone.h"
struct page;
//#line 400
struct file;
//#line 9 "include/linux/gfp.h"
struct vm_area_struct;
//#line 71 "include/linux/slab.h"
struct cache_sizes {
   size_t cs_size ;
   kmem_cache_t *cs_cachep ;
   kmem_cache_t *cs_dmacachep ;
};
//#line 13 "include/linux/seccomp.h"
struct __anonstruct_seccomp_t_82 {
   int mode ;
};
//#line 13 "include/linux/seccomp.h"
typedef struct __anonstruct_seccomp_t_82 seccomp_t;
//#line 40 "include/linux/resource.h"
struct rlimit {
   unsigned long rlim_cur ;
   unsigned long rlim_max ;
};
//#line 9 "include/linux/timer.h"
struct timer_base_s;
//#line 11 "include/linux/timer.h"
struct timer_list {
   struct list_head entry ;
   unsigned long expires ;
   unsigned long magic ;
   void (*function)(unsigned long  ) ;
   unsigned long data ;
   struct timer_base_s *base ;
};
//#line 179 "include/linux/sched.h"
typedef struct task_struct task_t;
//#line 233
struct namespace;
//#line 12 "include/linux/workqueue.h"
struct workqueue_struct;
//#line 14 "include/linux/workqueue.h"
struct work_struct {
   unsigned long pending ;
   struct list_head entry ;
   void (*func)(void * ) ;
   void *data ;
   void *wq_data ;
   struct timer_list timer ;
};
//#line 47 "include/linux/aio_abi.h"
struct io_event {
   __u64 data ;
   __u64 obj ;
   __s64 res ;
   __s64 res2 ;
};
//#line 13 "include/linux/aio.h"
struct kioctx;
//#line 85 "include/linux/aio.h"
union __anonunion_ki_obj_84 {
   void *user ;
   struct task_struct *tsk ;
};
//#line 85 "include/linux/aio.h"
struct kiocb {
   struct list_head ki_run_list ;
   long ki_flags ;
   int ki_users ;
   unsigned int ki_key ;
   struct file *ki_filp ;
   struct kioctx *ki_ctx ;
   int (*ki_cancel)(struct kiocb * , struct io_event * ) ;
   ssize_t (*ki_retry)(struct kiocb * ) ;
   void (*ki_dtor)(struct kiocb * ) ;
   struct list_head ki_list ;
   union __anonunion_ki_obj_84 ki_obj ;
   __u64 ki_user_data ;
   loff_t ki_pos ;
   unsigned short ki_opcode ;
   size_t ki_nbytes ;
   char *ki_buf ;
   size_t ki_left ;
   wait_queue_t ki_wait ;
   long ki_retried ;
   long ki_kicked ;
   long ki_queued ;
   void *private ;
};
//#line 156 "include/linux/aio.h"
struct aio_ring_info {
   unsigned long mmap_base ;
   unsigned long mmap_size ;
   struct page **ring_pages ;
   spinlock_t ring_lock ;
   long nr_pages ;
   unsigned int nr ;
   unsigned int tail ;
   struct page *internal_pages[8] ;
};
//#line 169 "include/linux/aio.h"
struct kioctx {
   atomic_t users ;
   int dead ;
   struct mm_struct *mm ;
   unsigned long user_id ;
   struct kioctx *next ;
   wait_queue_head_t wait ;
   spinlock_t ctx_lock ;
   int reqs_active ;
   struct list_head active_reqs ;
   struct list_head run_list ;
   unsigned int max_reqs ;
   struct aio_ring_info ring_info ;
   struct work_struct wq ;
};
//#line 257 "include/linux/sched.h"
typedef unsigned long mm_counter_t;
//#line 259 "include/linux/sched.h"
struct mm_struct {
   struct vm_area_struct *mmap ;
   struct rb_root mm_rb ;
   struct vm_area_struct *mmap_cache ;
   unsigned long (*get_unmapped_area)(struct file *filp , unsigned long addr , unsigned long len ,
                                      unsigned long pgoff , unsigned long flags ) ;
   void (*unmap_area)(struct mm_struct *mm , unsigned long addr ) ;
   unsigned long mmap_base ;
   unsigned long cached_hole_size ;
   unsigned long free_area_cache ;
   pgd_t *pgd ;
   atomic_t mm_users ;
   atomic_t mm_count ;
   int map_count ;
   struct rw_semaphore mmap_sem ;
   spinlock_t page_table_lock ;
   struct list_head mmlist ;
   unsigned long start_code ;
   unsigned long end_code ;
   unsigned long start_data ;
   unsigned long end_data ;
   unsigned long start_brk ;
   unsigned long brk ;
   unsigned long start_stack ;
   unsigned long arg_start ;
   unsigned long arg_end ;
   unsigned long env_start ;
   unsigned long env_end ;
   unsigned long total_vm ;
   unsigned long locked_vm ;
   unsigned long shared_vm ;
   unsigned long exec_vm ;
   unsigned long stack_vm ;
   unsigned long reserved_vm ;
   unsigned long def_flags ;
   unsigned long nr_ptes ;
   mm_counter_t _rss ;
   mm_counter_t _anon_rss ;
   unsigned long saved_auxv[42] ;
   unsigned int dumpable : 2 ;
   cpumask_t cpu_vm_mask ;
   mm_context_t context ;
   unsigned long swap_token_time ;
   char recent_pagein ;
   int core_waiters ;
   struct completion *core_startup_done ;
   struct completion core_done ;
   rwlock_t ioctx_list_lock ;
   struct kioctx *ioctx_list ;
   struct kioctx default_kioctx ;
   unsigned long hiwater_rss ;
   unsigned long hiwater_vm ;
};
//#line 318 "include/linux/sched.h"
struct sighand_struct {
   atomic_t count ;
   struct k_sigaction action[64] ;
   spinlock_t siglock ;
};
//#line 331
struct tty_struct;
//#line 331
struct key;
//#line 331 "include/linux/sched.h"
struct signal_struct {
   atomic_t count ;
   atomic_t live ;
   wait_queue_head_t wait_chldexit ;
   task_t *curr_target ;
   struct sigpending shared_pending ;
   int group_exit_code ;
   struct task_struct *group_exit_task ;
   int notify_count ;
   int group_stop_count ;
   unsigned int flags ;
   struct list_head posix_timers ;
   struct timer_list real_timer ;
   unsigned long it_real_value ;
   unsigned long it_real_incr ;
   cputime_t it_prof_expires ;
   cputime_t it_virt_expires ;
   cputime_t it_prof_incr ;
   cputime_t it_virt_incr ;
   pid_t pgrp ;
   pid_t tty_old_pgrp ;
   pid_t session ;
   int leader ;
   struct tty_struct *tty ;
   cputime_t utime ;
   cputime_t stime ;
   cputime_t cutime ;
   cputime_t cstime ;
   unsigned long nvcsw ;
   unsigned long nivcsw ;
   unsigned long cnvcsw ;
   unsigned long cnivcsw ;
   unsigned long min_flt ;
   unsigned long maj_flt ;
   unsigned long cmin_flt ;
   unsigned long cmaj_flt ;
   unsigned long long sched_time ;
   struct rlimit rlim[15] ;
   struct list_head cpu_timers[3] ;
   struct key *session_keyring ;
   struct key *process_keyring ;
};
//#line 453 "include/linux/sched.h"
struct user_struct {
   atomic_t __count ;
   atomic_t processes ;
   atomic_t files ;
   atomic_t sigpending ;
   atomic_t inotify_watches ;
   atomic_t inotify_devs ;
   unsigned long mq_bytes ;
   unsigned long locked_shm ;
   struct key *uid_keyring ;
   struct key *session_keyring ;
   struct list_head uidhash_list ;
   uid_t uid ;
};
//#line 481
struct prio_array;
//#line 481 "include/linux/sched.h"
typedef struct prio_array prio_array_t;
//#line 482
struct backing_dev_info;
//#line 483
struct reclaim_state;
//#line 486 "include/linux/sched.h"
struct sched_info {
   unsigned long cpu_time ;
   unsigned long run_delay ;
   unsigned long pcnt ;
   unsigned long last_arrival ;
   unsigned long last_queued ;
};
//#line 497
struct file_operations;
//#line 596
struct io_context;
//#line 598
struct cpuset;
//#line 602 "include/linux/sched.h"
struct group_info {
   int ngroups ;
   atomic_t usage ;
   gid_t small_block[32] ;
   int nblocks ;
   gid_t *blocks[1]/*[0]*/;
};
//#line 639
struct audit_context;
//#line 642
struct linux_binfmt;
//#line 642
struct files_struct;
//#line 642 "include/linux/sched.h"
struct task_struct {
   long volatile   state ;
   struct thread_info *thread_info ;
   atomic_t usage ;
   unsigned long flags ;
   unsigned long ptrace ;
   int lock_depth ;
   int prio ;
   int static_prio ;
   struct list_head run_list ;
   prio_array_t *array ;
   unsigned short ioprio ;
   unsigned long sleep_avg ;
   unsigned long long timestamp ;
   unsigned long long last_ran ;
   unsigned long long sched_time ;
   int activated ;
   unsigned long policy ;
   cpumask_t cpus_allowed ;
   unsigned int time_slice ;
   unsigned int first_time_slice ;
   struct sched_info sched_info ;
   struct list_head tasks ;
   struct list_head ptrace_children ;
   struct list_head ptrace_list ;
   struct mm_struct *mm ;
   struct mm_struct *active_mm ;
   struct linux_binfmt *binfmt ;
   long exit_state ;
   int exit_code ;
   int exit_signal ;
   int pdeath_signal ;
   unsigned long personality ;
   unsigned int did_exec : 1 ;
   pid_t pid ;
   pid_t tgid ;
   struct task_struct *real_parent ;
   struct task_struct *parent ;
   struct list_head children ;
   struct list_head sibling ;
   struct task_struct *group_leader ;
   struct pid pids[4] ;
   struct completion *vfork_done ;
   int *set_child_tid ;
   int *clear_child_tid ;
   unsigned long rt_priority ;
   cputime_t utime ;
   cputime_t stime ;
   unsigned long nvcsw ;
   unsigned long nivcsw ;
   struct timespec start_time ;
   unsigned long min_flt ;
   unsigned long maj_flt ;
   cputime_t it_prof_expires ;
   cputime_t it_virt_expires ;
   unsigned long long it_sched_expires ;
   struct list_head cpu_timers[3] ;
   uid_t uid ;
   uid_t euid ;
   uid_t suid ;
   uid_t fsuid ;
   gid_t gid ;
   gid_t egid ;
   gid_t sgid ;
   gid_t fsgid ;
   struct group_info *group_info ;
   kernel_cap_t cap_effective ;
   kernel_cap_t cap_inheritable ;
   kernel_cap_t cap_permitted ;
   unsigned int keep_capabilities : 1 ;
   struct user_struct *user ;
   struct key *thread_keyring ;
   unsigned char jit_keyring ;
   int oomkilladj ;
   char comm[16] ;
   int link_count ;
   int total_link_count ;
   struct sysv_sem sysvsem ;
   struct thread_struct thread ;
   struct fs_struct *fs ;
   struct files_struct *files ;
   struct namespace *namespace ;
   struct signal_struct *signal ;
   struct sighand_struct *sighand ;
   sigset_t blocked ;
   sigset_t real_blocked ;
   struct sigpending pending ;
   unsigned long sas_ss_sp ;
   size_t sas_ss_size ;
   int (*notifier)(void *priv ) ;
   void *notifier_data ;
   sigset_t *notifier_mask ;
   void *security ;
   struct audit_context *audit_context ;
   seccomp_t seccomp ;
   u32 parent_exec_id ;
   u32 self_exec_id ;
   spinlock_t alloc_lock ;
   spinlock_t proc_lock ;
   void *journal_info ;
   struct reclaim_state *reclaim_state ;
   struct dentry *proc_dentry ;
   struct backing_dev_info *backing_dev_info ;
   struct io_context *io_context ;
   unsigned long ptrace_message ;
   siginfo_t *last_siginfo ;
   wait_queue_t *io_wait ;
   u64 rchar ;
   u64 wchar ;
   u64 syscr ;
   u64 syscw ;
   u64 acct_rss_mem1 ;
   u64 acct_vm_mem1 ;
   clock_t acct_stimexpd ;
   struct cpuset *cpuset ;
   nodemask_t mems_allowed ;
   int cpuset_mems_generation ;
   atomic_t fs_excl ;
};
//#line 59 "include/linux/stat.h"
struct kstat {
   unsigned long ino ;
   dev_t dev ;
   umode_t mode ;
   unsigned int nlink ;
   uid_t uid ;
   gid_t gid ;
   dev_t rdev ;
   loff_t size ;
   struct timespec atime ;
   struct timespec mtime ;
   struct timespec ctime ;
   unsigned long blksize ;
   unsigned long blocks ;
};
//#line 16 "include/linux/elf.h"
typedef __u32 Elf32_Addr;
//#line 17 "include/linux/elf.h"
typedef __u16 Elf32_Half;
//#line 20 "include/linux/elf.h"
typedef __u32 Elf32_Word;
//#line 207 "include/linux/elf.h"
struct elf32_sym {
   Elf32_Word st_name ;
   Elf32_Addr st_value ;
   Elf32_Word st_size ;
   unsigned char st_info ;
   unsigned char st_other ;
   Elf32_Half st_shndx ;
};
//#line 207 "include/linux/elf.h"
typedef struct elf32_sym Elf32_Sym;
//#line 15 "include/linux/sysfs.h"
struct kobject;
//#line 16
struct module;
//#line 18 "include/linux/sysfs.h"
struct attribute {
   char const   *name ;
   struct module *owner ;
   mode_t mode ;
};
//#line 24 "include/linux/sysfs.h"
struct attribute_group {
   char const   *name ;
   struct attribute **attrs ;
};
//#line 53 "include/linux/sysfs.h"
struct bin_attribute {
   struct attribute attr ;
   size_t size ;
   void *private ;
   ssize_t (*read)(struct kobject * , char * , loff_t  , size_t  ) ;
   ssize_t (*write)(struct kobject * , char * , loff_t  , size_t  ) ;
   int (*mmap)(struct kobject * , struct bin_attribute *attr , struct vm_area_struct *vma ) ;
};
//#line 63 "include/linux/sysfs.h"
struct sysfs_ops {
   ssize_t (*show)(struct kobject * , struct attribute * , char * ) ;
   ssize_t (*store)(struct kobject * , struct attribute * , char const   * , size_t  ) ;
};
//#line 68
struct iattr;
//#line 23 "include/linux/kref.h"
struct kref {
   atomic_t refcount ;
};
//#line 35 "include/linux/kobject.h"
struct kset;
//#line 35
struct kobj_type;
//#line 35 "include/linux/kobject.h"
struct kobject {
   char const   *k_name ;
   char name[20] ;
   struct kref kref ;
   struct list_head entry ;
   struct kobject *parent ;
   struct kset *kset ;
   struct kobj_type *ktype ;
   struct dentry *dentry ;
};
//#line 70 "include/linux/kobject.h"
struct kobj_type {
   void (*release)(struct kobject * ) ;
   struct sysfs_ops *sysfs_ops ;
   struct attribute **default_attrs ;
};
//#line 95 "include/linux/kobject.h"
struct kset_hotplug_ops {
   int (*filter)(struct kset *kset , struct kobject *kobj ) ;
   char const   *(*name)(struct kset *kset , struct kobject *kobj ) ;
   int (*hotplug)(struct kset *kset , struct kobject *kobj , char **envp , int num_envp ,
                  char *buffer , int buffer_size ) ;
};
//#line 102
struct subsystem;
//#line 102 "include/linux/kobject.h"
struct kset {
   struct subsystem *subsys ;
   struct kobj_type *ktype ;
   struct list_head list ;
   spinlock_t list_lock ;
   struct kobject kobj ;
   struct kset_hotplug_ops *hotplug_ops ;
};
//#line 151 "include/linux/kobject.h"
struct subsystem {
   struct kset kset ;
   struct rw_semaphore rwsem ;
};
//#line 6 "include//*asm*//local.h"
struct __anonstruct_local_t_89 {
   unsigned long volatile   counter ;
};
//#line 6 "include//*asm*//local.h"
typedef struct __anonstruct_local_t_89 local_t;
//#line 5 "include//*asm*//module.h"
struct mod_arch_specific { int tmp; };
//#line 35 "include/linux/module.h"
struct kernel_symbol {
   unsigned long value ;
   char const   *name ;
};
//#line 49 "include/linux/module.h"
struct module_attribute {
   struct attribute attr ;
   ssize_t (*show)(struct module_attribute * , struct module * , char * ) ;
   ssize_t (*store)(struct module_attribute * , struct module * , char const   * ,
                    size_t count ) ;
   void (*setup)(struct module * , char const   * ) ;
   int (*test)(struct module * ) ;
   void (*free)(struct module * ) ;
};
//#line 59 "include/linux/module.h"
struct module_kobject {
   struct kobject kobj ;
   struct module *mod ;
};
//#line 70
struct exception_table_entry;
//#line 203 "include/linux/module.h"
struct module_ref {
   local_t count ;
} /*__attribute__((__aligned__((1) <<  (7) )))*/ ;
//#line 208
enum module_state {
    MODULE_STATE_LIVE = 0,
    MODULE_STATE_COMING = 1,
    MODULE_STATE_GOING = 2
} ;
//#line 217 "include/linux/module.h"
struct module_sect_attr {
   struct module_attribute mattr ;
   char name[32] ;
   unsigned long address ;
};
//#line 224 "include/linux/module.h"
struct module_sect_attrs {
   struct attribute_group grp ;
   struct module_sect_attr attrs[1]/*[0]*/;
};
//#line 230
struct module_param_attrs;
//#line 232 "include/linux/module.h"
struct module {
   enum module_state state ;
   struct list_head list ;
   char name[(int )(64U - sizeof(unsigned long ))] ;
   struct module_kobject mkobj ;
   struct module_param_attrs *param_attrs ;
   char const   *version ;
   char const   *srcversion ;
   struct kernel_symbol  const  *syms ;
   unsigned int num_syms ;
   unsigned long const   *crcs ;
   struct kernel_symbol  const  *gpl_syms ;
   unsigned int num_gpl_syms ;
   unsigned long const   *gpl_crcs ;
   unsigned int num_exentries ;
   struct exception_table_entry  const  *extable ;
   int (*init)(void) ;
   void *module_init ;
   void *module_core ;
   unsigned long init_size ;
   unsigned long core_size ;
   unsigned long init_text_size ;
   unsigned long core_text_size ;
   struct mod_arch_specific arch ;
   int unsafe ;
   int license_gplok ;
   struct module_ref ref[8] ;
   struct list_head modules_which_use_me ;
   struct task_struct *waiter ;
   void (*exit)(void) ;
   Elf32_Sym *symtab ;
   unsigned long num_symtab ;
   char *strtab ;
   struct module_sect_attrs *sect_attrs ;
   void *percpu ;
   char *args ;
};
//#line 437
struct device_driver;
//#line 12 "include/linux/mod_devicetable.h"
typedef unsigned long kernel_ulong_t;
//#line 17 "include/linux/mod_devicetable.h"
struct pci_device_id {
   __u32 vendor ;
   __u32 device ;
   __u32 subvendor ;
   __u32 subdevice ;
   __u32 class ;
   __u32 class_mask ;
   kernel_ulong_t driver_data ;
};
//#line 16 "include/linux/ioport.h"
struct resource {
   char const   *name ;
   unsigned long start ;
   unsigned long end ;
   unsigned long flags ;
   struct resource *parent ;
   struct resource *sibling ;
   struct resource *child ;
};
//#line 23
struct pci_dev;
//#line 20 "include/linux/klist.h"
struct klist_node;
//#line 21 "include/linux/klist.h"
struct klist {
   spinlock_t k_lock ;
   struct list_head k_list ;
   void (*get)(struct klist_node * ) ;
   void (*put)(struct klist_node * ) ;
};
//#line 32 "include/linux/klist.h"
struct klist_node {
   struct klist *n_klist ;
   struct list_head n_node ;
   struct kref n_ref ;
   struct completion n_removed ;
};
//#line 46 "include/linux/device.h"
struct class;
//#line 47
struct class_device;
//#line 49
struct bus_attribute;
//#line 49
struct device_attribute;
//#line 49
struct driver_attribute;
//#line 49 "include/linux/device.h"
struct bus_type {
   char const   *name ;
   struct subsystem subsys ;
   struct kset drivers ;
   struct kset devices ;
   struct klist klist_devices ;
   struct klist klist_drivers ;
   struct bus_attribute *bus_attrs ;
   struct device_attribute *dev_attrs ;
   struct driver_attribute *drv_attrs ;
   int (*match)(struct device *dev , struct device_driver *drv ) ;
   int (*hotplug)(struct device *dev , char **envp , int num_envp , char *buffer ,
                  int buffer_size ) ;
   int (*suspend)(struct device *dev , pm_message_t state ) ;
   int (*resume)(struct device *dev ) ;
};
//#line 92 "include/linux/device.h"
struct bus_attribute {
   struct attribute attr ;
   ssize_t (*show)(struct bus_type * , char *buf ) ;
   ssize_t (*store)(struct bus_type * , char const   *buf , size_t count ) ;
};
//#line 104 "include/linux/device.h"
struct device_driver {
   char const   *name ;
   struct bus_type *bus ;
   struct completion unloaded ;
   struct kobject kobj ;
   struct klist klist_devices ;
   struct klist_node knode_bus ;
   struct module *owner ;
   int (*probe)(struct device *dev ) ;
   int (*remove)(struct device *dev ) ;
   void (*shutdown)(struct device *dev ) ;
   int (*suspend)(struct device *dev , pm_message_t state , u32 level ) ;
   int (*resume)(struct device *dev , u32 level ) ;
};
//#line 133 "include/linux/device.h"
struct driver_attribute {
   struct attribute attr ;
   ssize_t (*show)(struct device_driver * , char *buf ) ;
   ssize_t (*store)(struct device_driver * , char const   *buf , size_t count ) ;
};
//#line 155
struct class_attribute;
//#line 155
struct class_device_attribute;
//#line 155 "include/linux/device.h"
struct class {
   char const   *name ;
   struct module *owner ;
   struct subsystem subsys ;
   struct list_head children ;
   struct list_head interfaces ;
   struct semaphore sem ;
   struct class_attribute *class_attrs ;
   struct class_device_attribute *class_dev_attrs ;
   int (*hotplug)(struct class_device *dev , char **envp , int num_envp , char *buffer ,
                  int buffer_size ) ;
   void (*release)(struct class_device *dev ) ;
   void (*class_release)(struct class *class ) ;
};
//#line 181 "include/linux/device.h"
struct class_attribute {
   struct attribute attr ;
   ssize_t (*show)(struct class * , char *buf ) ;
   ssize_t (*store)(struct class * , char const   *buf , size_t count ) ;
};
//#line 194 "include/linux/device.h"
struct class_device {
   struct list_head node ;
   struct kobject kobj ;
   struct class *class ;
   dev_t devt ;
   struct class_device_attribute *devt_attr ;
   struct device *dev ;
   void *class_data ;
   char class_id[20] ;
};
//#line 231 "include/linux/device.h"
struct class_device_attribute {
   struct attribute attr ;
   ssize_t (*show)(struct class_device * , char *buf ) ;
   ssize_t (*store)(struct class_device * , char const   *buf , size_t count ) ;
};
//#line 269
struct dma_coherent_mem;
//#line 269 "include/linux/device.h"
struct device {
   struct klist klist_children ;
   struct klist_node knode_parent ;
   struct klist_node knode_driver ;
   struct klist_node knode_bus ;
   struct device *parent ;
   struct kobject kobj ;
   char bus_id[20] ;
   struct semaphore sem ;
   struct bus_type *bus ;
   struct device_driver *driver ;
   void *driver_data ;
   void *platform_data ;
   void *firmware_data ;
   struct dev_pm_info power ;
   u64 *dma_mask ;
   u64 coherent_dma_mask ;
   struct list_head dma_pools ;
   struct dma_coherent_mem *dma_mem ;
   void (*release)(struct device *dev ) ;
};
//#line 348 "include/linux/device.h"
struct device_attribute {
   struct attribute attr ;
   ssize_t (*show)(struct device *dev , struct device_attribute *attr , char *buf ) ;
   ssize_t (*store)(struct device *dev , struct device_attribute *attr , char const   *buf ,
                    size_t count ) ;
};
//#line 71 "include/linux/pci.h"
typedef int pci_power_t;
//#line 84
struct pci_bus;
//#line 84
struct proc_dir_entry;
//#line 84
struct pci_driver;
//#line 84 "include/linux/pci.h"
struct pci_dev {
   struct list_head global_list ;
   struct list_head bus_list ;
   struct pci_bus *bus ;
   struct pci_bus *subordinate ;
   void *sysdata ;
   struct proc_dir_entry *procent ;
   unsigned int devfn ;
   unsigned short vendor ;
   unsigned short device ;
   unsigned short subsystem_vendor ;
   unsigned short subsystem_device ;
   unsigned int class ;
   u8 hdr_type ;
   u8 rom_base_reg ;
   struct pci_driver *driver ;
   u64 dma_mask ;
   pci_power_t current_state ;
   struct device dev ;
   unsigned short vendor_compatible[4] ;
   unsigned short device_compatible[4] ;
   int cfg_size ;
   unsigned int irq ;
   struct resource resource[12] ;
   unsigned int transparent : 1 ;
   unsigned int multifunction : 1 ;
   unsigned int is_enabled : 1 ;
   unsigned int is_busmaster : 1 ;
   unsigned int no_msi : 1 ;
   u32 saved_config_space[16] ;
   struct bin_attribute *rom_attr ;
   int rom_attr_enabled ;
   struct bin_attribute *res_attr[12] ;
};
//#line 165
struct pci_ops;
//#line 165 "include/linux/pci.h"
struct pci_bus {
   struct list_head node ;
   struct pci_bus *parent ;
   struct list_head children ;
   struct list_head devices ;
   struct pci_dev *self ;
   struct resource *resource[8] ;
   struct pci_ops *ops ;
   void *sysdata ;
   struct proc_dir_entry *procdir ;
   unsigned char number ;
   unsigned char primary ;
   unsigned char secondary ;
   unsigned char subordinate ;
   char name[48] ;
   unsigned short bridge_ctl ;
   unsigned short pad2 ;
   struct device *bridge ;
   struct class_device class_dev ;
   struct bin_attribute *legacy_io ;
   struct bin_attribute *legacy_mem ;
};
//#line 209 "include/linux/pci.h"
struct pci_ops {
   int (*read)(struct pci_bus *bus , unsigned int devfn , int where , int size , u32 *val ) ;
   int (*write)(struct pci_bus *bus , unsigned int devfn , int where , int size ,
                u32 val ) ;
};
//#line 228 "include/linux/pci.h"
struct pci_dynids {
   spinlock_t lock ;
   struct list_head list ;
   unsigned int use_driver_data : 1 ;
};
//#line 235 "include/linux/pci.h"
struct pci_driver {
   struct list_head node ;
   char *name ;
   struct module *owner ;
   struct pci_device_id  const  *id_table ;
   int (*probe)(struct pci_dev *dev , struct pci_device_id  const  *id ) ;
   void (*remove)(struct pci_dev *dev ) ;
   int (*suspend)(struct pci_dev *dev , pm_message_t state ) ;
   int (*resume)(struct pci_dev *dev ) ;
   int (*enable_wake)(struct pci_dev *dev , pci_power_t state , int enable ) ;
   void (*shutdown)(struct pci_dev *dev ) ;
   struct device_driver driver ;
   struct pci_dynids dynids ;
};
//#line 4 "include//*asm*//scatterlist.h"
struct scatterlist {
   struct page *page ;
   unsigned int offset ;
   dma_addr_t dma_address ;
   unsigned int length ;
};
//#line 14 "include/linux/prio_tree.h"
struct prio_tree_node;
//#line 14 "include/linux/prio_tree.h"
struct raw_prio_tree_node {
   struct prio_tree_node *left ;
   struct prio_tree_node *right ;
   struct prio_tree_node *parent ;
};
//#line 20 "include/linux/prio_tree.h"
struct prio_tree_node {
   struct prio_tree_node *left ;
   struct prio_tree_node *right ;
   struct prio_tree_node *parent ;
   unsigned long start ;
   unsigned long last ;
};
//#line 28 "include/linux/prio_tree.h"
struct prio_tree_root {
   struct prio_tree_node *prio_tree_node ;
   unsigned short index_bits ;
   unsigned short raw ;
};
//#line 30 "include/linux/interrupt.h"
typedef int irqreturn_t;
//#line 50 "include/linux/rcupdate.h"
struct rcu_head {
   struct rcu_head *next ;
   void (*func)(struct rcu_head *head ) ;
};
//#line 13 "include/linux/dcache.h"
struct nameidata;
//#line 34 "include/linux/dcache.h"
struct qstr {
   unsigned int hash ;
   unsigned int len ;
   unsigned char const   *name ;
};
//#line 79
struct dcookie_struct;
//#line 83
struct inode;
//#line 83
struct dentry_operations;
//#line 83
struct super_block;
//#line 83 "include/linux/dcache.h"
struct dentry {
   atomic_t d_count ;
   unsigned int d_flags ;
   spinlock_t d_lock ;
   struct inode *d_inode ;
   struct hlist_node d_hash ;
   struct dentry *d_parent ;
   struct qstr d_name ;
   struct list_head d_lru ;
   struct list_head d_child ;
   struct list_head d_subdirs ;
   struct list_head d_alias ;
   unsigned long d_time ;
   struct dentry_operations *d_op ;
   struct super_block *d_sb ;
   void *d_fsdata ;
   struct rcu_head d_rcu ;
   struct dcookie_struct *d_cookie ;
   int d_mounted ;
   unsigned char d_iname[36] ;
};
//#line 111 "include/linux/dcache.h"
struct dentry_operations {
   int (*d_revalidate)(struct dentry * , struct nameidata * ) ;
   int (*d_hash)(struct dentry * , struct qstr * ) ;
   int (*d_compare)(struct dentry * , struct qstr * , struct qstr * ) ;
   int (*d_delete)(struct dentry * ) ;
   void (*d_release)(struct dentry * ) ;
   void (*d_iput)(struct dentry * , struct inode * ) ;
};
//#line 25 "include/linux/radix-tree.h"
struct radix_tree_node;
//#line 25 "include/linux/radix-tree.h"
struct radix_tree_root {
   unsigned int height ;
   unsigned int gfp_mask ;
   struct radix_tree_node *rnode ;
};
//#line 224 "include/linux/fs.h"
struct iovec;
//#line 227
struct pipe_inode_info;
//#line 228
struct poll_table_struct;
//#line 229
struct kstatfs;
//#line 277 "include/linux/fs.h"
struct iattr {
   unsigned int ia_valid ;
   umode_t ia_mode ;
   uid_t ia_uid ;
   gid_t ia_gid ;
   loff_t ia_size ;
   struct timespec ia_atime ;
   struct timespec ia_mtime ;
   struct timespec ia_ctime ;
};
//#line 45 "include/linux/quota.h"
typedef __kernel_uid32_t qid_t;
//#line 46 "include/linux/quota.h"
typedef __u64 qsize_t;
//#line 106 "include/linux/quota.h"
struct if_dqblk {
   __u64 dqb_bhardlimit ;
   __u64 dqb_bsoftlimit ;
   __u64 dqb_curspace ;
   __u64 dqb_ihardlimit ;
   __u64 dqb_isoftlimit ;
   __u64 dqb_curinodes ;
   __u64 dqb_btime ;
   __u64 dqb_itime ;
   __u32 dqb_valid ;
};
//#line 127 "include/linux/quota.h"
struct if_dqinfo {
   __u64 dqi_bgrace ;
   __u64 dqi_igrace ;
   __u32 dqi_flags ;
   __u32 dqi_valid ;
};
//#line 52 "include/linux/dqblk_xfs.h"
struct fs_disk_quota {
   __s8 d_version ;
   __s8 d_flags ;
   __u16 d_fieldmask ;
   __u32 d_id ;
   __u64 d_blk_hardlimit ;
   __u64 d_blk_softlimit ;
   __u64 d_ino_hardlimit ;
   __u64 d_ino_softlimit ;
   __u64 d_bcount ;
   __u64 d_icount ;
   __s32 d_itimer ;
   __s32 d_btimer ;
   __u16 d_iwarns ;
   __u16 d_bwarns ;
   __s32 d_padding2 ;
   __u64 d_rtb_hardlimit ;
   __u64 d_rtb_softlimit ;
   __u64 d_rtbcount ;
   __s32 d_rtbtimer ;
   __u16 d_rtbwarns ;
   __s16 d_padding3 ;
   char d_padding4[8] ;
};
//#line 139 "include/linux/dqblk_xfs.h"
struct fs_qfilestat {
   __u64 qfs_ino ;
   __u64 qfs_nblks ;
   __u32 qfs_nextents ;
};
//#line 139 "include/linux/dqblk_xfs.h"
typedef struct fs_qfilestat fs_qfilestat_t;
//#line 145 "include/linux/dqblk_xfs.h"
struct fs_quota_stat {
   __s8 qs_version ;
   __u16 qs_flags ;
   __s8 qs_pad ;
   fs_qfilestat_t qs_uquota ;
   fs_qfilestat_t qs_gquota ;
   __u32 qs_incoredqs ;
   __s32 qs_btimelimit ;
   __s32 qs_itimelimit ;
   __s32 qs_rtbtimelimit ;
   __u16 qs_bwarnlimit ;
   __u16 qs_iwarnlimit ;
};
//#line 21 "include/linux/dqblk_v1.h"
struct v1_mem_dqinfo { int tmp; };
//#line 20 "include/linux/dqblk_v2.h"
struct v2_mem_dqinfo {
   unsigned int dqi_blocks ;
   unsigned int dqi_free_blk ;
   unsigned int dqi_free_entry ;
};
//#line 150 "include/linux/quota.h"
struct mem_dqblk {
   __u32 dqb_bhardlimit ;
   __u32 dqb_bsoftlimit ;
   qsize_t dqb_curspace ;
   __u32 dqb_ihardlimit ;
   __u32 dqb_isoftlimit ;
   __u32 dqb_curinodes ;
   time_t dqb_btime ;
   time_t dqb_itime ;
};
//#line 164
struct quota_format_type;
//#line 166 "include/linux/quota.h"
union __anonunion_u_96 {
   struct v1_mem_dqinfo v1_i ;
   struct v2_mem_dqinfo v2_i ;
};
//#line 166 "include/linux/quota.h"
struct mem_dqinfo {
   struct quota_format_type *dqi_format ;
   struct list_head dqi_dirty_list ;
   unsigned long dqi_flags ;
   unsigned int dqi_bgrace ;
   unsigned int dqi_igrace ;
   union __anonunion_u_96 u ;
};
//#line 213 "include/linux/quota.h"
struct dquot {
   struct hlist_node dq_hash ;
   struct list_head dq_inuse ;
   struct list_head dq_free ;
   struct list_head dq_dirty ;
   struct semaphore dq_lock ;
   atomic_t dq_count ;
   wait_queue_head_t dq_wait_unused ;
   struct super_block *dq_sb ;
   unsigned int dq_id ;
   loff_t dq_off ;
   unsigned long dq_flags ;
   short dq_type ;
   struct mem_dqblk dq_dqb ;
};
//#line 235 "include/linux/quota.h"
struct quota_format_ops {
   int (*check_quota_file)(struct super_block *sb , int type ) ;
   int (*read_file_info)(struct super_block *sb , int type ) ;
   int (*write_file_info)(struct super_block *sb , int type ) ;
   int (*free_file_info)(struct super_block *sb , int type ) ;
   int (*read_dqblk)(struct dquot *dquot ) ;
   int (*commit_dqblk)(struct dquot *dquot ) ;
   int (*release_dqblk)(struct dquot *dquot ) ;
};
//#line 246 "include/linux/quota.h"
struct dquot_operations {
   int (*initialize)(struct inode * , int  ) ;
   int (*drop)(struct inode * ) ;
   int (*alloc_space)(struct inode * , qsize_t  , int  ) ;
   int (*alloc_inode)(struct inode  const  * , unsigned long  ) ;
   int (*free_space)(struct inode * , qsize_t  ) ;
   int (*free_inode)(struct inode  const  * , unsigned long  ) ;
   int (*transfer)(struct inode * , struct iattr * ) ;
   int (*write_dquot)(struct dquot * ) ;
   int (*acquire_dquot)(struct dquot * ) ;
   int (*release_dquot)(struct dquot * ) ;
   int (*mark_dirty)(struct dquot * ) ;
   int (*write_info)(struct super_block * , int  ) ;
};
//#line 262 "include/linux/quota.h"
struct quotactl_ops {
   int (*quota_on)(struct super_block * , int  , int  , char * ) ;
   int (*quota_off)(struct super_block * , int  ) ;
   int (*quota_sync)(struct super_block * , int  ) ;
   int (*get_info)(struct super_block * , int  , struct if_dqinfo * ) ;
   int (*set_info)(struct super_block * , int  , struct if_dqinfo * ) ;
   int (*get_dqblk)(struct super_block * , int  , qid_t  , struct if_dqblk * ) ;
   int (*set_dqblk)(struct super_block * , int  , qid_t  , struct if_dqblk * ) ;
   int (*get_xstate)(struct super_block * , struct fs_quota_stat * ) ;
   int (*set_xstate)(struct super_block * , unsigned int  , int  ) ;
   int (*get_xquota)(struct super_block * , int  , qid_t  , struct fs_disk_quota * ) ;
   int (*set_xquota)(struct super_block * , int  , qid_t  , struct fs_disk_quota * ) ;
};
//#line 276 "include/linux/quota.h"
struct quota_format_type {
   int qf_fmt_id ;
   struct quota_format_ops *qf_ops ;
   struct module *qf_owner ;
   struct quota_format_type *qf_next ;
};
//#line 286 "include/linux/quota.h"
struct quota_info {
   unsigned int flags ;
   struct semaphore dqio_sem ;
   struct semaphore dqonoff_sem ;
   struct rw_semaphore dqptr_sem ;
   struct inode *files[2] ;
   struct vfsmount *mnt[2] ;
   struct mem_dqinfo info[2] ;
   struct quota_format_ops *ops[2] ;
};
//#line 297 "include/linux/fs.h"
struct address_space;
//#line 298
struct writeback_control;
//#line 300 "include/linux/fs.h"
struct address_space_operations {
   int (*writepage)(struct page *page , struct writeback_control *wbc ) ;
   int (*readpage)(struct file * , struct page * ) ;
   int (*sync_page)(struct page * ) ;
   int (*writepages)(struct address_space * , struct writeback_control * ) ;
   int (*set_page_dirty)(struct page *page ) ;
   int (*readpages)(struct file *filp , struct address_space *mapping , struct list_head *pages ,
                    unsigned int nr_pages ) ;
   int (*prepare_write)(struct file * , struct page * , unsigned int  , unsigned int  ) ;
   int (*commit_write)(struct file * , struct page * , unsigned int  , unsigned int  ) ;
   sector_t (*bmap)(struct address_space * , sector_t  ) ;
   int (*invalidatepage)(struct page * , unsigned long  ) ;
   int (*releasepage)(struct page * , int  ) ;
   ssize_t (*direct_IO)(int  , struct kiocb * , struct iovec  const  *iov , loff_t offset ,
                        unsigned long nr_segs ) ;
   struct page *(*get_xip_page)(struct address_space * , sector_t  , int  ) ;
};
//#line 331 "include/linux/fs.h"
struct address_space {
   struct inode *host ;
   struct radix_tree_root page_tree ;
   rwlock_t tree_lock ;
   unsigned int i_mmap_writable ;
   struct prio_tree_root i_mmap ;
   struct list_head i_mmap_nonlinear ;
   spinlock_t i_mmap_lock ;
   unsigned int truncate_count ;
   unsigned long nrpages ;
   unsigned long writeback_index ;
   struct address_space_operations *a_ops ;
   unsigned long flags ;
   struct backing_dev_info *backing_dev_info ;
   spinlock_t private_lock ;
   struct list_head private_list ;
   struct address_space *assoc_mapping ;
} /*__attribute__((__aligned__(sizeof(long ))))*/ ;
//#line 355
struct hd_struct;
//#line 355
struct gendisk;
//#line 355 "include/linux/fs.h"
struct block_device {
   dev_t bd_dev ;
   struct inode *bd_inode ;
   int bd_openers ;
   struct semaphore bd_sem ;
   struct semaphore bd_mount_sem ;
   struct list_head bd_inodes ;
   void *bd_holder ;
   int bd_holders ;
   struct block_device *bd_contains ;
   unsigned int bd_block_size ;
   struct hd_struct *bd_part ;
   unsigned int bd_part_count ;
   int bd_invalidated ;
   struct gendisk *bd_disk ;
   struct list_head bd_list ;
   struct backing_dev_info *bd_inode_backing_dev_info ;
   unsigned long bd_private ;
};
//#line 422
struct inode_operations;
//#line 422
struct file_lock;
//#line 422
struct cdev;
//#line 422
struct dnotify_struct;
//#line 422 "include/linux/fs.h"
union __anonunion_u_97 {
   void *generic_ip ;
};
//#line 422 "include/linux/fs.h"
struct inode {
   struct hlist_node i_hash ;
   struct list_head i_list ;
   struct list_head i_sb_list ;
   struct list_head i_dentry ;
   unsigned long i_ino ;
   atomic_t i_count ;
   umode_t i_mode ;
   unsigned int i_nlink ;
   uid_t i_uid ;
   gid_t i_gid ;
   dev_t i_rdev ;
   loff_t i_size ;
   struct timespec i_atime ;
   struct timespec i_mtime ;
   struct timespec i_ctime ;
   unsigned int i_blkbits ;
   unsigned long i_blksize ;
   unsigned long i_version ;
   unsigned long i_blocks ;
   unsigned short i_bytes ;
   spinlock_t i_lock ;
   struct semaphore i_sem ;
   struct rw_semaphore i_alloc_sem ;
   struct inode_operations *i_op ;
   struct file_operations *i_fop ;
   struct super_block *i_sb ;
   struct file_lock *i_flock ;
   struct address_space *i_mapping ;
   struct address_space i_data ;
   struct dquot *i_dquot[2] ;
   struct list_head i_devices ;
   struct pipe_inode_info *i_pipe ;
   struct block_device *i_bdev ;
   struct cdev *i_cdev ;
   int i_cindex ;
   __u32 i_generation ;
   unsigned long i_dnotify_mask ;
   struct dnotify_struct *i_dnotify ;
   struct list_head inotify_watches ;
   struct semaphore inotify_sem ;
   unsigned long i_state ;
   unsigned long dirtied_when ;
   unsigned int i_flags ;
   atomic_t i_writecount ;
   void *i_security ;
   union __anonunion_u_97 u ;
   seqcount_t i_size_seqcount ;
};
//#line 550 "include/linux/fs.h"
struct fown_struct {
   rwlock_t lock ;
   int pid ;
   uid_t uid ;
   uid_t euid ;
   void *security ;
   int signum ;
};
//#line 561 "include/linux/fs.h"
struct file_ra_state {
   unsigned long start ;
   unsigned long size ;
   unsigned long flags ;
   unsigned long cache_hit ;
   unsigned long prev_page ;
   unsigned long ahead_start ;
   unsigned long ahead_size ;
   unsigned long ra_pages ;
   unsigned long mmap_hit ;
   unsigned long mmap_miss ;
};
//#line 576 "include/linux/fs.h"
struct file {
   struct list_head f_list ;
   struct dentry *f_dentry ;
   struct vfsmount *f_vfsmnt ;
   struct file_operations *f_op ;
   atomic_t f_count ;
   unsigned int f_flags ;
   mode_t f_mode ;
   loff_t f_pos ;
   struct fown_struct f_owner ;
   unsigned int f_uid ;
   unsigned int f_gid ;
   struct file_ra_state f_ra ;
   unsigned long f_version ;
   void *f_security ;
   void *private_data ;
   struct list_head f_ep_links ;
   spinlock_t f_ep_lock ;
   struct address_space *f_mapping ;
   struct rcu_head f_rcuhead ;
};
//#line 634 "include/linux/fs.h"
typedef struct files_struct *fl_owner_t;
//#line 636 "include/linux/fs.h"
struct file_lock_operations {
   void (*fl_insert)(struct file_lock * ) ;
   void (*fl_remove)(struct file_lock * ) ;
   void (*fl_copy_lock)(struct file_lock * , struct file_lock * ) ;
   void (*fl_release_private)(struct file_lock * ) ;
};
//#line 643 "include/linux/fs.h"
struct lock_manager_operations {
   int (*fl_compare_owner)(struct file_lock * , struct file_lock * ) ;
   void (*fl_notify)(struct file_lock * ) ;
   void (*fl_copy_lock)(struct file_lock * , struct file_lock * ) ;
   void (*fl_release_private)(struct file_lock * ) ;
   void (*fl_break)(struct file_lock * ) ;
   int (*fl_mylease)(struct file_lock * , struct file_lock * ) ;
   int (*fl_change)(struct file_lock ** , int  ) ;
};
//#line 8 "include/linux/nfs_fs_i.h"
struct nlm_lockowner;
//#line 13 "include/linux/nfs_fs_i.h"
struct nfs_lock_info {
   u32 state ;
   u32 flags ;
   struct nlm_lockowner *owner ;
};
//#line 19
struct nfs4_lock_state;
//#line 20 "include/linux/nfs_fs_i.h"
struct nfs4_lock_info {
   struct nfs4_lock_state *owner ;
};
//#line 656 "include/linux/fs.h"
struct fasync_struct;
//#line 656 "include/linux/fs.h"
union __anonunion_fl_u_98 {
   struct nfs_lock_info nfs_fl ;
   struct nfs4_lock_info nfs4_fl ;
};
//#line 656 "include/linux/fs.h"
struct file_lock {
   struct file_lock *fl_next ;
   struct list_head fl_link ;
   struct list_head fl_block ;
   fl_owner_t fl_owner ;
   unsigned int fl_pid ;
   wait_queue_head_t fl_wait ;
   struct file *fl_file ;
   unsigned char fl_flags ;
   unsigned char fl_type ;
   loff_t fl_start ;
   loff_t fl_end ;
   struct fasync_struct *fl_fasync ;
   unsigned long fl_break_time ;
   struct file_lock_operations *fl_ops ;
   struct lock_manager_operations *fl_lmops ;
   union __anonunion_fl_u_98 fl_u ;
};
//#line 725 "include/linux/fs.h"
struct fasync_struct {
   int magic ;
   int fa_fd ;
   struct fasync_struct *fa_next ;
   struct file *fa_file ;
};
//#line 758
struct file_system_type;
//#line 758
struct super_operations;
//#line 758
struct export_operations;
//#line 758
struct xattr_handler;
//#line 758 "include/linux/fs.h"
struct super_block {
   struct list_head s_list ;
   dev_t s_dev ;
   unsigned long s_blocksize ;
   unsigned long s_old_blocksize ;
   unsigned char s_blocksize_bits ;
   unsigned char s_dirt ;
   unsigned long long s_maxbytes ;
   struct file_system_type *s_type ;
   struct super_operations *s_op ;
   struct dquot_operations *dq_op ;
   struct quotactl_ops *s_qcop ;
   struct export_operations *s_export_op ;
   unsigned long s_flags ;
   unsigned long s_magic ;
   struct dentry *s_root ;
   struct rw_semaphore s_umount ;
   struct semaphore s_lock ;
   int s_count ;
   int s_syncing ;
   int s_need_sync_fs ;
   atomic_t s_active ;
   void *s_security ;
   struct xattr_handler **s_xattr ;
   struct list_head s_inodes ;
   struct list_head s_dirty ;
   struct list_head s_io ;
   struct hlist_head s_anon ;
   struct list_head s_files ;
   struct block_device *s_bdev ;
   struct list_head s_instances ;
   struct quota_info s_dquot ;
   int s_frozen ;
   wait_queue_head_t s_wait_unfrozen ;
   char s_id[32] ;
   void *s_fs_info ;
   struct semaphore s_vfs_rename_sem ;
   u32 s_time_gran ;
};
//#line 902 "include/linux/fs.h"
struct block_device_operations {
   int (*open)(struct inode * , struct file * ) ;
   int (*release)(struct inode * , struct file * ) ;
   int (*ioctl)(struct inode * , struct file * , unsigned int  , unsigned long  ) ;
   long (*unlocked_ioctl)(struct file * , unsigned int  , unsigned long  ) ;
   long (*compat_ioctl)(struct file * , unsigned int  , unsigned long  ) ;
   int (*direct_access)(struct block_device * , sector_t  , unsigned long * ) ;
   int (*media_changed)(struct gendisk * ) ;
   int (*revalidate_disk)(struct gendisk * ) ;
   struct module *owner ;
};
//#line 923 "include/linux/fs.h"
union __anonunion_arg_101 {
   char *buf ;
   void *data ;
};
//#line 923 "include/linux/fs.h"
struct __anonstruct_read_descriptor_t_100 {
   size_t written ;
   size_t count ;
   union __anonunion_arg_101 arg ;
   int error ;
};
//#line 923 "include/linux/fs.h"
typedef struct __anonstruct_read_descriptor_t_100 read_descriptor_t;
//#line 946 "include/linux/fs.h"
struct file_operations {
   struct module *owner ;
   loff_t (*llseek)(struct file * , loff_t  , int  ) ;
   ssize_t (*read)(struct file * , char * , size_t  , loff_t * ) ;
   ssize_t (*aio_read)(struct kiocb * , char * , size_t  , loff_t  ) ;
   ssize_t (*write)(struct file * , char const   * , size_t  , loff_t * ) ;
   ssize_t (*aio_write)(struct kiocb * , char const   * , size_t  , loff_t  ) ;
   int (*readdir)(struct file * , void * , int /*(*)*/(*__perl_script_tmp)(void * , char const   * , int  ,
                                                   loff_t  , ino_t  , unsigned int  ) ) ;
   unsigned int (*poll)(struct file * , struct poll_table_struct * ) ;
   int (*ioctl)(struct inode * , struct file * , unsigned int  , unsigned long  ) ;
   long (*unlocked_ioctl)(struct file * , unsigned int  , unsigned long  ) ;
   long (*compat_ioctl)(struct file * , unsigned int  , unsigned long  ) ;
   int (*mmap)(struct file * , struct vm_area_struct * ) ;
   int (*open)(struct inode * , struct file * ) ;
   int (*flush)(struct file * ) ;
   int (*release)(struct inode * , struct file * ) ;
   int (*fsync)(struct file * , struct dentry * , int datasync ) ;
   int (*aio_fsync)(struct kiocb * , int datasync ) ;
   int (*fasync)(int  , struct file * , int  ) ;
   int (*lock)(struct file * , int  , struct file_lock * ) ;
   ssize_t (*readv)(struct file * , struct iovec  const  * , unsigned long  , loff_t * ) ;
   ssize_t (*writev)(struct file * , struct iovec  const  * , unsigned long  , loff_t * ) ;
   ssize_t (*sendfile)(struct file * , loff_t * , size_t  , int /*(*)*/(*__perl_script_tmp)(read_descriptor_t * ,
                                                                    struct page * ,
                                                                    unsigned long  ,
                                                                    unsigned long  ) ,
                       void * ) ;
   ssize_t (*sendpage)(struct file * , struct page * , int  , size_t  , loff_t * ,
                       int  ) ;
   unsigned long (*get_unmapped_area)(struct file * , unsigned long  , unsigned long  ,
                                      unsigned long  , unsigned long  ) ;
   int (*check_flags)(int  ) ;
   int (*dir_notify)(struct file *filp , unsigned long arg ) ;
   int (*flock)(struct file * , int  , struct file_lock * ) ;
};
//#line 976 "include/linux/fs.h"
struct inode_operations {
   int (*create)(struct inode * , struct dentry * , int  , struct nameidata * ) ;
   struct dentry *(*lookup)(struct inode * , struct dentry * , struct nameidata * ) ;
   int (*link)(struct dentry * , struct inode * , struct dentry * ) ;
   int (*unlink)(struct inode * , struct dentry * ) ;
   int (*symlink)(struct inode * , struct dentry * , char const   * ) ;
   int (*mkdir)(struct inode * , struct dentry * , int  ) ;
   int (*rmdir)(struct inode * , struct dentry * ) ;
   int (*mknod)(struct inode * , struct dentry * , int  , dev_t  ) ;
   int (*rename)(struct inode * , struct dentry * , struct inode * , struct dentry * ) ;
   int (*readlink)(struct dentry * , char * , int  ) ;
   void *(*follow_link)(struct dentry * , struct nameidata * ) ;
   void (*put_link)(struct dentry * , struct nameidata * , void * ) ;
   void (*truncate)(struct inode * ) ;
   int (*permission)(struct inode * , int  , struct nameidata * ) ;
   int (*setattr)(struct dentry * , struct iattr * ) ;
   int (*getattr)(struct vfsmount *mnt , struct dentry * , struct kstat * ) ;
   int (*setxattr)(struct dentry * , char const   * , void const   * , size_t  , int  ) ;
   ssize_t (*getxattr)(struct dentry * , char const   * , void * , size_t  ) ;
   ssize_t (*listxattr)(struct dentry * , char * , size_t  ) ;
   int (*removexattr)(struct dentry * , char const   * ) ;
};
//#line 1000
struct seq_file;
//#line 1013 "include/linux/fs.h"
struct super_operations {
   struct inode *(*alloc_inode)(struct super_block *sb ) ;
   void (*destroy_inode)(struct inode * ) ;
   void (*read_inode)(struct inode * ) ;
   void (*dirty_inode)(struct inode * ) ;
   int (*write_inode)(struct inode * , int  ) ;
   void (*put_inode)(struct inode * ) ;
   void (*drop_inode)(struct inode * ) ;
   void (*delete_inode)(struct inode * ) ;
   void (*put_super)(struct super_block * ) ;
   void (*write_super)(struct super_block * ) ;
   int (*sync_fs)(struct super_block *sb , int wait ) ;
   void (*write_super_lockfs)(struct super_block * ) ;
   void (*unlockfs)(struct super_block * ) ;
   int (*statfs)(struct super_block * , struct kstatfs * ) ;
   int (*remount_fs)(struct super_block * , int * , char * ) ;
   void (*clear_inode)(struct inode * ) ;
   void (*umount_begin)(struct super_block * ) ;
   int (*show_options)(struct seq_file * , struct vfsmount * ) ;
   ssize_t (*quota_read)(struct super_block * , int  , char * , size_t  , loff_t  ) ;
   ssize_t (*quota_write)(struct super_block * , int  , char const   * , size_t  ,
                          loff_t  ) ;
};
//#line 1162 "include/linux/fs.h"
struct export_operations {
   struct dentry *(*decode_fh)(struct super_block *sb , __u32 *fh , int fh_len , int fh_type ,
                               int (*acceptable)(void *context , struct dentry *de ) ,
                               void *context ) ;
   int (*encode_fh)(struct dentry *de , __u32 *fh , int *max_len , int connectable ) ;
   int (*get_name)(struct dentry *parent , char *name , struct dentry *child ) ;
   struct dentry *(*get_parent)(struct dentry *child ) ;
   struct dentry *(*get_dentry)(struct super_block *sb , void *inump ) ;
   struct dentry *(*find_exported_dentry)(struct super_block *sb , void *obj , void *parent ,
                                          int (*acceptable)(void *context , struct dentry *de ) ,
                                          void *context ) ;
};
//#line 1189 "include/linux/fs.h"
struct file_system_type {
   char const   *name ;
   int fs_flags ;
   struct super_block *(*get_sb)(struct file_system_type * , int  , char const   * ,
                                 void * ) ;
   void (*kill_sb)(struct super_block * ) ;
   struct module *owner ;
   struct file_system_type *next ;
   struct list_head fs_supers ;
};
//#line 1479
struct bio;
//#line 18 "include/linux/mm.h"
struct anon_vma;
//#line 57 "include/linux/mm.h"
struct __anonstruct_vm_set_106 {
   struct list_head list ;
   void *parent ;
   struct vm_area_struct *head ;
};
//#line 57 "include/linux/mm.h"
union __anonunion_shared_105 {
   struct __anonstruct_vm_set_106 vm_set ;
   struct raw_prio_tree_node prio_tree_node ;
};
//#line 57
struct vm_operations_struct;
//#line 57 "include/linux/mm.h"
struct vm_area_struct {
   struct mm_struct *vm_mm ;
   unsigned long vm_start ;
   unsigned long vm_end ;
   struct vm_area_struct *vm_next ;
   pgprot_t vm_page_prot ;
   unsigned long vm_flags ;
   struct rb_node vm_rb ;
   union __anonunion_shared_105 shared ;
   struct list_head anon_vma_node ;
   struct anon_vma *anon_vma ;
   struct vm_operations_struct *vm_ops ;
   unsigned long vm_pgoff ;
   struct file *vm_file ;
   void *vm_private_data ;
   unsigned long vm_truncate_count ;
};
//#line 194 "include/linux/mm.h"
struct vm_operations_struct {
   void (*open)(struct vm_area_struct *area ) ;
   void (*close)(struct vm_area_struct *area ) ;
   struct page *(*nopage)(struct vm_area_struct *area , unsigned long address , int *type ) ;
   int (*populate)(struct vm_area_struct *area , unsigned long address , unsigned long len ,
                   pgprot_t prot , unsigned long pgoff , int nonblock ) ;
};
//#line 212 "include/linux/mm.h"
typedef unsigned long page_flags_t;
//#line 221 "include/linux/mm.h"
struct page {
   page_flags_t flags ;
   atomic_t _count ;
   atomic_t _mapcount ;
   unsigned long private ;
   struct address_space *mapping ;
   unsigned long index ;
   struct list_head lru ;
};
//#line 9 "include/linux/dma-mapping.h"
enum dma_data_direction {
    DMA_BIDIRECTIONAL = 0,
    DMA_TO_DEVICE = 1,
    DMA_FROM_DEVICE = 2,
    DMA_NONE = 3
} ;
//#line 77 "include/linux/genhd.h"
struct hd_struct {
   sector_t start_sect ;
   sector_t nr_sects ;
   struct kobject kobj ;
   unsigned int reads ;
   unsigned int read_sectors ;
   unsigned int writes ;
   unsigned int write_sectors ;
   int policy ;
   int partno ;
};
//#line 91 "include/linux/genhd.h"
struct disk_stats {
   unsigned int read_sectors ;
   unsigned int write_sectors ;
   unsigned int reads ;
   unsigned int writes ;
   unsigned int read_merges ;
   unsigned int write_merges ;
   unsigned int read_ticks ;
   unsigned int write_ticks ;
   unsigned int io_ticks ;
   unsigned int time_in_queue ;
};
//#line 100
struct request_queue;
//#line 100
struct timer_rand_state;
//#line 100 "include/linux/genhd.h"
struct gendisk {
   int major ;
   int first_minor ;
   int minors ;
   char disk_name[32] ;
   struct hd_struct **part ;
   struct block_device_operations *fops ;
   struct request_queue *queue ;
   void *private_data ;
   sector_t capacity ;
   int flags ;
   char devfs_name[64] ;
   int number ;
   struct device *driverfs_dev ;
   struct kobject kobj ;
   struct timer_rand_state *random ;
   int policy ;
   atomic_t sync_io ;
   unsigned long stamp ;
   unsigned long stamp_idle ;
   int in_flight ;
   struct disk_stats *dkstats ;
};
//#line 99 "include//*asm*//uaccess.h"
struct exception_table_entry {
   unsigned long insn ;
   unsigned long fixup ;
};
//#line 23 "include/linux/backing-dev.h"
typedef int congested_fn(void * , int  );
//#line 25 "include/linux/backing-dev.h"
struct backing_dev_info {
   unsigned long ra_pages ;
   unsigned long state ;
   unsigned int capabilities ;
   congested_fn *congested_fn ;
   void *congested_data ;
   void (*unplug_io_fn)(struct backing_dev_info * , struct page * ) ;
   void *unplug_io_data ;
};
//#line 9 "include/linux/mempool.h"
typedef void *mempool_alloc_t(gfp_t gfp_mask , void *pool_data );
//#line 10 "include/linux/mempool.h"
typedef void mempool_free_t(void *element , void *pool_data );
//#line 12 "include/linux/mempool.h"
struct mempool_s {
   spinlock_t lock ;
   int min_nr ;
   int curr_nr ;
   void **elements ;
   void *pool_data ;
   mempool_alloc_t *alloc ;
   mempool_free_t *free ;
   wait_queue_head_t wait ;
};
//#line 12 "include/linux/mempool.h"
typedef struct mempool_s mempool_t;
//#line 57 "include/linux/bio.h"
struct bio_vec {
   struct page *bv_page ;
   unsigned int bv_len ;
   unsigned int bv_offset ;
};
//#line 65 "include/linux/bio.h"
typedef int bio_end_io_t(struct bio * , unsigned int  , int  );
//#line 66 "include/linux/bio.h"
typedef void bio_destructor_t(struct bio * );
//#line 72 "include/linux/bio.h"
struct bio {
   sector_t bi_sector ;
   struct bio *bi_next ;
   struct block_device *bi_bdev ;
   unsigned long bi_flags ;
   unsigned long bi_rw ;
   unsigned short bi_vcnt ;
   unsigned short bi_idx ;
   unsigned short bi_phys_segments ;
   unsigned short bi_hw_segments ;
   unsigned int bi_size ;
   unsigned int bi_hw_front_size ;
   unsigned int bi_hw_back_size ;
   unsigned int bi_max_vecs ;
   struct bio_vec *bi_io_vec ;
   bio_end_io_t *bi_end_io ;
   atomic_t bi_cnt ;
   void *bi_private ;
   bio_destructor_t *bi_destructor ;
};
//#line 21 "include/linux/blkdev.h"
typedef struct request_queue request_queue_t;
//#line 22
struct elevator_queue;
//#line 23 "include/linux/blkdev.h"
typedef struct elevator_queue elevator_t;
//#line 24
struct request_pm_state;
//#line 32 "include/linux/blkdev.h"
struct as_io_context {
   spinlock_t lock ;
   void (*dtor)(struct as_io_context *aic ) ;
   void (*exit)(struct as_io_context *aic ) ;
   unsigned long state ;
   atomic_t nr_queued ;
   atomic_t nr_dispatched ;
   unsigned long last_end_request ;
   unsigned long ttime_total ;
   unsigned long ttime_samples ;
   unsigned long ttime_mean ;
   unsigned int seek_samples ;
   sector_t last_request_pos ;
   u64 seek_total ;
   sector_t seek_mean ;
};
//#line 55
struct cfq_queue;
//#line 56 "include/linux/blkdev.h"
struct cfq_io_context {
   struct list_head list ;
   struct cfq_queue *cfqq ;
   void *key ;
   struct io_context *ioc ;
   unsigned long last_end_request ;
   unsigned long last_queue ;
   unsigned long ttime_total ;
   unsigned long ttime_samples ;
   unsigned long ttime_mean ;
   void (*dtor)(struct cfq_io_context * ) ;
   void (*exit)(struct cfq_io_context * ) ;
};
//#line 81 "include/linux/blkdev.h"
struct io_context {
   atomic_t refcount ;
   struct task_struct *task ;
   int (*set_ioprio)(struct io_context * , unsigned int  ) ;
   unsigned long last_waited ;
   int nr_batch_requests ;
   struct as_io_context *aic ;
   struct cfq_io_context *cic ;
};
//#line 104
struct request;
//#line 105 "include/linux/blkdev.h"
typedef void rq_end_io_fn(struct request * );
//#line 107 "include/linux/blkdev.h"
struct request_list {
   int count[2] ;
   int starved[2] ;
   mempool_t *rq_pool ;
   wait_queue_head_t wait[2] ;
   wait_queue_head_t drain ;
};
//#line 120 "include/linux/blkdev.h"
struct request {
   struct list_head queuelist ;
   unsigned long flags ;
   sector_t sector ;
   unsigned long nr_sectors ;
   unsigned int current_nr_sectors ;
   sector_t hard_sector ;
   unsigned long hard_nr_sectors ;
   unsigned int hard_cur_sectors ;
   struct bio *bio ;
   struct bio *biotail ;
   void *elevator_private ;
   unsigned short ioprio ;
   int rq_status ;
   struct gendisk *rq_disk ;
   int errors ;
   unsigned long start_time ;
   unsigned short nr_phys_segments ;
   unsigned short nr_hw_segments ;
   int tag ;
   char *buffer ;
   int ref_count ;
   request_queue_t *q ;
   struct request_list *rl ;
   struct completion *waiting ;
   void *special ;
   unsigned int cmd_len ;
   unsigned char cmd[16] ;
   unsigned int data_len ;
   void *data ;
   unsigned int sense_len ;
   void *sense ;
   unsigned int timeout ;
   struct request_pm_state *pm ;
   rq_end_io_fn *end_io ;
   void *end_io_data ;
};
//#line 266 "include/linux/blkdev.h"
struct request_pm_state {
   int pm_step ;
   u32 pm_state ;
   void *data ;
};
//#line 4 "include/linux/elevator.h"
typedef int elevator_merge_fn(request_queue_t * , struct request ** , struct bio * );
//#line 7 "include/linux/elevator.h"
typedef void elevator_merge_req_fn(request_queue_t * , struct request * , struct request * );
//#line 9 "include/linux/elevator.h"
typedef void elevator_merged_fn(request_queue_t * , struct request * );
//#line 11 "include/linux/elevator.h"
typedef struct request *elevator_next_req_fn(request_queue_t * );
//#line 13 "include/linux/elevator.h"
typedef void elevator_add_req_fn(request_queue_t * , struct request * , int  );
//#line 14 "include/linux/elevator.h"
typedef int elevator_queue_empty_fn(request_queue_t * );
//#line 15 "include/linux/elevator.h"
typedef void elevator_remove_req_fn(request_queue_t * , struct request * );
//#line 16 "include/linux/elevator.h"
typedef void elevator_requeue_req_fn(request_queue_t * , struct request * );
//#line 17 "include/linux/elevator.h"
typedef struct request *elevator_request_list_fn(request_queue_t * , struct request * );
//#line 18 "include/linux/elevator.h"
typedef void elevator_completed_req_fn(request_queue_t * , struct request * );
//#line 19 "include/linux/elevator.h"
typedef int elevator_may_queue_fn(request_queue_t * , int  , struct bio * );
//#line 21 "include/linux/elevator.h"
typedef int elevator_set_req_fn(request_queue_t * , struct request * , struct bio * ,
                                int  );
//#line 22 "include/linux/elevator.h"
typedef void elevator_put_req_fn(request_queue_t * , struct request * );
//#line 23 "include/linux/elevator.h"
typedef void elevator_deactivate_req_fn(request_queue_t * , struct request * );
//#line 25 "include/linux/elevator.h"
typedef int elevator_init_fn(request_queue_t * , elevator_t * );
//#line 26 "include/linux/elevator.h"
typedef void elevator_exit_fn(elevator_t * );
//#line 28 "include/linux/elevator.h"
struct elevator_ops {
   elevator_merge_fn *elevator_merge_fn ;
   elevator_merged_fn *elevator_merged_fn ;
   elevator_merge_req_fn *elevator_merge_req_fn ;
   elevator_next_req_fn *elevator_next_req_fn ;
   elevator_add_req_fn *elevator_add_req_fn ;
   elevator_remove_req_fn *elevator_remove_req_fn ;
   elevator_requeue_req_fn *elevator_requeue_req_fn ;
   elevator_deactivate_req_fn *elevator_deactivate_req_fn ;
   elevator_queue_empty_fn *elevator_queue_empty_fn ;
   elevator_completed_req_fn *elevator_completed_req_fn ;
   elevator_request_list_fn *elevator_former_req_fn ;
   elevator_request_list_fn *elevator_latter_req_fn ;
   elevator_set_req_fn *elevator_set_req_fn ;
   elevator_put_req_fn *elevator_put_req_fn ;
   elevator_may_queue_fn *elevator_may_queue_fn ;
   elevator_init_fn *elevator_init_fn ;
   elevator_exit_fn *elevator_exit_fn ;
};
//#line 60 "include/linux/elevator.h"
struct elevator_type {
   struct list_head list ;
   struct elevator_ops ops ;
   struct elevator_type *elevator_type ;
   struct kobj_type *elevator_ktype ;
   char elevator_name[16] ;
   struct module *elevator_owner ;
};
//#line 73 "include/linux/elevator.h"
struct elevator_queue {
   struct elevator_ops *ops ;
   void *elevator_data ;
   struct kobject kobj ;
   struct elevator_type *elevator_type ;
};
//#line 277 "include/linux/blkdev.h"
typedef int merge_request_fn(request_queue_t * , struct request * , struct bio * );
//#line 279 "include/linux/blkdev.h"
typedef int merge_requests_fn(request_queue_t * , struct request * , struct request * );
//#line 281 "include/linux/blkdev.h"
typedef void request_fn_proc(request_queue_t *q );
//#line 282 "include/linux/blkdev.h"
typedef int make_request_fn(request_queue_t *q , struct bio *bio );
//#line 283 "include/linux/blkdev.h"
typedef int prep_rq_fn(request_queue_t * , struct request * );
//#line 284 "include/linux/blkdev.h"
typedef void unplug_fn(request_queue_t * );
//#line 287 "include/linux/blkdev.h"
typedef int merge_bvec_fn(request_queue_t * , struct bio * , struct bio_vec * );
//#line 288 "include/linux/blkdev.h"
typedef void activity_fn(void *data , int rw );
//#line 289 "include/linux/blkdev.h"
typedef int issue_flush_fn(request_queue_t * , struct gendisk * , sector_t * );
//#line 290 "include/linux/blkdev.h"
typedef int prepare_flush_fn(request_queue_t * , struct request * );
//#line 291 "include/linux/blkdev.h"
typedef void end_flush_fn(request_queue_t * , struct request * );
//#line 298 "include/linux/blkdev.h"
struct blk_queue_tag {
   struct request **tag_index ;
   unsigned long *tag_map ;
   struct list_head busy_list ;
   int busy ;
   int max_depth ;
   int real_max_depth ;
   atomic_t refcnt ;
};
//#line 308 "include/linux/blkdev.h"
struct request_queue {
   struct list_head queue_head ;
   struct request *last_merge ;
   elevator_t *elevator ;
   struct request_list rq ;
   request_fn_proc *request_fn ;
   merge_request_fn *back_merge_fn ;
   merge_request_fn *front_merge_fn ;
   merge_requests_fn *merge_requests_fn ;
   make_request_fn *make_request_fn ;
   prep_rq_fn *prep_rq_fn ;
   unplug_fn *unplug_fn ;
   merge_bvec_fn *merge_bvec_fn ;
   activity_fn *activity_fn ;
   issue_flush_fn *issue_flush_fn ;
   prepare_flush_fn *prepare_flush_fn ;
   end_flush_fn *end_flush_fn ;
   struct timer_list unplug_timer ;
   int unplug_thresh ;
   unsigned long unplug_delay ;
   struct work_struct unplug_work ;
   struct backing_dev_info backing_dev_info ;
   void *queuedata ;
   void *activity_data ;
   unsigned long bounce_pfn ;
   unsigned int bounce_gfp ;
   unsigned long queue_flags ;
   spinlock_t __queue_lock ;
   spinlock_t *queue_lock ;
   struct kobject kobj ;
   unsigned long nr_requests ;
   unsigned int nr_congestion_on ;
   unsigned int nr_congestion_off ;
   unsigned int nr_batching ;
   unsigned short max_sectors ;
   unsigned short max_hw_sectors ;
   unsigned short max_phys_segments ;
   unsigned short max_hw_segments ;
   unsigned short hardsect_size ;
   unsigned int max_segment_size ;
   unsigned long seg_boundary_mask ;
   unsigned int dma_alignment ;
   struct blk_queue_tag *queue_tags ;
   atomic_t refcnt ;
   unsigned int in_flight ;
   unsigned int sg_timeout ;
   unsigned int sg_reserved_size ;
   int node ;
   struct list_head drain_list ;
   struct request *flush_rq ;
   unsigned char ordered ;
};
//#line 73 "include/linux/swap.h"
struct reclaim_state {
   unsigned long reclaimed_slab ;
};
//#line 10 "include/scsi/scsi_cmnd.h"
struct scsi_device;
//#line 11
struct scsi_request;
//#line 15 "include/scsi/scsi_cmnd.h"
struct scsi_pointer {
   char *ptr ;
   int this_residual ;
   struct scatterlist *buffer ;
   int buffers_residual ;
   dma_addr_t dma_handle ;
   int volatile   Status ;
   int volatile   Message ;
   int volatile   have_data_in ;
   int volatile   sent_command ;
   int volatile   phase ;
};
//#line 30 "include/scsi/scsi_cmnd.h"
struct scsi_cmnd {
   int sc_magic ;
   struct scsi_device *device ;
   struct scsi_request *sc_request ;
   struct list_head list ;
   struct list_head eh_entry ;
   int eh_eflags ;
   void (*done)(struct scsi_cmnd * ) ;
   unsigned long serial_number ;
   unsigned long jiffies_at_alloc ;
   int retries ;
   int allowed ;
   int timeout_per_command ;
   unsigned char cmd_len ;
   unsigned char old_cmd_len ;
   enum dma_data_direction sc_data_direction ;
   enum dma_data_direction sc_old_data_direction ;
   unsigned char cmnd[16] ;
   unsigned int request_bufflen ;
   struct timer_list eh_timeout ;
   void *request_buffer ;
   unsigned char data_cmnd[16] ;
   unsigned short old_use_sg ;
   unsigned short use_sg ;
   unsigned short sglist_len ;
   unsigned int bufflen ;
   void *buffer ;
   unsigned int underflow ;
   unsigned int old_underflow ;
   unsigned int transfersize ;
   int resid ;
   struct request *request ;
   unsigned char sense_buffer[96] ;
   void (*scsi_done)(struct scsi_cmnd * ) ;
   struct scsi_pointer SCp ;
   unsigned char *host_scribble ;
   int result ;
   unsigned char tag ;
   unsigned long pid ;
};
//#line 28 "include/scsi/scsi_device.h"
enum scsi_device_state {
    SDEV_CREATED = 1,
    SDEV_RUNNING = 2,
    SDEV_CANCEL = 3,
    SDEV_DEL = 4,
    SDEV_QUIESCE = 5,
    SDEV_OFFLINE = 6,
    SDEV_BLOCK = 7
} ;
//#line 47
struct Scsi_Host;
//#line 47
struct scsi_target;
//#line 47 "include/scsi/scsi_device.h"
struct scsi_device {
   struct Scsi_Host *host ;
   struct request_queue *request_queue ;
   struct list_head siblings ;
   struct list_head same_target_siblings ;
   unsigned int device_busy ;
   spinlock_t list_lock ;
   struct list_head cmd_list ;
   struct list_head starved_entry ;
   struct scsi_cmnd *current_cmnd ;
   unsigned short queue_depth ;
   unsigned short last_queue_full_depth ;
   unsigned short last_queue_full_count ;
   unsigned long last_queue_full_time ;
   unsigned int id ;
   unsigned int lun ;
   unsigned int channel ;
   unsigned int manufacturer ;
   unsigned int sector_size ;
   void *hostdata ;
   char devfs_name[256] ;
   char type ;
   char scsi_level ;
   char inq_periph_qual ;
   unsigned char inquiry_len ;
   unsigned char *inquiry ;
   char *vendor ;
   char *model ;
   char *rev ;
   unsigned char current_tag ;
   struct scsi_target *sdev_target ;
   unsigned int sdev_bflags ;
   unsigned int writeable : 1 ;
   unsigned int removable : 1 ;
   unsigned int changed : 1 ;
   unsigned int busy : 1 ;
   unsigned int lockable : 1 ;
   unsigned int locked : 1 ;
   unsigned int borken : 1 ;
   unsigned int disconnect : 1 ;
   unsigned int soft_reset : 1 ;
   unsigned int sdtr : 1 ;
   unsigned int wdtr : 1 ;
   unsigned int ppr : 1 ;
   unsigned int tagged_supported : 1 ;
   unsigned int simple_tags : 1 ;
   unsigned int ordered_tags : 1 ;
   unsigned int single_lun : 1 ;
   unsigned int was_reset : 1 ;
   unsigned int expecting_cc_ua : 1 ;
   unsigned int use_10_for_rw : 1 ;
   unsigned int use_10_for_ms : 1 ;
   unsigned int skip_ms_page_8 : 1 ;
   unsigned int skip_ms_page_3f : 1 ;
   unsigned int use_192_bytes_for_3f : 1 ;
   unsigned int no_start_on_add : 1 ;
   unsigned int allow_restart : 1 ;
   unsigned int no_uld_attach : 1 ;
   unsigned int select_no_atn : 1 ;
   unsigned int fix_capacity : 1 ;
   unsigned int retry_hwerror : 1 ;
   unsigned int device_blocked ;
   unsigned int max_device_blocked ;
   atomic_t iorequest_cnt ;
   atomic_t iodone_cnt ;
   atomic_t ioerr_cnt ;
   int timeout ;
   struct device sdev_gendev ;
   struct class_device sdev_classdev ;
   enum scsi_device_state sdev_state ;
   unsigned long sdev_data[1]/*[0]*/;
} /*__attribute__((__aligned__(sizeof(unsigned long ))))*/ ;
//#line 156 "include/scsi/scsi_device.h"
struct scsi_target {
   struct scsi_device *starget_sdev_user ;
   struct list_head siblings ;
   struct list_head devices ;
   struct device dev ;
   unsigned int reap_ref ;
   unsigned int channel ;
   unsigned int id ;
   unsigned long create : 1 ;
   char scsi_level ;
   void *hostdata ;
   unsigned long starget_data[1]/*[0]*/;
} /*__attribute__((__aligned__(sizeof(unsigned long ))))*/ ;
//#line 19 "include/scsi/scsi_request.h"
struct scsi_request {
   int sr_magic ;
   int sr_result ;
   unsigned char sr_sense_buffer[96] ;
   struct Scsi_Host *sr_host ;
   struct scsi_device *sr_device ;
   struct scsi_cmnd *sr_command ;
   struct request *sr_request ;
   unsigned int sr_bufflen ;
   void *sr_buffer ;
   int sr_allowed ;
   enum dma_data_direction sr_data_direction ;
   unsigned char sr_cmd_len ;
   unsigned char sr_cmnd[16] ;
   void (*sr_done)(struct scsi_cmnd * ) ;
   int sr_timeout_per_command ;
   unsigned short sr_use_sg ;
   unsigned short sr_sglist_len ;
   unsigned int sr_underflow ;
   void *upper_private_data ;
};
//#line 2 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_typedefs.h"
struct scsi_host_template;
//#line 2 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_typedefs.h"
typedef struct scsi_host_template Scsi_Host_Template;
//#line 126 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_priv.h"
struct scsi_transport_template;
//#line 15 "include/scsi/scsi_host.h"
struct scsi_host_cmd_pool;
//#line 35
enum scsi_eh_timer_return {
    EH_NOT_HANDLED = 0,
    EH_HANDLED = 1,
    EH_RESET_TIMER = 2
} ;
//#line 42 "include/scsi/scsi_host.h"
struct scsi_host_template {
   struct module *module ;
   char const   *name ;
   int (*detect)(struct scsi_host_template * ) ;
   int (*release)(struct Scsi_Host * ) ;
   char const   *(*info)(struct Scsi_Host * ) ;
   int (*ioctl)(struct scsi_device *dev , int cmd , void *arg ) ;
   int (*queuecommand)(struct scsi_cmnd * , void (*done)(struct scsi_cmnd * ) ) ;
   int (*eh_strategy_handler)(struct Scsi_Host * ) ;
   int (*eh_abort_handler)(struct scsi_cmnd * ) ;
   int (*eh_device_reset_handler)(struct scsi_cmnd * ) ;
   int (*eh_bus_reset_handler)(struct scsi_cmnd * ) ;
   int (*eh_host_reset_handler)(struct scsi_cmnd * ) ;
   enum scsi_eh_timer_return (*eh_timed_out)(struct scsi_cmnd * ) ;
   int (*slave_alloc)(struct scsi_device * ) ;
   int (*slave_configure)(struct scsi_device * ) ;
   void (*slave_destroy)(struct scsi_device * ) ;
   int (*target_alloc)(struct scsi_target * ) ;
   void (*target_destroy)(struct scsi_target * ) ;
   int (*change_queue_depth)(struct scsi_device * , int  ) ;
   int (*change_queue_type)(struct scsi_device * , int  ) ;
   int (*bios_param)(struct scsi_device * , struct block_device * , sector_t  , int * ) ;
   int (*proc_info)(struct Scsi_Host * , char * , char ** , off_t  , int  , int  ) ;
   char *proc_name ;
   struct proc_dir_entry *proc_dir ;
   int can_queue ;
   int this_id ;
   unsigned short sg_tablesize ;
   unsigned short max_sectors ;
   unsigned long dma_boundary ;
   short cmd_per_lun ;
   unsigned char present ;
   unsigned int unchecked_isa_dma : 1 ;
   unsigned int use_clustering : 1 ;
   unsigned int emulated : 1 ;
   unsigned int skip_settle_delay : 1 ;
   unsigned int ordered_flush : 1 ;
   unsigned int ordered_tag : 1 ;
   unsigned int max_host_blocked ;
   struct class_device_attribute **shost_attrs ;
   struct device_attribute **sdev_attrs ;
   struct list_head legacy_hosts ;
};
//#line 436
enum scsi_host_state {
    SHOST_CREATED = 1,
    SHOST_RUNNING = 2,
    SHOST_CANCEL = 3,
    SHOST_DEL = 4,
    SHOST_RECOVERY = 5,
    SHOST_CANCEL_RECOVERY = 6,
    SHOST_DEL_RECOVERY = 7
} ;
//#line 446 "include/scsi/scsi_host.h"
struct Scsi_Host {
   struct list_head __devices ;
   struct list_head __targets ;
   struct scsi_host_cmd_pool *cmd_pool ;
   spinlock_t free_list_lock ;
   struct list_head free_list ;
   struct list_head starved_list ;
   spinlock_t default_lock ;
   spinlock_t *host_lock ;
   struct semaphore scan_mutex ;
   struct list_head eh_cmd_q ;
   struct task_struct *ehandler ;
   struct semaphore *eh_action ;
   unsigned int eh_active : 1 ;
   wait_queue_head_t host_wait ;
   struct scsi_host_template *hostt ;
   struct scsi_transport_template *transportt ;
   unsigned int host_busy ;
   unsigned int host_failed ;
   unsigned short host_no ;
   int resetting ;
   unsigned long last_reset ;
   unsigned int max_id ;
   unsigned int max_lun ;
   unsigned int max_channel ;
   unsigned int unique_id ;
   unsigned char max_cmd_len ;
   int this_id ;
   int can_queue ;
   short cmd_per_lun ;
   unsigned short sg_tablesize ;
   unsigned short max_sectors ;
   unsigned long dma_boundary ;
   unsigned long cmd_serial_number ;
   unsigned long cmd_pid ;
   unsigned int unchecked_isa_dma : 1 ;
   unsigned int use_clustering : 1 ;
   unsigned int use_blk_tcq : 1 ;
   unsigned int host_self_blocked : 1 ;
   unsigned int reverse_ordering : 1 ;
   unsigned int ordered_flush : 1 ;
   unsigned int ordered_tag : 1 ;
   char work_q_name[20] ;
   struct workqueue_struct *work_q ;
   unsigned int host_blocked ;
   unsigned int max_host_blocked ;
   unsigned long base ;
   unsigned long io_port ;
   unsigned char n_io_port ;
   unsigned char dma_channel ;
   unsigned int irq ;
   enum scsi_host_state shost_state ;
   struct device shost_gendev ;
   struct class_device shost_classdev ;
   struct list_head sht_legacy_list ;
   void *shost_data ;
   unsigned long hostdata[0]  /*__attribute__((__aligned__(sizeof(unsigned long ))))*/ ;
};
//#line 205 "include/linux/ata.h"
struct ata_prd {
   u32 addr ;
   u32 flags_len ;
};
//#line 210 "include/linux/ata.h"
struct ata_taskfile {
   unsigned long flags ;
   u8 protocol ;
   u8 ctl ;
   u8 hob_feature ;
   u8 hob_nsect ;
   u8 hob_lbal ;
   u8 hob_lbam ;
   u8 hob_lbah ;
   u8 feature ;
   u8 nsect ;
   u8 lbal ;
   u8 lbam ;
   u8 lbah ;
   u8 device ;
   u8 command ;
};
//#line 172 "include/linux/libata.h"
struct ata_port_operations;
//#line 173
struct ata_port;
//#line 174
struct ata_queued_cmd;
//#line 179 "include/linux/libata.h"
struct ata_ioports {
   unsigned long cmd_addr ;
   unsigned long data_addr ;
   unsigned long error_addr ;
   unsigned long feature_addr ;
   unsigned long nsect_addr ;
   unsigned long lbal_addr ;
   unsigned long lbam_addr ;
   unsigned long lbah_addr ;
   unsigned long device_addr ;
   unsigned long status_addr ;
   unsigned long command_addr ;
   unsigned long altstatus_addr ;
   unsigned long ctl_addr ;
   unsigned long bmdma_addr ;
   unsigned long scr_addr ;
};
//#line 197 "include/linux/libata.h"
struct ata_probe_ent {
   struct list_head node ;
   struct device *dev ;
   struct ata_port_operations *port_ops ;
   Scsi_Host_Template *sht ;
   struct ata_ioports port[8] ;
   unsigned int n_ports ;
   unsigned int hard_port_no ;
   unsigned int pio_mask ;
   unsigned int mwdma_mask ;
   unsigned int udma_mask ;
   unsigned int legacy_mode ;
   unsigned long irq ;
   unsigned int irq_flags ;
   unsigned long host_flags ;
   void *mmio_base ;
   void *private_data ;
};
//#line 216 "include/linux/libata.h"
struct ata_host_set {
   spinlock_t lock ;
   struct device *dev ;
   unsigned long irq ;
   void *mmio_base ;
   unsigned int n_ports ;
   void *private_data ;
   struct ata_port_operations *ops ;
   struct ata_port *ports[1]/*[0]*/;
};
//#line 227
struct ata_device;
//#line 227 "include/linux/libata.h"
struct ata_queued_cmd {
   struct ata_port *ap ;
   struct ata_device *dev ;
   struct scsi_cmnd *scsicmd ;
   void (*scsidone)(struct scsi_cmnd * ) ;
   struct ata_taskfile tf ;
   u8 cdb[16] ;
   unsigned long flags ;
   unsigned int tag ;
   unsigned int n_elem ;
   int dma_dir ;
   unsigned int nsect ;
   unsigned int cursect ;
   unsigned int nbytes ;
   unsigned int curbytes ;
   unsigned int cursg ;
   unsigned int cursg_ofs ;
   struct scatterlist sgent ;
   void *buf_virt ;
   struct scatterlist *sg ;
   int (*complete_fn)(struct ata_queued_cmd *qc , u8 drv_stat ) ;
   struct completion *waiting ;
   void *private_data ;
};
//#line 264 "include/linux/libata.h"
struct ata_host_stats {
   unsigned long unhandled_irq ;
   unsigned long idle_irq ;
   unsigned long rw_reqbuf ;
};
//#line 270 "include/linux/libata.h"
struct ata_device {
   u64 n_sectors ;
   unsigned long flags ;
   unsigned int class ;
   unsigned int devno ;
   u16 id[256] ;
   u8 pio_mode ;
   u8 dma_mode ;
   u8 xfer_mode ;
   unsigned int xfer_shift ;
   u8 xfer_protocol ;
   u8 read_cmd ;
   u8 write_cmd ;
};
//#line 287 "include/linux/libata.h"
struct ata_port {
   struct Scsi_Host *host ;
   struct ata_port_operations *ops ;
   unsigned long flags ;
   unsigned int id ;
   unsigned int port_no ;
   unsigned int hard_port_no ;
   struct ata_prd *prd ;
   dma_addr_t prd_dma ;
   struct ata_ioports ioaddr ;
   u8 ctl ;
   u8 last_ctl ;
   unsigned int bus_state ;
   unsigned int port_state ;
   unsigned int pio_mask ;
   unsigned int mwdma_mask ;
   unsigned int udma_mask ;
   unsigned int cbl ;
   unsigned int cdb_len ;
   struct ata_device device[2] ;
   struct ata_queued_cmd qcmd[1] ;
   unsigned long qactive ;
   unsigned int active_tag ;
   struct ata_host_stats stats ;
   struct ata_host_set *host_set ;
   struct work_struct packet_task ;
   struct work_struct pio_task ;
   unsigned int pio_task_state ;
   unsigned long pio_task_timeout ;
   void *private_data ;
};
//#line 328 "include/linux/libata.h"
struct ata_port_operations {
   void (*port_disable)(struct ata_port * ) ;
   void (*dev_config)(struct ata_port * , struct ata_device * ) ;
   void (*set_piomode)(struct ata_port * , struct ata_device * ) ;
   void (*set_dmamode)(struct ata_port * , struct ata_device * ) ;
   void (*tf_load)(struct ata_port *ap , struct ata_taskfile *tf ) ;
   void (*tf_read)(struct ata_port *ap , struct ata_taskfile *tf ) ;
   void (*exec_command)(struct ata_port *ap , struct ata_taskfile *tf ) ;
   u8 (*check_status)(struct ata_port *ap ) ;
   u8 (*check_altstatus)(struct ata_port *ap ) ;
   u8 (*check_err)(struct ata_port *ap ) ;
   void (*dev_select)(struct ata_port *ap , unsigned int device ) ;
   void (*phy_reset)(struct ata_port *ap ) ;
   void (*post_set_mode)(struct ata_port *ap ) ;
   int (*check_atapi_dma)(struct ata_queued_cmd *qc ) ;
   void (*bmdma_setup)(struct ata_queued_cmd *qc ) ;
   void (*bmdma_start)(struct ata_queued_cmd *qc ) ;
   void (*qc_prep)(struct ata_queued_cmd *qc ) ;
   int (*qc_issue)(struct ata_queued_cmd *qc ) ;
   void (*eng_timeout)(struct ata_port *ap ) ;
   irqreturn_t (*irq_handler)(int  , void * , struct pt_regs * ) ;
   void (*irq_clear)(struct ata_port * ) ;
   u32 (*scr_read)(struct ata_port *ap , unsigned int sc_reg ) ;
   void (*scr_write)(struct ata_port *ap , unsigned int sc_reg , u32 val ) ;
   int (*port_start)(struct ata_port *ap ) ;
   void (*port_stop)(struct ata_port *ap ) ;
   void (*host_stop)(struct ata_host_set *host_set ) ;
   void (*bmdma_stop)(struct ata_queued_cmd *qc ) ;
   u8 (*bmdma_status)(struct ata_port *ap ) ;
};
//#line 374 "include/linux/libata.h"
struct ata_port_info {
   Scsi_Host_Template *sht ;
   unsigned long host_flags ;
   unsigned long pio_mask ;
   unsigned long mwdma_mask ;
   unsigned long udma_mask ;
   struct ata_port_operations *port_ops ;
};
//#line 446 "include/linux/libata.h"
struct pci_bits {
   unsigned int reg ;
   unsigned int width ;
   unsigned long mask ;
   unsigned long val ;
};
//#line 1500 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
struct __anonstruct_xfer_mode_classes_119 {
   unsigned int shift ;
   u8 base ;
};
//#line 34 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata.h"
struct ata_scsi_args {
   u16 *id ;
   struct scsi_cmnd *cmd ;
   void (*done)(struct scsi_cmnd * ) ;
};
//#line 47 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-scsi.c"
typedef unsigned int (*ata_xlat_func_t)(struct ata_queued_cmd *qc , u8 *scsicmd );
//#line 6 "include/scsi/scsi_dbg.h"
struct scsi_sense_hdr;
//#line 14 "include/scsi/scsi_device.h"
struct scsi_mode_data {
   __u32 length ;
   __u16 block_descriptor_length ;
   __u8 medium_type ;
   __u8 device_specific ;
   __u8 header_length ;
   __u8 longlba : 1 ;
};
//#line 10 "include/scsi/scsi_driver.h"
struct scsi_driver {
   struct module *owner ;
   struct device_driver gendrv ;
   int (*init_command)(struct scsi_cmnd * ) ;
   void (*rescan)(struct device * ) ;
   int (*issue_flush)(struct device * , sector_t * ) ;
   int (*prepare_flush)(struct request_queue * , struct request * ) ;
   void (*end_flush)(struct request_queue * , struct request * ) ;
};
//#line 18 "include/scsi/scsi_eh.h"
struct scsi_sense_hdr {
   u8 response_code ;
   u8 sense_key ;
   u8 asc ;
   u8 ascq ;
   u8 byte4 ;
   u8 byte5 ;
   u8 byte6 ;
   u8 additional_length ;
};
//#line 35 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
struct scsi_host_sg_pool {
   size_t size ;
   char *name ;
   kmem_cache_t *slab ;
   mempool_t *pool ;
};
//#line 101 "include/linux/types.h"
typedef unsigned int uint;
//#line 88 "include/linux/kernel.h"
struct notifier_block;
//#line 14 "include/linux/notifier.h"
struct notifier_block {
   int (*notifier_call)(struct notifier_block *self , unsigned long  , void * ) ;
   struct notifier_block *next ;
   int priority ;
};
//#line 195 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi.c"
struct scsi_host_cmd_pool {
   kmem_cache_t *slab ;
   unsigned int users ;
   char *name ;
   unsigned int slab_flags ;
   unsigned int gfp_mask ;
};
//#line 1 "libata-core.cil.o"
//#pragma merger(0,"./libata-core.cil.i","")
//#line 77 "include//*asm*//bitops.h"
/*__inline*/ static void ( /*__attribute__((__always_inline__))*/ clear_bit)(int nr , unsigned long volatile   *addr ) 
{ 

  {
//#line 79
  /*__asm__  ("":)*/;
//#line 83
  return;
}
}
//#line 139 "include//*asm*//bitops.h"
/*__inline*/ static int ( /*__attribute__((__always_inline__))*/ test_and_set_bit)(int nr ,
                                                                           unsigned long volatile   *addr ) 
{ int oldbit ;

  {
//#line 143
  /*__asm__  ("":)*/;
//#line 147
  return (oldbit);
}
}
//#line 69 "include/linux/kernel.h"
extern void __might_sleep(char *file , int line ) ;
//#line 129
extern int ( /*__attribute__((__regparm__(0)))*/ printk)(char const   *fmt  , ...) ;
//#line 193
extern void dump_stack(void) ;
//#line 96 "include//*asm*//thread_info.h"
/*register*/ unsigned long current_stack_pointer  /*__attribute__((__used__))*/  ;
//#line 22 "include/linux/spinlock_api_smp.h"
extern void ( /*__attribute__((__regparm__(3)))*/ _spin_lock)(spinlock_t *lock )  /*__attribute__((__section__(".spinlock.text")))*/ ;
//#line 25
extern void ( /*__attribute__((__regparm__(3)))*/ _spin_lock_bh)(spinlock_t *lock )  /*__attribute__((__section__(".spinlock.text")))*/ ;
//#line 28
extern void ( /*__attribute__((__regparm__(3)))*/ _spin_lock_irq)(spinlock_t *lock )  /*__attribute__((__section__(".spinlock.text")))*/ ;
//#line 31
extern unsigned long ( /*__attribute__((__regparm__(3)))*/ _spin_lock_irqsave)(spinlock_t *lock )  /*__attribute__((__section__(".spinlock.text")))*/ ;
//#line 41
extern void ( /*__attribute__((__regparm__(3)))*/ _spin_unlock)(spinlock_t *lock )  /*__attribute__((__section__(".spinlock.text")))*/ ;
//#line 44
extern void ( /*__attribute__((__regparm__(3)))*/ _spin_unlock_bh)(spinlock_t *lock )  /*__attribute__((__section__(".spinlock.text")))*/ ;
//#line 47
extern void ( /*__attribute__((__regparm__(3)))*/ _spin_unlock_irq)(spinlock_t *lock )  /*__attribute__((__section__(".spinlock.text")))*/ ;
//#line 50
extern void ( /*__attribute__((__regparm__(3)))*/ _spin_unlock_irqrestore)(spinlock_t *lock ,
                                                                       unsigned long flags )  /*__attribute__((__section__(".spinlock.text")))*/ ;
//#line 85 "include/linux/jiffies.h"
extern unsigned long volatile   jiffies  /*__attribute__((__section__(".data")))*/ ;
//#line 103 "include//*asm*//string.h"
/*__inline*/ static int ( /*__attribute__((__always_inline__))*/ strcmp)(char const   *cs ,
                                                                 char const   *ct ) 
{ /*register*/ int __res ;

  {
//#line 107
  /*__asm__  ("":)*/;
//#line 121
  return (__res);
}
}
//#line 125 "include//*asm*//string.h"
/*__inline*/ static int ( /*__attribute__((__always_inline__))*/ strncmp)(char const   *cs ,
                                                                  char const   *ct ,
                                                                  size_t count ) 
{ /*register*/ int __res ;

  {
//#line 129
  /*__asm__  ("":)*/;
//#line 145
  return (__res);
}
}
//#line 226 "include//*asm*//string.h"
/*__inline*/ static void *( /*__attribute__((__always_inline__))*/ __constant_memcpy)(void *to ,
                                                                              void const   *from ,
                                                                              size_t n ) 
{ long esi ;
  long edi ;
  char *mem_7 ;
  char *mem_8 ;
  short *mem_9 ;
  short *mem_10 ;
  int *mem_11 ;
  int *mem_12 ;
  short *mem_13 ;
  short *mem_14 ;
  char *mem_15 ;
  char *mem_16 ;
  int *mem_17 ;
  int *mem_18 ;
  char *mem_19 ;
  char *mem_20 ;
  int *mem_21 ;
  int *mem_22 ;
  short *mem_23 ;
  short *mem_24 ;
  int *mem_25 ;
  int *mem_26 ;
  int *mem_27 ;
  int *mem_28 ;

  {
//#line 229
  if (! n) {
//#line 229
    return (to);
  }
//#line 231
  switch ((int )n) {
  case 1: 
//#line 232
  mem_7 = (char *)to;
//#line 232
  mem_8 = (char *)from;
//#line 232
  (*mem_7) = (*mem_8);
//#line 232
  return (to);
  case 2: 
//#line 233
  mem_9 = (short *)to;
//#line 233
  mem_10 = (short *)from;
//#line 233
  (*mem_9) = (*mem_10);
//#line 233
  return (to);
  case 4: 
//#line 234
  mem_11 = (int *)to;
//#line 234
  mem_12 = (int *)from;
//#line 234
  (*mem_11) = (*mem_12);
//#line 234
  return (to);
  case 3: 
//#line 236
  mem_13 = (short *)to;
//#line 236
  mem_14 = (short *)from;
//#line 236
  (*mem_13) = (*mem_14);
//#line 237
  mem_15 = (char *)to + 2;
//#line 237
  mem_16 = (char *)from + 2;
//#line 237
  (*mem_15) = (*mem_16);
//#line 237
  return (to);
  case 5: 
//#line 238
  mem_17 = (int *)to;
//#line 238
  mem_18 = (int *)from;
//#line 238
  (*mem_17) = (*mem_18);
//#line 239
  mem_19 = (char *)to + 4;
//#line 239
  mem_20 = (char *)from + 4;
//#line 239
  (*mem_19) = (*mem_20);
//#line 239
  return (to);
  case 6: 
//#line 240
  mem_21 = (int *)to;
//#line 240
  mem_22 = (int *)from;
//#line 240
  (*mem_21) = (*mem_22);
//#line 241
  mem_23 = (short *)to + 2;
//#line 241
  mem_24 = (short *)from + 2;
//#line 241
  (*mem_23) = (*mem_24);
//#line 241
  return (to);
  case 8: 
//#line 242
  mem_25 = (int *)to;
//#line 242
  mem_26 = (int *)from;
//#line 242
  (*mem_25) = (*mem_26);
//#line 243
  mem_27 = (int *)to + 1;
//#line 243
  mem_28 = (int *)from + 1;
//#line 243
  (*mem_27) = (*mem_28);
//#line 243
  return (to);
  }
//#line 247
  esi = (long )from;
//#line 248
  edi = (long )to;
//#line 249
  if (n >= 20U) {
//#line 252
    /*__asm__  ("":)*/;
  } else {
//#line 260
    if (n >= 16U) {
//#line 260
      /*__asm__  ("":)*/;
    }
//#line 262
    if (n >= 12U) {
//#line 262
      /*__asm__  ("":)*/;
    }
//#line 264
    if (n >= 8U) {
//#line 264
      /*__asm__  ("":)*/;
    }
//#line 266
    if (n >= 4U) {
//#line 266
      /*__asm__  ("":)*/;
    }
  }
//#line 269
  switch ((int )(n % 4U)) {
  case 0: 
//#line 271
  return (to);
  case 1: 
//#line 272
  /*__asm__  ("":)*/;
//#line 274
  return (to);
  case 2: 
//#line 275
  /*__asm__  ("":)*/;
//#line 277
  return (to);
  default: 
//#line 278
  /*__asm__  ("":)*/;
//#line 280
  return (to);
  }
}
}
//#line 370 "include//*asm*//string.h"
/*__inline*/ static void *( /*__attribute__((__always_inline__))*/ __constant_c_memset)(void *s ,
                                                                                unsigned long c ,
                                                                                size_t count ) 
{ 

  {
//#line 373
  /*__asm__  ("":)*/;
//#line 385
  return (s);
}
}
//#line 390 "include//*asm*//string.h"
/*__inline*/ static size_t ( /*__attribute__((__always_inline__))*/ strnlen)(char const   *s ,
                                                                     size_t count ) 
{ /*register*/ int __res ;

  {
//#line 394
  /*__asm__  ("":)*/;
//#line 407
  return ((unsigned int )__res);
}
}
//#line 419 "include//*asm*//string.h"
/*__inline*/ static void *( /*__attribute__((__always_inline__))*/ __constant_c_and_count_memset)(void *s ,
                                                                                          unsigned long pattern ,
                                                                                          size_t count ) 
{ unsigned char *mem_6 ;
  unsigned short *mem_7 ;
  unsigned short *mem_8 ;
  unsigned char *mem_9 ;
  unsigned long *mem_10 ;

  {
//#line 421
  switch ((int )count) {
  case 0: 
//#line 423
  return (s);
  case 1: 
//#line 425
  mem_6 = (unsigned char *)s;
//#line 425
  (*mem_6) = (unsigned char )pattern;
//#line 426
  return (s);
  case 2: 
//#line 428
  mem_7 = (unsigned short *)s;
//#line 428
  (*mem_7) = (unsigned short )pattern;
//#line 429
  return (s);
  case 3: 
//#line 431
  mem_8 = (unsigned short *)s;
//#line 431
  (*mem_8) = (unsigned short )pattern;
//#line 432
  mem_9 = (unsigned char *)s + 2;
//#line 432
  (*mem_9) = (unsigned char )pattern;
//#line 433
  return (s);
  case 4: 
//#line 435
  mem_10 = (unsigned long *)s;
//#line 435
  (*mem_10) = pattern;
//#line 436
  return (s);
  }
//#line 447
  switch ((int )(count % 4U)) {
  case 0: 
//#line 448
  /*__asm__  ("":)*/;
//#line 448
  return (s);
  case 1: 
//#line 449
  /*__asm__  ("":)*/;
//#line 449
  return (s);
  case 2: 
//#line 450
  /*__asm__  ("":)*/;
//#line 450
  return (s);
  default: 
//#line 451
  /*__asm__  ("":)*/;
//#line 451
  return (s);
  }
}
}
//#line 30 "include/linux/completion.h"
extern void ( /*__attribute__((__regparm__(3)))*/ wait_for_completion)(struct completion * ) ;
//#line 37
extern void ( /*__attribute__((__regparm__(3)))*/ complete)(struct completion * ) ;
//#line 64 "include/linux/slab.h"
extern void *kmem_cache_alloc(kmem_cache_t * , gfp_t  ) ;
//#line 76
extern struct cache_sizes *malloc_sizes/*[]*/ ;
//#line 77
extern void *__kmalloc(size_t  , gfp_t  ) ;
//#line 91
extern void __you_cannot_kmalloc_that_much(void) ;
//#line 79 "include/linux/slab.h"
/*__inline*/ static void *( /*__attribute__((__always_inline__))*/ kmalloc)(size_t size ,
                                                                    gfp_t flags ) 
{ int i ;
  kmem_cache_t *tmp ;
  void *tmp___0 ;
  void *tmp___1 ;

  {
//#line 81
  if (0) {
//#line 82
    i = 0;
//#line 2 "include/linux/kmalloc_sizes.h"
    if (size <= 32U) {
      goto found;
    } else {
//#line 2
      i ++;
    }
//#line 4
    if (size <= 64U) {
      goto found;
    } else {
//#line 4
      i ++;
    }
//#line 8
    if (size <= 128U) {
      goto found;
    } else {
//#line 8
      i ++;
    }
//#line 12
    if (size <= 256U) {
      goto found;
    } else {
//#line 12
      i ++;
    }
//#line 13
    if (size <= 512U) {
      goto found;
    } else {
//#line 13
      i ++;
    }
//#line 14
    if (size <= 1024U) {
      goto found;
    } else {
//#line 14
      i ++;
    }
//#line 15
    if (size <= 2048U) {
      goto found;
    } else {
//#line 15
      i ++;
    }
//#line 16
    if (size <= 4096U) {
      goto found;
    } else {
//#line 16
      i ++;
    }
//#line 17
    if (size <= 8192U) {
      goto found;
    } else {
//#line 17
      i ++;
    }
//#line 18
    if (size <= 16384U) {
      goto found;
    } else {
//#line 18
      i ++;
    }
//#line 19
    if (size <= 32768U) {
      goto found;
    } else {
//#line 19
      i ++;
    }
//#line 20
    if (size <= 65536U) {
      goto found;
    } else {
//#line 20
      i ++;
    }
//#line 21
    if (size <= 131072U) {
      goto found;
    } else {
//#line 21
      i ++;
    }
//#line 92 "include/linux/slab.h"
    __you_cannot_kmalloc_that_much();
    found: 
//#line 95
    if (flags & 1U) {
//#line 95
      tmp = malloc_sizes[i].cs_dmacachep;
    } else {
//#line 95
      tmp = malloc_sizes[i].cs_cachep;
    }
//#line 95
    tmp___0 = kmem_cache_alloc(tmp, flags);
//#line 95
    return (tmp___0);
  }
//#line 99
  tmp___1 = __kmalloc(size, flags);
//#line 99
  return (tmp___1);
}
}
//#line 117
extern void kfree(void const   * ) ;
//#line 39 "include/linux/timer.h"
extern void ( /*__attribute__((__regparm__(3)))*/ init_timer)(struct timer_list *timer ) ;
//#line 53 "include/linux/workqueue.h"
extern struct workqueue_struct *__create_workqueue(char const   *name , int singlethread ) ;
//#line 58
extern void destroy_workqueue(struct workqueue_struct *wq ) ;
//#line 60
extern int ( /*__attribute__((__regparm__(3)))*/ queue_work)(struct workqueue_struct *wq ,
                                                         struct work_struct *work ) ;
//#line 61
extern int ( /*__attribute__((__regparm__(3)))*/ queue_delayed_work)(struct workqueue_struct *wq ,
                                                                 struct work_struct *work ,
                                                                 unsigned long delay ) ;
//#line 49 "include/linux/kobject.h"
/*__inline*/ static char const   *( /*__attribute__((__always_inline__))*/ kobject_name)(struct kobject  const  *kobj ) 
{ 

  {
//#line 51
  return ((char const   *)kobj->k_name);
}
}
//#line 91 "include/linux/ioport.h"
extern struct resource ioport_resource ;
//#line 95
extern struct resource *____request_resource(struct resource *root , struct resource *new ) ;
//#line 113
extern struct resource *__request_region(struct resource * , unsigned long start ,
                                         unsigned long n , char const   *name ) ;
//#line 121
extern void __release_region(struct resource * , unsigned long  , unsigned long  ) ;
//#line 308 "include/linux/device.h"
/*__inline*/ static void *( /*__attribute__((__always_inline__))*/ dev_get_drvdata)(struct device *dev ) 
{ 

  {
//#line 311
  return (dev->driver_data);
}
}
//#line 314 "include/linux/device.h"
/*__inline*/ static void ( /*__attribute__((__always_inline__))*/ dev_set_drvdata)(struct device *dev ,
                                                                           void *data ) 
{ 

  {
//#line 317
  dev->driver_data = data;
//#line 318
  return;
}
}
//#line 351 "include/linux/pci.h"
extern int pci_bus_read_config_byte(struct pci_bus *bus , unsigned int devfn , int where ,
                                    u8 *val ) ;
//#line 352
extern int pci_bus_read_config_word(struct pci_bus *bus , unsigned int devfn , int where ,
                                    u16 *val ) ;
//#line 353
extern int pci_bus_read_config_dword(struct pci_bus *bus , unsigned int devfn , int where ,
                                     u32 *val ) ;
//#line 358 "include/linux/pci.h"
/*__inline*/ static int ( /*__attribute__((__always_inline__))*/ pci_read_config_byte)(struct pci_dev *dev ,
                                                                               int where ,
                                                                               u8 *val ) 
{ int tmp ;

  {
//#line 360
  tmp = pci_bus_read_config_byte(dev->bus, dev->devfn, where, val);
//#line 360
  return (tmp);
}
}
//#line 362 "include/linux/pci.h"
/*__inline*/ static int ( /*__attribute__((__always_inline__))*/ pci_read_config_word)(struct pci_dev *dev ,
                                                                               int where ,
                                                                               u16 *val ) 
{ int tmp ;

  {
//#line 364
  tmp = pci_bus_read_config_word(dev->bus, dev->devfn, where, val);
//#line 364
  return (tmp);
}
}
//#line 366 "include/linux/pci.h"
/*__inline*/ static int ( /*__attribute__((__always_inline__))*/ pci_read_config_dword)(struct pci_dev *dev ,
                                                                                int where ,
                                                                                u32 *val ) 
{ int tmp ;

  {
//#line 368
  tmp = pci_bus_read_config_dword(dev->bus, dev->devfn, where, val);
//#line 368
  return (tmp);
}
}
//#line 383
extern int pci_enable_device(struct pci_dev *dev ) ;
//#line 385
extern void pci_disable_device(struct pci_dev *dev ) ;
//#line 386
extern void pci_set_master(struct pci_dev *dev ) ;
//#line 391
extern int pci_set_dma_mask(struct pci_dev *dev , u64 mask ) ;
//#line 392
extern int pci_set_consistent_dma_mask(struct pci_dev *dev , u64 mask ) ;
//#line 420
extern int pci_request_regions(struct pci_dev * , char * ) ;
//#line 421
extern void pci_release_regions(struct pci_dev * ) ;
//#line 66 "include//*asm*/-generic/iomap.h"
extern void pci_iounmap(struct pci_dev *dev , void * ) ;
//#line 76 "include//*asm*//io.h"
/*__inline*/ static unsigned long ( /*__attribute__((__always_inline__))*/ virt_to_phys)(void volatile   *address ) 
{ 

  {
//#line 78
  return ((unsigned long )address - 3221225472UL);
}
}
//#line 124
extern void iounmap(void volatile   *addr ) ;
//#line 157 "include//*asm*//io.h"
/*__inline*/ static unsigned char ( /*__attribute__((__always_inline__))*/ readb)(void const volatile   *addr ) 
{ unsigned char volatile   *mem_2 ;

  {
//#line 159
  mem_2 = (unsigned char volatile   *)addr;
//#line 159
  return ((unsigned char )(*mem_2));
}
}
//#line 161 "include//*asm*//io.h"
/*__inline*/ static unsigned short ( /*__attribute__((__always_inline__))*/ readw)(void const volatile   *addr ) 
{ unsigned short volatile   *mem_2 ;

  {
//#line 163
  mem_2 = (unsigned short volatile   *)addr;
//#line 163
  return ((unsigned short )(*mem_2));
}
}
//#line 176 "include//*asm*//io.h"
/*__inline*/ static void ( /*__attribute__((__always_inline__))*/ writeb)(unsigned char b ,
                                                                  void volatile   *addr ) 
{ unsigned char volatile   *mem_3 ;

  {
//#line 178
  mem_3 = (unsigned char volatile   *)addr;
//#line 178
  (*mem_3) = (unsigned char volatile   )b;
//#line 179
  return;
}
}
//#line 180 "include//*asm*//io.h"
/*__inline*/ static void ( /*__attribute__((__always_inline__))*/ writew)(unsigned short b ,
                                                                  void volatile   *addr ) 
{ unsigned short volatile   *mem_3 ;

  {
//#line 182
  mem_3 = (unsigned short volatile   *)addr;
//#line 182
  (*mem_3) = (unsigned short volatile   )b;
//#line 183
  return;
}
}
//#line 184 "include//*asm*//io.h"
/*__inline*/ static void ( /*__attribute__((__always_inline__))*/ writel)(unsigned int b ,
                                                                  void volatile   *addr ) 
{ unsigned int volatile   *mem_3 ;

  {
//#line 186
  mem_3 = (unsigned int volatile   *)addr;
//#line 186
  (*mem_3) = (unsigned int volatile   )b;
//#line 187
  return;
}
}
//#line 272 "include//*asm*//io.h"
/*__inline*/ static void ( /*__attribute__((__always_inline__))*/ flush_write_buffers)(void) 
{ 

  {
//#line 274
  /*__asm__  ("":)*/;
//#line 275
  return;
}
}
//#line 377 "include//*asm*//io.h"
/*__inline*/ static void ( /*__attribute__((__always_inline__))*/ outb_local)(unsigned char value ,
                                                                      int port ) 
{ 

  {
//#line 377
  /*__asm__  ("":)*/;
//#line 377
  return;
}
}
//#line 377 "include//*asm*//io.h"
/*__inline*/ static unsigned char ( /*__attribute__((__always_inline__))*/ inb_local)(int port ) 
{ unsigned char value ;

  {
//#line 377
  /*__asm__  ("":)*/;
//#line 377
  return (value);
}
}
//#line 377 "include//*asm*//io.h"
/*__inline*/ static void ( /*__attribute__((__always_inline__))*/ outb)(unsigned char value ,
                                                                int port ) 
{ 

  {
//#line 377
  outb_local(value, port);
//#line 377
  return;
}
}
//#line 377 "include//*asm*//io.h"
/*__inline*/ static unsigned char ( /*__attribute__((__always_inline__))*/ inb)(int port ) 
{ unsigned char tmp ;

  {
//#line 377
  tmp = inb_local(port);
//#line 377
  return (tmp);
}
}
//#line 378 "include//*asm*//io.h"
/*__inline*/ static void ( /*__attribute__((__always_inline__))*/ outw_local)(unsigned short value ,
                                                                      int port ) 
{ 

  {
//#line 378
  /*__asm__  ("":)*/;
//#line 378
  return;
}
}
//#line 378 "include//*asm*//io.h"
/*__inline*/ static unsigned short ( /*__attribute__((__always_inline__))*/ inw_local)(int port ) 
{ unsigned short value ;

  {
//#line 378
  /*__asm__  ("":)*/;
//#line 378
  return (value);
}
}
//#line 378 "include//*asm*//io.h"
/*__inline*/ static void ( /*__attribute__((__always_inline__))*/ outw)(unsigned short value ,
                                                                int port ) 
{ 

  {
//#line 378
  outw_local(value, port);
//#line 378
  return;
}
}
//#line 378 "include//*asm*//io.h"
/*__inline*/ static unsigned short ( /*__attribute__((__always_inline__))*/ inw)(int port ) 
{ unsigned short tmp ;

  {
//#line 378
  tmp = inw_local(port);
//#line 378
  return (tmp);
}
}
//#line 378 "include//*asm*//io.h"
/*__inline*/ static void ( /*__attribute__((__always_inline__))*/ outsw)(int port , void const   *addr ,
                                                                 unsigned long count ) 
{ 

  {
//#line 378
  /*__asm__  ("":)*/;
//#line 378
  return;
}
}
//#line 378 "include//*asm*//io.h"
/*__inline*/ static void ( /*__attribute__((__always_inline__))*/ insw)(int port , void *addr ,
                                                                unsigned long count ) 
{ 

  {
//#line 378
  /*__asm__  ("":)*/;
//#line 378
  return;
}
}
//#line 379 "include//*asm*//io.h"
/*__inline*/ static void ( /*__attribute__((__always_inline__))*/ outl_local)(unsigned int value ,
                                                                      int port ) 
{ 

  {
//#line 379
  /*__asm__  ("":)*/;
//#line 379
  return;
}
}
//#line 379 "include//*asm*//io.h"
/*__inline*/ static void ( /*__attribute__((__always_inline__))*/ outl)(unsigned int value ,
                                                                int port ) 
{ 

  {
//#line 379
  outl_local(value, port);
//#line 379
  return;
}
}
//#line 48 "include/linux/interrupt.h"
extern int request_irq(unsigned int  , irqreturn_t (*handler)(int  , void * , struct pt_regs * ) ,
                       unsigned long  , char const   * , void * ) ;
//#line 51
extern void free_irq(unsigned int  , void * ) ;
//#line 522 "include/linux/mm.h"
extern struct page *mem_map ;
//#line 525 "include/linux/mm.h"
/*__inline*/ static void *( /*__attribute__((__always_inline__))*/ lowmem_page_address)(struct page *page ) 
{ 

  {
//#line 527
  return ((void *)(((unsigned long )(page - mem_map) << 12) + 3221225472UL));
}
}
//#line 13 "include//*asm*//dma-mapping.h"
extern void *dma_alloc_coherent(struct device *dev , size_t size , dma_addr_t *dma_handle ,
                                gfp_t flag ) ;
//#line 16
extern void dma_free_coherent(struct device *dev , size_t size , void *vaddr , dma_addr_t dma_handle ) ;
//#line 19 "include//*asm*//dma-mapping.h"
/*__inline*/ static dma_addr_t ( /*__attribute__((__always_inline__))*/ dma_map_single)(struct device *dev ,
                                                                                void *ptr ,
                                                                                size_t size ,
                                                                                enum dma_data_direction direction ) 
{ dma_addr_t tmp ;

  {
//#line 23
  while (1) {
//#line 23
    if (! (! (((int )direction == 3) != 0))) {
//#line 23
      /*__asm__  ("":)*/;
    }
//#line 23
    break;
  }
//#line 24
  flush_write_buffers();
//#line 25
  tmp = (dma_addr_t )virt_to_phys((void volatile   *)ptr);
//#line 25
  return (tmp);
}
}
//#line 28 "include//*asm*//dma-mapping.h"
/*__inline*/ static void ( /*__attribute__((__always_inline__))*/ dma_unmap_single)(struct device *dev ,
                                                                            dma_addr_t dma_addr ,
                                                                            size_t size ,
                                                                            enum dma_data_direction direction ) 
{ 

  {
//#line 32
  while (1) {
//#line 32
    if (! (! (((int )direction == 3) != 0))) {
//#line 32
      /*__asm__  ("":)*/;
    }
//#line 32
    break;
  }
//#line 33
  return;
}
}
//#line 35 "include//*asm*//dma-mapping.h"
/*__inline*/ static int ( /*__attribute__((__always_inline__))*/ dma_map_sg)(struct device *dev ,
                                                                     struct scatterlist *sg ,
                                                                     int nents , enum dma_data_direction direction ) 
{ int i ;
  struct scatterlist *mem_6 ;
  struct scatterlist *mem_7 ;
  struct scatterlist *mem_8 ;
  struct scatterlist *mem_9 ;

  {
//#line 41
  while (1) {
//#line 41
    if (! (! (((int )direction == 3) != 0))) {
//#line 41
      /*__asm__  ("":)*/;
    }
//#line 41
    break;
  }
//#line 43
  i = 0;
//#line 43
  while (i < nents) {
//#line 44
    while (1) {
//#line 44
      mem_6 = sg + i;
//#line 44
      if (! (! (! mem_6->page != 0))) {
//#line 44
        /*__asm__  ("":)*/;
      }
//#line 44
      break;
    }
//#line 46
    mem_7 = sg + i;
//#line 46
    mem_8 = sg + i;
//#line 46
    mem_9 = sg + i;
//#line 46
    mem_7->dma_address = ((unsigned int )((unsigned long )(mem_8->page - mem_map)) << 12) + mem_9->offset;
//#line 43
    i ++;
  }
//#line 49
  flush_write_buffers();
//#line 50
  return (nents);
}
}
//#line 69 "include//*asm*//dma-mapping.h"
/*__inline*/ static void ( /*__attribute__((__always_inline__))*/ dma_unmap_sg)(struct device *dev ,
                                                                        struct scatterlist *sg ,
                                                                        int nhwentries ,
                                                                        enum dma_data_direction direction ) 
{ 

  {
//#line 73
  while (1) {
//#line 73
    if (! (! (((int )direction == 3) != 0))) {
//#line 73
      /*__asm__  ("":)*/;
    }
//#line 73
    break;
  }
//#line 74
  return;
}
}
//#line 117 "include//*asm*//dma-mapping.h"
/*__inline*/ static int ( /*__attribute__((__always_inline__))*/ dma_mapping_error)(dma_addr_t dma_addr ) 
{ 

  {
//#line 120
  return (0);
}
}
//#line 21 "include/linux/highmem.h"
/*__inline*/ static void *( /*__attribute__((__always_inline__))*/ kmap)(struct page *page ) 
{ void *tmp ;

  {
//#line 23
  while (1) {
//#line 23
    __might_sleep(/*(char *)*/"include/linux/highmem.h", 23);
//#line 23
    while (1) {
//#line 23
      break;
    }
//#line 23
    break;
  }
//#line 24
  tmp = lowmem_page_address(page);
//#line 24
  return (tmp);
}
}
//#line 15 "include//*asm*//delay.h"
extern void __const_udelay(unsigned long usecs ) ;
//#line 42 "include/linux/delay.h"
extern void msleep(unsigned int msecs ) ;
//#line 152 "include/scsi/scsi_cmnd.h"
void scsi_finish_command(struct scsi_cmnd *cmd ) ;
//#line 634 "include/scsi/scsi_host.h"
extern struct Scsi_Host *scsi_host_alloc(struct scsi_host_template * , int  ) ;
//#line 635
extern int /*__attribute__((__warn_unused_result__))*/  scsi_add_host(struct Scsi_Host * ,
                                                                  struct device * ) ;
//#line 636
extern void scsi_scan_host(struct Scsi_Host * ) ;
//#line 640
extern void scsi_remove_host(struct Scsi_Host * ) ;
//#line 642
extern void scsi_host_put(struct Scsi_Host *t ) ;
//#line 648 "include/scsi/scsi_host.h"
/*__inline*/ static void ( /*__attribute__((__always_inline__))*/ scsi_assign_lock)(struct Scsi_Host *shost ,
                                                                            spinlock_t *lock ) 
{ 

  {
//#line 650
  shost->host_lock = lock;
//#line 651
  return;
}
}
//#line 253 "include/linux/ata.h"
/*__inline*/ static int ( /*__attribute__((__always_inline__))*/ atapi_cdb_len)(u16 *dev_id ) 
{ u16 tmp ;
  u16 *mem_3 ;

  {
//#line 255
  mem_3 = dev_id + 0;
//#line 255
  tmp = (unsigned short )((int )(*mem_3) & 3);
//#line 256
  switch ((int )tmp) {
  case 0: 
//#line 257
  return (12);
  case 1: 
//#line 258
  return (16);
  default: ;
//#line 259
  return (-1);
  }
}
}
//#line 263 "include/linux/ata.h"
/*__inline*/ static int ( /*__attribute__((__always_inline__))*/ is_atapi_taskfile)(struct ata_taskfile *tf ) 
{ int tmp ;

  {
//#line 265
  if ((int )tf->protocol == 5) {
//#line 265
    tmp = 1;
  } else {
//#line 265
    if ((int )tf->protocol == 6) {
//#line 265
      tmp = 1;
    } else {
//#line 265
      if ((int )tf->protocol == 7) {
//#line 265
        tmp = 1;
      } else {
//#line 265
        tmp = 0;
      }
    }
  }
//#line 265
  return (tmp);
}
}
//#line 270 "include/linux/ata.h"
/*__inline*/ static int ( /*__attribute__((__always_inline__))*/ ata_ok)(u8 status ) 
{ 

  {
//#line 272
  return (((int )status & 233) == 64);
}
}
//#line 75 "include/linux/libata.h"
/*__inline*/ static struct device *( /*__attribute__((__always_inline__))*/ pci_dev_to_dev)(struct pci_dev *pdev ) 
{ 

  {
//#line 77
  return (& pdev->dev);
}
}
//#line 384
void ata_port_probe(struct ata_port *ap ) ;
//#line 385
void __sata_phy_reset(struct ata_port *ap ) ;
//#line 386
void sata_phy_reset(struct ata_port *ap ) ;
//#line 387
void ata_bus_reset(struct ata_port *ap ) ;
//#line 388
void ata_port_disable(struct ata_port *ap ) ;
//#line 389
void ata_std_ports(struct ata_ioports *ioaddr ) ;
//#line 391
int ata_pci_init_one(struct pci_dev *pdev , struct ata_port_info **port_info , unsigned int n_ports ) ;
//#line 393
void ata_pci_remove_one(struct pci_dev *pdev ) ;
//#line 395
int ata_device_add(struct ata_probe_ent *ent ) ;
//#line 396
void ata_host_set_remove(struct ata_host_set *host_set ) ;
//#line 401
int ata_scsi_release(struct Scsi_Host *host ) ;
//#line 402
/*__inline*/ unsigned int ( /*__attribute__((__always_inline__))*/ ata_host_intr)(struct ata_port *ap ,
                                                                          struct ata_queued_cmd *qc ) ;
//#line 406
void ata_tf_load(struct ata_port *ap , struct ata_taskfile *tf ) ;
//#line 407
void ata_tf_read(struct ata_port *ap , struct ata_taskfile *tf ) ;
//#line 408
void ata_tf_to_fis(struct ata_taskfile *tf , u8 *fis , u8 pmp ) ;
//#line 409
void ata_tf_from_fis(u8 *fis , struct ata_taskfile *tf ) ;
//#line 410
void ata_noop_dev_select(struct ata_port *ap , unsigned int device ) ;
//#line 411
void ata_std_dev_select(struct ata_port *ap , unsigned int device ) ;
//#line 412
u8 ata_check_status(struct ata_port *ap ) ;
//#line 413
u8 ata_altstatus(struct ata_port *ap ) ;
//#line 414
u8 ata_chk_err(struct ata_port *ap ) ;
//#line 415
void ata_exec_command(struct ata_port *ap , struct ata_taskfile *tf ) ;
//#line 416
int ata_port_start(struct ata_port *ap ) ;
//#line 417
void ata_port_stop(struct ata_port *ap ) ;
//#line 418
void ata_host_stop(struct ata_host_set *host_set ) ;
//#line 419
irqreturn_t ata_interrupt(int irq , void *dev_instance , struct pt_regs *regs ) ;
//#line 420
void ata_qc_prep(struct ata_queued_cmd *qc ) ;
//#line 421
int ata_qc_issue_prot(struct ata_queued_cmd *qc ) ;
//#line 422
void ata_sg_init_one(struct ata_queued_cmd *qc , void *buf , unsigned int buflen ) ;
//#line 424
void ata_sg_init(struct ata_queued_cmd *qc , struct scatterlist *sg , unsigned int n_elem ) ;
//#line 426
unsigned int ata_dev_classify(struct ata_taskfile *tf ) ;
//#line 427
void ata_dev_id_string(u16 *id , unsigned char *s , unsigned int ofs , unsigned int len ) ;
//#line 429
void ata_dev_config(struct ata_port *ap , unsigned int i ) ;
//#line 430
void ata_bmdma_setup(struct ata_queued_cmd *qc ) ;
//#line 431
void ata_bmdma_start(struct ata_queued_cmd *qc ) ;
//#line 432
void ata_bmdma_stop(struct ata_queued_cmd *qc ) ;
//#line 433
u8 ata_bmdma_status(struct ata_port *ap ) ;
//#line 434
void ata_bmdma_irq_clear(struct ata_port *ap ) ;
//#line 435
void ata_qc_complete(struct ata_queued_cmd *qc , u8 drv_stat ) ;
//#line 436
void ata_eng_timeout(struct ata_port *ap ) ;
//#line 453
void ata_pci_host_stop(struct ata_host_set *host_set ) ;
//#line 454
struct ata_probe_ent *ata_pci_init_native_mode(struct pci_dev *pdev , struct ata_port_info **port ) ;
//#line 456
int pci_test_config_bits(struct pci_dev *pdev , struct pci_bits *bits ) ;
//#line 461 "include/linux/libata.h"
/*__inline*/ static unsigned int ( /*__attribute__((__always_inline__))*/ ata_tag_valid)(unsigned int tag ) 
{ int tmp ;

  {
//#line 463
  if (tag < 1U) {
//#line 463
    tmp = 1;
  } else {
//#line 463
    tmp = 0;
  }
//#line 463
  return ((unsigned int )tmp);
}
}
//#line 466 "include/linux/libata.h"
/*__inline*/ static unsigned int ( /*__attribute__((__always_inline__))*/ ata_dev_present)(struct ata_device *dev ) 
{ int tmp ;

  {
//#line 468
  if (dev->class == 1U) {
//#line 468
    tmp = 1;
  } else {
//#line 468
    if (dev->class == 3U) {
//#line 468
      tmp = 1;
    } else {
//#line 468
      tmp = 0;
    }
  }
//#line 468
  return ((unsigned int )tmp);
}
}
//#line 472 "include/linux/libata.h"
/*__inline*/ static u8 ( /*__attribute__((__always_inline__))*/ ata_chk_status)(struct ata_port *ap ) 
{ u8 tmp ;
  struct ata_port_operations *mem_3 ;
  u8 (*mem_4)(struct ata_port *ap ) ;

  {
//#line 474
  mem_3 = ap->ops;
//#line 474
  mem_4 = mem_3->check_status;
//#line 474
  tmp = ((*mem_4))(ap);
//#line 474
  return (tmp);
}
}
//#line 486 "include/linux/libata.h"
/*__inline*/ static void ( /*__attribute__((__always_inline__))*/ ata_pause)(struct ata_port *ap ) 
{ 

  {
//#line 488
  ata_altstatus(ap);
//#line 489
  __const_udelay(2000UL);
//#line 490
  return;
}
}
//#line 505 "include/linux/libata.h"
/*__inline*/ static u8 ( /*__attribute__((__always_inline__))*/ ata_busy_wait)(struct ata_port *ap ,
                                                                       unsigned int bits ,
                                                                       unsigned int max ) 
{ u8 status ;

  {
//#line 510
  while (1) {
//#line 511
    __const_udelay(42950UL);
//#line 512
    status = ata_chk_status(ap);
//#line 513
    max --;
//#line 510
    if ((unsigned int )status & bits) {
//#line 510
      if (! (max > 0U)) {
//#line 510
        break;
      }
    } else {
//#line 510
      break;
    }
  }
//#line 516
  return (status);
}
}
//#line 531 "include/linux/libata.h"
/*__inline*/ static u8 ( /*__attribute__((__always_inline__))*/ ata_wait_idle)(struct ata_port *ap ) 
{ u8 status ;
  u8 tmp ;
  unsigned long l ;

  {
//#line 533
  tmp = ata_busy_wait(ap, 136U, 1000U);
//#line 533
  status = tmp;
//#line 535
  if ((int )status & 136) {
//#line 536
    l = ap->ioaddr.status_addr;
//#line 537
    printk("<4>ATA: abnormal status 0x%X on port 0x%lX\n", status, l);
  }
//#line 542
  return (status);
}
}
//#line 545 "include/linux/libata.h"
/*__inline*/ static void ( /*__attribute__((__always_inline__))*/ ata_qc_set_polling)(struct ata_queued_cmd *qc ) 
{ 

  {
//#line 547
  qc->tf.ctl = (unsigned char )((int )qc->tf.ctl | 2);
//#line 548
  return;
}
}
//#line 550 "include/linux/libata.h"
/*__inline*/ static struct ata_queued_cmd *( /*__attribute__((__always_inline__))*/ ata_qc_from_tag)(struct ata_port *ap ,
                                                                                             unsigned int tag ) 
{ unsigned int tmp ;

  {
//#line 553
  tmp = ata_tag_valid(tag);
//#line 553
  if (tmp) {
//#line 554
    return (& ap->qcmd[tag]);
  }
//#line 555
  return ((struct ata_queued_cmd *)((void *)0));
}
}
//#line 558 "include/linux/libata.h"
/*__inline*/ static void ( /*__attribute__((__always_inline__))*/ ata_tf_init)(struct ata_port *ap ,
                                                                       struct ata_taskfile *tf ,
                                                                       unsigned int device ) 
{ 

  {
//#line 560
  __constant_c_and_count_memset((void *)tf, 0UL, sizeof((*tf)));
//#line 562
  tf->ctl = ap->ctl;
//#line 563
  if (device == 0U) {
//#line 564
    tf->device = (unsigned char)160;
  } else {
//#line 566
    tf->device = (unsigned char)176;
  }
//#line 567
  return;
}
}
//#line 581 "include/linux/libata.h"
/*__inline*/ static u8 ( /*__attribute__((__always_inline__))*/ ata_irq_on)(struct ata_port *ap ) 
{ struct ata_ioports *ioaddr ;
  u8 tmp ;
  struct ata_port_operations *mem_4 ;
  void (*mem_5)(struct ata_port * ) ;

  {
//#line 583
  ioaddr = & ap->ioaddr;
//#line 586
  ap->ctl = (unsigned char )((int )ap->ctl & -3);
//#line 587
  ap->last_ctl = ap->ctl;
//#line 589
  if (ap->flags & 64UL) {
//#line 590
    writeb(ap->ctl, (void volatile   *)((void *)ioaddr->ctl_addr));
  } else {
//#line 592
    outb(ap->ctl, (int )ioaddr->ctl_addr);
  }
//#line 593
  tmp = ata_wait_idle(ap);
//#line 595
  mem_4 = ap->ops;
//#line 595
  mem_5 = mem_4->irq_clear;
//#line 595
  ((*mem_5))(ap);
//#line 597
  return (tmp);
}
}
//#line 643 "include/linux/libata.h"
/*__inline*/ static u32 ( /*__attribute__((__always_inline__))*/ scr_read)(struct ata_port *ap ,
                                                                   unsigned int reg ) 
{ u32 tmp ;
  struct ata_port_operations *mem_4 ;
  u32 (*mem_5)(struct ata_port *ap , unsigned int sc_reg ) ;

  {
//#line 645
  mem_4 = ap->ops;
//#line 645
  mem_5 = mem_4->scr_read;
//#line 645
  tmp = ((*mem_5))(ap, reg);
//#line 645
  return (tmp);
}
}
//#line 653 "include/linux/libata.h"
/*__inline*/ static void ( /*__attribute__((__always_inline__))*/ scr_write_flush)(struct ata_port *ap ,
                                                                           unsigned int reg ,
                                                                           u32 val ) 
{ struct ata_port_operations *mem_4 ;
  void (*mem_5)(struct ata_port *ap , unsigned int sc_reg , u32 val ) ;
  struct ata_port_operations *mem_6 ;
  u32 (*mem_7)(struct ata_port *ap , unsigned int sc_reg ) ;

  {
//#line 656
  mem_4 = ap->ops;
//#line 656
  mem_5 = mem_4->scr_write;
//#line 656
  ((*mem_5))(ap, reg, val);
//#line 657
  mem_6 = ap->ops;
//#line 657
  mem_7 = mem_6->scr_read;
//#line 657
  ((*mem_7))(ap, reg);
//#line 658
  return;
}
}
//#line 660 "include/linux/libata.h"
/*__inline*/ static unsigned int ( /*__attribute__((__always_inline__))*/ sata_dev_present)(struct ata_port *ap ) 
{ int tmp___0 ;
  u32 tmp___1 ;

  {
//#line 662
  tmp___1 = scr_read(ap, 0U);
//#line 662
  if ((tmp___1 & 15U) == 3U) {
//#line 662
    tmp___0 = 1;
  } else {
//#line 662
    tmp___0 = 0;
  }
//#line 662
  return ((unsigned int )tmp___0);
}
}
//#line 41 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata.h"
int atapi_enabled ;
//#line 42
struct ata_queued_cmd *ata_qc_new_init(struct ata_port *ap , struct ata_device *dev ) ;
//#line 44
void ata_qc_free(struct ata_queued_cmd *qc ) ;
//#line 45
int ata_qc_issue(struct ata_queued_cmd *qc ) ;
//#line 46
int ata_check_atapi_dma(struct ata_queued_cmd *qc ) ;
//#line 47
void ata_dev_select(struct ata_port *ap , unsigned int device , unsigned int wait ,
                    unsigned int can_sleep ) ;
//#line 49
void ata_tf_to_host_nolock(struct ata_port *ap , struct ata_taskfile *tf ) ;
//#line 50
void swap_buf_le16(u16 *buf , unsigned int buf_words ) ;
//#line 62 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static unsigned int ata_busy_sleep(struct ata_port *ap , unsigned long tmout_pat ,
                                   unsigned long tmout ) ;
//#line 65
static void ata_set_mode(struct ata_port *ap ) ;
//#line 66
static void ata_dev_set_xfermode(struct ata_port *ap , struct ata_device *dev ) ;
//#line 67
static unsigned int ata_get_mode_mask(struct ata_port *ap , int shift ) ;
//#line 68
static int fgb(u32 bitmap ) ;
//#line 69
static int ata_choose_xfer_mode(struct ata_port *ap , u8 *xfer_mode_out , unsigned int *xfer_shift_out ) ;
//#line 72
static int ata_qc_complete_noop(struct ata_queued_cmd *qc , u8 drv_stat ) ;
//#line 73
static void __ata_qc_complete(struct ata_queued_cmd *qc ) ;
//#line 75 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static unsigned int ata_unique_id  =    1U;
//#line 76 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static struct workqueue_struct *ata_wq  ;
//#line 78 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
int atapi_enabled  =    0;
//#line 98 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static void ata_tf_load_pio(struct ata_port *ap , struct ata_taskfile *tf ) 
{ struct ata_ioports *ioaddr ;
  unsigned int is_addr ;

  {
//#line 100
  ioaddr = & ap->ioaddr;
//#line 101
  is_addr = (unsigned int )(tf->flags & 2UL);
//#line 103
  if ((int )tf->ctl != (int )ap->last_ctl) {
//#line 104
    outb(tf->ctl, (int )ioaddr->ctl_addr);
//#line 105
    ap->last_ctl = tf->ctl;
//#line 106
    ata_wait_idle(ap);
  }
//#line 109
  if (is_addr) {
//#line 109
    if (tf->flags & 1UL) {
//#line 110
      outb(tf->hob_feature, (int )ioaddr->feature_addr);
//#line 111
      outb(tf->hob_nsect, (int )ioaddr->nsect_addr);
//#line 112
      outb(tf->hob_lbal, (int )ioaddr->lbal_addr);
//#line 113
      outb(tf->hob_lbam, (int )ioaddr->lbam_addr);
//#line 114
      outb(tf->hob_lbah, (int )ioaddr->lbah_addr);
    }
  }
//#line 123
  if (is_addr) {
//#line 124
    outb(tf->feature, (int )ioaddr->feature_addr);
//#line 125
    outb(tf->nsect, (int )ioaddr->nsect_addr);
//#line 126
    outb(tf->lbal, (int )ioaddr->lbal_addr);
//#line 127
    outb(tf->lbam, (int )ioaddr->lbam_addr);
//#line 128
    outb(tf->lbah, (int )ioaddr->lbah_addr);
  }
//#line 137
  if (tf->flags & 4UL) {
//#line 138
    outb(tf->device, (int )ioaddr->device_addr);
  }
//#line 142
  ata_wait_idle(ap);
//#line 143
  return;
}
}
//#line 156 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static void ata_tf_load_mmio(struct ata_port *ap , struct ata_taskfile *tf ) 
{ struct ata_ioports *ioaddr ;
  unsigned int is_addr ;

  {
//#line 158
  ioaddr = & ap->ioaddr;
//#line 159
  is_addr = (unsigned int )(tf->flags & 2UL);
//#line 161
  if ((int )tf->ctl != (int )ap->last_ctl) {
//#line 162
    writeb(tf->ctl, (void volatile   *)((void *)ap->ioaddr.ctl_addr));
//#line 163
    ap->last_ctl = tf->ctl;
//#line 164
    ata_wait_idle(ap);
  }
//#line 167
  if (is_addr) {
//#line 167
    if (tf->flags & 1UL) {
//#line 168
      writeb(tf->hob_feature, (void volatile   *)((void *)ioaddr->feature_addr));
//#line 169
      writeb(tf->hob_nsect, (void volatile   *)((void *)ioaddr->nsect_addr));
//#line 170
      writeb(tf->hob_lbal, (void volatile   *)((void *)ioaddr->lbal_addr));
//#line 171
      writeb(tf->hob_lbam, (void volatile   *)((void *)ioaddr->lbam_addr));
//#line 172
      writeb(tf->hob_lbah, (void volatile   *)((void *)ioaddr->lbah_addr));
    }
  }
//#line 181
  if (is_addr) {
//#line 182
    writeb(tf->feature, (void volatile   *)((void *)ioaddr->feature_addr));
//#line 183
    writeb(tf->nsect, (void volatile   *)((void *)ioaddr->nsect_addr));
//#line 184
    writeb(tf->lbal, (void volatile   *)((void *)ioaddr->lbal_addr));
//#line 185
    writeb(tf->lbam, (void volatile   *)((void *)ioaddr->lbam_addr));
//#line 186
    writeb(tf->lbah, (void volatile   *)((void *)ioaddr->lbah_addr));
  }
//#line 195
  if (tf->flags & 4UL) {
//#line 196
    writeb(tf->device, (void volatile   *)((void *)ioaddr->device_addr));
  }
//#line 200
  ata_wait_idle(ap);
//#line 201
  return;
}
}
//#line 225 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
void ata_tf_load(struct ata_port *ap , struct ata_taskfile *tf ) 
{ 

  {
//#line 227
  if (ap->flags & 64UL) {
//#line 228
    ata_tf_load_mmio(ap, tf);
  } else {
//#line 230
    ata_tf_load_pio(ap, tf);
  }
//#line 231
  return;
}
}
//#line 245 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static void ata_exec_command_pio(struct ata_port *ap , struct ata_taskfile *tf ) 
{ 

  {
//#line 249
  outb(tf->command, (int )ap->ioaddr.command_addr);
//#line 250
  ata_pause(ap);
//#line 251
  return;
}
}
//#line 266 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static void ata_exec_command_mmio(struct ata_port *ap , struct ata_taskfile *tf ) 
{ 

  {
//#line 270
  writeb(tf->command, (void volatile   *)((void *)ap->ioaddr.command_addr));
//#line 271
  ata_pause(ap);
//#line 272
  return;
}
}
//#line 286 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
void ata_exec_command(struct ata_port *ap , struct ata_taskfile *tf ) 
{ 

  {
//#line 288
  if (ap->flags & 64UL) {
//#line 289
    ata_exec_command_mmio(ap, tf);
  } else {
//#line 291
    ata_exec_command_pio(ap, tf);
  }
//#line 292
  return;
}
}
//#line 9 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
int __SLIC_state_handler_installed  =    0;
//#line 10 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
int __SLIC_state_local_interrupts_enabled  =    1;
//#line 11 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
int __SLIC_state_old_irq_state  =    0;
//#line 12 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
int __SLIC_state_spinlock_locked  =    0;
//#line 13 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void *__SLIC_state_which_spinlock  =    (void *)0;
//#line 15
extern void assert(_Bool);
//#line 16 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_ERROR(char *error_string ) 
{ 

  {
//#line 16
  assert(0);
//#line 16
  return;
}
}
//#line 17
int SLIC_driver_init(void) ;
//#line 18
void SLIC_driver_exit(void) ;
//#line 20 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_spin_unlock_irqrestore_call(spinlock_t *__SLIC_arg_1 , unsigned long __SLIC_arg_2 ) 
{ 

  {
//#line 20
  return;
}
}
//#line 22 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_spin_unlock_bh_return(spinlock_t *__SLIC_arg_1 ) 
{ 

  {
//#line 22
  return;
}
}
//#line 24 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_spin_lock_entry(spinlock_t *__SLIC_arg_1 ) 
{ 

  {
//#line 24
  return;
}
}
//#line 26 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_spin_lock_bh_call(spinlock_t *__SLIC_arg_1 ) 
{ 

  {
//#line 26
  return;
}
}
//#line 28 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_spin_lock_irq_call(spinlock_t *__SLIC_arg_1 ) 
{ 

  {
//#line 28
  return;
}
}
//#line 30 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_request_irq_entry(unsigned int __SLIC_arg_1 , irqreturn_t __SLIC_arg_2 ,
                                  unsigned long __SLIC_arg_3 , char const   *__SLIC_arg_4 ,
                                  void *__SLIC_arg_5 ) 
{ 

  {
//#line 30
  return;
}
}
//#line 32 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_local_irq_disable_call(void) 
{ 

  {
//#line 32
  return;
}
}
//#line 43
extern int handler() ;
//#line 34 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_spin_unlock_irq_exit(spinlock_t *__SLIC_arg_1 ) 
{ 

  {
//#line 35
  if (__SLIC_state_which_spinlock) {
//#line 35
    if ((unsigned int )__SLIC_arg_1 == (unsigned int )__SLIC_state_which_spinlock) {
//#line 36
      if (__SLIC_state_spinlock_locked == 0) {
//#line 37
        __SLIC_ERROR(/*(char *)*/"Error: spin_unlock_irqrestore called twice in a row!");
      } else {
//#line 40
        __SLIC_state_spinlock_locked = 0;
//#line 41
        __SLIC_state_local_interrupts_enabled = 1;
//#line 42
        if (__SLIC_state_handler_installed) {
//#line 43
          handler();
        }
      }
    }
  }
//#line 47
  return;
}
}
//#line 50 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_free_irq_exit(unsigned int __SLIC_arg_1 , void *__SLIC_arg_2 ) 
{ 

  {
//#line 50
  return;
}
}
//#line 52 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_spin_lock_exit(spinlock_t *__SLIC_arg_1 ) 
{ 

  {
//#line 53
  if (__SLIC_state_which_spinlock) {
//#line 53
    if ((unsigned int )__SLIC_arg_1 == (unsigned int )__SLIC_state_which_spinlock) {
//#line 54
      if (__SLIC_state_spinlock_locked == 0) {
//#line 55
        __SLIC_state_spinlock_locked = 1;
//#line 56
        if (__SLIC_state_local_interrupts_enabled) {
//#line 57
          if (__SLIC_state_handler_installed) {
//#line 58
            handler();
          }
        }
      } else {
//#line 63
        __SLIC_ERROR(/*(char *)*/"deadlock!");
      }
    }
  }
//#line 66
  return;
}
}
//#line 69 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_local_irq_disable_exit(void) 
{ 

  {
//#line 70
  __SLIC_state_local_interrupts_enabled = 0;
//#line 71
  return;
}
}
//#line 74 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_spin_unlock_exit(spinlock_t *__SLIC_arg_1 ) 
{ 

  {
//#line 75
  if (__SLIC_state_which_spinlock) {
//#line 75
    if ((unsigned int )__SLIC_arg_1 == (unsigned int )__SLIC_state_which_spinlock) {
//#line 76
      if (__SLIC_state_spinlock_locked == 0) {
//#line 77
        __SLIC_ERROR(/*(char *)*/"Error: spin_unlock_irqrestore called twice in a row!");
      } else {
//#line 80
        __SLIC_state_spinlock_locked = 0;
//#line 81
        if (__SLIC_state_local_interrupts_enabled) {
//#line 82
          if (__SLIC_state_handler_installed) {
//#line 83
            handler();
          }
        }
      }
    }
  }
//#line 88
  return;
}
}
//#line 91 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_free_irq_entry(unsigned int __SLIC_arg_1 , void *__SLIC_arg_2 ) 
{ 

  {
//#line 92
  if (__SLIC_state_handler_installed) {
//#line 93
    __SLIC_state_handler_installed = 0;
  }
//#line 95
  return;
}
}
//#line 98 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_spin_lock_irqsave_entry(spinlock_t *__SLIC_arg_1 , unsigned long __SLIC_arg_2 ) 
{ 

  {
//#line 98
  return;
}
}
//#line 100 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_spin_lock_irq_entry(spinlock_t *__SLIC_arg_1 ) 
{ 

  {
//#line 100
  return;
}
}
//#line 102 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_spin_lock_return(spinlock_t *__SLIC_arg_1 ) 
{ 

  {
//#line 102
  return;
}
}
//#line 104 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_spin_unlock_bh_exit(spinlock_t *__SLIC_arg_1 ) 
{ 

  {
//#line 105
  if (__SLIC_state_which_spinlock) {
//#line 105
    if ((unsigned int )__SLIC_arg_1 == (unsigned int )__SLIC_state_which_spinlock) {
//#line 106
      if (__SLIC_state_spinlock_locked == 0) {
//#line 107
        __SLIC_ERROR(/*(char *)*/"Error: spin_unlock_irqrestore called twice in a row!");
      } else {
//#line 110
        __SLIC_state_spinlock_locked = 0;
//#line 111
        if (__SLIC_state_local_interrupts_enabled) {
//#line 112
          if (__SLIC_state_handler_installed) {
//#line 113
            handler();
          }
        }
      }
    }
  }
//#line 118
  return;
}
}
//#line 121 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_spin_unlock_return(spinlock_t *__SLIC_arg_1 ) 
{ 

  {
//#line 121
  return;
}
}
//#line 123 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_spin_lock_init_return(spinlock_t *__SLIC_arg_1 ) 
{ 

  {
//#line 123
  return;
}
}
//#line 125 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_spin_unlock_bh_call(spinlock_t *__SLIC_arg_1 ) 
{ 

  {
//#line 125
  return;
}
}
//#line 127 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_spin_unlock_entry(spinlock_t *__SLIC_arg_1 ) 
{ 

  {
//#line 127
  return;
}
}
//#line 129 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_spin_unlock_irqrestore_entry(spinlock_t *__SLIC_arg_1 , unsigned long __SLIC_arg_2 ) 
{ 

  {
//#line 129
  return;
}
}
//#line 131 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_spin_lock_bh_return(spinlock_t *__SLIC_arg_1 ) 
{ 

  {
//#line 131
  return;
}
}
//#line 133 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_request_irq_exit(int __SLIC_return_value , unsigned int __SLIC_arg_1 ,
                                 irqreturn_t __SLIC_arg_2 , unsigned long __SLIC_arg_3 ,
                                 char const   *__SLIC_arg_4 , void *__SLIC_arg_5 ) 
{ 

  {
//#line 134
  if (__SLIC_return_value == 0) {
//#line 135
    __SLIC_state_handler_installed = 1;
  }
//#line 137
  return;
}
}
//#line 140 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_free_irq_call(unsigned int __SLIC_arg_1 , void *__SLIC_arg_2 ) 
{ 

  {
//#line 140
  return;
}
}
//#line 142 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_spin_unlock_irq_return(spinlock_t *__SLIC_arg_1 ) 
{ 

  {
//#line 142
  return;
}
}
//#line 144 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_local_irq_enable_return(void) 
{ 

  {
//#line 144
  return;
}
}
//#line 146 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_spin_unlock_bh_entry(spinlock_t *__SLIC_arg_1 ) 
{ 

  {
//#line 146
  return;
}
}
//#line 148 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_local_irq_enable_entry(void) 
{ 

  {
//#line 148
  return;
}
}
//#line 150 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_spin_lock_bh_exit(spinlock_t *__SLIC_arg_1 ) 
{ 

  {
//#line 151
  if (__SLIC_state_which_spinlock) {
//#line 151
    if ((unsigned int )__SLIC_arg_1 == (unsigned int )__SLIC_state_which_spinlock) {
//#line 152
      if (__SLIC_state_spinlock_locked == 0) {
//#line 153
        __SLIC_state_spinlock_locked = 1;
//#line 154
        if (__SLIC_state_local_interrupts_enabled) {
//#line 155
          if (__SLIC_state_handler_installed) {
//#line 156
            handler();
          }
        }
      } else {
//#line 161
        __SLIC_ERROR(/*(char *)*/"deadlock!");
      }
    }
  }
//#line 164
  return;
}
}
//#line 167 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_spin_lock_irqsave_return(spinlock_t *__SLIC_arg_1 , unsigned long __SLIC_arg_2 ) 
{ 

  {
//#line 167
  return;
}
}
//#line 169 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_spin_unlock_call(spinlock_t *__SLIC_arg_1 ) 
{ 

  {
//#line 169
  return;
}
}
//#line 171 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_spin_unlock_irq_call(spinlock_t *__SLIC_arg_1 ) 
{ 

  {
//#line 171
  return;
}
}
//#line 173 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_spin_unlock_irq_entry(spinlock_t *__SLIC_arg_1 ) 
{ 

  {
//#line 173
  return;
}
}
//#line 175 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_local_irq_enable_exit(void) 
{ 

  {
//#line 176
  __SLIC_state_local_interrupts_enabled = 1;
//#line 177
  return;
}
}
//#line 180 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_spin_unlock_irqrestore_exit(spinlock_t *__SLIC_arg_1 , unsigned long __SLIC_arg_2 ) 
{ 

  {
//#line 181
  if (__SLIC_state_which_spinlock) {
//#line 181
    if ((unsigned int )__SLIC_arg_1 == (unsigned int )__SLIC_state_which_spinlock) {
//#line 182
      if (__SLIC_state_spinlock_locked == 0) {
//#line 183
        __SLIC_ERROR(/*(char *)*/"Error: spin_unlock_irqrestore called twice in a row!");
      } else {
//#line 186
        __SLIC_state_spinlock_locked = 0;
//#line 187
        if (__SLIC_state_old_irq_state) {
//#line 188
          __SLIC_state_local_interrupts_enabled = 1;
//#line 189
          if (__SLIC_state_handler_installed) {
//#line 190
            handler();
          }
        }
      }
    }
  }
//#line 195
  return;
}
}
//#line 198 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_spin_unlock_irqrestore_return(spinlock_t *__SLIC_arg_1 , unsigned long __SLIC_arg_2 ) 
{ 

  {
//#line 198
  return;
}
}
//#line 200 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_request_irq_call(unsigned int __SLIC_arg_1 , irqreturn_t __SLIC_arg_2 ,
                                 unsigned long __SLIC_arg_3 , char const   *__SLIC_arg_4 ,
                                 void *__SLIC_arg_5 ) 
{ 

  {
//#line 200
  return;
}
}
//#line 202 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_spin_lock_irqsave_exit(spinlock_t *__SLIC_arg_1 , unsigned long __SLIC_arg_2 ) 
{ 

  {
//#line 203
  if (__SLIC_state_which_spinlock) {
//#line 203
    if ((unsigned int )__SLIC_arg_1 == (unsigned int )__SLIC_state_which_spinlock) {
//#line 204
      if (__SLIC_state_spinlock_locked == 0) {
//#line 205
        __SLIC_state_spinlock_locked = 1;
//#line 206
        if (__SLIC_state_local_interrupts_enabled) {
//#line 207
          __SLIC_state_old_irq_state = 1;
//#line 208
          __SLIC_state_local_interrupts_enabled = 0;
        } else {
//#line 211
          __SLIC_state_old_irq_state = 0;
        }
      } else {
//#line 215
        __SLIC_ERROR(/*(char *)*/"deadlock!");
      }
    }
  }
//#line 218
  return;
}
}
//#line 221 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_spin_lock_bh_entry(spinlock_t *__SLIC_arg_1 ) 
{ 

  {
//#line 221
  return;
}
}
//#line 223 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_spin_lock_irq_return(spinlock_t *__SLIC_arg_1 ) 
{ 

  {
//#line 223
  return;
}
}
//#line 225 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_spin_lock_irq_exit(spinlock_t *__SLIC_arg_1 ) 
{ 

  {
//#line 226
  if (__SLIC_state_which_spinlock) {
//#line 226
    if ((unsigned int )__SLIC_arg_1 == (unsigned int )__SLIC_state_which_spinlock) {
//#line 227
      if (__SLIC_state_spinlock_locked == 0) {
//#line 228
        __SLIC_state_spinlock_locked = 1;
//#line 229
        __SLIC_state_local_interrupts_enabled = 0;
      } else {
//#line 232
        __SLIC_ERROR(/*(char *)*/"deadlock!");
      }
    }
  }
//#line 235
  return;
}
}
//#line 238 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_spin_lock_init_call(spinlock_t *__SLIC_arg_1 ) 
{ 

  {
//#line 238
  return;
}
}
//#line 240 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_spin_lock_irqsave_call(spinlock_t *__SLIC_arg_1 , unsigned long __SLIC_arg_2 ) 
{ 

  {
//#line 240
  return;
}
}
//#line 242 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_spin_lock_init_entry(spinlock_t *__SLIC_arg_1 ) 
{ 

  {
//#line 242
  return;
}
}
//#line 244 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_request_irq_return(int __SLIC_return_value , unsigned int __SLIC_arg_1 ,
                                   irqreturn_t __SLIC_arg_2 , unsigned long __SLIC_arg_3 ,
                                   char const   *__SLIC_arg_4 , void *__SLIC_arg_5 ) 
{ 

  {
//#line 244
  return;
}
}
//#line 246 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_spin_lock_call(spinlock_t *__SLIC_arg_1 ) 
{ 

  {
//#line 246
  return;
}
}
//#line 248 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_local_irq_disable_entry(void) 
{ 

  {
//#line 248
  return;
}
}
//#line 250 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_local_irq_disable_return(void) 
{ 

  {
//#line 250
  return;
}
}
//#line 252 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_free_irq_return(unsigned int __SLIC_arg_1 , void *__SLIC_arg_2 ) 
{ 

  {
//#line 252
  return;
}
}
//#line 254 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_spin_lock_init_exit(spinlock_t *__SLIC_arg_1 ) 
{ int tmp ;

  {
//#line 255
  if (__SLIC_arg_1) {
//#line 255
    if (! __SLIC_state_which_spinlock) {
//#line 256
      tmp = nondet_bool();
//#line 256
      if (tmp) {
//#line 257
        __SLIC_state_which_spinlock = (void *)__SLIC_arg_1;
//#line 258
        __SLIC_state_spinlock_locked = 0;
      }
    }
  }
//#line 261
  return;
}
}
//#line 264 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_fun_local_irq_enable_call(void) 
{ 

  {
//#line 264
  return;
}
}
//#line 267 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_spin_lock_irqsave(spinlock_t *__SLIC_arg_1 , unsigned long __SLIC_arg_2 ) 
{ 

  {
//#line 269
  __SLIC_fun_spin_lock_irqsave_call(__SLIC_arg_1, __SLIC_arg_2);
//#line 270
  __SLIC_fun_spin_lock_irqsave_entry(__SLIC_arg_1, __SLIC_arg_2);
//#line 271
  __SLIC_arg_2 = _spin_lock_irqsave(__SLIC_arg_1);
//#line 272
  __SLIC_fun_spin_lock_irqsave_exit(__SLIC_arg_1, __SLIC_arg_2);
//#line 273
  __SLIC_fun_spin_lock_irqsave_return(__SLIC_arg_1, __SLIC_arg_2);
//#line 274
  return;
}
}
//#line 276 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_local_irq_enable(void) 
{ 

  {
//#line 278
  __SLIC_fun_local_irq_enable_call();
//#line 279
  __SLIC_fun_local_irq_enable_entry();
//#line 280
  /*__asm__  ("":)*/;
//#line 281
  __SLIC_fun_local_irq_enable_exit();
//#line 282
  __SLIC_fun_local_irq_enable_return();
//#line 283
  return;
}
}
//#line 285 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_spin_lock_init(spinlock_t *__SLIC_arg_1 ) 
{ spinlock_t __constr_expr_0 ;

  {
//#line 287
  __SLIC_fun_spin_lock_init_call(__SLIC_arg_1);
//#line 288
  __SLIC_fun_spin_lock_init_entry(__SLIC_arg_1);
//#line 289
  while (1) {
//#line 289
    __constr_expr_0.raw_lock.slock = (unsigned int volatile   )1;
//#line 289
    __constr_expr_0.magic = 3735899821U;
//#line 289
    __constr_expr_0.owner_cpu = 4294967295U;
//#line 289
    __constr_expr_0.owner = (void *)-1L;
//#line 289
    (*__SLIC_arg_1) = __constr_expr_0;
//#line 289
    break;
  }
//#line 290
  __SLIC_fun_spin_lock_init_exit(__SLIC_arg_1);
//#line 291
  __SLIC_fun_spin_lock_init_return(__SLIC_arg_1);
//#line 292
  return;
}
}
//#line 294 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_local_irq_disable(void) 
{ 

  {
//#line 296
  __SLIC_fun_local_irq_disable_call();
//#line 297
  __SLIC_fun_local_irq_disable_entry();
//#line 298
  /*__asm__  ("":)*/;
//#line 299
  __SLIC_fun_local_irq_disable_exit();
//#line 300
  __SLIC_fun_local_irq_disable_return();
//#line 301
  return;
}
}
//#line 303 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_spin_lock_bh(spinlock_t *__SLIC_arg_1 ) 
{ 

  {
//#line 305
  __SLIC_fun_spin_lock_bh_call(__SLIC_arg_1);
//#line 306
  __SLIC_fun_spin_lock_bh_entry(__SLIC_arg_1);
//#line 307
  _spin_lock_bh(__SLIC_arg_1);
//#line 308
  __SLIC_fun_spin_lock_bh_exit(__SLIC_arg_1);
//#line 309
  __SLIC_fun_spin_lock_bh_return(__SLIC_arg_1);
//#line 310
  return;
}
}
//#line 312 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_spin_unlock(spinlock_t *__SLIC_arg_1 ) 
{ 

  {
//#line 314
  __SLIC_fun_spin_unlock_call(__SLIC_arg_1);
//#line 315
  __SLIC_fun_spin_unlock_entry(__SLIC_arg_1);
//#line 316
  _spin_unlock(__SLIC_arg_1);
//#line 317
  __SLIC_fun_spin_unlock_exit(__SLIC_arg_1);
//#line 318
  __SLIC_fun_spin_unlock_return(__SLIC_arg_1);
//#line 319
  return;
}
}
//#line 321 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_spin_unlock_irq(spinlock_t *__SLIC_arg_1 ) 
{ 

  {
//#line 323
  __SLIC_fun_spin_unlock_irq_call(__SLIC_arg_1);
//#line 324
  __SLIC_fun_spin_unlock_irq_entry(__SLIC_arg_1);
//#line 325
  _spin_unlock_irq(__SLIC_arg_1);
//#line 326
  __SLIC_fun_spin_unlock_irq_exit(__SLIC_arg_1);
//#line 327
  __SLIC_fun_spin_unlock_irq_return(__SLIC_arg_1);
//#line 328
  return;
}
}
//#line 330 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_spin_lock(spinlock_t *__SLIC_arg_1 ) 
{ 

  {
//#line 332
  __SLIC_fun_spin_lock_call(__SLIC_arg_1);
//#line 333
  __SLIC_fun_spin_lock_entry(__SLIC_arg_1);
//#line 334
  _spin_lock(__SLIC_arg_1);
//#line 335
  __SLIC_fun_spin_lock_exit(__SLIC_arg_1);
//#line 336
  __SLIC_fun_spin_lock_return(__SLIC_arg_1);
//#line 337
  return;
}
}
//#line 339 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
int __SLIC_request_irq(unsigned int __SLIC_arg_1 , irqreturn_t __SLIC_arg_2 , unsigned long __SLIC_arg_3 ,
                       char const   *__SLIC_arg_4 , void *__SLIC_arg_5 ) 
{ int __SLIC_request_irq_return ;
  int tmp ;

  {
//#line 341
  __SLIC_fun_request_irq_call(__SLIC_arg_1, __SLIC_arg_2, __SLIC_arg_3, __SLIC_arg_4,
                              __SLIC_arg_5);
//#line 342
  __SLIC_fun_request_irq_entry(__SLIC_arg_1, __SLIC_arg_2, __SLIC_arg_3, __SLIC_arg_4,
                               __SLIC_arg_5);
//#line 343
  tmp = request_irq(__SLIC_arg_1, (irqreturn_t (*)(int  , void * , struct pt_regs * ))__SLIC_arg_2,
                    __SLIC_arg_3, __SLIC_arg_4, __SLIC_arg_5);
//#line 343
  __SLIC_request_irq_return = tmp;
//#line 344
  __SLIC_fun_request_irq_exit(__SLIC_request_irq_return, __SLIC_arg_1, __SLIC_arg_2,
                              __SLIC_arg_3, __SLIC_arg_4, __SLIC_arg_5);
//#line 345
  __SLIC_fun_request_irq_return(__SLIC_request_irq_return, __SLIC_arg_1, __SLIC_arg_2,
                                __SLIC_arg_3, __SLIC_arg_4, __SLIC_arg_5);
//#line 346
  return (__SLIC_request_irq_return);
}
}
//#line 349 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_spin_lock_irq(spinlock_t *__SLIC_arg_1 ) 
{ 

  {
//#line 351
  __SLIC_fun_spin_lock_irq_call(__SLIC_arg_1);
//#line 352
  __SLIC_fun_spin_lock_irq_entry(__SLIC_arg_1);
//#line 353
  _spin_lock_irq(__SLIC_arg_1);
//#line 354
  __SLIC_fun_spin_lock_irq_exit(__SLIC_arg_1);
//#line 355
  __SLIC_fun_spin_lock_irq_return(__SLIC_arg_1);
//#line 356
  return;
}
}
//#line 358 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_spin_unlock_irqrestore(spinlock_t *__SLIC_arg_1 , unsigned long __SLIC_arg_2 ) 
{ 

  {
//#line 360
  __SLIC_fun_spin_unlock_irqrestore_call(__SLIC_arg_1, __SLIC_arg_2);
//#line 361
  __SLIC_fun_spin_unlock_irqrestore_entry(__SLIC_arg_1, __SLIC_arg_2);
//#line 362
  _spin_unlock_irqrestore(__SLIC_arg_1, __SLIC_arg_2);
//#line 363
  __SLIC_fun_spin_unlock_irqrestore_exit(__SLIC_arg_1, __SLIC_arg_2);
//#line 364
  __SLIC_fun_spin_unlock_irqrestore_return(__SLIC_arg_1, __SLIC_arg_2);
//#line 365
  return;
}
}
//#line 367 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_free_irq(unsigned int __SLIC_arg_1 , void *__SLIC_arg_2 ) 
{ 

  {
//#line 369
  __SLIC_fun_free_irq_call(__SLIC_arg_1, __SLIC_arg_2);
//#line 370
  __SLIC_fun_free_irq_entry(__SLIC_arg_1, __SLIC_arg_2);
//#line 371
  free_irq(__SLIC_arg_1, __SLIC_arg_2);
//#line 372
  __SLIC_fun_free_irq_exit(__SLIC_arg_1, __SLIC_arg_2);
//#line 373
  __SLIC_fun_free_irq_return(__SLIC_arg_1, __SLIC_arg_2);
//#line 374
  return;
}
}
//#line 376 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
void __SLIC_spin_unlock_bh(spinlock_t *__SLIC_arg_1 ) 
{ 

  {
//#line 378
  __SLIC_fun_spin_unlock_bh_call(__SLIC_arg_1);
//#line 379
  __SLIC_fun_spin_unlock_bh_entry(__SLIC_arg_1);
//#line 380
  _spin_unlock_bh(__SLIC_arg_1);
//#line 381
  __SLIC_fun_spin_unlock_bh_exit(__SLIC_arg_1);
//#line 382
  __SLIC_fun_spin_unlock_bh_return(__SLIC_arg_1);
//#line 383
  return;
}
}

//#line 307 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
/*__inline*/ static void ( /*__attribute__((__always_inline__))*/ ata_exec)(struct ata_port *ap ,
                                                                    struct ata_taskfile *tf ) 
{ unsigned long flags ;
  struct ata_host_set *mem_4 ;
  struct ata_port_operations *mem_5 ;
  void (*mem_6)(struct ata_port *ap , struct ata_taskfile *tf ) ;
  struct ata_host_set *mem_7 ;

  {
//#line 312
  mem_4 = ap->host_set;
//#line 312
  __SLIC_spin_lock_irqsave(& mem_4->lock, flags);
//#line 313
  mem_5 = ap->ops;
//#line 313
  mem_6 = mem_5->exec_command;
//#line 313
  ((*mem_6))(ap, tf);
//#line 314
  mem_7 = ap->host_set;
//#line 314
  __SLIC_spin_unlock_irqrestore(& mem_7->lock, flags);
//#line 315
  return;
}
}
//#line 330 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static void ata_tf_to_host(struct ata_port *ap , struct ata_taskfile *tf ) 
{ struct ata_port_operations *mem_3 ;
  void (*mem_4)(struct ata_port *ap , struct ata_taskfile *tf ) ;

  {
//#line 332
  mem_3 = ap->ops;
//#line 332
  mem_4 = mem_3->tf_load;
//#line 332
  ((*mem_4))(ap, tf);
//#line 334
  ata_exec(ap, tf);
//#line 335
  return;
}
}
//#line 350 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
void ata_tf_to_host_nolock(struct ata_port *ap , struct ata_taskfile *tf ) 
{ struct ata_port_operations *mem_3 ;
  void (*mem_4)(struct ata_port *ap , struct ata_taskfile *tf ) ;
  struct ata_port_operations *mem_5 ;
  void (*mem_6)(struct ata_port *ap , struct ata_taskfile *tf ) ;

  {
//#line 352
  mem_3 = ap->ops;
//#line 352
  mem_4 = mem_3->tf_load;
//#line 352
  ((*mem_4))(ap, tf);
//#line 353
  mem_5 = ap->ops;
//#line 353
  mem_6 = mem_5->exec_command;
//#line 353
  ((*mem_6))(ap, tf);
//#line 354
  return;
}
}
//#line 368 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static void ata_tf_read_pio(struct ata_port *ap , struct ata_taskfile *tf ) 
{ struct ata_ioports *ioaddr ;

  {
//#line 370
  ioaddr = & ap->ioaddr;
//#line 372
  tf->nsect = inb((int )ioaddr->nsect_addr);
//#line 373
  tf->lbal = inb((int )ioaddr->lbal_addr);
//#line 374
  tf->lbam = inb((int )ioaddr->lbam_addr);
//#line 375
  tf->lbah = inb((int )ioaddr->lbah_addr);
//#line 376
  tf->device = inb((int )ioaddr->device_addr);
//#line 378
  if (tf->flags & 1UL) {
//#line 379
    outb((unsigned char )((int )tf->ctl | 128), (int )ioaddr->ctl_addr);
//#line 380
    tf->hob_feature = inb((int )ioaddr->error_addr);
//#line 381
    tf->hob_nsect = inb((int )ioaddr->nsect_addr);
//#line 382
    tf->hob_lbal = inb((int )ioaddr->lbal_addr);
//#line 383
    tf->hob_lbam = inb((int )ioaddr->lbam_addr);
//#line 384
    tf->hob_lbah = inb((int )ioaddr->lbah_addr);
  }
//#line 386
  return;
}
}
//#line 400 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static void ata_tf_read_mmio(struct ata_port *ap , struct ata_taskfile *tf ) 
{ struct ata_ioports *ioaddr ;

  {
//#line 402
  ioaddr = & ap->ioaddr;
//#line 404
  tf->nsect = readb((void const volatile   *)((void *)ioaddr->nsect_addr));
//#line 405
  tf->lbal = readb((void const volatile   *)((void *)ioaddr->lbal_addr));
//#line 406
  tf->lbam = readb((void const volatile   *)((void *)ioaddr->lbam_addr));
//#line 407
  tf->lbah = readb((void const volatile   *)((void *)ioaddr->lbah_addr));
//#line 408
  tf->device = readb((void const volatile   *)((void *)ioaddr->device_addr));
//#line 410
  if (tf->flags & 1UL) {
//#line 411
    writeb((unsigned char )((int )tf->ctl | 128), (void volatile   *)((void *)ap->ioaddr.ctl_addr));
//#line 412
    tf->hob_feature = readb((void const volatile   *)((void *)ioaddr->error_addr));
//#line 413
    tf->hob_nsect = readb((void const volatile   *)((void *)ioaddr->nsect_addr));
//#line 414
    tf->hob_lbal = readb((void const volatile   *)((void *)ioaddr->lbal_addr));
//#line 415
    tf->hob_lbam = readb((void const volatile   *)((void *)ioaddr->lbam_addr));
//#line 416
    tf->hob_lbah = readb((void const volatile   *)((void *)ioaddr->lbah_addr));
  }
//#line 418
  return;
}
}
//#line 437 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
void ata_tf_read(struct ata_port *ap , struct ata_taskfile *tf ) 
{ 

  {
//#line 439
  if (ap->flags & 64UL) {
//#line 440
    ata_tf_read_mmio(ap, tf);
  } else {
//#line 442
    ata_tf_read_pio(ap, tf);
  }
//#line 443
  return;
}
}
//#line 456 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static u8 ata_check_status_pio(struct ata_port *ap ) 
{ u8 tmp ;

  {
//#line 458
  tmp = inb((int )ap->ioaddr.status_addr);
//#line 458
  return (tmp);
}
}
//#line 472 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static u8 ata_check_status_mmio(struct ata_port *ap ) 
{ u8 tmp ;

  {
//#line 474
  tmp = readb((void const volatile   *)((void *)ap->ioaddr.status_addr));
//#line 474
  return (tmp);
}
}
//#line 491 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
u8 ata_check_status(struct ata_port *ap ) 
{ u8 tmp ;
  u8 tmp___0 ;

  {
//#line 493
  if (ap->flags & 64UL) {
//#line 494
    tmp = ata_check_status_mmio(ap);
//#line 494
    return (tmp);
  }
//#line 495
  tmp___0 = ata_check_status_pio(ap);
//#line 495
  return (tmp___0);
}
}
//#line 512 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
u8 ata_altstatus(struct ata_port *ap ) 
{ u8 tmp ;
  u8 tmp___0 ;
  u8 tmp___1 ;
  struct ata_port_operations *mem_5 ;
  struct ata_port_operations *mem_6 ;
  u8 (*mem_7)(struct ata_port *ap ) ;

  {
//#line 514
  mem_5 = ap->ops;
//#line 514
  if (mem_5->check_altstatus) {
//#line 515
    mem_6 = ap->ops;
//#line 515
    mem_7 = mem_6->check_altstatus;
//#line 515
    tmp = ((*mem_7))(ap);
//#line 515
    return (tmp);
  }
//#line 517
  if (ap->flags & 64UL) {
//#line 518
    tmp___0 = readb((void const volatile   *)((void *)ap->ioaddr.altstatus_addr));
//#line 518
    return (tmp___0);
  }
//#line 519
  tmp___1 = inb((int )ap->ioaddr.altstatus_addr);
//#line 519
  return (tmp___1);
}
}
//#line 536 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
u8 ata_chk_err(struct ata_port *ap ) 
{ u8 tmp ;
  u8 tmp___0 ;
  u8 tmp___1 ;
  struct ata_port_operations *mem_5 ;
  struct ata_port_operations *mem_6 ;
  u8 (*mem_7)(struct ata_port *ap ) ;

  {
//#line 538
  mem_5 = ap->ops;
//#line 538
  if (mem_5->check_err) {
//#line 539
    mem_6 = ap->ops;
//#line 539
    mem_7 = mem_6->check_err;
//#line 539
    tmp = ((*mem_7))(ap);
//#line 539
    return (tmp);
  }
//#line 541
  if (ap->flags & 64UL) {
//#line 542
    tmp___0 = readb((void const volatile   *)((void *)ap->ioaddr.error_addr));
//#line 542
    return (tmp___0);
  }
//#line 544
  tmp___1 = inb((int )ap->ioaddr.error_addr);
//#line 544
  return (tmp___1);
}
}
//#line 560 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
void ata_tf_to_fis(struct ata_taskfile *tf , u8 *fis , u8 pmp ) 
{ u8 *mem_4 ;
  u8 *mem_5 ;
  u8 *mem_6 ;
  u8 *mem_7 ;
  u8 *mem_8 ;
  u8 *mem_9 ;
  u8 *mem_10 ;
  u8 *mem_11 ;
  u8 *mem_12 ;
  u8 *mem_13 ;
  u8 *mem_14 ;
  u8 *mem_15 ;
  u8 *mem_16 ;
  u8 *mem_17 ;
  u8 *mem_18 ;
  u8 *mem_19 ;
  u8 *mem_20 ;
  u8 *mem_21 ;
  u8 *mem_22 ;
  u8 *mem_23 ;

  {
//#line 562
  mem_4 = fis + 0;
//#line 562
  (*mem_4) = (unsigned char)39;
//#line 563
  mem_5 = fis + 1;
//#line 563
  (*mem_5) = (unsigned char )(((int )pmp & 15) | 128);
//#line 565
  mem_6 = fis + 2;
//#line 565
  (*mem_6) = tf->command;
//#line 566
  mem_7 = fis + 3;
//#line 566
  (*mem_7) = tf->feature;
//#line 568
  mem_8 = fis + 4;
//#line 568
  (*mem_8) = tf->lbal;
//#line 569
  mem_9 = fis + 5;
//#line 569
  (*mem_9) = tf->lbam;
//#line 570
  mem_10 = fis + 6;
//#line 570
  (*mem_10) = tf->lbah;
//#line 571
  mem_11 = fis + 7;
//#line 571
  (*mem_11) = tf->device;
//#line 573
  mem_12 = fis + 8;
//#line 573
  (*mem_12) = tf->hob_lbal;
//#line 574
  mem_13 = fis + 9;
//#line 574
  (*mem_13) = tf->hob_lbam;
//#line 575
  mem_14 = fis + 10;
//#line 575
  (*mem_14) = tf->hob_lbah;
//#line 576
  mem_15 = fis + 11;
//#line 576
  (*mem_15) = tf->hob_feature;
//#line 578
  mem_16 = fis + 12;
//#line 578
  (*mem_16) = tf->nsect;
//#line 579
  mem_17 = fis + 13;
//#line 579
  (*mem_17) = tf->hob_nsect;
//#line 580
  mem_18 = fis + 14;
//#line 580
  (*mem_18) = (unsigned char)0;
//#line 581
  mem_19 = fis + 15;
//#line 581
  (*mem_19) = tf->ctl;
//#line 583
  mem_20 = fis + 16;
//#line 583
  (*mem_20) = (unsigned char)0;
//#line 584
  mem_21 = fis + 17;
//#line 584
  (*mem_21) = (unsigned char)0;
//#line 585
  mem_22 = fis + 18;
//#line 585
  (*mem_22) = (unsigned char)0;
//#line 586
  mem_23 = fis + 19;
//#line 586
  (*mem_23) = (unsigned char)0;
//#line 587
  return;
}
}
//#line 601 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
void ata_tf_from_fis(u8 *fis , struct ata_taskfile *tf ) 
{ u8 *mem_3 ;
  u8 *mem_4 ;
  u8 *mem_5 ;
  u8 *mem_6 ;
  u8 *mem_7 ;
  u8 *mem_8 ;
  u8 *mem_9 ;
  u8 *mem_10 ;
  u8 *mem_11 ;
  u8 *mem_12 ;
  u8 *mem_13 ;

  {
//#line 603
  mem_3 = fis + 2;
//#line 603
  tf->command = (*mem_3);
//#line 604
  mem_4 = fis + 3;
//#line 604
  tf->feature = (*mem_4);
//#line 606
  mem_5 = fis + 4;
//#line 606
  tf->lbal = (*mem_5);
//#line 607
  mem_6 = fis + 5;
//#line 607
  tf->lbam = (*mem_6);
//#line 608
  mem_7 = fis + 6;
//#line 608
  tf->lbah = (*mem_7);
//#line 609
  mem_8 = fis + 7;
//#line 609
  tf->device = (*mem_8);
//#line 611
  mem_9 = fis + 8;
//#line 611
  tf->hob_lbal = (*mem_9);
//#line 612
  mem_10 = fis + 9;
//#line 612
  tf->hob_lbam = (*mem_10);
//#line 613
  mem_11 = fis + 10;
//#line 613
  tf->hob_lbah = (*mem_11);
//#line 615
  mem_12 = fis + 12;
//#line 615
  tf->nsect = (*mem_12);
//#line 616
  mem_13 = fis + 13;
//#line 616
  tf->hob_nsect = (*mem_13);
//#line 617
  return;
}
}
//#line 630 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static int ata_prot_to_cmd(int protocol , int lba48 ) 
{ int rcmd ;
  int wcmd ;

  {
//#line 632
  rcmd = 0;
//#line 632
  wcmd = 0;
//#line 634
  switch (protocol) {
  case 2: 
//#line 636
  if (lba48) {
//#line 637
    rcmd = 36;
//#line 638
    wcmd = 52;
  } else {
//#line 640
    rcmd = 32;
//#line 641
    wcmd = 48;
  }
//#line 643
  break;
  case 4: 
//#line 646
  if (lba48) {
//#line 647
    rcmd = 37;
//#line 648
    wcmd = 53;
  } else {
//#line 650
    rcmd = 200;
//#line 651
    wcmd = 202;
  }
//#line 653
  break;
  default: ;
//#line 656
  return (-1);
  }
//#line 659
  return (rcmd | (wcmd << 8));
}
}
//#line 675 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static void ata_dev_set_protocol(struct ata_device *dev ) 
{ int pio ;
  int lba48 ;
  int proto ;
  int cmd ;

  {
//#line 677
  pio = (int )(dev->flags & 2UL);
//#line 678
  lba48 = (int )(dev->flags & 1UL);
//#line 681
  if (pio) {
//#line 682
    dev->xfer_protocol = (unsigned char)2;
//#line 682
    proto = (int )dev->xfer_protocol;
  } else {
//#line 684
    dev->xfer_protocol = (unsigned char)4;
//#line 684
    proto = (int )dev->xfer_protocol;
  }
//#line 686
  cmd = ata_prot_to_cmd(proto, lba48);
//#line 687
  if (cmd < 0) {
//#line 688
    /*__asm__  ("":)*/;
  }
//#line 690
  dev->read_cmd = (unsigned char )(cmd & 255);
//#line 691
  dev->write_cmd = (unsigned char )((cmd >> 8) & 255);
//#line 692
  return;
}
}
//#line 694 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static char const   *xfer_mode_str[16]  = 
//#line 694
  {      "UDMA/16",      "UDMA/25",      "UDMA/33",      "UDMA/44", 
        "UDMA/66",      "UDMA/100",      "UDMA/133",      "UDMA7", 
        "MWDMA0",      "MWDMA1",      "MWDMA2",      "PIO0", 
        "PIO1",      "PIO2",      "PIO3",      "PIO4"};
//#line 728 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static char const   *ata_mode_string(unsigned int mask ) 
{ int i ;

  {
//#line 732
  i = 7;
//#line 732
  while (i >= 0) {
//#line 733
    if (mask & (unsigned int )(1 << i)) {
      goto out;
    }
//#line 732
    i --;
  }
//#line 735
  i = 10;
//#line 735
  while (i >= 8) {
//#line 736
    if (mask & (unsigned int )(1 << i)) {
      goto out;
    }
//#line 735
    i --;
  }
//#line 738
  i = 15;
//#line 738
  while (i >= 11) {
//#line 739
    if (mask & (unsigned int )(1 << i)) {
      goto out;
    }
//#line 738
    i --;
  }
//#line 742
  return ("<n/a>");
  out: 
//#line 745
  return (xfer_mode_str[i]);
}
}
//#line 766 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static unsigned int ata_pio_devchk(struct ata_port *ap , unsigned int device ) 
{ struct ata_ioports *ioaddr ;
  u8 nsect ;
  u8 lbal ;
  struct ata_port_operations *mem_6 ;
  void (*mem_7)(struct ata_port *ap , unsigned int device ) ;

  {
//#line 769
  ioaddr = & ap->ioaddr;
//#line 772
  mem_6 = ap->ops;
//#line 772
  mem_7 = mem_6->dev_select;
//#line 772
  ((*mem_7))(ap, device);
//#line 774
  outb((unsigned char)85, (int )ioaddr->nsect_addr);
//#line 775
  outb((unsigned char)170, (int )ioaddr->lbal_addr);
//#line 777
  outb((unsigned char)170, (int )ioaddr->nsect_addr);
//#line 778
  outb((unsigned char)85, (int )ioaddr->lbal_addr);
//#line 780
  outb((unsigned char)85, (int )ioaddr->nsect_addr);
//#line 781
  outb((unsigned char)170, (int )ioaddr->lbal_addr);
//#line 783
  nsect = inb((int )ioaddr->nsect_addr);
//#line 784
  lbal = inb((int )ioaddr->lbal_addr);
//#line 786
  if ((int )nsect == 85) {
//#line 786
    if ((int )lbal == 170) {
//#line 787
      return (1U);
    }
  }
//#line 789
  return (0U);
}
}
//#line 810 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static unsigned int ata_mmio_devchk(struct ata_port *ap , unsigned int device ) 
{ struct ata_ioports *ioaddr ;
  u8 nsect ;
  u8 lbal ;
  struct ata_port_operations *mem_6 ;
  void (*mem_7)(struct ata_port *ap , unsigned int device ) ;

  {
//#line 813
  ioaddr = & ap->ioaddr;
//#line 816
  mem_6 = ap->ops;
//#line 816
  mem_7 = mem_6->dev_select;
//#line 816
  ((*mem_7))(ap, device);
//#line 818
  writeb((unsigned char)85, (void volatile   *)((void *)ioaddr->nsect_addr));
//#line 819
  writeb((unsigned char)170, (void volatile   *)((void *)ioaddr->lbal_addr));
//#line 821
  writeb((unsigned char)170, (void volatile   *)((void *)ioaddr->nsect_addr));
//#line 822
  writeb((unsigned char)85, (void volatile   *)((void *)ioaddr->lbal_addr));
//#line 824
  writeb((unsigned char)85, (void volatile   *)((void *)ioaddr->nsect_addr));
//#line 825
  writeb((unsigned char)170, (void volatile   *)((void *)ioaddr->lbal_addr));
//#line 827
  nsect = readb((void const volatile   *)((void *)ioaddr->nsect_addr));
//#line 828
  lbal = readb((void const volatile   *)((void *)ioaddr->lbal_addr));
//#line 830
  if ((int )nsect == 85) {
//#line 830
    if ((int )lbal == 170) {
//#line 831
      return (1U);
    }
  }
//#line 833
  return (0U);
}
}
//#line 849 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static unsigned int ata_devchk(struct ata_port *ap , unsigned int device ) 
{ unsigned int tmp ;
  unsigned int tmp___0 ;

  {
//#line 852
  if (ap->flags & 64UL) {
//#line 853
    tmp = ata_mmio_devchk(ap, device);
//#line 853
    return (tmp);
  }
//#line 854
  tmp___0 = ata_pio_devchk(ap, device);
//#line 854
  return (tmp___0);
}
}
//#line 873 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
unsigned int ata_dev_classify(struct ata_taskfile *tf ) 
{ 

  {
//#line 880
  if ((int )tf->lbam == 0) {
//#line 880
    if ((int )tf->lbah == 0) {
//#line 883
      return (1U);
    } else {
      goto _L;
    }
  } else {
    _L: 
//#line 880
    if ((int )tf->lbam == 60) {
//#line 880
      if ((int )tf->lbah == 195) {
//#line 883
        return (1U);
      }
    }
  }
//#line 886
  if ((int )tf->lbam == 20) {
//#line 886
    if ((int )tf->lbah == 235) {
//#line 889
      return (3U);
    } else {
      goto _L___0;
    }
  } else {
    _L___0: 
//#line 886
    if ((int )tf->lbam == 105) {
//#line 886
      if ((int )tf->lbah == 150) {
//#line 889
        return (3U);
      }
    }
  }
//#line 893
  return (0U);
}
}
//#line 914 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static u8 ata_dev_try_classify(struct ata_port *ap , unsigned int device ) 
{ struct ata_device *dev ;
  struct ata_taskfile tf ;
  unsigned int class ;
  u8 err ;
  u8 tmp ;
  struct ata_port_operations *mem_8 ;
  void (*mem_9)(struct ata_port *ap , unsigned int device ) ;
  struct ata_port_operations *mem_10 ;
  void (*mem_11)(struct ata_port *ap , struct ata_taskfile *tf ) ;

  {
//#line 916
  dev = & ap->device[device];
//#line 921
  mem_8 = ap->ops;
//#line 921
  mem_9 = mem_8->dev_select;
//#line 921
  ((*mem_9))(ap, device);
//#line 923
  __constant_c_and_count_memset((void *)(& tf), 0UL, sizeof(tf));
//#line 925
  err = ata_chk_err(ap);
//#line 926
  mem_10 = ap->ops;
//#line 926
  mem_11 = mem_10->tf_read;
//#line 926
  ((*mem_11))(ap, & tf);
//#line 928
  dev->class = 5U;
//#line 931
  if (! ((int )err == 1)) {
//#line 933
    if (device == 0U) {
//#line 933
      if (! ((int )err == 129)) {
//#line 936
        return (err);
      }
    } else {
//#line 936
      return (err);
    }
  }
//#line 939
  class = ata_dev_classify(& tf);
//#line 940
  if (class == 0U) {
//#line 941
    return (err);
  }
//#line 942
  if (class == 1U) {
//#line 942
    tmp = ata_chk_status(ap);
//#line 942
    if ((int )tmp == 0) {
//#line 943
      return (err);
    }
  }
//#line 945
  dev->class = class;
//#line 947
  return (err);
}
}
//#line 965 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
void ata_dev_id_string(u16 *id , unsigned char *s , unsigned int ofs , unsigned int len ) 
{ unsigned int c ;
  u16 *mem_6 ;
  u16 *mem_7 ;

  {
//#line 970
  while (len > 0U) {
//#line 971
    mem_6 = id + ofs;
//#line 971
    c = (unsigned int )((int )(*mem_6) >> 8);
//#line 972
    (*s) = (unsigned char )c;
//#line 973
    s ++;
//#line 975
    mem_7 = id + ofs;
//#line 975
    c = (unsigned int )((int )(*mem_7) & 255);
//#line 976
    (*s) = (unsigned char )c;
//#line 977
    s ++;
//#line 979
    ofs ++;
//#line 980
    len -= 2U;
  }
//#line 982
  return;
}
}
//#line 997 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
void ata_noop_dev_select(struct ata_port *ap , unsigned int device ) 
{ 

  {
//#line 999
  return;
}
}
//#line 1017 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
void ata_std_dev_select(struct ata_port *ap , unsigned int device ) 
{ u8 tmp ;

  {
//#line 1021
  if (device == 0U) {
//#line 1022
    tmp = (unsigned char)160;
  } else {
//#line 1024
    tmp = (unsigned char)176;
  }
//#line 1026
  if (ap->flags & 64UL) {
//#line 1027
    writeb(tmp, (void volatile   *)((void *)ap->ioaddr.device_addr));
  } else {
//#line 1029
    outb(tmp, (int )ap->ioaddr.device_addr);
  }
//#line 1031
  ata_pause(ap);
//#line 1032
  return;
}
}
//#line 1053 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
void ata_dev_select(struct ata_port *ap , unsigned int device , unsigned int wait ,
                    unsigned int can_sleep ) 
{ struct ata_port_operations *mem_5 ;
  void (*mem_6)(struct ata_port *ap , unsigned int device ) ;

  {
//#line 1059
  if (wait) {
//#line 1060
    ata_wait_idle(ap);
  }
//#line 1062
  mem_5 = ap->ops;
//#line 1062
  mem_6 = mem_5->dev_select;
//#line 1062
  ((*mem_6))(ap, device);
//#line 1064
  if (wait) {
//#line 1065
    if (can_sleep) {
//#line 1065
      if (ap->device[device].class == 3U) {
//#line 1066
        msleep(150U);
      }
    }
//#line 1067
    ata_wait_idle(ap);
  }
//#line 1069
  return;
}
}
//#line 1082 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
/*__inline*/ static void ( /*__attribute__((__always_inline__))*/ ata_dump_id)(struct ata_device *dev ) 
{ 

  {
//#line 1108
  return;
}
}
//#line 1132 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static void ata_dev_identify(struct ata_port *ap , unsigned int device ) 
{ struct ata_device *dev ;
  unsigned int i ;
  u16 tmp ;
  unsigned long xfer_modes ;
  u8 status ;
  unsigned int using_edd ;
  struct completion wait ;
  struct ata_queued_cmd *qc ;
  unsigned long flags ;
  int rc ;
  unsigned int tmp___0 ;
  u8 err ;
  u8 tmp___1 ;
  char const   *tmp___2 ;
  char const   *tmp___3 ;
  char const   *tmp___4 ;
  struct ata_host_set *mem_19 ;
  struct ata_host_set *mem_20 ;
  struct Scsi_Host *mem_21 ;
  struct Scsi_Host *mem_22 ;

  {
//#line 1134
  dev = & ap->device[device];
//#line 1140
  wait.done = 0U;
//#line 1140
  wait.wait.lock.raw_lock.slock = (unsigned int volatile   )1;
//#line 1140
  wait.wait.lock.magic = 3735899821U;
//#line 1140
  wait.wait.lock.owner_cpu = 4294967295U;
//#line 1140
  wait.wait.lock.owner = (void *)-1L;
//#line 1140
  wait.wait.task_list.next = & wait.wait.task_list;
//#line 1140
  wait.wait.task_list.prev = & wait.wait.task_list;
//#line 1145
  tmp___0 = ata_dev_present(dev);
//#line 1145
  if (! tmp___0) {
//#line 1148
    return;
  }
//#line 1151
  if (ap->flags & 160UL) {
//#line 1152
    using_edd = 0U;
  } else {
//#line 1154
    using_edd = 1U;
  }
//#line 1158
  if (! (dev->class == 1U)) {
//#line 1158
    if (! (dev->class == 3U)) {
//#line 1158
      if (! (dev->class == 5U)) {
//#line 1158
        printk("<3>Assertion failed! %s,%s,%s,line=%d\n", "dev->class == ATA_DEV_ATA || dev->class == ATA_DEV_ATAPI || dev->class == ATA_DEV_NONE",
               "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c",
               "ata_dev_identify", 1159);
      }
    }
  }
//#line 1161
  ata_dev_select(ap, device, 1U, 1U);
//#line 1163
  qc = ata_qc_new_init(ap, dev);
//#line 1164
  while (1) {
//#line 1164
    if (! (! (((unsigned int )qc == (unsigned int )((void *)0)) != 0))) {
//#line 1164
      /*__asm__  ("":)*/;
    }
//#line 1164
    break;
  }
//#line 1166
  ata_sg_init_one(qc, (void *)(dev->id), sizeof(dev->id));
//#line 1167
  qc->dma_dir = 2;
//#line 1168
  qc->tf.protocol = (unsigned char)2;
//#line 1169
  qc->nsect = 1U;
  retry: 
//#line 1172
  if (dev->class == 1U) {
//#line 1173
    qc->tf.command = (unsigned char)236;
  } else {
//#line 1176
    qc->tf.command = (unsigned char)161;
  }
//#line 1180
  qc->waiting = & wait;
//#line 1181
  qc->complete_fn = & ata_qc_complete_noop;
//#line 1183
  mem_19 = ap->host_set;
//#line 1183
  __SLIC_spin_lock_irqsave(& mem_19->lock, flags);
//#line 1184
  rc = ata_qc_issue(qc);
//#line 1185
  mem_20 = ap->host_set;
//#line 1185
  __SLIC_spin_unlock_irqrestore(& mem_20->lock, flags);
//#line 1187
  if (rc) {
    goto err_out;
  } else {
//#line 1190
    wait_for_completion(& wait);
  }
//#line 1192
  status = ata_chk_status(ap);
//#line 1193
  if ((int )status & 1) {
//#line 1205
    if (using_edd) {
//#line 1205
      if ((int )qc->tf.command == 236) {
//#line 1206
        tmp___1 = ata_chk_err(ap);
//#line 1206
        err = tmp___1;
//#line 1207
        if ((int )err & 4) {
//#line 1208
          dev->class = 3U;
//#line 1209
          qc->cursg = 0U;
//#line 1210
          qc->cursg_ofs = 0U;
//#line 1211
          qc->cursect = 0U;
//#line 1212
          qc->nsect = 1U;
          goto retry;
        }
      }
    }
    goto err_out;
  }
//#line 1219
  swap_buf_le16(dev->id, 256U);
//#line 1222
  printk("<7>ata%u: dev %u cfg 49:%04x 82:%04x 83:%04x 84:%04x 85:%04x 86:%04x 87:%04x 88:%04x\n",
         ap->id, device, dev->id[49], dev->id[82], dev->id[83], dev->id[84], dev->id[85],
         dev->id[86], dev->id[87], dev->id[88]);
//#line 1234
  if (! ((int )dev->id[49] & 256)) {
//#line 1235
    printk("<7>ata%u: no dma/lba\n", ap->id);
    goto err_out_nosup;
  } else {
//#line 1234
    if (! ((int )dev->id[49] & 512)) {
//#line 1235
      printk("<7>ata%u: no dma/lba\n", ap->id);
      goto err_out_nosup;
    }
  }
//#line 1240
  xfer_modes = (unsigned long )dev->id[88];
//#line 1241
  if (! xfer_modes) {
//#line 1242
    xfer_modes = (unsigned long )((int )dev->id[63] << 8);
  }
//#line 1243
  if (! xfer_modes) {
//#line 1244
    xfer_modes = (unsigned long )((int )dev->id[64] << 14);
//#line 1245
    xfer_modes |= 14336UL;
  }
//#line 1248
  ata_dump_id(dev);
//#line 1251
  if (dev->class == 1U) {
//#line 1252
    if (! (((int )dev->id[0] & 32768) == 0)) {
      goto err_out_nosup;
    }
//#line 1255
    tmp = dev->id[80];
//#line 1256
    i = 14U;
//#line 1256
    while (i >= 1U) {
//#line 1257
      if ((int )tmp & (1 << i)) {
//#line 1258
        break;
      }
//#line 1256
      i --;
    }
//#line 1261
    if (i < 3U) {
//#line 1262
      printk("<7>ata%u: no ATA-3\n", ap->id);
      goto err_out_nosup;
    }
//#line 1266
    if ((int )dev->id[83] & 1024) {
//#line 1267
      dev->flags |= 1UL;
//#line 1268
      dev->n_sectors = ((((unsigned long long )dev->id[103] << 48) | ((unsigned long long )dev->id[102] << 32)) | ((unsigned long long )dev->id[101] << 16)) | (unsigned long long )dev->id[100];
    } else {
//#line 1270
      dev->n_sectors = (unsigned long long )(((unsigned int )dev->id[61] << 16) | (unsigned int )dev->id[60]);
    }
//#line 1273
    mem_21 = ap->host;
//#line 1273
    mem_21->max_cmd_len = (unsigned char)16;
//#line 1276
    if (dev->flags & 1UL) {
//#line 1276
      tmp___2 = " lba48";
    } else {
//#line 1276
      tmp___2 = "";
    }
//#line 1276
    tmp___3 = ata_mode_string((unsigned int )xfer_modes);
//#line 1276
    printk("<6>ata%u: dev %u ATA, max %s, %Lu sectors:%s\n", ap->id, device, tmp___3,
           dev->n_sectors, tmp___2);
  } else {
//#line 1285
    if (((int )dev->id[0] & 32768) == 0) {
      goto err_out_nosup;
    }
//#line 1288
    rc = atapi_cdb_len(dev->id);
//#line 1289
    if (rc < 12) {
//#line 1290
      printk("<4>ata%u: unsupported CDB len\n", ap->id);
      goto err_out_nosup;
    } else {
//#line 1289
      if (rc > 16) {
//#line 1290
        printk("<4>ata%u: unsupported CDB len\n", ap->id);
        goto err_out_nosup;
      }
    }
//#line 1293
    ap->cdb_len = (unsigned int )rc;
//#line 1294
    mem_22 = ap->host;
//#line 1294
    mem_22->max_cmd_len = (unsigned char )ap->cdb_len;
//#line 1297
    tmp___4 = ata_mode_string((unsigned int )xfer_modes);
//#line 1297
    printk("<6>ata%u: dev %u ATAPI, max %s\n", ap->id, device, tmp___4);
  }
//#line 1303
  return;
  err_out_nosup: 
//#line 1306
  printk("<4>ata%u: dev %u not supported, ignoring\n", ap->id, device);
  err_out: 
//#line 1309
  dev->class ++;
//#line 1311
  return;
}
}
//#line 1314 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
/*__inline*/ static u8 ( /*__attribute__((__always_inline__))*/ ata_dev_knobble)(struct ata_port *ap ) 
{ int tmp ;

  {
//#line 1316
  if (ap->cbl == 4U) {
//#line 1316
    if (! ((int )ap->device[0].id[93] == 0)) {
//#line 1316
      tmp = 1;
    } else {
//#line 1316
      tmp = 0;
    }
  } else {
//#line 1316
    tmp = 0;
  }
//#line 1316
  return ((unsigned char )tmp);
}
}
//#line 1328 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
void ata_dev_config(struct ata_port *ap , unsigned int i ) 
{ u8 tmp ;
  struct Scsi_Host *mem_4 ;
  struct Scsi_Host *mem_5 ;
  struct scsi_host_template *mem_6 ;
  struct ata_port_operations *mem_7 ;
  struct ata_port_operations *mem_8 ;
  void (*mem_9)(struct ata_port * , struct ata_device * ) ;

  {
//#line 1331
  tmp = ata_dev_knobble(ap);
//#line 1331
  if (tmp) {
//#line 1332
    printk("<6>ata%u(%u): applying bridge limits\n", ap->id, ap->device[0].devno);
//#line 1334
    ap->udma_mask &= 63U;
//#line 1335
    mem_4 = ap->host;
//#line 1335
    mem_4->max_sectors = (unsigned short)200;
//#line 1336
    mem_5 = ap->host;
//#line 1336
    mem_6 = mem_5->hostt;
//#line 1336
    mem_6->max_sectors = (unsigned short)200;
//#line 1337
    ap->device[0].flags |= 4UL;
  }
//#line 1340
  mem_7 = ap->ops;
//#line 1340
  if (mem_7->dev_config) {
//#line 1341
    mem_8 = ap->ops;
//#line 1341
    mem_9 = mem_8->dev_config;
//#line 1341
    ((*mem_9))(ap, & ap->device[i]);
  }
//#line 1342
  return;
}
}
//#line 1359 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static int ata_bus_probe(struct ata_port *ap ) 
{ unsigned int i ;
  unsigned int found ;
  unsigned int tmp ;
  struct ata_port_operations *mem_5 ;
  void (*mem_6)(struct ata_port *ap ) ;
  struct ata_port_operations *mem_7 ;
  void (*mem_8)(struct ata_port * ) ;

  {
//#line 1361
  found = 0U;
//#line 1363
  mem_5 = ap->ops;
//#line 1363
  mem_6 = mem_5->phy_reset;
//#line 1363
  ((*mem_6))(ap);
//#line 1364
  if (ap->flags & 4UL) {
    goto err_out;
  }
//#line 1367
  i = 0U;
//#line 1367
  while (i < 2U) {
//#line 1368
    ata_dev_identify(ap, i);
//#line 1369
    tmp = ata_dev_present(& ap->device[i]);
//#line 1369
    if (tmp) {
//#line 1370
      found = 1U;
//#line 1371
      ata_dev_config(ap, i);
    }
//#line 1367
    i ++;
  }
//#line 1375
  if (! found) {
    goto err_out_disable;
  } else {
//#line 1375
    if (ap->flags & 4UL) {
      goto err_out_disable;
    }
  }
//#line 1378
  ata_set_mode(ap);
//#line 1379
  if (ap->flags & 4UL) {
    goto err_out_disable;
  }
//#line 1382
  return (0);
  err_out_disable: 
//#line 1385
  mem_7 = ap->ops;
//#line 1385
  mem_8 = mem_7->port_disable;
//#line 1385
  ((*mem_8))(ap);
  err_out: 
//#line 1387
  return (-1);
}
}
//#line 1401 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
void ata_port_probe(struct ata_port *ap ) 
{ 

  {
//#line 1403
  ap->flags &= 4294967291UL;
//#line 1404
  return;
}
}
//#line 1418 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
void __sata_phy_reset(struct ata_port *ap ) 
{ u32 sstatus ;
  unsigned long timeout ;
  unsigned int tmp___0 ;
  unsigned int tmp___1 ;

  {
//#line 1421
  timeout = (unsigned long )(jiffies + 1250UL);
//#line 1423
  if (ap->flags & 128UL) {
//#line 1425
    scr_write_flush(ap, 2U, 769U);
//#line 1428
    __const_udelay(4295000UL);
  }
//#line 1430
  scr_write_flush(ap, 2U, 768U);
//#line 1438
  while (1) {
//#line 1434
    msleep(200U);
//#line 1435
    sstatus = scr_read(ap, 0U);
//#line 1436
    if ((sstatus & 15U) != 1U) {
//#line 1437
      break;
    }
//#line 1438
    if (! ((long )jiffies - (long )timeout < 0L)) {
//#line 1433
      break;
    }
  }
//#line 1441
  tmp___0 = sata_dev_present(ap);
//#line 1441
  if (tmp___0) {
//#line 1442
    ata_port_probe(ap);
  } else {
//#line 1444
    sstatus = scr_read(ap, 0U);
//#line 1445
    printk("<6>ata%u: no device found (phy stat %08x)\n", ap->id, sstatus);
//#line 1447
    ata_port_disable(ap);
  }
//#line 1450
  if (ap->flags & 4UL) {
//#line 1451
    return;
  }
//#line 1453
  tmp___1 = ata_busy_sleep(ap, 1750UL, 7500UL);
//#line 1453
  if (tmp___1) {
//#line 1454
    ata_port_disable(ap);
//#line 1455
    return;
  }
//#line 1458
  ap->cbl = 4U;
//#line 1459
  return;
}
}
//#line 1472 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
void sata_phy_reset(struct ata_port *ap ) 
{ 

  {
//#line 1474
  __sata_phy_reset(ap);
//#line 1475
  if (ap->flags & 4UL) {
//#line 1476
    return;
  }
//#line 1477
  ata_bus_reset(ap);
//#line 1478
  return;
}
}
//#line 1493 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
void ata_port_disable(struct ata_port *ap ) 
{ 

  {
//#line 1495
  ap->device[0].class = 5U;
//#line 1496
  ap->device[1].class = 5U;
//#line 1497
  ap->flags |= 4UL;
//#line 1498
  return;
}
}
//#line 1500 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static struct __anonstruct_xfer_mode_classes_119 xfer_mode_classes[3]  = {      {0U, (unsigned char)64}, 
        {8U, (unsigned char)32}, 
        {11U, (unsigned char)8}};
//#line 1509 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
/*__inline*/ static u8 ( /*__attribute__((__always_inline__))*/ base_from_shift)(unsigned int shift ) 
{ int i ;

  {
//#line 1513
  i = 0;
//#line 1513
  while ((unsigned int )i < sizeof(xfer_mode_classes) / sizeof(xfer_mode_classes[0])) {
//#line 1514
    if (xfer_mode_classes[i].shift == shift) {
//#line 1515
      return (xfer_mode_classes[i].base);
    }
//#line 1513
    i ++;
  }
//#line 1517
  return ((unsigned char)255);
}
}
//#line 1520 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static void ata_dev_set_mode(struct ata_port *ap , struct ata_device *dev ) 
{ int ofs ;
  int idx ;
  u8 base ;
  unsigned int tmp ;

  {
//#line 1525
  tmp = ata_dev_present(dev);
//#line 1525
  if (tmp) {
//#line 1525
    if (ap->flags & 4UL) {
//#line 1526
      return;
    }
  } else {
//#line 1526
    return;
  }
//#line 1528
  if (dev->xfer_shift == 11U) {
//#line 1529
    dev->flags |= 2UL;
  }
//#line 1531
  ata_dev_set_xfermode(ap, dev);
//#line 1533
  base = base_from_shift(dev->xfer_shift);
//#line 1534
  ofs = (int )dev->xfer_mode - (int )base;
//#line 1535
  idx = (int )((unsigned int )ofs + dev->xfer_shift);
//#line 1536
  while (1) {
//#line 1536
    if (! (! (((unsigned int )idx >= sizeof(xfer_mode_str) / sizeof(xfer_mode_str[0])) != 0))) {
//#line 1536
      printk("Badness in %s at %s:%d\n", "ata_dev_set_mode", "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c",
             1536);
//#line 1536
      dump_stack();
    }
//#line 1536
    break;
  }
//#line 1541
  printk("<6>ata%u: dev %u configured for %s\n", ap->id, dev->devno, xfer_mode_str[idx]);
//#line 1543
  return;
}
}
//#line 1545 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static int ata_host_set_pio(struct ata_port *ap ) 
{ unsigned int mask ;
  int x ;
  int i ;
  u8 base ;
  u8 xfer_mode ;
  struct ata_device *dev ;
  unsigned int tmp ;
  struct ata_port_operations *mem_9 ;
  struct ata_port_operations *mem_10 ;
  void (*mem_11)(struct ata_port * , struct ata_device * ) ;

  {
//#line 1551
  mask = ata_get_mode_mask(ap, 11);
//#line 1552
  x = fgb(mask);
//#line 1553
  if (x < 0) {
//#line 1554
    printk("<4>ata%u: no PIO support\n", ap->id);
//#line 1555
    return (-1);
  }
//#line 1558
  base = base_from_shift(11U);
//#line 1559
  xfer_mode = (unsigned char )((int )base + x);
//#line 1564
  i = 0;
//#line 1564
  while (i < 2) {
//#line 1565
    dev = & ap->device[i];
//#line 1566
    tmp = ata_dev_present(dev);
//#line 1566
    if (tmp) {
//#line 1567
      dev->pio_mode = xfer_mode;
//#line 1568
      dev->xfer_mode = xfer_mode;
//#line 1569
      dev->xfer_shift = 11U;
//#line 1570
      mem_9 = ap->ops;
//#line 1570
      if (mem_9->set_piomode) {
//#line 1571
        mem_10 = ap->ops;
//#line 1571
        mem_11 = mem_10->set_piomode;
//#line 1571
        ((*mem_11))(ap, dev);
      }
    }
//#line 1564
    i ++;
  }
//#line 1575
  return (0);
}
}
//#line 1578 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static void ata_host_set_dma(struct ata_port *ap , u8 xfer_mode , unsigned int xfer_shift ) 
{ int i ;
  struct ata_device *dev ;
  unsigned int tmp ;
  struct ata_port_operations *mem_7 ;
  struct ata_port_operations *mem_8 ;
  void (*mem_9)(struct ata_port * , struct ata_device * ) ;

  {
//#line 1583
  i = 0;
//#line 1583
  while (i < 2) {
//#line 1584
    dev = & ap->device[i];
//#line 1585
    tmp = ata_dev_present(dev);
//#line 1585
    if (tmp) {
//#line 1586
      dev->dma_mode = xfer_mode;
//#line 1587
      dev->xfer_mode = xfer_mode;
//#line 1588
      dev->xfer_shift = xfer_shift;
//#line 1589
      mem_7 = ap->ops;
//#line 1589
      if (mem_7->set_dmamode) {
//#line 1590
        mem_8 = ap->ops;
//#line 1590
        mem_9 = mem_8->set_dmamode;
//#line 1590
        ((*mem_9))(ap, dev);
      }
    }
//#line 1583
    i ++;
  }
//#line 1593
  return;
}
}
//#line 1605 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static void ata_set_mode(struct ata_port *ap ) 
{ unsigned int i ;
  unsigned int xfer_shift ;
  u8 xfer_mode ;
  int rc ;
  struct ata_device *dev ;
  struct ata_port_operations *mem_7 ;
  struct ata_port_operations *mem_8 ;
  void (*mem_9)(struct ata_port *ap ) ;

  {
//#line 1612
  rc = ata_host_set_pio(ap);
//#line 1613
  if (rc) {
    goto err_out;
  }
//#line 1617
  xfer_shift = 0U;
//#line 1617
  xfer_mode = (unsigned char )xfer_shift;
//#line 1618
  rc = ata_choose_xfer_mode(ap, & xfer_mode, & xfer_shift);
//#line 1619
  if (rc) {
    goto err_out;
  }
//#line 1623
  if (xfer_shift != 11U) {
//#line 1624
    ata_host_set_dma(ap, xfer_mode, xfer_shift);
  }
//#line 1627
  ata_dev_set_mode(ap, & ap->device[0]);
//#line 1628
  ata_dev_set_mode(ap, & ap->device[1]);
//#line 1630
  if (ap->flags & 4UL) {
//#line 1631
    return;
  }
//#line 1633
  mem_7 = ap->ops;
//#line 1633
  if (mem_7->post_set_mode) {
//#line 1634
    mem_8 = ap->ops;
//#line 1634
    mem_9 = mem_8->post_set_mode;
//#line 1634
    ((*mem_9))(ap);
  }
//#line 1636
  i = 0U;
//#line 1636
  while (i < 2U) {
//#line 1637
    dev = & ap->device[i];
//#line 1638
    ata_dev_set_protocol(dev);
//#line 1636
    i ++;
  }
//#line 1641
  return;
  err_out: 
//#line 1644
  ata_port_disable(ap);
//#line 1645
  return;
}
}
//#line 1660 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static unsigned int ata_busy_sleep(struct ata_port *ap , unsigned long tmout_pat ,
                                   unsigned long tmout ) 
{ unsigned long timer_start ;
  unsigned long timeout ;
  u8 status ;

  {
//#line 1667
  status = ata_busy_wait(ap, 128U, 300U);
//#line 1668
  timer_start = (unsigned long )jiffies;
//#line 1669
  timeout = timer_start + tmout_pat;
//#line 1670
  while (1) {
//#line 1670
    if ((int )status & 128) {
//#line 1670
      if (! ((long )jiffies - (long )timeout < 0L)) {
//#line 1670
        break;
      }
    } else {
//#line 1670
      break;
    }
//#line 1671
    msleep(50U);
//#line 1672
    status = ata_busy_wait(ap, 128U, 3U);
  }
//#line 1675
  if ((int )status & 128) {
//#line 1676
    printk("<4>ata%u is slow to respond, please be patient\n", ap->id);
  }
//#line 1679
  timeout = timer_start + tmout;
//#line 1680
  while (1) {
//#line 1680
    if ((int )status & 128) {
//#line 1680
      if (! ((long )jiffies - (long )timeout < 0L)) {
//#line 1680
        break;
      }
    } else {
//#line 1680
      break;
    }
//#line 1681
    msleep(50U);
//#line 1682
    status = ata_chk_status(ap);
  }
//#line 1685
  if ((int )status & 128) {
//#line 1686
    printk("<3>ata%u failed to respond (%lu secs)\n", ap->id, tmout / 250UL);
//#line 1688
    return (1U);
  }
//#line 1691
  return (0U);
}
}
//#line 1694 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static void ata_bus_post_reset(struct ata_port *ap , unsigned int devmask ) 
{ struct ata_ioports *ioaddr ;
  unsigned int dev0 ;
  unsigned int dev1 ;
  unsigned long timeout ;
  u8 nsect ;
  u8 lbal ;
  struct ata_port_operations *mem_13 ;
  void (*mem_14)(struct ata_port *ap , unsigned int device ) ;
  struct ata_port_operations *mem_15 ;
  void (*mem_16)(struct ata_port *ap , unsigned int device ) ;
  struct ata_port_operations *mem_17 ;
  void (*mem_18)(struct ata_port *ap , unsigned int device ) ;
  struct ata_port_operations *mem_19 ;
  void (*mem_20)(struct ata_port *ap , unsigned int device ) ;

  {
//#line 1696
  ioaddr = & ap->ioaddr;
//#line 1697
  dev0 = devmask & 1U;
//#line 1698
  dev1 = devmask & 2U;
//#line 1704
  if (dev0) {
//#line 1705
    ata_busy_sleep(ap, 1750UL, 7500UL);
  }
//#line 1710
  timeout = (unsigned long )(jiffies + 7500UL);
//#line 1711
  while (dev1) {
//#line 1714
    mem_13 = ap->ops;
//#line 1714
    mem_14 = mem_13->dev_select;
//#line 1714
    ((*mem_14))(ap, 1U);
//#line 1715
    if (ap->flags & 64UL) {
//#line 1716
      nsect = readb((void const volatile   *)((void *)ioaddr->nsect_addr));
//#line 1717
      lbal = readb((void const volatile   *)((void *)ioaddr->lbal_addr));
    } else {
//#line 1719
      nsect = inb((int )ioaddr->nsect_addr);
//#line 1720
      lbal = inb((int )ioaddr->lbal_addr);
    }
//#line 1722
    if ((int )nsect == 1) {
//#line 1722
      if ((int )lbal == 1) {
//#line 1723
        break;
      }
    }
//#line 1724
    if ((long )timeout - (long )jiffies < 0L) {
//#line 1725
      dev1 = 0U;
//#line 1726
      break;
    }
//#line 1728
    msleep(50U);
  }
//#line 1730
  if (dev1) {
//#line 1731
    ata_busy_sleep(ap, 1750UL, 7500UL);
  }
//#line 1734
  mem_15 = ap->ops;
//#line 1734
  mem_16 = mem_15->dev_select;
//#line 1734
  ((*mem_16))(ap, 0U);
//#line 1735
  if (dev1) {
//#line 1736
    mem_17 = ap->ops;
//#line 1736
    mem_18 = mem_17->dev_select;
//#line 1736
    ((*mem_18))(ap, 1U);
  }
//#line 1737
  if (dev0) {
//#line 1738
    mem_19 = ap->ops;
//#line 1738
    mem_20 = mem_19->dev_select;
//#line 1738
    ((*mem_20))(ap, 0U);
  }
//#line 1739
  return;
}
}
//#line 1753 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static unsigned int ata_bus_edd(struct ata_port *ap ) 
{ struct ata_taskfile tf ;
  unsigned int tmp ;

  {
//#line 1760
  ata_tf_init(ap, & tf, 0U);
//#line 1761
  tf.ctl = (unsigned char )((int )tf.ctl | 2);
//#line 1762
  tf.command = (unsigned char)144;
//#line 1763
  tf.protocol = (unsigned char)1;
//#line 1766
  ata_tf_to_host(ap, & tf);
//#line 1771
  msleep(150U);
//#line 1773
  tmp = ata_busy_sleep(ap, 1750UL, 7500UL);
//#line 1773
  return (tmp);
}
}
//#line 1776 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static unsigned int ata_bus_softreset(struct ata_port *ap , unsigned int devmask ) 
{ struct ata_ioports *ioaddr ;

  {
//#line 1779
  ioaddr = & ap->ioaddr;
//#line 1784
  if (ap->flags & 64UL) {
//#line 1785
    writeb(ap->ctl, (void volatile   *)((void *)ioaddr->ctl_addr));
//#line 1786
    __const_udelay(85900UL);
//#line 1787
    writeb((unsigned char )((int )ap->ctl | 4), (void volatile   *)((void *)ioaddr->ctl_addr));
//#line 1788
    __const_udelay(85900UL);
//#line 1789
    writeb(ap->ctl, (void volatile   *)((void *)ioaddr->ctl_addr));
  } else {
//#line 1791
    outb(ap->ctl, (int )ioaddr->ctl_addr);
//#line 1792
    __const_udelay(42950UL);
//#line 1793
    outb((unsigned char )((int )ap->ctl | 4), (int )ioaddr->ctl_addr);
//#line 1794
    __const_udelay(42950UL);
//#line 1795
    outb(ap->ctl, (int )ioaddr->ctl_addr);
  }
//#line 1806
  msleep(150U);
//#line 1808
  ata_bus_post_reset(ap, devmask);
//#line 1810
  return (0U);
}
}
//#line 1833 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
void ata_bus_reset(struct ata_port *ap ) 
{ struct ata_ioports *ioaddr ;
  unsigned int slave_possible ;
  u8 err ;
  unsigned int dev0 ;
  unsigned int dev1 ;
  unsigned int rc ;
  unsigned int devmask ;
  struct ata_port_operations *mem_9 ;
  void (*mem_10)(struct ata_port *ap , unsigned int device ) ;
  struct ata_port_operations *mem_11 ;
  void (*mem_12)(struct ata_port *ap , unsigned int device ) ;
  struct ata_port_operations *mem_13 ;
  void (*mem_14)(struct ata_port *ap , unsigned int device ) ;
  struct ata_port_operations *mem_15 ;
  void (*mem_16)(struct ata_port * ) ;

  {
//#line 1835
  ioaddr = & ap->ioaddr;
//#line 1836
  slave_possible = (unsigned int )(ap->flags & 2UL);
//#line 1838
  dev1 = 0U;
//#line 1838
  rc = 0U;
//#line 1838
  devmask = 0U;
//#line 1843
  if (ap->flags & 128UL) {
//#line 1844
    dev0 = 1U;
  } else {
//#line 1846
    dev0 = ata_devchk(ap, 0U);
//#line 1847
    if (slave_possible) {
//#line 1848
      dev1 = ata_devchk(ap, 1U);
    }
  }
//#line 1851
  if (dev0) {
//#line 1852
    devmask |= 1U;
  }
//#line 1853
  if (dev1) {
//#line 1854
    devmask |= 2U;
  }
//#line 1857
  mem_9 = ap->ops;
//#line 1857
  mem_10 = mem_9->dev_select;
//#line 1857
  ((*mem_10))(ap, 0U);
//#line 1860
  if (ap->flags & 32UL) {
//#line 1861
    rc = ata_bus_softreset(ap, devmask);
  } else {
//#line 1862
    if ((ap->flags & 128UL) == 0UL) {
//#line 1864
      if (ap->flags & 64UL) {
//#line 1865
        writeb(ap->ctl, (void volatile   *)((void *)ioaddr->ctl_addr));
      } else {
//#line 1867
        outb(ap->ctl, (int )ioaddr->ctl_addr);
      }
//#line 1868
      rc = ata_bus_edd(ap);
    }
  }
//#line 1871
  if (rc) {
    goto err_out;
  }
//#line 1877
  err = ata_dev_try_classify(ap, 0U);
//#line 1878
  if (slave_possible) {
//#line 1878
    if ((int )err != 129) {
//#line 1879
      ata_dev_try_classify(ap, 1U);
    }
  }
//#line 1882
  if (ap->ioaddr.ctl_addr) {
//#line 1883
    ata_irq_on(ap);
  }
//#line 1886
  if (ap->device[1].class != 5U) {
//#line 1887
    mem_11 = ap->ops;
//#line 1887
    mem_12 = mem_11->dev_select;
//#line 1887
    ((*mem_12))(ap, 1U);
  }
//#line 1888
  if (ap->device[0].class != 5U) {
//#line 1889
    mem_13 = ap->ops;
//#line 1889
    mem_14 = mem_13->dev_select;
//#line 1889
    ((*mem_14))(ap, 0U);
  }
//#line 1892
  if (ap->device[0].class == 5U) {
//#line 1892
    if (ap->device[1].class == 5U) {
      goto err_out;
    }
  }
//#line 1896
  if (ap->flags & 160UL) {
//#line 1898
    if (ap->flags & 64UL) {
//#line 1899
      writeb(ap->ctl, (void volatile   *)((void *)ioaddr->ctl_addr));
    } else {
//#line 1901
      outb(ap->ctl, (int )ioaddr->ctl_addr);
    }
  }
//#line 1905
  return;
  err_out: 
//#line 1908
  printk("<3>ata%u: disabling port\n", ap->id);
//#line 1909
  mem_15 = ap->ops;
//#line 1909
  mem_16 = mem_15->port_disable;
//#line 1909
  ((*mem_16))(ap);
//#line 1912
  return;
}
}
//#line 1914 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static void ata_pr_blacklisted(struct ata_port *ap , struct ata_device *dev ) 
{ 

  {
//#line 1916
  printk("<4>ata%u: dev %u is on DMA blacklist, disabling DMA\n", ap->id, dev->devno);
//#line 1918
  return;
}
}
//#line 1920 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static char const   *ata_dma_blacklist[29]  = 
//#line 1920
  {      "WDC AC11000H",      "WDC AC22100H",      "WDC AC32500H",      "WDC AC33100H", 
        "WDC AC31600H",      "WDC AC32100H",      "WDC AC23200L",      "Compaq CRD-8241B", 
        "CRD-8400B",      "CRD-8480B",      "CRD-8482B",      "CRD-84", 
        "SanDisk SDP3B",      "SanDisk SDP3B-64",      "SANYO CD-ROM CRD",      "HITACHI CDR-8", 
        "HITACHI CDR-8335",      "HITACHI CDR-8435",      "Toshiba CD-ROM XM-6202B",      "TOSHIBA CD-ROM XM-1702BC", 
        "CD-532E-A",      "E-IDE CD-ROM CR-840",      "CD-ROM Drive/F5A",      "WPI CDD-820", 
        "SAMSUNG CD-ROM SC-148C",      "SAMSUNG CD-ROM SC",      "SanDisk SDP3B-64",      "ATAPI CD-ROM DRIVE 40X MAXIMUM", 
        "_NEC DV5800A"};
//#line 1952 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static int ata_dma_blacklisted(struct ata_port *ap , struct ata_device *dev ) 
{ unsigned char model_num[40] ;
  char *s ;
  unsigned int len ;
  int i ;
  int tmp ;
  char *mem_8 ;
  char *mem_9 ;

  {
//#line 1959
  ata_dev_id_string(dev->id, model_num, 27U, sizeof(model_num));
//#line 1961
  s = (char *)(model_num);
//#line 1962
  len = strnlen((char const   *)s, sizeof(model_num));
//#line 1965
  while (1) {
//#line 1965
    if (len > 0U) {
//#line 1965
      mem_8 = s + (len - 1U);
//#line 1965
      if (! ((int )(*mem_8) == 32)) {
//#line 1965
        break;
      }
    } else {
//#line 1965
      break;
    }
//#line 1966
    len --;
//#line 1967
    mem_9 = s + len;
//#line 1967
    (*mem_9) = (char)0;
  }
//#line 1970
  i = 0;
//#line 1970
  while ((unsigned int )i < sizeof(ata_dma_blacklist) / sizeof(ata_dma_blacklist[0])) {
//#line 1971
    tmp = strncmp(ata_dma_blacklist[i], (char const   *)s, len);
//#line 1971
    if (! tmp) {
//#line 1972
      return (1);
    }
//#line 1970
    i ++;
  }
//#line 1974
  return (0);
}
}
//#line 1977 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static unsigned int ata_get_mode_mask(struct ata_port *ap , int shift ) 
{ struct ata_device *master ;
  struct ata_device *slave ;
  unsigned int mask ;
  unsigned int tmp ;
  unsigned int tmp___0 ;
  int tmp___1 ;
  unsigned int tmp___2 ;
  int tmp___3 ;
  unsigned int tmp___4 ;
  int tmp___5 ;
  unsigned int tmp___6 ;
  int tmp___7 ;
  unsigned int tmp___8 ;
  u16 tmp_mode ;
  unsigned int tmp___9 ;
  u16 tmp_mode___0 ;
  unsigned int tmp___10 ;

  {
//#line 1982
  master = & ap->device[1]/*[0]*/;
//#line 1983
  slave = & ap->device[1];
//#line 1985
  tmp = ata_dev_present(master);
//#line 1985
  if (! tmp) {
//#line 1985
    tmp___0 = ata_dev_present(slave);
//#line 1985
    if (! tmp___0) {
//#line 1985
      printk("<3>Assertion failed! %s,%s,%s,line=%d\n", "ata_dev_present(master) || ata_dev_present(slave)",
             "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c",
             "ata_get_mode_mask", 1985);
    }
  }
//#line 1987
  if (shift == 0) {
//#line 1988
    mask = ap->udma_mask;
//#line 1989
    tmp___2 = ata_dev_present(master);
//#line 1989
    if (tmp___2) {
//#line 1990
      mask &= (unsigned int )((int )master->id[88] & 255);
//#line 1991
      tmp___1 = ata_dma_blacklisted(ap, master);
//#line 1991
      if (tmp___1) {
//#line 1992
        mask = 0U;
//#line 1993
        ata_pr_blacklisted(ap, master);
      }
    }
//#line 1996
    tmp___4 = ata_dev_present(slave);
//#line 1996
    if (tmp___4) {
//#line 1997
      mask &= (unsigned int )((int )slave->id[88] & 255);
//#line 1998
      tmp___3 = ata_dma_blacklisted(ap, slave);
//#line 1998
      if (tmp___3) {
//#line 1999
        mask = 0U;
//#line 2000
        ata_pr_blacklisted(ap, slave);
      }
    }
  } else {
//#line 2004
    if (shift == 8) {
//#line 2005
      mask = ap->mwdma_mask;
//#line 2006
      tmp___6 = ata_dev_present(master);
//#line 2006
      if (tmp___6) {
//#line 2007
        mask &= (unsigned int )((int )master->id[63] & 7);
//#line 2008
        tmp___5 = ata_dma_blacklisted(ap, master);
//#line 2008
        if (tmp___5) {
//#line 2009
          mask = 0U;
//#line 2010
          ata_pr_blacklisted(ap, master);
        }
      }
//#line 2013
      tmp___8 = ata_dev_present(slave);
//#line 2013
      if (tmp___8) {
//#line 2014
        mask &= (unsigned int )((int )slave->id[63] & 7);
//#line 2015
        tmp___7 = ata_dma_blacklisted(ap, slave);
//#line 2015
        if (tmp___7) {
//#line 2016
          mask = 0U;
//#line 2017
          ata_pr_blacklisted(ap, slave);
        }
      }
    } else {
//#line 2021
      if (shift == 11) {
//#line 2022
        mask = ap->pio_mask;
//#line 2023
        tmp___9 = ata_dev_present(master);
//#line 2023
        if (tmp___9) {
//#line 2027
          tmp_mode = (unsigned short )((int )master->id[64] & 3);
//#line 2028
          tmp_mode = (unsigned short )((int )tmp_mode << 3);
//#line 2029
          tmp_mode = (unsigned short )((int )tmp_mode | 7);
//#line 2030
          mask &= (unsigned int )tmp_mode;
        }
//#line 2032
        tmp___10 = ata_dev_present(slave);
//#line 2032
        if (tmp___10) {
//#line 2036
          tmp_mode___0 = (unsigned short )((int )slave->id[64] & 3);
//#line 2037
          tmp_mode___0 = (unsigned short )((int )tmp_mode___0 << 3);
//#line 2038
          tmp_mode___0 = (unsigned short )((int )tmp_mode___0 | 7);
//#line 2039
          mask &= (unsigned int )tmp_mode___0;
        }
      } else {
//#line 2043
        mask = 4294967295U;
//#line 2044
        /*__asm__  ("":)*/;
      }
    }
  }
//#line 2047
  return (mask);
}
}
//#line 2051 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static int fgb(u32 bitmap ) 
{ unsigned int i ;
  int x ;

  {
//#line 2054
  x = -1;
//#line 2056
  i = 0U;
//#line 2056
  while (i < 32U) {
//#line 2057
    if (bitmap & (unsigned int )(1 << i)) {
//#line 2058
      x = (int )i;
    }
//#line 2056
    i ++;
  }
//#line 2060
  return (x);
}
}
//#line 2079 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static int ata_choose_xfer_mode(struct ata_port *ap , u8 *xfer_mode_out , unsigned int *xfer_shift_out ) 
{ unsigned int mask ;
  unsigned int shift ;
  int x ;
  int i ;

  {
//#line 2086
  i = 0;
//#line 2086
  while ((unsigned int )i < sizeof(xfer_mode_classes) / sizeof(xfer_mode_classes[0])) {
//#line 2087
    shift = xfer_mode_classes[i].shift;
//#line 2088
    mask = ata_get_mode_mask(ap, (int )shift);
//#line 2090
    x = fgb(mask);
//#line 2091
    if (x >= 0) {
//#line 2092
      (*xfer_mode_out) = (unsigned char )((int )xfer_mode_classes[i].base + x);
//#line 2093
      (*xfer_shift_out) = shift;
//#line 2094
      return (0);
    }
//#line 2086
    i ++;
  }
//#line 2098
  return (-1);
}
}
//#line 2113 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static void ata_dev_set_xfermode(struct ata_port *ap , struct ata_device *dev ) 
{ struct completion wait ;
  struct ata_queued_cmd *qc ;
  int rc ;
  unsigned long flags ;
  struct ata_host_set *mem_7 ;
  struct ata_host_set *mem_8 ;

  {
//#line 2115
  wait.done = 0U;
//#line 2115
  wait.wait.lock.raw_lock.slock = (unsigned int volatile   )1;
//#line 2115
  wait.wait.lock.magic = 3735899821U;
//#line 2115
  wait.wait.lock.owner_cpu = 4294967295U;
//#line 2115
  wait.wait.lock.owner = (void *)-1L;
//#line 2115
  wait.wait.task_list.next = & wait.wait.task_list;
//#line 2115
  wait.wait.task_list.prev = & wait.wait.task_list;
//#line 2123
  qc = ata_qc_new_init(ap, dev);
//#line 2124
  while (1) {
//#line 2124
    if (! (! (((unsigned int )qc == (unsigned int )((void *)0)) != 0))) {
//#line 2124
      /*__asm__  ("":)*/;
    }
//#line 2124
    break;
  }
//#line 2126
  qc->tf.command = (unsigned char)239;
//#line 2127
  qc->tf.feature = (unsigned char)3;
//#line 2128
  qc->tf.flags |= 6UL;
//#line 2129
  qc->tf.protocol = (unsigned char)1;
//#line 2130
  qc->tf.nsect = dev->xfer_mode;
//#line 2132
  qc->waiting = & wait;
//#line 2133
  qc->complete_fn = & ata_qc_complete_noop;
//#line 2135
  mem_7 = ap->host_set;
//#line 2135
  __SLIC_spin_lock_irqsave(& mem_7->lock, flags);
//#line 2136
  rc = ata_qc_issue(qc);
//#line 2137
  mem_8 = ap->host_set;
//#line 2137
  __SLIC_spin_unlock_irqrestore(& mem_8->lock, flags);
//#line 2139
  if (rc) {
//#line 2140
    ata_port_disable(ap);
  } else {
//#line 2142
    wait_for_completion(& wait);
  }
//#line 2145
  return;
}
}
//#line 2157 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static void ata_sg_clean(struct ata_queued_cmd *qc ) 
{ struct ata_port *ap ;
  struct scatterlist *sg ;
  int dir ;
  struct ata_host_set *mem_5 ;
  struct ata_host_set *mem_6 ;
  struct scatterlist *mem_7 ;
  struct scatterlist *mem_8 ;

  {
//#line 2159
  ap = qc->ap;
//#line 2160
  sg = qc->sg;
//#line 2161
  dir = qc->dma_dir;
//#line 2163
  if (! (! (! (qc->flags & 24UL)))) {
//#line 2163
    printk("<3>Assertion failed! %s,%s,%s,line=%d\n", "qc->flags & ATA_QCFLAG_DMAMAP",
           "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c",
           "ata_sg_clean", 2163);
  }
//#line 2164
  if (! (! (! ((unsigned int )sg != (unsigned int )((void *)0))))) {
//#line 2164
    printk("<3>Assertion failed! %s,%s,%s,line=%d\n", "sg != NULL", "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c",
           "ata_sg_clean", 2164);
  }
//#line 2166
  if (qc->flags & 16UL) {
//#line 2167
    if (! (! (! (qc->n_elem == 1U)))) {
//#line 2167
      printk("<3>Assertion failed! %s,%s,%s,line=%d\n", "qc->n_elem == 1", "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c",
             "ata_sg_clean", 2167);
    }
  }
//#line 2171
  if (qc->flags & 8UL) {
//#line 2172
    mem_5 = ap->host_set;
//#line 2172
    dma_unmap_sg(mem_5->dev, sg, (int )qc->n_elem, (enum dma_data_direction )dir);
  } else {
//#line 2174
    mem_6 = ap->host_set;
//#line 2174
    mem_7 = sg + 0;
//#line 2174
    mem_8 = sg + 0;
//#line 2174
    dma_unmap_single(mem_6->dev, mem_7->dma_address, mem_8->length, (enum dma_data_direction )dir);
  }
//#line 2177
  qc->flags &= 4294967271UL;
//#line 2178
  qc->sg = (struct scatterlist *)((void *)0);
//#line 2179
  return;
}
}
//#line 2192 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static void ata_fill_sg(struct ata_queued_cmd *qc ) 
{ struct scatterlist *sg ;
  struct ata_port *ap ;
  unsigned int idx ;
  unsigned int nelem ;
  u32 addr ;
  u32 offset ;
  u32 sg_len ;
  u32 len ;
  struct ata_prd *mem_10 ;
  struct ata_prd *mem_11 ;
  struct ata_prd *mem_12 ;
  struct ata_prd *mem_13 ;

  {
//#line 2194
  sg = qc->sg;
//#line 2195
  ap = qc->ap;
//#line 2198
  if (! (! (! ((unsigned int )sg != (unsigned int )((void *)0))))) {
//#line 2198
    printk("<3>Assertion failed! %s,%s,%s,line=%d\n", "sg != NULL", "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c",
           "ata_fill_sg", 2198);
  }
//#line 2199
  if (! (! (! (qc->n_elem > 0U)))) {
//#line 2199
    printk("<3>Assertion failed! %s,%s,%s,line=%d\n", "qc->n_elem > 0", "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c",
           "ata_fill_sg", 2199);
  }
//#line 2201
  idx = 0U;
//#line 2202
  nelem = qc->n_elem;
//#line 2202
  while (nelem) {
//#line 2210
    addr = sg->dma_address;
//#line 2211
    sg_len = sg->length;
//#line 2213
    while (sg_len) {
//#line 2214
      offset = addr & 65535U;
//#line 2215
      len = sg_len;
//#line 2216
      if (offset + sg_len > 65536U) {
//#line 2217
        len = 65536U - offset;
      }
//#line 2219
      mem_10 = ap->prd + idx;
//#line 2219
      mem_10->addr = addr;
//#line 2220
      mem_11 = ap->prd + idx;
//#line 2220
      mem_11->flags_len = len & 65535U;
//#line 2223
      idx ++;
//#line 2224
      sg_len -= len;
//#line 2225
      addr += len;
    }
//#line 2202
    nelem --;
//#line 2202
    sg ++;
  }
//#line 2229
  if (idx) {
//#line 2230
    mem_12 = ap->prd + (idx - 1U);
//#line 2230
    mem_13 = ap->prd + (idx - 1U);
//#line 2230
    mem_12->flags_len = mem_13->flags_len | 2147483648U;
  }
//#line 2231
  return;
}
}
//#line 2246 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
int ata_check_atapi_dma(struct ata_queued_cmd *qc ) 
{ struct ata_port *ap ;
  int rc ;
  struct ata_port_operations *mem_4 ;
  struct ata_port_operations *mem_5 ;
  int (*mem_6)(struct ata_queued_cmd *qc ) ;

  {
//#line 2248
  ap = qc->ap;
//#line 2249
  rc = 0;
//#line 2251
  mem_4 = ap->ops;
//#line 2251
  if (mem_4->check_atapi_dma) {
//#line 2252
    mem_5 = ap->ops;
//#line 2252
    mem_6 = mem_5->check_atapi_dma;
//#line 2252
    rc = ((*mem_6))(qc);
  }
//#line 2254
  return (rc);
}
}
//#line 2265 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
void ata_qc_prep(struct ata_queued_cmd *qc ) 
{ 

  {
//#line 2267
  if (! (qc->flags & 24UL)) {
//#line 2268
    return;
  }
//#line 2270
  ata_fill_sg(qc);
//#line 2271
  return;
}
}
//#line 2286 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
void ata_sg_init_one(struct ata_queued_cmd *qc , void *buf , unsigned int buflen ) 
{ struct scatterlist *sg ;

  {
//#line 2290
  qc->flags |= 16UL;
//#line 2292
  __constant_c_and_count_memset((void *)(& qc->sgent), 0UL, sizeof(qc->sgent));
//#line 2293
  qc->sg = & qc->sgent;
//#line 2294
  qc->n_elem = 1U;
//#line 2295
  qc->buf_virt = buf;
//#line 2297
  sg = qc->sg;
//#line 2298
  sg->page = mem_map + (((unsigned long )buf - 3221225472UL) >> 12);
//#line 2299
  sg->offset = (unsigned int )((unsigned long )buf & 4095UL);
//#line 2300
  sg->length = buflen;
//#line 2301
  return;
}
}
//#line 2317 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
void ata_sg_init(struct ata_queued_cmd *qc , struct scatterlist *sg , unsigned int n_elem ) 
{ 

  {
//#line 2320
  qc->flags |= 8UL;
//#line 2321
  qc->sg = sg;
//#line 2322
  qc->n_elem = n_elem;
//#line 2323
  return;
}
}
//#line 2338 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static int ata_sg_setup_one(struct ata_queued_cmd *qc ) 
{ struct ata_port *ap ;
  int dir ;
  struct scatterlist *sg ;
  dma_addr_t dma_address ;
  int tmp ;
  struct ata_host_set *mem_7 ;

  {
//#line 2340
  ap = qc->ap;
//#line 2341
  dir = qc->dma_dir;
//#line 2342
  sg = qc->sg;
//#line 2345
  mem_7 = ap->host_set;
//#line 2345
  dma_address = dma_map_single(mem_7->dev, qc->buf_virt, sg->length, (enum dma_data_direction )dir);
//#line 2347
  tmp = dma_mapping_error(dma_address);
//#line 2347
  if (tmp) {
//#line 2348
    return (-1);
  }
//#line 2350
  sg->dma_address = dma_address;
//#line 2351
  sg->length = sg->length;
//#line 2356
  return (0);
}
}
//#line 2373 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static int ata_sg_setup(struct ata_queued_cmd *qc ) 
{ struct ata_port *ap ;
  struct scatterlist *sg ;
  int n_elem ;
  int dir ;
  struct ata_host_set *mem_6 ;

  {
//#line 2375
  ap = qc->ap;
//#line 2376
  sg = qc->sg;
//#line 2380
  if (! (! (! (qc->flags & 8UL)))) {
//#line 2380
    printk("<3>Assertion failed! %s,%s,%s,line=%d\n", "qc->flags & ATA_QCFLAG_SG",
           "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c",
           "ata_sg_setup", 2380);
  }
//#line 2382
  dir = qc->dma_dir;
//#line 2383
  mem_6 = ap->host_set;
//#line 2383
  n_elem = dma_map_sg(mem_6->dev, sg, (int )qc->n_elem, (enum dma_data_direction )dir);
//#line 2384
  if (n_elem < 1) {
//#line 2385
    return (-1);
  }
//#line 2389
  qc->n_elem = (unsigned int )n_elem;
//#line 2391
  return (0);
}
}
//#line 2403 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
void ata_poll_qc_complete(struct ata_queued_cmd *qc , u8 drv_stat ) 
{ struct ata_port *ap ;
  unsigned long flags ;
  struct ata_host_set *mem_5 ;
  struct ata_host_set *mem_6 ;

  {
//#line 2405
  ap = qc->ap;
//#line 2408
  mem_5 = ap->host_set;
//#line 2408
  __SLIC_spin_lock_irqsave(& mem_5->lock, flags);
//#line 2409
  ap->flags &= 4294966783UL;
//#line 2410
  ata_irq_on(ap);
//#line 2411
  ata_qc_complete(qc, drv_stat);
//#line 2412
  mem_6 = ap->host_set;
//#line 2412
  __SLIC_spin_unlock_irqrestore(& mem_6->lock, flags);
//#line 2413
  return;
}
}
//#line 2426 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static unsigned long ata_pio_poll(struct ata_port *ap ) 
{ u8 status ;
  unsigned int poll_state ;
  unsigned int reg_state ;
  unsigned int tmout_state ;

  {
//#line 2429
  poll_state = 0U;
//#line 2430
  reg_state = 0U;
//#line 2431
  tmout_state = 3U;
//#line 2433
  switch ((int )ap->pio_task_state) {
  case 4: 
  case 2: 
//#line 2436
  poll_state = 2U;
//#line 2437
  reg_state = 4U;
//#line 2438
  break;
  case 5: 
  case 6: 
//#line 2441
  poll_state = 6U;
//#line 2442
  reg_state = 5U;
//#line 2443
  break;
  default: 
//#line 2445
  /*__asm__  ("":)*/;
//#line 2446
  break;
  }
//#line 2449
  status = ata_chk_status(ap);
//#line 2450
  if ((int )status & 128) {
//#line 2451
    if ((long )ap->pio_task_timeout - (long )jiffies < 0L) {
//#line 2452
      ap->pio_task_state = tmout_state;
//#line 2453
      return (0UL);
    }
//#line 2455
    ap->pio_task_state = poll_state;
//#line 2456
    return (4UL);
  }
//#line 2459
  ap->pio_task_state = reg_state;
//#line 2460
  return (0UL);
}
}
//#line 2474 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static int ata_pio_complete(struct ata_port *ap ) 
{ struct ata_queued_cmd *qc ;
  u8 drv_stat ;
  int tmp ;

  {
//#line 2486
  drv_stat = ata_busy_wait(ap, 136U, 10U);
//#line 2487
  if ((int )drv_stat & 136) {
//#line 2488
    msleep(2U);
//#line 2489
    drv_stat = ata_busy_wait(ap, 136U, 10U);
//#line 2490
    if ((int )drv_stat & 136) {
//#line 2491
      ap->pio_task_state = 6U;
//#line 2492
      ap->pio_task_timeout = (unsigned long )(jiffies + 7500UL);
//#line 2493
      return (0);
    }
  }
//#line 2497
  drv_stat = ata_wait_idle(ap);
//#line 2498
  tmp = ata_ok(drv_stat);
//#line 2498
  if (! tmp) {
//#line 2499
    ap->pio_task_state = 7U;
//#line 2500
    return (0);
  }
//#line 2503
  qc = ata_qc_from_tag(ap, ap->active_tag);
//#line 2504
  if (! (! (! ((unsigned int )qc != (unsigned int )((void *)0))))) {
//#line 2504
    printk("<3>Assertion failed! %s,%s,%s,line=%d\n", "qc != NULL", "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c",
           "ata_pio_complete", 2504);
  }
//#line 2506
  ap->pio_task_state = 1U;
//#line 2508
  ata_poll_qc_complete(qc, drv_stat);
//#line 2512
  return (1);
}
}
//#line 2527 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
void swap_buf_le16(u16 *buf , unsigned int buf_words ) 
{ 

  {
//#line 2535
  return;
}
}
//#line 2551 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static void ata_mmio_data_xfer(struct ata_port *ap , unsigned char *buf , unsigned int buflen ,
                               int write_data ) 
{ unsigned int i ;
  unsigned int words ;
  u16 *buf16 ;
  void *mmio ;
  unsigned short tmp ;
  u16 align_buf[1] ;
  unsigned char *trailing_buf ;
  unsigned short tmp___0 ;
  u16 *mem_13 ;
  u16 *mem_14 ;

  {
//#line 2555
  words = buflen >> 1;
//#line 2556
  buf16 = (u16 *)buf;
//#line 2557
  mmio = (void *)ap->ioaddr.data_addr;
//#line 2560
  if (write_data) {
//#line 2561
    i = 0U;
//#line 2561
    while (i < words) {
//#line 2562
      mem_13 = buf16 + i;
//#line 2562
      writew((*mem_13), (void volatile   *)mmio);
//#line 2561
      i ++;
    }
  } else {
//#line 2564
    i = 0U;
//#line 2564
    while (i < words) {
//#line 2565
      tmp = readw((void const volatile   *)mmio);
//#line 2565
      mem_14 = buf16 + i;
//#line 2565
      (*mem_14) = tmp;
//#line 2564
      i ++;
    }
  }
//#line 2569
  if (! (! (buflen & 1U))) {
//#line 2570
    align_buf[0] = (unsigned short)0;
//#line 2571
    trailing_buf = (buf + buflen) - 1;
//#line 2573
    if (write_data) {
//#line 2574
      __constant_memcpy((void *)(align_buf), (void const   *)trailing_buf, 1U);
//#line 2575
      writew(align_buf[0], (void volatile   *)mmio);
    } else {
//#line 2577
      tmp___0 = readw((void const volatile   *)mmio);
//#line 2577
      align_buf[0] = tmp___0;
//#line 2578
      __constant_memcpy((void *)trailing_buf, (void const   *)(align_buf), 1U);
    }
  }
//#line 2581
  return;
}
}
//#line 2597 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static void ata_pio_data_xfer(struct ata_port *ap , unsigned char *buf , unsigned int buflen ,
                              int write_data ) 
{ unsigned int words ;
  u16 align_buf[1] ;
  unsigned char *trailing_buf ;
  unsigned short tmp ;

  {
//#line 2600
  words = buflen >> 1;
//#line 2603
  if (write_data) {
//#line 2604
    outsw((int )ap->ioaddr.data_addr, (void const   *)buf, (unsigned long )words);
  } else {
//#line 2606
    insw((int )ap->ioaddr.data_addr, (void *)buf, (unsigned long )words);
  }
//#line 2609
  if (! (! (buflen & 1U))) {
//#line 2610
    align_buf[0] = (unsigned short)0;
//#line 2611
    trailing_buf = (buf + buflen) - 1;
//#line 2613
    if (write_data) {
//#line 2614
      __constant_memcpy((void *)(align_buf), (void const   *)trailing_buf, 1U);
//#line 2615
      outw(align_buf[0], (int )ap->ioaddr.data_addr);
    } else {
//#line 2617
      tmp = inw((int )ap->ioaddr.data_addr);
//#line 2617
      align_buf[0] = tmp;
//#line 2618
      __constant_memcpy((void *)trailing_buf, (void const   *)(align_buf), 1U);
    }
  }
//#line 2621
  return;
}
}
//#line 2637 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static void ata_data_xfer(struct ata_port *ap , unsigned char *buf , unsigned int buflen ,
                          int do_write ) 
{ 

  {
//#line 2640
  if (ap->flags & 64UL) {
//#line 2641
    ata_mmio_data_xfer(ap, buf, buflen, do_write);
  } else {
//#line 2643
    ata_pio_data_xfer(ap, buf, buflen, do_write);
  }
//#line 2644
  return;
}
}
//#line 2656 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static void ata_pio_sector(struct ata_queued_cmd *qc ) 
{ int do_write ;
  struct scatterlist *sg ;
  struct ata_port *ap ;
  struct page *page ;
  unsigned int offset ;
  unsigned char *buf ;
  void *tmp ;
  struct scatterlist *mem_9 ;
  struct scatterlist *mem_10 ;
  struct scatterlist *mem_11 ;

  {
//#line 2658
  do_write = (int )(qc->tf.flags & 8UL);
//#line 2659
  sg = qc->sg;
//#line 2660
  ap = qc->ap;
//#line 2665
  if (qc->cursect == qc->nsect - 1U) {
//#line 2666
    ap->pio_task_state = 5U;
  }
//#line 2668
  mem_9 = sg + qc->cursg;
//#line 2668
  page = mem_9->page;
//#line 2669
  mem_10 = sg + qc->cursg;
//#line 2669
  offset = mem_10->offset + qc->cursg_ofs * 512U;
//#line 2672
  page = mem_map + ((unsigned long )(page - mem_map) + (unsigned long )(offset >> 12));
//#line 2673
  offset = (unsigned int )((unsigned long )offset % 4096UL);
//#line 2675
  tmp = kmap(page);
//#line 2675
  buf = (unsigned char *)(tmp + offset);
//#line 2677
  qc->cursect ++;
//#line 2678
  qc->cursg_ofs ++;
//#line 2680
  mem_11 = sg + qc->cursg;
//#line 2680
  if (qc->cursg_ofs * 512U == mem_11->length) {
//#line 2681
    qc->cursg ++;
//#line 2682
    qc->cursg_ofs = 0U;
  }
//#line 2688
  do_write = (int )(qc->tf.flags & 8UL);
//#line 2689
  ata_data_xfer(ap, buf, 512U, do_write);
//#line 2691
  while (1) {
//#line 2691
    break;
  }
//#line 2692
  return;
}
}
//#line 2706 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static void __atapi_pio_bytes(struct ata_queued_cmd *qc , unsigned int bytes ) 
{ int do_write ;
  struct scatterlist *sg ;
  struct ata_port *ap ;
  struct page *page ;
  unsigned char *buf ;
  unsigned int offset ;
  unsigned int count ;
  u16 pad_buf[1] ;
  unsigned int words ;
  unsigned int i ;
  unsigned int _x ;
  unsigned int _y ;
  unsigned int tmp ;
  unsigned int _x___0 ;
  unsigned int _y___0 ;
  unsigned int tmp___0 ;
  void *tmp___1 ;

  {
//#line 2708
  do_write = (int )(qc->tf.flags & 8UL);
//#line 2709
  sg = qc->sg;
//#line 2710
  ap = qc->ap;
//#line 2715
  if (qc->curbytes + bytes >= qc->nbytes) {
//#line 2716
    ap->pio_task_state = 5U;
  }
  next_sg: 
//#line 2719
  if (! (! (qc->cursg >= qc->n_elem))) {
//#line 2727
    pad_buf[0] = (unsigned short)0;
//#line 2728
    words = bytes >> 1;
//#line 2731
    if (words) {
//#line 2732
      printk("<4>ata%u: %u bytes trailing data\n", ap->id, bytes);
    }
//#line 2735
    i = 0U;
//#line 2735
    while (i < words) {
//#line 2736
      ata_data_xfer(ap, (unsigned char *)(pad_buf), 2U, do_write);
//#line 2735
      i ++;
    }
//#line 2738
    ap->pio_task_state = 5U;
//#line 2739
    return;
  }
//#line 2742
  sg = qc->sg + qc->cursg;
//#line 2744
  page = sg->page;
//#line 2745
  offset = sg->offset + qc->cursg_ofs;
//#line 2748
  page = mem_map + ((unsigned long )(page - mem_map) + (unsigned long )(offset >> 12));
//#line 2749
  offset = (unsigned int )((unsigned long )offset % 4096UL);
//#line 2752
  _x = sg->length - qc->cursg_ofs;
//#line 2752
  _y = bytes;
//#line 2752
  if (_x < _y) {
//#line 2752
    tmp = _x;
  } else {
//#line 2752
    tmp = _y;
  }
//#line 2752
  count = tmp;
//#line 2755
  _x___0 = count;
//#line 2755
  _y___0 = 4096U - offset;
//#line 2755
  if (_x___0 < _y___0) {
//#line 2755
    tmp___0 = _x___0;
  } else {
//#line 2755
    tmp___0 = _y___0;
  }
//#line 2755
  count = tmp___0;
//#line 2757
  tmp___1 = kmap(page);
//#line 2757
  buf = (unsigned char *)(tmp___1 + offset);
//#line 2759
  bytes -= count;
//#line 2760
  qc->curbytes += count;
//#line 2761
  qc->cursg_ofs += count;
//#line 2763
  if (qc->cursg_ofs == sg->length) {
//#line 2764
    qc->cursg ++;
//#line 2765
    qc->cursg_ofs = 0U;
  }
//#line 2771
  ata_data_xfer(ap, buf, count, do_write);
//#line 2773
  while (1) {
//#line 2773
    break;
  }
//#line 2775
  if (bytes) {
    goto next_sg;
  }
//#line 2777
  return;
}
}
//#line 2790 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static void atapi_pio_bytes(struct ata_queued_cmd *qc ) 
{ struct ata_port *ap ;
  struct ata_device *dev ;
  unsigned int ireason ;
  unsigned int bc_lo ;
  unsigned int bc_hi ;
  unsigned int bytes ;
  int i_write ;
  int do_write ;
  int tmp ;
  struct ata_port_operations *mem_11 ;
  void (*mem_12)(struct ata_port *ap , struct ata_taskfile *tf ) ;

  {
//#line 2792
  ap = qc->ap;
//#line 2793
  dev = qc->dev;
//#line 2795
  if (qc->tf.flags & 8UL) {
//#line 2795
    tmp = 1;
  } else {
//#line 2795
    tmp = 0;
  }
//#line 2795
  do_write = tmp;
//#line 2797
  mem_11 = ap->ops;
//#line 2797
  mem_12 = mem_11->tf_read;
//#line 2797
  ((*mem_12))(ap, & qc->tf);
//#line 2798
  ireason = (unsigned int )qc->tf.nsect;
//#line 2799
  bc_lo = (unsigned int )qc->tf.lbam;
//#line 2800
  bc_hi = (unsigned int )qc->tf.lbah;
//#line 2801
  bytes = (bc_hi << 8) | bc_lo;
//#line 2804
  if (ireason & 1U) {
    goto err_out;
  }
//#line 2808
  if ((ireason & 2U) == 0U) {
//#line 2808
    i_write = 1;
  } else {
//#line 2808
    i_write = 0;
  }
//#line 2809
  if (do_write != i_write) {
    goto err_out;
  }
//#line 2812
  __atapi_pio_bytes(qc, bytes);
//#line 2814
  return;
  err_out: 
//#line 2817
  printk("<6>ata%u: dev %u: ATAPI check failed\n", ap->id, dev->devno);
//#line 2819
  ap->pio_task_state = 7U;
//#line 2820
  return;
}
}
//#line 2830 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static void ata_pio_block(struct ata_port *ap ) 
{ struct ata_queued_cmd *qc ;
  u8 status ;
  int tmp ;

  {
//#line 2843
  status = ata_busy_wait(ap, 128U, 5U);
//#line 2844
  if ((int )status & 128) {
//#line 2845
    msleep(2U);
//#line 2846
    status = ata_busy_wait(ap, 128U, 10U);
//#line 2847
    if ((int )status & 128) {
//#line 2848
      ap->pio_task_state = 2U;
//#line 2849
      ap->pio_task_timeout = (unsigned long )(jiffies + 7500UL);
//#line 2850
      return;
    }
  }
//#line 2854
  qc = ata_qc_from_tag(ap, ap->active_tag);
//#line 2855
  if (! (! (! ((unsigned int )qc != (unsigned int )((void *)0))))) {
//#line 2855
    printk("<3>Assertion failed! %s,%s,%s,line=%d\n", "qc != NULL", "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c",
           "ata_pio_block", 2855);
  }
//#line 2857
  tmp = is_atapi_taskfile(& qc->tf);
//#line 2857
  if (tmp) {
//#line 2859
    if (((int )status & 8) == 0) {
//#line 2860
      ap->pio_task_state = 5U;
//#line 2861
      return;
    }
//#line 2864
    atapi_pio_bytes(qc);
  } else {
//#line 2867
    if (((int )status & 8) == 0) {
//#line 2868
      ap->pio_task_state = 7U;
//#line 2869
      return;
    }
//#line 2872
    ata_pio_sector(qc);
  }
//#line 2874
  return;
}
}
//#line 2876 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static void ata_pio_error(struct ata_port *ap ) 
{ struct ata_queued_cmd *qc ;
  u8 drv_stat ;

  {
//#line 2881
  qc = ata_qc_from_tag(ap, ap->active_tag);
//#line 2882
  if (! (! (! ((unsigned int )qc != (unsigned int )((void *)0))))) {
//#line 2882
    printk("<3>Assertion failed! %s,%s,%s,line=%d\n", "qc != NULL", "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c",
           "ata_pio_error", 2882);
  }
//#line 2884
  drv_stat = ata_chk_status(ap);
//#line 2885
  printk("<4>ata%u: PIO error, drv_stat 0x%x\n", ap->id, drv_stat);
//#line 2888
  ap->pio_task_state = 1U;
//#line 2890
  ata_poll_qc_complete(qc, (unsigned char )((int )drv_stat | 1));
//#line 2891
  return;
}
}
//#line 2893 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static void ata_pio_task(void *_data___0 ) 
{ struct ata_port *ap ;
  unsigned long timeout ;
  int qc_completed ;

  {
//#line 2895
  ap = (struct ata_port *)_data___0;
  fsm_start: 
//#line 2900
  timeout = 0UL;
//#line 2901
  qc_completed = 0;
//#line 2903
  switch ((int )ap->pio_task_state) {
  case 1: 
//#line 2905
  return;
  case 4: 
//#line 2908
  ata_pio_block(ap);
//#line 2909
  break;
  case 5: 
//#line 2912
  qc_completed = ata_pio_complete(ap);
//#line 2913
  break;
  case 2: 
  case 6: 
//#line 2917
  timeout = ata_pio_poll(ap);
//#line 2918
  break;
  case 3: 
  case 7: 
//#line 2922
  ata_pio_error(ap);
//#line 2923
  return;
  }
//#line 2926
  if (timeout) {
//#line 2927
    queue_delayed_work(ata_wq, & ap->pio_task, timeout);
  } else {
//#line 2928
    if (! qc_completed) {
      goto fsm_start;
    }
  }
//#line 2930
  return;
}
}
//#line 2932 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static void atapi_request_sense(struct ata_port *ap , struct ata_device *dev , struct scsi_cmnd *cmd ) 
{ struct completion wait ;
  struct ata_queued_cmd *qc ;
  unsigned long flags ;
  int rc ;
  struct ata_host_set *mem_8 ;
  struct ata_host_set *mem_9 ;

  {
//#line 2935
  wait.done = 0U;
//#line 2935
  wait.wait.lock.raw_lock.slock = (unsigned int volatile   )1;
//#line 2935
  wait.wait.lock.magic = 3735899821U;
//#line 2935
  wait.wait.lock.owner_cpu = 4294967295U;
//#line 2935
  wait.wait.lock.owner = (void *)-1L;
//#line 2935
  wait.wait.task_list.next = & wait.wait.task_list;
//#line 2935
  wait.wait.task_list.prev = & wait.wait.task_list;
//#line 2942
  qc = ata_qc_new_init(ap, dev);
//#line 2943
  while (1) {
//#line 2943
    if (! (! (((unsigned int )qc == (unsigned int )((void *)0)) != 0))) {
//#line 2943
      /*__asm__  ("":)*/;
    }
//#line 2943
    break;
  }
//#line 2946
  __constant_c_and_count_memset((void *)(cmd->sense_buffer), 0UL, sizeof(cmd->sense_buffer));
//#line 2948
  ata_sg_init_one(qc, (void *)(cmd->sense_buffer), sizeof(cmd->sense_buffer));
//#line 2949
  qc->dma_dir = 2;
//#line 2951
  __constant_c_memset((void *)(& qc->cdb), 0UL, ap->cdb_len);
//#line 2952
  qc->cdb[0] = (unsigned char)3;
//#line 2953
  qc->cdb[4] = (unsigned char)96;
//#line 2955
  qc->tf.flags |= 6UL;
//#line 2956
  qc->tf.command = (unsigned char)160;
//#line 2958
  qc->tf.protocol = (unsigned char)5;
//#line 2959
  qc->tf.lbam = (unsigned char)0;
//#line 2960
  qc->tf.lbah = (unsigned char)32;
//#line 2961
  qc->nbytes = 96U;
//#line 2963
  qc->waiting = & wait;
//#line 2964
  qc->complete_fn = & ata_qc_complete_noop;
//#line 2966
  mem_8 = ap->host_set;
//#line 2966
  __SLIC_spin_lock_irqsave(& mem_8->lock, flags);
//#line 2967
  rc = ata_qc_issue(qc);
//#line 2968
  mem_9 = ap->host_set;
//#line 2968
  __SLIC_spin_unlock_irqrestore(& mem_9->lock, flags);
//#line 2970
  if (rc) {
//#line 2971
    ata_port_disable(ap);
  } else {
//#line 2973
    wait_for_completion(& wait);
  }
//#line 2976
  return;
}
}
//#line 2997 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static void ata_qc_timeout(struct ata_queued_cmd *qc ) 
{ struct ata_port *ap ;
  struct ata_host_set *host_set ;
  struct ata_device *dev ;
  u8 host_stat ;
  u8 drv_stat ;
  unsigned long flags ;
  struct scsi_cmnd *cmd ;
  struct ata_device *mem_9 ;
  struct ata_port_operations *mem_10 ;
  u8 (*mem_11)(struct ata_port *ap ) ;
  struct ata_port_operations *mem_12 ;
  void (*mem_13)(struct ata_queued_cmd *qc ) ;
  struct ata_port_operations *mem_14 ;
  void (*mem_15)(struct ata_port * ) ;

  {
//#line 2999
  ap = qc->ap;
//#line 3000
  host_set = ap->host_set;
//#line 3001
  dev = qc->dev;
//#line 3002
  host_stat = (unsigned char)0;
//#line 3008
  mem_9 = qc->dev;
//#line 3008
  if (mem_9->class == 3U) {
//#line 3008
    if (qc->scsicmd) {
//#line 3009
      cmd = qc->scsicmd;
//#line 3011
      if (! (cmd->eh_eflags & 1)) {
//#line 3014
        __SLIC_spin_lock_irqsave(& host_set->lock, flags);
//#line 3015
        __ata_qc_complete(qc);
//#line 3016
        __SLIC_spin_unlock_irqrestore(& host_set->lock, flags);
//#line 3018
        atapi_request_sense(ap, dev, cmd);
//#line 3020
        cmd->result = 2;
//#line 3021
        scsi_finish_command(cmd);
        goto out;
      }
    }
  }
//#line 3027
  __SLIC_spin_lock_irqsave(& host_set->lock, flags);
//#line 3035
  qc->scsidone = & scsi_finish_command;
//#line 3037
  switch ((int )qc->tf.protocol) {
  case 4: 
  case 7: 
//#line 3041
  mem_10 = ap->ops;
//#line 3041
  mem_11 = mem_10->bmdma_status;
//#line 3041
  host_stat = ((*mem_11))(ap);
//#line 3044
  mem_12 = ap->ops;
//#line 3044
  mem_13 = mem_12->bmdma_stop;
//#line 3044
  ((*mem_13))(qc);
  default: 
//#line 3049
  ata_altstatus(ap);
//#line 3050
  drv_stat = ata_chk_status(ap);
//#line 3053
  mem_14 = ap->ops;
//#line 3053
  mem_15 = mem_14->irq_clear;
//#line 3053
  ((*mem_15))(ap);
//#line 3055
  printk("<3>ata%u: command 0x%x timeout, stat 0x%x host_stat 0x%x\n", ap->id, qc->tf.command,
         drv_stat, host_stat);
//#line 3059
  ata_qc_complete(qc, drv_stat);
//#line 3060
  break;
  }
//#line 3063
  __SLIC_spin_unlock_irqrestore(& host_set->lock, flags);
  out: ;
//#line 3067
  return;
}
}
//#line 3088 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
void ata_eng_timeout(struct ata_port *ap ) 
{ struct ata_queued_cmd *qc ;

  {
//#line 3094
  qc = ata_qc_from_tag(ap, ap->active_tag);
//#line 3095
  if (! qc) {
//#line 3096
    printk("<3>ata%u: BUG: timeout without command\n", ap->id);
    goto out;
  }
//#line 3101
  ata_qc_timeout(qc);
  out: ;
//#line 3105
  return;
}
}
//#line 3116 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static struct ata_queued_cmd *ata_qc_new(struct ata_port *ap ) 
{ struct ata_queued_cmd *qc ;
  unsigned int i ;
  int tmp ;

  {
//#line 3118
  qc = (struct ata_queued_cmd *)((void *)0);
//#line 3121
  i = 0U;
//#line 3121
  while (i < 1U) {
//#line 3122
    tmp = test_and_set_bit((int )i, (unsigned long volatile   *)(& ap->qactive));
//#line 3122
    if (! tmp) {
//#line 3123
      qc = ata_qc_from_tag(ap, i);
//#line 3124
      break;
    }
//#line 3121
    i ++;
  }
//#line 3127
  if (qc) {
//#line 3128
    qc->tag = i;
  }
//#line 3130
  return (qc);
}
}
//#line 3142 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
struct ata_queued_cmd *ata_qc_new_init(struct ata_port *ap , struct ata_device *dev ) 
{ struct ata_queued_cmd *qc ;

  {
//#line 3147
  qc = ata_qc_new(ap);
//#line 3148
  if (qc) {
//#line 3149
    qc->sg = (struct scatterlist *)((void *)0);
//#line 3150
    qc->flags = 0UL;
//#line 3151
    qc->scsicmd = (struct scsi_cmnd *)((void *)0);
//#line 3152
    qc->ap = ap;
//#line 3153
    qc->dev = dev;
//#line 3154
    qc->cursg_ofs = 0U;
//#line 3154
    qc->cursg = qc->cursg_ofs;
//#line 3154
    qc->cursect = qc->cursg;
//#line 3155
    qc->nsect = 0U;
//#line 3156
    qc->curbytes = 0U;
//#line 3156
    qc->nbytes = qc->curbytes;
//#line 3158
    ata_tf_init(ap, & qc->tf, dev->devno);
//#line 3160
    if (dev->flags & 1UL) {
//#line 3161
      qc->tf.flags |= 1UL;
    }
  }
//#line 3164
  return (qc);
}
}
//#line 3167 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static int ata_qc_complete_noop(struct ata_queued_cmd *qc , u8 drv_stat ) 
{ 

  {
//#line 3169
  return (0);
}
}
//#line 3172 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static void __ata_qc_complete(struct ata_queued_cmd *qc ) 
{ struct ata_port *ap ;
  unsigned int tag ;
  unsigned int do_clear ;
  unsigned int tmp ;
  struct completion *waiting ;

  {
//#line 3174
  ap = qc->ap;
//#line 3175
  do_clear = 0U;
//#line 3177
  qc->flags = 0UL;
//#line 3178
  tag = qc->tag;
//#line 3179
  tmp = ata_tag_valid(tag);
//#line 3179
  if (tmp) {
//#line 3180
    if (tag == ap->active_tag) {
//#line 3181
      ap->active_tag = 4210818301U;
    }
//#line 3182
    qc->tag = 4210818301U;
//#line 3183
    do_clear = 1U;
  }
//#line 3186
  if (qc->waiting) {
//#line 3187
    waiting = qc->waiting;
//#line 3188
    qc->waiting = (struct completion *)((void *)0);
//#line 3189
    complete(waiting);
  }
//#line 3192
  if (! (! do_clear)) {
//#line 3193
    clear_bit((int )tag, (unsigned long volatile   *)(& ap->qactive));
  }
//#line 3194
  return;
}
}
//#line 3207 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
void ata_qc_free(struct ata_queued_cmd *qc ) 
{ 

  {
//#line 3209
  if (! (! (! ((unsigned int )qc != (unsigned int )((void *)0))))) {
//#line 3209
    printk("<3>Assertion failed! %s,%s,%s,line=%d\n", "qc != NULL", "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c",
           "ata_qc_free", 3209);
  }
//#line 3210
  if (! (! (! ((unsigned int )qc->waiting == (unsigned int )((void *)0))))) {
//#line 3210
    printk("<3>Assertion failed! %s,%s,%s,line=%d\n", "qc->waiting == NULL", "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c",
           "ata_qc_free", 3210);
  }
//#line 3212
  __ata_qc_complete(qc);
//#line 3213
  return;
}
}
//#line 3228 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
void ata_qc_complete(struct ata_queued_cmd *qc , u8 drv_stat ) 
{ int rc ;
  int (*mem_4)(struct ata_queued_cmd *qc , u8 drv_stat ) ;

  {
//#line 3232
  if (! (! (! ((unsigned int )qc != (unsigned int )((void *)0))))) {
//#line 3232
    printk("<3>Assertion failed! %s,%s,%s,line=%d\n", "qc != NULL", "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c",
           "ata_qc_complete", 3232);
  }
//#line 3233
  if (! (! (! (qc->flags & 2UL)))) {
//#line 3233
    printk("<3>Assertion failed! %s,%s,%s,line=%d\n", "qc->flags & ATA_QCFLAG_ACTIVE",
           "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c",
           "ata_qc_complete", 3233);
  }
//#line 3235
  if (! (! (qc->flags & 24UL))) {
//#line 3236
    ata_sg_clean(qc);
  }
//#line 3242
  qc->flags &= 4294967293UL;
//#line 3245
  mem_4 = qc->complete_fn;
//#line 3245
  rc = ((*mem_4))(qc, drv_stat);
//#line 3250
  if (rc != 0) {
//#line 3251
    return;
  }
//#line 3253
  __ata_qc_complete(qc);
//#line 3256
  return;
}
}
//#line 3258 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
/*__inline*/ static int ( /*__attribute__((__always_inline__))*/ ata_should_dma_map)(struct ata_queued_cmd *qc ) 
{ struct ata_port *ap ;

  {
//#line 3260
  ap = qc->ap;
//#line 3262
  switch ((int )qc->tf.protocol) {
  case 4: 
  case 7: 
//#line 3265
  return (1);
  case 5: 
  case 2: 
  case 3: 
//#line 3270
  if (ap->flags & 256UL) {
//#line 3271
    return (1);
  }
  default: ;
//#line 3276
  return (0);
  }
}
}
//#line 3298 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
int ata_qc_issue(struct ata_queued_cmd *qc ) 
{ struct ata_port *ap ;
  int tmp ;
  int tmp___0 ;
  int tmp___1 ;
  int tmp___2 ;
  struct ata_port_operations *mem_7 ;
  void (*mem_8)(struct ata_queued_cmd *qc ) ;
  struct ata_port *mem_9 ;
  struct ata_port_operations *mem_10 ;
  int (*mem_11)(struct ata_queued_cmd *qc ) ;

  {
//#line 3300
  ap = qc->ap;
//#line 3302
  tmp___1 = ata_should_dma_map(qc);
//#line 3302
  if (tmp___1) {
//#line 3303
    if (qc->flags & 8UL) {
//#line 3304
      tmp = ata_sg_setup(qc);
//#line 3304
      if (tmp) {
        goto err_out;
      }
    } else {
//#line 3306
      if (qc->flags & 16UL) {
//#line 3307
        tmp___0 = ata_sg_setup_one(qc);
//#line 3307
        if (tmp___0) {
          goto err_out;
        }
      }
    }
  } else {
//#line 3311
    qc->flags &= 4294967271UL;
  }
//#line 3314
  mem_7 = ap->ops;
//#line 3314
  mem_8 = mem_7->qc_prep;
//#line 3314
  ((*mem_8))(qc);
//#line 3316
  mem_9 = qc->ap;
//#line 3316
  mem_9->active_tag = qc->tag;
//#line 3317
  qc->flags |= 2UL;
//#line 3319
  mem_10 = ap->ops;
//#line 3319
  mem_11 = mem_10->qc_issue;
//#line 3319
  tmp___2 = ((*mem_11))(qc);
//#line 3319
  return (tmp___2);
  err_out: 
//#line 3322
  return (-1);
}
}
//#line 3344 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
int ata_qc_issue_prot(struct ata_queued_cmd *qc ) 
{ struct ata_port *ap ;
  struct ata_device *mem_3 ;
  struct ata_port_operations *mem_4 ;
  void (*mem_5)(struct ata_port *ap , struct ata_taskfile *tf ) ;
  struct ata_port_operations *mem_6 ;
  void (*mem_7)(struct ata_queued_cmd *qc ) ;
  struct ata_port_operations *mem_8 ;
  void (*mem_9)(struct ata_queued_cmd *qc ) ;
  struct ata_port_operations *mem_10 ;
  void (*mem_11)(struct ata_port *ap , struct ata_taskfile *tf ) ;
  struct ata_port_operations *mem_12 ;
  void (*mem_13)(struct ata_queued_cmd *qc ) ;

  {
//#line 3346
  ap = qc->ap;
//#line 3348
  mem_3 = qc->dev;
//#line 3348
  ata_dev_select(ap, mem_3->devno, 1U, 0U);
//#line 3350
  switch ((int )qc->tf.protocol) {
  case 1: 
//#line 3352
  ata_tf_to_host_nolock(ap, & qc->tf);
//#line 3353
  break;
  case 4: 
//#line 3356
  mem_4 = ap->ops;
//#line 3356
  mem_5 = mem_4->tf_load;
//#line 3356
  ((*mem_5))(ap, & qc->tf);
//#line 3357
  mem_6 = ap->ops;
//#line 3357
  mem_7 = mem_6->bmdma_setup;
//#line 3357
  ((*mem_7))(qc);
//#line 3358
  mem_8 = ap->ops;
//#line 3358
  mem_9 = mem_8->bmdma_start;
//#line 3358
  ((*mem_9))(qc);
//#line 3359
  break;
  case 2: 
//#line 3362
  ata_qc_set_polling(qc);
//#line 3363
  ata_tf_to_host_nolock(ap, & qc->tf);
//#line 3364
  ap->pio_task_state = 4U;
//#line 3365
  queue_work(ata_wq, & ap->pio_task);
//#line 3366
  break;
  case 5: 
//#line 3369
  ata_qc_set_polling(qc);
//#line 3370
  ata_tf_to_host_nolock(ap, & qc->tf);
//#line 3371
  queue_work(ata_wq, & ap->packet_task);
//#line 3372
  break;
  case 6: 
//#line 3375
  ap->flags |= 512UL;
//#line 3376
  ata_tf_to_host_nolock(ap, & qc->tf);
//#line 3377
  queue_work(ata_wq, & ap->packet_task);
//#line 3378
  break;
  case 7: 
//#line 3381
  ap->flags |= 512UL;
//#line 3382
  mem_10 = ap->ops;
//#line 3382
  mem_11 = mem_10->tf_load;
//#line 3382
  ((*mem_11))(ap, & qc->tf);
//#line 3383
  mem_12 = ap->ops;
//#line 3383
  mem_13 = mem_12->bmdma_setup;
//#line 3383
  ((*mem_13))(qc);
//#line 3384
  queue_work(ata_wq, & ap->packet_task);
//#line 3385
  break;
  default: ;
//#line 3388
  while (1) {
//#line 3388
    printk("Badness in %s at %s:%d\n", "ata_qc_issue_prot", "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c",
           3388);
//#line 3388
    dump_stack();
//#line 3388
    break;
  }
//#line 3389
  return (-1);
  }
//#line 3392
  return (0);
}
}
//#line 3403 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static void ata_bmdma_setup_mmio(struct ata_queued_cmd *qc ) 
{ struct ata_port *ap ;
  unsigned int rw ;
  u8 dmactl ;
  void *mmio ;
  struct ata_port_operations *mem_6 ;
  void (*mem_7)(struct ata_port *ap , struct ata_taskfile *tf ) ;

  {
//#line 3405
  ap = qc->ap;
//#line 3406
  rw = (unsigned int )(qc->tf.flags & 8UL);
//#line 3408
  mmio = (void *)ap->ioaddr.bmdma_addr;
//#line 3411
  /*__asm__  ("":)*/;
//#line 3412
  writel(ap->prd_dma, (void volatile   *)(mmio + 4));
//#line 3415
  dmactl = readb((void const volatile   *)(mmio + 0));
//#line 3416
  dmactl = (unsigned char )((int )dmactl & -10);
//#line 3417
  if (! rw) {
//#line 3418
    dmactl = (unsigned char )((int )dmactl | 8);
  }
//#line 3419
  writeb(dmactl, (void volatile   *)(mmio + 0));
//#line 3422
  mem_6 = ap->ops;
//#line 3422
  mem_7 = mem_6->exec_command;
//#line 3422
  ((*mem_7))(ap, & qc->tf);
//#line 3423
  return;
}
}
//#line 3433 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static void ata_bmdma_start_mmio(struct ata_queued_cmd *qc ) 
{ struct ata_port *ap ;
  void *mmio ;
  u8 dmactl ;

  {
//#line 3435
  ap = qc->ap;
//#line 3436
  mmio = (void *)ap->ioaddr.bmdma_addr;
//#line 3440
  dmactl = readb((void const volatile   *)(mmio + 0));
//#line 3441
  writeb((unsigned char )((int )dmactl | 1), (void volatile   *)(mmio + 0));
//#line 3454
  return;
}
}
//#line 3464 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static void ata_bmdma_setup_pio(struct ata_queued_cmd *qc ) 
{ struct ata_port *ap ;
  unsigned int rw ;
  u8 dmactl ;
  struct ata_port_operations *mem_5 ;
  void (*mem_6)(struct ata_port *ap , struct ata_taskfile *tf ) ;

  {
//#line 3466
  ap = qc->ap;
//#line 3467
  rw = (unsigned int )(qc->tf.flags & 8UL);
//#line 3471
  outl(ap->prd_dma, (int )(ap->ioaddr.bmdma_addr + 4UL));
//#line 3474
  dmactl = inb((int )ap->ioaddr.bmdma_addr);
//#line 3475
  dmactl = (unsigned char )((int )dmactl & -10);
//#line 3476
  if (! rw) {
//#line 3477
    dmactl = (unsigned char )((int )dmactl | 8);
  }
//#line 3478
  outb(dmactl, (int )ap->ioaddr.bmdma_addr);
//#line 3481
  mem_5 = ap->ops;
//#line 3481
  mem_6 = mem_5->exec_command;
//#line 3481
  ((*mem_6))(ap, & qc->tf);
//#line 3482
  return;
}
}
//#line 3492 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static void ata_bmdma_start_pio(struct ata_queued_cmd *qc ) 
{ struct ata_port *ap ;
  u8 dmactl ;

  {
//#line 3494
  ap = qc->ap;
//#line 3498
  dmactl = inb((int )ap->ioaddr.bmdma_addr);
//#line 3499
  outb((unsigned char )((int )dmactl | 1), (int )ap->ioaddr.bmdma_addr);
//#line 3501
  return;
}
}
//#line 3515 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
void ata_bmdma_start(struct ata_queued_cmd *qc ) 
{ struct ata_port *mem_2 ;

  {
//#line 3517
  mem_2 = qc->ap;
//#line 3517
  if (mem_2->flags & 64UL) {
//#line 3518
    ata_bmdma_start_mmio(qc);
  } else {
//#line 3520
    ata_bmdma_start_pio(qc);
  }
//#line 3521
  return;
}
}
//#line 3537 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
void ata_bmdma_setup(struct ata_queued_cmd *qc ) 
{ struct ata_port *mem_2 ;

  {
//#line 3539
  mem_2 = qc->ap;
//#line 3539
  if (mem_2->flags & 64UL) {
//#line 3540
    ata_bmdma_setup_mmio(qc);
  } else {
//#line 3542
    ata_bmdma_setup_pio(qc);
  }
//#line 3543
  return;
}
}
//#line 3558 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
void ata_bmdma_irq_clear(struct ata_port *ap ) 
{ void *mmio ;
  unsigned char tmp ;
  unsigned long addr ;
  unsigned char tmp___0 ;

  {
//#line 3560
  if (ap->flags & 64UL) {
//#line 3561
    mmio = (void *)ap->ioaddr.bmdma_addr + 2;
//#line 3562
    tmp = readb((void const volatile   *)mmio);
//#line 3562
    writeb(tmp, (void volatile   *)mmio);
  } else {
//#line 3564
    addr = ap->ioaddr.bmdma_addr + 2UL;
//#line 3565
    tmp___0 = inb((int )addr);
//#line 3565
    outb(tmp___0, (int )addr);
  }
//#line 3568
  return;
}
}
//#line 3583 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
u8 ata_bmdma_status(struct ata_port *ap ) 
{ u8 host_stat ;
  void *mmio ;

  {
//#line 3586
  if (ap->flags & 64UL) {
//#line 3587
    mmio = (void *)ap->ioaddr.bmdma_addr;
//#line 3588
    host_stat = readb((void const volatile   *)(mmio + 2));
  } else {
//#line 3590
    host_stat = inb((int )(ap->ioaddr.bmdma_addr + 2UL));
  }
//#line 3591
  return (host_stat);
}
}
//#line 3607 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
void ata_bmdma_stop(struct ata_queued_cmd *qc ) 
{ struct ata_port *ap ;
  void *mmio ;
  unsigned char tmp ;
  unsigned char tmp___0 ;

  {
//#line 3609
  ap = qc->ap;
//#line 3610
  if (ap->flags & 64UL) {
//#line 3611
    mmio = (void *)ap->ioaddr.bmdma_addr;
//#line 3614
    tmp = readb((void const volatile   *)(mmio + 0));
//#line 3614
    writeb((unsigned char )((int )tmp & -2), (void volatile   *)(mmio + 0));
  } else {
//#line 3618
    tmp___0 = inb((int )ap->ioaddr.bmdma_addr);
//#line 3618
    outb((unsigned char )((int )tmp___0 & -2), (int )ap->ioaddr.bmdma_addr);
  }
//#line 3623
  ata_altstatus(ap);
//#line 3624
  return;
}
}
//#line 3642 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
/*__inline*/ unsigned int ( /*__attribute__((__always_inline__))*/ ata_host_intr)(struct ata_port *ap ,
                                                                          struct ata_queued_cmd *qc ) 
{ u8 status ;
  u8 host_stat ;
  struct ata_port_operations *mem_5 ;
  u8 (*mem_6)(struct ata_port *ap ) ;
  struct ata_port_operations *mem_7 ;
  void (*mem_8)(struct ata_queued_cmd *qc ) ;
  struct ata_port_operations *mem_9 ;
  void (*mem_10)(struct ata_port * ) ;

  {
//#line 3647
  switch ((int )qc->tf.protocol) {
  case 4: 
  case 7: 
  case 5: 
//#line 3653
  mem_5 = ap->ops;
//#line 3653
  mem_6 = mem_5->bmdma_status;
//#line 3653
  host_stat = ((*mem_6))(ap);
//#line 3657
  if (! ((int )host_stat & 4)) {
    goto idle_irq;
  }
//#line 3661
  mem_7 = ap->ops;
//#line 3661
  mem_8 = mem_7->bmdma_stop;
//#line 3661
  ((*mem_8))(qc);
  case 6: 
  case 1: 
//#line 3668
  status = ata_altstatus(ap);
//#line 3669
  if ((int )status & 128) {
    goto idle_irq;
  }
//#line 3673
  status = ata_chk_status(ap);
//#line 3674
  if (! (! ((int )status & 128))) {
    goto idle_irq;
  }
//#line 3680
  mem_9 = ap->ops;
//#line 3680
  mem_10 = mem_9->irq_clear;
//#line 3680
  ((*mem_10))(ap);
//#line 3683
  ata_qc_complete(qc, status);
//#line 3684
  break;
  default: ;
  goto idle_irq;
  }
//#line 3690
  return (1U);
  idle_irq: 
//#line 3693
  ap->stats.idle_irq ++;
//#line 3702
  return (0U);
}
}
//#line 3722 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
irqreturn_t ata_interrupt(int irq , void *dev_instance , struct pt_regs *regs ) 
{ struct ata_host_set *host_set ;
  unsigned int i ;
  unsigned int handled ;
  unsigned long flags ;
  struct ata_port *ap ;
  struct ata_queued_cmd *qc ;
  unsigned int tmp ;

  {
//#line 3724
  host_set = (struct ata_host_set *)dev_instance;
//#line 3726
  handled = 0U;
//#line 3730
  __SLIC_spin_lock_irqsave(& host_set->lock, flags);
//#line 3732
  i = 0U;
//#line 3732
  while (i < host_set->n_ports) {
//#line 3735
    ap = host_set->ports[i];
//#line 3736
    if (ap) {
//#line 3736
      if (! (ap->flags & 516UL)) {
//#line 3740
        qc = ata_qc_from_tag(ap, ap->active_tag);
//#line 3741
        if (qc) {
//#line 3741
          if (! ((int )qc->tf.ctl & 2)) {
//#line 3741
            if (qc->flags & 2UL) {
//#line 3743
              tmp = ata_host_intr(ap, qc);
//#line 3743
              handled |= tmp;
            }
          }
        }
      }
    }
//#line 3732
    i ++;
  }
//#line 3747
  __SLIC_spin_unlock_irqrestore(& host_set->lock, flags);
//#line 3749
  return (handled != 0U);
}
}
//#line 3766 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static void atapi_packet_task(void *_data___0 ) 
{ struct ata_port *ap ;
  struct ata_queued_cmd *qc ;
  u8 status ;
  unsigned int tmp ;
  unsigned long flags ;
  struct ata_host_set *mem_7 ;
  struct ata_port_operations *mem_8 ;
  void (*mem_9)(struct ata_queued_cmd *qc ) ;
  struct ata_host_set *mem_10 ;

  {
//#line 3768
  ap = (struct ata_port *)_data___0;
//#line 3772
  qc = ata_qc_from_tag(ap, ap->active_tag);
//#line 3773
  if (! (! (! ((unsigned int )qc != (unsigned int )((void *)0))))) {
//#line 3773
    printk("<3>Assertion failed! %s,%s,%s,line=%d\n", "qc != NULL", "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c",
           "atapi_packet_task", 3773);
  }
//#line 3774
  if (! (! (! (qc->flags & 2UL)))) {
//#line 3774
    printk("<3>Assertion failed! %s,%s,%s,line=%d\n", "qc->flags & ATA_QCFLAG_ACTIVE",
           "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c",
           "atapi_packet_task", 3774);
  }
//#line 3778
  tmp = ata_busy_sleep(ap, 1250UL, 7500UL);
//#line 3778
  if (tmp) {
    goto err_out;
  }
//#line 3782
  status = ata_chk_status(ap);
//#line 3783
  if (((int )status & 136) != 8) {
    goto err_out;
  }
//#line 3788
  if (! (! (! (ap->cdb_len >= 12U)))) {
//#line 3788
    printk("<3>Assertion failed! %s,%s,%s,line=%d\n", "ap->cdb_len >= 12", "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c",
           "atapi_packet_task", 3788);
  }
//#line 3790
  if ((int )qc->tf.protocol == 7) {
    goto _L;
  } else {
//#line 3790
    if ((int )qc->tf.protocol == 6) {
      _L: 
//#line 3800
      mem_7 = ap->host_set;
//#line 3800
      __SLIC_spin_lock_irqsave(& mem_7->lock, flags);
//#line 3801
      ap->flags &= 4294966783UL;
//#line 3802
      ata_data_xfer(ap, qc->cdb, ap->cdb_len, 1);
//#line 3803
      if ((int )qc->tf.protocol == 7) {
//#line 3804
        mem_8 = ap->ops;
//#line 3804
        mem_9 = mem_8->bmdma_start;
//#line 3804
        ((*mem_9))(qc);
      }
//#line 3805
      mem_10 = ap->host_set;
//#line 3805
      __SLIC_spin_unlock_irqrestore(& mem_10->lock, flags);
    } else {
//#line 3807
      ata_data_xfer(ap, qc->cdb, ap->cdb_len, 1);
//#line 3810
      ap->pio_task_state = 4U;
//#line 3811
      queue_work(ata_wq, & ap->pio_task);
    }
  }
//#line 3814
  return;
  err_out: 
//#line 3817
  ata_poll_qc_complete(qc, (unsigned char)1);
//#line 3818
  return;
}
}
//#line 3833 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
int ata_port_start(struct ata_port *ap ) 
{ struct device *dev ;
  struct ata_host_set *mem_3 ;

  {
//#line 3835
  mem_3 = ap->host_set;
//#line 3835
  dev = mem_3->dev;
//#line 3837
  ap->prd = (struct ata_prd *)dma_alloc_coherent(dev, 2048U, & ap->prd_dma, 208U);
//#line 3838
  if (! ap->prd) {
//#line 3839
    return (-12);
  }
//#line 3843
  return (0);
}
}
//#line 3858 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
void ata_port_stop(struct ata_port *ap ) 
{ struct device *dev ;
  struct ata_host_set *mem_3 ;

  {
//#line 3860
  mem_3 = ap->host_set;
//#line 3860
  dev = mem_3->dev;
//#line 3862
  dma_free_coherent(dev, 2048U, (void *)ap->prd, ap->prd_dma);
//#line 3863
  return;
}
}
//#line 3865 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
void ata_host_stop(struct ata_host_set *host_set ) 
{ 

  {
//#line 3867
  if (host_set->mmio_base) {
//#line 3868
    iounmap((void volatile   *)host_set->mmio_base);
  }
//#line 3869
  return;
}
}
//#line 3880 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static void ata_host_remove(struct ata_port *ap , unsigned int do_unregister ) 
{ struct Scsi_Host *sh ;
  struct ata_port_operations *mem_4 ;
  void (*mem_5)(struct ata_port *ap ) ;

  {
//#line 3882
  sh = ap->host;
//#line 3886
  if (do_unregister) {
//#line 3887
    scsi_remove_host(sh);
  }
//#line 3889
  mem_4 = ap->ops;
//#line 3889
  mem_5 = mem_4->port_stop;
//#line 3889
  ((*mem_5))(ap);
//#line 3890
  return;
}
}
//#line 3908 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static void ata_host_init(struct ata_port *ap , struct Scsi_Host *host , struct ata_host_set *host_set ,
                          struct ata_probe_ent *ent , unsigned int port_no ) 
{ unsigned int i ;
  unsigned int tmp ;

  {
//#line 3914
  host->max_id = 16U;
//#line 3915
  host->max_lun = 1U;
//#line 3916
  host->max_channel = 1U;
//#line 3917
  tmp = ata_unique_id;
//#line 3917
  ata_unique_id ++;
//#line 3917
  host->unique_id = tmp;
//#line 3918
  host->max_cmd_len = (unsigned char)12;
//#line 3920
  scsi_assign_lock(host, & host_set->lock);
//#line 3922
  ap->flags = 4UL;
//#line 3923
  ap->id = host->unique_id;
//#line 3924
  ap->host = host;
//#line 3925
  ap->ctl = (unsigned char)8;
//#line 3926
  ap->host_set = host_set;
//#line 3927
  ap->port_no = port_no;
//#line 3928
  if (ent->legacy_mode) {
//#line 3928
    ap->hard_port_no = ent->hard_port_no;
  } else {
//#line 3928
    ap->hard_port_no = port_no;
  }
//#line 3930
  ap->pio_mask = ent->pio_mask;
//#line 3931
  ap->mwdma_mask = ent->mwdma_mask;
//#line 3932
  ap->udma_mask = ent->udma_mask;
//#line 3933
  ap->flags |= ent->host_flags;
//#line 3934
  ap->ops = ent->port_ops;
//#line 3935
  ap->cbl = 0U;
//#line 3936
  ap->active_tag = 4210818301U;
//#line 3937
  ap->last_ctl = (unsigned char)255;
//#line 3939
  while (1) {
//#line 3939
    while (1) {
//#line 3939
      ap->packet_task.entry.next = & ap->packet_task.entry;
//#line 3939
      ap->packet_task.entry.prev = & ap->packet_task.entry;
//#line 3939
      break;
    }
//#line 3939
    ap->packet_task.pending = 0UL;
//#line 3939
    while (1) {
//#line 3939
      ap->packet_task.func = & atapi_packet_task;
//#line 3939
      ap->packet_task.data = (void *)ap;
//#line 3939
      break;
    }
//#line 3939
    init_timer(& ap->packet_task.timer);
//#line 3939
    break;
  }
//#line 3940
  while (1) {
//#line 3940
    while (1) {
//#line 3940
      ap->pio_task.entry.next = & ap->pio_task.entry;
//#line 3940
      ap->pio_task.entry.prev = & ap->pio_task.entry;
//#line 3940
      break;
    }
//#line 3940
    ap->pio_task.pending = 0UL;
//#line 3940
    while (1) {
//#line 3940
      ap->pio_task.func = & ata_pio_task;
//#line 3940
      ap->pio_task.data = (void *)ap;
//#line 3940
      break;
    }
//#line 3940
    init_timer(& ap->pio_task.timer);
//#line 3940
    break;
  }
//#line 3942
  i = 0U;
//#line 3942
  while (i < 2U) {
//#line 3943
    ap->device[i].devno = i;
//#line 3942
    i ++;
  }
//#line 3950
  __constant_memcpy((void *)(& ap->ioaddr), (void const   *)(& ent->port[port_no]),
                    sizeof(struct ata_ioports ));
//#line 3951
  return;
}
}
//#line 3969 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static struct ata_port *ata_host_add(struct ata_probe_ent *ent , struct ata_host_set *host_set ,
                                     unsigned int port_no ) 
{ struct Scsi_Host *host ;
  struct ata_port *ap ;
  int rc ;
  struct ata_port_operations *mem_7 ;
  int (*mem_8)(struct ata_port *ap ) ;

  {
//#line 3978
  host = scsi_host_alloc(ent->sht, (int )sizeof(struct ata_port ));
//#line 3979
  if (! host) {
//#line 3980
    return ((struct ata_port *)((void *)0));
  }
//#line 3982
  ap = (struct ata_port *)(& host->hostdata[0]);
//#line 3984
  ata_host_init(ap, host, host_set, ent, port_no);
//#line 3986
  mem_7 = ap->ops;
//#line 3986
  mem_8 = mem_7->port_start;
//#line 3986
  rc = ((*mem_8))(ap);
//#line 3987
  if (rc) {
    goto err_out;
  }
//#line 3990
  return (ap);
  err_out: 
//#line 3993
  scsi_host_put(host);
//#line 3994
  return ((struct ata_port *)((void *)0));
}
}
//#line 4017 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
int ata_device_add(struct ata_probe_ent *ent ) 
{ unsigned int count ;
  unsigned int i ;
  struct device *dev ;
  struct ata_host_set *host_set ;
  struct ata_port *ap ;
  unsigned long xfer_mode_mask ;
  char const   *tmp ;
  int tmp___0 ;
  int tmp___1 ;
  struct ata_port *ap___0 ;
  int rc ;
  struct ata_port *ap___1 ;
  struct ata_port_operations *mem_14 ;
  void (*mem_15)(struct ata_port * ) ;
  struct ata_port_operations *mem_16 ;
  struct ata_port *mem_17 ;

  {
//#line 4019
  count = 0U;
//#line 4020
  dev = ent->dev;
//#line 4025
  host_set = (struct ata_host_set *)kmalloc(sizeof(struct ata_host_set ) + ent->n_ports * sizeof(void *),
                                            208U);
//#line 4027
  if (! host_set) {
//#line 4028
    return (0);
  }
//#line 4029
  __constant_c_memset((void *)host_set, 0UL, sizeof(struct ata_host_set ) + ent->n_ports * sizeof(void *));
//#line 4030
  __SLIC_spin_lock_init(& host_set->lock);
//#line 4032
  host_set->dev = dev;
//#line 4033
  host_set->n_ports = ent->n_ports;
//#line 4034
  host_set->irq = ent->irq;
//#line 4035
  host_set->mmio_base = ent->mmio_base;
//#line 4036
  host_set->private_data = ent->private_data;
//#line 4037
  host_set->ops = ent->port_ops;
//#line 4040
  i = 0U;
//#line 4040
  while (i < ent->n_ports) {
//#line 4044
    ap = ata_host_add(ent, host_set, i);
//#line 4045
    if (! ap) {
      goto err_out;
    }
//#line 4048
    host_set->ports[i] = ap;
//#line 4049
    xfer_mode_mask = (unsigned long )((ap->udma_mask | (ap->mwdma_mask << 8)) | (ap->pio_mask << 11));
//#line 4054
    tmp = ata_mode_string((unsigned int )xfer_mode_mask);
//#line 4054
    if (ap->flags & 8UL) {
//#line 4054
      tmp___0 = 'S';
    } else {
//#line 4054
      tmp___0 = 'P';
    }
//#line 4054
    printk("<6>ata%u: %cATA max %s cmd 0x%lX ctl 0x%lX bmdma 0x%lX irq %lu\n", ap->id,
           tmp___0, tmp, ap->ioaddr.cmd_addr, ap->ioaddr.ctl_addr, ap->ioaddr.bmdma_addr,
           ent->irq);
//#line 4064
    ata_chk_status(ap);
//#line 4065
    mem_14 = host_set->ops;
//#line 4065
    mem_15 = mem_14->irq_clear;
//#line 4065
    ((*mem_15))(ap);
//#line 4066
    count ++;
//#line 4040
    i ++;
  }
//#line 4069
  if (! count) {
//#line 4070
    kfree((void const   *)host_set);
//#line 4071
    return (0);
  }
//#line 4075
  mem_16 = ent->port_ops;
//#line 4075
  tmp___1 = __SLIC_request_irq((unsigned int )ent->irq, (int )mem_16->irq_handler,
                               (unsigned long )ent->irq_flags, "libata", (void *)host_set);
//#line 4075
  if (tmp___1) {
    goto err_out;
  }
//#line 4081
  i = 0U;
//#line 4081
  while (i < count) {
//#line 4085
    ap___0 = host_set->ports[i];
//#line 4088
    rc = ata_bus_probe(ap___0);
//#line 4091
    if (rc) {

    }
//#line 4100
    rc = (int )scsi_add_host(ap___0->host, dev);
//#line 4101
    if (rc) {
//#line 4102
      printk("<3>ata%u: scsi_add_host failed\n", ap___0->id);
    }
//#line 4081
    i ++;
  }
//#line 4114
  i = 0U;
//#line 4114
  while (i < count) {
//#line 4115
    ap___1 = host_set->ports[i];
//#line 4117
    scsi_scan_host(ap___1->host);
//#line 4114
    i ++;
  }
//#line 4120
  dev_set_drvdata(dev, (void *)host_set);
//#line 4123
  return ((int )ent->n_ports);
  err_out: 
//#line 4126
  i = 0U;
//#line 4126
  while (i < count) {
//#line 4127
    ata_host_remove(host_set->ports[i], 1U);
//#line 4128
    mem_17 = host_set->ports[i];
//#line 4128
    scsi_host_put(mem_17->host);
//#line 4126
    i ++;
  }
//#line 4130
  kfree((void const   *)host_set);
//#line 4132
  return (0);
}
}
//#line 4147 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
void ata_host_set_remove(struct ata_host_set *host_set ) 
{ struct ata_port *ap ;
  unsigned int i ;
  struct ata_ioports *ioaddr ;
  struct ata_port_operations *mem_5 ;
  struct ata_port_operations *mem_6 ;
  void (*mem_7)(struct ata_host_set *host_set ) ;

  {
//#line 4152
  i = 0U;
//#line 4152
  while (i < host_set->n_ports) {
//#line 4153
    ap = host_set->ports[i];
//#line 4154
    scsi_remove_host(ap->host);
//#line 4152
    i ++;
  }
//#line 4157
  __SLIC_free_irq((unsigned int )host_set->irq, (void *)host_set);
//#line 4159
  i = 0U;
//#line 4159
  while (i < host_set->n_ports) {
//#line 4160
    ap = host_set->ports[i];
//#line 4162
    ata_scsi_release(ap->host);
//#line 4164
    if ((ap->flags & 16UL) == 0UL) {
//#line 4165
      ioaddr = & ap->ioaddr;
//#line 4167
      if (ioaddr->cmd_addr == 496UL) {
//#line 4168
        __release_region(& ioport_resource, 496UL, 8UL);
      } else {
//#line 4169
        if (ioaddr->cmd_addr == 368UL) {
//#line 4170
          __release_region(& ioport_resource, 368UL, 8UL);
        }
      }
    }
//#line 4173
    scsi_host_put(ap->host);
//#line 4159
    i ++;
  }
//#line 4176
  mem_5 = host_set->ops;
//#line 4176
  if (mem_5->host_stop) {
//#line 4177
    mem_6 = host_set->ops;
//#line 4177
    mem_7 = mem_6->host_stop;
//#line 4177
    ((*mem_7))(host_set);
  }
//#line 4179
  kfree((void const   *)host_set);
//#line 4180
  return;
}
}
//#line 4196 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
int ata_scsi_release(struct Scsi_Host *host ) 
{ struct ata_port *ap ;
  struct ata_port_operations *mem_3 ;
  void (*mem_4)(struct ata_port * ) ;

  {
//#line 4198
  ap = (struct ata_port *)(& host->hostdata[0]);
//#line 4202
  mem_3 = ap->ops;
//#line 4202
  mem_4 = mem_3->port_disable;
//#line 4202
  ((*mem_4))(ap);
//#line 4203
  ata_host_remove(ap, 0U);
//#line 4206
  return (1);
}
}
//#line 4221 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
void ata_std_ports(struct ata_ioports *ioaddr ) 
{ 

  {
//#line 4223
  ioaddr->data_addr = ioaddr->cmd_addr;
//#line 4224
  ioaddr->error_addr = ioaddr->cmd_addr + 1UL;
//#line 4225
  ioaddr->feature_addr = ioaddr->cmd_addr + 1UL;
//#line 4226
  ioaddr->nsect_addr = ioaddr->cmd_addr + 2UL;
//#line 4227
  ioaddr->lbal_addr = ioaddr->cmd_addr + 3UL;
//#line 4228
  ioaddr->lbam_addr = ioaddr->cmd_addr + 4UL;
//#line 4229
  ioaddr->lbah_addr = ioaddr->cmd_addr + 5UL;
//#line 4230
  ioaddr->device_addr = ioaddr->cmd_addr + 6UL;
//#line 4231
  ioaddr->status_addr = ioaddr->cmd_addr + 7UL;
//#line 4232
  ioaddr->command_addr = ioaddr->cmd_addr + 7UL;
//#line 4233
  return;
}
}
//#line 4235 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static struct ata_probe_ent *ata_probe_ent_alloc(struct device *dev , struct ata_port_info *port ) 
{ struct ata_probe_ent *probe_ent ;
  char const   *tmp ;

  {
//#line 4240
  probe_ent = (struct ata_probe_ent *)kmalloc(sizeof((*probe_ent)), 208U);
//#line 4241
  if (! probe_ent) {
//#line 4242
    tmp = kobject_name((struct kobject  const  *)(& dev->kobj));
//#line 4242
    printk("<3>libata(%s): out of memory\n", tmp);
//#line 4244
    return ((struct ata_probe_ent *)((void *)0));
  }
//#line 4247
  __constant_c_and_count_memset((void *)probe_ent, 0UL, sizeof((*probe_ent)));
//#line 4249
  while (1) {
//#line 4249
    probe_ent->node.next = & probe_ent->node;
//#line 4249
    probe_ent->node.prev = & probe_ent->node;
//#line 4249
    break;
  }
//#line 4250
  probe_ent->dev = dev;
//#line 4252
  probe_ent->sht = port->sht;
//#line 4253
  probe_ent->host_flags = port->host_flags;
//#line 4254
  probe_ent->pio_mask = (unsigned int )port->pio_mask;
//#line 4255
  probe_ent->mwdma_mask = (unsigned int )port->mwdma_mask;
//#line 4256
  probe_ent->udma_mask = (unsigned int )port->udma_mask;
//#line 4257
  probe_ent->port_ops = port->port_ops;
//#line 4259
  return (probe_ent);
}
}
//#line 4266 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
void ata_pci_host_stop(struct ata_host_set *host_set ) 
{ struct pci_dev *pdev ;
  struct device  const  *__mptr ;
  struct pci_dev *mem_4 ;

  {
//#line 4268
  __mptr = (struct device  const  *)host_set->dev;
//#line 4268
  mem_4 = (struct pci_dev *)0;
//#line 4268
  pdev = (struct pci_dev *)((char *)__mptr - (unsigned int )(& mem_4->dev));
//#line 4270
  pci_iounmap(pdev, host_set->mmio_base);
//#line 4271
  return;
}
}
//#line 4285 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
struct ata_probe_ent *ata_pci_init_native_mode(struct pci_dev *pdev , struct ata_port_info **port ) 
{ struct ata_probe_ent *probe_ent ;
  struct device *tmp ;
  struct ata_probe_ent *tmp___0 ;
  struct ata_port_info **mem_6 ;

  {
//#line 4288
  tmp = pci_dev_to_dev(pdev);
//#line 4288
  mem_6 = port + 0;
//#line 4288
  tmp___0 = ata_probe_ent_alloc(tmp, (*mem_6));
//#line 4288
  probe_ent = tmp___0;
//#line 4290
  if (! probe_ent) {
//#line 4291
    return ((struct ata_probe_ent *)((void *)0));
  }
//#line 4293
  probe_ent->n_ports = 2U;
//#line 4294
  probe_ent->irq = (unsigned long )pdev->irq;
//#line 4295
  probe_ent->irq_flags = 67108864U;
//#line 4297
  probe_ent->port[0].cmd_addr = pdev->resource[0].start;
//#line 4298
  probe_ent->port[0].ctl_addr = pdev->resource[1].start | 2UL;
//#line 4298
  probe_ent->port[0].altstatus_addr = probe_ent->port[0].ctl_addr;
//#line 4301
  probe_ent->port[0].bmdma_addr = pdev->resource[4].start;
//#line 4303
  probe_ent->port[1].cmd_addr = pdev->resource[2].start;
//#line 4304
  probe_ent->port[1].ctl_addr = pdev->resource[3].start | 2UL;
//#line 4304
  probe_ent->port[1].altstatus_addr = probe_ent->port[1].ctl_addr;
//#line 4307
  probe_ent->port[1].bmdma_addr = pdev->resource[4].start + 8UL;
//#line 4309
  ata_std_ports(& probe_ent->port[0]);
//#line 4310
  ata_std_ports(& probe_ent->port[1]);
//#line 4312
  return (probe_ent);
}
}
//#line 4315 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static struct ata_probe_ent *ata_pci_init_legacy_mode(struct pci_dev *pdev , struct ata_port_info **port ,
                                                      struct ata_probe_ent **ppe2 ) 
{ struct ata_probe_ent *probe_ent ;
  struct ata_probe_ent *probe_ent2 ;
  struct device *tmp ;
  struct device *tmp___0 ;
  struct ata_port_info **mem_8 ;
  struct ata_port_info **mem_9 ;

  {
//#line 4321
  tmp = pci_dev_to_dev(pdev);
//#line 4321
  mem_8 = port + 0;
//#line 4321
  probe_ent = ata_probe_ent_alloc(tmp, (*mem_8));
//#line 4322
  if (! probe_ent) {
//#line 4323
    return ((struct ata_probe_ent *)((void *)0));
  }
//#line 4324
  tmp___0 = pci_dev_to_dev(pdev);
//#line 4324
  mem_9 = port + 1;
//#line 4324
  probe_ent2 = ata_probe_ent_alloc(tmp___0, (*mem_9));
//#line 4325
  if (! probe_ent2) {
//#line 4326
    kfree((void const   *)probe_ent);
//#line 4327
    return ((struct ata_probe_ent *)((void *)0));
  }
//#line 4330
  probe_ent->n_ports = 1U;
//#line 4331
  probe_ent->irq = 14UL;
//#line 4333
  probe_ent->hard_port_no = 0U;
//#line 4334
  probe_ent->legacy_mode = 1U;
//#line 4336
  probe_ent2->n_ports = 1U;
//#line 4337
  probe_ent2->irq = 15UL;
//#line 4339
  probe_ent2->hard_port_no = 1U;
//#line 4340
  probe_ent2->legacy_mode = 1U;
//#line 4342
  probe_ent->port[0].cmd_addr = 496UL;
//#line 4343
  probe_ent->port[0].ctl_addr = 1014UL;
//#line 4343
  probe_ent->port[0].altstatus_addr = probe_ent->port[0].ctl_addr;
//#line 4345
  probe_ent->port[0].bmdma_addr = pdev->resource[4].start;
//#line 4347
  probe_ent2->port[0].cmd_addr = 368UL;
//#line 4348
  probe_ent2->port[0].ctl_addr = 886UL;
//#line 4348
  probe_ent2->port[0].altstatus_addr = probe_ent2->port[0].ctl_addr;
//#line 4350
  probe_ent2->port[0].bmdma_addr = pdev->resource[4].start + 8UL;
//#line 4352
  ata_std_ports(& probe_ent->port[0]);
//#line 4353
  ata_std_ports(& probe_ent2->port[0]);
//#line 4355
  (*ppe2) = probe_ent2;
//#line 4356
  return (probe_ent);
}
}
//#line 4381 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
int ata_pci_init_one(struct pci_dev *pdev , struct ata_port_info **port_info , unsigned int n_ports ) 
{ struct ata_probe_ent *probe_ent ;
  struct ata_probe_ent *probe_ent2 ;
  struct ata_port_info *port[2] ;
  u8 tmp8 ;
  u8 mask ;
  unsigned int legacy_mode ;
  int disable_dev_on_err ;
  int rc ;
  struct resource *conflict ;
  struct resource res ;
  int tmp ;
  struct resource *tmp___0 ;
  struct resource *conflict___0 ;
  struct resource res___0 ;
  int tmp___1 ;
  struct resource *tmp___2 ;
  struct ata_port_info **mem_20 ;
  struct ata_port_info **mem_21 ;
  struct ata_port_info *mem_22 ;

  {
//#line 4384
  probe_ent2 = (struct ata_probe_ent *)((void *)0);
//#line 4387
  legacy_mode = 0U;
//#line 4388
  disable_dev_on_err = 1;
//#line 4393
  mem_20 = port_info + 0;
//#line 4393
  port[0] = (*mem_20);
//#line 4394
  if (n_ports > 1U) {
//#line 4395
    mem_21 = port_info + 1;
//#line 4395
    port[1] = (*mem_21);
  } else {
//#line 4397
    port[1] = port[1]/*[0]*/;
  }
//#line 4399
  mem_22 = port[1]/*[0]*/;
//#line 4399
  if ((mem_22->host_flags & 16UL) == 0UL) {
//#line 4399
    if (pdev->class >> 8 == 257U) {
//#line 4402
      pci_read_config_byte(pdev, 9, & tmp8);
//#line 4403
      mask = (unsigned char)5;
//#line 4404
      if (((int )tmp8 & (int )mask) != (int )mask) {
//#line 4405
        legacy_mode = 8U;
      }
    }
  }
//#line 4409
  if (! legacy_mode) {
//#line 4409
    if (n_ports > 1U) {
//#line 4410
      printk("<3>ata: BUG: native mode, n_ports > 1\n");
//#line 4411
      return (-22);
    }
  }
//#line 4414
  rc = pci_enable_device(pdev);
//#line 4415
  if (rc) {
//#line 4416
    return (rc);
  }
//#line 4418
  rc = pci_request_regions(pdev, /*(char *)*/"libata");
//#line 4419
  if (rc) {
//#line 4420
    disable_dev_on_err = 0;
    goto err_out;
  }
//#line 4424
  if (legacy_mode) {
//#line 4425
    tmp___0 = __request_region(& ioport_resource, 496UL, 8UL, "libata");
//#line 4425
    if (tmp___0) {
//#line 4437
      legacy_mode |= 1U;
    } else {
//#line 4427
      res.start = 496UL;
//#line 4428
      res.end = 503UL;
//#line 4429
      conflict = ____request_resource(& ioport_resource, & res);
//#line 4430
      tmp = strcmp(conflict->name, "libata");
//#line 4430
      if (tmp) {
//#line 4433
        disable_dev_on_err = 0;
//#line 4434
        printk("<4>ata: 0x1f0 IDE port busy\n");
      } else {
//#line 4431
        legacy_mode |= 1U;
      }
    }
//#line 4439
    tmp___2 = __request_region(& ioport_resource, 368UL, 8UL, "libata");
//#line 4439
    if (tmp___2) {
//#line 4451
      legacy_mode |= 2U;
    } else {
//#line 4441
      res___0.start = 368UL;
//#line 4442
      res___0.end = 375UL;
//#line 4443
      conflict___0 = ____request_resource(& ioport_resource, & res___0);
//#line 4444
      tmp___1 = strcmp(conflict___0->name, "libata");
//#line 4444
      if (tmp___1) {
//#line 4447
        disable_dev_on_err = 0;
//#line 4448
        printk("<4>ata: 0x170 IDE port busy\n");
      } else {
//#line 4445
        legacy_mode |= 2U;
      }
    }
  }
//#line 4455
  if (legacy_mode == 8U) {
//#line 4456
    rc = -16;
    goto err_out_regions;
  }
//#line 4460
  rc = pci_set_dma_mask(pdev, 4294967295ULL);
//#line 4461
  if (rc) {
    goto err_out_regions;
  }
//#line 4463
  rc = pci_set_consistent_dma_mask(pdev, 4294967295ULL);
//#line 4464
  if (rc) {
    goto err_out_regions;
  }
//#line 4467
  if (legacy_mode) {
//#line 4468
    probe_ent = ata_pci_init_legacy_mode(pdev, port, & probe_ent2);
  } else {
//#line 4470
    probe_ent = ata_pci_init_native_mode(pdev, port);
  }
//#line 4471
  if (! probe_ent) {
//#line 4472
    rc = -12;
    goto err_out_regions;
  }
//#line 4476
  pci_set_master(pdev);
//#line 4479
  if (legacy_mode) {
//#line 4480
    if (legacy_mode & 1U) {
//#line 4481
      ata_device_add(probe_ent);
    }
//#line 4482
    if (legacy_mode & 2U) {
//#line 4483
      ata_device_add(probe_ent2);
    }
  } else {
//#line 4485
    ata_device_add(probe_ent);
  }
//#line 4487
  kfree((void const   *)probe_ent);
//#line 4488
  kfree((void const   *)probe_ent2);
//#line 4490
  return (0);
  err_out_regions: 
//#line 4493
  if (legacy_mode & 1U) {
//#line 4494
    __release_region(& ioport_resource, 496UL, 8UL);
  }
//#line 4495
  if (legacy_mode & 2U) {
//#line 4496
    __release_region(& ioport_resource, 368UL, 8UL);
  }
//#line 4497
  pci_release_regions(pdev);
  err_out: 
//#line 4499
  if (disable_dev_on_err) {
//#line 4500
    pci_disable_device(pdev);
  }
//#line 4501
  return (rc);
}
}
//#line 4518 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
void ata_pci_remove_one(struct pci_dev *pdev ) 
{ struct device *dev ;
  struct device *tmp ;
  struct ata_host_set *host_set ;
  struct ata_host_set *tmp___0 ;

  {
//#line 4520
  tmp = pci_dev_to_dev(pdev);
//#line 4520
  dev = tmp;
//#line 4521
  tmp___0 = (struct ata_host_set *)dev_get_drvdata(dev);
//#line 4521
  host_set = tmp___0;
//#line 4523
  ata_host_set_remove(host_set);
//#line 4524
  pci_release_regions(pdev);
//#line 4525
  pci_disable_device(pdev);
//#line 4526
  dev_set_drvdata(dev, (void *)0);
//#line 4527
  return;
}
}
//#line 4530 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
int pci_test_config_bits(struct pci_dev *pdev , struct pci_bits *bits ) 
{ unsigned long tmp ;
  u8 tmp8 ;
  u16 tmp16 ;
  u32 tmp32 ;
  int tmp___0 ;

  {
//#line 4532
  tmp = 0UL;
//#line 4534
  switch ((int )bits->width) {
  case 1: 
//#line 4536
  tmp8 = (unsigned char)0;
//#line 4537
  pci_read_config_byte(pdev, (int )bits->reg, & tmp8);
//#line 4538
  tmp = (unsigned long )tmp8;
//#line 4539
  break;
  case 2: 
//#line 4542
  tmp16 = (unsigned short)0;
//#line 4543
  pci_read_config_word(pdev, (int )bits->reg, & tmp16);
//#line 4544
  tmp = (unsigned long )tmp16;
//#line 4545
  break;
  case 4: 
//#line 4548
  tmp32 = 0U;
//#line 4549
  pci_read_config_dword(pdev, (int )bits->reg, & tmp32);
//#line 4550
  tmp = (unsigned long )tmp32;
//#line 4551
  break;
  default: ;
//#line 4555
  return (-22);
  }
//#line 4558
  tmp &= bits->mask;
//#line 4560
  if (tmp == bits->val) {
//#line 4560
    tmp___0 = 1;
  } else {
//#line 4560
    tmp___0 = 0;
  }
//#line 4560
  return (tmp___0);
}
}
//#line 4565
static int ata_init(void)  /*__attribute__((__section__(".init.text")))*/ ;
//#line 4565
static int ata_init(void)  /*__attribute__((__section__(".init.text")))*/ ;
//#line 4565 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static int ata_init(void) 
{ 

  {
//#line 4567
  ata_wq = __create_workqueue("ata", 0);
//#line 4568
  if (! ata_wq) {
//#line 4569
    return (-12);
  }
//#line 4571
  printk("<7>libata version 1.12 loaded.\n");
//#line 4572
  return (0);
}
}
//#line 4575
static void ata_exit(void)  /*__attribute__((__used__, __section__(".exit.text")))*/ ;
//#line 4575
static void ata_exit(void)  /*__attribute__((__used__, __section__(".exit.text")))*/ ;
//#line 4575 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
static void ata_exit(void) 
{ 

  {
//#line 4577
  destroy_workqueue(ata_wq);
//#line 4578
  return;
}
}
//#line 4580 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
int SLIC_driver_init(void) 
{ int tmp ;

  {
//#line 4580
  tmp = ata_init();
//#line 4580
  return (tmp);
}
}
//#line 4581 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-core.c"
void SLIC_driver_exit(void) 
{ 

  {
//#line 4581
  ata_exit();
//#line 4581
  return;
}
}
//#line 1 "libata-scsi.cil.o"
//#pragma merger(0,"./libata-scsi.cil.i","")
//#line 189 "include//*asm*//string.h"
/*__inline*/ static size_t ( /*__attribute__((__always_inline__))*/ strlen)(char const   *s ) 
{ /*register*/ int __res ;

  {
//#line 193
  /*__asm__  ("":)*/;
//#line 201
  return ((unsigned int )__res);
}
}
//#line 204 "include//*asm*//string.h"
/*__inline*/ static void *( /*__attribute__((__always_inline__))*/ __memcpy)(void *to , void const   *from ,
                                                                     size_t n ) 
{ 

  {
//#line 207
  /*__asm__  ("":)*/;
//#line 219
  return (to);
}
}
//#line 486 "include//*asm*//uaccess.h"
extern unsigned long /*__attribute__((__warn_unused_result__))*/  copy_to_user(void *to ,
                                                                           void const   *from ,
                                                                           unsigned long n ) ;
//#line 631 "include/linux/blkdev.h"
extern void blk_queue_max_sectors(request_queue_t * , unsigned short  ) ;
//#line 632
extern void blk_queue_max_phys_segments(request_queue_t * , unsigned short  ) ;
//#line 398 "include/linux/libata.h"
int ata_scsi_ioctl(struct scsi_device *scsidev , int cmd , void *arg ) ;
//#line 399
int ata_scsi_queuecmd(struct scsi_cmnd *cmd , void (*done)(struct scsi_cmnd * ) ) ;
//#line 400
int ata_scsi_error(struct Scsi_Host *host ) ;
//#line 437
void ata_scsi_simulate(u16 *id , struct scsi_cmnd *cmd , void (*done)(struct scsi_cmnd * ) ) ;
//#line 439
int ata_std_bios_param(struct scsi_device *sdev , struct block_device *bdev , sector_t capacity ,
                       int *geom ) ;
//#line 442
int ata_scsi_slave_config(struct scsi_device *sdev ) ;
//#line 665 "include/linux/libata.h"
/*__inline*/ static int ( /*__attribute__((__always_inline__))*/ ata_try_flush_cache)(struct ata_device *dev ) 
{ int tmp ;

  {
//#line 667
  if ((int )dev->id[85] & 32) {
//#line 667
    tmp = 1;
  } else {
//#line 667
    if ((int )dev->id[83] & 4096) {
//#line 667
      tmp = 1;
    } else {
//#line 667
      if ((int )dev->id[83] & 8192) {
//#line 667
        tmp = 1;
      } else {
//#line 667
        tmp = 0;
      }
    }
  }
//#line 667
  return (tmp);
}
}
//#line 54 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata.h"
void ata_to_sense_error(struct ata_queued_cmd *qc , u8 drv_stat ) ;
//#line 56
unsigned int ata_scsiop_inq_std(struct ata_scsi_args *args , u8 *rbuf , unsigned int buflen ) ;
//#line 59
unsigned int ata_scsiop_inq_00(struct ata_scsi_args *args , u8 *rbuf , unsigned int buflen ) ;
//#line 62
unsigned int ata_scsiop_inq_80(struct ata_scsi_args *args , u8 *rbuf , unsigned int buflen ) ;
//#line 64
unsigned int ata_scsiop_inq_83(struct ata_scsi_args *args , u8 *rbuf , unsigned int buflen ) ;
//#line 66
unsigned int ata_scsiop_noop(struct ata_scsi_args *args , u8 *rbuf , unsigned int buflen ) ;
//#line 70
unsigned int ata_scsiop_mode_sense(struct ata_scsi_args *args , u8 *rbuf , unsigned int buflen ) ;
//#line 72
unsigned int ata_scsiop_read_cap(struct ata_scsi_args *args , u8 *rbuf , unsigned int buflen ) ;
//#line 74
unsigned int ata_scsiop_report_luns(struct ata_scsi_args *args , u8 *rbuf , unsigned int buflen ) ;
//#line 76
void ata_scsi_badcmd(struct scsi_cmnd *cmd , void (*done)(struct scsi_cmnd * ) , u8 asc ,
                     u8 ascq ) ;
//#line 79
void ata_scsi_rbuf_fill(struct ata_scsi_args *args , unsigned int (*actor)(struct ata_scsi_args *args ,
                                                                           u8 *rbuf ,
                                                                           unsigned int buflen ) ) ;
//#line 83 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata.h"
/*__inline*/ static void ( /*__attribute__((__always_inline__))*/ ata_bad_scsiop)(struct scsi_cmnd *cmd ,
                                                                          void (*done)(struct scsi_cmnd * ) ) 
{ 

  {
//#line 85
  ata_scsi_badcmd(cmd, done, (unsigned char)32, (unsigned char)0);
//#line 86
  return;
}
}
//#line 88 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata.h"
/*__inline*/ static void ( /*__attribute__((__always_inline__))*/ ata_bad_cdb)(struct scsi_cmnd *cmd ,
                                                                       void (*done)(struct scsi_cmnd * ) ) 
{ 

  {
//#line 90
  ata_scsi_badcmd(cmd, done, (unsigned char)36, (unsigned char)0);
//#line 91
  return;
}
}
//#line 48 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-scsi.c"
static struct ata_device *ata_scsi_find_dev(struct ata_port *ap , struct scsi_device *scsidev ) ;
//#line 70 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-scsi.c"
int ata_std_bios_param(struct scsi_device *sdev , struct block_device *bdev , sector_t capacity ,
                       int *geom ) 
{ unsigned long __upper ;
  unsigned long __high ;
  unsigned long __base ;
  int *mem_10 ;
  int *mem_11 ;
  int *mem_12 ;

  {
//#line 73
  mem_10 = geom + 0;
//#line 73
  (*mem_10) = 255;
//#line 74
  mem_11 = geom + 1;
//#line 74
  (*mem_11) = 63;
//#line 75
  __base = 16065UL;
//#line 75
  __upper = __high;
//#line 75
  if (__high) {
//#line 75
    __upper = __high % __base;
//#line 75
    __high /= __base;
  }
//#line 76
  mem_12 = geom + 2;
//#line 76
  (*mem_12) = (int )capacity;
//#line 78
  return (0);
}
}
//#line 81 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-scsi.c"
int ata_scsi_ioctl(struct scsi_device *scsidev , int cmd , void *arg ) 
{ struct ata_port *ap ;
  struct ata_device *dev ;
  int val ;
  int rc ;
  unsigned long /*__attribute__((__warn_unused_result__))*/  tmp ;
  struct Scsi_Host *mem_9 ;

  {
//#line 85
  val = -22;
//#line 85
  rc = -22;
//#line 87
  mem_9 = scsidev->host;
//#line 87
  ap = (struct ata_port *)(& mem_9->hostdata[0]);
//#line 88
  if (! ap) {
    goto out;
  }
//#line 91
  dev = ata_scsi_find_dev(ap, scsidev);
//#line 92
  if (! dev) {
//#line 93
    rc = -19;
    goto out;
  }
//#line 97
  switch (cmd) {
  case 777: 
//#line 99
  val = 0;
//#line 100
  tmp = copy_to_user(arg, (void const   *)(& val), 1UL);
//#line 100
  if (tmp) {
//#line 101
    return (-14);
  }
//#line 102
  return (0);
  case 804: 
//#line 105
  val = (int )((unsigned long )arg);
//#line 106
  if (val != 0) {
//#line 107
    return (-22);
  }
//#line 108
  return (0);
  default: 
//#line 111
  rc = -25;
//#line 112
  break;
  }
  out: 
//#line 116
  return (rc);
}
}
//#line 140 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-scsi.c"
struct ata_queued_cmd *ata_scsi_qc_new(struct ata_port *ap , struct ata_device *dev ,
                                       struct scsi_cmnd *cmd , void (*done)(struct scsi_cmnd * ) ) 
{ struct ata_queued_cmd *qc ;

  {
//#line 147
  qc = ata_qc_new_init(ap, dev);
//#line 148
  if (qc) {
//#line 149
    qc->scsicmd = cmd;
//#line 150
    qc->scsidone = done;
//#line 152
    if (cmd->use_sg) {
//#line 153
      qc->sg = (struct scatterlist *)cmd->request_buffer;
//#line 154
      qc->n_elem = (unsigned int )cmd->use_sg;
    } else {
//#line 156
      qc->sg = & qc->sgent;
//#line 157
      qc->n_elem = 1U;
    }
  } else {
//#line 160
    cmd->result = 40;
//#line 161
    ((*done))(cmd);
  }
//#line 164
  return (qc);
}
}
//#line 187 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-scsi.c"
static unsigned char sense_table[15][4]  = 
//#line 187
  { {        (unsigned char)209,        (unsigned char)11,        (unsigned char)0,        (unsigned char)0}, 
   {        (unsigned char)208,        (unsigned char)11,        (unsigned char)0,        (unsigned char)0}, 
   {        (unsigned char)97,        (unsigned char)4,        (unsigned char)0,        (unsigned char)0}, 
   {        (unsigned char)132,        (unsigned char)11,        (unsigned char)71,        (unsigned char)0}, 
   {        (unsigned char)55,        (unsigned char)2,        (unsigned char)4,        (unsigned char)0}, 
   {        (unsigned char)9,        (unsigned char)2,        (unsigned char)4,        (unsigned char)0}, 
   {        (unsigned char)1,        (unsigned char)3,        (unsigned char)19,        (unsigned char)0}, 
   {        (unsigned char)2,        (unsigned char)4,        (unsigned char)0,        (unsigned char)0}, 
   {        (unsigned char)4,        (unsigned char)11,        (unsigned char)0,        (unsigned char)0}, 
   {        (unsigned char)8,        (unsigned char)2,        (unsigned char)4,        (unsigned char)0}, 
   {        (unsigned char)16,        (unsigned char)11,        (unsigned char)20,        (unsigned char)0}, 
   {        (unsigned char)8,        (unsigned char)2,        (unsigned char)4,        (unsigned char)0}, 
   {        (unsigned char)64,        (unsigned char)3,        (unsigned char)17,        (unsigned char)4}, 
   {        (unsigned char)128,        (unsigned char)3,        (unsigned char)17,        (unsigned char)4}, 
   {        (unsigned char)255,        (unsigned char)255,        (unsigned char)255,        (unsigned char)255}};
//#line 218 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-scsi.c"
static unsigned char stat_table[5][4]  = { {        (unsigned char)128,        (unsigned char)11,        (unsigned char)71,        (unsigned char)0}, 
   {        (unsigned char)32,        (unsigned char)4,        (unsigned char)0,        (unsigned char)0}, 
   {        (unsigned char)8,        (unsigned char)11,        (unsigned char)71,        (unsigned char)0}, 
   {        (unsigned char)4,        (unsigned char)1,        (unsigned char)17,        (unsigned char)0}, 
   {        (unsigned char)255,        (unsigned char)255,        (unsigned char)255,        (unsigned char)255}};
//#line 181 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-scsi.c"
void ata_to_sense_error(struct ata_queued_cmd *qc , u8 drv_stat ) 
{ struct scsi_cmnd *cmd ;
  u8 err ;
  unsigned char *sb ;
  int i ;
  struct ata_port *mem_7 ;
  struct ata_port *mem_8 ;
  unsigned char *mem_9 ;
  unsigned char *mem_10 ;
  unsigned char *mem_11 ;
  unsigned char *mem_12 ;
  unsigned char *mem_13 ;
  struct ata_port *mem_14 ;
  unsigned char *mem_15 ;
  unsigned char *mem_16 ;
  unsigned char *mem_17 ;
  unsigned char *mem_18 ;
  unsigned char *mem_19 ;
  struct ata_port *mem_20 ;
  unsigned char *mem_21 ;
  unsigned char *mem_22 ;
  unsigned char *mem_23 ;
  unsigned char *mem_24 ;
  unsigned char *mem_25 ;
  unsigned char *mem_26 ;
  unsigned char *mem_27 ;

  {
//#line 183
  cmd = qc->scsicmd;
//#line 184
  err = (unsigned char)0;
//#line 185
  sb = cmd->sense_buffer;
//#line 226
  i = 0;
//#line 228
  cmd->result = 2;
//#line 234
  if ((int )drv_stat & 1) {
//#line 236
    err = ata_chk_err(qc->ap);
  }
//#line 240
  mem_7 = qc->ap;
//#line 240
  printk("<4>ata%u: status=0x%02x { ", mem_7->id, drv_stat);
//#line 241
  if ((int )drv_stat & 128) {
//#line 243
    printk("Busy ");
//#line 244
    err = (unsigned char)0;
  } else {
//#line 247
    if ((int )drv_stat & 64) {
//#line 247
      printk("DriveReady ");
    }
//#line 248
    if ((int )drv_stat & 32) {
//#line 248
      printk("DeviceFault ");
    }
//#line 249
    if ((int )drv_stat & 16) {
//#line 249
      printk("SeekComplete ");
    }
//#line 250
    if ((int )drv_stat & 8) {
//#line 250
      printk("DataRequest ");
    }
//#line 251
    if ((int )drv_stat & 4) {
//#line 251
      printk("CorrectedError ");
    }
//#line 252
    if ((int )drv_stat & 2) {
//#line 252
      printk("Index ");
    }
//#line 253
    if ((int )drv_stat & 1) {
//#line 253
      printk("Error ");
    }
  }
//#line 255
  printk("}\n");
//#line 257
  if (err) {
//#line 259
    mem_8 = qc->ap;
//#line 259
    printk("<4>ata%u: error=0x%02x { ", mem_8->id, err);
//#line 260
    if ((int )err & 4) {
//#line 260
      printk("DriveStatusError ");
    }
//#line 261
    if ((int )err & 128) {
//#line 263
      if ((int )err & 4) {
//#line 264
        printk("BadCRC ");
      } else {
//#line 266
        printk("Sector ");
      }
    }
//#line 268
    if ((int )err & 64) {
//#line 268
      printk("UncorrectableError ");
    }
//#line 269
    if ((int )err & 16) {
//#line 269
      printk("SectorIdNotFound ");
    }
//#line 270
    if ((int )err & 2) {
//#line 270
      printk("TrackZeroNotFound ");
    }
//#line 271
    if ((int )err & 1) {
//#line 271
      printk("AddrMarkNotFound ");
    }
//#line 272
    printk("}\n");
  }
//#line 279
  while ((int )sense_table[i][0] != 255) {
//#line 282
    if (((int )sense_table[i][0] & (int )err) == (int )sense_table[i][0]) {
//#line 284
      mem_9 = sb + 0;
//#line 284
      (*mem_9) = (unsigned char)112;
//#line 285
      mem_10 = sb + 2;
//#line 285
      (*mem_10) = sense_table[i][1];
//#line 286
      mem_11 = sb + 7;
//#line 286
      (*mem_11) = (unsigned char)10;
//#line 287
      mem_12 = sb + 12;
//#line 287
      (*mem_12) = sense_table[i][2];
//#line 288
      mem_13 = sb + 13;
//#line 288
      (*mem_13) = sense_table[i][3];
//#line 289
      return;
    }
//#line 291
    i ++;
  }
//#line 294
  if (err) {
//#line 295
    mem_14 = qc->ap;
//#line 295
    printk("<7>ata%u: no sense translation for 0x%02x\n", mem_14->id, err);
  }
//#line 297
  i = 0;
//#line 299
  while ((int )stat_table[i][0] != 255) {
//#line 301
    if ((int )stat_table[i][0] & (int )drv_stat) {
//#line 303
      mem_15 = sb + 0;
//#line 303
      (*mem_15) = (unsigned char)112;
//#line 304
      mem_16 = sb + 2;
//#line 304
      (*mem_16) = stat_table[i][1];
//#line 305
      mem_17 = sb + 7;
//#line 305
      (*mem_17) = (unsigned char)10;
//#line 306
      mem_18 = sb + 12;
//#line 306
      (*mem_18) = stat_table[i][2];
//#line 307
      mem_19 = sb + 13;
//#line 307
      (*mem_19) = stat_table[i][3];
//#line 308
      return;
    }
//#line 310
    i ++;
  }
//#line 313
  mem_20 = qc->ap;
//#line 313
  printk("<3>ata%u: called with no error (%02X)!\n", mem_20->id, drv_stat);
//#line 316
  mem_21 = sb + 0;
//#line 316
  (*mem_21) = (unsigned char)112;
//#line 317
  mem_22 = sb + 2;
//#line 317
  (*mem_22) = (unsigned char)3;
//#line 318
  mem_23 = sb + 7;
//#line 318
  (*mem_23) = (unsigned char)10;
//#line 319
  if ((int )cmd->sc_data_direction == 2) {
//#line 320
    mem_24 = sb + 12;
//#line 320
    (*mem_24) = (unsigned char)17;
//#line 321
    mem_25 = sb + 13;
//#line 321
    (*mem_25) = (unsigned char)4;
  } else {
//#line 323
    mem_26 = sb + 12;
//#line 323
    (*mem_26) = (unsigned char)12;
//#line 324
    mem_27 = sb + 13;
//#line 324
    (*mem_27) = (unsigned char)2;
  }
//#line 326
  return;
}
}
//#line 340 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-scsi.c"
int ata_scsi_slave_config(struct scsi_device *sdev ) 
{ struct ata_port *ap ;
  struct ata_device *dev ;
  struct Scsi_Host *mem_4 ;

  {
//#line 342
  sdev->use_10_for_rw = 1U;
//#line 343
  sdev->use_10_for_ms = 1U;
//#line 345
  blk_queue_max_phys_segments(sdev->request_queue, (unsigned short)128);
//#line 347
  if (sdev->id < 2U) {
//#line 351
    mem_4 = sdev->host;
//#line 351
    ap = (struct ata_port *)(& mem_4->hostdata[0]);
//#line 352
    dev = & ap->device[sdev->id];
//#line 359
    if (dev->flags & 1UL) {
//#line 359
      if ((dev->flags & 4UL) == 0UL) {
//#line 365
        blk_queue_max_sectors(sdev->request_queue, (unsigned short)2048);
      }
    }
  }
//#line 369
  return (0);
}
}
//#line 385 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-scsi.c"
int ata_scsi_error(struct Scsi_Host *host ) 
{ struct ata_port *ap ;
  struct ata_port_operations *mem_3 ;
  void (*mem_4)(struct ata_port *ap ) ;

  {
//#line 391
  ap = (struct ata_port *)(& host->hostdata[0]);
//#line 392
  mem_3 = ap->ops;
//#line 392
  mem_4 = mem_3->eng_timeout;
//#line 392
  ((*mem_4))(ap);
//#line 398
  host->host_failed --;
//#line 399
  while (1) {
//#line 399
    host->eh_cmd_q.next = & host->eh_cmd_q;
//#line 399
    host->eh_cmd_q.prev = & host->eh_cmd_q;
//#line 399
    break;
  }
//#line 402
  return (0);
}
}
//#line 422 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-scsi.c"
static unsigned int ata_scsi_start_stop_xlat(struct ata_queued_cmd *qc , u8 *scsicmd ) 
{ struct ata_taskfile *tf ;
  u8 *mem_4 ;
  u8 *mem_5 ;
  u8 *mem_6 ;
  u8 *mem_7 ;

  {
//#line 425
  tf = & qc->tf;
//#line 427
  tf->flags |= 6UL;
//#line 428
  tf->protocol = (unsigned char)1;
//#line 429
  mem_4 = scsicmd + 1;
//#line 429
  if ((int )(*mem_4) & 1) {

  }
//#line 432
  mem_5 = scsicmd + 4;
//#line 432
  if ((int )(*mem_5) & 2) {
//#line 433
    return (1U);
  }
//#line 434
  mem_6 = scsicmd + 4;
//#line 434
  if ((((int )(*mem_6) >> 4) & 15) != 0) {
//#line 435
    return (1U);
  }
//#line 436
  mem_7 = scsicmd + 4;
//#line 436
  if ((int )(*mem_7) & 1) {
//#line 437
    tf->nsect = (unsigned char)1;
//#line 438
    tf->lbah = (unsigned char)0;
//#line 439
    tf->lbam = (unsigned char)0;
//#line 440
    tf->lbal = (unsigned char)0;
//#line 441
    tf->device = (unsigned char )((int )tf->device | 64);
//#line 442
    tf->command = (unsigned char)64;
  } else {
//#line 444
    tf->nsect = (unsigned char)0;
//#line 445
    tf->command = (unsigned char)226;
  }
//#line 455
  return (0U);
}
}
//#line 474 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-scsi.c"
static unsigned int ata_scsi_flush_xlat(struct ata_queued_cmd *qc , u8 *scsicmd ) 
{ struct ata_taskfile *tf ;
  struct ata_device *mem_4 ;

  {
//#line 476
  tf = & qc->tf;
//#line 478
  tf->flags |= 4UL;
//#line 479
  tf->protocol = (unsigned char)1;
//#line 481
  if (tf->flags & 1UL) {
//#line 481
    mem_4 = qc->dev;
//#line 481
    if ((int )mem_4->id[83] & 8192) {
//#line 483
      tf->command = (unsigned char)234;
    } else {
//#line 485
      tf->command = (unsigned char)231;
    }
  } else {
//#line 485
    tf->command = (unsigned char)231;
  }
//#line 487
  return (0U);
}
}
//#line 504 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-scsi.c"
static unsigned int ata_scsi_verify_xlat(struct ata_queued_cmd *qc , u8 *scsicmd ) 
{ struct ata_taskfile *tf ;
  unsigned int lba48 ;
  u64 dev_sectors ;
  u64 sect ;
  u32 n_sect ;
  struct ata_device *mem_8 ;
  u8 *mem_9 ;
  u8 *mem_10 ;
  u8 *mem_11 ;
  u8 *mem_12 ;
  u8 *mem_13 ;
  u8 *mem_14 ;
  u8 *mem_15 ;
  u8 *mem_16 ;
  u8 *mem_17 ;
  u8 *mem_18 ;
  u8 *mem_19 ;
  u8 *mem_20 ;
  u8 *mem_21 ;
  u8 *mem_22 ;
  u8 *mem_23 ;
  u8 *mem_24 ;
  u8 *mem_25 ;
  u8 *mem_26 ;
  u8 *mem_27 ;
  u8 *mem_28 ;

  {
//#line 506
  tf = & qc->tf;
//#line 507
  lba48 = (unsigned int )(tf->flags & 1UL);
//#line 508
  mem_8 = qc->dev;
//#line 508
  dev_sectors = mem_8->n_sectors;
//#line 509
  sect = 0ULL;
//#line 510
  n_sect = 0U;
//#line 512
  tf->flags |= 6UL;
//#line 513
  tf->protocol = (unsigned char)1;
//#line 514
  tf->device = (unsigned char )((int )tf->device | 64);
//#line 516
  mem_9 = scsicmd + 0;
//#line 516
  if ((int )(*mem_9) == 47) {
//#line 517
    mem_10 = scsicmd + 2;
//#line 517
    sect |= (unsigned long long )(*mem_10) << 24;
//#line 518
    mem_11 = scsicmd + 3;
//#line 518
    sect |= (unsigned long long )(*mem_11) << 16;
//#line 519
    mem_12 = scsicmd + 4;
//#line 519
    sect |= (unsigned long long )(*mem_12) << 8;
//#line 520
    mem_13 = scsicmd + 5;
//#line 520
    sect |= (unsigned long long )(*mem_13);
//#line 522
    mem_14 = scsicmd + 7;
//#line 522
    n_sect |= (unsigned int )(*mem_14) << 8;
//#line 523
    mem_15 = scsicmd + 8;
//#line 523
    n_sect |= (unsigned int )(*mem_15);
  } else {
//#line 526
    mem_16 = scsicmd + 0;
//#line 526
    if ((int )(*mem_16) == 143) {
//#line 527
      mem_17 = scsicmd + 2;
//#line 527
      sect |= (unsigned long long )(*mem_17) << 56;
//#line 528
      mem_18 = scsicmd + 3;
//#line 528
      sect |= (unsigned long long )(*mem_18) << 48;
//#line 529
      mem_19 = scsicmd + 4;
//#line 529
      sect |= (unsigned long long )(*mem_19) << 40;
//#line 530
      mem_20 = scsicmd + 5;
//#line 530
      sect |= (unsigned long long )(*mem_20) << 32;
//#line 531
      mem_21 = scsicmd + 6;
//#line 531
      sect |= (unsigned long long )(*mem_21) << 24;
//#line 532
      mem_22 = scsicmd + 7;
//#line 532
      sect |= (unsigned long long )(*mem_22) << 16;
//#line 533
      mem_23 = scsicmd + 8;
//#line 533
      sect |= (unsigned long long )(*mem_23) << 8;
//#line 534
      mem_24 = scsicmd + 9;
//#line 534
      sect |= (unsigned long long )(*mem_24);
//#line 536
      mem_25 = scsicmd + 10;
//#line 536
      n_sect |= (unsigned int )(*mem_25) << 24;
//#line 537
      mem_26 = scsicmd + 11;
//#line 537
      n_sect |= (unsigned int )(*mem_26) << 16;
//#line 538
      mem_27 = scsicmd + 12;
//#line 538
      n_sect |= (unsigned int )(*mem_27) << 8;
//#line 539
      mem_28 = scsicmd + 13;
//#line 539
      n_sect |= (unsigned int )(*mem_28);
    } else {
//#line 543
      return (1U);
    }
  }
//#line 545
  if (! n_sect) {
//#line 546
    return (1U);
  }
//#line 547
  if (sect >= dev_sectors) {
//#line 548
    return (1U);
  }
//#line 549
  if (sect + (unsigned long long )n_sect > dev_sectors) {
//#line 550
    return (1U);
  }
//#line 551
  if (lba48) {
//#line 552
    if (n_sect > 65536U) {
//#line 553
      return (1U);
    }
  } else {
//#line 555
    if (n_sect > 256U) {
//#line 556
      return (1U);
    }
  }
//#line 559
  if (lba48) {
//#line 560
    tf->command = (unsigned char)66;
//#line 562
    tf->hob_nsect = (unsigned char )((n_sect >> 8) & 255U);
//#line 564
    tf->hob_lbah = (unsigned char )((sect >> 40) & 255ULL);
//#line 565
    tf->hob_lbam = (unsigned char )((sect >> 32) & 255ULL);
//#line 566
    tf->hob_lbal = (unsigned char )((sect >> 24) & 255ULL);
  } else {
//#line 568
    tf->command = (unsigned char)64;
//#line 570
    tf->device = (unsigned char )((unsigned long long )tf->device | ((sect >> 24) & 15ULL));
  }
//#line 573
  tf->nsect = (unsigned char )(n_sect & 255U);
//#line 575
  tf->lbah = (unsigned char )((sect >> 16) & 255ULL);
//#line 576
  tf->lbam = (unsigned char )((sect >> 8) & 255ULL);
//#line 577
  tf->lbal = (unsigned char )(sect & 255ULL);
//#line 579
  return (0U);
}
}
//#line 602 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-scsi.c"
static unsigned int ata_scsi_rw_xlat(struct ata_queued_cmd *qc , u8 *scsicmd ) 
{ struct ata_taskfile *tf ;
  unsigned int lba48 ;
  struct ata_device *mem_5 ;
  u8 *mem_6 ;
  struct ata_device *mem_7 ;
  u8 *mem_8 ;
  struct ata_device *mem_9 ;
  u8 *mem_10 ;
  struct ata_device *mem_11 ;
  struct ata_device *mem_12 ;
  u8 *mem_13 ;
  u8 *mem_14 ;
  u8 *mem_15 ;
  u8 *mem_16 ;
  u8 *mem_17 ;
  u8 *mem_18 ;
  u8 *mem_19 ;
  u8 *mem_20 ;
  u8 *mem_21 ;
  u8 *mem_22 ;
  u8 *mem_23 ;
  u8 *mem_24 ;
  u8 *mem_25 ;
  u8 *mem_26 ;
  u8 *mem_27 ;
  u8 *mem_28 ;
  u8 *mem_29 ;
  u8 *mem_30 ;
  u8 *mem_31 ;
  u8 *mem_32 ;
  u8 *mem_33 ;
  u8 *mem_34 ;
  u8 *mem_35 ;
  u8 *mem_36 ;
  u8 *mem_37 ;
  u8 *mem_38 ;
  u8 *mem_39 ;
  u8 *mem_40 ;
  u8 *mem_41 ;
  u8 *mem_42 ;
  u8 *mem_43 ;
  u8 *mem_44 ;
  u8 *mem_45 ;
  u8 *mem_46 ;
  u8 *mem_47 ;
  u8 *mem_48 ;
  u8 *mem_49 ;
  u8 *mem_50 ;
  u8 *mem_51 ;
  u8 *mem_52 ;
  u8 *mem_53 ;
  u8 *mem_54 ;

  {
//#line 604
  tf = & qc->tf;
//#line 605
  lba48 = (unsigned int )(tf->flags & 1UL);
//#line 607
  tf->flags |= 6UL;
//#line 608
  mem_5 = qc->dev;
//#line 608
  tf->protocol = mem_5->xfer_protocol;
//#line 609
  tf->device = (unsigned char )((int )tf->device | 64);
//#line 611
  mem_6 = scsicmd + 0;
//#line 611
  if ((int )(*mem_6) == 40) {
//#line 613
    mem_7 = qc->dev;
//#line 613
    tf->command = mem_7->read_cmd;
  } else {
//#line 611
    mem_8 = scsicmd + 0;
//#line 611
    if ((int )(*mem_8) == 8) {
//#line 613
      mem_9 = qc->dev;
//#line 613
      tf->command = mem_9->read_cmd;
    } else {
//#line 611
      mem_10 = scsicmd + 0;
//#line 611
      if ((int )(*mem_10) == 136) {
//#line 613
        mem_11 = qc->dev;
//#line 613
        tf->command = mem_11->read_cmd;
      } else {
//#line 615
        mem_12 = qc->dev;
//#line 615
        tf->command = mem_12->write_cmd;
//#line 616
        tf->flags |= 8UL;
      }
    }
  }
//#line 619
  mem_13 = scsicmd + 0;
//#line 619
  if ((int )(*mem_13) == 40) {
    goto _L;
  } else {
//#line 619
    mem_14 = scsicmd + 0;
//#line 619
    if ((int )(*mem_14) == 42) {
      _L: 
//#line 620
      if (lba48) {
//#line 621
        mem_15 = scsicmd + 7;
//#line 621
        tf->hob_nsect = (*mem_15);
//#line 622
        mem_16 = scsicmd + 2;
//#line 622
        tf->hob_lbal = (*mem_16);
//#line 624
        mem_17 = scsicmd + 7;
//#line 624
        mem_18 = scsicmd + 8;
//#line 624
        qc->nsect = ((unsigned int )(*mem_17) << 8) | (unsigned int )(*mem_18);
      } else {
//#line 629
        mem_19 = scsicmd + 2;
//#line 629
        if ((int )(*mem_19) & 240) {
//#line 630
          return (1U);
        } else {
//#line 629
          mem_20 = scsicmd + 7;
//#line 629
          if ((*mem_20)) {
//#line 630
            return (1U);
          }
        }
//#line 633
        mem_21 = scsicmd + 2;
//#line 633
        tf->device = (unsigned char )((int )tf->device | (int )(*mem_21));
//#line 635
        mem_22 = scsicmd + 8;
//#line 635
        qc->nsect = (unsigned int )(*mem_22);
      }
//#line 638
      mem_23 = scsicmd + 8;
//#line 638
      tf->nsect = (*mem_23);
//#line 639
      mem_24 = scsicmd + 5;
//#line 639
      tf->lbal = (*mem_24);
//#line 640
      mem_25 = scsicmd + 4;
//#line 640
      tf->lbam = (*mem_25);
//#line 641
      mem_26 = scsicmd + 3;
//#line 641
      tf->lbah = (*mem_26);
//#line 644
      if (qc->nsect == 0U) {
//#line 645
        return (1U);
      }
//#line 646
      return (0U);
    }
  }
//#line 649
  mem_27 = scsicmd + 0;
//#line 649
  if ((int )(*mem_27) == 8) {
    goto _L___0;
  } else {
//#line 649
    mem_28 = scsicmd + 0;
//#line 649
    if ((int )(*mem_28) == 10) {
      _L___0: 
//#line 650
      mem_29 = scsicmd + 4;
//#line 650
      tf->nsect = (*mem_29);
//#line 650
      qc->nsect = (unsigned int )tf->nsect;
//#line 651
      if (! qc->nsect) {
//#line 652
        qc->nsect = 256U;
//#line 653
        if (lba48) {
//#line 654
          tf->hob_nsect = (unsigned char)1;
        }
      }
//#line 657
      mem_30 = scsicmd + 3;
//#line 657
      tf->lbal = (*mem_30);
//#line 658
      mem_31 = scsicmd + 2;
//#line 658
      tf->lbam = (*mem_31);
//#line 659
      mem_32 = scsicmd + 1;
//#line 659
      tf->lbah = (unsigned char )((int )(*mem_32) & 31);
//#line 662
      return (0U);
    }
  }
//#line 665
  mem_33 = scsicmd + 0;
//#line 665
  if ((int )(*mem_33) == 136) {
    goto _L___1;
  } else {
//#line 665
    mem_34 = scsicmd + 0;
//#line 665
    if ((int )(*mem_34) == 138) {
      _L___1: 
//#line 667
      mem_35 = scsicmd + 2;
//#line 667
      if ((*mem_35)) {
//#line 668
        return (1U);
      } else {
//#line 667
        mem_36 = scsicmd + 3;
//#line 667
        if ((*mem_36)) {
//#line 668
          return (1U);
        } else {
//#line 667
          mem_37 = scsicmd + 10;
//#line 667
          if ((*mem_37)) {
//#line 668
            return (1U);
          } else {
//#line 667
            mem_38 = scsicmd + 11;
//#line 667
            if ((*mem_38)) {
//#line 668
              return (1U);
            }
          }
        }
      }
//#line 670
      if (lba48) {
//#line 671
        mem_39 = scsicmd + 12;
//#line 671
        tf->hob_nsect = (*mem_39);
//#line 672
        mem_40 = scsicmd + 6;
//#line 672
        tf->hob_lbal = (*mem_40);
//#line 673
        mem_41 = scsicmd + 5;
//#line 673
        tf->hob_lbam = (*mem_41);
//#line 674
        mem_42 = scsicmd + 4;
//#line 674
        tf->hob_lbah = (*mem_42);
//#line 676
        mem_43 = scsicmd + 12;
//#line 676
        mem_44 = scsicmd + 13;
//#line 676
        qc->nsect = ((unsigned int )(*mem_43) << 8) | (unsigned int )(*mem_44);
      } else {
//#line 680
        mem_45 = scsicmd + 4;
//#line 680
        if ((*mem_45)) {
//#line 682
          return (1U);
        } else {
//#line 680
          mem_46 = scsicmd + 5;
//#line 680
          if ((*mem_46)) {
//#line 682
            return (1U);
          } else {
//#line 680
            mem_47 = scsicmd + 12;
//#line 680
            if ((*mem_47)) {
//#line 682
              return (1U);
            } else {
//#line 680
              mem_48 = scsicmd + 6;
//#line 680
              if ((int )(*mem_48) & 240) {
//#line 682
                return (1U);
              }
            }
          }
        }
//#line 685
        mem_49 = scsicmd + 6;
//#line 685
        tf->device = (unsigned char )((int )tf->device | (int )(*mem_49));
//#line 687
        mem_50 = scsicmd + 13;
//#line 687
        qc->nsect = (unsigned int )(*mem_50);
      }
//#line 690
      mem_51 = scsicmd + 13;
//#line 690
      tf->nsect = (*mem_51);
//#line 691
      mem_52 = scsicmd + 9;
//#line 691
      tf->lbal = (*mem_52);
//#line 692
      mem_53 = scsicmd + 8;
//#line 692
      tf->lbam = (*mem_53);
//#line 693
      mem_54 = scsicmd + 7;
//#line 693
      tf->lbah = (*mem_54);
//#line 696
      if (qc->nsect == 0U) {
//#line 697
        return (1U);
      }
//#line 698
      return (0U);
    }
  }
//#line 702
  return (1U);
}
}
//#line 705 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-scsi.c"
static int ata_scsi_qc_complete(struct ata_queued_cmd *qc , u8 drv_stat ) 
{ struct scsi_cmnd *cmd ;
  void (*mem_4)(struct scsi_cmnd * ) ;

  {
//#line 707
  cmd = qc->scsicmd;
//#line 709
  if (! (! ((int )drv_stat & 137))) {
//#line 710
    ata_to_sense_error(qc, drv_stat);
  } else {
//#line 712
    cmd->result = 0;
  }
//#line 714
  mem_4 = qc->scsidone;
//#line 714
  ((*mem_4))(cmd);
//#line 716
  return (0);
}
}
//#line 738 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-scsi.c"
static void ata_scsi_translate(struct ata_port *ap , struct ata_device *dev , struct scsi_cmnd *cmd ,
                               void (*done)(struct scsi_cmnd * ) , unsigned int (*xlat_func)(struct ata_queued_cmd *qc ,
                                                                                             u8 *scsicmd ) ) 
{ struct ata_queued_cmd *qc ;
  u8 *scsicmd ;
  unsigned int tmp ;
  int tmp___0 ;

  {
//#line 744
  scsicmd = cmd->cmnd;
//#line 748
  qc = ata_scsi_qc_new(ap, dev, cmd, done);
//#line 749
  if (! qc) {
//#line 750
    return;
  }
//#line 753
  if ((int )cmd->sc_data_direction == 2) {
    goto _L;
  } else {
//#line 753
    if ((int )cmd->sc_data_direction == 1) {
      _L: 
//#line 755
      if (! (! (cmd->request_bufflen < 1U))) {
//#line 756
        printk("<4>ata%u(%u): WARNING: zero len r/w req\n", ap->id, dev->devno);
        goto err_out;
      }
//#line 761
      if (cmd->use_sg) {
//#line 762
        ata_sg_init(qc, (struct scatterlist *)cmd->request_buffer, (unsigned int )cmd->use_sg);
      } else {
//#line 764
        ata_sg_init_one(qc, cmd->request_buffer, cmd->request_bufflen);
      }
//#line 767
      qc->dma_dir = (int )cmd->sc_data_direction;
    }
  }
//#line 770
  qc->complete_fn = & ata_scsi_qc_complete;
//#line 772
  tmp = ((*xlat_func))(qc, scsicmd);
//#line 772
  if (tmp) {
    goto err_out;
  }
//#line 776
  tmp___0 = ata_qc_issue(qc);
//#line 776
  if (tmp___0) {
    goto err_out;
  }
//#line 780
  return;
  err_out: 
//#line 783
  ata_qc_free(qc);
//#line 784
  ata_bad_cdb(cmd, done);
//#line 786
  return;
}
}
//#line 802 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-scsi.c"
static unsigned int ata_scsi_rbuf_get(struct scsi_cmnd *cmd , u8 **buf_out ) 
{ u8 *buf ;
  unsigned int buflen ;
  struct scatterlist *sg ;
  void *tmp ;

  {
//#line 807
  if (cmd->use_sg) {
//#line 810
    sg = (struct scatterlist *)cmd->request_buffer;
//#line 811
    tmp = lowmem_page_address(sg->page);
//#line 811
    buf = (u8 *)(tmp + sg->offset);
//#line 812
    buflen = sg->length;
  } else {
//#line 814
    buf = (u8 *)cmd->request_buffer;
//#line 815
    buflen = cmd->request_bufflen;
  }
//#line 818
  (*buf_out) = buf;
//#line 819
  return (buflen);
}
}
//#line 833 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-scsi.c"
/*__inline*/ static void ( /*__attribute__((__always_inline__))*/ ata_scsi_rbuf_put)(struct scsi_cmnd *cmd ,
                                                                             u8 *buf ) 
{ struct scatterlist *sg ;

  {
//#line 835
  if (cmd->use_sg) {
//#line 838
    sg = (struct scatterlist *)cmd->request_buffer;
//#line 839
    while (1) {
//#line 839
      break;
    }
  }
//#line 841
  return;
}
}
//#line 858 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-scsi.c"
void ata_scsi_rbuf_fill(struct ata_scsi_args *args , unsigned int (*actor)(struct ata_scsi_args *args ,
                                                                           u8 *rbuf ,
                                                                           unsigned int buflen ) ) 
{ u8 *rbuf ;
  unsigned int buflen ;
  unsigned int rc ;
  struct scsi_cmnd *cmd ;
  void (*mem_7)(struct scsi_cmnd * ) ;

  {
//#line 864
  cmd = args->cmd;
//#line 866
  buflen = ata_scsi_rbuf_get(cmd, & rbuf);
//#line 867
  __constant_c_memset((void *)rbuf, 0UL, buflen);
//#line 868
  rc = ((*actor))(args, rbuf, buflen);
//#line 869
  ata_scsi_rbuf_put(cmd, rbuf);
//#line 871
  if (rc) {
//#line 872
    ata_bad_cdb(cmd, args->done);
  } else {
//#line 874
    cmd->result = 0;
//#line 875
    mem_7 = args->done;
//#line 875
    ((*mem_7))(cmd);
  }
//#line 877
  return;
}
}
//#line 892 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-scsi.c"
unsigned int ata_scsiop_inq_std(struct ata_scsi_args *args , u8 *rbuf , unsigned int buflen ) 
{ u8 hdr[5] ;
  u8 versions[5] ;
  u16 *mem_6 ;
  u8 *mem_7 ;
  u8 *mem_8 ;

  {
//#line 895
  hdr[0] = (unsigned char)0;
//#line 895
  hdr[1] = (unsigned char)0;
//#line 895
  hdr[2] = (unsigned char)5;
//#line 895
  hdr[3] = (unsigned char)2;
//#line 895
  hdr[4] = (unsigned char)91;
//#line 904
  mem_6 = args->id + 0;
//#line 904
  if ((int )(*mem_6) & 128) {
//#line 905
    hdr[1] = (unsigned char )((int )hdr[1] | 128);
  }
//#line 909
  __constant_memcpy((void *)rbuf, (void const   *)(hdr), sizeof(hdr));
//#line 911
  if (buflen > 35U) {
//#line 912
    __constant_memcpy((void *)(rbuf + 8), (void const   *)"ATA     ", 8U);
//#line 913
    ata_dev_id_string(args->id, rbuf + 16, 27U, 16U);
//#line 914
    ata_dev_id_string(args->id, rbuf + 32, 23U, 4U);
//#line 915
    mem_7 = rbuf + 32;
//#line 915
    if ((int )(*mem_7) == 0) {
//#line 916
      __constant_memcpy((void *)(rbuf + 32), (void const   *)"n/a ", 4U);
    } else {
//#line 915
      mem_8 = rbuf + 32;
//#line 915
      if ((int )(*mem_8) == 32) {
//#line 916
        __constant_memcpy((void *)(rbuf + 32), (void const   *)"n/a ", 4U);
      }
    }
  }
//#line 919
  if (buflen > 63U) {
//#line 920
    versions[0] = (unsigned char)96;
//#line 920
    versions[1] = (unsigned char)3;
//#line 920
    versions[2] = (unsigned char)32;
//#line 920
    versions[3] = (unsigned char)2;
//#line 920
    versions[4] = (unsigned char)96;
//#line 930
    __constant_memcpy((void *)(rbuf + 59), (void const   *)(versions), sizeof(versions));
  }
//#line 933
  return (0U);
}
}
//#line 948 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-scsi.c"
unsigned int ata_scsiop_inq_00(struct ata_scsi_args *args , u8 *rbuf , unsigned int buflen ) 
{ u8 pages[3] ;
  u8 *mem_5 ;

  {
//#line 951
  pages[0] = (unsigned char)0;
//#line 951
  pages[1] = (unsigned char)128;
//#line 951
  pages[2] = (unsigned char)131;
//#line 956
  mem_5 = rbuf + 3;
//#line 956
  (*mem_5) = (unsigned char )sizeof(pages);
//#line 958
  if (buflen > 6U) {
//#line 959
    __constant_memcpy((void *)(rbuf + 4), (void const   *)(pages), sizeof(pages));
  }
//#line 961
  return (0U);
}
}
//#line 976 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-scsi.c"
unsigned int ata_scsiop_inq_80(struct ata_scsi_args *args , u8 *rbuf , unsigned int buflen ) 
{ u8 hdr[4] ;

  {
//#line 979
  hdr[0] = (unsigned char)0;
//#line 979
  hdr[1] = (unsigned char)128;
//#line 979
  hdr[2] = (unsigned char)0;
//#line 979
  hdr[3] = (unsigned char)20;
//#line 985
  __constant_memcpy((void *)rbuf, (void const   *)(hdr), sizeof(hdr));
//#line 987
  if (buflen > 23U) {
//#line 988
    ata_dev_id_string(args->id, rbuf + 4, 10U, 20U);
  }
//#line 991
  return (0U);
}
}
//#line 994 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-scsi.c"
static char const   *inq_83_str  =    "Linux ATA-SCSI simulator";
//#line 1009 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-scsi.c"
unsigned int ata_scsiop_inq_83(struct ata_scsi_args *args , u8 *rbuf , unsigned int buflen ) 
{ size_t tmp ;
  size_t tmp___0 ;
  size_t tmp___3 ;
  u8 *mem_9 ;
  u8 *mem_10 ;
  u8 *mem_11 ;
  u8 *mem_12 ;

  {
//#line 1012
  mem_9 = rbuf + 1;
//#line 1012
  (*mem_9) = (unsigned char)131;
//#line 1013
  tmp = strlen(inq_83_str);
//#line 1013
  mem_10 = rbuf + 3;
//#line 1013
  (*mem_10) = (unsigned char )(4U + tmp);
//#line 1016
  tmp___3 = strlen(inq_83_str);
//#line 1016
  if (buflen > ((tmp___3 + 4U) + 4U) - 1U) {
//#line 1017
    mem_11 = rbuf + 4;
//#line 1017
    (*mem_11) = (unsigned char)2;
//#line 1018
    mem_12 = rbuf + 7;
//#line 1018
    (*mem_12) = (u8 )strlen(inq_83_str);
//#line 1019
    tmp___0 = strlen(inq_83_str);
//#line 1019
    __memcpy((void *)((rbuf + 4) + 4), (void const   *)inq_83_str, tmp___0);
  }
//#line 1022
  return (0U);
}
}
//#line 1038 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-scsi.c"
unsigned int ata_scsiop_noop(struct ata_scsi_args *args , u8 *rbuf , unsigned int buflen ) 
{ 

  {
//#line 1042
  return (0U);
}
}
//#line 1058 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-scsi.c"
static void ata_msense_push(u8 **ptr_io , u8 const   *last , u8 const   *buf , unsigned int buflen ) 
{ u8 *ptr ;

  {
//#line 1061
  ptr = (*ptr_io);
//#line 1063
  if ((unsigned int )((ptr + buflen) - 1) > (unsigned int )last) {
//#line 1064
    return;
  }
//#line 1066
  __memcpy((void *)ptr, (void const   *)buf, buflen);
//#line 1068
  ptr += buflen;
//#line 1070
  (*ptr_io) = ptr;
//#line 1071
  return;
}
}
//#line 1087 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-scsi.c"
static unsigned int ata_msense_caching(u16 *id , u8 **ptr_io , u8 const   *last ) 
{ u8 page[20] ;
  u16 *mem_5 ;
  u16 *mem_6 ;

  {
//#line 1090
  page[0] = (unsigned char)8;
//#line 1090
  page[1] = (unsigned char)18;
//#line 1090
  page[2] = (unsigned char)0;
//#line 1090
  page[3] = (unsigned char)0;
//#line 1090
  page[4] = (unsigned char)0;
//#line 1090
  page[5] = (unsigned char)0;
//#line 1090
  page[6] = (unsigned char)0;
//#line 1090
  page[7] = (unsigned char)0;
//#line 1090
  page[8] = (unsigned char)0;
//#line 1090
  page[9] = (unsigned char)0;
//#line 1090
  page[10] = (unsigned char)0;
//#line 1090
  page[11] = (unsigned char)0;
//#line 1090
  page[12] = (unsigned char)0;
//#line 1090
  page[13] = (unsigned char)0;
//#line 1090
  page[14] = (unsigned char)0;
//#line 1090
  page[15] = (unsigned char)0;
//#line 1090
  page[16] = (unsigned char)0;
//#line 1090
  page[17] = (unsigned char)0;
//#line 1090
  page[18] = (unsigned char)0;
//#line 1090
  page[19] = (unsigned char)0;
//#line 1097
  mem_5 = id + 85;
//#line 1097
  if ((int )(*mem_5) & 32) {
//#line 1098
    page[2] = (unsigned char )((int )page[2] | 4);
  }
//#line 1099
  mem_6 = id + 85;
//#line 1099
  if (! ((int )(*mem_6) & 64)) {
//#line 1100
    page[12] = (unsigned char )((int )page[12] | 32);
  }
//#line 1102
  ata_msense_push(ptr_io, last, (u8 const   *)(page), sizeof(page));
//#line 1103
  return (sizeof(page));
}
}
//#line 1118 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-scsi.c"
static unsigned int ata_msense_ctl_mode(u8 **ptr_io , u8 const   *last ) 
{ u8 page[12] ;

  {
//#line 1120
  page[0] = (unsigned char)10;
//#line 1120
  page[1] = (unsigned char)10;
//#line 1120
  page[2] = (unsigned char)6;
//#line 1120
  page[3] = (unsigned char)0;
//#line 1120
  page[4] = (unsigned char)0;
//#line 1120
  page[5] = (unsigned char)0;
//#line 1120
  page[6] = (unsigned char)0;
//#line 1120
  page[7] = (unsigned char)0;
//#line 1120
  page[8] = (unsigned char)255;
//#line 1120
  page[9] = (unsigned char)255;
//#line 1120
  page[10] = (unsigned char)0;
//#line 1120
  page[11] = (unsigned char)30;
//#line 1127
  ata_msense_push(ptr_io, last, (u8 const   *)(page), sizeof(page));
//#line 1128
  return (sizeof(page));
}
}
//#line 1143 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-scsi.c"
static unsigned int ata_msense_rw_recovery(u8 **ptr_io , u8 const   *last ) 
{ u8 page[12] ;

  {
//#line 1145
  page[0] = (unsigned char)1;
//#line 1145
  page[1] = (unsigned char)10;
//#line 1145
  page[2] = (unsigned char)192;
//#line 1145
  page[3] = (unsigned char)0;
//#line 1145
  page[4] = (unsigned char)0;
//#line 1145
  page[5] = (unsigned char)0;
//#line 1145
  page[6] = (unsigned char)0;
//#line 1145
  page[7] = (unsigned char)0;
//#line 1145
  page[8] = (unsigned char)0;
//#line 1145
  page[9] = (unsigned char)0;
//#line 1145
  page[10] = (unsigned char)0;
//#line 1145
  page[11] = (unsigned char)0;
//#line 1152
  ata_msense_push(ptr_io, last, (u8 const   *)(page), sizeof(page));
//#line 1153
  return (sizeof(page));
}
}
//#line 1168 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-scsi.c"
unsigned int ata_scsiop_mode_sense(struct ata_scsi_args *args , u8 *rbuf , unsigned int buflen ) 
{ u8 *scsicmd ;
  u8 *p ;
  u8 *last ;
  unsigned int page_control ;
  unsigned int six_byte ;
  unsigned int output_len ;
  unsigned int tmp ;
  unsigned int tmp___0 ;
  unsigned int tmp___1 ;
  unsigned int tmp___2 ;
  unsigned int tmp___3 ;
  unsigned int tmp___4 ;
  struct scsi_cmnd *mem_16 ;
  u8 *mem_17 ;
  u8 *mem_18 ;
  u8 *mem_19 ;
  u8 *mem_20 ;
  u8 *mem_21 ;
  u8 *mem_22 ;

  {
//#line 1171
  mem_16 = args->cmd;
//#line 1171
  scsicmd = mem_16->cmnd;
//#line 1176
  mem_17 = scsicmd + 0;
//#line 1176
  six_byte = (unsigned int )((int )(*mem_17) == 26);
//#line 1181
  mem_18 = scsicmd + 2;
//#line 1181
  page_control = (unsigned int )((int )(*mem_18) >> 6);
//#line 1182
  if (page_control != 0U) {
//#line 1182
    if (page_control != 3U) {
//#line 1183
      return (1U);
    }
  }
//#line 1185
  if (six_byte) {
//#line 1186
    output_len = 4U;
  } else {
//#line 1188
    output_len = 8U;
  }
//#line 1190
  p = rbuf + output_len;
//#line 1191
  last = (rbuf + buflen) - 1;
//#line 1193
  mem_19 = scsicmd + 2;
//#line 1193
  switch ((int )(*mem_19) & 63) {
  case 1: 
//#line 1195
  tmp = ata_msense_rw_recovery(& p, (u8 const   *)last);
//#line 1195
  output_len += tmp;
//#line 1196
  break;
  case 8: 
//#line 1199
  tmp___0 = ata_msense_caching(args->id, & p, (u8 const   *)last);
//#line 1199
  output_len += tmp___0;
//#line 1200
  break;
  case 10: 
//#line 1203
  tmp___1 = ata_msense_ctl_mode(& p, (u8 const   *)last);
//#line 1203
  output_len += tmp___1;
//#line 1204
  break;
  case 63: 
//#line 1208
  tmp___2 = ata_msense_rw_recovery(& p, (u8 const   *)last);
//#line 1208
  output_len += tmp___2;
//#line 1209
  tmp___3 = ata_msense_caching(args->id, & p, (u8 const   *)last);
//#line 1209
  output_len += tmp___3;
//#line 1210
  tmp___4 = ata_msense_ctl_mode(& p, (u8 const   *)last);
//#line 1210
  output_len += tmp___4;
//#line 1211
  break;
  default: ;
//#line 1214
  return (1U);
  }
//#line 1217
  if (six_byte) {
//#line 1218
    output_len --;
//#line 1219
    mem_20 = rbuf + 0;
//#line 1219
    (*mem_20) = (unsigned char )output_len;
  } else {
//#line 1221
    output_len -= 2U;
//#line 1222
    mem_21 = rbuf + 0;
//#line 1222
    (*mem_21) = (unsigned char )(output_len >> 8);
//#line 1223
    mem_22 = rbuf + 1;
//#line 1223
    (*mem_22) = (unsigned char )output_len;
  }
//#line 1226
  return (0U);
}
}
//#line 1241 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-scsi.c"
unsigned int ata_scsiop_read_cap(struct ata_scsi_args *args , u8 *rbuf , unsigned int buflen ) 
{ u64 n_sectors ;
  u32 tmp ;
  u16 *mem_6 ;
  u16 *mem_7 ;
  u16 *mem_8 ;
  u16 *mem_9 ;
  u16 *mem_10 ;
  u16 *mem_11 ;
  u16 *mem_12 ;
  struct scsi_cmnd *mem_13 ;
  u8 *mem_14 ;
  u8 *mem_15 ;
  u8 *mem_16 ;
  u8 *mem_17 ;
  u8 *mem_18 ;
  u8 *mem_19 ;
  u8 *mem_20 ;
  u8 *mem_21 ;
  u8 *mem_22 ;
  u8 *mem_23 ;
  u8 *mem_24 ;
  u8 *mem_25 ;
  u8 *mem_26 ;
  u8 *mem_27 ;
  u8 *mem_28 ;
  u8 *mem_29 ;

  {
//#line 1249
  mem_6 = args->id + 83;
//#line 1249
  if ((int )(*mem_6) & 1024) {
//#line 1250
    mem_7 = args->id + 103;
//#line 1250
    mem_8 = args->id + 102;
//#line 1250
    mem_9 = args->id + 101;
//#line 1250
    mem_10 = args->id + 100;
//#line 1250
    n_sectors = ((((unsigned long long )(*mem_7) << 48) | ((unsigned long long )(*mem_8) << 32)) | ((unsigned long long )(*mem_9) << 16)) | (unsigned long long )(*mem_10);
  } else {
//#line 1252
    mem_11 = args->id + 61;
//#line 1252
    mem_12 = args->id + 60;
//#line 1252
    n_sectors = (unsigned long long )(((unsigned int )(*mem_11) << 16) | (unsigned int )(*mem_12));
  }
//#line 1253
  n_sectors --;
//#line 1255
  mem_13 = args->cmd;
//#line 1255
  if ((int )mem_13->cmnd[0] == 37) {
//#line 1256
    if (n_sectors >= 4294967295ULL) {
//#line 1257
      tmp = 4294967295U;
    } else {
//#line 1259
      tmp = (unsigned int )n_sectors;
    }
//#line 1262
    mem_14 = rbuf + 0;
//#line 1262
    (*mem_14) = (unsigned char )(tmp >> 24);
//#line 1263
    mem_15 = rbuf + 1;
//#line 1263
    (*mem_15) = (unsigned char )(tmp >> 16);
//#line 1264
    mem_16 = rbuf + 2;
//#line 1264
    (*mem_16) = (unsigned char )(tmp >> 8);
//#line 1265
    mem_17 = rbuf + 3;
//#line 1265
    (*mem_17) = (unsigned char )tmp;
//#line 1268
    tmp = 512U;
//#line 1269
    mem_18 = rbuf + 6;
//#line 1269
    (*mem_18) = (unsigned char )(tmp >> 8);
//#line 1270
    mem_19 = rbuf + 7;
//#line 1270
    (*mem_19) = (unsigned char )tmp;
  } else {
//#line 1274
    tmp = (unsigned int )(n_sectors >> 32);
//#line 1275
    mem_20 = rbuf + 2;
//#line 1275
    (*mem_20) = (unsigned char )(tmp >> 24);
//#line 1276
    mem_21 = rbuf + 3;
//#line 1276
    (*mem_21) = (unsigned char )(tmp >> 16);
//#line 1277
    mem_22 = rbuf + 4;
//#line 1277
    (*mem_22) = (unsigned char )(tmp >> 8);
//#line 1278
    mem_23 = rbuf + 5;
//#line 1278
    (*mem_23) = (unsigned char )tmp;
//#line 1279
    tmp = (unsigned int )n_sectors;
//#line 1280
    mem_24 = rbuf + 6;
//#line 1280
    (*mem_24) = (unsigned char )(tmp >> 24);
//#line 1281
    mem_25 = rbuf + 7;
//#line 1281
    (*mem_25) = (unsigned char )(tmp >> 16);
//#line 1282
    mem_26 = rbuf + 8;
//#line 1282
    (*mem_26) = (unsigned char )(tmp >> 8);
//#line 1283
    mem_27 = rbuf + 9;
//#line 1283
    (*mem_27) = (unsigned char )tmp;
//#line 1286
    tmp = 512U;
//#line 1287
    mem_28 = rbuf + 12;
//#line 1287
    (*mem_28) = (unsigned char )(tmp >> 8);
//#line 1288
    mem_29 = rbuf + 13;
//#line 1288
    (*mem_29) = (unsigned char )tmp;
  }
//#line 1291
  return (0U);
}
}
//#line 1306 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-scsi.c"
unsigned int ata_scsiop_report_luns(struct ata_scsi_args *args , u8 *rbuf , unsigned int buflen ) 
{ u8 *mem_4 ;

  {
//#line 1310
  mem_4 = rbuf + 3;
//#line 1310
  (*mem_4) = (unsigned char)8;
//#line 1312
  return (0U);
}
}
//#line 1330 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-scsi.c"
void ata_scsi_badcmd(struct scsi_cmnd *cmd , void (*done)(struct scsi_cmnd * ) , u8 asc ,
                     u8 ascq ) 
{ 

  {
//#line 1333
  cmd->result = 2;
//#line 1335
  cmd->sense_buffer[0] = (unsigned char)112;
//#line 1336
  cmd->sense_buffer[2] = (unsigned char)5;
//#line 1337
  cmd->sense_buffer[7] = (unsigned char)6;
//#line 1338
  cmd->sense_buffer[12] = asc;
//#line 1339
  cmd->sense_buffer[13] = ascq;
//#line 1341
  ((*done))(cmd);
//#line 1342
  return;
}
}
//#line 1344 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-scsi.c"
static int atapi_qc_complete(struct ata_queued_cmd *qc , u8 drv_stat ) 
{ struct scsi_cmnd *cmd ;
  u8 *scsicmd ;
  u8 *buf ;
  unsigned int buflen ;
  void (*mem_7)(struct scsi_cmnd * ) ;
  u8 *mem_8 ;
  u8 *mem_9 ;
  u8 *mem_10 ;
  u8 *mem_11 ;
  void (*mem_12)(struct scsi_cmnd * ) ;

  {
//#line 1346
  cmd = qc->scsicmd;
//#line 1348
  if (! (! ((int )drv_stat & 137))) {
//#line 1351
    cmd->result = 2;
//#line 1353
    mem_7 = qc->scsidone;
//#line 1353
    ((*mem_7))(cmd);
//#line 1355
    return (1);
  } else {
//#line 1357
    scsicmd = cmd->cmnd;
//#line 1359
    mem_8 = scsicmd + 0;
//#line 1359
    if ((int )(*mem_8) == 18) {
//#line 1360
      buf = (u8 *)((void *)0);
//#line 1363
      buflen = ata_scsi_rbuf_get(cmd, & buf);
//#line 1364
      mem_9 = buf + 2;
//#line 1364
      (*mem_9) = (unsigned char)5;
//#line 1365
      mem_10 = buf + 3;
//#line 1365
      mem_11 = buf + 3;
//#line 1365
      (*mem_10) = (unsigned char )(((int )(*mem_11) & 240) | 2);
//#line 1366
      ata_scsi_rbuf_put(cmd, buf);
    }
//#line 1368
    cmd->result = 0;
  }
//#line 1371
  mem_12 = qc->scsidone;
//#line 1371
  ((*mem_12))(cmd);
//#line 1373
  return (0);
}
}
//#line 1387 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-scsi.c"
static unsigned int atapi_xlat(struct ata_queued_cmd *qc , u8 *scsicmd ) 
{ struct scsi_cmnd *cmd ;
  struct ata_device *dev ;
  int using_pio ;
  int nodata ;
  int tmp ;
  struct ata_port *mem_8 ;

  {
//#line 1389
  cmd = qc->scsicmd;
//#line 1390
  dev = qc->dev;
//#line 1391
  using_pio = (int )(dev->flags & 2UL);
//#line 1392
  nodata = (int )cmd->sc_data_direction == 3;
//#line 1394
  if (! using_pio) {
//#line 1396
    tmp = ata_check_atapi_dma(qc);
//#line 1396
    if (tmp) {
//#line 1397
      using_pio = 1;
    }
  }
//#line 1399
  mem_8 = qc->ap;
//#line 1399
  __memcpy((void *)(& qc->cdb), (void const   *)scsicmd, mem_8->cdb_len);
//#line 1401
  qc->complete_fn = & atapi_qc_complete;
//#line 1403
  qc->tf.flags |= 6UL;
//#line 1404
  if ((int )cmd->sc_data_direction == 1) {
//#line 1405
    qc->tf.flags |= 8UL;
  }
//#line 1409
  qc->tf.command = (unsigned char)160;
//#line 1412
  if (using_pio) {
    goto _L;
  } else {
//#line 1412
    if (nodata) {
      _L: 
//#line 1413
      if (nodata) {
//#line 1414
        qc->tf.protocol = (unsigned char)6;
      } else {
//#line 1416
        qc->tf.protocol = (unsigned char)5;
      }
//#line 1417
      qc->tf.lbam = (unsigned char)0;
//#line 1418
      qc->tf.lbah = (unsigned char)32;
    } else {
//#line 1423
      qc->tf.protocol = (unsigned char)7;
//#line 1424
      qc->tf.feature = (unsigned char )((int )qc->tf.feature | 1);
    }
  }
//#line 1433
  qc->nbytes = cmd->bufflen;
//#line 1435
  return (0U);
}
}
//#line 1455 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-scsi.c"
static struct ata_device *ata_scsi_find_dev(struct ata_port *ap , struct scsi_device *scsidev ) 
{ struct ata_device *dev ;
  unsigned int tmp ;

  {
//#line 1461
  if (! (! (scsidev->id < 2U))) {
//#line 1462
    dev = & ap->device[scsidev->id];
  } else {
//#line 1464
    return ((struct ata_device *)((void *)0));
  }
//#line 1466
  if (scsidev->channel != 0U) {
//#line 1468
    return ((struct ata_device *)((void *)0));
  } else {
//#line 1466
    if (scsidev->lun != 0U) {
//#line 1468
      return ((struct ata_device *)((void *)0));
    }
  }
//#line 1470
  tmp = ata_dev_present(dev);
//#line 1470
  if (! tmp) {
//#line 1471
    return ((struct ata_device *)((void *)0));
  }
//#line 1473
  if (! atapi_enabled) {
//#line 1474
    if (! (! (dev->class == 3U))) {
//#line 1475
      return ((struct ata_device *)((void *)0));
    }
  }
//#line 1478
  return (dev);
}
}
//#line 1493 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-scsi.c"
/*__inline*/ static ata_xlat_func_t ( /*__attribute__((__always_inline__))*/ ata_get_xlat_func)(struct ata_device *dev ,
                                                                                        u8 cmd ) 
{ int tmp ;

  {
//#line 1495
  switch ((int )cmd) {
  case 8: 
  case 40: 
  case 136: 
  case 10: 
  case 42: 
  case 138: 
//#line 1503
  return (& ata_scsi_rw_xlat);
  case 53: 
//#line 1506
  tmp = ata_try_flush_cache(dev);
//#line 1506
  if (tmp) {
//#line 1507
    return (& ata_scsi_flush_xlat);
  }
//#line 1508
  break;
  case 47: 
  case 143: 
//#line 1512
  return (& ata_scsi_verify_xlat);
  case 27: 
//#line 1514
  return (& ata_scsi_start_stop_xlat);
  }
//#line 1517
  return ((unsigned int (*)(struct ata_queued_cmd *qc , u8 *scsicmd ))((void *)0));
}
}
//#line 1528 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-scsi.c"
/*__inline*/ static void ( /*__attribute__((__always_inline__))*/ ata_scsi_dump_cdb)(struct ata_port *ap ,
                                                                             struct scsi_cmnd *cmd ) 
{ 

  {
//#line 1542
  return;
}
}
//#line 1563 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-scsi.c"
int ata_scsi_queuecmd(struct scsi_cmnd *cmd , void (*done)(struct scsi_cmnd * ) ) 
{ struct ata_port *ap ;
  struct ata_device *dev ;
  struct scsi_device *scsidev ;
  unsigned int (*xlat_func)(struct ata_queued_cmd *qc , u8 *scsicmd ) ;
  unsigned int (*tmp)(struct ata_queued_cmd *qc , u8 *scsicmd ) ;
  struct Scsi_Host *mem_8 ;

  {
//#line 1567
  scsidev = cmd->device;
//#line 1569
  mem_8 = scsidev->host;
//#line 1569
  ap = (struct ata_port *)(& mem_8->hostdata[0]);
//#line 1571
  ata_scsi_dump_cdb(ap, cmd);
//#line 1573
  dev = ata_scsi_find_dev(ap, scsidev);
//#line 1574
  if (! (! (! dev))) {
//#line 1575
    cmd->result = 262144;
//#line 1576
    ((*done))(cmd);
    goto out_unlock;
  }
//#line 1580
  if (dev->class == 1U) {
//#line 1581
    tmp = ata_get_xlat_func(dev, cmd->cmnd[0]);
//#line 1581
    xlat_func = tmp;
//#line 1584
    if (xlat_func) {
//#line 1585
      ata_scsi_translate(ap, dev, cmd, done, xlat_func);
    } else {
//#line 1587
      ata_scsi_simulate(dev->id, cmd, done);
    }
  } else {
//#line 1589
    ata_scsi_translate(ap, dev, cmd, done, & atapi_xlat);
  }
  out_unlock: 
//#line 1592
  return (0);
}
}
//#line 1608 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/libata-scsi.c"
void ata_scsi_simulate(u16 *id , struct scsi_cmnd *cmd , void (*done)(struct scsi_cmnd * ) ) 
{ struct ata_scsi_args args ;
  u8 *scsicmd ;
  u8 *mem_6 ;
  u8 *mem_7 ;
  u8 *mem_8 ;
  u8 *mem_9 ;
  u8 *mem_10 ;
  u8 *mem_11 ;
  u8 *mem_12 ;

  {
//#line 1613
  scsicmd = cmd->cmnd;
//#line 1615
  args.id = id;
//#line 1616
  args.cmd = cmd;
//#line 1617
  args.done = done;
//#line 1619
  mem_6 = scsicmd + 0;
//#line 1619
  switch ((int )(*mem_6)) {
  case 53: 
  case 1: 
  case 11: 
  case 43: 
  case 0: 
  case 4: 
  case 29: 
//#line 1628
  ata_scsi_rbuf_fill(& args, & ata_scsiop_noop);
//#line 1629
  break;
  case 18: 
//#line 1632
  mem_7 = scsicmd + 1;
//#line 1632
  if ((int )(*mem_7) & 2) {
//#line 1633
    ata_bad_cdb(cmd, done);
  } else {
//#line 1634
    mem_8 = scsicmd + 1;
//#line 1634
    if (((int )(*mem_8) & 1) == 0) {
//#line 1635
      ata_scsi_rbuf_fill(& args, & ata_scsiop_inq_std);
    } else {
//#line 1636
      mem_9 = scsicmd + 2;
//#line 1636
      if ((int )(*mem_9) == 0) {
//#line 1637
        ata_scsi_rbuf_fill(& args, & ata_scsiop_inq_00);
      } else {
//#line 1638
        mem_10 = scsicmd + 2;
//#line 1638
        if ((int )(*mem_10) == 128) {
//#line 1639
          ata_scsi_rbuf_fill(& args, & ata_scsiop_inq_80);
        } else {
//#line 1640
          mem_11 = scsicmd + 2;
//#line 1640
          if ((int )(*mem_11) == 131) {
//#line 1641
            ata_scsi_rbuf_fill(& args, & ata_scsiop_inq_83);
          } else {
//#line 1643
            ata_bad_cdb(cmd, done);
          }
        }
      }
    }
  }
//#line 1644
  break;
  case 26: 
  case 90: 
//#line 1648
  ata_scsi_rbuf_fill(& args, & ata_scsiop_mode_sense);
//#line 1649
  break;
  case 21: 
  case 85: 
//#line 1653
  ata_bad_cdb(cmd, done);
//#line 1654
  break;
  case 37: 
//#line 1657
  ata_scsi_rbuf_fill(& args, & ata_scsiop_read_cap);
//#line 1658
  break;
  case 158: 
//#line 1661
  mem_12 = scsicmd + 1;
//#line 1661
  if (((int )(*mem_12) & 31) == 16) {
//#line 1662
    ata_scsi_rbuf_fill(& args, & ata_scsiop_read_cap);
  } else {
//#line 1664
    ata_bad_cdb(cmd, done);
  }
//#line 1665
  break;
  case 160: 
//#line 1668
  ata_scsi_rbuf_fill(& args, & ata_scsiop_report_luns);
//#line 1669
  break;
  case 3: 
  default: 
//#line 1676
  ata_bad_scsiop(cmd, done);
//#line 1677
  break;
  }
//#line 1679
  return;
}
}
//#line 1 "scsi_lib.cil.o"
//#pragma merger(0,"./scsi_lib.cil.i","")
//#line 250 "include//*asm*//bitops.h"
/*__inline*/ static int ( /*__attribute__((__always_inline__))*/ constant_test_bit)(int nr ,
                                                                            unsigned long const volatile   *addr ) 
{ unsigned long const volatile   *mem_3 ;

  {
//#line 252
  mem_3 = addr + (nr >> 5);
//#line 252
  return (((1UL << (nr & 31)) & (unsigned long )(*mem_3)) != 0UL);
}
}
//#line 101 "include//*asm*//atomic.h"
/*__inline*/ static void ( /*__attribute__((__always_inline__))*/ atomic_inc)(atomic_t *v ) 
{ 

  {
//#line 103
  /*__asm__  ("":)*/;
//#line 107
  return;
}
}
//#line 47 "include/linux/list.h"
/*__inline*/ static void ( /*__attribute__((__always_inline__))*/ __list_add)(struct list_head *new ,
                                                                      struct list_head *prev ,
                                                                      struct list_head *next ) 
{ 

  {
//#line 51
  next->prev = new;
//#line 52
  new->next = next;
//#line 53
  new->prev = prev;
//#line 54
  prev->next = new;
//#line 55
  return;
}
}
//#line 78 "include/linux/list.h"
/*__inline*/ static void ( /*__attribute__((__always_inline__))*/ list_add_tail)(struct list_head *new ,
                                                                         struct list_head *head ) 
{ 

  {
//#line 80
  __list_add(new, head->prev, head);
//#line 81
  return;
}
}
//#line 149 "include/linux/list.h"
/*__inline*/ static void ( /*__attribute__((__always_inline__))*/ __list_del)(struct list_head *prev ,
                                                                      struct list_head *next ) 
{ 

  {
//#line 151
  next->prev = prev;
//#line 152
  prev->next = next;
//#line 153
  return;
}
}
//#line 217 "include/linux/list.h"
/*__inline*/ static void ( /*__attribute__((__always_inline__))*/ list_del_init)(struct list_head *entry ) 
{ 

  {
//#line 219
  __list_del(entry->prev, entry->next);
//#line 220
  while (1) {
//#line 220
    entry->next = entry;
//#line 220
    entry->prev = entry;
//#line 220
    break;
  }
//#line 221
  return;
}
}
//#line 250 "include/linux/list.h"
/*__inline*/ static int ( /*__attribute__((__always_inline__))*/ list_empty)(struct list_head  const  *head ) 
{ 

  {
//#line 252
  return ((unsigned int )head->next == (unsigned int )head);
}
}
//#line 59 "include/linux/slab.h"
extern kmem_cache_t *kmem_cache_create(char const   * , size_t  , size_t  , unsigned long  ,
                                       void (*ctor)(void * , kmem_cache_t * , unsigned long  ) ,
                                       void (*dtor)(void * , kmem_cache_t * , unsigned long  ) ) ;
//#line 62
extern int kmem_cache_destroy(kmem_cache_t * ) ;
//#line 24 "include/linux/mempool.h"
extern mempool_t *mempool_create(int min_nr , mempool_alloc_t *alloc_fn , mempool_free_t *free_fn ,
                                 void *pool_data ) ;
//#line 30
extern void mempool_destroy(mempool_t *pool ) ;
//#line 31
extern void *mempool_alloc(mempool_t *pool , gfp_t gfp_mask ) ;
//#line 32
extern void mempool_free(void *element , mempool_t *pool ) ;
//#line 38
extern void *mempool_alloc_slab(gfp_t gfp_mask , void *pool_data ) ;
//#line 39
extern void mempool_free_slab(void *element , void *pool_data ) ;
//#line 347 "include/linux/bio.h"
/*__inline*/ static char *( /*__attribute__((__always_inline__))*/ __bio_kmap_irq)(struct bio *bio ,
                                                                           unsigned short idx ,
                                                                           unsigned long *flags ) 
{ void *tmp ;
  struct bio_vec *mem_5 ;
  struct bio_vec *mem_6 ;

  {
//#line 350
  mem_5 = bio->bi_io_vec + (int )idx;
//#line 350
  tmp = lowmem_page_address(mem_5->bv_page);
//#line 350
  mem_6 = bio->bi_io_vec + (int )idx;
//#line 350
  return ((char *)(tmp + mem_6->bv_offset));
}
}
//#line 333 "include/linux/device.h"
extern int device_for_each_child(struct device * , void * , int (*fn)(struct device * ,
                                                                      void * ) ) ;
//#line 378
extern struct device *get_device(struct device *dev ) ;
//#line 379
extern void put_device(struct device *dev ) ;
//#line 237 "include/linux/genhd.h"
extern void add_disk_randomness(struct gendisk *disk ) ;
//#line 90 "include/linux/elevator.h"
extern void elv_remove_request(request_queue_t * , struct request * ) ;
//#line 94
extern struct request *elv_next_request(struct request_queue *q ) ;
//#line 550 "include/linux/blkdev.h"
extern void blk_put_request(struct request * ) ;
//#line 553
extern struct request *blk_get_request(request_queue_t * , int  , int  ) ;
//#line 554
extern void blk_insert_request(request_queue_t * , struct request * , int  , void * ) ;
//#line 555
extern void blk_requeue_request(request_queue_t * , struct request * ) ;
//#line 556
extern void blk_plug_device(request_queue_t * ) ;
//#line 560
extern void blk_start_queue(request_queue_t *q ) ;
//#line 561
extern void blk_stop_queue(request_queue_t *q ) ;
//#line 564
extern void blk_run_queue(request_queue_t * ) ;
//#line 568
extern int blk_rq_map_kern(request_queue_t * , struct request * , void * , unsigned int  ,
                           unsigned int  ) ;
//#line 570
extern int blk_execute_rq(request_queue_t * , struct gendisk * , struct request * ,
                          int  ) ;
//#line 600
extern int end_that_request_chunk(struct request * , int  , int  ) ;
//#line 601
extern void end_that_request_last(struct request * ) ;
//#line 612 "include/linux/blkdev.h"
/*__inline*/ static void ( /*__attribute__((__always_inline__))*/ blkdev_dequeue_request)(struct request *req ) 
{ int tmp ;

  {
//#line 614
  while (1) {
//#line 614
    tmp = list_empty((struct list_head  const  *)(& req->queuelist));
//#line 614
    if (tmp != 0) {
//#line 614
      /*__asm__  ("":)*/;
    }
//#line 614
    break;
  }
//#line 616
  list_del_init(& req->queuelist);
//#line 618
  if (req->rl) {
//#line 619
    elv_remove_request(req->q, req);
  }
//#line 620
  return;
}
}
//#line 627
extern request_queue_t *blk_init_queue(request_fn_proc * , spinlock_t * ) ;
//#line 628
extern void blk_cleanup_queue(request_queue_t * ) ;
//#line 630
extern void blk_queue_bounce_limit(request_queue_t * , u64  ) ;
//#line 633
extern void blk_queue_max_hw_segments(request_queue_t * , unsigned short  ) ;
//#line 637
extern void blk_queue_segment_boundary(request_queue_t * , unsigned long  ) ;
//#line 638
extern void blk_queue_prep_rq(request_queue_t * , prep_rq_fn *pfn ) ;
//#line 642
extern void blk_queue_ordered(request_queue_t * , int  ) ;
//#line 643
extern void blk_queue_issue_flush_fn(request_queue_t * , issue_flush_fn * ) ;
//#line 645
extern int blk_complete_barrier_rq(request_queue_t * , struct request * , int  ) ;
//#line 648
extern int blk_rq_map_sg(request_queue_t * , struct request * , struct scatterlist * ) ;
//#line 649
extern void blk_dump_rq_flags(struct request * , char * ) ;
//#line 667
extern int blk_queue_start_tag(request_queue_t * , struct request * ) ;
//#line 669
extern void blk_queue_end_tag(request_queue_t * , struct request * ) ;
//#line 43 "include/linux/delay.h"
extern unsigned long msleep_interruptible(unsigned int msecs ) ;
//#line 24 "include/scsi/scsi.h"
extern unsigned char const   scsi_command_size[8] ;
//#line 144 "include/scsi/scsi.h"
/*__inline*/ static int ( /*__attribute__((__always_inline__))*/ scsi_status_is_good)(int status ) 
{ int tmp ;

  {
//#line 151
  status &= 254;
//#line 152
  if (status == 0) {
//#line 152
    tmp = 1;
  } else {
//#line 152
    if (status == 16) {
//#line 152
      tmp = 1;
    } else {
//#line 152
      if (status == 20) {
//#line 152
        tmp = 1;
      } else {
//#line 152
        if (status == 34) {
//#line 152
          tmp = 1;
        } else {
//#line 152
          tmp = 0;
        }
      }
    }
  }
//#line 152
  return (tmp);
}
}
//#line 10 "include/scsi/scsi_dbg.h"
extern void __scsi_print_command(unsigned char * ) ;
//#line 11
extern void scsi_print_sense(char const   * , struct scsi_cmnd * ) ;
//#line 173 "include/scsi/scsi_device.h"
/*__inline*/ static struct scsi_target *( /*__attribute__((__always_inline__))*/ scsi_target)(struct scsi_device *sdev ) 
{ struct device  const  *__mptr ;
  struct scsi_target *mem_3 ;

  {
//#line 175
  __mptr = (struct device  const  *)sdev->sdev_gendev.parent;
//#line 175
  mem_3 = (struct scsi_target *)0;
//#line 175
  return ((struct scsi_target *)((char *)__mptr - (unsigned int )(& mem_3->dev)));
}
}
//#line 187
int scsi_device_get(struct scsi_device *sdev ) ;
//#line 188
void scsi_device_put(struct scsi_device *sdev ) ;
//#line 197
void starget_for_each_device(struct scsi_target *starget , void *data , void (*fn)(struct scsi_device * ,
                                                                                   void * ) ) ;
//#line 201
struct scsi_device *__scsi_iterate_devices(struct Scsi_Host *shost , struct scsi_device *prev ) ;
//#line 239
int scsi_mode_sense(struct scsi_device *sdev , int dbd , int modepage , unsigned char *buffer ,
                    int len , int timeout , int retries , struct scsi_mode_data *data ,
                    struct scsi_sense_hdr *sshdr ) ;
//#line 243
int scsi_test_unit_ready(struct scsi_device *sdev , int timeout , int retries ) ;
//#line 245
//int scsi_device_set_state(struct scsi_device *sdev , enum scsi_device_state state ) ;
//#line 247
int scsi_device_quiesce(struct scsi_device *sdev ) ;
//#line 248
void scsi_device_resume(struct scsi_device *sdev ) ;
//#line 249
void scsi_target_quiesce(struct scsi_target *starget ) ;
//#line 250
void scsi_target_resume(struct scsi_target *starget ) ;
//#line 254
void scsi_target_block(struct device *dev ) ;
//#line 255
void scsi_target_unblock(struct device *dev ) ;
//#line 258
extern char const   *scsi_device_state_name(enum scsi_device_state  ) ;
//#line 260
extern int scsi_is_target_device(struct device  const  * ) ;
//#line 261
int scsi_execute(struct scsi_device *sdev , unsigned char const   *cmd , int data_direction ,
                 void *buffer , unsigned int bufflen , unsigned char *sense , int timeout ,
                 int retries , int flags ) ;
//#line 265
int scsi_execute_req(struct scsi_device *sdev , unsigned char const   *cmd , int data_direction ,
                     void *buffer , unsigned int bufflen , struct scsi_sense_hdr *sshdr ,
                     int timeout , int retries ) ;
//#line 269 "include/scsi/scsi_device.h"
/*__inline*/ static int ( /*__attribute__((__always_inline__))*/ scsi_device_online)(struct scsi_device *sdev ) 
{ 

  {
//#line 271
  return ((int )sdev->sdev_state != 6);
}
}
//#line 29 "include/scsi/scsi_eh.h"
/*__inline*/ static int ( /*__attribute__((__always_inline__))*/ scsi_sense_valid)(struct scsi_sense_hdr *sshdr ) 
{ 

  {
//#line 31
  if (! sshdr) {
//#line 32
    return (0);
  }
//#line 34
  return (((int )sshdr->response_code & 112) == 112);
}
}
//#line 41
extern int scsi_normalize_sense(u8 const   *sense_buffer , int sb_len , struct scsi_sense_hdr *sshdr ) ;
//#line 45
extern int scsi_command_normalize_sense(struct scsi_cmnd *cmd , struct scsi_sense_hdr *sshdr ) ;
//#line 48 "include/scsi/scsi_eh.h"
/*__inline*/ static int ( /*__attribute__((__always_inline__))*/ scsi_sense_is_deferred)(struct scsi_sense_hdr *sshdr ) 
{ int tmp ;

  {
//#line 50
  if ((int )sshdr->response_code >= 112) {
//#line 50
    if ((int )sshdr->response_code & 1) {
//#line 50
      tmp = 1;
    } else {
//#line 50
      tmp = 0;
    }
  } else {
//#line 50
    tmp = 0;
  }
//#line 50
  return (tmp);
}
}
//#line 624 "include/scsi/scsi_host.h"
/*__inline*/ static int ( /*__attribute__((__always_inline__))*/ scsi_host_in_recovery)(struct Scsi_Host *shost ) 
{ int tmp ;

  {
//#line 626
  if ((int )shost->shost_state == 5) {
//#line 626
    tmp = 1;
  } else {
//#line 626
    if ((int )shost->shost_state == 6) {
//#line 626
      tmp = 1;
    } else {
//#line 626
      if ((int )shost->shost_state == 7) {
//#line 626
        tmp = 1;
      } else {
//#line 626
        tmp = 0;
      }
    }
  }
//#line 626
  return (tmp);
}
}
//#line 646
u64 scsi_calculate_bounce_limit(struct Scsi_Host *shost ) ;
//#line 653 "include/scsi/scsi_host.h"
/*__inline*/ static struct device *( /*__attribute__((__always_inline__))*/ scsi_get_device)(struct Scsi_Host *shost ) 
{ 

  {
//#line 655
  return (shost->shost_gendev.parent);
}
}
//#line 667
void scsi_unblock_requests(struct Scsi_Host *shost ) ;
//#line 668
void scsi_block_requests(struct Scsi_Host *shost ) ;
//#line 149 "include/scsi/scsi_cmnd.h"
struct scsi_cmnd *scsi_get_command(struct scsi_device *dev , int gfp_mask ) ;
//#line 150
void scsi_put_command(struct scsi_cmnd *cmd ) ;
//#line 151
void scsi_io_completion(struct scsi_cmnd *cmd , unsigned int good_bytes , unsigned int block_bytes ) ;
//#line 50 "include/scsi/scsi_request.h"
void scsi_wait_req(struct scsi_request *sreq , void const   *cmnd , void *buffer ,
                   unsigned int bufflen , int timeout , int retries ) ;
//#line 53
void scsi_do_req(struct scsi_request *sreq , void const   *cmnd , void *buffer , unsigned int bufflen ,
                 void (*done)(struct scsi_cmnd * ) , int timeout , int retries ) ;
//#line 41 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_priv.h"
int scsi_dispatch_cmd(struct scsi_cmnd *cmd ) ;
//#line 44
int scsi_insert_special_req(struct scsi_request *sreq , int at_head ) ;
//#line 45
void scsi_init_cmd_from_req(struct scsi_cmnd *cmd , struct scsi_request *sreq ) ;
//#line 47
void __scsi_release_request(struct scsi_request *sreq ) ;
//#line 48
void __scsi_done(struct scsi_cmnd *cmd ) ;
//#line 72
extern void scsi_eh_wakeup(struct Scsi_Host *shost ) ;
//#line 77
void scsi_setup_cmd_retry(struct scsi_cmnd *cmd ) ;
//#line 78
void scsi_device_unbusy(struct scsi_device *sdev ) ;
//#line 79
int scsi_queue_insert(struct scsi_cmnd *cmd , int reason ) ;
//#line 80
void scsi_next_command(struct scsi_cmnd *cmd ) ;
//#line 81
void scsi_run_host_queues(struct Scsi_Host *shost ) ;
//#line 82
struct request_queue *scsi_alloc_queue(struct scsi_device *sdev ) ;
//#line 83
void scsi_free_queue(struct request_queue *q ) ;
//#line 84
int scsi_init_queue(void)  /*__attribute__((__section__(".init.text")))*/ ;
//#line 85
void scsi_exit_queue(void) ;
//#line 137
int scsi_internal_device_block(struct scsi_device *sdev ) ;
//#line 138
int scsi_internal_device_unblock(struct scsi_device *sdev ) ;
//#line 40 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_logging.h"
unsigned int scsi_logging_level ;
//#line 47 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
static struct scsi_host_sg_pool scsi_sg_pools[5]  = {      {8U, /*(char *)*/"sgpool-8", (kmem_cache_t *)0, (mempool_t *)0}, 
        {16U, /*(char *)*/"sgpool-16", (kmem_cache_t *)0, (mempool_t *)0}, 
        {32U, /*(char *)*/"sgpool-32", (kmem_cache_t *)0, (mempool_t *)0}, 
        {64U, /*(char *)*/"sgpool-64", (kmem_cache_t *)0, (mempool_t *)0}, 
        {128U, /*(char *)*/"sgpool-128", (kmem_cache_t *)0, (mempool_t *)0}};
//#line 87 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
int scsi_insert_special_req(struct scsi_request *sreq , int at_head ) 
{ struct request *mem_3 ;
  struct request *mem_4 ;
  struct scsi_device *mem_5 ;

  {
//#line 93
  mem_3 = sreq->sr_request;
//#line 93
  mem_4 = sreq->sr_request;
//#line 93
  mem_3->flags = mem_4->flags & 4294967167UL;
//#line 94
  mem_5 = sreq->sr_device;
//#line 94
  blk_insert_request(mem_5->request_queue, sreq->sr_request, at_head, (void *)sreq);
//#line 96
  return (0);
}
}
//#line 99
static void scsi_run_queue(struct request_queue *q ) ;
//#line 113 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
static void scsi_unprep_request(struct request *req ) 
{ struct scsi_cmnd *cmd ;

  {
//#line 115
  cmd = (struct scsi_cmnd *)req->special;
//#line 117
  req->flags &= 4294967167UL;
//#line 118
  if (req->flags & 16384UL) {
//#line 118
    req->special = (void *)cmd->sc_request;
  } else {
//#line 118
    req->special = (void *)0;
  }
//#line 120
  scsi_put_command(cmd);
//#line 121
  return;
}
}
//#line 143 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
int scsi_queue_insert(struct scsi_cmnd *cmd , int reason ) 
{ struct Scsi_Host *host ;
  struct scsi_device *device ;
  struct request_queue *q ;
  unsigned long flags ;
  struct scsi_device *mem_7 ;

  {
//#line 145
  mem_7 = cmd->device;
//#line 145
  host = mem_7->host;
//#line 146
  device = cmd->device;
//#line 147
  q = device->request_queue;
//#line 150
  if (! (! (((scsi_logging_level >> 9) & 7U) > 1U))) {
//#line 150
    printk("Inserting command %p into mlqueue\n", cmd);
  }
//#line 166
  if (reason == 4181) {
//#line 167
    host->host_blocked = host->max_host_blocked;
  } else {
//#line 168
    if (reason == 4182) {
//#line 169
      device->device_blocked = device->max_device_blocked;
    }
  }
//#line 175
  scsi_device_unbusy(device);
//#line 188
  __SLIC_spin_lock_irqsave(q->queue_lock, flags);
//#line 189
  blk_requeue_request(q, cmd->request);
//#line 190
  __SLIC_spin_unlock_irqrestore(q->queue_lock, flags);
//#line 192
  scsi_run_queue(q);
//#line 194
  return (0);
}
}
//#line 223 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
void scsi_do_req(struct scsi_request *sreq , void const   *cmnd , void *buffer , unsigned int bufflen ,
                 void (*done)(struct scsi_cmnd * ) , int timeout , int retries ) 
{ 

  {
//#line 233
  __scsi_release_request(sreq);
//#line 241
  __constant_memcpy((void *)(sreq->sr_cmnd), cmnd, sizeof(sreq->sr_cmnd));
//#line 242
  sreq->sr_bufflen = bufflen;
//#line 243
  sreq->sr_buffer = buffer;
//#line 244
  sreq->sr_allowed = retries;
//#line 245
  sreq->sr_done = done;
//#line 246
  sreq->sr_timeout_per_command = timeout;
//#line 248
  if ((int )sreq->sr_cmd_len == 0) {
//#line 249
    sreq->sr_cmd_len = (unsigned char )scsi_command_size[((int )sreq->sr_cmnd[0] >> 5) & 7];
  }
//#line 254
  scsi_insert_special_req(sreq, 1);
//#line 255
  return;
}
}
//#line 261 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
static void scsi_wait_req_end_io(struct request *req ) 
{ 

  {
//#line 263
  while (1) {
//#line 263
    if (! (! (! req->waiting != 0))) {
//#line 263
      /*__asm__  ("":)*/;
    }
//#line 263
    break;
  }
//#line 265
  complete(req->waiting);
//#line 266
  return;
}
}
//#line 268 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
void scsi_wait_req(struct scsi_request *sreq , void const   *cmnd , void *buffer ,
                   unsigned int bufflen , int timeout , int retries ) 
{ struct completion wait ;
  int write ;
  struct request *req ;
  int tmp ;
  struct scsi_device *mem_11 ;
  struct scsi_device *mem_12 ;
  u8 *mem_13 ;
  struct scsi_device *mem_14 ;
  struct request *mem_15 ;

  {
//#line 271
  wait.done = 0U;
//#line 271
  wait.wait.lock.raw_lock.slock = (unsigned int volatile   )1;
//#line 271
  wait.wait.lock.magic = 3735899821U;
//#line 271
  wait.wait.lock.owner_cpu = 4294967295U;
//#line 271
  wait.wait.lock.owner = (void *)-1L;
//#line 271
  wait.wait.task_list.next = & wait.wait.task_list;
//#line 271
  wait.wait.task_list.prev = & wait.wait.task_list;
//#line 272
  write = (int )sreq->sr_data_direction == 1;
//#line 275
  mem_11 = sreq->sr_device;
//#line 275
  req = blk_get_request(mem_11->request_queue, write, 16);
//#line 277
  if (bufflen) {
//#line 277
    mem_12 = sreq->sr_device;
//#line 277
    tmp = blk_rq_map_kern(mem_12->request_queue, req, buffer, bufflen, 16U);
//#line 277
    if (tmp) {
//#line 279
      sreq->sr_result = 67108864;
//#line 280
      blk_put_request(req);
//#line 281
      return;
    }
  }
//#line 284
  req->flags |= 32UL;
//#line 285
  req->waiting = & wait;
//#line 286
  req->end_io = & scsi_wait_req_end_io;
//#line 287
  mem_13 = (u8 *)cmnd + 0;
//#line 287
  req->cmd_len = (unsigned int )scsi_command_size[((int )(*mem_13) >> 5) & 7];
//#line 288
  req->sense = (void *)(sreq->sr_sense_buffer);
//#line 289
  req->sense_len = 0U;
//#line 290
  __memcpy((void *)(req->cmd), cmnd, req->cmd_len);
//#line 291
  req->timeout = (unsigned int )timeout;
//#line 292
  req->flags |= 1024UL;
//#line 293
  req->rq_disk = (struct gendisk *)((void *)0);
//#line 294
  mem_14 = sreq->sr_device;
//#line 294
  blk_insert_request(mem_14->request_queue, req, (int )sreq->sr_data_direction == 1,
                     (void *)0);
//#line 296
  wait_for_completion(& wait);
//#line 297
  mem_15 = sreq->sr_request;
//#line 297
  mem_15->waiting = (struct completion *)((void *)0);
//#line 298
  sreq->sr_result = req->errors;
//#line 299
  if (req->errors) {
//#line 300
    sreq->sr_result |= 67108864;
  }
//#line 302
  blk_put_request(req);
//#line 303
  return;
}
}
//#line 322 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
int scsi_execute(struct scsi_device *sdev , unsigned char const   *cmd , int data_direction ,
                 void *buffer , unsigned int bufflen , unsigned char *sense , int timeout ,
                 int retries , int flags ) 
{ struct request *req ;
  int write ;
  int ret ;
  int tmp ;
  unsigned char const   *mem_14 ;

  {
//#line 327
  write = data_direction == 1;
//#line 328
  ret = 67108864;
//#line 330
  req = blk_get_request(sdev->request_queue, write, 16);
//#line 332
  if (bufflen) {
//#line 332
    tmp = blk_rq_map_kern(sdev->request_queue, req, buffer, bufflen, 16U);
//#line 332
    if (tmp) {
      goto out;
    }
  }
//#line 336
  mem_14 = cmd + 0;
//#line 336
  req->cmd_len = (unsigned int )scsi_command_size[((int const   )(*mem_14) >> 5) & 7];
//#line 337
  __memcpy((void *)(req->cmd), (void const   *)cmd, req->cmd_len);
//#line 338
  req->sense = (void *)sense;
//#line 339
  req->sense_len = 0U;
//#line 340
  req->timeout = (unsigned int )timeout;
//#line 341
  req->flags |= (unsigned long )(((flags | 1024) | 16384) | 8192);
//#line 346
  blk_execute_rq(req->q, (struct gendisk *)((void *)0), req, 1);
//#line 348
  ret = req->errors;
  out: 
//#line 350
  blk_put_request(req);
//#line 352
  return (ret);
}
}
//#line 357 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
int scsi_execute_req(struct scsi_device *sdev , unsigned char const   *cmd , int data_direction ,
                     void *buffer , unsigned int bufflen , struct scsi_sense_hdr *sshdr ,
                     int timeout , int retries ) 
{ char *sense ;
  int result ;

  {
//#line 361
  sense = (char *)((void *)0);
//#line 364
  if (sshdr) {
//#line 365
    sense = (char *)kmalloc(96U, 16U);
//#line 366
    if (! sense) {
//#line 367
      return (67108864);
    }
//#line 368
    __constant_c_and_count_memset((void *)sense, 0UL, 96U);
  }
//#line 370
  result = scsi_execute(sdev, cmd, data_direction, buffer, bufflen, (unsigned char *)sense,
                        timeout, retries, 0);
//#line 372
  if (sshdr) {
//#line 373
    scsi_normalize_sense((u8 const   *)sense, 96, sshdr);
  }
//#line 375
  kfree((void const   *)sense);
//#line 376
  return (result);
}
}
//#line 393 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
static int scsi_init_cmd_errh(struct scsi_cmnd *cmd ) 
{ 

  {
//#line 395
  cmd->serial_number = 0UL;
//#line 397
  __constant_c_and_count_memset((void *)(cmd->sense_buffer), 0UL, sizeof(cmd->sense_buffer));
//#line 399
  if ((int )cmd->cmd_len == 0) {
//#line 400
    cmd->cmd_len = (unsigned char )scsi_command_size[((int )cmd->cmnd[0] >> 5) & 7];
  }
//#line 409
  cmd->old_use_sg = cmd->use_sg;
//#line 410
  cmd->old_cmd_len = cmd->cmd_len;
//#line 411
  cmd->sc_old_data_direction = cmd->sc_data_direction;
//#line 412
  cmd->old_underflow = cmd->underflow;
//#line 413
  __constant_memcpy((void *)(cmd->data_cmnd), (void const   *)(cmd->cmnd), sizeof(cmd->cmnd));
//#line 414
  cmd->buffer = cmd->request_buffer;
//#line 415
  cmd->bufflen = cmd->request_bufflen;
//#line 417
  return (1);
}
}
//#line 432 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
void scsi_setup_cmd_retry(struct scsi_cmnd *cmd ) 
{ 

  {
//#line 434
  __constant_memcpy((void *)(cmd->cmnd), (void const   *)(cmd->data_cmnd), sizeof(cmd->data_cmnd));
//#line 435
  cmd->request_buffer = cmd->buffer;
//#line 436
  cmd->request_bufflen = cmd->bufflen;
//#line 437
  cmd->use_sg = cmd->old_use_sg;
//#line 438
  cmd->cmd_len = cmd->old_cmd_len;
//#line 439
  cmd->sc_data_direction = cmd->sc_old_data_direction;
//#line 440
  cmd->underflow = cmd->old_underflow;
//#line 441
  return;
}
}
//#line 443 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
void scsi_device_unbusy(struct scsi_device *sdev ) 
{ struct Scsi_Host *shost ;
  unsigned long flags ;
  int tmp ;
  struct request_queue *mem_5 ;
  struct request_queue *mem_6 ;

  {
//#line 445
  shost = sdev->host;
//#line 448
  __SLIC_spin_lock_irqsave(shost->host_lock, flags);
//#line 449
  shost->host_busy --;
//#line 450
  tmp = scsi_host_in_recovery(shost);
//#line 450
  if (tmp) {
//#line 450
    if (shost->host_failed) {
//#line 452
      scsi_eh_wakeup(shost);
    }
  }
//#line 453
  __SLIC_spin_unlock(shost->host_lock);
//#line 454
  mem_5 = sdev->request_queue;
//#line 454
  __SLIC_spin_lock(mem_5->queue_lock);
//#line 455
  sdev->device_busy --;
//#line 456
  mem_6 = sdev->request_queue;
//#line 456
  __SLIC_spin_unlock_irqrestore(mem_6->queue_lock, flags);
//#line 457
  return;
}
}
//#line 466 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
static void scsi_single_lun_run(struct scsi_device *current_sdev ) 
{ struct Scsi_Host *shost ;
  struct scsi_device *sdev ;
  struct scsi_device *tmp ;
  struct scsi_target *starget ;
  struct scsi_target *tmp___0 ;
  unsigned long flags ;
  struct list_head  const  *__mptr ;
  struct list_head  const  *__mptr___0 ;
  struct list_head  const  *__mptr___1 ;
  int tmp___1 ;
  struct scsi_device *mem_12 ;
  struct scsi_device *mem_13 ;
  struct scsi_device *mem_14 ;

  {
//#line 468
  shost = current_sdev->host;
//#line 470
  tmp___0 = scsi_target(current_sdev);
//#line 470
  starget = tmp___0;
//#line 473
  __SLIC_spin_lock_irqsave(shost->host_lock, flags);
//#line 474
  starget->starget_sdev_user = (struct scsi_device *)((void *)0);
//#line 475
  __SLIC_spin_unlock_irqrestore(shost->host_lock, flags);
//#line 483
  blk_run_queue(current_sdev->request_queue);
//#line 485
  __SLIC_spin_lock_irqsave(shost->host_lock, flags);
//#line 486
  if (starget->starget_sdev_user) {
    goto out;
  }
//#line 488
  __mptr = (struct list_head  const  *)starget->devices.next;
//#line 488
  mem_12 = (struct scsi_device *)0;
//#line 488
  sdev = (struct scsi_device *)((char *)__mptr - (unsigned int )(& mem_12->same_target_siblings));
//#line 488
  __mptr___0 = (struct list_head  const  *)sdev->same_target_siblings.next;
//#line 488
  mem_13 = (struct scsi_device *)0;
//#line 488
  tmp = (struct scsi_device *)((char *)__mptr___0 - (unsigned int )(& mem_13->same_target_siblings));
//#line 488
  while ((unsigned int )(& sdev->same_target_siblings) != (unsigned int )(& starget->devices)) {
//#line 490
    if ((unsigned int )sdev == (unsigned int )current_sdev) {
      goto __Cont;
    }
//#line 492
    tmp___1 = scsi_device_get(sdev);
//#line 492
    if (tmp___1) {
      goto __Cont;
    }
//#line 495
    _spin_unlock_irqrestore(shost->host_lock, flags);
//#line 496
    blk_run_queue(sdev->request_queue);
//#line 497
    flags = _spin_lock_irqsave(shost->host_lock);
//#line 499
    scsi_device_put(sdev);
    __Cont: 
//#line 488
    sdev = tmp;
//#line 488
    __mptr___1 = (struct list_head  const  *)tmp->same_target_siblings.next;
//#line 488
    mem_14 = (struct scsi_device *)0;
//#line 488
    tmp = (struct scsi_device *)((char *)__mptr___1 - (unsigned int )(& mem_14->same_target_siblings));
  }
  out: 
//#line 502
  __SLIC_spin_unlock_irqrestore(shost->host_lock, flags);
//#line 503
  return;
}
}
//#line 517 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
static void scsi_run_queue(struct request_queue *q ) 
{ struct scsi_device *sdev ;
  struct Scsi_Host *shost ;
  unsigned long flags ;
  struct list_head  const  *__mptr ;
  int tmp ;
  int tmp___0 ;
  struct scsi_device *mem_8 ;

  {
//#line 519
  sdev = (struct scsi_device *)q->queuedata;
//#line 520
  shost = sdev->host;
//#line 523
  if (sdev->single_lun) {
//#line 524
    scsi_single_lun_run(sdev);
  }
//#line 526
  __SLIC_spin_lock_irqsave(shost->host_lock, flags);
//#line 527
  while (1) {
//#line 527
    tmp___0 = list_empty((struct list_head  const  *)(& shost->starved_list));
//#line 527
    if (tmp___0) {
//#line 527
      break;
    } else {
//#line 527
      if (! shost->host_blocked) {
//#line 527
        if (! shost->host_self_blocked) {
//#line 527
          if (shost->can_queue > 0) {
//#line 527
            if (shost->host_busy >= (unsigned int )shost->can_queue) {
//#line 527
              break;
            }
          }
        } else {
//#line 527
          break;
        }
      } else {
//#line 527
        break;
      }
    }
//#line 541
    __mptr = (struct list_head  const  *)shost->starved_list.next;
//#line 541
    mem_8 = (struct scsi_device *)0;
//#line 541
    sdev = (struct scsi_device *)((char *)__mptr - (unsigned int )(& mem_8->starved_entry));
//#line 543
    list_del_init(& sdev->starved_entry);
//#line 544
    __SLIC_spin_unlock_irqrestore(shost->host_lock, flags);
//#line 546
    blk_run_queue(sdev->request_queue);
//#line 548
    __SLIC_spin_lock_irqsave(shost->host_lock, flags);
//#line 549
    tmp = list_empty((struct list_head  const  *)(& sdev->starved_entry));
//#line 549
    if (! tmp) {
//#line 555
      break;
    }
  }
//#line 557
  __SLIC_spin_unlock_irqrestore(shost->host_lock, flags);
//#line 559
  blk_run_queue(q);
//#line 560
  return;
}
}
//#line 580 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
static void scsi_requeue_command(struct request_queue *q , struct scsi_cmnd *cmd ) 
{ struct request *req ;
  unsigned long flags ;

  {
//#line 582
  req = cmd->request;
//#line 585
  scsi_unprep_request(req);
//#line 586
  __SLIC_spin_lock_irqsave(q->queue_lock, flags);
//#line 587
  blk_requeue_request(q, req);
//#line 588
  __SLIC_spin_unlock_irqrestore(q->queue_lock, flags);
//#line 590
  scsi_run_queue(q);
//#line 591
  return;
}
}
//#line 593 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
void scsi_next_command(struct scsi_cmnd *cmd ) 
{ struct request_queue *q ;
  struct scsi_device *mem_3 ;

  {
//#line 595
  mem_3 = cmd->device;
//#line 595
  q = mem_3->request_queue;
//#line 597
  scsi_put_command(cmd);
//#line 598
  scsi_run_queue(q);
//#line 599
  return;
}
}
//#line 601 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
void scsi_run_host_queues(struct Scsi_Host *shost ) 
{ struct scsi_device *sdev ;

  {
//#line 605
  sdev = __scsi_iterate_devices(shost, (struct scsi_device *)((void *)0));
//#line 605
  while (sdev) {
//#line 606
    scsi_run_queue(sdev->request_queue);
//#line 605
    sdev = __scsi_iterate_devices(shost, sdev);
  }
//#line 607
  return;
}
}
//#line 631 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
static struct scsi_cmnd *scsi_end_request(struct scsi_cmnd *cmd , int uptodate , int bytes ,
                                          int requeue ) 
{ request_queue_t *q ;
  struct request *req ;
  unsigned long flags ;
  int leftover ;
  int tmp ;
  struct scsi_device *mem_10 ;

  {
//#line 634
  mem_10 = cmd->device;
//#line 634
  q = mem_10->request_queue;
//#line 635
  req = cmd->request;
//#line 642
  tmp = end_that_request_chunk(req, uptodate, bytes);
//#line 642
  if (tmp) {
//#line 643
    leftover = (int )(req->hard_nr_sectors << 9);
//#line 645
    if (req->flags & 1024UL) {
//#line 646
      leftover = (int )req->data_len;
    }
//#line 649
    if (! uptodate) {
//#line 649
      if (req->flags & 2UL) {
//#line 650
        end_that_request_chunk(req, 0, leftover);
      } else {
        goto _L;
      }
    } else {
      _L: 
//#line 652
      if (requeue) {
//#line 658
        scsi_requeue_command(q, cmd);
//#line 659
        cmd = (struct scsi_cmnd *)((void *)0);
      }
//#line 661
      return (cmd);
    }
  }
//#line 665
  add_disk_randomness(req->rq_disk);
//#line 667
  __SLIC_spin_lock_irqsave(q->queue_lock, flags);
//#line 668
  if (req->flags & 256UL) {
//#line 669
    blk_queue_end_tag(q, req);
  }
//#line 670
  end_that_request_last(req);
//#line 671
  __SLIC_spin_unlock_irqrestore(q->queue_lock, flags);
//#line 677
  scsi_next_command(cmd);
//#line 678
  return ((struct scsi_cmnd *)((void *)0));
}
}
//#line 681 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
static struct scatterlist *scsi_alloc_sgtable(struct scsi_cmnd *cmd , int gfp_mask ) 
{ struct scsi_host_sg_pool *sgp ;
  struct scatterlist *sgl ;

  {
//#line 686
  while (1) {
//#line 686
    if (! (! (! cmd->use_sg != 0))) {
//#line 686
      /*__asm__  ("":)*/;
    }
//#line 686
    break;
  }
//#line 688
  switch ((int )cmd->use_sg) {
  case 1: 
  case 2: 
  case 3: 
  case 4: 
  case 5: 
  case 6: 
  case 7: 
  case 8: 
//#line 690
  cmd->sglist_len = (unsigned short)0;
//#line 691
  break;
  case 9: 
  case 10: 
  case 11: 
  case 12: 
  case 13: 
  case 14: 
  case 15: 
  case 16: 
//#line 693
  cmd->sglist_len = (unsigned short)1;
//#line 694
  break;
  case 17: 
  case 18: 
  case 19: 
  case 20: 
  case 21: 
  case 22: 
  case 23: 
  case 24: 
  case 25: 
  case 26: 
  case 27: 
  case 28: 
  case 29: 
  case 30: 
  case 31: 
  case 32: 
//#line 696
  cmd->sglist_len = (unsigned short)2;
//#line 697
  break;
  case 33: 
  case 34: 
  case 35: 
  case 36: 
  case 37: 
  case 38: 
  case 39: 
  case 40: 
  case 41: 
  case 42: 
  case 43: 
  case 44: 
  case 45: 
  case 46: 
  case 47: 
  case 48: 
  case 49: 
  case 50: 
  case 51: 
  case 52: 
  case 53: 
  case 54: 
  case 55: 
  case 56: 
  case 57: 
  case 58: 
  case 59: 
  case 60: 
  case 61: 
  case 62: 
  case 63: 
  case 64: 
//#line 700
  cmd->sglist_len = (unsigned short)3;
//#line 701
  break;
  case 65: 
  case 66: 
  case 67: 
  case 68: 
  case 69: 
  case 70: 
  case 71: 
  case 72: 
  case 73: 
  case 74: 
  case 75: 
  case 76: 
  case 77: 
  case 78: 
  case 79: 
  case 80: 
  case 81: 
  case 82: 
  case 83: 
  case 84: 
  case 85: 
  case 86: 
  case 87: 
  case 88: 
  case 89: 
  case 90: 
  case 91: 
  case 92: 
  case 93: 
  case 94: 
  case 95: 
  case 96: 
  case 97: 
  case 98: 
  case 99: 
  case 100: 
  case 101: 
  case 102: 
  case 103: 
  case 104: 
  case 105: 
  case 106: 
  case 107: 
  case 108: 
  case 109: 
  case 110: 
  case 111: 
  case 112: 
  case 113: 
  case 114: 
  case 115: 
  case 116: 
  case 117: 
  case 118: 
  case 119: 
  case 120: 
  case 121: 
  case 122: 
  case 123: 
  case 124: 
  case 125: 
  case 126: 
  case 127: 
  case 128: 
//#line 704
  cmd->sglist_len = (unsigned short)4;
//#line 705
  break;
  default: ;
//#line 714
  return ((struct scatterlist *)((void *)0));
  }
//#line 717
  sgp = scsi_sg_pools + (int )cmd->sglist_len;
//#line 718
  sgl = (struct scatterlist *)mempool_alloc(sgp->pool, (unsigned int )gfp_mask);
//#line 719
  return (sgl);
}
}
//#line 722 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
static void scsi_free_sgtable(struct scatterlist *sgl , int index ) 
{ struct scsi_host_sg_pool *sgp ;

  {
//#line 726
  while (1) {
//#line 726
    if (! (! (((unsigned int )index >= sizeof(scsi_sg_pools) / sizeof(struct scsi_host_sg_pool )) != 0))) {
//#line 726
      /*__asm__  ("":)*/;
    }
//#line 726
    break;
  }
//#line 728
  sgp = scsi_sg_pools + index;
//#line 729
  mempool_free((void *)sgl, sgp->pool);
//#line 730
  return;
}
}
//#line 749 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
static void scsi_release_buffers(struct scsi_cmnd *cmd ) 
{ struct request *req ;

  {
//#line 751
  req = cmd->request;
//#line 756
  if (cmd->use_sg) {
//#line 757
    scsi_free_sgtable((struct scatterlist *)cmd->request_buffer, (int )cmd->sglist_len);
  } else {
//#line 758
    if ((unsigned int )cmd->request_buffer != (unsigned int )req->buffer) {
//#line 759
      kfree((void const   *)cmd->request_buffer);
    }
  }
//#line 765
  cmd->buffer = (void *)0;
//#line 766
  cmd->bufflen = 0U;
//#line 767
  cmd->request_buffer = (void *)0;
//#line 768
  cmd->request_bufflen = 0U;
//#line 769
  return;
}
}
//#line 799 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
void scsi_io_completion(struct scsi_cmnd *cmd , unsigned int good_bytes , unsigned int block_bytes ) 
{ int result ;
  int this_count ;
  request_queue_t *q ;
  struct request *req ;
  int clear_errors ;
  struct scsi_sense_hdr sshdr ;
  int sense_valid ;
  int sense_deferred ;
  int tmp ;
  unsigned long flags ;
  char *to ;
  char *tmp___0 ;
  int len ;
  struct scsi_cmnd *tmp___1 ;
  char const   *tmp___2 ;
  char const   *tmp___3 ;
  char const   *tmp___4 ;
  struct scsi_device *mem_21 ;
  struct bio *mem_22 ;
  struct scsi_device *mem_23 ;
  struct scsi_device *mem_24 ;
  struct scsi_device *mem_25 ;
  struct scsi_device *mem_26 ;
  struct scsi_device *mem_27 ;
  struct scsi_device *mem_28 ;
  struct scsi_device *mem_29 ;
  struct device_driver *mem_30 ;
  struct scsi_device *mem_31 ;
  struct scsi_device *mem_32 ;
  struct scsi_device *mem_33 ;
  struct device_driver *mem_34 ;
  struct scsi_device *mem_35 ;
  struct scsi_device *mem_36 ;
  struct scsi_device *mem_37 ;
  struct device_driver *mem_38 ;
  struct scsi_device *mem_39 ;

  {
//#line 802
  result = cmd->result;
//#line 803
  this_count = (int )cmd->bufflen;
//#line 804
  mem_21 = cmd->device;
//#line 804
  q = mem_21->request_queue;
//#line 805
  req = cmd->request;
//#line 806
  clear_errors = 1;
//#line 808
  sense_valid = 0;
//#line 809
  sense_deferred = 0;
//#line 811
  tmp = blk_complete_barrier_rq(q, req, (int )(good_bytes >> 9));
//#line 811
  if (tmp) {
//#line 812
    return;
  }
//#line 819
  if (cmd->use_sg) {
//#line 820
    scsi_free_sgtable((struct scatterlist *)cmd->buffer, (int )cmd->sglist_len);
  } else {
//#line 821
    if ((unsigned int )cmd->buffer != (unsigned int )req->buffer) {
//#line 822
      if ((req->flags & 1UL) == 0UL) {
//#line 824
        mem_22 = req->bio;
//#line 824
        tmp___0 = __bio_kmap_irq(req->bio, mem_22->bi_idx, & flags);
//#line 824
        to = tmp___0;
//#line 825
        __memcpy((void *)to, (void const   *)cmd->buffer, cmd->bufflen);
//#line 826
        while (1) {
//#line 826
          flags = 0UL;
//#line 826
          break;
        }
      }
//#line 828
      kfree((void const   *)cmd->buffer);
    }
  }
//#line 831
  if (result) {
//#line 832
    sense_valid = scsi_command_normalize_sense(cmd, & sshdr);
//#line 833
    if (sense_valid) {
//#line 834
      sense_deferred = scsi_sense_is_deferred(& sshdr);
    }
  }
//#line 836
  if (req->flags & 1024UL) {
//#line 837
    req->errors = result;
//#line 838
    if (result) {
//#line 839
      clear_errors = 0;
//#line 840
      if (sense_valid) {
//#line 840
        if (req->sense) {
//#line 844
          len = 8 + (int )cmd->sense_buffer[7];
//#line 846
          if (len > 96) {
//#line 847
            len = 96;
          }
//#line 848
          __memcpy(req->sense, (void const   *)(cmd->sense_buffer), (unsigned int )len);
//#line 849
          req->sense_len = (unsigned int )len;
        }
      }
    } else {
//#line 852
      req->data_len = (unsigned int )cmd->resid;
    }
  }
//#line 859
  cmd->buffer = (void *)0;
//#line 860
  cmd->bufflen = 0U;
//#line 861
  cmd->request_buffer = (void *)0;
//#line 862
  cmd->request_bufflen = 0U;
//#line 868
  if (good_bytes >= 0U) {
//#line 869
    if (! (! (((scsi_logging_level >> 24) & 7U) > 1U))) {
//#line 869
      printk("%ld sectors total, %d bytes done.\n", req->nr_sectors, good_bytes);
    }
//#line 871
    if (! (! (((scsi_logging_level >> 24) & 7U) > 1U))) {
//#line 871
      printk("use_sg is %d\n", cmd->use_sg);
    }
//#line 873
    if (clear_errors) {
//#line 874
      req->errors = 0;
    }
//#line 891
    tmp___1 = scsi_end_request(cmd, 1, (int )good_bytes, result == 0);
//#line 891
    if ((unsigned int )tmp___1 == (unsigned int )((void *)0)) {
//#line 892
      return;
    }
  }
//#line 899
  if (sense_valid) {
//#line 899
    if (! sense_deferred) {
//#line 900
      switch ((int )sshdr.sense_key) {
      case 6: 
//#line 902
      mem_23 = cmd->device;
//#line 902
      if (mem_23->removable) {
//#line 906
        mem_24 = cmd->device;
//#line 906
        mem_24->changed = 1U;
//#line 907
        scsi_end_request(cmd, 0, this_count, 1);
//#line 909
        return;
      } else {
//#line 917
        scsi_requeue_command(q, cmd);
//#line 918
        return;
      }
//#line 920
      break;
      case 5: 
//#line 930
      mem_25 = cmd->device;
//#line 930
      if (mem_25->use_10_for_rw) {
//#line 930
        if ((int )cmd->cmnd[0] == 40) {
//#line 933
          mem_26 = cmd->device;
//#line 933
          mem_26->use_10_for_rw = 0U;
//#line 938
          scsi_requeue_command(q, cmd);
//#line 939
          result = 0;
        } else {
//#line 930
          if ((int )cmd->cmnd[0] == 42) {
//#line 933
            mem_27 = cmd->device;
//#line 933
            mem_27->use_10_for_rw = 0U;
//#line 938
            scsi_requeue_command(q, cmd);
//#line 939
            result = 0;
          } else {
//#line 941
            scsi_end_request(cmd, 0, this_count, 1);
//#line 942
            return;
          }
        }
      } else {
//#line 941
        scsi_end_request(cmd, 0, this_count, 1);
//#line 942
        return;
      }
//#line 944
      break;
      case 2: 
//#line 950
      if ((int )sshdr.asc == 4) {
//#line 950
        if ((int )sshdr.ascq == 1) {
//#line 951
          scsi_requeue_command(q, cmd);
//#line 952
          return;
        }
      }
//#line 954
      if (! (req->flags & 8192UL)) {
//#line 955
        mem_28 = cmd->device;
//#line 955
        if (mem_28->sdev_gendev.driver) {
//#line 955
          mem_29 = cmd->device;
//#line 955
          mem_30 = mem_29->sdev_gendev.driver;
//#line 955
          tmp___2 = mem_30->name;
        } else {
//#line 955
          tmp___2 = "";
        }
//#line 955
        mem_31 = cmd->device;
//#line 955
        printk("<6>%s %s: Device not ready.\n", tmp___2, mem_31->sdev_gendev.bus_id);
      }
//#line 958
      scsi_end_request(cmd, 0, this_count, 1);
//#line 959
      return;
      case 13: 
//#line 961
      if (! (req->flags & 8192UL)) {
//#line 962
        mem_32 = cmd->device;
//#line 962
        if (mem_32->sdev_gendev.driver) {
//#line 962
          mem_33 = cmd->device;
//#line 962
          mem_34 = mem_33->sdev_gendev.driver;
//#line 962
          tmp___3 = mem_34->name;
        } else {
//#line 962
          tmp___3 = "";
        }
//#line 962
        mem_35 = cmd->device;
//#line 962
        printk("<6>%s %s: Volume overflow, CDB: ", tmp___3, mem_35->sdev_gendev.bus_id);
//#line 965
        __scsi_print_command(cmd->data_cmnd);
//#line 966
        scsi_print_sense("", cmd);
      }
//#line 968
      scsi_end_request(cmd, 0, (int )block_bytes, 1);
//#line 969
      return;
      default: ;
//#line 971
      break;
      }
    }
  }
//#line 974
  if (((result >> 16) & 255) == 8) {
//#line 980
    scsi_requeue_command(q, cmd);
//#line 981
    return;
  }
//#line 983
  if (result) {
//#line 984
    if (! (req->flags & 8192UL)) {
//#line 985
      mem_36 = cmd->device;
//#line 985
      if (mem_36->sdev_gendev.driver) {
//#line 985
        mem_37 = cmd->device;
//#line 985
        mem_38 = mem_37->sdev_gendev.driver;
//#line 985
        tmp___4 = mem_38->name;
      } else {
//#line 985
        tmp___4 = "";
      }
//#line 985
      mem_39 = cmd->device;
//#line 985
      printk("<6>%s %s: SCSI error: return code = 0x%x\n", tmp___4, mem_39->sdev_gendev.bus_id,
             result);
//#line 988
      if (((result >> 24) & 255) & 8) {
//#line 989
        scsi_print_sense("", cmd);
      }
    }
//#line 996
    block_bytes = req->hard_cur_sectors << 9;
//#line 997
    if (! block_bytes) {
//#line 998
      block_bytes = req->data_len;
    }
//#line 999
    scsi_end_request(cmd, 0, (int )block_bytes, 1);
  }
//#line 1001
  return;
}
}
//#line 1015 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
static int scsi_init_io(struct scsi_cmnd *cmd ) 
{ struct request *req ;
  struct scatterlist *sgpnt ;
  int count ;

  {
//#line 1017
  req = cmd->request;
//#line 1024
  if (req->flags & 1024UL) {
//#line 1024
    if (! req->bio) {
//#line 1025
      cmd->request_bufflen = req->data_len;
//#line 1026
      cmd->request_buffer = req->data;
//#line 1027
      req->buffer = (char *)req->data;
//#line 1028
      cmd->use_sg = (unsigned short)0;
//#line 1029
      return (0);
    }
  }
//#line 1037
  cmd->use_sg = req->nr_phys_segments;
//#line 1042
  sgpnt = scsi_alloc_sgtable(cmd, 32);
//#line 1043
  if (! (! (! sgpnt))) {
//#line 1044
    scsi_unprep_request(req);
//#line 1045
    return (2);
  }
//#line 1048
  cmd->request_buffer = (void *)((char *)sgpnt);
//#line 1049
  cmd->request_bufflen = (unsigned int )(req->nr_sectors << 9);
//#line 1050
  if (req->flags & 1024UL) {
//#line 1051
    cmd->request_bufflen = req->data_len;
  }
//#line 1052
  req->buffer = (char *)((void *)0);
//#line 1058
  count = blk_rq_map_sg(req->q, req, (struct scatterlist *)cmd->request_buffer);
//#line 1063
  if (! (! (count <= (int )cmd->use_sg))) {
//#line 1064
    cmd->use_sg = (unsigned short )count;
//#line 1065
    return (0);
  }
//#line 1068
  printk("<3>Incorrect number of segments after building list\n");
//#line 1069
  printk("<3>counted %d, received %d\n", count, cmd->use_sg);
//#line 1070
  printk("<3>req nr_sec %lu, cur_nr_sec %u\n", req->nr_sectors, req->current_nr_sectors);
//#line 1074
  scsi_release_buffers(cmd);
//#line 1075
  scsi_put_command(cmd);
//#line 1076
  return (1);
}
}
//#line 1079 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
static int scsi_prepare_flush_fn(request_queue_t *q , struct request *rq ) 
{ struct scsi_device *sdev ;
  struct scsi_driver *drv ;
  int tmp ;
  struct gendisk *mem_6 ;
  struct scsi_driver **mem_7 ;
  int (*mem_8)(struct request_queue * , struct request * ) ;

  {
//#line 1081
  sdev = (struct scsi_device *)q->queuedata;
//#line 1084
  if ((int )sdev->sdev_state == 2) {
//#line 1085
    mem_6 = rq->rq_disk;
//#line 1085
    mem_7 = (struct scsi_driver **)mem_6->private_data;
//#line 1085
    drv = (*mem_7);
//#line 1087
    if (drv->prepare_flush) {
//#line 1088
      mem_8 = drv->prepare_flush;
//#line 1088
      tmp = ((*mem_8))(q, rq);
//#line 1088
      return (tmp);
    }
  }
//#line 1091
  return (0);
}
}
//#line 1094 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
static void scsi_end_flush_fn(request_queue_t *q , struct request *rq ) 
{ struct scsi_device *sdev ;
  struct request *flush_rq ;
  struct scsi_driver *drv ;
  struct gendisk *mem_6 ;
  struct scsi_driver **mem_7 ;
  void (*mem_8)(struct request_queue * , struct request * ) ;

  {
//#line 1096
  sdev = (struct scsi_device *)q->queuedata;
//#line 1097
  flush_rq = (struct request *)rq->end_io_data;
//#line 1100
  if (flush_rq->errors) {
//#line 1101
    printk("scsi: barrier error, disabling flush support\n");
//#line 1102
    blk_queue_ordered(q, 0);
  }
//#line 1105
  if ((int )sdev->sdev_state == 2) {
//#line 1106
    mem_6 = rq->rq_disk;
//#line 1106
    mem_7 = (struct scsi_driver **)mem_6->private_data;
//#line 1106
    drv = (*mem_7);
//#line 1107
    mem_8 = drv->end_flush;
//#line 1107
    ((*mem_8))(q, rq);
  }
//#line 1109
  return;
}
}
//#line 1111 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
static int scsi_issue_flush_fn(request_queue_t *q , struct gendisk *disk , sector_t *error_sector ) 
{ struct scsi_device *sdev ;
  struct scsi_driver *drv ;
  int tmp ;
  struct scsi_driver **mem_7 ;
  int (*mem_8)(struct device * , sector_t * ) ;

  {
//#line 1114
  sdev = (struct scsi_device *)q->queuedata;
//#line 1117
  if ((int )sdev->sdev_state != 2) {
//#line 1118
    return (-6);
  }
//#line 1120
  mem_7 = (struct scsi_driver **)disk->private_data;
//#line 1120
  drv = (*mem_7);
//#line 1121
  if (drv->issue_flush) {
//#line 1122
    mem_8 = drv->issue_flush;
//#line 1122
    tmp = ((*mem_8))(& sdev->sdev_gendev, error_sector);
//#line 1122
    return (tmp);
  }
//#line 1124
  return (-95);
}
}
//#line 1127 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
static void scsi_generic_done(struct scsi_cmnd *cmd ) 
{ unsigned int tmp ;
  struct request *mem_3 ;

  {
//#line 1129
  while (1) {
//#line 1129
    mem_3 = cmd->request;
//#line 1129
    if (! (! (! (mem_3->flags & 1024UL) != 0))) {
//#line 1129
      /*__asm__  ("":)*/;
    }
//#line 1129
    break;
  }
//#line 1130
  if (cmd->result == 0) {
//#line 1130
    tmp = cmd->bufflen;
  } else {
//#line 1130
    tmp = 0U;
  }
//#line 1130
  scsi_io_completion(cmd, tmp, 0U);
//#line 1131
  return;
}
}
//#line 1133 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
static int scsi_prep_fn(struct request_queue *q , struct request *req ) 
{ struct scsi_device *sdev ;
  struct scsi_cmnd *cmd ;
  int specials_only ;
  int tmp ;
  struct scsi_request *sreq ;
  struct scsi_driver *drv ;
  int ret ;
  int tmp___0 ;
  struct Scsi_Host *mem_11 ;
  struct Scsi_Host *mem_12 ;
  struct Scsi_Host *mem_13 ;
  struct gendisk *mem_14 ;
  struct scsi_driver **mem_15 ;
  int (*mem_16)(struct scsi_cmnd * ) ;

  {
//#line 1135
  sdev = (struct scsi_device *)q->queuedata;
//#line 1137
  specials_only = 0;
//#line 1144
  tmp = scsi_device_online(sdev);
//#line 1144
  if (! tmp) {
//#line 1145
    mem_11 = sdev->host;
//#line 1145
    printk("<3>scsi%d (%d:%d): rejecting I/O to offline device\n", mem_11->host_no,
           sdev->id, sdev->lun);
    goto kill;
  }
//#line 1149
  if (! (! ((int )sdev->sdev_state != 2))) {
//#line 1152
    if ((int )sdev->sdev_state == 4) {
//#line 1155
      mem_12 = sdev->host;
//#line 1155
      printk("<3>scsi%d (%d:%d): rejecting I/O to dead device\n", mem_12->host_no,
             sdev->id, sdev->lun);
      goto kill;
    }
//#line 1161
    specials_only = (int )sdev->sdev_state;
  }
//#line 1174
  if (req->flags & 16384UL) {
//#line 1174
    if (req->special) {
//#line 1175
      sreq = (struct scsi_request *)req->special;
//#line 1177
      if (sreq->sr_magic == 1979110228) {
//#line 1178
        cmd = scsi_get_command(sreq->sr_device, 32);
//#line 1179
        if (! (! (! cmd))) {
          goto defer;
        }
//#line 1181
        scsi_init_cmd_from_req(cmd, sreq);
      } else {
//#line 1183
        cmd = (struct scsi_cmnd *)req->special;
      }
    } else {
      goto _L;
    }
  } else {
    _L: 
//#line 1184
    if (req->flags & 1040UL) {
//#line 1186
      if (! (! specials_only)) {
//#line 1186
        if (! (req->flags & 16384UL)) {
//#line 1187
          if (specials_only == 5) {
            goto defer;
          } else {
//#line 1187
            if (specials_only == 7) {
              goto defer;
            }
          }
//#line 1191
          mem_13 = sdev->host;
//#line 1191
          printk("<3>scsi%d (%d:%d): rejecting I/O to device being removed\n", mem_13->host_no,
                 sdev->id, sdev->lun);
          goto kill;
        }
      }
//#line 1200
      if (! req->special) {
//#line 1201
        cmd = scsi_get_command(sdev, 32);
//#line 1202
        if (! (! (! cmd))) {
          goto defer;
        }
      } else {
//#line 1205
        cmd = (struct scsi_cmnd *)req->special;
      }
//#line 1208
      cmd->tag = (unsigned char )req->tag;
    } else {
//#line 1210
      blk_dump_rq_flags(req, /*(char *)*/"SCSI bad req");
      goto kill;
    }
  }
//#line 1217
  req->special = (void *)cmd;
//#line 1218
  cmd->request = req;
//#line 1227
  if (req->flags & 1040UL) {
//#line 1248
    ret = scsi_init_io(cmd);
//#line 1249
    switch (ret) {
    case 1: 
    goto kill;
    case 2: 
    goto defer;
    }
//#line 1260
    if (req->rq_disk) {
//#line 1261
      mem_14 = req->rq_disk;
//#line 1261
      mem_15 = (struct scsi_driver **)mem_14->private_data;
//#line 1261
      drv = (*mem_15);
//#line 1262
      mem_16 = drv->init_command;
//#line 1262
      tmp___0 = ((*mem_16))(cmd);
//#line 1262
      if (! tmp___0) {
//#line 1263
        scsi_release_buffers(cmd);
//#line 1264
        scsi_put_command(cmd);
        goto kill;
      }
    } else {
//#line 1268
      __constant_memcpy((void *)(cmd->cmnd), (void const   *)(req->cmd), sizeof(cmd->cmnd));
//#line 1269
      cmd->cmd_len = (unsigned char )req->cmd_len;
//#line 1270
      if ((req->flags & 1UL) == 1UL) {
//#line 1271
        cmd->sc_data_direction = (enum dma_data_direction )1;
      } else {
//#line 1272
        if (req->data_len) {
//#line 1273
          cmd->sc_data_direction = (enum dma_data_direction )2;
        } else {
//#line 1275
          cmd->sc_data_direction = (enum dma_data_direction )3;
        }
      }
//#line 1277
      cmd->transfersize = req->data_len;
//#line 1278
      cmd->allowed = 3;
//#line 1279
      cmd->timeout_per_command = (int )req->timeout;
//#line 1280
      cmd->done = & scsi_generic_done;
    }
  }
//#line 1287
  req->flags |= 128UL;
//#line 1288
  return (0);
  defer: 
//#line 1294
  if (sdev->device_busy == 0U) {
//#line 1295
    blk_plug_device(q);
  }
//#line 1296
  return (2);
  kill: 
//#line 1298
  req->errors = 65536;
//#line 1299
  return (1);
}
}
//#line 1308 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
/*__inline*/ static int ( /*__attribute__((__always_inline__))*/ scsi_dev_queue_ready)(struct request_queue *q ,
                                                                               struct scsi_device *sdev ) 
{ struct Scsi_Host *mem_3 ;

  {
//#line 1311
  if (sdev->device_busy >= (unsigned int )sdev->queue_depth) {
//#line 1312
    return (0);
  }
//#line 1313
  if (sdev->device_busy == 0U) {
//#line 1313
    if (sdev->device_blocked) {
//#line 1317
      sdev->device_blocked --;
//#line 1317
      if (sdev->device_blocked == 0U) {
//#line 1318
        if (! (! (((scsi_logging_level >> 9) & 7U) > 3U))) {
//#line 1318
          mem_3 = sdev->host;
//#line 1318
          printk("scsi%d (%d:%d) unblocking device at zero depth\n", mem_3->host_no,
                 sdev->id, sdev->lun);
        }
      } else {
//#line 1323
        blk_plug_device(q);
//#line 1324
        return (0);
      }
    }
  }
//#line 1327
  if (sdev->device_blocked) {
//#line 1328
    return (0);
  }
//#line 1330
  return (1);
}
}
//#line 1340 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
/*__inline*/ static int ( /*__attribute__((__always_inline__))*/ scsi_host_queue_ready)(struct request_queue *q ,
                                                                                struct Scsi_Host *shost ,
                                                                                struct scsi_device *sdev ) 
{ int tmp ;
  int tmp___0 ;
  int tmp___1 ;

  {
//#line 1344
  tmp = scsi_host_in_recovery(shost);
//#line 1344
  if (tmp) {
//#line 1345
    return (0);
  }
//#line 1346
  if (shost->host_busy == 0U) {
//#line 1346
    if (shost->host_blocked) {
//#line 1350
      shost->host_blocked --;
//#line 1350
      if (shost->host_blocked == 0U) {
//#line 1351
        if (! (! (((scsi_logging_level >> 9) & 7U) > 3U))) {
//#line 1351
          printk("scsi%d unblocking host at zero depth\n", shost->host_no);
        }
      } else {
//#line 1355
        blk_plug_device(q);
//#line 1356
        return (0);
      }
    }
  }
//#line 1359
  if (shost->can_queue > 0) {
//#line 1359
    if (shost->host_busy >= (unsigned int )shost->can_queue) {
      goto _L;
    } else {
      goto _L___0;
    }
  } else {
    _L___0: 
//#line 1359
    if (shost->host_blocked) {
      goto _L;
    } else {
//#line 1359
      if (shost->host_self_blocked) {
        _L: 
//#line 1361
        tmp___0 = list_empty((struct list_head  const  *)(& sdev->starved_entry));
//#line 1361
        if (tmp___0) {
//#line 1362
          list_add_tail(& sdev->starved_entry, & shost->starved_list);
        }
//#line 1363
        return (0);
      }
    }
  }
//#line 1367
  tmp___1 = list_empty((struct list_head  const  *)(& sdev->starved_entry));
//#line 1367
  if (! tmp___1) {
//#line 1368
    list_del_init(& sdev->starved_entry);
  }
//#line 1370
  return (1);
}
}
//#line 1376 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
static void scsi_kill_request(struct request *req , request_queue_t *q ) 
{ struct scsi_cmnd *cmd ;
  struct scsi_device *mem_4 ;

  {
//#line 1378
  cmd = (struct scsi_cmnd *)req->special;
//#line 1380
  blkdev_dequeue_request(req);
//#line 1382
  if (! (! ((unsigned int )cmd == (unsigned int )((void *)0)))) {
//#line 1383
    printk("<2>impossible request in %s.\n", "scsi_kill_request");
//#line 1385
    /*__asm__  ("":)*/;
  }
//#line 1388
  scsi_init_cmd_errh(cmd);
//#line 1389
  cmd->result = 65536;
//#line 1390
  mem_4 = cmd->device;
//#line 1390
  atomic_inc(& mem_4->iorequest_cnt);
//#line 1391
  __scsi_done(cmd);
//#line 1392
  return;
}
}
//#line 1405 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
static void scsi_request_fn(struct request_queue *q ) 
{ struct scsi_device *sdev ;
  struct Scsi_Host *shost ;
  struct scsi_cmnd *cmd ;
  struct request *req ;
  struct device *tmp ;
  int rtn ;
  int tmp___0 ;
  int tmp___1 ;
  int tmp___2 ;
  int tmp___4 ;
  int tmp___5 ;
  struct scsi_target *tmp___6 ;
  struct scsi_target *tmp___7 ;
  struct scsi_target *tmp___8 ;
  int tmp___9 ;
  struct Scsi_Host *mem_19 ;

  {
//#line 1407
  sdev = (struct scsi_device *)q->queuedata;
//#line 1412
  if (! sdev) {
//#line 1413
    printk("scsi: killing requests for dead queue\n");
//#line 1414
    while (1) {
//#line 1414
      req = elv_next_request(q);
//#line 1414
      if (! ((unsigned int )req != (unsigned int )((void *)0))) {
//#line 1414
        break;
      }
//#line 1415
      scsi_kill_request(req, q);
    }
//#line 1416
    return;
  }
//#line 1419
  tmp = get_device(& sdev->sdev_gendev);
//#line 1419
  if (! tmp) {
//#line 1421
    return;
  }
//#line 1427
  shost = sdev->host;
//#line 1428
  while (1) {
//#line 1428
    tmp___9 = constant_test_bit(7, (unsigned long const volatile   *)(& q->queue_flags));
//#line 1428
    if (tmp___9) {
//#line 1428
      break;
    }
//#line 1435
    req = elv_next_request(q);
//#line 1436
    if (! req) {
//#line 1437
      break;
    } else {
//#line 1436
      tmp___0 = scsi_dev_queue_ready(q, sdev);
//#line 1436
      if (! tmp___0) {
//#line 1437
        break;
      }
    }
//#line 1439
    tmp___1 = scsi_device_online(sdev);
//#line 1439
    if (! tmp___1) {
//#line 1440
      mem_19 = sdev->host;
//#line 1440
      printk("<3>scsi%d (%d:%d): rejecting I/O to offline device\n", mem_19->host_no,
             sdev->id, sdev->lun);
//#line 1442
      scsi_kill_request(req, q);
//#line 1443
      continue;
    }
//#line 1450
    tmp___2 = constant_test_bit(1, (unsigned long const volatile   *)(& q->queue_flags));
//#line 1450
    if (tmp___2) {
//#line 1450
      tmp___4 = blk_queue_start_tag(q, req);
//#line 1450
      if (tmp___4) {
//#line 1451
        blkdev_dequeue_request(req);
      }
    } else {
//#line 1451
      blkdev_dequeue_request(req);
    }
//#line 1452
    sdev->device_busy ++;
//#line 1454
    __SLIC_spin_unlock(q->queue_lock);
//#line 1455
    cmd = (struct scsi_cmnd *)req->special;
//#line 1456
    if (! (! ((unsigned int )cmd == (unsigned int )((void *)0)))) {
//#line 1457
      printk("<2>impossible request in %s.\nplease mail a stack trace to linux-scsi@vger.kernel.org",
             "scsi_request_fn");
//#line 1461
      /*__asm__  ("":)*/;
    }
//#line 1463
    __SLIC_spin_lock(shost->host_lock);
//#line 1465
    tmp___5 = scsi_host_queue_ready(q, shost, sdev);
//#line 1465
    if (! tmp___5) {
      goto not_ready;
    }
//#line 1467
    if (sdev->single_lun) {
//#line 1468
      tmp___6 = scsi_target(sdev);
//#line 1468
      if (tmp___6->starget_sdev_user) {
//#line 1468
        tmp___7 = scsi_target(sdev);
//#line 1468
        if ((unsigned int )tmp___7->starget_sdev_user != (unsigned int )sdev) {
          goto not_ready;
        }
      }
//#line 1471
      tmp___8 = scsi_target(sdev);
//#line 1471
      tmp___8->starget_sdev_user = sdev;
    }
//#line 1473
    shost->host_busy ++;
//#line 1479
    __SLIC_spin_unlock_irq(shost->host_lock);
//#line 1485
    scsi_init_cmd_errh(cmd);
//#line 1490
    rtn = scsi_dispatch_cmd(cmd);
//#line 1491
    __SLIC_spin_lock_irq(q->queue_lock);
//#line 1492
    if (rtn) {
//#line 1496
      if (sdev->device_busy == 0U) {
//#line 1497
        blk_plug_device(q);
      }
//#line 1499
      break;
    }
  }
  goto out;
  not_ready: 
//#line 1506
  __SLIC_spin_unlock_irq(shost->host_lock);
//#line 1516
  __SLIC_spin_lock_irq(q->queue_lock);
//#line 1517
  blk_requeue_request(q, req);
//#line 1518
  sdev->device_busy --;
//#line 1519
  if (sdev->device_busy == 0U) {
//#line 1520
    blk_plug_device(q);
  }
  out: 
//#line 1524
  __SLIC_spin_unlock_irq(q->queue_lock);
//#line 1525
  put_device(& sdev->sdev_gendev);
//#line 1526
  __SLIC_spin_lock_irq(q->queue_lock);
//#line 1527
  return;
}
}
//#line 1529 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
u64 scsi_calculate_bounce_limit(struct Scsi_Host *shost ) 
{ struct device *host_dev ;
  u64 bounce_limit ;
  u64 *mem_4 ;

  {
//#line 1532
  bounce_limit = 4294967295ULL;
//#line 1534
  if (shost->unchecked_isa_dma) {
//#line 1535
    return (16777215ULL);
  }
//#line 1543
  host_dev = scsi_get_device(shost);
//#line 1544
  if (host_dev) {
//#line 1544
    if (host_dev->dma_mask) {
//#line 1545
      mem_4 = host_dev->dma_mask;
//#line 1545
      bounce_limit = (*mem_4);
    }
  }
//#line 1547
  return (bounce_limit);
}
}
//#line 1551 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
struct request_queue *scsi_alloc_queue(struct scsi_device *sdev ) 
{ struct Scsi_Host *shost ;
  struct request_queue *q ;
  u64 tmp ;

  {
//#line 1553
  shost = sdev->host;
//#line 1556
  q = blk_init_queue(& scsi_request_fn, (spinlock_t *)((void *)0));
//#line 1557
  if (! q) {
//#line 1558
    return ((struct request_queue *)((void *)0));
  }
//#line 1560
  blk_queue_prep_rq(q, & scsi_prep_fn);
//#line 1562
  blk_queue_max_hw_segments(q, shost->sg_tablesize);
//#line 1563
  blk_queue_max_phys_segments(q, (unsigned short)128);
//#line 1564
  blk_queue_max_sectors(q, shost->max_sectors);
//#line 1565
  tmp = scsi_calculate_bounce_limit(shost);
//#line 1565
  blk_queue_bounce_limit(q, tmp);
//#line 1566
  blk_queue_segment_boundary(q, shost->dma_boundary);
//#line 1567
  blk_queue_issue_flush_fn(q, & scsi_issue_flush_fn);
//#line 1572
  if (shost->ordered_tag) {
//#line 1573
    blk_queue_ordered(q, 1);
  } else {
//#line 1574
    if (shost->ordered_flush) {
//#line 1575
      blk_queue_ordered(q, 2);
//#line 1576
      q->prepare_flush_fn = & scsi_prepare_flush_fn;
//#line 1577
      q->end_flush_fn = & scsi_end_flush_fn;
    }
  }
//#line 1580
  if (! shost->use_clustering) {
//#line 1581
    clear_bit(0, (unsigned long volatile   *)(& q->queue_flags));
  }
//#line 1582
  return (q);
}
}
//#line 1585 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
void scsi_free_queue(struct request_queue *q ) 
{ 

  {
//#line 1587
  blk_cleanup_queue(q);
//#line 1588
  return;
}
}
//#line 1606 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
void scsi_block_requests(struct Scsi_Host *shost ) 
{ 

  {
//#line 1608
  shost->host_self_blocked = 1U;
//#line 1609
  return;
}
}
//#line 1632 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
void scsi_unblock_requests(struct Scsi_Host *shost ) 
{ 

  {
//#line 1634
  shost->host_self_blocked = 0U;
//#line 1635
  scsi_run_host_queues(shost);
//#line 1636
  return;
}
}
//#line 1639
int scsi_init_queue(void)  /*__attribute__((__section__(".init.text")))*/ ;
//#line 1639 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
int scsi_init_queue(void) 
{ int i ;
  struct scsi_host_sg_pool *sgp ;
  int size ;

  {
//#line 1643
  i = 0;
//#line 1643
  while ((unsigned int )i < sizeof(scsi_sg_pools) / sizeof(struct scsi_host_sg_pool )) {
//#line 1644
    sgp = scsi_sg_pools + i;
//#line 1645
    size = (int )(sgp->size * sizeof(struct scatterlist ));
//#line 1647
    sgp->slab = kmem_cache_create((char const   *)sgp->name, (unsigned int )size,
                                  0U, 8192UL, (void (*)(void * , kmem_cache_t * ,
                                                        unsigned long  ))((void *)0),
                                  (void (*)(void * , kmem_cache_t * , unsigned long  ))((void *)0));
//#line 1649
    if (! sgp->slab) {
//#line 1650
      printk("<3>SCSI: can\'t init sg slab %s\n", sgp->name);
    }
//#line 1654
    sgp->pool = mempool_create(32, & mempool_alloc_slab, & mempool_free_slab, (void *)sgp->slab);
//#line 1657
    if (! sgp->pool) {
//#line 1658
      printk("<3>SCSI: can\'t init sg mempool %s\n", sgp->name);
    }
//#line 1643
    i ++;
  }
//#line 1663
  return (0);
}
}
//#line 1666 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
void scsi_exit_queue(void) 
{ int i ;
  struct scsi_host_sg_pool *sgp ;

  {
//#line 1670
  i = 0;
//#line 1670
  while ((unsigned int )i < sizeof(scsi_sg_pools) / sizeof(struct scsi_host_sg_pool )) {
//#line 1671
    sgp = scsi_sg_pools + i;
//#line 1672
    mempool_destroy(sgp->pool);
//#line 1673
    kmem_cache_destroy(sgp->slab);
//#line 1670
    i ++;
  }
//#line 1675
  return;
}
}
//#line 1694 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
int scsi_mode_sense(struct scsi_device *sdev , int dbd , int modepage , unsigned char *buffer ,
                    int len , int timeout , int retries , struct scsi_mode_data *data ,
                    struct scsi_sense_hdr *sshdr ) 
{ unsigned char cmd[12] ;
  int use_10_for_ms ;
  int header_length ;
  int result ;
  struct scsi_sense_hdr my_sshdr ;
  int tmp ;
  int tmp___0 ;
  int tmp___1 ;
  unsigned char *mem_18 ;
  unsigned char *mem_19 ;
  unsigned char *mem_20 ;
  unsigned char *mem_21 ;
  unsigned char *mem_22 ;
  unsigned char *mem_23 ;
  unsigned char *mem_24 ;
  unsigned char *mem_25 ;
  unsigned char *mem_26 ;
  unsigned char *mem_27 ;
  unsigned char *mem_28 ;

  {
//#line 1704
  __constant_c_and_count_memset((void *)data, 0UL, sizeof((*data)));
//#line 1705
  __constant_c_and_count_memset((void *)(cmd), 0UL, 12U);
//#line 1706
  cmd[1] = (unsigned char )(dbd & 24);
//#line 1707
  cmd[2] = (unsigned char )modepage;
//#line 1710
  if (! sshdr) {
//#line 1711
    sshdr = & my_sshdr;
  }
  retry: 
//#line 1714
  use_10_for_ms = (int )sdev->use_10_for_ms;
//#line 1716
  if (use_10_for_ms) {
//#line 1717
    if (len < 8) {
//#line 1718
      len = 8;
    }
//#line 1720
    cmd[0] = (unsigned char)90;
//#line 1721
    cmd[8] = (unsigned char )len;
//#line 1722
    header_length = 8;
  } else {
//#line 1724
    if (len < 4) {
//#line 1725
      len = 4;
    }
//#line 1727
    cmd[0] = (unsigned char)26;
//#line 1728
    cmd[4] = (unsigned char )len;
//#line 1729
    header_length = 4;
  }
//#line 1732
  __constant_c_memset((void *)buffer, 0UL, (unsigned int )len);
//#line 1734
  result = scsi_execute_req(sdev, (unsigned char const   *)(cmd), 2, (void *)buffer,
                            (unsigned int )len, sshdr, timeout, retries);
//#line 1742
  if (use_10_for_ms) {
//#line 1742
    tmp___0 = scsi_status_is_good(result);
//#line 1742
    if (! tmp___0) {
//#line 1742
      if (((result >> 24) & 255) & 8) {
//#line 1744
        tmp = scsi_sense_valid(sshdr);
//#line 1744
        if (tmp) {
//#line 1745
          if ((int )sshdr->sense_key == 5) {
//#line 1745
            if ((int )sshdr->asc == 32) {
//#line 1745
              if ((int )sshdr->ascq == 0) {
//#line 1750
                sdev->use_10_for_ms = 0U;
                goto retry;
              }
            }
          }
        }
      }
    }
  }
//#line 1756
  tmp___1 = scsi_status_is_good(result);
//#line 1756
  if (tmp___1) {
//#line 1757
    data->header_length = (unsigned char )header_length;
//#line 1758
    if (use_10_for_ms) {
//#line 1759
      mem_18 = buffer + 0;
//#line 1759
      mem_19 = buffer + 1;
//#line 1759
      data->length = (unsigned int )(((int )(*mem_18) * 256 + (int )(*mem_19)) + 2);
//#line 1760
      mem_20 = buffer + 2;
//#line 1760
      data->medium_type = (*mem_20);
//#line 1761
      mem_21 = buffer + 3;
//#line 1761
      data->device_specific = (*mem_21);
//#line 1762
      mem_22 = buffer + 4;
//#line 1762
      data->longlba = (unsigned char )((int )(*mem_22) & 1);
//#line 1763
      mem_23 = buffer + 6;
//#line 1763
      mem_24 = buffer + 7;
//#line 1763
      data->block_descriptor_length = (unsigned short )((int )(*mem_23) * 256 + (int )(*mem_24));
    } else {
//#line 1766
      mem_25 = buffer + 0;
//#line 1766
      data->length = (unsigned int )((int )(*mem_25) + 1);
//#line 1767
      mem_26 = buffer + 1;
//#line 1767
      data->medium_type = (*mem_26);
//#line 1768
      mem_27 = buffer + 2;
//#line 1768
      data->device_specific = (*mem_27);
//#line 1769
      mem_28 = buffer + 3;
//#line 1769
      data->block_descriptor_length = (unsigned short )(*mem_28);
    }
  }
//#line 1773
  return (result);
}
}
//#line 1777 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
int scsi_test_unit_ready(struct scsi_device *sdev , int timeout , int retries ) 
{ char cmd[6] ;
  struct scsi_sense_hdr sshdr ;
  int result ;
  int tmp ;

  {
//#line 1780
  cmd[0] = (char)0;
//#line 1780
  cmd[1] = (char)0;
//#line 1780
  cmd[2] = (char)0;
//#line 1780
  cmd[3] = (char)0;
//#line 1780
  cmd[4] = (char)0;
//#line 1780
  cmd[5] = (char)0;
//#line 1786
  result = scsi_execute_req(sdev, (unsigned char const   *)(cmd), 3, (void *)0, 0U,
                            & sshdr, timeout, retries);
//#line 1789
  if (((result >> 24) & 255) & 8) {
//#line 1789
    if (sdev->removable) {
//#line 1791
      tmp = scsi_sense_valid(& sshdr);
//#line 1791
      if (tmp) {
//#line 1791
        if ((int )sshdr.sense_key == 6) {
//#line 1794
          sdev->changed = 1U;
//#line 1795
          result = 0;
        } else {
//#line 1791
          if ((int )sshdr.sense_key == 2) {
//#line 1794
            sdev->changed = 1U;
//#line 1795
            result = 0;
          }
        }
      }
    }
  }
//#line 1798
  return (result);
}
}
//#line 1811 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
int scsi_device_set_state(struct scsi_device *sdev , enum scsi_device_state state ) 
{ enum scsi_device_state oldstate ;
  char const   *tmp ;
  char const   *tmp___0 ;
  char const   *tmp___1 ;
  struct device_driver *mem_7 ;

  {
//#line 1814
  oldstate = sdev->sdev_state;
//#line 1816
  if ((int )state == (int )oldstate) {
//#line 1817
    return (0);
  }
//#line 1819
  switch ((int )state) {
  case 1: 
  goto illegal;
  case 2: 
//#line 1827
  switch ((int )oldstate) {
  case 1: 
  case 6: 
  case 5: 
  case 7: 
//#line 1832
  break;
  default: ;
  goto illegal;
  }
//#line 1836
  break;
  case 5: 
//#line 1839
  switch ((int )oldstate) {
  case 2: 
  case 6: 
//#line 1842
  break;
  default: ;
  goto illegal;
  }
//#line 1846
  break;
  case 6: 
//#line 1849
  switch ((int )oldstate) {
  case 1: 
  case 2: 
  case 5: 
  case 7: 
//#line 1854
  break;
  default: ;
  goto illegal;
  }
//#line 1858
  break;
  case 7: 
//#line 1861
  switch ((int )oldstate) {
  case 1: 
  case 2: 
//#line 1864
  break;
  default: ;
  goto illegal;
  }
//#line 1868
  break;
  case 3: 
//#line 1871
  switch ((int )oldstate) {
  case 1: 
  case 2: 
  case 6: 
  case 7: 
//#line 1876
  break;
  default: ;
  goto illegal;
  }
//#line 1880
  break;
  case 4: 
//#line 1883
  switch ((int )oldstate) {
  case 3: 
//#line 1885
  break;
  default: ;
  goto illegal;
  }
//#line 1889
  break;
  }
//#line 1892
  sdev->sdev_state = state;
//#line 1893
  return (0);
  illegal: 
//#line 1896
  if (! (! ((scsi_logging_level & 7U) > 1U))) {
//#line 1896
    tmp = scsi_device_state_name(state);
//#line 1896
    tmp___0 = scsi_device_state_name(oldstate);
//#line 1896
    if (sdev->sdev_gendev.driver) {
//#line 1896
      mem_7 = sdev->sdev_gendev.driver;
//#line 1896
      tmp___1 = mem_7->name;
    } else {
//#line 1896
      tmp___1 = "";
    }
//#line 1896
    printk("<3>%s %s: Illegal state transition %s->%s\n", tmp___1, sdev->sdev_gendev.bus_id,
           tmp___0, tmp);
  }
//#line 1902
  return (-22);
}
}
//#line 1921 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
int scsi_device_quiesce(struct scsi_device *sdev ) 
{ int err ;
  int tmp ;

  {
//#line 1924
  tmp = scsi_device_set_state(sdev, (enum scsi_device_state )5);
//#line 1924
  err = tmp;
//#line 1925
  if (err) {
//#line 1926
    return (err);
  }
//#line 1928
  scsi_run_queue(sdev->request_queue);
//#line 1929
  while (sdev->device_busy) {
//#line 1930
    msleep_interruptible(200U);
//#line 1931
    scsi_run_queue(sdev->request_queue);
  }
//#line 1933
  return (0);
}
}
//#line 1946 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
void scsi_device_resume(struct scsi_device *sdev ) 
{ int tmp ;

  {
//#line 1949
  tmp = scsi_device_set_state(sdev, (enum scsi_device_state )2);
//#line 1949
  if (tmp) {
//#line 1950
    return;
  }
//#line 1951
  scsi_run_queue(sdev->request_queue);
//#line 1952
  return;
}
}
//#line 1955 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
static void device_quiesce_fn(struct scsi_device *sdev , void *data ) 
{ 

  {
//#line 1958
  scsi_device_quiesce(sdev);
//#line 1959
  return;
}
}
//#line 1961 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
void scsi_target_quiesce(struct scsi_target *starget ) 
{ 

  {
//#line 1964
  starget_for_each_device(starget, (void *)0, & device_quiesce_fn);
//#line 1965
  return;
}
}
//#line 1968 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
static void device_resume_fn(struct scsi_device *sdev , void *data ) 
{ 

  {
//#line 1971
  scsi_device_resume(sdev);
//#line 1972
  return;
}
}
//#line 1974 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
void scsi_target_resume(struct scsi_target *starget ) 
{ 

  {
//#line 1977
  starget_for_each_device(starget, (void *)0, & device_resume_fn);
//#line 1978
  return;
}
}
//#line 1999 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
int scsi_internal_device_block(struct scsi_device *sdev ) 
{ request_queue_t *q ;
  unsigned long flags ;
  int err ;

  {
//#line 2002
  q = sdev->request_queue;
//#line 2004
  err = 0;
//#line 2006
  err = scsi_device_set_state(sdev, (enum scsi_device_state )7);
//#line 2007
  if (err) {
//#line 2008
    return (err);
  }
//#line 2015
  __SLIC_spin_lock_irqsave(q->queue_lock, flags);
//#line 2016
  blk_stop_queue(q);
//#line 2017
  __SLIC_spin_unlock_irqrestore(q->queue_lock, flags);
//#line 2019
  return (0);
}
}
//#line 2039 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
int scsi_internal_device_unblock(struct scsi_device *sdev ) 
{ request_queue_t *q ;
  int err ;
  unsigned long flags ;

  {
//#line 2042
  q = sdev->request_queue;
//#line 2050
  err = scsi_device_set_state(sdev, (enum scsi_device_state )2);
//#line 2051
  if (err) {
//#line 2052
    return (err);
  }
//#line 2054
  __SLIC_spin_lock_irqsave(q->queue_lock, flags);
//#line 2055
  blk_start_queue(q);
//#line 2056
  __SLIC_spin_unlock_irqrestore(q->queue_lock, flags);
//#line 2058
  return (0);
}
}
//#line 2062 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
static void device_block(struct scsi_device *sdev , void *data ) 
{ 

  {
//#line 2065
  scsi_internal_device_block(sdev);
//#line 2066
  return;
}
}
//#line 2068 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
static int target_block(struct device *dev , void *data ) 
{ struct device  const  *__mptr ;
  int tmp ;
  struct scsi_target *mem_5 ;

  {
//#line 2071
  tmp = scsi_is_target_device((struct device  const  *)dev);
//#line 2071
  if (tmp) {
//#line 2072
    __mptr = (struct device  const  *)dev;
//#line 2072
    mem_5 = (struct scsi_target *)0;
//#line 2072
    starget_for_each_device((struct scsi_target *)((char *)__mptr - (unsigned int )(& mem_5->dev)),
                            (void *)0, & device_block);
  }
//#line 2074
  return (0);
}
}
//#line 2077 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
void scsi_target_block(struct device *dev ) 
{ struct device  const  *__mptr ;
  int tmp ;
  struct scsi_target *mem_4 ;

  {
//#line 2080
  tmp = scsi_is_target_device((struct device  const  *)dev);
//#line 2080
  if (tmp) {
//#line 2081
    __mptr = (struct device  const  *)dev;
//#line 2081
    mem_4 = (struct scsi_target *)0;
//#line 2081
    starget_for_each_device((struct scsi_target *)((char *)__mptr - (unsigned int )(& mem_4->dev)),
                            (void *)0, & device_block);
  } else {
//#line 2084
    device_for_each_child(dev, (void *)0, & target_block);
  }
//#line 2085
  return;
}
}
//#line 2088 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
static void device_unblock(struct scsi_device *sdev , void *data ) 
{ 

  {
//#line 2091
  scsi_internal_device_unblock(sdev);
//#line 2092
  return;
}
}
//#line 2094 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
static int target_unblock(struct device *dev , void *data ) 
{ struct device  const  *__mptr ;
  int tmp ;
  struct scsi_target *mem_5 ;

  {
//#line 2097
  tmp = scsi_is_target_device((struct device  const  *)dev);
//#line 2097
  if (tmp) {
//#line 2098
    __mptr = (struct device  const  *)dev;
//#line 2098
    mem_5 = (struct scsi_target *)0;
//#line 2098
    starget_for_each_device((struct scsi_target *)((char *)__mptr - (unsigned int )(& mem_5->dev)),
                            (void *)0, & device_unblock);
  }
//#line 2100
  return (0);
}
}
//#line 2103 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_lib.c"
void scsi_target_unblock(struct device *dev ) 
{ struct device  const  *__mptr ;
  int tmp ;
  struct scsi_target *mem_4 ;

  {
//#line 2106
  tmp = scsi_is_target_device((struct device  const  *)dev);
//#line 2106
  if (tmp) {
//#line 2107
    __mptr = (struct device  const  *)dev;
//#line 2107
    mem_4 = (struct scsi_target *)0;
//#line 2107
    starget_for_each_device((struct scsi_target *)((char *)__mptr - (unsigned int )(& mem_4->dev)),
                            (void *)0, & device_unblock);
  } else {
//#line 2110
    device_for_each_child(dev, (void *)0, & target_unblock);
  }
//#line 2111
  return;
}
}
//#line 1 "scsi.cil.o"
//#pragma merger(0,"./scsi.cil.i","")
//#line 8 "include//*asm*/-generic/percpu.h"
extern unsigned long __per_cpu_offset[8] ;
//#line 682 "include//*asm*//processor.h"
/*__inline*/ static void ( /*__attribute__((__always_inline__))*/ prefetch)(void const   *x ) 
{ 

  {
//#line 684
  /*__asm__  ("":)*/;
//#line 688
  return;
}
}
//#line 88 "include//*asm*//thread_info.h"
/*__inline*/ static struct thread_info *( /*__attribute__((__always_inline__))*/ current_thread_info)(void) 
{ struct thread_info *ti ;

  {
//#line 92
  return (ti);
}
}
//#line 65 "include/linux/list.h"
/*__inline*/ static void ( /*__attribute__((__always_inline__))*/ list_add)(struct list_head *new ,
                                                                    struct list_head *head ) 
{ 

  {
//#line 67
  __list_add(new, head, head->next);
//#line 68
  return;
}
}
//#line 273 "include/linux/list.h"
/*__inline*/ static void ( /*__attribute__((__always_inline__))*/ __list_splice)(struct list_head *list ,
                                                                         struct list_head *head ) 
{ struct list_head *first ;
  struct list_head *last ;
  struct list_head *at ;

  {
//#line 276
  first = list->next;
//#line 277
  last = list->prev;
//#line 278
  at = head->next;
//#line 280
  first->prev = head;
//#line 281
  head->next = first;
//#line 283
  last->next = at;
//#line 284
  at->prev = last;
//#line 285
  return;
}
}
//#line 305 "include/linux/list.h"
/*__inline*/ static void ( /*__attribute__((__always_inline__))*/ list_splice_init)(struct list_head *list ,
                                                                            struct list_head *head ) 
{ int tmp ;

  {
//#line 308
  tmp = list_empty((struct list_head  const  *)list);
//#line 308
  if (! tmp) {
//#line 309
    __list_splice(list, head);
//#line 310
    while (1) {
//#line 310
      list->next = list;
//#line 310
      list->prev = list;
//#line 310
      break;
    }
  }
//#line 312
  return;
}
}
//#line 100 "include//*asm*//semaphore.h"
/*__inline*/ static void ( /*__attribute__((__always_inline__))*/ down)(struct semaphore *sem ) 
{ 

  {
//#line 102
  while (1) {
//#line 102
    __might_sleep(/*(char *)*/"include//*asm*//semaphore.h", 102);
//#line 102
    while (1) {
//#line 102
      break;
    }
//#line 102
    break;
  }
//#line 103
  /*__asm__  ("":)*/;
//#line 116
  return;
}
}
//#line 175 "include//*asm*//semaphore.h"
/*__inline*/ static void ( /*__attribute__((__always_inline__))*/ up)(struct semaphore *sem ) 
{ 

  {
//#line 177
  /*__asm__  ("":)*/;
//#line 191
  return;
}
}
//#line 65 "include/linux/slab.h"
extern void kmem_cache_free(kmem_cache_t * , void * ) ;
//#line 979 "include/linux/sched.h"
extern int ( /*__attribute__((__regparm__(3)))*/ wake_up_process)(struct task_struct *tsk ) ;
//#line 16 "include//*asm*//local.h"
/*__inline*/ static void ( /*__attribute__((__always_inline__))*/ local_inc)(local_t *v ) 
{ 

  {
//#line 18
  /*__asm__  ("":)*/;
//#line 22
  return;
}
}
//#line 321 "include/linux/module.h"
/*__inline*/ static int ( /*__attribute__((__always_inline__))*/ module_is_live)(struct module *mod ) 
{ 

  {
//#line 323
  return ((int )mod->state != 2);
}
}
//#line 363 "include/linux/module.h"
/*__inline*/ static int ( /*__attribute__((__always_inline__))*/ try_module_get)(struct module *module ) 
{ int ret ;
  unsigned int cpu ;
  struct thread_info *tmp ;
  int tmp___0 ;

  {
//#line 365
  ret = 1;
//#line 367
  if (module) {
//#line 368
    while (1) {
//#line 368
      break;
    }
//#line 368
    tmp = current_thread_info();
//#line 368
    cpu = tmp->cpu;
//#line 369
    tmp___0 = module_is_live(module);
//#line 369
    if (tmp___0) {
//#line 370
      local_inc(& module->ref[cpu].count);
    } else {
//#line 372
      ret = 0;
    }
//#line 373
    while (1) {
//#line 373
      break;
    }
  }
//#line 375
  return (ret);
}
}
//#line 378 "include/linux/module.h"
/*__inline*/ static void ( /*__attribute__((__always_inline__))*/ module_put)(struct module *module ) 
{ unsigned int cpu ;
  struct thread_info *tmp ;
  int tmp___0 ;

  {
//#line 380
  if (module) {
//#line 381
    while (1) {
//#line 381
      break;
    }
//#line 381
    tmp = current_thread_info();
//#line 381
    cpu = tmp->cpu;
//#line 382
    local_inc(& module->ref[cpu].count);
//#line 384
    tmp___0 = module_is_live(module);
//#line 384
    if (! tmp___0) {
//#line 385
      wake_up_process(module->waiter);
    }
//#line 386
    while (1) {
//#line 386
      break;
    }
  }
//#line 388
  return;
}
}
//#line 132 "include/linux/interrupt.h"
extern void ( /*__attribute__((__regparm__(3)))*/ raise_softirq_irqoff)(unsigned int nr ) ;
//#line 672 "include/linux/blkdev.h"
extern int blk_queue_resize_tags(request_queue_t * , int  ) ;
//#line 43 "include/linux/devfs_fs_kernel.h"
/*__inline*/ static void ( /*__attribute__((__always_inline__))*/ devfs_remove)(char const   *fmt 
                                                                        , ...) 
{ 

  {
//#line 45
  return;
}
}
//#line 43 "include/linux/cpu.h"
extern void unregister_cpu_notifier(struct notifier_block *nb ) ;
//#line 32 "include/scsi/scsi.h"
char const   * const  scsi_device_types[15] ;
//#line 8 "include/scsi/scsi_dbg.h"
extern void scsi_print_command(struct scsi_cmnd * ) ;
//#line 185 "include/scsi/scsi_device.h"
int scsi_device_cancel(struct scsi_device *sdev , int recovery ) ;
//#line 189
struct scsi_device *scsi_device_lookup(struct Scsi_Host *shost , uint channel , uint id ,
                                       uint lun ) ;
//#line 191
struct scsi_device *__scsi_device_lookup(struct Scsi_Host *shost , uint channel ,
                                         uint id , uint lun ) ;
//#line 193
struct scsi_device *scsi_device_lookup_by_target(struct scsi_target *starget , uint lun ) ;
//#line 195
struct scsi_device *__scsi_device_lookup_by_target(struct scsi_target *starget , uint lun ) ;
//#line 234
void scsi_adjust_queue_depth(struct scsi_device *sdev , int tagged , int tags ) ;
//#line 235
int scsi_track_queue_full(struct scsi_device *sdev , int depth ) ;
//#line 612 "include/scsi/scsi_host.h"
extern int scsi_is_host_device(struct device  const  * ) ;
//#line 614 "include/scsi/scsi_host.h"
/*__inline*/ static struct Scsi_Host *( /*__attribute__((__always_inline__))*/ dev_to_shost)(struct device *dev ) 
{ int tmp ;
  struct device  const  *__mptr ;
  struct Scsi_Host *mem_4 ;

  {
//#line 616
  while (1) {
//#line 616
    tmp = scsi_is_host_device((struct device  const  *)dev);
//#line 616
    if (tmp) {
//#line 616
      break;
    }
//#line 617
    if (! dev->parent) {
//#line 618
      return ((struct Scsi_Host *)((void *)0));
    }
//#line 619
    dev = dev->parent;
  }
//#line 621
  __mptr = (struct device  const  *)dev;
//#line 621
  mem_4 = (struct Scsi_Host *)0;
//#line 621
  return ((struct Scsi_Host *)((char *)__mptr - (unsigned int )(& mem_4->shost_gendev)));
}
}
//#line 48 "include/scsi/scsi_request.h"
struct scsi_request *scsi_allocate_request(struct scsi_device *sdev , int gfp_mask ) ;
//#line 49
void scsi_release_request(struct scsi_request *sreq ) ;
//#line 38 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_priv.h"
extern void scsi_exit_hosts(void) ;
//#line 42
int scsi_setup_command_freelist(struct Scsi_Host *shost ) ;
//#line 43
void scsi_destroy_command_freelist(struct Scsi_Host *shost ) ;
//#line 50
void scsi_log_send(struct scsi_cmnd *cmd ) ;
//#line 51
void scsi_log_completion(struct scsi_cmnd *cmd , int disposition ) ;
//#line 63
extern void scsi_exit_devinfo(void) ;
//#line 66
extern void scsi_add_timer(struct scsi_cmnd * , int  , void /*(*)*/(*__perl_script_tmp)(struct scsi_cmnd * ) ) ;
//#line 68
extern int scsi_delete_timer(struct scsi_cmnd * ) ;
//#line 69
extern void scsi_times_out(struct scsi_cmnd *cmd ) ;
//#line 73
extern int scsi_eh_scmd_add(struct scsi_cmnd * , int  ) ;
//#line 94
extern void scsi_exit_procfs(void) ;
//#line 113
extern void scsi_exit_sysctl(void) ;
//#line 123
extern void scsi_sysfs_unregister(void) ;
//#line 40 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi_logging.h"
unsigned int scsi_logging_level  ;
//#line 71 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi.c"
static void scsi_done(struct scsi_cmnd *cmd ) ;
//#line 101 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi.c"
char const   * const  scsi_device_types[15]  = 
//#line 101
  {      /*(char const   * const  )*/"Direct-Access    ",      /*(char const   * const  )*/"Sequential-Access",      /*(char const   * const  )*/"Printer          ",      /*(char const   * const  )*/"Processor        ", 
        /*(char const   * const  )*/"WORM             ",      /*(char const   * const  )*/"CD-ROM           ",      /*(char const   * const  )*/"Scanner          ",      /*(char const   * const  )*/"Optical Device   ", 
        /*(char const   * const  )*/"Medium Changer   ",      /*(char const   * const  )*/"Communications   ",      /*(char const   * const  )*/"Unknown          ",      /*(char const   * const  )*/"Unknown          ", 
        /*(char const   * const  )*/"RAID             ",      /*(char const   * const  )*/"Enclosure        ",      /*(char const   * const  )*/"Direct-Access-RBC"};
//#line 132 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi.c"
struct scsi_request *scsi_allocate_request(struct scsi_device *sdev , int gfp_mask ) 
{ int offset ;
  int size ;
  struct scsi_request *sreq ;

  {
//#line 135
  offset = (int )(((sizeof(struct scsi_request ) + 4U) - 1U) & 4294967292U);
//#line 136
  size = (int )((unsigned int )offset + sizeof(struct request ));
//#line 139
  sreq = (struct scsi_request *)kmalloc((unsigned int )size, (unsigned int )gfp_mask);
//#line 140
  if (! (! ((unsigned int )sreq != (unsigned int )((void *)0)))) {
//#line 141
    __constant_c_memset((void *)sreq, 0UL, (unsigned int )size);
//#line 142
    sreq->sr_request = (struct request *)((char *)sreq + offset);
//#line 143
    sreq->sr_device = sdev;
//#line 144
    sreq->sr_host = sdev->host;
//#line 145
    sreq->sr_magic = 1979110228;
//#line 146
    sreq->sr_data_direction = (enum dma_data_direction )0;
  }
//#line 149
  return (sreq);
}
}
//#line 154 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi.c"
void __scsi_release_request(struct scsi_request *sreq ) 
{ struct request *req ;
  unsigned long flags ;
  struct request_queue *q ;
  struct scsi_cmnd *cmd ;

  {
//#line 156
  req = sreq->sr_request;
//#line 161
  if (! (! (req->flags & 256UL))) {
//#line 163
    q = req->q;
//#line 165
    __SLIC_spin_lock_irqsave(q->queue_lock, flags);
//#line 166
    blk_queue_end_tag(q, req);
//#line 167
    __SLIC_spin_unlock_irqrestore(q->queue_lock, flags);
  }
//#line 171
  if (! (! ((unsigned int )sreq->sr_command != (unsigned int )((void *)0)))) {
//#line 172
    cmd = sreq->sr_command;
//#line 174
    sreq->sr_command = (struct scsi_cmnd *)((void *)0);
//#line 175
    scsi_next_command(cmd);
  }
//#line 177
  return;
}
}
//#line 188 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi.c"
void scsi_release_request(struct scsi_request *sreq ) 
{ 

  {
//#line 190
  __scsi_release_request(sreq);
//#line 191
  kfree((void const   *)sreq);
//#line 192
  return;
}
}
//#line 203 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi.c"
static struct scsi_host_cmd_pool scsi_cmd_pool  =    {(kmem_cache_t *)0, 0U, /*(char *)*/"scsi_cmd_cache", 8192U, 0U};
//#line 208 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi.c"
static struct scsi_host_cmd_pool scsi_cmd_dma_pool  =    {(kmem_cache_t *)0, 0U, /*(char *)*/"scsi_cmd_cache(DMA)", 24576U, 1U};
//#line 214 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi.c"
static struct semaphore host_cmd_pool_mutex  =    {{(int volatile   )1}, 0, {{{(unsigned int volatile   )1}, 3735899821U, 4294967295U,
                               (void *)-1L}, {& host_cmd_pool_mutex.wait.task_list,
                                              & host_cmd_pool_mutex.wait.task_list}}};
//#line 216 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi.c"
static struct scsi_cmnd *__scsi_get_command(struct Scsi_Host *shost , int gfp_mask ) 
{ struct scsi_cmnd *cmd ;
  unsigned long flags ;
  struct list_head  const  *__mptr ;
  int tmp ;
  struct scsi_host_cmd_pool *mem_7 ;
  struct scsi_host_cmd_pool *mem_8 ;
  struct scsi_cmnd *mem_9 ;

  {
//#line 221
  mem_7 = shost->cmd_pool;
//#line 221
  mem_8 = shost->cmd_pool;
//#line 221
  cmd = (struct scsi_cmnd *)kmem_cache_alloc(mem_7->slab, (unsigned int )gfp_mask | mem_8->gfp_mask);
//#line 224
  if (! (! (! cmd))) {
//#line 227
    __SLIC_spin_lock_irqsave(& shost->free_list_lock, flags);
//#line 228
    tmp = list_empty((struct list_head  const  *)(& shost->free_list));
//#line 228
    if (! tmp) {
//#line 229
      __mptr = (struct list_head  const  *)shost->free_list.next;
//#line 229
      mem_9 = (struct scsi_cmnd *)0;
//#line 229
      cmd = (struct scsi_cmnd *)((char *)__mptr - (unsigned int )(& mem_9->list));
//#line 231
      list_del_init(& cmd->list);
    }
//#line 233
    __SLIC_spin_unlock_irqrestore(& shost->free_list_lock, flags);
  }
//#line 236
  return (cmd);
}
}
//#line 249 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi.c"
struct scsi_cmnd *scsi_get_command(struct scsi_device *dev , int gfp_mask ) 
{ struct scsi_cmnd *cmd ;
  struct device *tmp ;
  unsigned long flags ;

  {
//#line 254
  tmp = get_device(& dev->sdev_gendev);
//#line 254
  if (! tmp) {
//#line 255
    return ((struct scsi_cmnd *)((void *)0));
  }
//#line 257
  cmd = __scsi_get_command(dev->host, gfp_mask);
//#line 259
  if (! (! ((unsigned int )cmd != (unsigned int )((void *)0)))) {
//#line 262
    __constant_c_and_count_memset((void *)cmd, 0UL, sizeof((*cmd)));
//#line 263
    cmd->device = dev;
//#line 264
    init_timer(& cmd->eh_timeout);
//#line 265
    while (1) {
//#line 265
      cmd->list.next = & cmd->list;
//#line 265
      cmd->list.prev = & cmd->list;
//#line 265
      break;
    }
//#line 266
    __SLIC_spin_lock_irqsave(& dev->list_lock, flags);
//#line 267
    list_add_tail(& cmd->list, & dev->cmd_list);
//#line 268
    __SLIC_spin_unlock_irqrestore(& dev->list_lock, flags);
  } else {
//#line 270
    put_device(& dev->sdev_gendev);
  }
//#line 272
  cmd->jiffies_at_alloc = (unsigned long )jiffies;
//#line 273
  return (cmd);
}
}
//#line 288 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi.c"
void scsi_put_command(struct scsi_cmnd *cmd ) 
{ struct scsi_device *sdev ;
  struct Scsi_Host *shost ;
  unsigned long flags ;
  int tmp ;
  int tmp___0 ;
  struct scsi_device *mem_7 ;
  struct scsi_device *mem_8 ;
  struct scsi_host_cmd_pool *mem_9 ;

  {
//#line 290
  sdev = cmd->device;
//#line 291
  shost = sdev->host;
//#line 295
  mem_7 = cmd->device;
//#line 295
  __SLIC_spin_lock_irqsave(& mem_7->list_lock, flags);
//#line 296
  while (1) {
//#line 296
    tmp = list_empty((struct list_head  const  *)(& cmd->list));
//#line 296
    if (tmp != 0) {
//#line 296
      /*__asm__  ("":)*/;
    }
//#line 296
    break;
  }
//#line 297
  list_del_init(& cmd->list);
//#line 298
  mem_8 = cmd->device;
//#line 298
  __SLIC_spin_unlock(& mem_8->list_lock);
//#line 300
  __SLIC_spin_lock(& shost->free_list_lock);
//#line 301
  tmp___0 = list_empty((struct list_head  const  *)(& shost->free_list));
//#line 301
  if (tmp___0) {
//#line 302
    list_add(& cmd->list, & shost->free_list);
//#line 303
    cmd = (struct scsi_cmnd *)((void *)0);
  }
//#line 305
  __SLIC_spin_unlock_irqrestore(& shost->free_list_lock, flags);
//#line 307
  if (! (! ((unsigned int )cmd != (unsigned int )((void *)0)))) {
//#line 308
    mem_9 = shost->cmd_pool;
//#line 308
    kmem_cache_free(mem_9->slab, (void *)cmd);
  }
//#line 310
  put_device(& sdev->sdev_gendev);
//#line 311
  return;
}
}
//#line 323 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi.c"
int scsi_setup_command_freelist(struct Scsi_Host *shost ) 
{ struct scsi_host_cmd_pool *pool ;
  struct scsi_cmnd *cmd ;
  struct scsi_host_cmd_pool *mem_4 ;
  struct scsi_host_cmd_pool *mem_5 ;

  {
//#line 328
  __SLIC_spin_lock_init(& shost->free_list_lock);
//#line 329
  while (1) {
//#line 329
    shost->free_list.next = & shost->free_list;
//#line 329
    shost->free_list.prev = & shost->free_list;
//#line 329
    break;
  }
//#line 335
  down(& host_cmd_pool_mutex);
//#line 336
  if (shost->unchecked_isa_dma) {
//#line 336
    pool = & scsi_cmd_dma_pool;
  } else {
//#line 336
    pool = & scsi_cmd_pool;
  }
//#line 337
  if (! pool->users) {
//#line 338
    pool->slab = kmem_cache_create((char const   *)pool->name, sizeof(struct scsi_cmnd ),
                                   0U, (unsigned long )pool->slab_flags, (void (*)(void * ,
                                                                                   kmem_cache_t * ,
                                                                                   unsigned long  ))((void *)0),
                                   (void (*)(void * , kmem_cache_t * , unsigned long  ))((void *)0));
//#line 341
    if (! pool->slab) {
      goto fail;
    }
  }
//#line 345
  pool->users ++;
//#line 346
  shost->cmd_pool = pool;
//#line 347
  up(& host_cmd_pool_mutex);
//#line 352
  mem_4 = shost->cmd_pool;
//#line 352
  mem_5 = shost->cmd_pool;
//#line 352
  cmd = (struct scsi_cmnd *)kmem_cache_alloc(mem_4->slab, 208U | mem_5->gfp_mask);
//#line 354
  if (! cmd) {
    goto fail2;
  }
//#line 356
  list_add(& cmd->list, & shost->free_list);
//#line 357
  return (0);
  fail2: 
//#line 360
  pool->users --;
//#line 360
  if (! pool->users) {
//#line 361
    kmem_cache_destroy(pool->slab);
  }
//#line 362
  return (-12);
  fail: 
//#line 364
  up(& host_cmd_pool_mutex);
//#line 365
  return (-12);
}
}
//#line 376 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi.c"
void scsi_destroy_command_freelist(struct Scsi_Host *shost ) 
{ struct scsi_cmnd *cmd ;
  struct list_head  const  *__mptr ;
  int tmp ;
  struct scsi_cmnd *mem_5 ;
  struct scsi_host_cmd_pool *mem_6 ;
  struct scsi_host_cmd_pool *mem_7 ;
  struct scsi_host_cmd_pool *mem_8 ;
  struct scsi_host_cmd_pool *mem_9 ;
  struct scsi_host_cmd_pool *mem_10 ;

  {
//#line 378
  while (1) {
//#line 378
    tmp = list_empty((struct list_head  const  *)(& shost->free_list));
//#line 378
    if (tmp) {
//#line 378
      break;
    }
//#line 381
    __mptr = (struct list_head  const  *)shost->free_list.next;
//#line 381
    mem_5 = (struct scsi_cmnd *)0;
//#line 381
    cmd = (struct scsi_cmnd *)((char *)__mptr - (unsigned int )(& mem_5->list));
//#line 382
    list_del_init(& cmd->list);
//#line 383
    mem_6 = shost->cmd_pool;
//#line 383
    kmem_cache_free(mem_6->slab, (void *)cmd);
  }
//#line 386
  down(& host_cmd_pool_mutex);
//#line 387
  mem_7 = shost->cmd_pool;
//#line 387
  mem_8 = shost->cmd_pool;
//#line 387
  mem_7->users = mem_8->users - 1U;
//#line 387
  mem_9 = shost->cmd_pool;
//#line 387
  if (! mem_9->users) {
//#line 388
    mem_10 = shost->cmd_pool;
//#line 388
    kmem_cache_destroy(mem_10->slab);
  }
//#line 389
  up(& host_cmd_pool_mutex);
//#line 390
  return;
}
}
//#line 393 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi.c"
void scsi_log_send(struct scsi_cmnd *cmd ) 
{ unsigned int level ;
  struct scsi_device *sdev ;
  struct Scsi_Host *mem_4 ;
  struct Scsi_Host *mem_5 ;
  struct scsi_host_template *mem_6 ;

  {
//#line 409
  if (! (! scsi_logging_level)) {
//#line 410
    level = (scsi_logging_level >> 9) & 7U;
//#line 412
    if (level > 1U) {
//#line 413
      sdev = cmd->device;
//#line 414
      mem_4 = sdev->host;
//#line 414
      printk("<6>scsi <%d:%d:%d:%d> send ", mem_4->host_no, sdev->channel, sdev->id,
             sdev->lun);
//#line 417
      if (level > 2U) {
//#line 418
        printk("0x%p ", cmd);
      }
//#line 423
      printk("                 ");
//#line 424
      scsi_print_command(cmd);
//#line 425
      if (level > 3U) {
//#line 426
        mem_5 = sdev->host;
//#line 426
        mem_6 = mem_5->hostt;
//#line 426
        printk("<6>buffer = 0x%p, bufflen = %d, done = 0x%p, queuecommand 0x%p\n",
               cmd->buffer, cmd->bufflen, cmd->done, mem_6->queuecommand);
      }
    }
  }
//#line 435
  return;
}
}
//#line 437 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi.c"
void scsi_log_completion(struct scsi_cmnd *cmd , int disposition ) 
{ unsigned int level ;
  struct scsi_device *sdev ;
  struct Scsi_Host *mem_5 ;
  struct Scsi_Host *mem_6 ;
  struct Scsi_Host *mem_7 ;

  {
//#line 454
  if (! (! scsi_logging_level)) {
//#line 455
    level = (scsi_logging_level >> 12) & 7U;
//#line 457
    if (level > 0U) {
//#line 457
      if (cmd->result) {
        goto _L;
      } else {
//#line 457
        if (disposition != 8194) {
          goto _L;
        } else {
          goto _L___0;
        }
      }
    } else {
      _L___0: 
//#line 457
      if (level > 1U) {
        _L: 
//#line 459
        sdev = cmd->device;
//#line 460
        mem_5 = sdev->host;
//#line 460
        printk("<6>scsi <%d:%d:%d:%d> done ", mem_5->host_no, sdev->channel, sdev->id,
               sdev->lun);
//#line 463
        if (level > 2U) {
//#line 464
          printk("0x%p ", cmd);
        }
//#line 469
        switch (disposition) {
        case 8194: 
//#line 471
        printk("SUCCESS");
//#line 472
        break;
        case 8193: 
//#line 474
        printk("RETRY  ");
//#line 475
        break;
        case 8198: 
//#line 477
        printk("MLQUEUE");
//#line 478
        break;
        case 8195: 
//#line 480
        printk("FAILED ");
//#line 481
        break;
        case 8199: 
//#line 486
        printk("TIMEOUT");
//#line 487
        break;
        default: 
//#line 489
        printk("UNKNOWN");
        }
//#line 491
        printk(" %8x ", cmd->result);
//#line 492
        scsi_print_command(cmd);
//#line 493
        if (((cmd->result >> 1) & 127) & 1) {
//#line 498
          scsi_print_sense("", cmd);
        }
//#line 500
        if (level > 3U) {
//#line 501
          mem_6 = sdev->host;
//#line 501
          mem_7 = sdev->host;
//#line 501
          printk("<6>scsi host busy %d failed %d\n", mem_6->host_busy, mem_7->host_failed);
        }
      }
    }
  }
//#line 507
  return;
}
}
//#line 514 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi.c"
/*__inline*/ static void ( /*__attribute__((__always_inline__))*/ scsi_cmd_get_serial)(struct Scsi_Host *host ,
                                                                               struct scsi_cmnd *cmd ) 
{ unsigned long tmp ;
  unsigned long tmp___0 ;
  unsigned long tmp___1 ;
  unsigned long tmp___2 ;

  {
//#line 516
  tmp = host->cmd_serial_number;
//#line 516
  host->cmd_serial_number ++;
//#line 516
  cmd->serial_number = tmp;
//#line 517
  if (cmd->serial_number == 0UL) {
//#line 518
    tmp___0 = host->cmd_serial_number;
//#line 518
    host->cmd_serial_number ++;
//#line 518
    cmd->serial_number = tmp___0;
  }
//#line 520
  tmp___1 = host->cmd_pid;
//#line 520
  host->cmd_pid ++;
//#line 520
  cmd->pid = tmp___1;
//#line 521
  if (cmd->pid == 0UL) {
//#line 522
    tmp___2 = host->cmd_pid;
//#line 522
    host->cmd_pid ++;
//#line 522
    cmd->pid = tmp___2;
  }
//#line 523
  return;
}
}
//#line 534 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi.c"
int scsi_dispatch_cmd(struct scsi_cmnd *cmd ) 
{ struct Scsi_Host *host ;
  unsigned long flags ;
  unsigned long timeout ;
  int rtn ;
  int ticks_remaining ;
  int tmp___0 ;
  int tmp___1 ;
  int tmp___2 ;
  struct scsi_device *mem_16 ;
  struct scsi_device *mem_17 ;
  struct scsi_device *mem_18 ;
  struct scsi_device *mem_19 ;
  struct scsi_device *mem_20 ;
  struct scsi_device *mem_21 ;
  struct scsi_device *mem_22 ;
  struct scsi_device *mem_23 ;
  struct Scsi_Host *mem_24 ;
  struct scsi_host_template *mem_25 ;
  int (*mem_26)(struct scsi_cmnd * , void (*done)(struct scsi_cmnd * ) ) ;
  struct scsi_device *mem_27 ;

  {
//#line 536
  mem_16 = cmd->device;
//#line 536
  host = mem_16->host;
//#line 537
  flags = 0UL;
//#line 539
  rtn = 0;
//#line 542
  mem_17 = cmd->device;
//#line 542
  if (! (! ((int )mem_17->sdev_state == 4))) {
//#line 546
    cmd->result = 65536;
//#line 547
    mem_18 = cmd->device;
//#line 547
    atomic_inc(& mem_18->iorequest_cnt);
//#line 548
    __scsi_done(cmd);
    goto out;
  }
//#line 554
  mem_19 = cmd->device;
//#line 554
  if (! (! ((int )mem_19->sdev_state == 7))) {
//#line 561
    scsi_queue_insert(cmd, 4182);
//#line 563
    if (! (! (((scsi_logging_level >> 9) & 7U) > 3U))) {
//#line 563
      printk("queuecommand : device blocked \n");
    }
    goto out;
  }
//#line 575
  mem_20 = cmd->device;
//#line 575
  if ((int )mem_20->scsi_level <= 3) {
//#line 576
    mem_21 = cmd->device;
//#line 576
    cmd->cmnd[1] = (unsigned char )((unsigned int )((int )cmd->cmnd[1] & 31) | ((mem_21->lun << 5) & 224U));
  }
//#line 584
  timeout = host->last_reset + 500UL;
//#line 586
  if (host->resetting) {
//#line 586
    if ((long )jiffies - (long )timeout < 0L) {
//#line 587
      ticks_remaining = (int )(timeout - (unsigned long )jiffies);
//#line 597
      while (1) {
//#line 597
        ticks_remaining --;
//#line 597
        if (! (ticks_remaining >= 0)) {
//#line 597
          break;
        }
//#line 598
        __const_udelay(17180000UL);
      }
//#line 599
      host->resetting = 0;
    }
  }
//#line 606
  scsi_add_timer(cmd, cmd->timeout_per_command, & scsi_times_out);
//#line 608
  scsi_log_send(cmd);
//#line 614
  mem_22 = cmd->device;
//#line 614
  atomic_inc(& mem_22->iorequest_cnt);
//#line 620
  if ((((int )cmd->cmnd[0] >> 5) & 7) < 6) {
//#line 620
    tmp___0 = (int )((int const   )scsi_command_size[((int )cmd->cmnd[0] >> 5) & 7]);
  } else {
//#line 620
    tmp___0 = (int )((int const   )cmd->cmd_len);
  }
//#line 620
  mem_23 = cmd->device;
//#line 620
  mem_24 = mem_23->host;
//#line 620
  if (tmp___0 > (int )((int const   )mem_24->max_cmd_len)) {
//#line 621
    if (! (! (((scsi_logging_level >> 9) & 7U) > 3U))) {
//#line 621
      printk("queuecommand : command too long.\n");
    }
//#line 623
    cmd->result = 327680;
//#line 625
    scsi_done(cmd);
    goto out;
  }
//#line 629
  __SLIC_spin_lock_irqsave(host->host_lock, flags);
//#line 630
  scsi_cmd_get_serial(host, cmd);
//#line 632
  if (! (! ((int )host->shost_state == 4))) {
//#line 633
    cmd->result = 65536;
//#line 634
    scsi_done(cmd);
  } else {
//#line 636
    mem_25 = host->hostt;
//#line 636
    mem_26 = mem_25->queuecommand;
//#line 636
    rtn = ((*mem_26))(cmd, & scsi_done);
  }
//#line 638
  __SLIC_spin_unlock_irqrestore(host->host_lock, flags);
//#line 639
  if (rtn) {
//#line 640
    tmp___2 = scsi_delete_timer(cmd);
//#line 640
    if (tmp___2) {
//#line 641
      mem_27 = cmd->device;
//#line 641
      atomic_inc(& mem_27->iodone_cnt);
//#line 642
      if (rtn == 4182) {
//#line 642
        tmp___1 = rtn;
      } else {
//#line 642
        tmp___1 = 4181;
      }
//#line 642
      scsi_queue_insert(cmd, tmp___1);
    }
//#line 646
    if (! (! (((scsi_logging_level >> 9) & 7U) > 3U))) {
//#line 646
      printk("queuecommand : request rejected\n");
    }
  }
  out: 
//#line 651
  if (! (! (((scsi_logging_level >> 9) & 7U) > 3U))) {
//#line 651
    printk("leaving scsi_dispatch_cmnd()\n");
  }
//#line 652
  return (rtn);
}
}
//#line 679 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi.c"
void scsi_init_cmd_from_req(struct scsi_cmnd *cmd , struct scsi_request *sreq ) 
{ 

  {
//#line 681
  sreq->sr_command = cmd;
//#line 683
  cmd->cmd_len = sreq->sr_cmd_len;
//#line 684
  cmd->use_sg = sreq->sr_use_sg;
//#line 686
  cmd->request = sreq->sr_request;
//#line 687
  __constant_memcpy((void *)(cmd->data_cmnd), (void const   *)(sreq->sr_cmnd), sizeof(cmd->data_cmnd));
//#line 688
  cmd->serial_number = 0UL;
//#line 689
  cmd->bufflen = sreq->sr_bufflen;
//#line 690
  cmd->buffer = sreq->sr_buffer;
//#line 691
  cmd->retries = 0;
//#line 692
  cmd->allowed = sreq->sr_allowed;
//#line 693
  cmd->done = sreq->sr_done;
//#line 694
  cmd->timeout_per_command = sreq->sr_timeout_per_command;
//#line 695
  cmd->sc_data_direction = sreq->sr_data_direction;
//#line 696
  cmd->sglist_len = sreq->sr_sglist_len;
//#line 697
  cmd->underflow = sreq->sr_underflow;
//#line 698
  cmd->sc_request = sreq;
//#line 699
  __constant_memcpy((void *)(cmd->cmnd), (void const   *)(sreq->sr_cmnd), sizeof(sreq->sr_cmnd));
//#line 705
  __constant_c_and_count_memset((void *)(cmd->sense_buffer), 0UL, sizeof(sreq->sr_sense_buffer));
//#line 706
  cmd->request_buffer = sreq->sr_buffer;
//#line 707
  cmd->request_bufflen = sreq->sr_bufflen;
//#line 708
  cmd->old_use_sg = cmd->use_sg;
//#line 709
  if ((int )cmd->cmd_len == 0) {
//#line 710
    cmd->cmd_len = (unsigned char )scsi_command_size[((int )cmd->cmnd[0] >> 5) & 7];
  }
//#line 711
  cmd->old_cmd_len = cmd->cmd_len;
//#line 712
  cmd->sc_old_data_direction = cmd->sc_data_direction;
//#line 713
  cmd->old_underflow = cmd->underflow;
//#line 718
  cmd->result = 0;
//#line 720
  if (! (! (((scsi_logging_level >> 9) & 7U) > 3U))) {
//#line 720
    printk("Leaving scsi_init_cmd_from_req()\n");
  }
//#line 721
  return;
}
}
//#line 741 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi.c"
static void scsi_done(struct scsi_cmnd *cmd ) 
{ int tmp ;

  {
//#line 751
  tmp = scsi_delete_timer(cmd);
//#line 751
  if (! tmp) {
//#line 752
    return;
  }
//#line 753
  __scsi_done(cmd);
//#line 754
  return;
}
}
//#line 758 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi.c"
void __scsi_done(struct scsi_cmnd *cmd ) 
{ unsigned long __ptr ;
  struct thread_info *tmp ;
  struct scsi_device *mem_7 ;
  struct scsi_device *mem_8 ;

  {
//#line 765
  cmd->serial_number = 0UL;
//#line 767
  mem_7 = cmd->device;
//#line 767
  atomic_inc(& mem_7->iodone_cnt);
//#line 768
  if (cmd->result) {
//#line 769
    mem_8 = cmd->device;
//#line 769
    atomic_inc(& mem_8->ioerr_cnt);
  }
//#line 776
  /*__asm__  ("":)*/;
//#line 777
  tmp = current_thread_info();
//#line 777
  list_add_tail(& cmd->eh_entry, (struct list_head *)(__ptr + __per_cpu_offset[tmp->cpu]));
//#line 778
  raise_softirq_irqoff(4U);
//#line 779
  while (1) {
//#line 779
    /*__asm__  ("":)*/;
//#line 779
    break;
  }
//#line 780
  return;
}
}
//#line 871 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi.c"
void scsi_finish_command(struct scsi_cmnd *cmd ) 
{ struct scsi_device *sdev ;
  struct Scsi_Host *shost ;
  struct scsi_request *sreq ;
  struct scsi_cmnd *mem_5 ;
  struct scsi_cmnd *mem_6 ;
  void (*mem_7)(struct scsi_cmnd * ) ;

  {
//#line 873
  sdev = cmd->device;
//#line 874
  shost = sdev->host;
//#line 877
  scsi_device_unbusy(sdev);
//#line 887
  shost->host_blocked = 0U;
//#line 888
  sdev->device_blocked = 0U;
//#line 894
  if (((int )cmd->sense_buffer[0] & 112) == 112) {
//#line 895
    cmd->result |= 134217728;
  }
//#line 897
  if (! (! (((scsi_logging_level >> 12) & 7U) > 4U))) {
//#line 897
    printk("Notifying upper driver of completion for device %d %x\n", sdev->id, cmd->result);
  }
//#line 903
  cmd->use_sg = cmd->old_use_sg;
//#line 909
  sreq = cmd->sc_request;
//#line 910
  if (sreq) {
//#line 911
    mem_5 = sreq->sr_command;
//#line 911
    sreq->sr_result = mem_5->result;
//#line 912
    if (sreq->sr_result) {
//#line 913
      mem_6 = sreq->sr_command;
//#line 913
      __constant_memcpy((void *)(sreq->sr_sense_buffer), (void const   *)(mem_6->sense_buffer),
                        sizeof(sreq->sr_sense_buffer));
    }
  }
//#line 919
  mem_7 = cmd->done;
//#line 919
  ((*mem_7))(cmd);
//#line 920
  return;
}
}
//#line 945 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi.c"
void scsi_adjust_queue_depth(struct scsi_device *sdev , int tagged , int tags ) 
{ unsigned long flags ;
  int tmp ;
  int tmp___1 ;
  struct request_queue *mem_8 ;
  struct request_queue *mem_9 ;
  struct Scsi_Host *mem_10 ;
  struct request_queue *mem_11 ;

  {
//#line 952
  if (tags <= 0) {
//#line 953
    return;
  }
//#line 955
  mem_8 = sdev->request_queue;
//#line 955
  __SLIC_spin_lock_irqsave(mem_8->queue_lock, flags);
//#line 959
  mem_9 = sdev->request_queue;
//#line 959
  tmp = constant_test_bit(1, (unsigned long const volatile   *)(& mem_9->queue_flags));
//#line 959
  if (tmp) {
//#line 959
    tmp___1 = blk_queue_resize_tags(sdev->request_queue, tags);
//#line 959
    if (tmp___1 != 0) {
      goto out;
    }
  }
//#line 963
  sdev->queue_depth = (unsigned short )tags;
//#line 964
  switch (tagged) {
  case 34: 
//#line 966
  sdev->ordered_tags = 1U;
//#line 967
  sdev->simple_tags = 1U;
//#line 968
  break;
  case 32: 
//#line 970
  sdev->ordered_tags = 0U;
//#line 971
  sdev->simple_tags = 1U;
//#line 972
  break;
  default: 
//#line 974
  mem_10 = sdev->host;
//#line 974
  printk("<4>(scsi%d:%d:%d:%d) scsi_adjust_queue_depth, bad queue type, disabled\n",
         mem_10->host_no, sdev->channel, sdev->id, sdev->lun);
  case 0: 
//#line 979
  sdev->simple_tags = 0U;
//#line 979
  sdev->ordered_tags = sdev->simple_tags;
//#line 980
  sdev->queue_depth = (unsigned short )tags;
//#line 981
  break;
  }
  out: 
//#line 984
  mem_11 = sdev->request_queue;
//#line 984
  __SLIC_spin_unlock_irqrestore(mem_11->queue_lock, flags);
//#line 985
  return;
}
}
//#line 1010 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi.c"
int scsi_track_queue_full(struct scsi_device *sdev , int depth ) 
{ struct Scsi_Host *mem_3 ;

  {
//#line 1012
  if (jiffies >> 4 == (unsigned long volatile   )sdev->last_queue_full_time) {
//#line 1013
    return (0);
  }
//#line 1015
  sdev->last_queue_full_time = (unsigned long )(jiffies >> 4);
//#line 1016
  if ((int )sdev->last_queue_full_depth != depth) {
//#line 1017
    sdev->last_queue_full_count = (unsigned short)1;
//#line 1018
    sdev->last_queue_full_depth = (unsigned short )depth;
  } else {
//#line 1020
    sdev->last_queue_full_count = (unsigned short )((int )sdev->last_queue_full_count + 1);
  }
//#line 1023
  if ((int )sdev->last_queue_full_count <= 10) {
//#line 1024
    return (0);
  }
//#line 1025
  if ((int )sdev->last_queue_full_depth < 8) {
//#line 1027
    mem_3 = sdev->host;
//#line 1027
    scsi_adjust_queue_depth(sdev, 0, (int )mem_3->cmd_per_lun);
//#line 1028
    return (-1);
  }
//#line 1031
  if (sdev->ordered_tags) {
//#line 1032
    scsi_adjust_queue_depth(sdev, 34, depth);
  } else {
//#line 1034
    scsi_adjust_queue_depth(sdev, 32, depth);
  }
//#line 1035
  return (depth);
}
}
//#line 1047 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi.c"
int scsi_device_get(struct scsi_device *sdev ) 
{ struct device *tmp ;
  int tmp___0 ;
  struct Scsi_Host *mem_4 ;
  struct scsi_host_template *mem_5 ;

  {
//#line 1049
  if ((int )sdev->sdev_state == 4) {
//#line 1050
    return (-6);
  } else {
//#line 1049
    if ((int )sdev->sdev_state == 3) {
//#line 1050
      return (-6);
    }
  }
//#line 1051
  tmp = get_device(& sdev->sdev_gendev);
//#line 1051
  if (! tmp) {
//#line 1052
    return (-6);
  }
//#line 1053
  mem_4 = sdev->host;
//#line 1053
  mem_5 = mem_4->hostt;
//#line 1053
  tmp___0 = try_module_get(mem_5->module);
//#line 1053
  if (! tmp___0) {
//#line 1054
    put_device(& sdev->sdev_gendev);
//#line 1055
    return (-6);
  }
//#line 1057
  return (0);
}
}
//#line 1069 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi.c"
void scsi_device_put(struct scsi_device *sdev ) 
{ struct Scsi_Host *mem_2 ;
  struct scsi_host_template *mem_3 ;

  {
//#line 1071
  mem_2 = sdev->host;
//#line 1071
  mem_3 = mem_2->hostt;
//#line 1071
  module_put(mem_3->module);
//#line 1072
  put_device(& sdev->sdev_gendev);
//#line 1073
  return;
}
}
//#line 1077 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi.c"
struct scsi_device *__scsi_iterate_devices(struct Scsi_Host *shost , struct scsi_device *prev ) 
{ struct list_head *list ;
  struct list_head *tmp ;
  struct scsi_device *next ;
  unsigned long flags ;
  struct list_head  const  *__mptr ;
  int tmp___0 ;
  struct scsi_device *mem_9 ;

  {
//#line 1080
  if (prev) {
//#line 1080
    tmp = & prev->siblings;
  } else {
//#line 1080
    tmp = & shost->__devices;
  }
//#line 1080
  list = tmp;
//#line 1081
  next = (struct scsi_device *)((void *)0);
//#line 1084
  __SLIC_spin_lock_irqsave(shost->host_lock, flags);
//#line 1085
  while ((unsigned int )list->next != (unsigned int )(& shost->__devices)) {
//#line 1086
    __mptr = (struct list_head  const  *)list->next;
//#line 1086
    mem_9 = (struct scsi_device *)0;
//#line 1086
    next = (struct scsi_device *)((char *)__mptr - (unsigned int )(& mem_9->siblings));
//#line 1088
    tmp___0 = scsi_device_get(next);
//#line 1088
    if (! tmp___0) {
//#line 1089
      break;
    }
//#line 1090
    next = (struct scsi_device *)((void *)0);
//#line 1091
    list = list->next;
  }
//#line 1093
  __SLIC_spin_unlock_irqrestore(shost->host_lock, flags);
//#line 1095
  if (prev) {
//#line 1096
    scsi_device_put(prev);
  }
//#line 1097
  return (next);
}
}
//#line 1109 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi.c"
void starget_for_each_device(struct scsi_target *starget , void *data , void (*fn)(struct scsi_device * ,
                                                                                   void * ) ) 
{ struct Scsi_Host *shost ;
  struct Scsi_Host *tmp ;
  struct scsi_device *sdev ;

  {
//#line 1112
  tmp = dev_to_shost(starget->dev.parent);
//#line 1112
  shost = tmp;
//#line 1115
  sdev = __scsi_iterate_devices(shost, (struct scsi_device *)((void *)0));
//#line 1115
  while (sdev) {
//#line 1116
    if (sdev->channel == starget->channel) {
//#line 1116
      if (sdev->id == starget->id) {
//#line 1118
        ((*fn))(sdev, data);
      }
    }
//#line 1115
    sdev = __scsi_iterate_devices(shost, sdev);
  }
//#line 1120
  return;
}
}
//#line 1137 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi.c"
struct scsi_device *__scsi_device_lookup_by_target(struct scsi_target *starget , uint lun ) 
{ struct scsi_device *sdev ;
  struct list_head  const  *__mptr ;
  struct list_head  const  *__mptr___0 ;
  struct scsi_device *mem_6 ;
  struct scsi_device *mem_7 ;

  {
//#line 1142
  __mptr = (struct list_head  const  *)starget->devices.next;
//#line 1142
  mem_6 = (struct scsi_device *)0;
//#line 1142
  sdev = (struct scsi_device *)((char *)__mptr - (unsigned int )(& mem_6->same_target_siblings));
//#line 1142
  while (1) {
//#line 1142
    prefetch((void const   *)sdev->same_target_siblings.next);
//#line 1142
    if (! ((unsigned int )(& sdev->same_target_siblings) != (unsigned int )(& starget->devices))) {
//#line 1142
      break;
    }
//#line 1143
    if (sdev->lun == lun) {
//#line 1144
      return (sdev);
    }
//#line 1142
    __mptr___0 = (struct list_head  const  *)sdev->same_target_siblings.next;
//#line 1142
    mem_7 = (struct scsi_device *)0;
//#line 1142
    sdev = (struct scsi_device *)((char *)__mptr___0 - (unsigned int )(& mem_7->same_target_siblings));
  }
//#line 1147
  return ((struct scsi_device *)((void *)0));
}
}
//#line 1160 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi.c"
struct scsi_device *scsi_device_lookup_by_target(struct scsi_target *starget , uint lun ) 
{ struct scsi_device *sdev ;
  struct Scsi_Host *shost ;
  struct Scsi_Host *tmp ;
  unsigned long flags ;
  int tmp___0 ;

  {
//#line 1164
  tmp = dev_to_shost(starget->dev.parent);
//#line 1164
  shost = tmp;
//#line 1167
  __SLIC_spin_lock_irqsave(shost->host_lock, flags);
//#line 1168
  sdev = __scsi_device_lookup_by_target(starget, lun);
//#line 1169
  if (sdev) {
//#line 1169
    tmp___0 = scsi_device_get(sdev);
//#line 1169
    if (tmp___0) {
//#line 1170
      sdev = (struct scsi_device *)((void *)0);
    }
  }
//#line 1171
  __SLIC_spin_unlock_irqrestore(shost->host_lock, flags);
//#line 1173
  return (sdev);
}
}
//#line 1193 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi.c"
struct scsi_device *__scsi_device_lookup(struct Scsi_Host *shost , uint channel ,
                                         uint id , uint lun ) 
{ struct scsi_device *sdev ;
  struct list_head  const  *__mptr ;
  struct list_head  const  *__mptr___0 ;
  struct scsi_device *mem_8 ;
  struct scsi_device *mem_9 ;

  {
//#line 1198
  __mptr = (struct list_head  const  *)shost->__devices.next;
//#line 1198
  mem_8 = (struct scsi_device *)0;
//#line 1198
  sdev = (struct scsi_device *)((char *)__mptr - (unsigned int )(& mem_8->siblings));
//#line 1198
  while (1) {
//#line 1198
    prefetch((void const   *)sdev->siblings.next);
//#line 1198
    if (! ((unsigned int )(& sdev->siblings) != (unsigned int )(& shost->__devices))) {
//#line 1198
      break;
    }
//#line 1199
    if (sdev->channel == channel) {
//#line 1199
      if (sdev->id == id) {
//#line 1199
        if (sdev->lun == lun) {
//#line 1201
          return (sdev);
        }
      }
    }
//#line 1198
    __mptr___0 = (struct list_head  const  *)sdev->siblings.next;
//#line 1198
    mem_9 = (struct scsi_device *)0;
//#line 1198
    sdev = (struct scsi_device *)((char *)__mptr___0 - (unsigned int )(& mem_9->siblings));
  }
//#line 1204
  return ((struct scsi_device *)((void *)0));
}
}
//#line 1219 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi.c"
struct scsi_device *scsi_device_lookup(struct Scsi_Host *shost , uint channel , uint id ,
                                       uint lun ) 
{ struct scsi_device *sdev ;
  unsigned long flags ;
  int tmp ;

  {
//#line 1225
  __SLIC_spin_lock_irqsave(shost->host_lock, flags);
//#line 1226
  sdev = __scsi_device_lookup(shost, channel, id, lun);
//#line 1227
  if (sdev) {
//#line 1227
    tmp = scsi_device_get(sdev);
//#line 1227
    if (tmp) {
//#line 1228
      sdev = (struct scsi_device *)((void *)0);
    }
  }
//#line 1229
  __SLIC_spin_unlock_irqrestore(shost->host_lock, flags);
//#line 1231
  return (sdev);
}
}
//#line 1241 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi.c"
int scsi_device_cancel(struct scsi_device *sdev , int recovery ) 
{ struct scsi_cmnd *scmd ;
  struct list_head active_list ;
  struct list_head *lh ;
  struct list_head *lh_sf ;
  unsigned long flags ;
  struct list_head  const  *__mptr ;
  struct list_head  const  *__mptr___0 ;
  int tmp ;
  struct list_head  const  *__mptr___1 ;
  int tmp___0 ;
  int tmp___1 ;
  struct scsi_cmnd *mem_14 ;
  struct request *mem_15 ;
  struct scsi_cmnd *mem_16 ;
  struct scsi_cmnd *mem_17 ;

  {
//#line 1244
  active_list.next = & active_list;
//#line 1244
  active_list.prev = & active_list;
//#line 1248
  scsi_device_set_state(sdev, (enum scsi_device_state )3);
//#line 1250
  __SLIC_spin_lock_irqsave(& sdev->list_lock, flags);
//#line 1251
  __mptr = (struct list_head  const  *)sdev->cmd_list.next;
//#line 1251
  mem_14 = (struct scsi_cmnd *)0;
//#line 1251
  scmd = (struct scsi_cmnd *)((char *)__mptr - (unsigned int )(& mem_14->list));
//#line 1251
  while (1) {
//#line 1251
    prefetch((void const   *)scmd->list.next);
//#line 1251
    if (! ((unsigned int )(& scmd->list) != (unsigned int )(& sdev->cmd_list))) {
//#line 1251
      break;
    }
//#line 1252
    if (scmd->request) {
//#line 1252
      mem_15 = scmd->request;
//#line 1252
      if (mem_15->rq_status != -1) {
//#line 1258
        tmp = scsi_delete_timer(scmd);
//#line 1258
        if (! tmp) {
          goto __Cont;
        }
//#line 1260
        list_add_tail(& scmd->eh_entry, & active_list);
      }
    }
    __Cont: 
//#line 1251
    __mptr___0 = (struct list_head  const  *)scmd->list.next;
//#line 1251
    mem_16 = (struct scsi_cmnd *)0;
//#line 1251
    scmd = (struct scsi_cmnd *)((char *)__mptr___0 - (unsigned int )(& mem_16->list));
  }
//#line 1263
  __SLIC_spin_unlock_irqrestore(& sdev->list_lock, flags);
//#line 1265
  tmp___1 = list_empty((struct list_head  const  *)(& active_list));
//#line 1265
  if (! tmp___1) {
//#line 1266
    lh = active_list.next;
//#line 1266
    lh_sf = lh->next;
//#line 1266
    while ((unsigned int )lh != (unsigned int )(& active_list)) {
//#line 1267
      __mptr___1 = (struct list_head  const  *)lh;
//#line 1267
      mem_17 = (struct scsi_cmnd *)0;
//#line 1267
      scmd = (struct scsi_cmnd *)((char *)__mptr___1 - (unsigned int )(& mem_17->eh_entry));
//#line 1268
      list_del_init(lh);
//#line 1269
      if (recovery) {
//#line 1269
        tmp___0 = scsi_eh_scmd_add(scmd, 1);
//#line 1269
        if (! tmp___0) {
//#line 1271
          scmd->result = 327680;
//#line 1272
          scsi_finish_command(scmd);
        }
      }
//#line 1266
      lh = lh_sf;
//#line 1266
      lh_sf = lh->next;
    }
  }
//#line 1277
  return (0);
}
}
//#line 1282 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi.c"
static int scsi_cpu_notify(struct notifier_block *self , unsigned long action , void *hcpu ) 
{ int cpu ;
  unsigned long __ptr ;
  struct thread_info *tmp ;
  unsigned long __ptr___0 ;

  {
//#line 1285
  cpu = (int )((unsigned long )hcpu);
//#line 1287
  switch ((int )action) {
  case 7: 
//#line 1290
  /*__asm__  ("":)*/;
//#line 1292
  tmp = current_thread_info();
//#line 1291
  list_splice_init((struct list_head *)(__ptr___0 + __per_cpu_offset[cpu]), (struct list_head *)(__ptr + __per_cpu_offset[tmp->cpu]));
//#line 1293
  raise_softirq_irqoff(4U);
//#line 1294
  /*__asm__  ("":)*/;
//#line 1295
  break;
  default: ;
//#line 1297
  break;
  }
//#line 1299
  return (1);
}
}
//#line 1302 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi.c"
static struct notifier_block scsi_cpu_nb  =    {& scsi_cpu_notify, (struct notifier_block *)0, 0};
//#line 1366
static void exit_scsi(void)  /*__attribute__((__used__, __section__(".exit.text")))*/ ;
//#line 1366
static void exit_scsi(void)  /*__attribute__((__used__, __section__(".exit.text")))*/ ;
//#line 1366 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/scsi.c"
static void exit_scsi(void) 
{ 

  {
//#line 1368
  scsi_sysfs_unregister();
//#line 1369
  scsi_exit_sysctl();
//#line 1370
  scsi_exit_hosts();
//#line 1371
  scsi_exit_devinfo();
//#line 1372
  devfs_remove("scsi");
//#line 1373
  scsi_exit_procfs();
//#line 1374
  scsi_exit_queue();
//#line 1375
  unregister_cpu_notifier(& scsi_cpu_nb);
//#line 1376
  return;
}
}
//#line 397 "/home/matze/workspace_TestPlugins/Linux2.6.14.1/linux-2.6.14.1/drivers/scsi/slicheader.h"
int main(void) 
{ 

  {
//#line 396
  SLIC_driver_init();
  
  struct scsi_cmnd cmd;
  struct scsi_device scsidev ;
  struct Scsi_Host host;
	
  struct scsi_request sc_req;
  struct scsi_cmnd sr_co;	
  sc_req.sr_command = &sr_co;

  struct request_queue rq;
  spinlock_t ql;
  rq.queue_lock = &ql;
	

  spinlock_t host_lock;
  __SLIC_spin_lock_init(&host_lock);

  //spin lock is held	
  __SLIC_spin_lock(&host_lock);
   
   host.host_lock = &host_lock;
   scsidev.host = &host;
   scsidev.request_queue = &rq;
   cmd.device = &scsidev;
   cmd.sc_request = &sc_req;
//	scsi_finish_command(&cmd);
   ata_scsi_queuecmd(&cmd, scsi_finish_command);

//#line 397
  SLIC_driver_exit();
//#line 398
  return (0);
}
}
