extern void abort(void);
extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__));
void reach_error() { __assert_fail("0", "drivers--gpu--drm--i915--i915.ko_001.80a914d.32_7a.cil_true-unreach-call.i", 3, "reach_error"); }

/* Generated by CIL v. 1.5.1 */
/* print_CIL_Input is false */

typedef __builtin_va_list __gnuc_va_list[1U];
typedef __gnuc_va_list va_list[1U];
typedef unsigned int __kernel_mode_t;
typedef unsigned long __kernel_nlink_t;
typedef long __kernel_off_t;
typedef int __kernel_pid_t;
typedef unsigned int __kernel_uid_t;
typedef unsigned int __kernel_gid_t;
typedef unsigned long __kernel_size_t;
typedef long __kernel_ssize_t;
typedef long __kernel_time_t;
typedef long __kernel_clock_t;
typedef int __kernel_timer_t;
typedef int __kernel_clockid_t;
typedef long long __kernel_loff_t;
typedef __kernel_uid_t __kernel_uid32_t;
typedef __kernel_gid_t __kernel_gid32_t;
typedef signed char __s8;
typedef short __s16;
typedef unsigned short __u16;
typedef int __s32;
typedef unsigned int __u32;
typedef long long __s64;
typedef unsigned long long __u64;
typedef signed char s8;
typedef unsigned char u8;
typedef unsigned short u16;
typedef int s32;
typedef unsigned int u32;
typedef long long s64;
typedef unsigned long long u64;
typedef unsigned short umode_t;
typedef u64 dma_addr_t;
typedef __u32 __kernel_dev_t;
typedef __kernel_dev_t dev_t;
typedef __kernel_mode_t mode_t;
typedef __kernel_nlink_t nlink_t;
typedef __kernel_off_t off_t;
typedef __kernel_pid_t pid_t;
typedef __kernel_timer_t timer_t;
typedef __kernel_clockid_t clockid_t;
typedef _Bool bool;
typedef __kernel_uid32_t uid_t;
typedef __kernel_gid32_t gid_t;
typedef __kernel_loff_t loff_t;
typedef __kernel_size_t size_t;
typedef __kernel_ssize_t ssize_t;
typedef __kernel_time_t time_t;
typedef __kernel_clock_t clock_t;
typedef __u32 uint32_t;
typedef unsigned long sector_t;
typedef unsigned long blkcnt_t;
typedef unsigned int gfp_t;
typedef u64 resource_size_t;
struct module;
struct bug_entry {
   unsigned long bug_addr ;
   char const   *file ;
   unsigned short line ;
   unsigned short flags ;
};
struct completion;
struct pt_regs;
struct pid;
struct task_struct;
struct mm_struct;
typedef void (*ds_ovfl_callback_t)(struct task_struct * );
struct ds_context {
   unsigned char *ds ;
   struct task_struct *owner[2U] ;
   ds_ovfl_callback_t callback[2U] ;
   void *buffer[2U] ;
   unsigned int pages[2U] ;
   unsigned long count ;
   struct ds_context **this ;
   struct task_struct *task ;
};
struct pt_regs {
   unsigned long r15 ;
   unsigned long r14 ;
   unsigned long r13 ;
   unsigned long r12 ;
   unsigned long bp ;
   unsigned long bx ;
   unsigned long r11 ;
   unsigned long r10 ;
   unsigned long r9 ;
   unsigned long r8 ;
   unsigned long ax ;
   unsigned long cx ;
   unsigned long dx ;
   unsigned long si ;
   unsigned long di ;
   unsigned long orig_ax ;
   unsigned long ip ;
   unsigned long cs ;
   unsigned long flags ;
   unsigned long sp ;
   unsigned long ss ;
};
struct info {
   long ___orig_eip ;
   long ___ebx ;
   long ___ecx ;
   long ___edx ;
   long ___esi ;
   long ___edi ;
   long ___ebp ;
   long ___eax ;
   long ___ds ;
   long ___es ;
   long ___fs ;
   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 ;
};
typedef unsigned long pgdval_t;
typedef unsigned long pgprotval_t;
typedef unsigned long phys_addr_t;
struct page;
struct __anonstruct_pgd_t_7 {
   pgdval_t pgd ;
};
typedef struct __anonstruct_pgd_t_7 pgd_t;
struct __anonstruct_pgprot_t_8 {
   pgprotval_t pgprot ;
};
typedef struct __anonstruct_pgprot_t_8 pgprot_t;
struct __anonstruct_ldv_1974_12 {
   unsigned int a ;
   unsigned int b ;
};
struct __anonstruct_ldv_1989_13 {
   u16 limit0 ;
   u16 base0 ;
   unsigned char base1 ;
   unsigned char type : 4 ;
   unsigned char s : 1 ;
   unsigned char dpl : 2 ;
   unsigned char p : 1 ;
   unsigned char limit : 4 ;
   unsigned char avl : 1 ;
   unsigned char l : 1 ;
   unsigned char d : 1 ;
   unsigned char g : 1 ;
   unsigned char base2 ;
};
union __anonunion_ldv_1990_11 {
   struct __anonstruct_ldv_1974_12 ldv_1974 ;
   struct __anonstruct_ldv_1989_13 ldv_1989 ;
};
struct desc_struct {
   union __anonunion_ldv_1990_11 ldv_1990 ;
};
struct __anonstruct_cpumask_t_14 {
   unsigned long bits[1U] ;
};
typedef struct __anonstruct_cpumask_t_14 cpumask_t;
struct thread_struct;
struct raw_spinlock;
struct exec_domain;
struct map_segment;
struct exec_domain {
   char const   *name ;
   void (*handler)(int  , struct pt_regs * ) ;
   unsigned char pers_low ;
   unsigned char pers_high ;
   unsigned long *signal_map ;
   unsigned long *signal_invmap ;
   struct map_segment *err_map ;
   struct map_segment *socktype_map ;
   struct map_segment *sockopt_map ;
   struct map_segment *af_map ;
   struct module *module ;
   struct exec_domain *next ;
};
struct i387_fsave_struct {
   u32 cwd ;
   u32 swd ;
   u32 twd ;
   u32 fip ;
   u32 fcs ;
   u32 foo ;
   u32 fos ;
   u32 st_space[20U] ;
   u32 status ;
};
struct __anonstruct_ldv_4418_16 {
   u64 rip ;
   u64 rdp ;
};
struct __anonstruct_ldv_4424_17 {
   u32 fip ;
   u32 fcs ;
   u32 foo ;
   u32 fos ;
};
union __anonunion_ldv_4425_15 {
   struct __anonstruct_ldv_4418_16 ldv_4418 ;
   struct __anonstruct_ldv_4424_17 ldv_4424 ;
};
union __anonunion_ldv_4434_18 {
   u32 padding1[12U] ;
   u32 sw_reserved[12U] ;
};
struct i387_fxsave_struct {
   u16 cwd ;
   u16 swd ;
   u16 twd ;
   u16 fop ;
   union __anonunion_ldv_4425_15 ldv_4425 ;
   u32 mxcsr ;
   u32 mxcsr_mask ;
   u32 st_space[32U] ;
   u32 xmm_space[64U] ;
   u32 padding[12U] ;
   union __anonunion_ldv_4434_18 ldv_4434 ;
};
struct i387_soft_struct {
   u32 cwd ;
   u32 swd ;
   u32 twd ;
   u32 fip ;
   u32 fcs ;
   u32 foo ;
   u32 fos ;
   u32 st_space[20U] ;
   u8 ftop ;
   u8 changed ;
   u8 lookahead ;
   u8 no_update ;
   u8 rm ;
   u8 alimit ;
   struct info *info ;
   u32 entry_eip ;
};
struct xsave_hdr_struct {
   u64 xstate_bv ;
   u64 reserved1[2U] ;
   u64 reserved2[5U] ;
};
struct xsave_struct {
   struct i387_fxsave_struct i387 ;
   struct xsave_hdr_struct xsave_hdr ;
};
union thread_xstate {
   struct i387_fsave_struct fsave ;
   struct i387_fxsave_struct fxsave ;
   struct i387_soft_struct soft ;
   struct xsave_struct xsave ;
};
struct kmem_cache;
struct thread_struct {
   struct desc_struct tls_array[3U] ;
   unsigned long sp0 ;
   unsigned long sp ;
   unsigned long usersp ;
   unsigned short es ;
   unsigned short ds ;
   unsigned short fsindex ;
   unsigned short gsindex ;
   unsigned long ip ;
   unsigned long fs ;
   unsigned long gs ;
   unsigned long debugreg0 ;
   unsigned long debugreg1 ;
   unsigned long debugreg2 ;
   unsigned long debugreg3 ;
   unsigned long debugreg6 ;
   unsigned long debugreg7 ;
   unsigned long cr2 ;
   unsigned long trap_no ;
   unsigned long error_code ;
   union thread_xstate *xstate ;
   unsigned long *io_bitmap_ptr ;
   unsigned long iopl ;
   unsigned int io_bitmap_max ;
   unsigned long debugctlmsr ;
   struct ds_context *ds_ctx ;
   unsigned int bts_ovfl_signal ;
};
struct __anonstruct_mm_segment_t_19 {
   unsigned long seg ;
};
typedef struct __anonstruct_mm_segment_t_19 mm_segment_t;
struct list_head {
   struct list_head *next ;
   struct list_head *prev ;
};
struct hlist_node;
struct hlist_head {
   struct hlist_node *first ;
};
struct hlist_node {
   struct hlist_node *next ;
   struct hlist_node **pprev ;
};
struct raw_spinlock {
   unsigned int slock ;
};
typedef struct raw_spinlock raw_spinlock_t;
struct __anonstruct_raw_rwlock_t_20 {
   unsigned int lock ;
};
typedef struct __anonstruct_raw_rwlock_t_20 raw_rwlock_t;
struct lockdep_map;
struct stack_trace {
   unsigned int nr_entries ;
   unsigned int max_entries ;
   unsigned long *entries ;
   int skip ;
};
struct lockdep_subclass_key {
   char __one_byte ;
};
struct lock_class_key {
   struct lockdep_subclass_key subkeys[8U] ;
};
struct lock_class {
   struct list_head hash_entry ;
   struct list_head lock_entry ;
   struct lockdep_subclass_key *key ;
   unsigned int subclass ;
   unsigned int dep_gen_id ;
   unsigned long usage_mask ;
   struct stack_trace usage_traces[9U] ;
   struct list_head locks_after ;
   struct list_head locks_before ;
   unsigned int version ;
   unsigned long ops ;
   char const   *name ;
   int name_version ;
   unsigned long contention_point[4U] ;
};
struct lockdep_map {
   struct lock_class_key *key ;
   struct lock_class *class_cache ;
   char const   *name ;
   int cpu ;
};
struct held_lock {
   u64 prev_chain_key ;
   unsigned long acquire_ip ;
   struct lockdep_map *instance ;
   struct lockdep_map *nest_lock ;
   u64 waittime_stamp ;
   u64 holdtime_stamp ;
   unsigned short class_idx : 13 ;
   unsigned char irq_context : 2 ;
   unsigned char trylock : 1 ;
   unsigned char read : 2 ;
   unsigned char check : 2 ;
   unsigned char hardirqs_off : 1 ;
};
struct __anonstruct_spinlock_t_21 {
   raw_spinlock_t raw_lock ;
   unsigned int magic ;
   unsigned int owner_cpu ;
   void *owner ;
   struct lockdep_map dep_map ;
};
typedef struct __anonstruct_spinlock_t_21 spinlock_t;
struct __anonstruct_rwlock_t_22 {
   raw_rwlock_t raw_lock ;
   unsigned int magic ;
   unsigned int owner_cpu ;
   void *owner ;
   struct lockdep_map dep_map ;
};
typedef struct __anonstruct_rwlock_t_22 rwlock_t;
struct __anonstruct_atomic_t_23 {
   int counter ;
};
typedef struct __anonstruct_atomic_t_23 atomic_t;
struct __anonstruct_atomic64_t_24 {
   long counter ;
};
typedef struct __anonstruct_atomic64_t_24 atomic64_t;
typedef atomic64_t atomic_long_t;
struct thread_info;
struct mutex {
   atomic_t count ;
   spinlock_t wait_lock ;
   struct list_head wait_list ;
   struct thread_info *owner ;
   char const   *name ;
   void *magic ;
   struct lockdep_map dep_map ;
};
struct mutex_waiter {
   struct list_head list ;
   struct task_struct *task ;
   struct mutex *lock ;
   void *magic ;
};
struct timespec;
struct compat_timespec;
struct __anonstruct_ldv_5266_26 {
   unsigned long arg0 ;
   unsigned long arg1 ;
   unsigned long arg2 ;
   unsigned long arg3 ;
};
struct __anonstruct_futex_27 {
   u32 *uaddr ;
   u32 val ;
   u32 flags ;
   u32 bitset ;
   u64 time ;
};
struct __anonstruct_nanosleep_28 {
   clockid_t index ;
   struct timespec *rmtp ;
   struct compat_timespec *compat_rmtp ;
   u64 expires ;
};
union __anonunion_ldv_5280_25 {
   struct __anonstruct_ldv_5266_26 ldv_5266 ;
   struct __anonstruct_futex_27 futex ;
   struct __anonstruct_nanosleep_28 nanosleep ;
};
struct restart_block {
   long (*fn)(struct restart_block * ) ;
   union __anonunion_ldv_5280_25 ldv_5280 ;
};
struct thread_info {
   struct task_struct *task ;
   struct exec_domain *exec_domain ;
   unsigned long flags ;
   __u32 status ;
   __u32 cpu ;
   int preempt_count ;
   mm_segment_t addr_limit ;
   struct restart_block restart_block ;
   void *sysenter_return ;
};
struct timespec {
   time_t tv_sec ;
   long tv_nsec ;
};
struct kstat {
   u64 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 long blocks ;
};
struct __wait_queue;
typedef struct __wait_queue wait_queue_t;
struct __wait_queue {
   unsigned int flags ;
   void *private ;
   int (*func)(wait_queue_t * , unsigned int  , int  , void * ) ;
   struct list_head task_list ;
};
struct __wait_queue_head {
   spinlock_t lock ;
   struct list_head task_list ;
};
typedef struct __wait_queue_head wait_queue_head_t;
struct __anonstruct_nodemask_t_30 {
   unsigned long bits[1U] ;
};
typedef struct __anonstruct_nodemask_t_30 nodemask_t;
struct rw_semaphore;
struct rw_semaphore {
   __s32 activity ;
   spinlock_t wait_lock ;
   struct list_head wait_list ;
   struct lockdep_map dep_map ;
};
struct file;
struct device;
struct pm_message {
   int event ;
};
typedef struct pm_message pm_message_t;
struct pm_ops {
   int (*prepare)(struct device * ) ;
   void (*complete)(struct device * ) ;
   int (*suspend)(struct device * ) ;
   int (*resume)(struct device * ) ;
   int (*freeze)(struct device * ) ;
   int (*thaw)(struct device * ) ;
   int (*poweroff)(struct device * ) ;
   int (*restore)(struct device * ) ;
};
struct pm_ext_ops {
   struct pm_ops base ;
   int (*suspend_noirq)(struct device * ) ;
   int (*resume_noirq)(struct device * ) ;
   int (*freeze_noirq)(struct device * ) ;
   int (*thaw_noirq)(struct device * ) ;
   int (*poweroff_noirq)(struct device * ) ;
   int (*restore_noirq)(struct device * ) ;
};
enum dpm_state {
    DPM_INVALID = 0,
    DPM_ON = 1,
    DPM_PREPARING = 2,
    DPM_RESUMING = 3,
    DPM_SUSPENDING = 4,
    DPM_OFF = 5,
    DPM_OFF_IRQ = 6
} ;
struct dev_pm_info {
   pm_message_t power_state ;
   unsigned char can_wakeup : 1 ;
   unsigned char should_wakeup : 1 ;
   enum dpm_state status ;
   struct list_head entry ;
};
struct __anonstruct_mm_context_t_77 {
   void *ldt ;
   int size ;
   struct mutex lock ;
   void *vdso ;
};
typedef struct __anonstruct_mm_context_t_77 mm_context_t;
struct pci_bus;
struct vm_area_struct;
struct key;
typedef __u64 Elf64_Addr;
typedef __u16 Elf64_Half;
typedef __u32 Elf64_Word;
typedef __u64 Elf64_Xword;
struct elf64_sym {
   Elf64_Word st_name ;
   unsigned char st_info ;
   unsigned char st_other ;
   Elf64_Half st_shndx ;
   Elf64_Addr st_value ;
   Elf64_Xword st_size ;
};
typedef struct elf64_sym Elf64_Sym;
struct kobject;
struct attribute {
   char const   *name ;
   struct module *owner ;
   mode_t mode ;
};
struct attribute_group {
   char const   *name ;
   mode_t (*is_visible)(struct kobject * , struct attribute * , int  ) ;
   struct attribute **attrs ;
};
struct bin_attribute {
   struct attribute attr ;
   size_t size ;
   void *private ;
   ssize_t (*read)(struct kobject * , struct bin_attribute * , char * , loff_t  ,
                   size_t  ) ;
   ssize_t (*write)(struct kobject * , struct bin_attribute * , char * , loff_t  ,
                    size_t  ) ;
   int (*mmap)(struct kobject * , struct bin_attribute * , struct vm_area_struct * ) ;
};
struct sysfs_ops {
   ssize_t (*show)(struct kobject * , struct attribute * , char * ) ;
   ssize_t (*store)(struct kobject * , struct attribute * , char const   * , size_t  ) ;
};
struct kref {
   atomic_t refcount ;
};
struct kset;
struct kobj_type;
struct sysfs_dirent;
struct kobject {
   char const   *name ;
   struct list_head entry ;
   struct kobject *parent ;
   struct kset *kset ;
   struct kobj_type *ktype ;
   struct sysfs_dirent *sd ;
   struct kref kref ;
   unsigned char state_initialized : 1 ;
   unsigned char state_in_sysfs : 1 ;
   unsigned char state_add_uevent_sent : 1 ;
   unsigned char state_remove_uevent_sent : 1 ;
};
struct kobj_type {
   void (*release)(struct kobject * ) ;
   struct sysfs_ops *sysfs_ops ;
   struct attribute **default_attrs ;
};
struct kobj_uevent_env {
   char *envp[32U] ;
   int envp_idx ;
   char buf[2048U] ;
   int buflen ;
};
struct kset_uevent_ops {
   int (*filter)(struct kset * , struct kobject * ) ;
   char const   *(*name)(struct kset * , struct kobject * ) ;
   int (*uevent)(struct kset * , struct kobject * , struct kobj_uevent_env * ) ;
};
struct kset {
   struct list_head list ;
   spinlock_t list_lock ;
   struct kobject kobj ;
   struct kset_uevent_ops *uevent_ops ;
};
struct marker;
typedef void marker_probe_func(void * , void * , char const   * , va_list * );
struct marker_probe_closure {
   marker_probe_func *func ;
   void *probe_private ;
};
struct marker {
   char const   *name ;
   char const   *format ;
   char state ;
   char ptype ;
   void (*call)(struct marker  const  * , void *  , ...) ;
   struct marker_probe_closure single ;
   struct marker_probe_closure *multi ;
};
typedef unsigned long long cycles_t;
union ktime {
   s64 tv64 ;
};
typedef union ktime ktime_t;
struct tvec_base;
struct timer_list {
   struct list_head entry ;
   unsigned long expires ;
   void (*function)(unsigned long  ) ;
   unsigned long data ;
   struct tvec_base *base ;
   void *start_site ;
   char start_comm[16U] ;
   int start_pid ;
};
struct hrtimer;
enum hrtimer_restart;
struct work_struct;
struct work_struct {
   atomic_long_t data ;
   struct list_head entry ;
   void (*func)(struct work_struct * ) ;
   struct lockdep_map lockdep_map ;
};
struct delayed_work {
   struct work_struct work ;
   struct timer_list timer ;
};
struct kmem_cache_cpu {
   void **freelist ;
   struct page *page ;
   int node ;
   unsigned int offset ;
   unsigned int objsize ;
   unsigned int stat[18U] ;
};
struct kmem_cache_node {
   spinlock_t list_lock ;
   unsigned long nr_partial ;
   unsigned long min_partial ;
   struct list_head partial ;
   atomic_long_t nr_slabs ;
   atomic_long_t total_objects ;
   struct list_head full ;
};
struct kmem_cache_order_objects {
   unsigned long x ;
};
struct kmem_cache {
   unsigned long flags ;
   int size ;
   int objsize ;
   int offset ;
   struct kmem_cache_order_objects oo ;
   struct kmem_cache_node local_node ;
   struct kmem_cache_order_objects max ;
   struct kmem_cache_order_objects min ;
   gfp_t allocflags ;
   int refcount ;
   void (*ctor)(void * ) ;
   int inuse ;
   int align ;
   char const   *name ;
   struct list_head list ;
   struct kobject kobj ;
   int remote_node_defrag_ratio ;
   struct kmem_cache_node *node[64U] ;
   struct kmem_cache_cpu *cpu_slab[8U] ;
};
struct __anonstruct_local_t_88 {
   atomic_long_t a ;
};
typedef struct __anonstruct_local_t_88 local_t;
struct mod_arch_specific {

};
struct kernel_symbol {
   unsigned long value ;
   char const   *name ;
};
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  ) ;
   void (*setup)(struct module * , char const   * ) ;
   int (*test)(struct module * ) ;
   void (*free)(struct module * ) ;
};
struct module_kobject {
   struct kobject kobj ;
   struct module *mod ;
   struct kobject *drivers_dir ;
};
struct exception_table_entry;
struct module_ref {
   local_t count ;
};
enum module_state {
    MODULE_STATE_LIVE = 0,
    MODULE_STATE_COMING = 1,
    MODULE_STATE_GOING = 2
} ;
struct module_param_attrs;
struct module_sect_attrs;
struct module_notes_attrs;
struct module {
   enum module_state state ;
   struct list_head list ;
   char name[56U] ;
   struct module_kobject mkobj ;
   struct module_param_attrs *param_attrs ;
   struct module_attribute *modinfo_attrs ;
   char const   *version ;
   char const   *srcversion ;
   struct kobject *holders_dir ;
   struct kernel_symbol  const  *syms ;
   unsigned long const   *crcs ;
   unsigned int num_syms ;
   unsigned int num_gpl_syms ;
   struct kernel_symbol  const  *gpl_syms ;
   unsigned long const   *gpl_crcs ;
   struct kernel_symbol  const  *unused_syms ;
   unsigned long const   *unused_crcs ;
   unsigned int num_unused_syms ;
   unsigned int num_unused_gpl_syms ;
   struct kernel_symbol  const  *unused_gpl_syms ;
   unsigned long const   *unused_gpl_crcs ;
   struct kernel_symbol  const  *gpl_future_syms ;
   unsigned long const   *gpl_future_crcs ;
   unsigned int num_gpl_future_syms ;
   unsigned int num_exentries ;
   struct exception_table_entry  const  *extable ;
   int (*init)(void) ;
   void *module_init ;
   void *module_core ;
   unsigned int init_size ;
   unsigned int core_size ;
   unsigned int init_text_size ;
   unsigned int core_text_size ;
   void *unwind_info ;
   struct mod_arch_specific arch ;
   unsigned int taints ;
   unsigned int num_bugs ;
   struct list_head bug_list ;
   struct bug_entry *bug_table ;
   Elf64_Sym *symtab ;
   unsigned int num_symtab ;
   char *strtab ;
   struct module_sect_attrs *sect_attrs ;
   struct module_notes_attrs *notes_attrs ;
   void *percpu ;
   char *args ;
   struct marker *markers ;
   unsigned int num_markers ;
   struct list_head modules_which_use_me ;
   struct task_struct *waiter ;
   void (*exit)(void) ;
   struct module_ref ref[8U] ;
};
struct device_driver;
struct file_operations;
struct completion {
   unsigned int done ;
   wait_queue_head_t wait ;
};
struct rcu_head {
   struct rcu_head *next ;
   void (*func)(struct rcu_head * ) ;
};
struct nameidata;
struct path;
struct vfsmount;
struct qstr {
   unsigned int hash ;
   unsigned int len ;
   unsigned char const   *name ;
};
struct dcookie_struct;
struct inode;
union __anonunion_d_u_89 {
   struct list_head d_child ;
   struct rcu_head d_rcu ;
};
struct dentry_operations;
struct super_block;
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 ;
   union __anonunion_d_u_89 d_u ;
   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 dcookie_struct *d_cookie ;
   int d_mounted ;
   unsigned char d_iname[36U] ;
};
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 * ) ;
   char *(*d_dname)(struct dentry * , char * , int  ) ;
};
struct path {
   struct vfsmount *mnt ;
   struct dentry *dentry ;
};
struct radix_tree_node;
struct radix_tree_root {
   unsigned int height ;
   gfp_t gfp_mask ;
   struct radix_tree_node *rnode ;
};
struct prio_tree_node;
struct raw_prio_tree_node {
   struct prio_tree_node *left ;
   struct prio_tree_node *right ;
   struct prio_tree_node *parent ;
};
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 ;
};
struct prio_tree_root {
   struct prio_tree_node *prio_tree_node ;
   unsigned short index_bits ;
   unsigned short raw ;
};
enum pid_type {
    PIDTYPE_PID = 0,
    PIDTYPE_PGID = 1,
    PIDTYPE_SID = 2,
    PIDTYPE_MAX = 3
} ;
struct pid_namespace;
struct upid {
   int nr ;
   struct pid_namespace *ns ;
   struct hlist_node pid_chain ;
};
struct pid {
   atomic_t count ;
   unsigned int level ;
   struct hlist_head tasks[3U] ;
   struct rcu_head rcu ;
   struct upid numbers[1U] ;
};
struct pid_link {
   struct hlist_node node ;
   struct pid *pid ;
};
struct kernel_cap_struct {
   __u32 cap[2U] ;
};
typedef struct kernel_cap_struct kernel_cap_t;
struct semaphore {
   spinlock_t lock ;
   unsigned int count ;
   struct list_head wait_list ;
};
struct fiemap_extent {
   __u64 fe_logical ;
   __u64 fe_physical ;
   __u64 fe_length ;
   __u64 fe_reserved64[2U] ;
   __u32 fe_flags ;
   __u32 fe_reserved[3U] ;
};
struct export_operations;
struct iovec;
struct kiocb;
struct pipe_inode_info;
struct poll_table_struct;
struct kstatfs;
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 ;
   struct file *ia_file ;
};
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 ;
};
struct if_dqinfo {
   __u64 dqi_bgrace ;
   __u64 dqi_igrace ;
   __u32 dqi_flags ;
   __u32 dqi_valid ;
};
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[8U] ;
};
struct fs_qfilestat {
   __u64 qfs_ino ;
   __u64 qfs_nblks ;
   __u32 qfs_nextents ;
};
typedef struct fs_qfilestat fs_qfilestat_t;
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 ;
};
struct v1_mem_dqinfo {

};
struct v2_mem_dqinfo {
   unsigned int dqi_blocks ;
   unsigned int dqi_free_blk ;
   unsigned int dqi_free_entry ;
};
typedef __kernel_uid32_t qid_t;
typedef __u64 qsize_t;
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 ;
};
struct quota_format_type;
union __anonunion_u_91 {
   struct v1_mem_dqinfo v1_i ;
   struct v2_mem_dqinfo v2_i ;
};
struct mem_dqinfo {
   struct quota_format_type *dqi_format ;
   int dqi_fmt_id ;
   struct list_head dqi_dirty_list ;
   unsigned long dqi_flags ;
   unsigned int dqi_bgrace ;
   unsigned int dqi_igrace ;
   qsize_t dqi_maxblimit ;
   qsize_t dqi_maxilimit ;
   union __anonunion_u_91 u ;
};
struct dquot {
   struct hlist_node dq_hash ;
   struct list_head dq_inuse ;
   struct list_head dq_free ;
   struct list_head dq_dirty ;
   struct mutex 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 ;
};
struct quota_format_ops {
   int (*check_quota_file)(struct super_block * , int  ) ;
   int (*read_file_info)(struct super_block * , int  ) ;
   int (*write_file_info)(struct super_block * , int  ) ;
   int (*free_file_info)(struct super_block * , int  ) ;
   int (*read_dqblk)(struct dquot * ) ;
   int (*commit_dqblk)(struct dquot * ) ;
   int (*release_dqblk)(struct dquot * ) ;
};
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  ) ;
};
struct quotactl_ops {
   int (*quota_on)(struct super_block * , int  , int  , char * , int  ) ;
   int (*quota_off)(struct super_block * , int  , 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 * ) ;
};
struct quota_format_type {
   int qf_fmt_id ;
   struct quota_format_ops *qf_ops ;
   struct module *qf_owner ;
   struct quota_format_type *qf_next ;
};
struct quota_info {
   unsigned int flags ;
   struct mutex dqio_mutex ;
   struct mutex dqonoff_mutex ;
   struct rw_semaphore dqptr_sem ;
   struct inode *files[2U] ;
   struct mem_dqinfo info[2U] ;
   struct quota_format_ops *ops[2U] ;
};
struct address_space;
struct writeback_control;
union __anonunion_arg_93 {
   char *buf ;
   void *data ;
};
struct __anonstruct_read_descriptor_t_92 {
   size_t written ;
   size_t count ;
   union __anonunion_arg_93 arg ;
   int error ;
};
typedef struct __anonstruct_read_descriptor_t_92 read_descriptor_t;
struct address_space_operations {
   int (*writepage)(struct page * , struct writeback_control * ) ;
   int (*readpage)(struct file * , struct page * ) ;
   void (*sync_page)(struct page * ) ;
   int (*writepages)(struct address_space * , struct writeback_control * ) ;
   int (*set_page_dirty)(struct page * ) ;
   int (*readpages)(struct file * , struct address_space * , struct list_head * ,
                    unsigned int  ) ;
   int (*prepare_write)(struct file * , struct page * , unsigned int  , unsigned int  ) ;
   int (*commit_write)(struct file * , struct page * , unsigned int  , unsigned int  ) ;
   int (*write_begin)(struct file * , struct address_space * , loff_t  , unsigned int  ,
                      unsigned int  , struct page ** , void ** ) ;
   int (*write_end)(struct file * , struct address_space * , loff_t  , unsigned int  ,
                    unsigned int  , struct page * , void * ) ;
   sector_t (*bmap)(struct address_space * , sector_t  ) ;
   void (*invalidatepage)(struct page * , unsigned long  ) ;
   int (*releasepage)(struct page * , gfp_t  ) ;
   ssize_t (*direct_IO)(int  , struct kiocb * , struct iovec  const  * , loff_t  ,
                        unsigned long  ) ;
   int (*get_xip_mem)(struct address_space * , unsigned long  , int  , void ** , unsigned long * ) ;
   int (*migratepage)(struct address_space * , struct page * , struct page * ) ;
   int (*launder_page)(struct page * ) ;
   int (*is_partially_uptodate)(struct page * , read_descriptor_t * , unsigned long  ) ;
};
struct backing_dev_info;
struct address_space {
   struct inode *host ;
   struct radix_tree_root page_tree ;
   spinlock_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  const  *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 ;
};
struct hd_struct;
struct gendisk;
struct block_device {
   dev_t bd_dev ;
   struct inode *bd_inode ;
   int bd_openers ;
   struct mutex bd_mutex ;
   struct semaphore bd_mount_sem ;
   struct list_head bd_inodes ;
   void *bd_holder ;
   int bd_holders ;
   struct list_head bd_holder_list ;
   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 ;
};
struct inode_operations;
struct file_lock;
struct cdev;
union __anonunion_ldv_10683_94 {
   struct pipe_inode_info *i_pipe ;
   struct block_device *i_bdev ;
   struct cdev *i_cdev ;
};
struct dnotify_struct;
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 ;
   unsigned int i_nlink ;
   uid_t i_uid ;
   gid_t i_gid ;
   dev_t i_rdev ;
   u64 i_version ;
   loff_t i_size ;
   struct timespec i_atime ;
   struct timespec i_mtime ;
   struct timespec i_ctime ;
   unsigned int i_blkbits ;
   blkcnt_t i_blocks ;
   unsigned short i_bytes ;
   umode_t i_mode ;
   spinlock_t i_lock ;
   struct mutex i_mutex ;
   struct rw_semaphore i_alloc_sem ;
   struct inode_operations  const  *i_op ;
   struct file_operations  const  *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[2U] ;
   struct list_head i_devices ;
   union __anonunion_ldv_10683_94 ldv_10683 ;
   int i_cindex ;
   __u32 i_generation ;
   unsigned long i_dnotify_mask ;
   struct dnotify_struct *i_dnotify ;
   struct list_head inotify_watches ;
   struct mutex inotify_mutex ;
   unsigned long i_state ;
   unsigned long dirtied_when ;
   unsigned int i_flags ;
   atomic_t i_writecount ;
   void *i_security ;
   void *i_private ;
};
struct fown_struct {
   rwlock_t lock ;
   struct pid *pid ;
   enum pid_type pid_type ;
   uid_t uid ;
   uid_t euid ;
   int signum ;
};
struct file_ra_state {
   unsigned long start ;
   unsigned int size ;
   unsigned int async_size ;
   unsigned int ra_pages ;
   int mmap_miss ;
   loff_t prev_pos ;
};
union __anonunion_f_u_95 {
   struct list_head fu_list ;
   struct rcu_head fu_rcuhead ;
};
struct file {
   union __anonunion_f_u_95 f_u ;
   struct path f_path ;
   struct file_operations  const  *f_op ;
   atomic_long_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 ;
   u64 f_version ;
   void *f_security ;
   void *private_data ;
   struct list_head f_ep_links ;
   spinlock_t f_ep_lock ;
   struct address_space *f_mapping ;
   unsigned long f_mnt_write_state ;
};
struct files_struct;
typedef struct files_struct *fl_owner_t;
struct file_lock_operations {
   void (*fl_copy_lock)(struct file_lock * , struct file_lock * ) ;
   void (*fl_release_private)(struct file_lock * ) ;
};
struct lock_manager_operations {
   int (*fl_compare_owner)(struct file_lock * , struct file_lock * ) ;
   void (*fl_notify)(struct file_lock * ) ;
   int (*fl_grant)(struct file_lock * , struct file_lock * , int  ) ;
   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  ) ;
};
struct nlm_lockowner;
struct nfs_lock_info {
   u32 state ;
   struct nlm_lockowner *owner ;
   struct list_head list ;
};
struct nfs4_lock_state;
struct nfs4_lock_info {
   struct nfs4_lock_state *owner ;
};
struct fasync_struct;
struct __anonstruct_afs_97 {
   struct list_head link ;
   int state ;
};
union __anonunion_fl_u_96 {
   struct nfs_lock_info nfs_fl ;
   struct nfs4_lock_info nfs4_fl ;
   struct __anonstruct_afs_97 afs ;
};
struct file_lock {
   struct file_lock *fl_next ;
   struct list_head fl_link ;
   struct list_head fl_block ;
   fl_owner_t fl_owner ;
   unsigned char fl_flags ;
   unsigned char fl_type ;
   unsigned int fl_pid ;
   struct pid *fl_nspid ;
   wait_queue_head_t fl_wait ;
   struct file *fl_file ;
   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_96 fl_u ;
};
struct fasync_struct {
   int magic ;
   int fa_fd ;
   struct fasync_struct *fa_next ;
   struct file *fa_file ;
};
struct file_system_type;
struct super_operations;
struct xattr_handler;
struct mtd_info;
struct super_block {
   struct list_head s_list ;
   dev_t s_dev ;
   unsigned long s_blocksize ;
   unsigned char s_blocksize_bits ;
   unsigned char s_dirt ;
   unsigned long long s_maxbytes ;
   struct file_system_type *s_type ;
   struct super_operations  const  *s_op ;
   struct dquot_operations *dq_op ;
   struct quotactl_ops *s_qcop ;
   struct export_operations  const  *s_export_op ;
   unsigned long s_flags ;
   unsigned long s_magic ;
   struct dentry *s_root ;
   struct rw_semaphore s_umount ;
   struct mutex 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 list_head s_more_io ;
   struct hlist_head s_anon ;
   struct list_head s_files ;
   struct list_head s_dentry_lru ;
   int s_nr_dentry_unused ;
   struct block_device *s_bdev ;
   struct mtd_info *s_mtd ;
   struct list_head s_instances ;
   struct quota_info s_dquot ;
   int s_frozen ;
   wait_queue_head_t s_wait_unfrozen ;
   char s_id[32U] ;
   void *s_fs_info ;
   struct mutex s_vfs_rename_mutex ;
   u32 s_time_gran ;
   char *s_subtype ;
   char *s_options ;
};
struct fiemap_extent_info {
   unsigned int fi_flags ;
   unsigned int fi_extents_mapped ;
   unsigned int fi_extents_max ;
   struct fiemap_extent *fi_extents_start ;
};
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 (*write)(struct file * , char const   * , size_t  , loff_t * ) ;
   ssize_t (*aio_read)(struct kiocb * , struct iovec  const  * , unsigned long  ,
                       loff_t  ) ;
   ssize_t (*aio_write)(struct kiocb * , struct iovec  const  * , unsigned long  ,
                        loff_t  ) ;
   int (*readdir)(struct file * , void * , int (*)(void * , char const   * , int  ,
                                                   loff_t  , u64  , 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 * , fl_owner_t  ) ;
   int (*release)(struct inode * , struct file * ) ;
   int (*fsync)(struct file * , struct dentry * , int  ) ;
   int (*aio_fsync)(struct kiocb * , int  ) ;
   int (*fasync)(int  , struct file * , int  ) ;
   int (*lock)(struct file * , int  , struct file_lock * ) ;
   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 * , unsigned long  ) ;
   int (*flock)(struct file * , int  , struct file_lock * ) ;
   ssize_t (*splice_write)(struct pipe_inode_info * , struct file * , loff_t * , size_t  ,
                           unsigned int  ) ;
   ssize_t (*splice_read)(struct file * , loff_t * , struct pipe_inode_info * , size_t  ,
                          unsigned int  ) ;
   int (*setlease)(struct file * , long  , struct file_lock ** ) ;
};
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  ) ;
   int (*setattr)(struct dentry * , struct iattr * ) ;
   int (*getattr)(struct vfsmount * , 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   * ) ;
   void (*truncate_range)(struct inode * , loff_t  , loff_t  ) ;
   long (*fallocate)(struct inode * , int  , loff_t  , loff_t  ) ;
   int (*fiemap)(struct inode * , struct fiemap_extent_info * , u64  , u64  ) ;
};
struct seq_file;
struct super_operations {
   struct inode *(*alloc_inode)(struct super_block * ) ;
   void (*destroy_inode)(struct inode * ) ;
   void (*dirty_inode)(struct inode * ) ;
   int (*write_inode)(struct inode * , int  ) ;
   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 * , int  ) ;
   void (*write_super_lockfs)(struct super_block * ) ;
   void (*unlockfs)(struct super_block * ) ;
   int (*statfs)(struct dentry * , 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 * ) ;
   int (*show_stats)(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  ) ;
};
struct file_system_type {
   char const   *name ;
   int fs_flags ;
   int (*get_sb)(struct file_system_type * , int  , char const   * , void * , struct vfsmount * ) ;
   void (*kill_sb)(struct super_block * ) ;
   struct module *owner ;
   struct file_system_type *next ;
   struct list_head fs_supers ;
   struct lock_class_key s_lock_key ;
   struct lock_class_key s_umount_key ;
   struct lock_class_key i_lock_key ;
   struct lock_class_key i_mutex_key ;
   struct lock_class_key i_mutex_dir_key ;
   struct lock_class_key i_alloc_sem_key ;
};
struct bio;
typedef int read_proc_t(char * , char ** , off_t  , int  , int * , void * );
typedef int write_proc_t(struct file * , char const   * , unsigned long  , void * );
struct proc_dir_entry {
   unsigned int low_ino ;
   unsigned short namelen ;
   char const   *name ;
   mode_t mode ;
   nlink_t nlink ;
   uid_t uid ;
   gid_t gid ;
   loff_t size ;
   struct inode_operations  const  *proc_iops ;
   struct file_operations  const  *proc_fops ;
   struct module *owner ;
   struct proc_dir_entry *next ;
   struct proc_dir_entry *parent ;
   struct proc_dir_entry *subdir ;
   void *data ;
   read_proc_t *read_proc ;
   write_proc_t *write_proc ;
   atomic_t count ;
   int pde_users ;
   spinlock_t pde_unload_lock ;
   struct completion *pde_unload_completion ;
   struct list_head pde_openers ;
};
typedef unsigned long kernel_ulong_t;
struct pci_device_id {
   __u32 vendor ;
   __u32 device ;
   __u32 subvendor ;
   __u32 subdevice ;
   __u32 class ;
   __u32 class_mask ;
   kernel_ulong_t driver_data ;
};
struct resource {
   resource_size_t start ;
   resource_size_t end ;
   char const   *name ;
   unsigned long flags ;
   struct resource *parent ;
   struct resource *sibling ;
   struct resource *child ;
};
struct pci_dev;
struct klist_node;
struct klist {
   spinlock_t k_lock ;
   struct list_head k_list ;
   void (*get)(struct klist_node * ) ;
   void (*put)(struct klist_node * ) ;
};
struct klist_node {
   void *n_klist ;
   struct list_head n_node ;
   struct kref n_ref ;
   struct completion n_removed ;
};
struct dma_mapping_ops;
struct dev_archdata {
   void *acpi_handle ;
   struct dma_mapping_ops *dma_ops ;
   void *iommu ;
};
struct driver_private;
struct class;
struct class_private;
struct bus_type;
struct bus_type_private;
struct bus_attribute {
   struct attribute attr ;
   ssize_t (*show)(struct bus_type * , char * ) ;
   ssize_t (*store)(struct bus_type * , char const   * , size_t  ) ;
};
struct device_attribute;
struct driver_attribute;
struct bus_type {
   char const   *name ;
   struct bus_attribute *bus_attrs ;
   struct device_attribute *dev_attrs ;
   struct driver_attribute *drv_attrs ;
   int (*match)(struct device * , struct device_driver * ) ;
   int (*uevent)(struct device * , struct kobj_uevent_env * ) ;
   int (*probe)(struct device * ) ;
   int (*remove)(struct device * ) ;
   void (*shutdown)(struct device * ) ;
   int (*suspend)(struct device * , pm_message_t  ) ;
   int (*suspend_late)(struct device * , pm_message_t  ) ;
   int (*resume_early)(struct device * ) ;
   int (*resume)(struct device * ) ;
   struct pm_ext_ops *pm ;
   struct bus_type_private *p ;
};
struct device_driver {
   char const   *name ;
   struct bus_type *bus ;
   struct module *owner ;
   char const   *mod_name ;
   int (*probe)(struct device * ) ;
   int (*remove)(struct device * ) ;
   void (*shutdown)(struct device * ) ;
   int (*suspend)(struct device * , pm_message_t  ) ;
   int (*resume)(struct device * ) ;
   struct attribute_group **groups ;
   struct pm_ops *pm ;
   struct driver_private *p ;
};
struct driver_attribute {
   struct attribute attr ;
   ssize_t (*show)(struct device_driver * , char * ) ;
   ssize_t (*store)(struct device_driver * , char const   * , size_t  ) ;
};
struct class_attribute;
struct class {
   char const   *name ;
   struct module *owner ;
   struct class_attribute *class_attrs ;
   struct device_attribute *dev_attrs ;
   struct kobject *dev_kobj ;
   int (*dev_uevent)(struct device * , struct kobj_uevent_env * ) ;
   void (*class_release)(struct class * ) ;
   void (*dev_release)(struct device * ) ;
   int (*suspend)(struct device * , pm_message_t  ) ;
   int (*resume)(struct device * ) ;
   struct pm_ops *pm ;
   struct class_private *p ;
};
struct device_type;
struct class_attribute {
   struct attribute attr ;
   ssize_t (*show)(struct class * , char * ) ;
   ssize_t (*store)(struct class * , char const   * , size_t  ) ;
};
struct device_type {
   char const   *name ;
   struct attribute_group **groups ;
   int (*uevent)(struct device * , struct kobj_uevent_env * ) ;
   void (*release)(struct device * ) ;
   int (*suspend)(struct device * , pm_message_t  ) ;
   int (*resume)(struct device * ) ;
   struct pm_ops *pm ;
};
struct device_attribute {
   struct attribute attr ;
   ssize_t (*show)(struct device * , struct device_attribute * , char * ) ;
   ssize_t (*store)(struct device * , struct device_attribute * , char const   * ,
                    size_t  ) ;
};
struct device_dma_parameters {
   unsigned int max_segment_size ;
   unsigned long segment_boundary_mask ;
};
struct dma_coherent_mem;
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[20U] ;
   char const   *init_name ;
   struct device_type *type ;
   unsigned char uevent_suppress : 1 ;
   struct semaphore sem ;
   struct bus_type *bus ;
   struct device_driver *driver ;
   void *driver_data ;
   void *platform_data ;
   struct dev_pm_info power ;
   int numa_node ;
   u64 *dma_mask ;
   u64 coherent_dma_mask ;
   struct device_dma_parameters *dma_parms ;
   struct list_head dma_pools ;
   struct dma_coherent_mem *dma_mem ;
   struct dev_archdata archdata ;
   spinlock_t devres_lock ;
   struct list_head devres_head ;
   struct klist_node knode_class ;
   struct class *class ;
   dev_t devt ;
   struct attribute_group **groups ;
   void (*release)(struct device * ) ;
};
struct hotplug_slot;
struct pci_slot {
   struct pci_bus *bus ;
   struct list_head list ;
   struct hotplug_slot *hotplug ;
   unsigned char number ;
   struct kobject kobj ;
};
typedef int pci_power_t;
typedef unsigned int pci_channel_state_t;
enum pci_channel_state {
    pci_channel_io_normal = 1,
    pci_channel_io_frozen = 2,
    pci_channel_io_perm_failure = 3
} ;
typedef unsigned short pci_dev_flags_t;
typedef unsigned short pci_bus_flags_t;
struct pcie_link_state;
struct pci_vpd;
struct pci_driver;
struct pci_dev {
   struct list_head bus_list ;
   struct pci_bus *bus ;
   struct pci_bus *subordinate ;
   void *sysdata ;
   struct proc_dir_entry *procent ;
   struct pci_slot *slot ;
   unsigned int devfn ;
   unsigned short vendor ;
   unsigned short device ;
   unsigned short subsystem_vendor ;
   unsigned short subsystem_device ;
   unsigned int class ;
   u8 revision ;
   u8 hdr_type ;
   u8 pcie_type ;
   u8 rom_base_reg ;
   u8 pin ;
   struct pci_driver *driver ;
   u64 dma_mask ;
   struct device_dma_parameters dma_parms ;
   pci_power_t current_state ;
   int pm_cap ;
   unsigned char pme_support : 5 ;
   unsigned char d1_support : 1 ;
   unsigned char d2_support : 1 ;
   unsigned char no_d1d2 : 1 ;
   struct pcie_link_state *link_state ;
   pci_channel_state_t error_state ;
   struct device dev ;
   int cfg_size ;
   unsigned int irq ;
   struct resource resource[12U] ;
   unsigned char transparent : 1 ;
   unsigned char multifunction : 1 ;
   unsigned char is_added : 1 ;
   unsigned char is_busmaster : 1 ;
   unsigned char no_msi : 1 ;
   unsigned char block_ucfg_access : 1 ;
   unsigned char broken_parity_status : 1 ;
   unsigned char msi_enabled : 1 ;
   unsigned char msix_enabled : 1 ;
   unsigned char is_managed : 1 ;
   unsigned char is_pcie : 1 ;
   pci_dev_flags_t dev_flags ;
   atomic_t enable_cnt ;
   u32 saved_config_space[16U] ;
   struct hlist_head saved_cap_space ;
   struct bin_attribute *rom_attr ;
   int rom_attr_enabled ;
   struct bin_attribute *res_attr[12U] ;
   struct bin_attribute *res_attr_wc[12U] ;
   struct list_head msi_list ;
   struct pci_vpd *vpd ;
};
struct pci_ops;
struct pci_bus {
   struct list_head node ;
   struct pci_bus *parent ;
   struct list_head children ;
   struct list_head devices ;
   struct pci_dev *self ;
   struct list_head slots ;
   struct resource *resource[16U] ;
   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[48U] ;
   unsigned short bridge_ctl ;
   pci_bus_flags_t bus_flags ;
   struct device *bridge ;
   struct device dev ;
   struct bin_attribute *legacy_io ;
   struct bin_attribute *legacy_mem ;
   unsigned char is_added : 1 ;
};
struct pci_ops {
   int (*read)(struct pci_bus * , unsigned int  , int  , int  , u32 * ) ;
   int (*write)(struct pci_bus * , unsigned int  , int  , int  , u32  ) ;
};
struct pci_dynids {
   spinlock_t lock ;
   struct list_head list ;
   unsigned char use_driver_data : 1 ;
};
typedef unsigned int pci_ers_result_t;
struct pci_error_handlers {
   pci_ers_result_t (*error_detected)(struct pci_dev * , enum pci_channel_state  ) ;
   pci_ers_result_t (*mmio_enabled)(struct pci_dev * ) ;
   pci_ers_result_t (*link_reset)(struct pci_dev * ) ;
   pci_ers_result_t (*slot_reset)(struct pci_dev * ) ;
   void (*resume)(struct pci_dev * ) ;
};
struct pci_driver {
   struct list_head node ;
   char *name ;
   struct pci_device_id  const  *id_table ;
   int (*probe)(struct pci_dev * , struct pci_device_id  const  * ) ;
   void (*remove)(struct pci_dev * ) ;
   int (*suspend)(struct pci_dev * , pm_message_t  ) ;
   int (*suspend_late)(struct pci_dev * , pm_message_t  ) ;
   int (*resume_early)(struct pci_dev * ) ;
   int (*resume)(struct pci_dev * ) ;
   void (*shutdown)(struct pci_dev * ) ;
   struct pm_ext_ops *pm ;
   struct pci_error_handlers *err_handler ;
   struct device_driver driver ;
   struct pci_dynids dynids ;
};
struct scatterlist {
   unsigned long sg_magic ;
   unsigned long page_link ;
   unsigned int offset ;
   unsigned int length ;
   dma_addr_t dma_address ;
   unsigned int dma_length ;
};
struct rb_node {
   unsigned long rb_parent_color ;
   struct rb_node *rb_right ;
   struct rb_node *rb_left ;
};
struct rb_root {
   struct rb_node *rb_node ;
};
typedef atomic_long_t mm_counter_t;
struct __anonstruct_ldv_14706_100 {
   u16 inuse ;
   u16 objects ;
};
union __anonunion_ldv_14707_99 {
   atomic_t _mapcount ;
   struct __anonstruct_ldv_14706_100 ldv_14706 ;
};
struct __anonstruct_ldv_14712_102 {
   unsigned long private ;
   struct address_space *mapping ;
};
union __anonunion_ldv_14716_101 {
   struct __anonstruct_ldv_14712_102 ldv_14712 ;
   spinlock_t ptl ;
   struct kmem_cache *slab ;
   struct page *first_page ;
};
union __anonunion_ldv_14720_103 {
   unsigned long index ;
   void *freelist ;
};
struct page {
   unsigned long flags ;
   atomic_t _count ;
   union __anonunion_ldv_14707_99 ldv_14707 ;
   union __anonunion_ldv_14716_101 ldv_14716 ;
   union __anonunion_ldv_14720_103 ldv_14720 ;
   struct list_head lru ;
   unsigned long page_cgroup ;
};
struct __anonstruct_vm_set_105 {
   struct list_head list ;
   void *parent ;
   struct vm_area_struct *head ;
};
union __anonunion_shared_104 {
   struct __anonstruct_vm_set_105 vm_set ;
   struct raw_prio_tree_node prio_tree_node ;
};
struct anon_vma;
struct vm_operations_struct;
struct mempolicy;
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_104 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 ;
   struct mempolicy *vm_policy ;
};
struct core_thread {
   struct task_struct *task ;
   struct core_thread *next ;
};
struct core_state {
   atomic_t nr_threads ;
   struct core_thread dumper ;
   struct completion startup ;
};
struct kioctx;
struct mmu_notifier_mm;
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 * , unsigned long  , unsigned long  ,
                                      unsigned long  , unsigned long  ) ;
   void (*unmap_area)(struct mm_struct * , unsigned long  ) ;
   unsigned long mmap_base ;
   unsigned long task_size ;
   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 ;
   mm_counter_t _file_rss ;
   mm_counter_t _anon_rss ;
   unsigned long hiwater_rss ;
   unsigned long hiwater_vm ;
   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 ;
   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 saved_auxv[42U] ;
   cpumask_t cpu_vm_mask ;
   mm_context_t context ;
   unsigned int faultstamp ;
   unsigned int token_priority ;
   unsigned int last_interval ;
   unsigned long flags ;
   struct core_state *core_state ;
   rwlock_t ioctx_list_lock ;
   struct kioctx *ioctx_list ;
   struct task_struct *owner ;
   struct file *exe_file ;
   unsigned long num_exe_file_vmas ;
   struct mmu_notifier_mm *mmu_notifier_mm ;
};
struct user_struct;
struct vm_fault {
   unsigned int flags ;
   unsigned long pgoff ;
   void *virtual_address ;
   struct page *page ;
};
struct vm_operations_struct {
   void (*open)(struct vm_area_struct * ) ;
   void (*close)(struct vm_area_struct * ) ;
   int (*fault)(struct vm_area_struct * , struct vm_fault * ) ;
   int (*page_mkwrite)(struct vm_area_struct * , struct page * ) ;
   int (*access)(struct vm_area_struct * , unsigned long  , void * , int  , int  ) ;
   int (*set_policy)(struct vm_area_struct * , struct mempolicy * ) ;
   struct mempolicy *(*get_policy)(struct vm_area_struct * , unsigned long  ) ;
   int (*migrate)(struct vm_area_struct * , nodemask_t const   * , nodemask_t const   * ,
                  unsigned long  ) ;
};
struct dma_mapping_ops {
   int (*mapping_error)(struct device * , dma_addr_t  ) ;
   void *(*alloc_coherent)(struct device * , size_t  , dma_addr_t * , gfp_t  ) ;
   void (*free_coherent)(struct device * , size_t  , void * , dma_addr_t  ) ;
   dma_addr_t (*map_single)(struct device * , phys_addr_t  , size_t  , int  ) ;
   void (*unmap_single)(struct device * , dma_addr_t  , size_t  , int  ) ;
   void (*sync_single_for_cpu)(struct device * , dma_addr_t  , size_t  , int  ) ;
   void (*sync_single_for_device)(struct device * , dma_addr_t  , size_t  , int  ) ;
   void (*sync_single_range_for_cpu)(struct device * , dma_addr_t  , unsigned long  ,
                                     size_t  , int  ) ;
   void (*sync_single_range_for_device)(struct device * , dma_addr_t  , unsigned long  ,
                                        size_t  , int  ) ;
   void (*sync_sg_for_cpu)(struct device * , struct scatterlist * , int  , int  ) ;
   void (*sync_sg_for_device)(struct device * , struct scatterlist * , int  , int  ) ;
   int (*map_sg)(struct device * , struct scatterlist * , int  , int  ) ;
   void (*unmap_sg)(struct device * , struct scatterlist * , int  , int  ) ;
   int (*dma_supported)(struct device * , u64  ) ;
   int is_phys ;
};
typedef unsigned long cputime_t;
struct sem_undo_list;
struct sem_undo_list {
   atomic_t refcnt ;
   spinlock_t lock ;
   struct list_head list_proc ;
};
struct sysv_sem {
   struct sem_undo_list *undo_list ;
};
struct siginfo;
struct __anonstruct_sigset_t_106 {
   unsigned long sig[1U] ;
};
typedef struct __anonstruct_sigset_t_106 sigset_t;
typedef void __signalfn_t(int  );
typedef __signalfn_t *__sighandler_t;
typedef void __restorefn_t(void);
typedef __restorefn_t *__sigrestore_t;
struct sigaction {
   __sighandler_t sa_handler ;
   unsigned long sa_flags ;
   __sigrestore_t sa_restorer ;
   sigset_t sa_mask ;
};
struct k_sigaction {
   struct sigaction sa ;
};
union sigval {
   int sival_int ;
   void *sival_ptr ;
};
typedef union sigval sigval_t;
struct __anonstruct__kill_108 {
   pid_t _pid ;
   uid_t _uid ;
};
struct __anonstruct__timer_109 {
   timer_t _tid ;
   int _overrun ;
   char _pad[0U] ;
   sigval_t _sigval ;
   int _sys_private ;
};
struct __anonstruct__rt_110 {
   pid_t _pid ;
   uid_t _uid ;
   sigval_t _sigval ;
};
struct __anonstruct__sigchld_111 {
   pid_t _pid ;
   uid_t _uid ;
   int _status ;
   clock_t _utime ;
   clock_t _stime ;
};
struct __anonstruct__sigfault_112 {
   void *_addr ;
};
struct __anonstruct__sigpoll_113 {
   long _band ;
   int _fd ;
};
union __anonunion__sifields_107 {
   int _pad[28U] ;
   struct __anonstruct__kill_108 _kill ;
   struct __anonstruct__timer_109 _timer ;
   struct __anonstruct__rt_110 _rt ;
   struct __anonstruct__sigchld_111 _sigchld ;
   struct __anonstruct__sigfault_112 _sigfault ;
   struct __anonstruct__sigpoll_113 _sigpoll ;
};
struct siginfo {
   int si_signo ;
   int si_errno ;
   int si_code ;
   union __anonunion__sifields_107 _sifields ;
};
typedef struct siginfo siginfo_t;
struct sigpending {
   struct list_head list ;
   sigset_t signal ;
};
struct fs_struct {
   atomic_t count ;
   rwlock_t lock ;
   int umask ;
   struct path root ;
   struct path pwd ;
};
struct prop_local_single {
   unsigned long events ;
   unsigned long period ;
   int shift ;
   spinlock_t lock ;
};
struct __anonstruct_seccomp_t_116 {
   int mode ;
};
typedef struct __anonstruct_seccomp_t_116 seccomp_t;
struct plist_head {
   struct list_head prio_list ;
   struct list_head node_list ;
   spinlock_t *lock ;
};
struct rt_mutex_waiter;
struct rlimit {
   unsigned long rlim_cur ;
   unsigned long rlim_max ;
};
struct hrtimer_clock_base;
struct hrtimer_cpu_base;
enum hrtimer_restart {
    HRTIMER_NORESTART = 0,
    HRTIMER_RESTART = 1
} ;
enum hrtimer_cb_mode {
    HRTIMER_CB_SOFTIRQ = 0,
    HRTIMER_CB_IRQSAFE = 1,
    HRTIMER_CB_IRQSAFE_NO_RESTART = 2,
    HRTIMER_CB_IRQSAFE_PERCPU = 3,
    HRTIMER_CB_IRQSAFE_UNLOCKED = 4
} ;
struct hrtimer {
   struct rb_node node ;
   ktime_t expires ;
   enum hrtimer_restart (*function)(struct hrtimer * ) ;
   struct hrtimer_clock_base *base ;
   unsigned long state ;
   enum hrtimer_cb_mode cb_mode ;
   struct list_head cb_entry ;
   void *start_site ;
   char start_comm[16U] ;
   int start_pid ;
};
struct hrtimer_clock_base {
   struct hrtimer_cpu_base *cpu_base ;
   clockid_t index ;
   struct rb_root active ;
   struct rb_node *first ;
   ktime_t resolution ;
   ktime_t (*get_time)(void) ;
   ktime_t (*get_softirq_time)(void) ;
   ktime_t softirq_time ;
   ktime_t offset ;
   int (*reprogram)(struct hrtimer * , struct hrtimer_clock_base * , ktime_t  ) ;
};
struct hrtimer_cpu_base {
   spinlock_t lock ;
   struct hrtimer_clock_base clock_base[2U] ;
   struct list_head cb_pending ;
   ktime_t expires_next ;
   int hres_active ;
   unsigned long nr_events ;
};
struct task_io_accounting {
   u64 rchar ;
   u64 wchar ;
   u64 syscr ;
   u64 syscw ;
   u64 read_bytes ;
   u64 write_bytes ;
   u64 cancelled_write_bytes ;
};
struct latency_record {
   unsigned long backtrace[12U] ;
   unsigned int count ;
   unsigned long time ;
   unsigned long max ;
};
struct futex_pi_state;
struct robust_list_head;
struct cfs_rq;
struct task_group;
struct nsproxy;
struct io_event {
   __u64 data ;
   __u64 obj ;
   __s64 res ;
   __s64 res2 ;
};
struct iovec {
   void *iov_base ;
   __kernel_size_t iov_len ;
};
union __anonunion_ki_obj_117 {
   void *user ;
   struct task_struct *tsk ;
};
struct kiocb {
   struct list_head ki_run_list ;
   unsigned 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 * ) ;
   union __anonunion_ki_obj_117 ki_obj ;
   __u64 ki_user_data ;
   wait_queue_t ki_wait ;
   loff_t ki_pos ;
   void *private ;
   unsigned short ki_opcode ;
   size_t ki_nbytes ;
   char *ki_buf ;
   size_t ki_left ;
   struct iovec ki_inline_vec ;
   struct iovec *ki_iovec ;
   unsigned long ki_nr_segs ;
   unsigned long ki_cur_seg ;
   struct list_head ki_list ;
   struct file *ki_eventfd ;
};
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[8U] ;
};
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 delayed_work wq ;
};
struct sighand_struct {
   atomic_t count ;
   struct k_sigaction action[64U] ;
   spinlock_t siglock ;
   wait_queue_head_t signalfd_wqh ;
};
struct pacct_struct {
   int ac_flag ;
   long ac_exitcode ;
   unsigned long ac_mem ;
   cputime_t ac_utime ;
   cputime_t ac_stime ;
   unsigned long ac_minflt ;
   unsigned long ac_majflt ;
};
union __anonunion_ldv_18159_118 {
   pid_t pgrp ;
   pid_t __pgrp ;
};
union __anonunion_ldv_18164_119 {
   pid_t session ;
   pid_t __session ;
};
struct tty_struct;
struct taskstats;
struct tty_audit_buf;
struct signal_struct {
   atomic_t count ;
   atomic_t live ;
   wait_queue_head_t wait_chldexit ;
   struct task_struct *curr_target ;
   struct sigpending shared_pending ;
   int group_exit_code ;
   int notify_count ;
   struct task_struct *group_exit_task ;
   int group_stop_count ;
   unsigned int flags ;
   struct list_head posix_timers ;
   struct hrtimer real_timer ;
   struct pid *leader_pid ;
   ktime_t it_real_incr ;
   cputime_t it_prof_expires ;
   cputime_t it_virt_expires ;
   cputime_t it_prof_incr ;
   cputime_t it_virt_incr ;
   union __anonunion_ldv_18159_118 ldv_18159 ;
   struct pid *tty_old_pgrp ;
   union __anonunion_ldv_18164_119 ldv_18164 ;
   int leader ;
   struct tty_struct *tty ;
   cputime_t utime ;
   cputime_t stime ;
   cputime_t cutime ;
   cputime_t cstime ;
   cputime_t gtime ;
   cputime_t cgtime ;
   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 inblock ;
   unsigned long oublock ;
   unsigned long cinblock ;
   unsigned long coublock ;
   struct task_io_accounting ioac ;
   unsigned long long sum_sched_runtime ;
   struct rlimit rlim[16U] ;
   struct list_head cpu_timers[3U] ;
   struct key *session_keyring ;
   struct key *process_keyring ;
   struct pacct_struct pacct ;
   struct taskstats *stats ;
   unsigned int audit_tty ;
   struct tty_audit_buf *tty_audit_buf ;
};
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 hlist_node uidhash_node ;
   uid_t uid ;
   struct task_group *tg ;
   struct kobject kobj ;
   struct work_struct work ;
};
struct reclaim_state;
struct sched_info {
   unsigned long pcount ;
   unsigned long long cpu_time ;
   unsigned long long run_delay ;
   unsigned long long last_arrival ;
   unsigned long long last_queued ;
   unsigned int bkl_count ;
};
struct task_delay_info {
   spinlock_t lock ;
   unsigned int flags ;
   struct timespec blkio_start ;
   struct timespec blkio_end ;
   u64 blkio_delay ;
   u64 swapin_delay ;
   u32 blkio_count ;
   u32 swapin_count ;
   struct timespec freepages_start ;
   struct timespec freepages_end ;
   u64 freepages_delay ;
   u32 freepages_count ;
};
enum cpu_idle_type {
    CPU_IDLE = 0,
    CPU_NOT_IDLE = 1,
    CPU_NEWLY_IDLE = 2,
    CPU_MAX_IDLE_TYPES = 3
} ;
struct sched_group {
   struct sched_group *next ;
   cpumask_t cpumask ;
   unsigned int __cpu_power ;
   u32 reciprocal_cpu_power ;
};
enum sched_domain_level {
    SD_LV_NONE = 0,
    SD_LV_SIBLING = 1,
    SD_LV_MC = 2,
    SD_LV_CPU = 3,
    SD_LV_NODE = 4,
    SD_LV_ALLNODES = 5,
    SD_LV_MAX = 6
} ;
struct sched_domain {
   struct sched_domain *parent ;
   struct sched_domain *child ;
   struct sched_group *groups ;
   cpumask_t span ;
   unsigned long min_interval ;
   unsigned long max_interval ;
   unsigned int busy_factor ;
   unsigned int imbalance_pct ;
   unsigned int cache_nice_tries ;
   unsigned int busy_idx ;
   unsigned int idle_idx ;
   unsigned int newidle_idx ;
   unsigned int wake_idx ;
   unsigned int forkexec_idx ;
   int flags ;
   enum sched_domain_level level ;
   unsigned long last_balance ;
   unsigned int balance_interval ;
   unsigned int nr_balance_failed ;
   u64 last_update ;
   unsigned int lb_count[3U] ;
   unsigned int lb_failed[3U] ;
   unsigned int lb_balanced[3U] ;
   unsigned int lb_imbalance[3U] ;
   unsigned int lb_gained[3U] ;
   unsigned int lb_hot_gained[3U] ;
   unsigned int lb_nobusyg[3U] ;
   unsigned int lb_nobusyq[3U] ;
   unsigned int alb_count ;
   unsigned int alb_failed ;
   unsigned int alb_pushed ;
   unsigned int sbe_count ;
   unsigned int sbe_balanced ;
   unsigned int sbe_pushed ;
   unsigned int sbf_count ;
   unsigned int sbf_balanced ;
   unsigned int sbf_pushed ;
   unsigned int ttwu_wake_remote ;
   unsigned int ttwu_move_affine ;
   unsigned int ttwu_move_balance ;
   char *name ;
};
struct io_context;
struct group_info {
   int ngroups ;
   atomic_t usage ;
   gid_t small_block[32U] ;
   int nblocks ;
   gid_t *blocks[0U] ;
};
struct audit_context;
struct rq;
struct sched_class {
   struct sched_class  const  *next ;
   void (*enqueue_task)(struct rq * , struct task_struct * , int  ) ;
   void (*dequeue_task)(struct rq * , struct task_struct * , int  ) ;
   void (*yield_task)(struct rq * ) ;
   int (*select_task_rq)(struct task_struct * , int  ) ;
   void (*check_preempt_curr)(struct rq * , struct task_struct * , int  ) ;
   struct task_struct *(*pick_next_task)(struct rq * ) ;
   void (*put_prev_task)(struct rq * , struct task_struct * ) ;
   unsigned long (*load_balance)(struct rq * , int  , struct rq * , unsigned long  ,
                                 struct sched_domain * , enum cpu_idle_type  , int * ,
                                 int * ) ;
   int (*move_one_task)(struct rq * , int  , struct rq * , struct sched_domain * ,
                        enum cpu_idle_type  ) ;
   void (*pre_schedule)(struct rq * , struct task_struct * ) ;
   void (*post_schedule)(struct rq * ) ;
   void (*task_wake_up)(struct rq * , struct task_struct * ) ;
   void (*set_curr_task)(struct rq * ) ;
   void (*task_tick)(struct rq * , struct task_struct * , int  ) ;
   void (*task_new)(struct rq * , struct task_struct * ) ;
   void (*set_cpus_allowed)(struct task_struct * , cpumask_t const   * ) ;
   void (*rq_online)(struct rq * ) ;
   void (*rq_offline)(struct rq * ) ;
   void (*switched_from)(struct rq * , struct task_struct * , int  ) ;
   void (*switched_to)(struct rq * , struct task_struct * , int  ) ;
   void (*prio_changed)(struct rq * , struct task_struct * , int  , int  ) ;
   void (*moved_group)(struct task_struct * ) ;
};
struct load_weight {
   unsigned long weight ;
   unsigned long inv_weight ;
};
struct sched_entity {
   struct load_weight load ;
   struct rb_node run_node ;
   struct list_head group_node ;
   unsigned int on_rq ;
   u64 exec_start ;
   u64 sum_exec_runtime ;
   u64 vruntime ;
   u64 prev_sum_exec_runtime ;
   u64 last_wakeup ;
   u64 avg_overlap ;
   u64 wait_start ;
   u64 wait_max ;
   u64 wait_count ;
   u64 wait_sum ;
   u64 sleep_start ;
   u64 sleep_max ;
   s64 sum_sleep_runtime ;
   u64 block_start ;
   u64 block_max ;
   u64 exec_max ;
   u64 slice_max ;
   u64 nr_migrations ;
   u64 nr_migrations_cold ;
   u64 nr_failed_migrations_affine ;
   u64 nr_failed_migrations_running ;
   u64 nr_failed_migrations_hot ;
   u64 nr_forced_migrations ;
   u64 nr_forced2_migrations ;
   u64 nr_wakeups ;
   u64 nr_wakeups_sync ;
   u64 nr_wakeups_migrate ;
   u64 nr_wakeups_local ;
   u64 nr_wakeups_remote ;
   u64 nr_wakeups_affine ;
   u64 nr_wakeups_affine_attempts ;
   u64 nr_wakeups_passive ;
   u64 nr_wakeups_idle ;
   struct sched_entity *parent ;
   struct cfs_rq *cfs_rq ;
   struct cfs_rq *my_q ;
};
struct rt_rq;
struct sched_rt_entity {
   struct list_head run_list ;
   unsigned long timeout ;
   unsigned int time_slice ;
   int nr_cpus_allowed ;
   struct sched_rt_entity *back ;
   struct sched_rt_entity *parent ;
   struct rt_rq *rt_rq ;
   struct rt_rq *my_q ;
};
struct linux_binfmt;
struct css_set;
struct compat_robust_list_head;
struct task_struct {
   long volatile   state ;
   void *stack ;
   atomic_t usage ;
   unsigned int flags ;
   unsigned int ptrace ;
   int lock_depth ;
   int prio ;
   int static_prio ;
   int normal_prio ;
   unsigned int rt_priority ;
   struct sched_class  const  *sched_class ;
   struct sched_entity se ;
   struct sched_rt_entity rt ;
   struct hlist_head preempt_notifiers ;
   unsigned char fpu_counter ;
   s8 oomkilladj ;
   unsigned int policy ;
   cpumask_t cpus_allowed ;
   struct sched_info sched_info ;
   struct list_head tasks ;
   struct mm_struct *mm ;
   struct mm_struct *active_mm ;
   struct linux_binfmt *binfmt ;
   int exit_state ;
   int exit_code ;
   int exit_signal ;
   int pdeath_signal ;
   unsigned int personality ;
   unsigned char 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 list_head ptraced ;
   struct list_head ptrace_entry ;
   struct pid_link pids[3U] ;
   struct list_head thread_group ;
   struct completion *vfork_done ;
   int *set_child_tid ;
   int *clear_child_tid ;
   cputime_t utime ;
   cputime_t stime ;
   cputime_t utimescaled ;
   cputime_t stimescaled ;
   cputime_t gtime ;
   cputime_t prev_utime ;
   cputime_t prev_stime ;
   unsigned long nvcsw ;
   unsigned long nivcsw ;
   struct timespec start_time ;
   struct timespec real_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[3U] ;
   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 ;
   kernel_cap_t cap_bset ;
   struct user_struct *user ;
   unsigned int securebits ;
   unsigned char jit_keyring ;
   struct key *request_key_auth ;
   struct key *thread_keyring ;
   char comm[16U] ;
   int link_count ;
   int total_link_count ;
   struct sysv_sem sysvsem ;
   unsigned long last_switch_timestamp ;
   unsigned long last_switch_count ;
   struct thread_struct thread ;
   struct fs_struct *fs ;
   struct files_struct *files ;
   struct nsproxy *nsproxy ;
   struct signal_struct *signal ;
   struct sighand_struct *sighand ;
   sigset_t blocked ;
   sigset_t real_blocked ;
   sigset_t saved_sigmask ;
   struct sigpending pending ;
   unsigned long sas_ss_sp ;
   size_t sas_ss_size ;
   int (*notifier)(void * ) ;
   void *notifier_data ;
   sigset_t *notifier_mask ;
   void *security ;
   struct audit_context *audit_context ;
   uid_t loginuid ;
   unsigned int sessionid ;
   seccomp_t seccomp ;
   u32 parent_exec_id ;
   u32 self_exec_id ;
   spinlock_t alloc_lock ;
   spinlock_t pi_lock ;
   struct plist_head pi_waiters ;
   struct rt_mutex_waiter *pi_blocked_on ;
   struct mutex_waiter *blocked_on ;
   unsigned int irq_events ;
   int hardirqs_enabled ;
   unsigned long hardirq_enable_ip ;
   unsigned int hardirq_enable_event ;
   unsigned long hardirq_disable_ip ;
   unsigned int hardirq_disable_event ;
   int softirqs_enabled ;
   unsigned long softirq_disable_ip ;
   unsigned int softirq_disable_event ;
   unsigned long softirq_enable_ip ;
   unsigned int softirq_enable_event ;
   int hardirq_context ;
   int softirq_context ;
   u64 curr_chain_key ;
   int lockdep_depth ;
   unsigned int lockdep_recursion ;
   struct held_lock held_locks[48U] ;
   void *journal_info ;
   struct bio *bio_list ;
   struct bio **bio_tail ;
   struct reclaim_state *reclaim_state ;
   struct backing_dev_info *backing_dev_info ;
   struct io_context *io_context ;
   unsigned long ptrace_message ;
   siginfo_t *last_siginfo ;
   struct task_io_accounting ioac ;
   u64 acct_rss_mem1 ;
   u64 acct_vm_mem1 ;
   cputime_t acct_timexpd ;
   nodemask_t mems_allowed ;
   int cpuset_mems_generation ;
   int cpuset_mem_spread_rotor ;
   struct css_set *cgroups ;
   struct list_head cg_list ;
   struct robust_list_head *robust_list ;
   struct compat_robust_list_head *compat_robust_list ;
   struct list_head pi_state_list ;
   struct futex_pi_state *pi_state_cache ;
   struct mempolicy *mempolicy ;
   short il_next ;
   atomic_t fs_excl ;
   struct rcu_head rcu ;
   struct pipe_inode_info *splice_pipe ;
   struct task_delay_info *delays ;
   int make_it_fail ;
   struct prop_local_single dirties ;
   int latency_record_count ;
   struct latency_record latency_record[32U] ;
};
struct cdev {
   struct kobject kobj ;
   struct module *owner ;
   struct file_operations  const  *ops ;
   struct list_head list ;
   dev_t dev ;
   unsigned int count ;
};
struct exception_table_entry {
   unsigned long insn ;
   unsigned long fixup ;
};
typedef s32 compat_time_t;
typedef s32 compat_long_t;
struct compat_timespec {
   compat_time_t tv_sec ;
   s32 tv_nsec ;
};
typedef u32 compat_uptr_t;
struct compat_robust_list {
   compat_uptr_t next ;
};
struct compat_robust_list_head {
   struct compat_robust_list list ;
   compat_long_t futex_offset ;
   compat_uptr_t list_op_pending ;
};
enum chipset_type {
    NOT_SUPPORTED = 0,
    SUPPORTED = 1
} ;
struct agp_version {
   u16 major ;
   u16 minor ;
};
struct agp_kern_info {
   struct agp_version version ;
   struct pci_dev *device ;
   enum chipset_type chipset ;
   unsigned long mode ;
   unsigned long aper_base ;
   size_t aper_size ;
   int max_memory ;
   int current_memory ;
   bool cant_use_aperture ;
   unsigned long page_mask ;
   struct vm_operations_struct *vm_ops ;
};
struct agp_bridge_data;
struct poll_table_struct {
   void (*qproc)(struct file * , wait_queue_head_t * , struct poll_table_struct * ) ;
};
typedef int irqreturn_t;
typedef unsigned int drm_handle_t;
typedef unsigned int drm_drawable_t;
typedef unsigned int drm_magic_t;
struct drm_tex_region {
   unsigned char next ;
   unsigned char prev ;
   unsigned char in_use ;
   unsigned char padding ;
   unsigned int age ;
};
struct drm_hw_lock {
   unsigned int volatile   lock ;
   char padding[60U] ;
};
enum drm_map_type {
    _DRM_FRAME_BUFFER = 0,
    _DRM_REGISTERS = 1,
    _DRM_SHM = 2,
    _DRM_AGP = 3,
    _DRM_SCATTER_GATHER = 4,
    _DRM_CONSISTENT = 5
} ;
enum drm_map_flags {
    _DRM_RESTRICTED = 1,
    _DRM_READ_ONLY = 2,
    _DRM_LOCKED = 4,
    _DRM_KERNEL = 8,
    _DRM_WRITE_COMBINING = 16,
    _DRM_CONTAINS_LOCK = 32,
    _DRM_REMOVABLE = 64,
    _DRM_DRIVER = 128
} ;
struct drm_map {
   unsigned long offset ;
   unsigned long size ;
   enum drm_map_type type ;
   enum drm_map_flags flags ;
   void *handle ;
   int mtrr ;
};
enum drm_stat_type {
    _DRM_STAT_LOCK = 0,
    _DRM_STAT_OPENS = 1,
    _DRM_STAT_CLOSES = 2,
    _DRM_STAT_IOCTLS = 3,
    _DRM_STAT_LOCKS = 4,
    _DRM_STAT_UNLOCKS = 5,
    _DRM_STAT_VALUE = 6,
    _DRM_STAT_BYTE = 7,
    _DRM_STAT_COUNT = 8,
    _DRM_STAT_IRQ = 9,
    _DRM_STAT_PRIMARY = 10,
    _DRM_STAT_SECONDARY = 11,
    _DRM_STAT_DMA = 12,
    _DRM_STAT_SPECIAL = 13,
    _DRM_STAT_MISSED = 14
} ;
enum drm_ctx_flags {
    _DRM_CONTEXT_PRESERVED = 1,
    _DRM_CONTEXT_2DONLY = 2
} ;
struct drm_set_version {
   int drm_di_major ;
   int drm_di_minor ;
   int drm_dd_major ;
   int drm_dd_minor ;
};
struct idr_layer {
   unsigned long bitmap ;
   struct idr_layer *ary[64U] ;
   int count ;
   struct rcu_head rcu_head ;
};
struct idr {
   struct idr_layer *top ;
   struct idr_layer *id_free ;
   int layers ;
   int id_free_cnt ;
   spinlock_t lock ;
};
struct drm_file;
struct drm_device;
struct drm_open_hash {
   unsigned int size ;
   unsigned int order ;
   unsigned int fill ;
   struct hlist_head *table ;
   int use_vmalloc ;
};
typedef int drm_ioctl_t(struct drm_device * , void * , struct drm_file * );
struct drm_ioctl_desc {
   unsigned int cmd ;
   drm_ioctl_t *func ;
   int flags ;
};
enum ldv_17960 {
    DRM_LIST_NONE = 0,
    DRM_LIST_FREE = 1,
    DRM_LIST_WAIT = 2,
    DRM_LIST_PEND = 3,
    DRM_LIST_PRIO = 4,
    DRM_LIST_RECLAIM = 5
} ;
struct drm_buf {
   int idx ;
   int total ;
   int order ;
   int used ;
   unsigned long offset ;
   void *address ;
   unsigned long bus_address ;
   struct drm_buf *next ;
   int volatile   waiting ;
   int volatile   pending ;
   wait_queue_head_t dma_wait ;
   struct drm_file *file_priv ;
   int context ;
   int while_locked ;
   enum ldv_17960 list ;
   int dev_priv_size ;
   void *dev_private ;
};
struct drm_waitlist {
   int count ;
   struct drm_buf **bufs ;
   struct drm_buf **rp ;
   struct drm_buf **wp ;
   struct drm_buf **end ;
   spinlock_t read_lock ;
   spinlock_t write_lock ;
};
struct drm_freelist {
   int initialized ;
   atomic_t count ;
   struct drm_buf *next ;
   wait_queue_head_t waiting ;
   int low_mark ;
   int high_mark ;
   atomic_t wfh ;
   spinlock_t lock ;
};
struct drm_dma_handle {
   dma_addr_t busaddr ;
   void *vaddr ;
   size_t size ;
};
typedef struct drm_dma_handle drm_dma_handle_t;
struct drm_buf_entry {
   int buf_size ;
   int buf_count ;
   struct drm_buf *buflist ;
   int seg_count ;
   int page_order ;
   struct drm_dma_handle **seglist ;
   struct drm_freelist freelist ;
};
struct drm_minor;
struct drm_file {
   int authenticated ;
   int master ;
   pid_t pid ;
   uid_t uid ;
   drm_magic_t magic ;
   unsigned long ioctl_count ;
   struct list_head lhead ;
   struct drm_minor *minor ;
   int remove_auth_on_close ;
   unsigned long lock_count ;
   struct file *filp ;
   void *driver_priv ;
};
struct drm_queue {
   atomic_t use_count ;
   atomic_t finalization ;
   atomic_t block_count ;
   atomic_t block_read ;
   wait_queue_head_t read_queue ;
   atomic_t block_write ;
   wait_queue_head_t write_queue ;
   atomic_t total_queued ;
   atomic_t total_flushed ;
   atomic_t total_locks ;
   enum drm_ctx_flags flags ;
   struct drm_waitlist waitlist ;
   wait_queue_head_t flush_queue ;
};
struct drm_lock_data {
   struct drm_hw_lock *hw_lock ;
   struct drm_file *file_priv ;
   wait_queue_head_t lock_queue ;
   unsigned long lock_time ;
   spinlock_t spinlock ;
   uint32_t kernel_waiters ;
   uint32_t user_waiters ;
   int idle_has_lock ;
};
enum ldv_17978 {
    _DRM_DMA_USE_AGP = 1,
    _DRM_DMA_USE_SG = 2,
    _DRM_DMA_USE_FB = 4,
    _DRM_DMA_USE_PCI_RO = 8
} ;
struct drm_device_dma {
   struct drm_buf_entry bufs[23U] ;
   int buf_count ;
   struct drm_buf **buflist ;
   int seg_count ;
   int page_count ;
   unsigned long *pagelist ;
   unsigned long byte_count ;
   enum ldv_17978 flags ;
};
struct drm_agp_head {
   struct agp_kern_info agp_info ;
   struct list_head memory ;
   unsigned long mode ;
   struct agp_bridge_data *bridge ;
   int enabled ;
   int acquired ;
   unsigned long base ;
   int agp_mtrr ;
   int cant_use_aperture ;
   unsigned long page_mask ;
};
struct drm_sg_mem {
   unsigned long handle ;
   void *virtual ;
   int pages ;
   struct page **pagelist ;
   dma_addr_t *busaddr ;
};
struct drm_sigdata {
   int context ;
   struct drm_hw_lock *lock ;
};
typedef struct drm_map drm_local_map_t;
struct drm_driver {
   int (*load)(struct drm_device * , unsigned long  ) ;
   int (*firstopen)(struct drm_device * ) ;
   int (*open)(struct drm_device * , struct drm_file * ) ;
   void (*preclose)(struct drm_device * , struct drm_file * ) ;
   void (*postclose)(struct drm_device * , struct drm_file * ) ;
   void (*lastclose)(struct drm_device * ) ;
   int (*unload)(struct drm_device * ) ;
   int (*suspend)(struct drm_device * , pm_message_t  ) ;
   int (*resume)(struct drm_device * ) ;
   int (*dma_ioctl)(struct drm_device * , void * , struct drm_file * ) ;
   void (*dma_ready)(struct drm_device * ) ;
   int (*dma_quiescent)(struct drm_device * ) ;
   int (*context_ctor)(struct drm_device * , int  ) ;
   int (*context_dtor)(struct drm_device * , int  ) ;
   int (*kernel_context_switch)(struct drm_device * , int  , int  ) ;
   void (*kernel_context_switch_unlock)(struct drm_device * ) ;
   int (*vblank_wait)(struct drm_device * , unsigned int * ) ;
   int (*vblank_wait2)(struct drm_device * , unsigned int * ) ;
   int (*dri_library_name)(struct drm_device * , char * ) ;
   int (*device_is_agp)(struct drm_device * ) ;
   irqreturn_t (*irq_handler)(int  , void * ) ;
   void (*irq_preinstall)(struct drm_device * ) ;
   void (*irq_postinstall)(struct drm_device * ) ;
   void (*irq_uninstall)(struct drm_device * ) ;
   void (*reclaim_buffers)(struct drm_device * , struct drm_file * ) ;
   void (*reclaim_buffers_locked)(struct drm_device * , struct drm_file * ) ;
   void (*reclaim_buffers_idlelocked)(struct drm_device * , struct drm_file * ) ;
   unsigned long (*get_map_ofs)(struct drm_map * ) ;
   unsigned long (*get_reg_ofs)(struct drm_device * ) ;
   void (*set_version)(struct drm_device * , struct drm_set_version * ) ;
   int major ;
   int minor ;
   int patchlevel ;
   char *name ;
   char *desc ;
   char *date ;
   u32 driver_features ;
   int dev_priv_size ;
   struct drm_ioctl_desc *ioctls ;
   int num_ioctls ;
   struct file_operations fops ;
   struct pci_driver pci_driver ;
};
struct drm_minor {
   int index ;
   int type ;
   dev_t device ;
   struct device kdev ;
   struct drm_device *dev ;
   struct proc_dir_entry *dev_root ;
};
struct drm_device {
   char *unique ;
   int unique_len ;
   char *devname ;
   int if_version ;
   int blocked ;
   spinlock_t count_lock ;
   struct mutex struct_mutex ;
   int open_count ;
   atomic_t ioctl_count ;
   atomic_t vma_count ;
   int buf_use ;
   atomic_t buf_alloc ;
   unsigned long counters ;
   enum drm_stat_type types[15U] ;
   atomic_t counts[15U] ;
   struct list_head filelist ;
   struct drm_open_hash magiclist ;
   struct list_head magicfree ;
   struct list_head maplist ;
   int map_count ;
   struct drm_open_hash map_hash ;
   struct list_head ctxlist ;
   int ctx_count ;
   struct mutex ctxlist_mutex ;
   struct idr ctx_idr ;
   struct list_head vmalist ;
   struct drm_lock_data lock ;
   int queue_count ;
   int queue_reserved ;
   int queue_slots ;
   struct drm_queue **queuelist ;
   struct drm_device_dma *dma ;
   int irq ;
   int irq_enabled ;
   long volatile   context_flag ;
   long volatile   interrupt_flag ;
   long volatile   dma_flag ;
   struct timer_list timer ;
   wait_queue_head_t context_wait ;
   int last_checked ;
   int last_context ;
   unsigned long last_switch ;
   struct work_struct work ;
   wait_queue_head_t vbl_queue ;
   atomic_t vbl_received ;
   atomic_t vbl_received2 ;
   spinlock_t vbl_lock ;
   struct list_head vbl_sigs ;
   struct list_head vbl_sigs2 ;
   unsigned int vbl_pending ;
   spinlock_t tasklet_lock ;
   void (*locked_tasklet_func)(struct drm_device * ) ;
   cycles_t ctx_start ;
   cycles_t lck_start ;
   struct fasync_struct *buf_async ;
   wait_queue_head_t buf_readers ;
   wait_queue_head_t buf_writers ;
   struct drm_agp_head *agp ;
   struct pci_dev *pdev ;
   int pci_vendor ;
   int pci_device ;
   struct drm_sg_mem *sg ;
   void *dev_private ;
   struct drm_sigdata sigdata ;
   sigset_t sigmask ;
   struct drm_driver *driver ;
   drm_local_map_t *agp_buffer_map ;
   unsigned int agp_buffer_token ;
   struct drm_minor *primary ;
   spinlock_t drw_lock ;
   struct idr drw_idr ;
};
struct _drm_i915_sarea {
   struct drm_tex_region texList[256U] ;
   int last_upload ;
   int last_enqueue ;
   int last_dispatch ;
   int ctxOwner ;
   int texAge ;
   int pf_enabled ;
   int pf_active ;
   int pf_current_page ;
   int perf_boxes ;
   int width ;
   int height ;
   drm_handle_t front_handle ;
   int front_offset ;
   int front_size ;
   drm_handle_t back_handle ;
   int back_offset ;
   int back_size ;
   drm_handle_t depth_handle ;
   int depth_offset ;
   int depth_size ;
   drm_handle_t tex_handle ;
   int tex_offset ;
   int tex_size ;
   int log_tex_granularity ;
   int pitch ;
   int rotation ;
   int rotated_offset ;
   int rotated_size ;
   int rotated_pitch ;
   int virtualX ;
   int virtualY ;
   unsigned int front_tiled ;
   unsigned int back_tiled ;
   unsigned int depth_tiled ;
   unsigned int rotated_tiled ;
   unsigned int rotated2_tiled ;
   int pipeA_x ;
   int pipeA_y ;
   int pipeA_w ;
   int pipeA_h ;
   int pipeB_x ;
   int pipeB_y ;
   int pipeB_w ;
   int pipeB_h ;
};
typedef struct _drm_i915_sarea drm_i915_sarea_t;
struct _drm_i915_ring_buffer {
   int tail_mask ;
   unsigned long Start ;
   unsigned long End ;
   unsigned long Size ;
   u8 *virtual_start ;
   int head ;
   int tail ;
   int space ;
   drm_local_map_t map ;
};
typedef struct _drm_i915_ring_buffer drm_i915_ring_buffer_t;
struct mem_block {
   struct mem_block *next ;
   struct mem_block *prev ;
   int start ;
   int size ;
   struct drm_file *file_priv ;
};
struct _drm_i915_vbl_swap {
   struct list_head head ;
   drm_drawable_t drw_id ;
   unsigned int pipe ;
   unsigned int sequence ;
};
typedef struct _drm_i915_vbl_swap drm_i915_vbl_swap_t;
struct drm_i915_private {
   drm_local_map_t *sarea ;
   drm_local_map_t *mmio_map ;
   drm_i915_sarea_t *sarea_priv ;
   drm_i915_ring_buffer_t ring ;
   drm_dma_handle_t *status_page_dmah ;
   void *hw_status_page ;
   dma_addr_t dma_status_page ;
   unsigned long counter ;
   unsigned int status_gfx_addr ;
   drm_local_map_t hws_map ;
   unsigned int cpp ;
   int back_offset ;
   int front_offset ;
   int current_page ;
   int page_flipping ;
   int use_mi_batchbuffer_start ;
   wait_queue_head_t irq_queue ;
   atomic_t irq_received ;
   atomic_t irq_emitted ;
   int tex_lru_log_granularity ;
   int allow_batchbuffer ;
   struct mem_block *agp_heap ;
   unsigned int sr01 ;
   unsigned int adpa ;
   unsigned int ppcr ;
   unsigned int dvob ;
   unsigned int dvoc ;
   unsigned int lvds ;
   int vblank_pipe ;
   spinlock_t swaps_lock ;
   drm_i915_vbl_swap_t vbl_swaps ;
   unsigned int swaps_pending ;
   u8 saveLBB ;
   u32 saveDSPACNTR ;
   u32 saveDSPBCNTR ;
   u32 saveDSPARB ;
   u32 savePIPEACONF ;
   u32 savePIPEBCONF ;
   u32 savePIPEASRC ;
   u32 savePIPEBSRC ;
   u32 saveFPA0 ;
   u32 saveFPA1 ;
   u32 saveDPLL_A ;
   u32 saveDPLL_A_MD ;
   u32 saveHTOTAL_A ;
   u32 saveHBLANK_A ;
   u32 saveHSYNC_A ;
   u32 saveVTOTAL_A ;
   u32 saveVBLANK_A ;
   u32 saveVSYNC_A ;
   u32 saveBCLRPAT_A ;
   u32 savePIPEASTAT ;
   u32 saveDSPASTRIDE ;
   u32 saveDSPASIZE ;
   u32 saveDSPAPOS ;
   u32 saveDSPABASE ;
   u32 saveDSPASURF ;
   u32 saveDSPATILEOFF ;
   u32 savePFIT_PGM_RATIOS ;
   u32 saveBLC_PWM_CTL ;
   u32 saveBLC_PWM_CTL2 ;
   u32 saveFPB0 ;
   u32 saveFPB1 ;
   u32 saveDPLL_B ;
   u32 saveDPLL_B_MD ;
   u32 saveHTOTAL_B ;
   u32 saveHBLANK_B ;
   u32 saveHSYNC_B ;
   u32 saveVTOTAL_B ;
   u32 saveVBLANK_B ;
   u32 saveVSYNC_B ;
   u32 saveBCLRPAT_B ;
   u32 savePIPEBSTAT ;
   u32 saveDSPBSTRIDE ;
   u32 saveDSPBSIZE ;
   u32 saveDSPBPOS ;
   u32 saveDSPBBASE ;
   u32 saveDSPBSURF ;
   u32 saveDSPBTILEOFF ;
   u32 saveVCLK_DIVISOR_VGA0 ;
   u32 saveVCLK_DIVISOR_VGA1 ;
   u32 saveVCLK_POST_DIV ;
   u32 saveVGACNTRL ;
   u32 saveADPA ;
   u32 saveLVDS ;
   u32 saveLVDSPP_ON ;
   u32 saveLVDSPP_OFF ;
   u32 saveDVOA ;
   u32 saveDVOB ;
   u32 saveDVOC ;
   u32 savePP_ON ;
   u32 savePP_OFF ;
   u32 savePP_CONTROL ;
   u32 savePP_CYCLE ;
   u32 savePFIT_CONTROL ;
   u32 save_palette_a[256U] ;
   u32 save_palette_b[256U] ;
   u32 saveFBC_CFB_BASE ;
   u32 saveFBC_LL_BASE ;
   u32 saveFBC_CONTROL ;
   u32 saveFBC_CONTROL2 ;
   u32 saveIER ;
   u32 saveIIR ;
   u32 saveIMR ;
   u32 saveCACHE_MODE_0 ;
   u32 saveD_STATE ;
   u32 saveDSPCLK_GATE_D ;
   u32 saveMI_ARB_STATE ;
   u32 saveSWF0[16U] ;
   u32 saveSWF1[16U] ;
   u32 saveSWF2[3U] ;
   u8 saveMSR ;
   u8 saveSR[8U] ;
   u8 saveGR[25U] ;
   u8 saveAR_INDEX ;
   u8 saveAR[21U] ;
   u8 saveDACMASK ;
   u8 saveDACDATA[768U] ;
   u8 saveCR[37U] ;
};
enum pipe {
    PIPE_A = 0,
    PIPE_B = 1
} ;
typedef __u64 uint64_t;
struct x8664_pda {
   struct task_struct *pcurrent ;
   unsigned long data_offset ;
   unsigned long kernelstack ;
   unsigned long oldrsp ;
   int irqcount ;
   unsigned int cpunumber ;
   char *irqstackptr ;
   short nodenumber ;
   short in_bootmem ;
   unsigned int __softirq_pending ;
   unsigned int __nmi_count ;
   short mmu_state ;
   short isidle ;
   struct mm_struct *active_mm ;
   unsigned int apic_timer_irqs ;
   unsigned int irq0_irqs ;
   unsigned int irq_resched_count ;
   unsigned int irq_call_count ;
   unsigned int irq_tlb_count ;
   unsigned int irq_thermal_count ;
   unsigned int irq_threshold_count ;
   unsigned int irq_spurious_count ;
};
enum hrtimer_restart;
struct __large_struct {
   unsigned long buf[100U] ;
};
struct drm_clip_rect {
   unsigned short x1 ;
   unsigned short y1 ;
   unsigned short x2 ;
   unsigned short y2 ;
};
struct drm_hash_item {
   struct hlist_node head ;
   unsigned long key ;
};
struct drm_map_list {
   struct list_head head ;
   struct drm_hash_item hash ;
   struct drm_map *map ;
   uint64_t user_token ;
};
enum ldv_18243 {
    I915_INIT_DMA = 1,
    I915_CLEANUP_DMA = 2,
    I915_RESUME_DMA = 3
} ;
struct _drm_i915_init {
   enum ldv_18243 func ;
   unsigned int mmio_offset ;
   int sarea_priv_offset ;
   unsigned int ring_start ;
   unsigned int ring_end ;
   unsigned int ring_size ;
   unsigned int front_offset ;
   unsigned int back_offset ;
   unsigned int depth_offset ;
   unsigned int w ;
   unsigned int h ;
   unsigned int pitch ;
   unsigned int pitch_bits ;
   unsigned int back_pitch ;
   unsigned int depth_pitch ;
   unsigned int cpp ;
   unsigned int chipset ;
};
typedef struct _drm_i915_init drm_i915_init_t;
struct _drm_i915_batchbuffer {
   int start ;
   int used ;
   int DR1 ;
   int DR4 ;
   int num_cliprects ;
   struct drm_clip_rect *cliprects ;
};
typedef struct _drm_i915_batchbuffer drm_i915_batchbuffer_t;
struct _drm_i915_cmdbuffer {
   char *buf ;
   int sz ;
   int DR1 ;
   int DR4 ;
   int num_cliprects ;
   struct drm_clip_rect *cliprects ;
};
typedef struct _drm_i915_cmdbuffer drm_i915_cmdbuffer_t;
struct drm_i915_getparam {
   int param ;
   int *value ;
};
typedef struct drm_i915_getparam drm_i915_getparam_t;
struct drm_i915_setparam {
   int param ;
   int value ;
};
typedef struct drm_i915_setparam drm_i915_setparam_t;
struct drm_i915_hws_addr {
   uint64_t addr ;
};
typedef struct drm_i915_hws_addr drm_i915_hws_addr_t;
typedef struct drm_i915_private drm_i915_private_t;
enum hrtimer_restart;
struct drm_drawable_info {
   unsigned int num_rects ;
   struct drm_clip_rect *rects ;
};
enum drm_vblank_seq_type {
    _DRM_VBLANK_ABSOLUTE = 0,
    _DRM_VBLANK_RELATIVE = 1,
    _DRM_VBLANK_NEXTONMISS = 268435456,
    _DRM_VBLANK_SECONDARY = 536870912,
    _DRM_VBLANK_SIGNAL = 1073741824
} ;
struct drm_i915_irq_emit {
   int *irq_seq ;
};
typedef struct drm_i915_irq_emit drm_i915_irq_emit_t;
struct drm_i915_irq_wait {
   int irq_seq ;
};
typedef struct drm_i915_irq_wait drm_i915_irq_wait_t;
struct drm_i915_vblank_pipe {
   int pipe ;
};
typedef struct drm_i915_vblank_pipe drm_i915_vblank_pipe_t;
struct drm_i915_vblank_swap {
   drm_drawable_t drawable ;
   enum drm_vblank_seq_type seqtype ;
   unsigned int sequence ;
};
typedef struct drm_i915_vblank_swap drm_i915_vblank_swap_t;
enum hrtimer_restart;
struct drm_i915_mem_alloc {
   int region ;
   int alignment ;
   int size ;
   int *region_offset ;
};
typedef struct drm_i915_mem_alloc drm_i915_mem_alloc_t;
struct drm_i915_mem_free {
   int region ;
   int region_offset ;
};
typedef struct drm_i915_mem_free drm_i915_mem_free_t;
struct drm_i915_mem_init_heap {
   int region ;
   int size ;
   int start ;
};
typedef struct drm_i915_mem_init_heap drm_i915_mem_init_heap_t;
struct drm_i915_mem_destroy_heap {
   int region ;
};
typedef struct drm_i915_mem_destroy_heap drm_i915_mem_destroy_heap_t;
enum hrtimer_restart;
typedef int drm_ioctl_compat_t(struct file * , unsigned int  , unsigned long  );
struct _drm_i915_batchbuffer32 {
   int start ;
   int used ;
   int DR1 ;
   int DR4 ;
   int num_cliprects ;
   u32 cliprects ;
};
typedef struct _drm_i915_batchbuffer32 drm_i915_batchbuffer32_t;
struct _drm_i915_cmdbuffer32 {
   u32 buf ;
   int sz ;
   int DR1 ;
   int DR4 ;
   int num_cliprects ;
   u32 cliprects ;
};
typedef struct _drm_i915_cmdbuffer32 drm_i915_cmdbuffer32_t;
struct drm_i915_irq_emit32 {
   u32 irq_seq ;
};
typedef struct drm_i915_irq_emit32 drm_i915_irq_emit32_t;
struct drm_i915_getparam32 {
   int param ;
   u32 value ;
};
typedef struct drm_i915_getparam32 drm_i915_getparam32_t;
struct drm_i915_mem_alloc32 {
   int region ;
   int alignment ;
   int size ;
   u32 region_offset ;
};
typedef struct drm_i915_mem_alloc32 drm_i915_mem_alloc32_t;
extern int printk(char const   *  , ...) ;
extern void __const_udelay(unsigned long  ) ;
extern struct module __this_module ;
extern int pci_bus_read_config_byte(struct pci_bus * , unsigned int  , int  , u8 * ) ;
extern int pci_bus_write_config_byte(struct pci_bus * , unsigned int  , int  , u8  ) ;
__inline static int pci_read_config_byte(struct pci_dev *dev , int where , u8 *val ) 
{ 
  int tmp ;

  {
  tmp = pci_bus_read_config_byte(dev->bus, dev->devfn, where, val);
  return (tmp);
}
}
__inline static int pci_write_config_byte(struct pci_dev *dev , int where , u8 val ) 
{ 
  int tmp ;

  {
  tmp = pci_bus_write_config_byte(dev->bus, dev->devfn, where, (int )val);
  return (tmp);
}
}
extern int pci_enable_device(struct pci_dev * ) ;
extern void pci_disable_device(struct pci_dev * ) ;
extern void pci_set_master(struct pci_dev * ) ;
extern int pci_save_state(struct pci_dev * ) ;
extern int pci_restore_state(struct pci_dev * ) ;
extern int pci_set_power_state(struct pci_dev * , pci_power_t  ) ;
__inline static unsigned int readl(void const volatile   *addr ) 
{ 
  unsigned int ret ;

  {
  __asm__  volatile   ("movl %1,%0": "=r" (ret): "m" (*((unsigned int volatile   *)addr)): "memory");
  return (ret);
}
}
__inline static void writel(unsigned int val , void volatile   *addr ) 
{ 


  {
  __asm__  volatile   ("movl %0,%1": : "r" (val), "m" (*((unsigned int volatile   *)addr)): "memory");
  return;
}
}
__inline static unsigned char inb(unsigned short port ) 
{ 
  unsigned char _v ;

  {
  __asm__  volatile   ("inb %w1,%0": "=a" (_v): "Nd" (port));
  return (_v);
}
}
__inline static void outb(unsigned char value , unsigned short port ) 
{ 


  {
  __asm__  volatile   ("outb %b0,%w1": : "a" (value), "Nd" (port));
  return;
}
}
extern int drm_init(struct drm_driver * ) ;
extern void drm_exit(struct drm_driver * ) ;
extern int drm_ioctl(struct inode * , struct file * , unsigned int  , unsigned long  ) ;
extern int drm_open(struct inode * , struct file * ) ;
extern int drm_fasync(int  , struct file * , int  ) ;
extern int drm_release(struct inode * , struct file * ) ;
extern int drm_mmap(struct file * , struct vm_area_struct * ) ;
extern unsigned long drm_core_get_map_ofs(struct drm_map * ) ;
extern unsigned long drm_core_get_reg_ofs(struct drm_device * ) ;
extern unsigned int drm_poll(struct file * , struct poll_table_struct * ) ;
extern void drm_core_reclaim_buffers(struct drm_device * , struct drm_file * ) ;
struct drm_ioctl_desc i915_ioctls[18U] ;
int i915_max_ioctl ;
int i915_driver_load(struct drm_device *dev , unsigned long flags ) ;
int i915_driver_unload(struct drm_device *dev ) ;
void i915_driver_lastclose(struct drm_device *dev ) ;
void i915_driver_preclose(struct drm_device *dev , struct drm_file *file_priv ) ;
int i915_driver_device_is_agp(struct drm_device *dev ) ;
long i915_compat_ioctl(struct file *filp , unsigned int cmd , unsigned long arg ) ;
int i915_driver_vblank_wait(struct drm_device *dev , unsigned int *sequence ) ;
int i915_driver_vblank_wait2(struct drm_device *dev , unsigned int *sequence ) ;
irqreturn_t i915_driver_irq_handler(int irq , void *arg ) ;
void i915_driver_irq_preinstall(struct drm_device *dev ) ;
void i915_driver_irq_postinstall(struct drm_device *dev ) ;
void i915_driver_irq_uninstall(struct drm_device *dev ) ;
static struct pci_device_id pciidlist[24U]  = 
  {      {32902U, 13687U, 4294967295U, 4294967295U, 0U, 0U, 0UL}, 
        {32902U, 9570U, 4294967295U, 4294967295U, 0U, 0U, 0UL}, 
        {32902U, 13698U, 4294967295U, 4294967295U, 0U, 0U, 0UL}, 
        {32902U, 9586U, 4294967295U, 4294967295U, 0U, 0U, 0UL}, 
        {32902U, 9602U, 4294967295U, 4294967295U, 0U, 0U, 0UL}, 
        {32902U, 9610U, 4294967295U, 4294967295U, 0U, 0U, 0UL}, 
        {32902U, 9618U, 4294967295U, 4294967295U, 0U, 0U, 0UL}, 
        {32902U, 10098U, 4294967295U, 4294967295U, 0U, 0U, 0UL}, 
        {32902U, 10146U, 4294967295U, 4294967295U, 0U, 0U, 0UL}, 
        {32902U, 10158U, 4294967295U, 4294967295U, 0U, 0U, 0UL}, 
        {32902U, 10610U, 4294967295U, 4294967295U, 0U, 0U, 0UL}, 
        {32902U, 10626U, 4294967295U, 4294967295U, 0U, 0U, 0UL}, 
        {32902U, 10642U, 4294967295U, 4294967295U, 0U, 0U, 0UL}, 
        {32902U, 10658U, 4294967295U, 4294967295U, 0U, 0U, 0UL}, 
        {32902U, 10674U, 4294967295U, 4294967295U, 0U, 0U, 0UL}, 
        {32902U, 10690U, 4294967295U, 4294967295U, 0U, 0U, 0UL}, 
        {32902U, 10706U, 4294967295U, 4294967295U, 0U, 0U, 0UL}, 
        {32902U, 10754U, 4294967295U, 4294967295U, 0U, 0U, 0UL}, 
        {32902U, 10770U, 4294967295U, 4294967295U, 0U, 0U, 0UL}, 
        {32902U, 10818U, 4294967295U, 4294967295U, 0U, 0U, 0UL}, 
        {32902U, 11778U, 4294967295U, 4294967295U, 0U, 0U, 0UL}, 
        {32902U, 11794U, 4294967295U, 4294967295U, 0U, 0U, 0UL}, 
        {32902U, 11810U, 4294967295U, 4294967295U, 0U, 0U, 0UL}, 
        {0U, 0U, 0U, 0U, 0U, 0U, 0UL}};
static bool i915_pipe_enabled(struct drm_device *dev , enum pipe pipe ) 
{ 
  struct drm_i915_private *dev_priv ;
  unsigned int tmp ;
  unsigned int tmp___0 ;

  {
  dev_priv = (struct drm_i915_private *)dev->dev_private;
  if ((unsigned int )pipe == 0U) {
    tmp = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 24596U);
    return ((tmp & 2147483648U) != 0U);
  } else {
    tmp___0 = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 24600U);
    return ((tmp___0 & 2147483648U) != 0U);
  }
}
}
static void i915_save_palette(struct drm_device *dev , enum pipe pipe ) 
{ 
  struct drm_i915_private *dev_priv ;
  unsigned long reg ;
  u32 *array ;
  int i ;
  bool tmp ;
  int tmp___0 ;

  {
  dev_priv = (struct drm_i915_private *)dev->dev_private;
  reg = (unsigned int )pipe == 0U ? 40960UL : 43008UL;
  tmp = i915_pipe_enabled(dev, pipe);
  if (tmp) {
    tmp___0 = 0;
  } else {
    tmp___0 = 1;
  }
  if (tmp___0) {
    return;
  } else {

  }
  if ((unsigned int )pipe == 0U) {
    array = (u32 *)(& dev_priv->save_palette_a);
  } else {
    array = (u32 *)(& dev_priv->save_palette_b);
  }
  i = 0;
  goto ldv_22666;
  ldv_22665: 
  *(array + (unsigned long )i) = readl((void const volatile   *)((dev_priv->mmio_map)->handle + ((unsigned long )(i << 2) + reg)));
  i = i + 1;
  ldv_22666: ;
  if (i <= 255) {
    goto ldv_22665;
  } else {

  }

  return;
}
}
static void i915_restore_palette(struct drm_device *dev , enum pipe pipe ) 
{ 
  struct drm_i915_private *dev_priv ;
  unsigned long reg ;
  u32 *array ;
  int i ;
  bool tmp ;
  int tmp___0 ;

  {
  dev_priv = (struct drm_i915_private *)dev->dev_private;
  reg = (unsigned int )pipe == 0U ? 40960UL : 43008UL;
  tmp = i915_pipe_enabled(dev, pipe);
  if (tmp) {
    tmp___0 = 0;
  } else {
    tmp___0 = 1;
  }
  if (tmp___0) {
    return;
  } else {

  }
  if ((unsigned int )pipe == 0U) {
    array = (u32 *)(& dev_priv->save_palette_a);
  } else {
    array = (u32 *)(& dev_priv->save_palette_b);
  }
  i = 0;
  goto ldv_22677;
  ldv_22676: 
  writel(*(array + (unsigned long )i), (void volatile   *)((dev_priv->mmio_map)->handle + ((unsigned long )(i << 2) + reg)));
  i = i + 1;
  ldv_22677: ;
  if (i <= 255) {
    goto ldv_22676;
  } else {

  }

  return;
}
}
static u8 i915_read_indexed(u16 index_port , u16 data_port , u8 reg ) 
{ 
  unsigned char tmp ;

  {
  outb((int )reg, (int )index_port);
  tmp = inb((int )data_port);
  return (tmp);
}
}
static u8 i915_read_ar(u16 st01 , u8 reg , u16 palette_enable ) 
{ 
  unsigned char tmp ;

  {
  inb((int )st01);
  outb((int )((unsigned char )palette_enable) | (int )reg, 960);
  tmp = inb(961);
  return (tmp);
}
}
static void i915_write_ar(u8 st01 , u8 reg , u8 val , u16 palette_enable ) 
{ 


  {
  inb((int )st01);
  outb((int )((unsigned char )palette_enable) | (int )reg, 960);
  outb((int )val, 960);
  return;
}
}
static void i915_write_indexed(u16 index_port , u16 data_port , u8 reg , u8 val ) 
{ 


  {
  outb((int )reg, (int )index_port);
  outb((int )val, (int )data_port);
  return;
}
}
static void i915_save_vga(struct drm_device *dev ) 
{ 
  struct drm_i915_private *dev_priv ;
  int i ;
  u16 cr_index ;
  u16 cr_data ;
  u16 st01 ;
  u8 tmp ;

  {
  dev_priv = (struct drm_i915_private *)dev->dev_private;
  dev_priv->saveDACMASK = inb(966);
  outb(0, 967);
  i = 0;
  goto ldv_22710;
  ldv_22709: 
  dev_priv->saveDACDATA[i] = inb(969);
  i = i + 1;
  ldv_22710: ;
  if (i <= 767) {
    goto ldv_22709;
  } else {

  }
  dev_priv->saveMSR = inb(972);
  if ((int )dev_priv->saveMSR & 1) {
    cr_index = 980U;
    cr_data = 981U;
    st01 = 986U;
  } else {
    cr_index = 948U;
    cr_data = 949U;
    st01 = 954U;
  }
  tmp = i915_read_indexed((int )cr_index, (int )cr_data, 17);
  i915_write_indexed((int )cr_index, (int )cr_data, 17, (int )tmp & 127);
  i = 0;
  goto ldv_22713;
  ldv_22712: 
  dev_priv->saveCR[i] = i915_read_indexed((int )cr_index, (int )cr_data, (int )((u8 )i));
  i = i + 1;
  ldv_22713: ;
  if (i <= 36) {
    goto ldv_22712;
  } else {

  }
  dev_priv->saveCR[17] = (unsigned int )dev_priv->saveCR[17] & 127U;
  inb((int )st01);
  dev_priv->saveAR_INDEX = inb(960);
  i = 0;
  goto ldv_22716;
  ldv_22715: 
  dev_priv->saveAR[i] = i915_read_ar((int )st01, (int )((u8 )i), 0);
  i = i + 1;
  ldv_22716: ;
  if (i <= 20) {
    goto ldv_22715;
  } else {

  }
  inb((int )st01);
  outb((int )dev_priv->saveAR_INDEX, 960);
  inb((int )st01);
  i = 0;
  goto ldv_22719;
  ldv_22718: 
  dev_priv->saveGR[i] = i915_read_indexed(974, 975, (int )((u8 )i));
  i = i + 1;
  ldv_22719: ;
  if (i <= 8) {
    goto ldv_22718;
  } else {

  }
  dev_priv->saveGR[16] = i915_read_indexed(974, 975, 16);
  dev_priv->saveGR[17] = i915_read_indexed(974, 975, 17);
  dev_priv->saveGR[24] = i915_read_indexed(974, 975, 24);
  i = 0;
  goto ldv_22722;
  ldv_22721: 
  dev_priv->saveSR[i] = i915_read_indexed(964, 965, (int )((u8 )i));
  i = i + 1;
  ldv_22722: ;
  if (i <= 7) {
    goto ldv_22721;
  } else {

  }

  return;
}
}
static void i915_restore_vga(struct drm_device *dev ) 
{ 
  struct drm_i915_private *dev_priv ;
  int i ;
  u16 cr_index ;
  u16 cr_data ;
  u16 st01 ;

  {
  dev_priv = (struct drm_i915_private *)dev->dev_private;
  outb((int )dev_priv->saveMSR, 962);
  if ((int )dev_priv->saveMSR & 1) {
    cr_index = 980U;
    cr_data = 981U;
    st01 = 986U;
  } else {
    cr_index = 948U;
    cr_data = 949U;
    st01 = 954U;
  }
  i = 0;
  goto ldv_22733;
  ldv_22732: 
  i915_write_indexed(964, 965, (int )((u8 )i), (int )dev_priv->saveSR[i]);
  i = i + 1;
  ldv_22733: ;
  if (i <= 6) {
    goto ldv_22732;
  } else {

  }
  i915_write_indexed((int )cr_index, (int )cr_data, 17, (int )dev_priv->saveCR[17]);
  i = 0;
  goto ldv_22736;
  ldv_22735: 
  i915_write_indexed((int )cr_index, (int )cr_data, (int )((u8 )i), (int )dev_priv->saveCR[i]);
  i = i + 1;
  ldv_22736: ;
  if (i <= 36) {
    goto ldv_22735;
  } else {

  }
  i = 0;
  goto ldv_22739;
  ldv_22738: 
  i915_write_indexed(974, 975, (int )((u8 )i), (int )dev_priv->saveGR[i]);
  i = i + 1;
  ldv_22739: ;
  if (i <= 8) {
    goto ldv_22738;
  } else {

  }
  i915_write_indexed(974, 975, 16, (int )dev_priv->saveGR[16]);
  i915_write_indexed(974, 975, 17, (int )dev_priv->saveGR[17]);
  i915_write_indexed(974, 975, 24, (int )dev_priv->saveGR[24]);
  inb((int )st01);
  i = 0;
  goto ldv_22742;
  ldv_22741: 
  i915_write_ar((int )((u8 )st01), (int )((u8 )i), (int )dev_priv->saveAR[i], 0);
  i = i + 1;
  ldv_22742: ;
  if (i <= 20) {
    goto ldv_22741;
  } else {

  }
  inb((int )st01);
  outb((int )((unsigned int )dev_priv->saveAR_INDEX | 32U), 960);
  inb((int )st01);
  outb((int )dev_priv->saveDACMASK, 966);
  outb(0, 968);
  i = 0;
  goto ldv_22745;
  ldv_22744: 
  outb((int )dev_priv->saveDACDATA[i], 969);
  i = i + 1;
  ldv_22745: ;
  if (i <= 767) {
    goto ldv_22744;
  } else {

  }

  return;
}
}
static int i915_suspend(struct drm_device *dev , pm_message_t state ) 
{ 
  struct drm_i915_private *dev_priv ;
  int i ;

  {
  dev_priv = (struct drm_i915_private *)dev->dev_private;
  if ((unsigned long )dev == (unsigned long )((struct drm_device *)0) || (unsigned long )dev_priv == (unsigned long )((struct drm_i915_private *)0)) {
    printk("<3>dev: %p, dev_priv: %p\n", dev, dev_priv);
    printk("<3>DRM not initialized, aborting suspend.\n");
    return (-19);
  } else {

  }
  if (state.event == 8) {
    return (0);
  } else {

  }
  pci_save_state(dev->pdev);
  pci_read_config_byte(dev->pdev, 244, & dev_priv->saveLBB);
  dev_priv->saveDSPARB = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 458800U);
  dev_priv->savePIPEACONF = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 458760U);
  dev_priv->savePIPEASRC = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 393244U);
  dev_priv->saveFPA0 = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 24640U);
  dev_priv->saveFPA1 = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 24644U);
  dev_priv->saveDPLL_A = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 24596U);
  if (((((((((dev->pci_device == 10610 || dev->pci_device == 10626) || dev->pci_device == 10642) || dev->pci_device == 10658) || dev->pci_device == 10754) || dev->pci_device == 10770) || dev->pci_device == 10818) || dev->pci_device == 11778) || dev->pci_device == 11794) || dev->pci_device == 11810) {
    dev_priv->saveDPLL_A_MD = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 24604U);
  } else {

  }
  dev_priv->saveHTOTAL_A = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 393216U);
  dev_priv->saveHBLANK_A = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 393220U);
  dev_priv->saveHSYNC_A = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 393224U);
  dev_priv->saveVTOTAL_A = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 393228U);
  dev_priv->saveVBLANK_A = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 393232U);
  dev_priv->saveVSYNC_A = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 393236U);
  dev_priv->saveBCLRPAT_A = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 393248U);
  dev_priv->saveDSPACNTR = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 459136U);
  dev_priv->saveDSPASTRIDE = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 459144U);
  dev_priv->saveDSPASIZE = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 459152U);
  dev_priv->saveDSPAPOS = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 459148U);
  dev_priv->saveDSPABASE = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 459140U);
  if (((((((((dev->pci_device == 10610 || dev->pci_device == 10626) || dev->pci_device == 10642) || dev->pci_device == 10658) || dev->pci_device == 10754) || dev->pci_device == 10770) || dev->pci_device == 10818) || dev->pci_device == 11778) || dev->pci_device == 11794) || dev->pci_device == 11810) {
    dev_priv->saveDSPASURF = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 459164U);
    dev_priv->saveDSPATILEOFF = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 459172U);
  } else {

  }
  i915_save_palette(dev, PIPE_A);
  dev_priv->savePIPEASTAT = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 458788U);
  dev_priv->savePIPEBCONF = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 462856U);
  dev_priv->savePIPEBSRC = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 397340U);
  dev_priv->saveFPB0 = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 24648U);
  dev_priv->saveFPB1 = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 24652U);
  dev_priv->saveDPLL_B = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 24600U);
  if (((((((((dev->pci_device == 10610 || dev->pci_device == 10626) || dev->pci_device == 10642) || dev->pci_device == 10658) || dev->pci_device == 10754) || dev->pci_device == 10770) || dev->pci_device == 10818) || dev->pci_device == 11778) || dev->pci_device == 11794) || dev->pci_device == 11810) {
    dev_priv->saveDPLL_B_MD = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 24608U);
  } else {

  }
  dev_priv->saveHTOTAL_B = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 397312U);
  dev_priv->saveHBLANK_B = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 397316U);
  dev_priv->saveHSYNC_B = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 397320U);
  dev_priv->saveVTOTAL_B = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 397324U);
  dev_priv->saveVBLANK_B = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 397328U);
  dev_priv->saveVSYNC_B = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 397332U);
  dev_priv->saveBCLRPAT_A = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 393248U);
  dev_priv->saveDSPBCNTR = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 463232U);
  dev_priv->saveDSPBSTRIDE = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 463240U);
  dev_priv->saveDSPBSIZE = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 463248U);
  dev_priv->saveDSPBPOS = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 463244U);
  dev_priv->saveDSPBBASE = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 463236U);
  if (dev->pci_device == 10754 || dev->pci_device == 10818) {
    dev_priv->saveDSPBSURF = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 463260U);
    dev_priv->saveDSPBTILEOFF = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 463268U);
  } else {

  }
  i915_save_palette(dev, PIPE_B);
  dev_priv->savePIPEBSTAT = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 462884U);
  dev_priv->saveADPA = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 397568U);
  dev_priv->savePP_CONTROL = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 397828U);
  dev_priv->savePFIT_PGM_RATIOS = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 397876U);
  dev_priv->saveBLC_PWM_CTL = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 397908U);
  if (((((((((dev->pci_device == 10610 || dev->pci_device == 10626) || dev->pci_device == 10642) || dev->pci_device == 10658) || dev->pci_device == 10754) || dev->pci_device == 10770) || dev->pci_device == 10818) || dev->pci_device == 11778) || dev->pci_device == 11794) || dev->pci_device == 11810) {
    dev_priv->saveBLC_PWM_CTL2 = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 397904U);
  } else {

  }
  if ((((((dev->pci_device == 13687 || dev->pci_device == 13698) || dev->pci_device == 9618) || (dev->pci_device == 10146 || dev->pci_device == 10158)) || dev->pci_device == 10754) || dev->pci_device == 10818) && dev->pci_device != 13687) {
    dev_priv->saveLVDS = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 397696U);
  } else {

  }
  if (dev->pci_device != 13687 && dev->pci_device != 9570) {
    dev_priv->savePFIT_CONTROL = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 397872U);
  } else {

  }
  dev_priv->saveLVDSPP_ON = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 397832U);
  dev_priv->saveLVDSPP_OFF = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 397836U);
  dev_priv->savePP_CYCLE = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 397840U);
  dev_priv->saveFBC_CFB_BASE = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 12800U);
  dev_priv->saveFBC_LL_BASE = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 12804U);
  dev_priv->saveFBC_CONTROL2 = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 12820U);
  dev_priv->saveFBC_CONTROL = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 12808U);
  dev_priv->saveIIR = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 8356U);
  dev_priv->saveIER = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 8352U);
  dev_priv->saveIMR = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 8360U);
  dev_priv->saveVCLK_DIVISOR_VGA0 = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 24576U);
  dev_priv->saveVCLK_DIVISOR_VGA1 = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 24580U);
  dev_priv->saveVCLK_POST_DIV = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 24592U);
  dev_priv->saveVGACNTRL = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 463872U);
  dev_priv->saveD_STATE = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 24836U);
  dev_priv->saveDSPCLK_GATE_D = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 25088U);
  dev_priv->saveCACHE_MODE_0 = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 8480U);
  dev_priv->saveMI_ARB_STATE = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 8420U);
  i = 0;
  goto ldv_22754;
  ldv_22753: 
  dev_priv->saveSWF0[i] = readl((void const volatile   *)(dev_priv->mmio_map)->handle + (unsigned long )((i << 2) + 463888));
  dev_priv->saveSWF1[i] = readl((void const volatile   *)(dev_priv->mmio_map)->handle + (unsigned long )((i << 2) + 459792));
  i = i + 1;
  ldv_22754: ;
  if (i <= 15) {
    goto ldv_22753;
  } else {

  }
  i = 0;
  goto ldv_22757;
  ldv_22756: 
  dev_priv->saveSWF2[i] = readl((void const volatile   *)(dev_priv->mmio_map)->handle + (unsigned long )((i << 2) + 467988));
  i = i + 1;
  ldv_22757: ;
  if (i <= 2) {
    goto ldv_22756;
  } else {

  }
  i915_save_vga(dev);
  if (state.event == 2) {
    pci_disable_device(dev->pdev);
    pci_set_power_state(dev->pdev, 3);
  } else {

  }
  return (0);
}
}
static int i915_resume(struct drm_device *dev ) 
{ 
  struct drm_i915_private *dev_priv ;
  int i ;
  int tmp ;
  unsigned int tmp___0 ;
  unsigned int tmp___1 ;

  {
  dev_priv = (struct drm_i915_private *)dev->dev_private;
  pci_set_power_state(dev->pdev, 0);
  pci_restore_state(dev->pdev);
  tmp = pci_enable_device(dev->pdev);
  if (tmp != 0) {
    return (-1);
  } else {

  }
  pci_set_master(dev->pdev);
  pci_write_config_byte(dev->pdev, 244, (int )dev_priv->saveLBB);
  writel(dev_priv->saveDSPARB, (void volatile   *)(dev_priv->mmio_map)->handle + 458800U);
  if ((int )dev_priv->saveDPLL_A < 0) {
    writel(dev_priv->saveDPLL_A & 2147483647U, (void volatile   *)(dev_priv->mmio_map)->handle + 24596U);
    __const_udelay(644250UL);
  } else {

  }
  writel(dev_priv->saveFPA0, (void volatile   *)(dev_priv->mmio_map)->handle + 24640U);
  writel(dev_priv->saveFPA1, (void volatile   *)(dev_priv->mmio_map)->handle + 24644U);
  writel(dev_priv->saveDPLL_A, (void volatile   *)(dev_priv->mmio_map)->handle + 24596U);
  __const_udelay(644250UL);
  if (((((((((dev->pci_device == 10610 || dev->pci_device == 10626) || dev->pci_device == 10642) || dev->pci_device == 10658) || dev->pci_device == 10754) || dev->pci_device == 10770) || dev->pci_device == 10818) || dev->pci_device == 11778) || dev->pci_device == 11794) || dev->pci_device == 11810) {
    writel(dev_priv->saveDPLL_A_MD, (void volatile   *)(dev_priv->mmio_map)->handle + 24604U);
  } else {

  }
  __const_udelay(644250UL);
  writel(dev_priv->saveHTOTAL_A, (void volatile   *)(dev_priv->mmio_map)->handle + 393216U);
  writel(dev_priv->saveHBLANK_A, (void volatile   *)(dev_priv->mmio_map)->handle + 393220U);
  writel(dev_priv->saveHSYNC_A, (void volatile   *)(dev_priv->mmio_map)->handle + 393224U);
  writel(dev_priv->saveVTOTAL_A, (void volatile   *)(dev_priv->mmio_map)->handle + 393228U);
  writel(dev_priv->saveVBLANK_A, (void volatile   *)(dev_priv->mmio_map)->handle + 393232U);
  writel(dev_priv->saveVSYNC_A, (void volatile   *)(dev_priv->mmio_map)->handle + 393236U);
  writel(dev_priv->saveBCLRPAT_A, (void volatile   *)(dev_priv->mmio_map)->handle + 393248U);
  writel(dev_priv->saveDSPASIZE, (void volatile   *)(dev_priv->mmio_map)->handle + 459152U);
  writel(dev_priv->saveDSPAPOS, (void volatile   *)(dev_priv->mmio_map)->handle + 459148U);
  writel(dev_priv->savePIPEASRC, (void volatile   *)(dev_priv->mmio_map)->handle + 393244U);
  writel(dev_priv->saveDSPABASE, (void volatile   *)(dev_priv->mmio_map)->handle + 459140U);
  writel(dev_priv->saveDSPASTRIDE, (void volatile   *)(dev_priv->mmio_map)->handle + 459144U);
  if (((((((((dev->pci_device == 10610 || dev->pci_device == 10626) || dev->pci_device == 10642) || dev->pci_device == 10658) || dev->pci_device == 10754) || dev->pci_device == 10770) || dev->pci_device == 10818) || dev->pci_device == 11778) || dev->pci_device == 11794) || dev->pci_device == 11810) {
    writel(dev_priv->saveDSPASURF, (void volatile   *)(dev_priv->mmio_map)->handle + 459164U);
    writel(dev_priv->saveDSPATILEOFF, (void volatile   *)(dev_priv->mmio_map)->handle + 459172U);
  } else {

  }
  writel(dev_priv->savePIPEACONF, (void volatile   *)(dev_priv->mmio_map)->handle + 458760U);
  i915_restore_palette(dev, PIPE_A);
  writel(dev_priv->saveDSPACNTR, (void volatile   *)(dev_priv->mmio_map)->handle + 459136U);
  tmp___0 = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 459140U);
  writel(tmp___0, (void volatile   *)(dev_priv->mmio_map)->handle + 459140U);
  if ((int )dev_priv->saveDPLL_B < 0) {
    writel(dev_priv->saveDPLL_B & 2147483647U, (void volatile   *)(dev_priv->mmio_map)->handle + 24600U);
    __const_udelay(644250UL);
  } else {

  }
  writel(dev_priv->saveFPB0, (void volatile   *)(dev_priv->mmio_map)->handle + 24648U);
  writel(dev_priv->saveFPB1, (void volatile   *)(dev_priv->mmio_map)->handle + 24652U);
  writel(dev_priv->saveDPLL_B, (void volatile   *)(dev_priv->mmio_map)->handle + 24600U);
  __const_udelay(644250UL);
  if (((((((((dev->pci_device == 10610 || dev->pci_device == 10626) || dev->pci_device == 10642) || dev->pci_device == 10658) || dev->pci_device == 10754) || dev->pci_device == 10770) || dev->pci_device == 10818) || dev->pci_device == 11778) || dev->pci_device == 11794) || dev->pci_device == 11810) {
    writel(dev_priv->saveDPLL_B_MD, (void volatile   *)(dev_priv->mmio_map)->handle + 24608U);
  } else {

  }
  __const_udelay(644250UL);
  writel(dev_priv->saveHTOTAL_B, (void volatile   *)(dev_priv->mmio_map)->handle + 397312U);
  writel(dev_priv->saveHBLANK_B, (void volatile   *)(dev_priv->mmio_map)->handle + 397316U);
  writel(dev_priv->saveHSYNC_B, (void volatile   *)(dev_priv->mmio_map)->handle + 397320U);
  writel(dev_priv->saveVTOTAL_B, (void volatile   *)(dev_priv->mmio_map)->handle + 397324U);
  writel(dev_priv->saveVBLANK_B, (void volatile   *)(dev_priv->mmio_map)->handle + 397328U);
  writel(dev_priv->saveVSYNC_B, (void volatile   *)(dev_priv->mmio_map)->handle + 397332U);
  writel(dev_priv->saveBCLRPAT_B, (void volatile   *)(dev_priv->mmio_map)->handle + 397344U);
  writel(dev_priv->saveDSPBSIZE, (void volatile   *)(dev_priv->mmio_map)->handle + 463248U);
  writel(dev_priv->saveDSPBPOS, (void volatile   *)(dev_priv->mmio_map)->handle + 463244U);
  writel(dev_priv->savePIPEBSRC, (void volatile   *)(dev_priv->mmio_map)->handle + 397340U);
  writel(dev_priv->saveDSPBBASE, (void volatile   *)(dev_priv->mmio_map)->handle + 463236U);
  writel(dev_priv->saveDSPBSTRIDE, (void volatile   *)(dev_priv->mmio_map)->handle + 463240U);
  if (((((((((dev->pci_device == 10610 || dev->pci_device == 10626) || dev->pci_device == 10642) || dev->pci_device == 10658) || dev->pci_device == 10754) || dev->pci_device == 10770) || dev->pci_device == 10818) || dev->pci_device == 11778) || dev->pci_device == 11794) || dev->pci_device == 11810) {
    writel(dev_priv->saveDSPBSURF, (void volatile   *)(dev_priv->mmio_map)->handle + 463260U);
    writel(dev_priv->saveDSPBTILEOFF, (void volatile   *)(dev_priv->mmio_map)->handle + 463268U);
  } else {

  }
  writel(dev_priv->savePIPEBCONF, (void volatile   *)(dev_priv->mmio_map)->handle + 462856U);
  i915_restore_palette(dev, PIPE_B);
  writel(dev_priv->saveDSPBCNTR, (void volatile   *)(dev_priv->mmio_map)->handle + 463232U);
  tmp___1 = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 463236U);
  writel(tmp___1, (void volatile   *)(dev_priv->mmio_map)->handle + 463236U);
  writel(dev_priv->saveADPA, (void volatile   *)(dev_priv->mmio_map)->handle + 397568U);
  if (((((((((dev->pci_device == 10610 || dev->pci_device == 10626) || dev->pci_device == 10642) || dev->pci_device == 10658) || dev->pci_device == 10754) || dev->pci_device == 10770) || dev->pci_device == 10818) || dev->pci_device == 11778) || dev->pci_device == 11794) || dev->pci_device == 11810) {
    writel(dev_priv->saveBLC_PWM_CTL2, (void volatile   *)(dev_priv->mmio_map)->handle + 397904U);
  } else {

  }
  if ((((((dev->pci_device == 13687 || dev->pci_device == 13698) || dev->pci_device == 9618) || (dev->pci_device == 10146 || dev->pci_device == 10158)) || dev->pci_device == 10754) || dev->pci_device == 10818) && dev->pci_device != 13687) {
    writel(dev_priv->saveLVDS, (void volatile   *)(dev_priv->mmio_map)->handle + 397696U);
  } else {

  }
  if (dev->pci_device != 13687 && dev->pci_device != 9570) {
    writel(dev_priv->savePFIT_CONTROL, (void volatile   *)(dev_priv->mmio_map)->handle + 397872U);
  } else {

  }
  writel(dev_priv->savePFIT_PGM_RATIOS, (void volatile   *)(dev_priv->mmio_map)->handle + 397876U);
  writel(dev_priv->saveBLC_PWM_CTL, (void volatile   *)(dev_priv->mmio_map)->handle + 397908U);
  writel(dev_priv->saveLVDSPP_ON, (void volatile   *)(dev_priv->mmio_map)->handle + 397832U);
  writel(dev_priv->saveLVDSPP_OFF, (void volatile   *)(dev_priv->mmio_map)->handle + 397836U);
  writel(dev_priv->savePP_CYCLE, (void volatile   *)(dev_priv->mmio_map)->handle + 397840U);
  writel(dev_priv->savePP_CONTROL, (void volatile   *)(dev_priv->mmio_map)->handle + 397828U);
  writel(dev_priv->saveFBC_CFB_BASE, (void volatile   *)(dev_priv->mmio_map)->handle + 12800U);
  writel(dev_priv->saveFBC_LL_BASE, (void volatile   *)(dev_priv->mmio_map)->handle + 12804U);
  writel(dev_priv->saveFBC_CONTROL2, (void volatile   *)(dev_priv->mmio_map)->handle + 12820U);
  writel(dev_priv->saveFBC_CONTROL, (void volatile   *)(dev_priv->mmio_map)->handle + 12808U);
  writel(dev_priv->saveVGACNTRL, (void volatile   *)(dev_priv->mmio_map)->handle + 463872U);
  writel(dev_priv->saveVCLK_DIVISOR_VGA0, (void volatile   *)(dev_priv->mmio_map)->handle + 24576U);
  writel(dev_priv->saveVCLK_DIVISOR_VGA1, (void volatile   *)(dev_priv->mmio_map)->handle + 24580U);
  writel(dev_priv->saveVCLK_POST_DIV, (void volatile   *)(dev_priv->mmio_map)->handle + 24592U);
  __const_udelay(644250UL);
  writel(dev_priv->saveD_STATE, (void volatile   *)(dev_priv->mmio_map)->handle + 24836U);
  writel(dev_priv->saveDSPCLK_GATE_D, (void volatile   *)(dev_priv->mmio_map)->handle + 25088U);
  writel(dev_priv->saveCACHE_MODE_0 | 4294901760U, (void volatile   *)(dev_priv->mmio_map)->handle + 8480U);
  writel(dev_priv->saveMI_ARB_STATE | 4294901760U, (void volatile   *)(dev_priv->mmio_map)->handle + 8420U);
  i = 0;
  goto ldv_22765;
  ldv_22764: 
  writel(dev_priv->saveSWF0[i], (void volatile   *)(dev_priv->mmio_map)->handle + (unsigned long )((i << 2) + 463888));
  writel(dev_priv->saveSWF1[i + 7], (void volatile   *)(dev_priv->mmio_map)->handle + (unsigned long )((i << 2) + 459792));
  i = i + 1;
  ldv_22765: ;
  if (i <= 15) {
    goto ldv_22764;
  } else {

  }
  i = 0;
  goto ldv_22768;
  ldv_22767: 
  writel(dev_priv->saveSWF2[i], (void volatile   *)(dev_priv->mmio_map)->handle + (unsigned long )((i << 2) + 467988));
  i = i + 1;
  ldv_22768: ;
  if (i <= 2) {
    goto ldv_22767;
  } else {

  }
  i915_restore_vga(dev);
  return (0);
}
}
static struct drm_driver driver  = 
     {& i915_driver_load, 0, 0, & i915_driver_preclose, 0, & i915_driver_lastclose,
    & i915_driver_unload, & i915_suspend, & i915_resume, 0, 0, 0, 0, 0, 0, 0, & i915_driver_vblank_wait,
    & i915_driver_vblank_wait2, 0, & i915_driver_device_is_agp, & i915_driver_irq_handler,
    & i915_driver_irq_preinstall, & i915_driver_irq_postinstall, & i915_driver_irq_uninstall,
    & drm_core_reclaim_buffers, 0, 0, & drm_core_get_map_ofs, & drm_core_get_reg_ofs,
    0, 1, 6, 0, (char *)"i915", (char *)"Intel Graphics", (char *)"20060119", 2499U,
    0, (struct drm_ioctl_desc *)(& i915_ioctls), 0, {& __this_module, 0, 0, 0, 0,
                                                     0, 0, & drm_poll, & drm_ioctl,
                                                     0, & i915_compat_ioctl, & drm_mmap,
                                                     & drm_open, 0, & drm_release,
                                                     0, 0, & drm_fasync, 0, 0, 0,
                                                     0, 0, 0, 0, 0, 0}, {{0, 0}, (char *)"i915",
                                                                         (struct pci_device_id  const  *)(& pciidlist),
                                                                         0, 0, 0,
                                                                         0, 0, 0,
                                                                         0, 0, 0,
                                                                         {0, 0, 0,
                                                                          0, 0, 0,
                                                                          0, 0, 0,
                                                                          0, 0, 0},
                                                                         {{{0U}, 0U,
                                                                           0U, 0,
                                                                           {0, 0,
                                                                            0, 0}},
                                                                          {0, 0},
                                                                          (unsigned char)0}}};
static int i915_init(void) 
{ 
  int tmp ;

  {
  driver.num_ioctls = i915_max_ioctl;
  tmp = drm_init(& driver);
  return (tmp);
}
}
static void i915_exit(void) 
{ 


  {
  drm_exit(& driver);
  return;
}
}
void ldv_check_final_state(void) ;
void ldv_initialize(void) ;
extern void ldv_handler_precall(void) ;
extern int nondet_int(void) ;
int LDV_IN_INTERRUPT  ;
int main(void) 
{ 
  struct drm_device *var_group1 ;
  pm_message_t var_i915_suspend_9_p1 ;
  int tmp ;
  int tmp___0 ;
  int tmp___1 ;

  {
  LDV_IN_INTERRUPT = 1;
  ldv_initialize();
  ldv_handler_precall();
  tmp = i915_init();
  if (tmp != 0) {
    goto ldv_final;
  } else {

  }
  goto ldv_22814;
  ldv_22813: 
  tmp___0 = nondet_int();
  switch (tmp___0) {
  case 0: 
  ldv_handler_precall();
  i915_suspend(var_group1, var_i915_suspend_9_p1);
  goto ldv_22810;
  case 1: 
  ldv_handler_precall();
  i915_resume(var_group1);
  goto ldv_22810;
  default: ;
  goto ldv_22810;
  }
  ldv_22810: ;
  ldv_22814: 
  tmp___1 = nondet_int();
  if (tmp___1 != 0) {
    goto ldv_22813;
  } else {

  }

  ldv_handler_precall();
  i915_exit();
  ldv_final: 
  ldv_check_final_state();
  return 0;
}
}
void __builtin_prefetch(void const   *  , ...) ;
long ldv__builtin_expect(long exp , long c ) ;
extern void *memset(void * , int  , size_t  ) ;
extern void __bad_pda_field(void) ;
extern struct x8664_pda _proxy_pda ;
__inline static struct thread_info *current_thread_info(void) 
{ 
  struct thread_info *ti ;
  unsigned long ret__ ;

  {
  switch (8UL) {
  case 2UL: 
  __asm__  ("movw %%gs:%c1,%0": "=r" (ret__): "i" (16UL), "m" (_proxy_pda.kernelstack));
  goto ldv_5298;
  case 4UL: 
  __asm__  ("movl %%gs:%c1,%0": "=r" (ret__): "i" (16UL), "m" (_proxy_pda.kernelstack));
  goto ldv_5298;
  case 8UL: 
  __asm__  ("movq %%gs:%c1,%0": "=r" (ret__): "i" (16UL), "m" (_proxy_pda.kernelstack));
  goto ldv_5298;
  default: 
  __bad_pda_field();
  }
  ldv_5298: 
  ti = (struct thread_info *)(ret__ - 8152UL);
  return (ti);
}
}
extern void kfree(void const   * ) ;
extern void *__kmalloc(size_t  , gfp_t  ) ;
__inline static void *kmalloc(size_t size , gfp_t flags ) 
{ 
  void *tmp___2 ;

  {
  tmp___2 = __kmalloc(size, flags);
  return (tmp___2);
}
}
extern unsigned long copy_user_generic(void * , void const   * , unsigned int  ) ;
extern unsigned long copy_to_user(void * , void const   * , unsigned int  ) ;
__inline static int __copy_from_user(void *dst , void const   *src , unsigned int size ) 
{ 
  int ret ;
  unsigned long tmp ;
  long tmp___0 ;
  long tmp___1 ;
  unsigned long tmp___2 ;

  {
  ret = 0;
  tmp = copy_user_generic(dst, src, size);
  return ((int )tmp);
  switch (size) {
  case 1U: 
  __asm__  volatile   ("1:\tmovb %2,%b1\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\txorb %b1,%b1\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (ret),
                       "=q" (*((u8 *)dst)): "m" (*((struct __large_struct *)src)),
                       "i" (1), "0" (ret));
  return (ret);
  case 2U: 
  __asm__  volatile   ("1:\tmovw %2,%w1\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\txorw %w1,%w1\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (ret),
                       "=r" (*((u16 *)dst)): "m" (*((struct __large_struct *)src)),
                       "i" (2), "0" (ret));
  return (ret);
  case 4U: 
  __asm__  volatile   ("1:\tmovl %2,%k1\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\txorl %k1,%k1\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (ret),
                       "=r" (*((u32 *)dst)): "m" (*((struct __large_struct *)src)),
                       "i" (4), "0" (ret));
  return (ret);
  case 8U: 
  __asm__  volatile   ("1:\tmovq %2,%1\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\txorq %1,%1\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (ret),
                       "=r" (*((u64 *)dst)): "m" (*((struct __large_struct *)src)),
                       "i" (8), "0" (ret));
  return (ret);
  case 10U: 
  __asm__  volatile   ("1:\tmovq %2,%1\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\txorq %1,%1\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (ret),
                       "=r" (*((u64 *)dst)): "m" (*((struct __large_struct *)src)),
                       "i" (16), "0" (ret));
  tmp___0 = ldv__builtin_expect(ret != 0, 0L);
  if (tmp___0 != 0L) {
    return (ret);
  } else {

  }
  __asm__  volatile   ("1:\tmovw %2,%w1\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\txorw %w1,%w1\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (ret),
                       "=r" (*((u16 *)dst + 8U)): "m" (*((struct __large_struct *)src + 8U)),
                       "i" (2), "0" (ret));
  return (ret);
  case 16U: 
  __asm__  volatile   ("1:\tmovq %2,%1\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\txorq %1,%1\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (ret),
                       "=r" (*((u64 *)dst)): "m" (*((struct __large_struct *)src)),
                       "i" (16), "0" (ret));
  tmp___1 = ldv__builtin_expect(ret != 0, 0L);
  if (tmp___1 != 0L) {
    return (ret);
  } else {

  }
  __asm__  volatile   ("1:\tmovq %2,%1\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\txorq %1,%1\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (ret),
                       "=r" (*((u64 *)dst + 8U)): "m" (*((struct __large_struct *)src + 8U)),
                       "i" (8), "0" (ret));
  return (ret);
  default: 
  tmp___2 = copy_user_generic(dst, src, size);
  return ((int )tmp___2);
  }
}
}
extern int drm_addmap(struct drm_device * , unsigned int  , unsigned int  , enum drm_map_type  ,
                      enum drm_map_flags  , drm_local_map_t ** ) ;
extern int drm_rmmap(struct drm_device * , drm_local_map_t * ) ;
extern unsigned long drm_get_resource_start(struct drm_device * , unsigned int  ) ;
extern unsigned long drm_get_resource_len(struct drm_device * , unsigned int  ) ;
extern int drm_irq_uninstall(struct drm_device * ) ;
extern unsigned int drm_debug ;
extern drm_local_map_t *drm_getsarea(struct drm_device * ) ;
extern drm_dma_handle_t *drm_pci_alloc(struct drm_device * , size_t  , size_t  , dma_addr_t  ) ;
extern void drm_pci_free(struct drm_device * , drm_dma_handle_t * ) ;
extern void drm_core_ioremap(struct drm_map * , struct drm_device * ) ;
extern void drm_core_ioremapfree(struct drm_map * , struct drm_device * ) ;
__inline static struct drm_map *drm_core_findmap(struct drm_device *dev , unsigned int token ) 
{ 
  struct drm_map_list *_entry ;
  struct list_head  const  *__mptr ;
  struct list_head  const  *__mptr___0 ;

  {
  __mptr = (struct list_head  const  *)dev->maplist.next;
  _entry = (struct drm_map_list *)__mptr;
  goto ldv_22268;
  ldv_22267: ;
  if (_entry->user_token == (uint64_t )token) {
    return (_entry->map);
  } else {

  }
  __mptr___0 = (struct list_head  const  *)_entry->head.next;
  _entry = (struct drm_map_list *)__mptr___0;
  ldv_22268: 
  __builtin_prefetch((void const   *)_entry->head.next);
  if ((unsigned long )(& _entry->head) != (unsigned long )(& dev->maplist)) {
    goto ldv_22267;
  } else {

  }

  return (0);
}
}
__inline static void *drm_alloc(size_t size , int area ) 
{ 
  void *tmp ;

  {
  tmp = kmalloc(size, 208U);
  return (tmp);
}
}
__inline static void drm_free(void *pt , size_t size , int area ) 
{ 


  {
  kfree((void const   *)pt);
  return;
}
}
void i915_kernel_lost_context(struct drm_device *dev ) ;
int i915_irq_emit(struct drm_device *dev , void *data , struct drm_file *file_priv ) ;
int i915_irq_wait(struct drm_device *dev , void *data , struct drm_file *file_priv ) ;
int i915_vblank_pipe_set(struct drm_device *dev , void *data , struct drm_file *file_priv ) ;
int i915_vblank_pipe_get(struct drm_device *dev , void *data , struct drm_file *file_priv ) ;
int i915_vblank_swap(struct drm_device *dev , void *data , struct drm_file *file_priv ) ;
int i915_mem_alloc(struct drm_device *dev , void *data , struct drm_file *file_priv ) ;
int i915_mem_free(struct drm_device *dev , void *data , struct drm_file *file_priv ) ;
int i915_mem_init_heap(struct drm_device *dev , void *data , struct drm_file *file_priv ) ;
int i915_mem_destroy_heap(struct drm_device *dev , void *data , struct drm_file *file_priv ) ;
void i915_mem_takedown(struct mem_block **heap ) ;
void i915_mem_release(struct drm_device *dev , struct drm_file *file_priv , struct mem_block *heap ) ;
int i915_wait_ring(struct drm_device *dev , int n , char const   *caller ) ;
int i915_wait_ring(struct drm_device *dev , int n , char const   *caller ) 
{ 
  drm_i915_private_t *dev_priv ;
  drm_i915_ring_buffer_t *ring ;
  u32 last_head ;
  unsigned int tmp ;
  int i ;
  unsigned int tmp___0 ;

  {
  dev_priv = (drm_i915_private_t *)dev->dev_private;
  ring = & dev_priv->ring;
  tmp = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 8244U);
  last_head = tmp & 2097148U;
  i = 0;
  goto ldv_22658;
  ldv_22657: 
  tmp___0 = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 8244U);
  ring->head = (int )tmp___0 & 2097148;
  ring->space = ring->head + (-8 - ring->tail);
  if (ring->space < 0) {
    ring->space = (int )((unsigned int )ring->space + (unsigned int )ring->Size);
  } else {

  }
  if (ring->space >= n) {
    return (0);
  } else {

  }
  (dev_priv->sarea_priv)->perf_boxes = (dev_priv->sarea_priv)->perf_boxes | 4;
  if ((u32 )ring->head != last_head) {
    i = 0;
  } else {

  }
  last_head = (u32 )ring->head;
  i = i + 1;
  ldv_22658: ;
  if (i <= 9999) {
    goto ldv_22657;
  } else {

  }

  return (-16);
}
}
void i915_kernel_lost_context(struct drm_device *dev ) 
{ 
  drm_i915_private_t *dev_priv ;
  drm_i915_ring_buffer_t *ring ;
  unsigned int tmp ;
  unsigned int tmp___0 ;

  {
  dev_priv = (drm_i915_private_t *)dev->dev_private;
  ring = & dev_priv->ring;
  tmp = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 8244U);
  ring->head = (int )tmp & 2097148;
  tmp___0 = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 8240U);
  ring->tail = (int )tmp___0 & 2097144;
  ring->space = ring->head + (-8 - ring->tail);
  if (ring->space < 0) {
    ring->space = (int )((unsigned int )ring->space + (unsigned int )ring->Size);
  } else {

  }
  if (ring->head == ring->tail) {
    (dev_priv->sarea_priv)->perf_boxes = (dev_priv->sarea_priv)->perf_boxes | 1;
  } else {

  }
  return;
}
}
static int i915_dma_cleanup(struct drm_device *dev ) 
{ 
  drm_i915_private_t *dev_priv ;

  {
  dev_priv = (drm_i915_private_t *)dev->dev_private;
  if (dev->irq != 0) {
    drm_irq_uninstall(dev);
  } else {

  }
  if ((unsigned long )dev_priv->ring.virtual_start != (unsigned long )((u8 *)0)) {
    drm_core_ioremapfree(& dev_priv->ring.map, dev);
    dev_priv->ring.virtual_start = 0;
    dev_priv->ring.map.handle = 0;
    dev_priv->ring.map.size = 0UL;
  } else {

  }
  if ((unsigned long )dev_priv->status_page_dmah != (unsigned long )((drm_dma_handle_t *)0)) {
    drm_pci_free(dev, dev_priv->status_page_dmah);
    dev_priv->status_page_dmah = 0;
    writel(536866816U, (void volatile   *)(dev_priv->mmio_map)->handle + 8320U);
  } else {

  }
  if (dev_priv->status_gfx_addr != 0U) {
    dev_priv->status_gfx_addr = 0U;
    drm_core_ioremapfree(& dev_priv->hws_map, dev);
    writel(536866816U, (void volatile   *)(dev_priv->mmio_map)->handle + 8320U);
  } else {

  }
  return (0);
}
}
static int i915_initialize(struct drm_device *dev , drm_i915_init_t *init ) 
{ 
  drm_i915_private_t *dev_priv ;
  struct drm_map *tmp ;

  {
  dev_priv = (drm_i915_private_t *)dev->dev_private;
  dev_priv->sarea = drm_getsarea(dev);
  if ((unsigned long )dev_priv->sarea == (unsigned long )((drm_local_map_t *)0)) {
    printk("<3>[drm:%s] *ERROR* can not find sarea!\n", "i915_initialize");
    i915_dma_cleanup(dev);
    return (-22);
  } else {

  }
  tmp = drm_core_findmap(dev, init->mmio_offset);
  dev_priv->mmio_map = tmp;
  if ((unsigned long )dev_priv->mmio_map == (unsigned long )((drm_local_map_t *)0)) {
    i915_dma_cleanup(dev);
    printk("<3>[drm:%s] *ERROR* can not find mmio map!\n", "i915_initialize");
    return (-22);
  } else {

  }
  dev_priv->sarea_priv = (drm_i915_sarea_t *)(dev_priv->sarea)->handle + (unsigned long )init->sarea_priv_offset;
  dev_priv->ring.Start = (unsigned long )init->ring_start;
  dev_priv->ring.End = (unsigned long )init->ring_end;
  dev_priv->ring.Size = (unsigned long )init->ring_size;
  dev_priv->ring.tail_mask = (int )((unsigned int )dev_priv->ring.Size - 1U);
  dev_priv->ring.map.offset = (unsigned long )init->ring_start;
  dev_priv->ring.map.size = (unsigned long )init->ring_size;
  dev_priv->ring.map.type = _DRM_FRAME_BUFFER;
  dev_priv->ring.map.flags = 0;
  dev_priv->ring.map.mtrr = 0;
  drm_core_ioremap(& dev_priv->ring.map, dev);
  if ((unsigned long )dev_priv->ring.map.handle == (unsigned long )((void *)0)) {
    i915_dma_cleanup(dev);
    printk("<3>[drm:%s] *ERROR* can not ioremap virtual address for ring buffer\n",
           "i915_initialize");
    return (-12);
  } else {

  }
  dev_priv->ring.virtual_start = (u8 *)dev_priv->ring.map.handle;
  dev_priv->cpp = init->cpp;
  dev_priv->back_offset = (int )init->back_offset;
  dev_priv->front_offset = (int )init->front_offset;
  dev_priv->current_page = 0;
  (dev_priv->sarea_priv)->pf_current_page = dev_priv->current_page;
  dev_priv->use_mi_batchbuffer_start = 0;
  if (((((((((dev->pci_device == 10610 || dev->pci_device == 10626) || dev->pci_device == 10642) || dev->pci_device == 10658) || dev->pci_device == 10754) || dev->pci_device == 10770) || dev->pci_device == 10818) || dev->pci_device == 11778) || dev->pci_device == 11794) || dev->pci_device == 11810) {
    dev_priv->use_mi_batchbuffer_start = 1;
  } else {

  }
  dev_priv->allow_batchbuffer = 1;
  if ((((dev->pci_device != 10690 && dev->pci_device != 10674) && dev->pci_device != 10706) && dev->pci_device != 10818) && ((dev->pci_device != 11778 && dev->pci_device != 11794) && dev->pci_device != 11810)) {
    dev_priv->status_page_dmah = drm_pci_alloc(dev, 4096UL, 4096UL, 4294967295ULL);
    if ((unsigned long )dev_priv->status_page_dmah == (unsigned long )((drm_dma_handle_t *)0)) {
      i915_dma_cleanup(dev);
      printk("<3>[drm:%s] *ERROR* Can not allocate hardware status page\n", "i915_initialize");
      return (-12);
    } else {

    }
    dev_priv->hw_status_page = (dev_priv->status_page_dmah)->vaddr;
    dev_priv->dma_status_page = (dev_priv->status_page_dmah)->busaddr;
    memset(dev_priv->hw_status_page, 0, 4096UL);
    writel((unsigned int )dev_priv->dma_status_page, (void volatile   *)(dev_priv->mmio_map)->handle + 8320U);
  } else {

  }
  if (drm_debug != 0U) {
    printk("<7>[drm:%s] Enabled hardware status page\n", "i915_initialize");
  } else {

  }
  return (0);
}
}
static int i915_dma_resume(struct drm_device *dev ) 
{ 
  drm_i915_private_t *dev_priv ;

  {
  dev_priv = (drm_i915_private_t *)dev->dev_private;
  if (drm_debug != 0U) {
    printk("<7>[drm:%s] %s\n", "i915_dma_resume", "i915_dma_resume");
  } else {

  }
  if ((unsigned long )dev_priv->sarea == (unsigned long )((drm_local_map_t *)0)) {
    printk("<3>[drm:%s] *ERROR* can not find sarea!\n", "i915_dma_resume");
    return (-22);
  } else {

  }
  if ((unsigned long )dev_priv->mmio_map == (unsigned long )((drm_local_map_t *)0)) {
    printk("<3>[drm:%s] *ERROR* can not find mmio map!\n", "i915_dma_resume");
    return (-22);
  } else {

  }
  if ((unsigned long )dev_priv->ring.map.handle == (unsigned long )((void *)0)) {
    printk("<3>[drm:%s] *ERROR* can not ioremap virtual address for ring buffer\n",
           "i915_dma_resume");
    return (-12);
  } else {

  }
  if ((unsigned long )dev_priv->hw_status_page == (unsigned long )((void *)0)) {
    printk("<3>[drm:%s] *ERROR* Can not find hardware status page\n", "i915_dma_resume");
    return (-22);
  } else {

  }
  if (drm_debug != 0U) {
    printk("<7>[drm:%s] hw status page @ %p\n", "i915_dma_resume", dev_priv->hw_status_page);
  } else {

  }
  if (dev_priv->status_gfx_addr != 0U) {
    writel(dev_priv->status_gfx_addr, (void volatile   *)(dev_priv->mmio_map)->handle + 8320U);
  } else {
    writel((unsigned int )dev_priv->dma_status_page, (void volatile   *)(dev_priv->mmio_map)->handle + 8320U);
  }
  if (drm_debug != 0U) {
    printk("<7>[drm:%s] Enabled hardware status page\n", "i915_dma_resume");
  } else {

  }
  return (0);
}
}
static int i915_dma_init(struct drm_device *dev , void *data , struct drm_file *file_priv ) 
{ 
  drm_i915_init_t *init ;
  int retcode ;

  {
  init = (drm_i915_init_t *)data;
  retcode = 0;
  switch ((unsigned int )init->func) {
  case 1U: 
  retcode = i915_initialize(dev, init);
  goto ldv_22688;
  case 2U: 
  retcode = i915_dma_cleanup(dev);
  goto ldv_22688;
  case 3U: 
  retcode = i915_dma_resume(dev);
  goto ldv_22688;
  default: 
  retcode = -22;
  goto ldv_22688;
  }
  ldv_22688: ;
  return (retcode);
}
}
static int do_validate_cmd(int cmd ) 
{ 


  {
  switch ((int )((unsigned int )cmd >> 29)) {
  case 0: ;
  switch ((cmd >> 23) & 63) {
  case 0: ;
  return (1);
  case 4: ;
  return (1);
  default: ;
  return (0);
  }
  goto ldv_22699;
  case 1: ;
  return (0);
  case 2: ;
  return ((cmd & 255) + 2);
  case 3: ;
  if (((cmd >> 24) & 31) <= 24) {
    return (1);
  } else {

  }
  switch ((cmd >> 24) & 31) {
  case 28: ;
  return (1);
  case 29: ;
  switch ((cmd >> 16) & 255) {
  case 3: ;
  return ((cmd & 31) + 2);
  case 4: ;
  return ((cmd & 15) + 2);
  default: ;
  return ((cmd & 65535) + 2);
  }
  case 30: ;
  if ((cmd & 8388608) != 0) {
    return ((cmd & 65535) + 1);
  } else {
    return (1);
  }
  case 31: ;
  if ((cmd & 8388608) == 0) {
    return ((cmd & 131071) + 2);
  } else
  if ((cmd & 131072) != 0) {
    if ((cmd & 65535) == 0) {
      return (0);
    } else {
      return (((cmd & 65535) + 1) / 2 + 1);
    }
  } else {
    return (2);
  }
  default: ;
  return (0);
  }
  default: ;
  return (0);
  }
  ldv_22699: ;
  return (0);
}
}
static int validate_cmd(int cmd ) 
{ 
  int ret ;
  int tmp ;

  {
  tmp = do_validate_cmd(cmd);
  ret = tmp;
  return (ret);
}
}
static int i915_emit_cmds(struct drm_device *dev , int *buffer , int dwords ) 
{ 
  drm_i915_private_t *dev_priv ;
  int i ;
  unsigned int outring ;
  unsigned int ringmask ;
  unsigned int outcount ;
  char volatile   *virt ;
  int cmd ;
  int sz ;
  int tmp ;
  int tmp___0 ;

  {
  dev_priv = (drm_i915_private_t *)dev->dev_private;
  if ((unsigned long )(dwords + 1) * 4UL >= dev_priv->ring.Size - 8UL) {
    return (-22);
  } else {

  }
  if (dev_priv->ring.space < ((dwords + 1) & -2) * 4) {
    i915_wait_ring(dev, ((dwords + 1) & -2) * 4, "i915_emit_cmds");
  } else {

  }
  outcount = 0U;
  outring = (unsigned int )dev_priv->ring.tail;
  ringmask = (unsigned int )dev_priv->ring.tail_mask;
  virt = (char volatile   *)dev_priv->ring.virtual_start;
  i = 0;
  goto ldv_22734;
  ldv_22733: 
  tmp = __copy_from_user((void *)(& cmd), (void const   *)buffer + (unsigned long )i,
                         4U);
  if (tmp != 0) {
    return (-22);
  } else {

  }
  sz = validate_cmd(cmd);
  if (sz == 0 || i + sz > dwords) {
    return (-22);
  } else {

  }
  *((unsigned int volatile   *)virt + (unsigned long )outring) = (unsigned int volatile   )cmd;
  outcount = outcount + 1U;
  outring = outring + 4U;
  outring = outring & ringmask;
  goto ldv_22731;
  ldv_22730: 
  tmp___0 = __copy_from_user((void *)(& cmd), (void const   *)buffer + (unsigned long )i,
                             4U);
  if (tmp___0 != 0) {
    return (-22);
  } else {

  }
  *((unsigned int volatile   *)virt + (unsigned long )outring) = (unsigned int volatile   )cmd;
  outcount = outcount + 1U;
  outring = outring + 4U;
  outring = outring & ringmask;
  ldv_22731: 
  i = i + 1;
  sz = sz - 1;
  if (sz != 0) {
    goto ldv_22730;
  } else {

  }

  ldv_22734: ;
  if (i < dwords) {
    goto ldv_22733;
  } else {

  }

  if (dwords & 1) {
    *((unsigned int volatile   *)virt + (unsigned long )outring) = 0U;
    outcount = outcount + 1U;
    outring = outring + 4U;
    outring = outring & ringmask;
  } else {

  }
  dev_priv->ring.tail = (int )outring;
  dev_priv->ring.space = (int )((unsigned int )dev_priv->ring.space - outcount * 4U);
  writel(outring, (void volatile   *)(dev_priv->mmio_map)->handle + 8240U);
  return (0);
}
}
static int i915_emit_box(struct drm_device *dev , struct drm_clip_rect *boxes , int i ,
                         int DR1 , int DR4 ) 
{ 
  drm_i915_private_t *dev_priv ;
  struct drm_clip_rect box ;
  unsigned int outring ;
  unsigned int ringmask ;
  unsigned int outcount ;
  char volatile   *virt ;
  int tmp ;

  {
  dev_priv = (drm_i915_private_t *)dev->dev_private;
  tmp = __copy_from_user((void *)(& box), (void const   *)boxes + (unsigned long )i,
                         8U);
  if (tmp != 0) {
    return (-14);
  } else {

  }
  if ((((int )box.y2 <= (int )box.y1 || (int )box.x2 <= (int )box.x1) || (unsigned int )box.y2 == 0U) || (unsigned int )box.x2 == 0U) {
    printk("<3>[drm:%s] *ERROR* Bad box %d,%d..%d,%d\n", "i915_emit_box", (int )box.x1,
           (int )box.y1, (int )box.x2, (int )box.y2);
    return (-22);
  } else {

  }
  if (((((((((dev->pci_device == 10610 || dev->pci_device == 10626) || dev->pci_device == 10642) || dev->pci_device == 10658) || dev->pci_device == 10754) || dev->pci_device == 10770) || dev->pci_device == 10818) || dev->pci_device == 11778) || dev->pci_device == 11794) || dev->pci_device == 11810) {
    if (dev_priv->ring.space <= 15) {
      i915_wait_ring(dev, 16, "i915_emit_box");
    } else {

    }
    outcount = 0U;
    outring = (unsigned int )dev_priv->ring.tail;
    ringmask = (unsigned int )dev_priv->ring.tail_mask;
    virt = (char volatile   *)dev_priv->ring.virtual_start;
    *((unsigned int volatile   *)virt + (unsigned long )outring) = 2030043138U;
    outcount = outcount + 1U;
    outring = outring + 4U;
    outring = outring & ringmask;
    *((unsigned int volatile   *)virt + (unsigned long )outring) = (unsigned int volatile   )((int )box.x1 | ((int )box.y1 << 16));
    outcount = outcount + 1U;
    outring = outring + 4U;
    outring = outring & ringmask;
    *((unsigned int volatile   *)virt + (unsigned long )outring) = (unsigned int volatile   )((((int )box.x2 + -1) & 65535) | (((int )box.y2 + -1) << 16));
    outcount = outcount + 1U;
    outring = outring + 4U;
    outring = outring & ringmask;
    *((unsigned int volatile   *)virt + (unsigned long )outring) = (unsigned int volatile   )DR4;
    outcount = outcount + 1U;
    outring = outring + 4U;
    outring = outring & ringmask;
    dev_priv->ring.tail = (int )outring;
    dev_priv->ring.space = (int )((unsigned int )dev_priv->ring.space - outcount * 4U);
    writel(outring, (void volatile   *)(dev_priv->mmio_map)->handle + 8240U);
  } else {
    if (dev_priv->ring.space <= 23) {
      i915_wait_ring(dev, 24, "i915_emit_box");
    } else {

    }
    outcount = 0U;
    outring = (unsigned int )dev_priv->ring.tail;
    ringmask = (unsigned int )dev_priv->ring.tail_mask;
    virt = (char volatile   *)dev_priv->ring.virtual_start;
    *((unsigned int volatile   *)virt + (unsigned long )outring) = 2105540611U;
    outcount = outcount + 1U;
    outring = outring + 4U;
    outring = outring & ringmask;
    *((unsigned int volatile   *)virt + (unsigned long )outring) = (unsigned int volatile   )DR1;
    outcount = outcount + 1U;
    outring = outring + 4U;
    outring = outring & ringmask;
    *((unsigned int volatile   *)virt + (unsigned long )outring) = (unsigned int volatile   )((int )box.x1 | ((int )box.y1 << 16));
    outcount = outcount + 1U;
    outring = outring + 4U;
    outring = outring & ringmask;
    *((unsigned int volatile   *)virt + (unsigned long )outring) = (unsigned int volatile   )((((int )box.x2 + -1) & 65535) | (((int )box.y2 + -1) << 16));
    outcount = outcount + 1U;
    outring = outring + 4U;
    outring = outring & ringmask;
    *((unsigned int volatile   *)virt + (unsigned long )outring) = (unsigned int volatile   )DR4;
    outcount = outcount + 1U;
    outring = outring + 4U;
    outring = outring & ringmask;
    *((unsigned int volatile   *)virt + (unsigned long )outring) = 0U;
    outcount = outcount + 1U;
    outring = outring + 4U;
    outring = outring & ringmask;
    dev_priv->ring.tail = (int )outring;
    dev_priv->ring.space = (int )((unsigned int )dev_priv->ring.space - outcount * 4U);
    writel(outring, (void volatile   *)(dev_priv->mmio_map)->handle + 8240U);
  }
  return (0);
}
}
static void i915_emit_breadcrumb(struct drm_device *dev ) 
{ 
  drm_i915_private_t *dev_priv ;
  unsigned int outring ;
  unsigned int ringmask ;
  unsigned int outcount ;
  char volatile   *virt ;

  {
  dev_priv = (drm_i915_private_t *)dev->dev_private;
  dev_priv->counter = dev_priv->counter + 1UL;
  (dev_priv->sarea_priv)->last_enqueue = (int )dev_priv->counter;
  if (dev_priv->counter > 2147483647UL) {
    dev_priv->counter = 1UL;
    (dev_priv->sarea_priv)->last_enqueue = 1;
  } else {

  }
  if (dev_priv->ring.space <= 15) {
    i915_wait_ring(dev, 16, "i915_emit_breadcrumb");
  } else {

  }
  outcount = 0U;
  outring = (unsigned int )dev_priv->ring.tail;
  ringmask = (unsigned int )dev_priv->ring.tail_mask;
  virt = (char volatile   *)dev_priv->ring.virtual_start;
  *((unsigned int volatile   *)virt + (unsigned long )outring) = 276824065U;
  outcount = outcount + 1U;
  outring = outring + 4U;
  outring = outring & ringmask;
  *((unsigned int volatile   *)virt + (unsigned long )outring) = 20U;
  outcount = outcount + 1U;
  outring = outring + 4U;
  outring = outring & ringmask;
  *((unsigned int volatile   *)virt + (unsigned long )outring) = (unsigned int volatile   )dev_priv->counter;
  outcount = outcount + 1U;
  outring = outring + 4U;
  outring = outring & ringmask;
  *((unsigned int volatile   *)virt + (unsigned long )outring) = 0U;
  outcount = outcount + 1U;
  outring = outring + 4U;
  outring = outring & ringmask;
  dev_priv->ring.tail = (int )outring;
  dev_priv->ring.space = (int )((unsigned int )dev_priv->ring.space - outcount * 4U);
  writel(outring, (void volatile   *)(dev_priv->mmio_map)->handle + 8240U);
  return;
}
}
static int i915_dispatch_cmdbuffer(struct drm_device *dev , drm_i915_cmdbuffer_t *cmd ) 
{ 
  int nbox ;
  int i ;
  int count ;
  int ret ;

  {
  nbox = cmd->num_cliprects;
  i = 0;
  if ((cmd->sz & 3) != 0) {
    printk("<3>[drm:%s] *ERROR* alignment", "i915_dispatch_cmdbuffer");
    return (-22);
  } else {

  }
  i915_kernel_lost_context(dev);
  count = nbox != 0 ? nbox : 1;
  i = 0;
  goto ldv_22769;
  ldv_22768: ;
  if (i < nbox) {
    ret = i915_emit_box(dev, cmd->cliprects, i, cmd->DR1, cmd->DR4);
    if (ret != 0) {
      return (ret);
    } else {

    }
  } else {

  }
  ret = i915_emit_cmds(dev, (int *)cmd->buf, cmd->sz / 4);
  if (ret != 0) {
    return (ret);
  } else {

  }
  i = i + 1;
  ldv_22769: ;
  if (i < count) {
    goto ldv_22768;
  } else {

  }
  i915_emit_breadcrumb(dev);
  return (0);
}
}
static int i915_dispatch_batchbuffer(struct drm_device *dev , drm_i915_batchbuffer_t *batch ) 
{ 
  drm_i915_private_t *dev_priv ;
  struct drm_clip_rect *boxes ;
  int nbox ;
  int i ;
  int count ;
  unsigned int outring ;
  unsigned int ringmask ;
  unsigned int outcount ;
  char volatile   *virt ;
  int ret ;
  int tmp ;

  {
  dev_priv = (drm_i915_private_t *)dev->dev_private;
  boxes = batch->cliprects;
  nbox = batch->num_cliprects;
  i = 0;
  if (((batch->start | batch->used) & 7) != 0) {
    printk("<3>[drm:%s] *ERROR* alignment", "i915_dispatch_batchbuffer");
    return (-22);
  } else {

  }
  i915_kernel_lost_context(dev);
  count = nbox != 0 ? nbox : 1;
  i = 0;
  goto ldv_22787;
  ldv_22786: ;
  if (i < nbox) {
    tmp = i915_emit_box(dev, boxes, i, batch->DR1, batch->DR4);
    ret = tmp;
    if (ret != 0) {
      return (ret);
    } else {

    }
  } else {

  }
  if (dev_priv->use_mi_batchbuffer_start != 0) {
    if (dev_priv->ring.space <= 7) {
      i915_wait_ring(dev, 8, "i915_dispatch_batchbuffer");
    } else {

    }
    outcount = 0U;
    outring = (unsigned int )dev_priv->ring.tail;
    ringmask = (unsigned int )dev_priv->ring.tail_mask;
    virt = (char volatile   *)dev_priv->ring.virtual_start;
    if (((((((((dev->pci_device == 10610 || dev->pci_device == 10626) || dev->pci_device == 10642) || dev->pci_device == 10658) || dev->pci_device == 10754) || dev->pci_device == 10770) || dev->pci_device == 10818) || dev->pci_device == 11778) || dev->pci_device == 11794) || dev->pci_device == 11810) {
      *((unsigned int volatile   *)virt + (unsigned long )outring) = 411042176U;
      outcount = outcount + 1U;
      outring = outring + 4U;
      outring = outring & ringmask;
      *((unsigned int volatile   *)virt + (unsigned long )outring) = (unsigned int volatile   )batch->start;
      outcount = outcount + 1U;
      outring = outring + 4U;
      outring = outring & ringmask;
    } else {
      *((unsigned int volatile   *)virt + (unsigned long )outring) = 411041920U;
      outcount = outcount + 1U;
      outring = outring + 4U;
      outring = outring & ringmask;
      *((unsigned int volatile   *)virt + (unsigned long )outring) = (unsigned int volatile   )(batch->start | 1);
      outcount = outcount + 1U;
      outring = outring + 4U;
      outring = outring & ringmask;
    }
    dev_priv->ring.tail = (int )outring;
    dev_priv->ring.space = (int )((unsigned int )dev_priv->ring.space - outcount * 4U);
    writel(outring, (void volatile   *)(dev_priv->mmio_map)->handle + 8240U);
  } else {
    if (dev_priv->ring.space <= 15) {
      i915_wait_ring(dev, 16, "i915_dispatch_batchbuffer");
    } else {

    }
    outcount = 0U;
    outring = (unsigned int )dev_priv->ring.tail;
    ringmask = (unsigned int )dev_priv->ring.tail_mask;
    virt = (char volatile   *)dev_priv->ring.virtual_start;
    *((unsigned int volatile   *)virt + (unsigned long )outring) = 402653185U;
    outcount = outcount + 1U;
    outring = outring + 4U;
    outring = outring & ringmask;
    *((unsigned int volatile   *)virt + (unsigned long )outring) = (unsigned int volatile   )(batch->start | 1);
    outcount = outcount + 1U;
    outring = outring + 4U;
    outring = outring & ringmask;
    *((unsigned int volatile   *)virt + (unsigned long )outring) = (unsigned int volatile   )((batch->start + batch->used) + -4);
    outcount = outcount + 1U;
    outring = outring + 4U;
    outring = outring & ringmask;
    *((unsigned int volatile   *)virt + (unsigned long )outring) = 0U;
    outcount = outcount + 1U;
    outring = outring + 4U;
    outring = outring & ringmask;
    dev_priv->ring.tail = (int )outring;
    dev_priv->ring.space = (int )((unsigned int )dev_priv->ring.space - outcount * 4U);
    writel(outring, (void volatile   *)(dev_priv->mmio_map)->handle + 8240U);
  }
  i = i + 1;
  ldv_22787: ;
  if (i < count) {
    goto ldv_22786;
  } else {

  }
  i915_emit_breadcrumb(dev);
  return (0);
}
}
static int i915_dispatch_flip(struct drm_device *dev ) 
{ 
  drm_i915_private_t *dev_priv ;
  unsigned int outring ;
  unsigned int ringmask ;
  unsigned int outcount ;
  char volatile   *virt ;
  unsigned long tmp ;

  {
  dev_priv = (drm_i915_private_t *)dev->dev_private;
  if (drm_debug != 0U) {
    printk("<7>[drm:%s] %s: page=%d pfCurrentPage=%d\n", "i915_dispatch_flip", "i915_dispatch_flip",
           dev_priv->current_page, (dev_priv->sarea_priv)->pf_current_page);
  } else {

  }
  i915_kernel_lost_context(dev);
  if (dev_priv->ring.space <= 7) {
    i915_wait_ring(dev, 8, "i915_dispatch_flip");
  } else {

  }
  outcount = 0U;
  outring = (unsigned int )dev_priv->ring.tail;
  ringmask = (unsigned int )dev_priv->ring.tail_mask;
  virt = (char volatile   *)dev_priv->ring.virtual_start;
  *((unsigned int volatile   *)virt + (unsigned long )outring) = 33554433U;
  outcount = outcount + 1U;
  outring = outring + 4U;
  outring = outring & ringmask;
  *((unsigned int volatile   *)virt + (unsigned long )outring) = 0U;
  outcount = outcount + 1U;
  outring = outring + 4U;
  outring = outring & ringmask;
  dev_priv->ring.tail = (int )outring;
  dev_priv->ring.space = (int )((unsigned int )dev_priv->ring.space - outcount * 4U);
  writel(outring, (void volatile   *)(dev_priv->mmio_map)->handle + 8240U);
  if (dev_priv->ring.space <= 23) {
    i915_wait_ring(dev, 24, "i915_dispatch_flip");
  } else {

  }
  outcount = 0U;
  outring = (unsigned int )dev_priv->ring.tail;
  ringmask = (unsigned int )dev_priv->ring.tail_mask;
  virt = (char volatile   *)dev_priv->ring.virtual_start;
  *((unsigned int volatile   *)virt + (unsigned long )outring) = 171966466U;
  outcount = outcount + 1U;
  outring = outring + 4U;
  outring = outring & ringmask;
  *((unsigned int volatile   *)virt + (unsigned long )outring) = 0U;
  outcount = outcount + 1U;
  outring = outring + 4U;
  outring = outring & ringmask;
  if (dev_priv->current_page == 0) {
    *((unsigned int volatile   *)virt + (unsigned long )outring) = (unsigned int volatile   )dev_priv->back_offset;
    outcount = outcount + 1U;
    outring = outring + 4U;
    outring = outring & ringmask;
    dev_priv->current_page = 1;
  } else {
    *((unsigned int volatile   *)virt + (unsigned long )outring) = (unsigned int volatile   )dev_priv->front_offset;
    outcount = outcount + 1U;
    outring = outring + 4U;
    outring = outring & ringmask;
    dev_priv->current_page = 0;
  }
  *((unsigned int volatile   *)virt + (unsigned long )outring) = 0U;
  outcount = outcount + 1U;
  outring = outring + 4U;
  outring = outring & ringmask;
  dev_priv->ring.tail = (int )outring;
  dev_priv->ring.space = (int )((unsigned int )dev_priv->ring.space - outcount * 4U);
  writel(outring, (void volatile   *)(dev_priv->mmio_map)->handle + 8240U);
  if (dev_priv->ring.space <= 7) {
    i915_wait_ring(dev, 8, "i915_dispatch_flip");
  } else {

  }
  outcount = 0U;
  outring = (unsigned int )dev_priv->ring.tail;
  ringmask = (unsigned int )dev_priv->ring.tail_mask;
  virt = (char volatile   *)dev_priv->ring.virtual_start;
  *((unsigned int volatile   *)virt + (unsigned long )outring) = 25165828U;
  outcount = outcount + 1U;
  outring = outring + 4U;
  outring = outring & ringmask;
  *((unsigned int volatile   *)virt + (unsigned long )outring) = 0U;
  outcount = outcount + 1U;
  outring = outring + 4U;
  outring = outring & ringmask;
  dev_priv->ring.tail = (int )outring;
  dev_priv->ring.space = (int )((unsigned int )dev_priv->ring.space - outcount * 4U);
  writel(outring, (void volatile   *)(dev_priv->mmio_map)->handle + 8240U);
  tmp = dev_priv->counter;
  dev_priv->counter = dev_priv->counter + 1UL;
  (dev_priv->sarea_priv)->last_enqueue = (int )tmp;
  if (dev_priv->ring.space <= 15) {
    i915_wait_ring(dev, 16, "i915_dispatch_flip");
  } else {

  }
  outcount = 0U;
  outring = (unsigned int )dev_priv->ring.tail;
  ringmask = (unsigned int )dev_priv->ring.tail_mask;
  virt = (char volatile   *)dev_priv->ring.virtual_start;
  *((unsigned int volatile   *)virt + (unsigned long )outring) = 276824065U;
  outcount = outcount + 1U;
  outring = outring + 4U;
  outring = outring & ringmask;
  *((unsigned int volatile   *)virt + (unsigned long )outring) = 20U;
  outcount = outcount + 1U;
  outring = outring + 4U;
  outring = outring & ringmask;
  *((unsigned int volatile   *)virt + (unsigned long )outring) = (unsigned int volatile   )dev_priv->counter;
  outcount = outcount + 1U;
  outring = outring + 4U;
  outring = outring & ringmask;
  *((unsigned int volatile   *)virt + (unsigned long )outring) = 0U;
  outcount = outcount + 1U;
  outring = outring + 4U;
  outring = outring & ringmask;
  dev_priv->ring.tail = (int )outring;
  dev_priv->ring.space = (int )((unsigned int )dev_priv->ring.space - outcount * 4U);
  writel(outring, (void volatile   *)(dev_priv->mmio_map)->handle + 8240U);
  (dev_priv->sarea_priv)->pf_current_page = dev_priv->current_page;
  return (0);
}
}
static int i915_quiescent(struct drm_device *dev ) 
{ 
  drm_i915_private_t *dev_priv ;
  int tmp ;

  {
  dev_priv = (drm_i915_private_t *)dev->dev_private;
  i915_kernel_lost_context(dev);
  tmp = i915_wait_ring(dev, (int )((unsigned int )dev_priv->ring.Size - 8U), "i915_quiescent");
  return (tmp);
}
}
static int i915_flush_ioctl(struct drm_device *dev , void *data , struct drm_file *file_priv ) 
{ 
  int tmp ;

  {
  if ((int )(dev->lock.hw_lock)->lock >= 0 || (unsigned long )dev->lock.file_priv != (unsigned long )file_priv) {
    printk("<3>[drm:%s] *ERROR* %s called without lock held, held  %d owner %p %p\n",
           "i915_flush_ioctl", "i915_flush_ioctl", (unsigned int )(dev->lock.hw_lock)->lock & 2147483648U,
           dev->lock.file_priv, file_priv);
    return (-22);
  } else {

  }
  tmp = i915_quiescent(dev);
  return (tmp);
}
}
static int i915_batchbuffer(struct drm_device *dev , void *data , struct drm_file *file_priv ) 
{ 
  drm_i915_private_t *dev_priv ;
  u32 *hw_status ;
  drm_i915_sarea_t *sarea_priv ;
  drm_i915_batchbuffer_t *batch ;
  int ret ;
  unsigned long flag ;
  unsigned long roksum ;
  struct thread_info *tmp ;
  long tmp___0 ;

  {
  dev_priv = (drm_i915_private_t *)dev->dev_private;
  hw_status = (u32 *)dev_priv->hw_status_page;
  sarea_priv = dev_priv->sarea_priv;
  batch = (drm_i915_batchbuffer_t *)data;
  if (dev_priv->allow_batchbuffer == 0) {
    printk("<3>[drm:%s] *ERROR* Batchbuffer ioctl disabled\n", "i915_batchbuffer");
    return (-22);
  } else {

  }
  if (drm_debug != 0U) {
    printk("<7>[drm:%s] i915 batchbuffer, start %x used %d cliprects %d\n", "i915_batchbuffer",
           batch->start, batch->used, batch->num_cliprects);
  } else {

  }
  if ((int )(dev->lock.hw_lock)->lock >= 0 || (unsigned long )dev->lock.file_priv != (unsigned long )file_priv) {
    printk("<3>[drm:%s] *ERROR* %s called without lock held, held  %d owner %p %p\n",
           "i915_batchbuffer", "i915_batchbuffer", (unsigned int )(dev->lock.hw_lock)->lock & 2147483648U,
           dev->lock.file_priv, file_priv);
    return (-22);
  } else {

  }
  if (batch->num_cliprects != 0) {
    tmp = current_thread_info();
    __asm__  ("add %3,%1 ; sbb %0,%0 ; cmp %1,%4 ; sbb $0,%0": "=&r" (flag), "=r" (roksum): "1" (batch->cliprects),
              "g" ((long )((unsigned long )batch->num_cliprects * 8UL)), "rm" (tmp->addr_limit.seg));
    tmp___0 = ldv__builtin_expect(flag == 0UL, 1L);
    if (tmp___0 == 0L) {
      return (-14);
    } else {

    }
  } else {

  }
  ret = i915_dispatch_batchbuffer(dev, batch);
  sarea_priv->last_dispatch = (int )*(hw_status + 5UL);
  return (ret);
}
}
static int i915_cmdbuffer(struct drm_device *dev , void *data , struct drm_file *file_priv ) 
{ 
  drm_i915_private_t *dev_priv ;
  u32 *hw_status ;
  drm_i915_sarea_t *sarea_priv ;
  drm_i915_cmdbuffer_t *cmdbuf ;
  int ret ;
  unsigned long flag ;
  unsigned long roksum ;
  struct thread_info *tmp ;
  long tmp___0 ;

  {
  dev_priv = (drm_i915_private_t *)dev->dev_private;
  hw_status = (u32 *)dev_priv->hw_status_page;
  sarea_priv = dev_priv->sarea_priv;
  cmdbuf = (drm_i915_cmdbuffer_t *)data;
  if (drm_debug != 0U) {
    printk("<7>[drm:%s] i915 cmdbuffer, buf %p sz %d cliprects %d\n", "i915_cmdbuffer",
           cmdbuf->buf, cmdbuf->sz, cmdbuf->num_cliprects);
  } else {

  }
  if ((int )(dev->lock.hw_lock)->lock >= 0 || (unsigned long )dev->lock.file_priv != (unsigned long )file_priv) {
    printk("<3>[drm:%s] *ERROR* %s called without lock held, held  %d owner %p %p\n",
           "i915_cmdbuffer", "i915_cmdbuffer", (unsigned int )(dev->lock.hw_lock)->lock & 2147483648U,
           dev->lock.file_priv, file_priv);
    return (-22);
  } else {

  }
  if (cmdbuf->num_cliprects != 0) {
    tmp = current_thread_info();
    __asm__  ("add %3,%1 ; sbb %0,%0 ; cmp %1,%4 ; sbb $0,%0": "=&r" (flag), "=r" (roksum): "1" (cmdbuf->cliprects),
              "g" ((long )((unsigned long )cmdbuf->num_cliprects * 8UL)), "rm" (tmp->addr_limit.seg));
    tmp___0 = ldv__builtin_expect(flag == 0UL, 1L);
    if (tmp___0 == 0L) {
      printk("<3>[drm:%s] *ERROR* Fault accessing cliprects\n", "i915_cmdbuffer");
      return (-14);
    } else {

    }
  } else {

  }
  ret = i915_dispatch_cmdbuffer(dev, cmdbuf);
  if (ret != 0) {
    printk("<3>[drm:%s] *ERROR* i915_dispatch_cmdbuffer failed\n", "i915_cmdbuffer");
    return (ret);
  } else {

  }
  sarea_priv->last_dispatch = (int )*(hw_status + 5UL);
  return (0);
}
}
static int i915_flip_bufs(struct drm_device *dev , void *data , struct drm_file *file_priv ) 
{ 
  int tmp ;

  {
  if (drm_debug != 0U) {
    printk("<7>[drm:%s] %s\n", "i915_flip_bufs", "i915_flip_bufs");
  } else {

  }
  if ((int )(dev->lock.hw_lock)->lock >= 0 || (unsigned long )dev->lock.file_priv != (unsigned long )file_priv) {
    printk("<3>[drm:%s] *ERROR* %s called without lock held, held  %d owner %p %p\n",
           "i915_flip_bufs", "i915_flip_bufs", (unsigned int )(dev->lock.hw_lock)->lock & 2147483648U,
           dev->lock.file_priv, file_priv);
    return (-22);
  } else {

  }
  tmp = i915_dispatch_flip(dev);
  return (tmp);
}
}
static int i915_getparam(struct drm_device *dev , void *data , struct drm_file *file_priv ) 
{ 
  drm_i915_private_t *dev_priv ;
  drm_i915_getparam_t *param ;
  int value ;
  unsigned long tmp ;

  {
  dev_priv = (drm_i915_private_t *)dev->dev_private;
  param = (drm_i915_getparam_t *)data;
  if ((unsigned long )dev_priv == (unsigned long )((drm_i915_private_t *)0)) {
    printk("<3>[drm:%s] *ERROR* called with no initialization\n", "i915_getparam");
    return (-22);
  } else {

  }
  switch (param->param) {
  case 1: 
  value = dev->irq != 0;
  goto ldv_22853;
  case 2: 
  value = dev_priv->allow_batchbuffer != 0;
  goto ldv_22853;
  case 3: 
  value = (int )*((u32 volatile   *)dev_priv->hw_status_page + 5UL);
  goto ldv_22853;
  default: 
  printk("<3>[drm:%s] *ERROR* Unknown parameter %d\n", "i915_getparam", param->param);
  return (-22);
  }
  ldv_22853: 
  tmp = copy_to_user((void *)param->value, (void const   *)(& value), 4U);
  if (tmp != 0UL) {
    printk("<3>[drm:%s] *ERROR* DRM_COPY_TO_USER failed\n", "i915_getparam");
    return (-14);
  } else {

  }
  return (0);
}
}
static int i915_setparam(struct drm_device *dev , void *data , struct drm_file *file_priv ) 
{ 
  drm_i915_private_t *dev_priv ;
  drm_i915_setparam_t *param ;

  {
  dev_priv = (drm_i915_private_t *)dev->dev_private;
  param = (drm_i915_setparam_t *)data;
  if ((unsigned long )dev_priv == (unsigned long )((drm_i915_private_t *)0)) {
    printk("<3>[drm:%s] *ERROR* called with no initialization\n", "i915_setparam");
    return (-22);
  } else {

  }
  switch (param->param) {
  case 1: ;
  if (((((((((dev->pci_device != 10610 && dev->pci_device != 10626) && dev->pci_device != 10642) && dev->pci_device != 10658) && dev->pci_device != 10754) && dev->pci_device != 10770) && dev->pci_device != 10818) && dev->pci_device != 11778) && dev->pci_device != 11794) && dev->pci_device != 11810) {
    dev_priv->use_mi_batchbuffer_start = param->value;
  } else {

  }
  goto ldv_22866;
  case 2: 
  dev_priv->tex_lru_log_granularity = param->value;
  goto ldv_22866;
  case 3: 
  dev_priv->allow_batchbuffer = param->value;
  goto ldv_22866;
  default: 
  printk("<3>[drm:%s] *ERROR* unknown parameter %d\n", "i915_setparam", param->param);
  return (-22);
  }
  ldv_22866: ;
  return (0);
}
}
static int i915_set_status_page(struct drm_device *dev , void *data , struct drm_file *file_priv ) 
{ 
  drm_i915_private_t *dev_priv ;
  drm_i915_hws_addr_t *hws ;

  {
  dev_priv = (drm_i915_private_t *)dev->dev_private;
  hws = (drm_i915_hws_addr_t *)data;
  if ((((dev->pci_device != 10690 && dev->pci_device != 10674) && dev->pci_device != 10706) && dev->pci_device != 10818) && ((dev->pci_device != 11778 && dev->pci_device != 11794) && dev->pci_device != 11810)) {
    return (-22);
  } else {

  }
  if ((unsigned long )dev_priv == (unsigned long )((drm_i915_private_t *)0)) {
    printk("<3>[drm:%s] *ERROR* called with no initialization\n", "i915_set_status_page");
    return (-22);
  } else {

  }
  printk("<7>set status page addr 0x%08x\n", (unsigned int )hws->addr);
  dev_priv->status_gfx_addr = (unsigned int )hws->addr & 536866816U;
  dev_priv->hws_map.offset = (unsigned long )((unsigned long long )(dev->agp)->base + hws->addr);
  dev_priv->hws_map.size = 4096UL;
  dev_priv->hws_map.type = _DRM_FRAME_BUFFER;
  dev_priv->hws_map.flags = 0;
  dev_priv->hws_map.mtrr = 0;
  drm_core_ioremap(& dev_priv->hws_map, dev);
  if ((unsigned long )dev_priv->hws_map.handle == (unsigned long )((void *)0)) {
    i915_dma_cleanup(dev);
    dev_priv->status_gfx_addr = 0U;
    printk("<3>[drm:%s] *ERROR* can not ioremap virtual address for G33 hw status page\n",
           "i915_set_status_page");
    return (-12);
  } else {

  }
  dev_priv->hw_status_page = dev_priv->hws_map.handle;
  memset(dev_priv->hw_status_page, 0, 4096UL);
  writel(dev_priv->status_gfx_addr, (void volatile   *)(dev_priv->mmio_map)->handle + 8320U);
  if (drm_debug != 0U) {
    printk("<7>[drm:%s] load hws 0x2080 with gfx mem 0x%x\n", "i915_set_status_page",
           dev_priv->status_gfx_addr);
  } else {

  }
  if (drm_debug != 0U) {
    printk("<7>[drm:%s] load hws at %p\n", "i915_set_status_page", dev_priv->hw_status_page);
  } else {

  }
  return (0);
}
}
int i915_driver_load(struct drm_device *dev , unsigned long flags ) 
{ 
  struct drm_i915_private *dev_priv ;
  unsigned long base ;
  unsigned long size ;
  int ret ;
  int mmio_bar ;
  void *tmp ;

  {
  dev_priv = (struct drm_i915_private *)dev->dev_private;
  ret = 0;
  mmio_bar = (((((dev->pci_device != 9602 && dev->pci_device != 9610) && dev->pci_device != 9618) && dev->pci_device != 10098) && (dev->pci_device != 10146 && dev->pci_device != 10158)) && (((((((((dev->pci_device != 10610 && dev->pci_device != 10626) && dev->pci_device != 10642) && dev->pci_device != 10658) && dev->pci_device != 10754) && dev->pci_device != 10770) && dev->pci_device != 10818) && dev->pci_device != 11778) && dev->pci_device != 11794) && dev->pci_device != 11810)) && ((dev->pci_device != 10690 && dev->pci_device != 10674) && dev->pci_device != 10706);
  dev->counters = dev->counters + 4UL;
  dev->types[6] = _DRM_STAT_IRQ;
  dev->types[7] = _DRM_STAT_PRIMARY;
  dev->types[8] = _DRM_STAT_SECONDARY;
  dev->types[9] = _DRM_STAT_DMA;
  tmp = drm_alloc(3792UL, 2);
  dev_priv = (struct drm_i915_private *)tmp;
  if ((unsigned long )dev_priv == (unsigned long )((struct drm_i915_private *)0)) {
    return (-12);
  } else {

  }
  memset((void *)dev_priv, 0, 3792UL);
  dev->dev_private = (void *)dev_priv;
  base = drm_get_resource_start(dev, (unsigned int )mmio_bar);
  size = drm_get_resource_len(dev, (unsigned int )mmio_bar);
  ret = drm_addmap(dev, (unsigned int )base, (unsigned int )size, _DRM_REGISTERS,
                   136, & dev_priv->mmio_map);
  return (ret);
}
}
int i915_driver_unload(struct drm_device *dev ) 
{ 
  struct drm_i915_private *dev_priv ;

  {
  dev_priv = (struct drm_i915_private *)dev->dev_private;
  if ((unsigned long )dev_priv->mmio_map != (unsigned long )((drm_local_map_t *)0)) {
    drm_rmmap(dev, dev_priv->mmio_map);
  } else {

  }
  drm_free(dev->dev_private, 3792UL, 2);
  return (0);
}
}
void i915_driver_lastclose(struct drm_device *dev ) 
{ 
  drm_i915_private_t *dev_priv ;

  {
  dev_priv = (drm_i915_private_t *)dev->dev_private;
  if ((unsigned long )dev_priv == (unsigned long )((drm_i915_private_t *)0)) {
    return;
  } else {

  }
  if ((unsigned long )dev_priv->agp_heap != (unsigned long )((struct mem_block *)0)) {
    i915_mem_takedown(& dev_priv->agp_heap);
  } else {

  }
  i915_dma_cleanup(dev);
  return;
}
}
void i915_driver_preclose(struct drm_device *dev , struct drm_file *file_priv ) 
{ 
  drm_i915_private_t *dev_priv ;

  {
  dev_priv = (drm_i915_private_t *)dev->dev_private;
  i915_mem_release(dev, file_priv, dev_priv->agp_heap);
  return;
}
}
struct drm_ioctl_desc i915_ioctls[18U]  = 
  {      {0U, & i915_dma_init, 7}, 
        {1U, & i915_flush_ioctl, 1}, 
        {2U, & i915_flip_bufs, 1}, 
        {3U, & i915_batchbuffer, 1}, 
        {4U, & i915_irq_emit, 1}, 
        {5U, & i915_irq_wait, 1}, 
        {6U, & i915_getparam, 1}, 
        {7U, & i915_setparam, 7}, 
        {8U, & i915_mem_alloc, 1}, 
        {9U, & i915_mem_free, 1}, 
        {10U, & i915_mem_init_heap, 7}, 
        {11U, & i915_cmdbuffer, 1}, 
        {12U, & i915_mem_destroy_heap, 7}, 
        {13U, & i915_vblank_pipe_set, 7}, 
        {14U, & i915_vblank_pipe_get, 1}, 
        {15U, & i915_vblank_swap, 1}, 
        {0U, 0, 0}, 
        {17U, & i915_set_status_page, 1}};
int i915_max_ioctl  =    18;
int i915_driver_device_is_agp(struct drm_device *dev ) 
{ 


  {
  return (1);
}
}
__inline static int variable_test_bit(int nr , unsigned long const volatile   *addr ) 
{ 
  int oldbit ;

  {
  __asm__  volatile   ("bt %2,%1\n\tsbb %0,%0": "=r" (oldbit): "m" (*((unsigned long *)addr)),
                       "Ir" (nr));
  return (oldbit);
}
}
__inline static struct task_struct *get_current(void) 
{ 
  struct task_struct *ret__ ;

  {
  switch (8UL) {
  case 2UL: 
  __asm__  ("movw %%gs:%c1,%0": "=r" (ret__): "i" (0UL), "m" (_proxy_pda.pcurrent));
  goto ldv_4027;
  case 4UL: 
  __asm__  ("movl %%gs:%c1,%0": "=r" (ret__): "i" (0UL), "m" (_proxy_pda.pcurrent));
  goto ldv_4027;
  case 8UL: 
  __asm__  ("movq %%gs:%c1,%0": "=r" (ret__): "i" (0UL), "m" (_proxy_pda.pcurrent));
  goto ldv_4027;
  default: 
  __bad_pda_field();
  }
  ldv_4027: ;
  return (ret__);
}
}
__inline static void INIT_LIST_HEAD(struct list_head *list ) 
{ 


  {
  list->next = list;
  list->prev = list;
  return;
}
}
extern void __list_add(struct list_head * , struct list_head * , struct list_head * ) ;
__inline static void list_add_tail(struct list_head *new , struct list_head *head ) 
{ 


  {
  __list_add(new, head->prev, head);
  return;
}
}
extern void list_del(struct list_head * ) ;
__inline static void atomic_inc(atomic_t *v ) 
{ 


  {
  __asm__  volatile   (".section .smp_locks,\"a\"\n .balign 8 \n .quad 661f\n.previous\n661:\n\tlock; incl %0": "=m" (v->counter): "m" (v->counter));
  return;
}
}
__inline static int test_ti_thread_flag(struct thread_info *ti , int flag ) 
{ 
  int tmp ;

  {
  tmp = variable_test_bit(flag, (unsigned long const volatile   *)(& ti->flags));
  return (tmp);
}
}
extern void __spin_lock_init(spinlock_t * , char const   * , struct lock_class_key * ) ;
extern void _spin_lock(spinlock_t * ) ;
extern unsigned long _spin_lock_irqsave(spinlock_t * ) ;
extern void _spin_unlock(spinlock_t * ) ;
extern void _spin_unlock_irqrestore(spinlock_t * , unsigned long  ) ;
extern int default_wake_function(wait_queue_t * , unsigned int  , int  , void * ) ;
extern void init_waitqueue_head(wait_queue_head_t * ) ;
extern void add_wait_queue(wait_queue_head_t * , wait_queue_t * ) ;
extern void remove_wait_queue(wait_queue_head_t * , wait_queue_t * ) ;
extern void __wake_up(wait_queue_head_t * , unsigned int  , int  , void * ) ;
extern unsigned long volatile   jiffies ;
__inline static void *kcalloc(size_t n , size_t size , gfp_t flags ) 
{ 
  void *tmp ;

  {
  if (size != 0UL && 0xffffffffffffffffUL / size < n) {
    return (0);
  } else {

  }
  tmp = __kmalloc(n * size, flags | 32768U);
  return (tmp);
}
}
__inline static unsigned short readw(void const volatile   *addr ) 
{ 
  unsigned short ret ;

  {
  __asm__  volatile   ("movw %1,%0": "=r" (ret): "m" (*((unsigned short volatile   *)addr)): "memory");
  return (ret);
}
}
__inline static void writew(unsigned short val , void volatile   *addr ) 
{ 


  {
  __asm__  volatile   ("movw %0,%1": : "r" (val), "m" (*((unsigned short volatile   *)addr)): "memory");
  return;
}
}
extern long schedule_timeout(long  ) ;
__inline static int test_tsk_thread_flag(struct task_struct *tsk , int flag ) 
{ 
  int tmp ;

  {
  tmp = test_ti_thread_flag((struct thread_info *)tsk->stack, flag);
  return (tmp);
}
}
__inline static int signal_pending(struct task_struct *p ) 
{ 
  int tmp ;
  long tmp___0 ;

  {
  tmp = test_tsk_thread_flag(p, 2);
  tmp___0 = ldv__builtin_expect(tmp != 0, 0L);
  return ((int )tmp___0);
}
}
extern struct drm_drawable_info *drm_get_drawable_info(struct drm_device * , drm_drawable_t  ) ;
extern void drm_vbl_send_signals(struct drm_device * ) ;
extern void drm_locked_tasklet(struct drm_device * , void (*)(struct drm_device * ) ) ;
__inline static void *drm_calloc(size_t nmemb , size_t size , int area ) 
{ 
  void *tmp ;

  {
  tmp = kcalloc(nmemb, size, 208U);
  return (tmp);
}
}
static void i915_vblank_tasklet(struct drm_device *dev ) 
{ 
  drm_i915_private_t *dev_priv ;
  unsigned long irqflags ;
  struct list_head *list ;
  struct list_head *tmp ;
  struct list_head hits ;
  struct list_head *hit ;
  int nhits ;
  int nrects ;
  int slice[2U] ;
  int upper[2U] ;
  int lower[2U] ;
  int i ;
  unsigned int counter[2U] ;
  struct drm_drawable_info *drw ;
  drm_i915_sarea_t *sarea_priv ;
  u32 cpp ;
  u32 cmd ;
  u32 src_pitch ;
  u32 dst_pitch ;
  u32 ropcpp ;
  unsigned int outring ;
  unsigned int ringmask ;
  unsigned int outcount ;
  char volatile   *virt ;
  drm_i915_vbl_swap_t *vbl_swap ;
  struct list_head  const  *__mptr ;
  drm_i915_vbl_swap_t *swap_cmp ;
  struct list_head  const  *__mptr___0 ;
  struct drm_drawable_info *drw_cmp ;
  struct drm_drawable_info *tmp___0 ;
  int _max1 ;
  int _max2 ;
  int _max1___0 ;
  int _max2___0 ;
  drm_i915_vbl_swap_t *swap_hit ;
  struct list_head  const  *__mptr___1 ;
  struct drm_clip_rect *rect ;
  int num_rects ;
  int pipe ;
  unsigned short top ;
  unsigned short bottom ;
  int y1 ;
  unsigned short _max1___1 ;
  unsigned short _max2___1 ;
  int y2 ;
  unsigned short _min1 ;
  unsigned short _min2 ;
  int tmp___1 ;
  int tmp___2 ;
  drm_i915_vbl_swap_t *swap_hit___0 ;
  struct list_head  const  *__mptr___2 ;

  {
  dev_priv = (drm_i915_private_t *)dev->dev_private;
  counter[0] = (unsigned int )dev->vbl_received.counter;
  counter[1] = (unsigned int )dev->vbl_received2.counter;
  sarea_priv = dev_priv->sarea_priv;
  cpp = dev_priv->cpp;
  cmd = cpp == 4U ? 1425014790U : 1421869062U;
  src_pitch = (u32 )sarea_priv->pitch * cpp;
  dst_pitch = (u32 )sarea_priv->pitch * cpp;
  ropcpp = ((cpp - 1U) << 24) | 13369344U;
  if ((((((((((dev->pci_device == 10610 || dev->pci_device == 10626) || dev->pci_device == 10642) || dev->pci_device == 10658) || dev->pci_device == 10754) || dev->pci_device == 10770) || dev->pci_device == 10818) || dev->pci_device == 11778) || dev->pci_device == 11794) || dev->pci_device == 11810) && sarea_priv->front_tiled != 0U) {
    cmd = cmd | 2048U;
    dst_pitch = dst_pitch >> 2;
  } else {

  }
  if ((((((((((dev->pci_device == 10610 || dev->pci_device == 10626) || dev->pci_device == 10642) || dev->pci_device == 10658) || dev->pci_device == 10754) || dev->pci_device == 10770) || dev->pci_device == 10818) || dev->pci_device == 11778) || dev->pci_device == 11794) || dev->pci_device == 11810) && sarea_priv->back_tiled != 0U) {
    cmd = cmd | 32768U;
    src_pitch = src_pitch >> 2;
  } else {

  }
  if (drm_debug != 0U) {
    printk("<7>[drm:%s] \n", "i915_vblank_tasklet");
  } else {

  }
  INIT_LIST_HEAD(& hits);
  nrects = 0;
  nhits = nrects;
  irqflags = _spin_lock_irqsave(& dev_priv->swaps_lock);
  list = dev_priv->vbl_swaps.head.next;
  tmp = list->next;
  goto ldv_22691;
  ldv_22690: 
  __mptr = (struct list_head  const  *)list;
  vbl_swap = (drm_i915_vbl_swap_t *)__mptr;
  if (counter[vbl_swap->pipe] - vbl_swap->sequence > 8388608U) {
    goto ldv_22682;
  } else {

  }
  list_del(list);
  dev_priv->swaps_pending = dev_priv->swaps_pending - 1U;
  _spin_unlock(& dev_priv->swaps_lock);
  _spin_lock(& dev->drw_lock);
  drw = drm_get_drawable_info(dev, vbl_swap->drw_id);
  if ((unsigned long )drw == (unsigned long )((struct drm_drawable_info *)0)) {
    _spin_unlock(& dev->drw_lock);
    drm_free((void *)vbl_swap, 32UL, 2);
    _spin_lock(& dev_priv->swaps_lock);
    goto ldv_22682;
  } else {

  }
  hit = hits.next;
  goto ldv_22689;
  ldv_22688: 
  __mptr___0 = (struct list_head  const  *)hit;
  swap_cmp = (drm_i915_vbl_swap_t *)__mptr___0;
  tmp___0 = drm_get_drawable_info(dev, swap_cmp->drw_id);
  drw_cmp = tmp___0;
  if ((unsigned long )drw_cmp != (unsigned long )((struct drm_drawable_info *)0) && (int )(drw_cmp->rects)->y1 > (int )(drw->rects)->y1) {
    list_add_tail(list, hit);
    goto ldv_22687;
  } else {

  }
  hit = hit->next;
  ldv_22689: 
  __builtin_prefetch((void const   *)hit->next);
  if ((unsigned long )(& hits) != (unsigned long )hit) {
    goto ldv_22688;
  } else {

  }
  ldv_22687: 
  _spin_unlock(& dev->drw_lock);
  if ((unsigned long )(& hits) == (unsigned long )hit) {
    list_add_tail(list, hits.prev);
  } else {

  }
  nhits = nhits + 1;
  _spin_lock(& dev_priv->swaps_lock);
  ldv_22682: 
  list = tmp;
  tmp = list->next;
  ldv_22691: ;
  if ((unsigned long )(& dev_priv->vbl_swaps.head) != (unsigned long )list) {
    goto ldv_22690;
  } else {

  }

  if (nhits == 0) {
    _spin_unlock_irqrestore(& dev_priv->swaps_lock, irqflags);
    return;
  } else {

  }
  _spin_unlock(& dev_priv->swaps_lock);
  i915_kernel_lost_context(dev);
  if (((((((((dev->pci_device == 10610 || dev->pci_device == 10626) || dev->pci_device == 10642) || dev->pci_device == 10658) || dev->pci_device == 10754) || dev->pci_device == 10770) || dev->pci_device == 10818) || dev->pci_device == 11778) || dev->pci_device == 11794) || dev->pci_device == 11810) {
    if (dev_priv->ring.space <= 15) {
      i915_wait_ring(dev, 16, "i915_vblank_tasklet");
    } else {

    }
    outcount = 0U;
    outring = (unsigned int )dev_priv->ring.tail;
    ringmask = (unsigned int )dev_priv->ring.tail_mask;
    virt = (char volatile   *)dev_priv->ring.virtual_start;
    *((unsigned int volatile   *)virt + (unsigned long )outring) = 2030043138U;
    outcount = outcount + 1U;
    outring = outring + 4U;
    outring = outring & ringmask;
    *((unsigned int volatile   *)virt + (unsigned long )outring) = 0U;
    outcount = outcount + 1U;
    outring = outring + 4U;
    outring = outring & ringmask;
    *((unsigned int volatile   *)virt + (unsigned long )outring) = (unsigned int volatile   )(((sarea_priv->width + -1) & 65535) | ((sarea_priv->height + -1) << 16));
    outcount = outcount + 1U;
    outring = outring + 4U;
    outring = outring & ringmask;
    *((unsigned int volatile   *)virt + (unsigned long )outring) = 0U;
    outcount = outcount + 1U;
    outring = outring + 4U;
    outring = outring & ringmask;
    dev_priv->ring.tail = (int )outring;
    dev_priv->ring.space = (int )((unsigned int )dev_priv->ring.space - outcount * 4U);
    writel(outring, (void volatile   *)(dev_priv->mmio_map)->handle + 8240U);
  } else {
    if (dev_priv->ring.space <= 23) {
      i915_wait_ring(dev, 24, "i915_vblank_tasklet");
    } else {

    }
    outcount = 0U;
    outring = (unsigned int )dev_priv->ring.tail;
    ringmask = (unsigned int )dev_priv->ring.tail_mask;
    virt = (char volatile   *)dev_priv->ring.virtual_start;
    *((unsigned int volatile   *)virt + (unsigned long )outring) = 2105540611U;
    outcount = outcount + 1U;
    outring = outring + 4U;
    outring = outring & ringmask;
    *((unsigned int volatile   *)virt + (unsigned long )outring) = 0U;
    outcount = outcount + 1U;
    outring = outring + 4U;
    outring = outring & ringmask;
    *((unsigned int volatile   *)virt + (unsigned long )outring) = 0U;
    outcount = outcount + 1U;
    outring = outring + 4U;
    outring = outring & ringmask;
    *((unsigned int volatile   *)virt + (unsigned long )outring) = (unsigned int volatile   )(sarea_priv->width | (sarea_priv->height << 16));
    outcount = outcount + 1U;
    outring = outring + 4U;
    outring = outring & ringmask;
    *((unsigned int volatile   *)virt + (unsigned long )outring) = (unsigned int volatile   )(sarea_priv->width | (sarea_priv->height << 16));
    outcount = outcount + 1U;
    outring = outring + 4U;
    outring = outring & ringmask;
    *((unsigned int volatile   *)virt + (unsigned long )outring) = 0U;
    outcount = outcount + 1U;
    outring = outring + 4U;
    outring = outring & ringmask;
    dev_priv->ring.tail = (int )outring;
    dev_priv->ring.space = (int )((unsigned int )dev_priv->ring.space - outcount * 4U);
    writel(outring, (void volatile   *)(dev_priv->mmio_map)->handle + 8240U);
  }
  sarea_priv->ctxOwner = 0;
  upper[1] = 0;
  upper[0] = upper[1];
  _max1 = sarea_priv->pipeA_h / nhits;
  _max2 = 1;
  slice[0] = _max1 > _max2 ? _max1 : _max2;
  _max1___0 = sarea_priv->pipeB_h / nhits;
  _max2___0 = 1;
  slice[1] = _max1___0 > _max2___0 ? _max1___0 : _max2___0;
  lower[0] = sarea_priv->pipeA_y + slice[0];
  lower[1] = sarea_priv->pipeB_y + slice[0];
  _spin_lock(& dev->drw_lock);
  i = 0;
  goto ldv_22727;
  ldv_22726: ;
  if (i == nhits) {
    lower[1] = sarea_priv->height;
    lower[0] = lower[1];
  } else {

  }
  hit = hits.next;
  goto ldv_22724;
  ldv_22723: 
  __mptr___1 = (struct list_head  const  *)hit;
  swap_hit = (drm_i915_vbl_swap_t *)__mptr___1;
  drw = drm_get_drawable_info(dev, swap_hit->drw_id);
  if ((unsigned long )drw == (unsigned long )((struct drm_drawable_info *)0)) {
    goto ldv_22710;
  } else {

  }
  rect = drw->rects;
  pipe = (int )swap_hit->pipe;
  top = (unsigned short )upper[pipe];
  bottom = (unsigned short )lower[pipe];
  num_rects = (int )drw->num_rects;
  goto ldv_22721;
  ldv_22720: 
  _max1___1 = rect->y1;
  _max2___1 = top;
  y1 = (int )_max1___1 > (int )_max2___1 ? (int )_max1___1 : (int )_max2___1;
  _min1 = rect->y2;
  _min2 = bottom;
  y2 = (int )_min1 < (int )_min2 ? (int )_min1 : (int )_min2;
  if (y1 >= y2) {
    goto ldv_22719;
  } else {

  }
  if (dev_priv->ring.space <= 31) {
    i915_wait_ring(dev, 32, "i915_vblank_tasklet");
  } else {

  }
  outcount = 0U;
  outring = (unsigned int )dev_priv->ring.tail;
  ringmask = (unsigned int )dev_priv->ring.tail_mask;
  virt = (char volatile   *)dev_priv->ring.virtual_start;
  *((unsigned int volatile   *)virt + (unsigned long )outring) = cmd;
  outcount = outcount + 1U;
  outring = outring + 4U;
  outring = outring & ringmask;
  *((unsigned int volatile   *)virt + (unsigned long )outring) = ropcpp | dst_pitch;
  outcount = outcount + 1U;
  outring = outring + 4U;
  outring = outring & ringmask;
  *((unsigned int volatile   *)virt + (unsigned long )outring) = (unsigned int volatile   )((y1 << 16) | (int )rect->x1);
  outcount = outcount + 1U;
  outring = outring + 4U;
  outring = outring & ringmask;
  *((unsigned int volatile   *)virt + (unsigned long )outring) = (unsigned int volatile   )((y2 << 16) | (int )rect->x2);
  outcount = outcount + 1U;
  outring = outring + 4U;
  outring = outring & ringmask;
  *((unsigned int volatile   *)virt + (unsigned long )outring) = (unsigned int volatile   )sarea_priv->front_offset;
  outcount = outcount + 1U;
  outring = outring + 4U;
  outring = outring & ringmask;
  *((unsigned int volatile   *)virt + (unsigned long )outring) = (unsigned int volatile   )((y1 << 16) | (int )rect->x1);
  outcount = outcount + 1U;
  outring = outring + 4U;
  outring = outring & ringmask;
  *((unsigned int volatile   *)virt + (unsigned long )outring) = src_pitch;
  outcount = outcount + 1U;
  outring = outring + 4U;
  outring = outring & ringmask;
  *((unsigned int volatile   *)virt + (unsigned long )outring) = (unsigned int volatile   )sarea_priv->back_offset;
  outcount = outcount + 1U;
  outring = outring + 4U;
  outring = outring & ringmask;
  dev_priv->ring.tail = (int )outring;
  dev_priv->ring.space = (int )((unsigned int )dev_priv->ring.space - outcount * 4U);
  writel(outring, (void volatile   *)(dev_priv->mmio_map)->handle + 8240U);
  ldv_22719: 
  rect = rect + 1;
  ldv_22721: 
  tmp___1 = num_rects;
  num_rects = num_rects - 1;
  if (tmp___1 != 0) {
    goto ldv_22720;
  } else {

  }

  ldv_22710: 
  hit = hit->next;
  ldv_22724: 
  __builtin_prefetch((void const   *)hit->next);
  if ((unsigned long )(& hits) != (unsigned long )hit) {
    goto ldv_22723;
  } else {

  }
  upper[0] = lower[0];
  lower[0] = lower[0] + slice[0];
  upper[1] = lower[1];
  lower[1] = lower[1] + slice[1];
  ldv_22727: 
  tmp___2 = i;
  i = i + 1;
  if (tmp___2 < nhits) {
    goto ldv_22726;
  } else {

  }
  _spin_unlock_irqrestore(& dev->drw_lock, irqflags);
  hit = hits.next;
  tmp = hit->next;
  goto ldv_22736;
  ldv_22735: 
  __mptr___2 = (struct list_head  const  *)hit;
  swap_hit___0 = (drm_i915_vbl_swap_t *)__mptr___2;
  list_del(hit);
  drm_free((void *)swap_hit___0, 32UL, 2);
  hit = tmp;
  tmp = hit->next;
  ldv_22736: ;
  if ((unsigned long )(& hits) != (unsigned long )hit) {
    goto ldv_22735;
  } else {

  }

  return;
}
}
irqreturn_t i915_driver_irq_handler(int irq , void *arg ) 
{ 
  struct drm_device *dev ;
  drm_i915_private_t *dev_priv ;
  u16 temp ;
  u32 pipea_stats ;
  u32 pipeb_stats ;
  int vblank_pipe ;

  {
  dev = (struct drm_device *)arg;
  dev_priv = (drm_i915_private_t *)dev->dev_private;
  pipea_stats = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 458788U);
  pipeb_stats = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 462884U);
  temp = readw((void const volatile   *)(dev_priv->mmio_map)->handle + 8356U);
  temp = (unsigned int )temp & 162U;
  if (drm_debug != 0U) {
    printk("<7>[drm:%s] %s flag=%08x\n", "i915_driver_irq_handler", "i915_driver_irq_handler",
           (int )temp);
  } else {

  }
  if ((unsigned int )temp == 0U) {
    return (0);
  } else {

  }
  writew((int )temp, (void volatile   *)(dev_priv->mmio_map)->handle + 8356U);
  readw((void const volatile   *)(dev_priv->mmio_map)->handle + 8356U);
  __asm__  volatile   ("lfence": : : "memory");
  (dev_priv->sarea_priv)->last_dispatch = (int )*((u32 volatile   *)dev_priv->hw_status_page + 5UL);
  if (((int )temp & 2) != 0) {
    __wake_up(& dev_priv->irq_queue, 1U, 1, 0);
  } else {

  }
  if (((int )temp & 160) != 0) {
    vblank_pipe = dev_priv->vblank_pipe;
    if ((vblank_pipe & 3) == 3) {
      if (((int )temp & 128) != 0) {
        atomic_inc(& dev->vbl_received);
      } else {

      }
      if (((int )temp & 32) != 0) {
        atomic_inc(& dev->vbl_received2);
      } else {

      }
    } else
    if ((((int )temp & 128) != 0 && vblank_pipe & 1) || (((int )temp & 32) != 0 && (vblank_pipe & 2) != 0)) {
      atomic_inc(& dev->vbl_received);
    } else {

    }
    __wake_up(& dev->vbl_queue, 1U, 1, 0);
    drm_vbl_send_signals(dev);
    if (dev_priv->swaps_pending != 0U) {
      drm_locked_tasklet(dev, & i915_vblank_tasklet);
    } else {

    }
    writel(pipea_stats | 131074U, (void volatile   *)(dev_priv->mmio_map)->handle + 458788U);
    writel(pipeb_stats | 131074U, (void volatile   *)(dev_priv->mmio_map)->handle + 462884U);
  } else {

  }
  return (1);
}
}
static int i915_emit_irq(struct drm_device *dev ) 
{ 
  drm_i915_private_t *dev_priv ;
  unsigned int outring ;
  unsigned int ringmask ;
  unsigned int outcount ;
  char volatile   *virt ;

  {
  dev_priv = (drm_i915_private_t *)dev->dev_private;
  i915_kernel_lost_context(dev);
  if (drm_debug != 0U) {
    printk("<7>[drm:%s] \n", "i915_emit_irq");
  } else {

  }
  dev_priv->counter = dev_priv->counter + 1UL;
  (dev_priv->sarea_priv)->last_enqueue = (int )dev_priv->counter;
  if (dev_priv->counter > 2147483647UL) {
    dev_priv->counter = 1UL;
    (dev_priv->sarea_priv)->last_enqueue = 1;
  } else {

  }
  if (dev_priv->ring.space <= 23) {
    i915_wait_ring(dev, 24, "i915_emit_irq");
  } else {

  }
  outcount = 0U;
  outring = (unsigned int )dev_priv->ring.tail;
  ringmask = (unsigned int )dev_priv->ring.tail_mask;
  virt = (char volatile   *)dev_priv->ring.virtual_start;
  *((unsigned int volatile   *)virt + (unsigned long )outring) = 276824065U;
  outcount = outcount + 1U;
  outring = outring + 4U;
  outring = outring & ringmask;
  *((unsigned int volatile   *)virt + (unsigned long )outring) = 20U;
  outcount = outcount + 1U;
  outring = outring + 4U;
  outring = outring & ringmask;
  *((unsigned int volatile   *)virt + (unsigned long )outring) = (unsigned int volatile   )dev_priv->counter;
  outcount = outcount + 1U;
  outring = outring + 4U;
  outring = outring & ringmask;
  *((unsigned int volatile   *)virt + (unsigned long )outring) = 0U;
  outcount = outcount + 1U;
  outring = outring + 4U;
  outring = outring & ringmask;
  *((unsigned int volatile   *)virt + (unsigned long )outring) = 0U;
  outcount = outcount + 1U;
  outring = outring + 4U;
  outring = outring & ringmask;
  *((unsigned int volatile   *)virt + (unsigned long )outring) = 16777216U;
  outcount = outcount + 1U;
  outring = outring + 4U;
  outring = outring & ringmask;
  dev_priv->ring.tail = (int )outring;
  dev_priv->ring.space = (int )((unsigned int )dev_priv->ring.space - outcount * 4U);
  writel(outring, (void volatile   *)(dev_priv->mmio_map)->handle + 8240U);
  return ((int )dev_priv->counter);
}
}
static int i915_wait_irq(struct drm_device *dev , int irq_nr ) 
{ 
  drm_i915_private_t *dev_priv ;
  int ret ;
  wait_queue_t entry ;
  struct task_struct *tmp ;
  unsigned long end ;
  struct task_struct *tmp___0 ;
  struct task_struct *tmp___1 ;
  int tmp___2 ;
  struct task_struct *tmp___3 ;

  {
  dev_priv = (drm_i915_private_t *)dev->dev_private;
  ret = 0;
  if (drm_debug != 0U) {
    printk("<7>[drm:%s] irq_nr=%d breadcrumb=%d\n", "i915_wait_irq", irq_nr, *((u32 volatile   *)dev_priv->hw_status_page + 5UL));
  } else {

  }
  if ((unsigned int )*((u32 volatile   *)dev_priv->hw_status_page + 5UL) >= (unsigned int )irq_nr) {
    return (0);
  } else {

  }
  (dev_priv->sarea_priv)->perf_boxes = (dev_priv->sarea_priv)->perf_boxes | 4;
  tmp = get_current();
  entry.flags = 0U;
  entry.private = (void *)tmp;
  entry.func = & default_wake_function;
  entry.task_list.next = 0;
  entry.task_list.prev = 0;
  end = (unsigned long )jiffies + 750UL;
  add_wait_queue(& dev_priv->irq_queue, & entry);
  ldv_22774: 
  tmp___0 = get_current();
  tmp___0->state = 1L;
  if ((unsigned int )*((u32 volatile   *)dev_priv->hw_status_page + 5UL) >= (unsigned int )irq_nr) {
    goto ldv_22767;
  } else {

  }
  if ((1 != 0 && 1 != 0) && (long )jiffies - (long )end >= 0L) {
    ret = -16;
    goto ldv_22767;
  } else {

  }
  schedule_timeout(2L);
  tmp___1 = get_current();
  tmp___2 = signal_pending(tmp___1);
  if (tmp___2 != 0) {
    ret = -4;
    goto ldv_22767;
  } else {

  }
  goto ldv_22774;
  ldv_22767: 
  tmp___3 = get_current();
  tmp___3->state = 0L;
  remove_wait_queue(& dev_priv->irq_queue, & entry);
  if (ret == -16) {
    printk("<3>[drm:%s] *ERROR* EBUSY -- rec: %d emitted: %d\n", "i915_wait_irq",
           *((u32 volatile   *)dev_priv->hw_status_page + 5UL), (int )dev_priv->counter);
  } else {

  }
  (dev_priv->sarea_priv)->last_dispatch = (int )*((u32 volatile   *)dev_priv->hw_status_page + 5UL);
  return (ret);
}
}
static int i915_driver_vblank_do_wait(struct drm_device *dev , unsigned int *sequence ,
                                      atomic_t *counter ) 
{ 
  drm_i915_private_t *dev_priv ;
  unsigned int cur_vblank ;
  int ret ;
  wait_queue_t entry ;
  struct task_struct *tmp ;
  unsigned long end ;
  struct task_struct *tmp___0 ;
  struct task_struct *tmp___1 ;
  int tmp___2 ;
  struct task_struct *tmp___3 ;

  {
  dev_priv = (drm_i915_private_t *)dev->dev_private;
  ret = 0;
  if ((unsigned long )dev_priv == (unsigned long )((drm_i915_private_t *)0)) {
    printk("<3>[drm:%s] *ERROR* called with no initialization\n", "i915_driver_vblank_do_wait");
    return (-22);
  } else {

  }
  tmp = get_current();
  entry.flags = 0U;
  entry.private = (void *)tmp;
  entry.func = & default_wake_function;
  entry.task_list.next = 0;
  entry.task_list.prev = 0;
  end = (unsigned long )jiffies + 750UL;
  add_wait_queue(& dev->vbl_queue, & entry);
  ldv_22793: 
  tmp___0 = get_current();
  tmp___0->state = 1L;
  cur_vblank = (unsigned int )counter->counter;
  if (cur_vblank - *sequence <= 8388608U) {
    goto ldv_22786;
  } else {

  }
  if ((1 != 0 && 1 != 0) && (long )jiffies - (long )end >= 0L) {
    ret = -16;
    goto ldv_22786;
  } else {

  }
  schedule_timeout(2L);
  tmp___1 = get_current();
  tmp___2 = signal_pending(tmp___1);
  if (tmp___2 != 0) {
    ret = -4;
    goto ldv_22786;
  } else {

  }
  goto ldv_22793;
  ldv_22786: 
  tmp___3 = get_current();
  tmp___3->state = 0L;
  remove_wait_queue(& dev->vbl_queue, & entry);
  *sequence = cur_vblank;
  return (ret);
}
}
int i915_driver_vblank_wait(struct drm_device *dev , unsigned int *sequence ) 
{ 
  int tmp ;

  {
  tmp = i915_driver_vblank_do_wait(dev, sequence, & dev->vbl_received);
  return (tmp);
}
}
int i915_driver_vblank_wait2(struct drm_device *dev , unsigned int *sequence ) 
{ 
  int tmp ;

  {
  tmp = i915_driver_vblank_do_wait(dev, sequence, & dev->vbl_received2);
  return (tmp);
}
}
int i915_irq_emit(struct drm_device *dev , void *data , struct drm_file *file_priv ) 
{ 
  drm_i915_private_t *dev_priv ;
  drm_i915_irq_emit_t *emit ;
  int result ;
  unsigned long tmp ;

  {
  dev_priv = (drm_i915_private_t *)dev->dev_private;
  emit = (drm_i915_irq_emit_t *)data;
  if ((int )(dev->lock.hw_lock)->lock >= 0 || (unsigned long )dev->lock.file_priv != (unsigned long )file_priv) {
    printk("<3>[drm:%s] *ERROR* %s called without lock held, held  %d owner %p %p\n",
           "i915_irq_emit", "i915_irq_emit", (unsigned int )(dev->lock.hw_lock)->lock & 2147483648U,
           dev->lock.file_priv, file_priv);
    return (-22);
  } else {

  }
  if ((unsigned long )dev_priv == (unsigned long )((drm_i915_private_t *)0)) {
    printk("<3>[drm:%s] *ERROR* called with no initialization\n", "i915_irq_emit");
    return (-22);
  } else {

  }
  result = i915_emit_irq(dev);
  tmp = copy_to_user((void *)emit->irq_seq, (void const   *)(& result), 4U);
  if (tmp != 0UL) {
    printk("<3>[drm:%s] *ERROR* copy_to_user\n", "i915_irq_emit");
    return (-14);
  } else {

  }
  return (0);
}
}
int i915_irq_wait(struct drm_device *dev , void *data , struct drm_file *file_priv ) 
{ 
  drm_i915_private_t *dev_priv ;
  drm_i915_irq_wait_t *irqwait ;
  int tmp ;

  {
  dev_priv = (drm_i915_private_t *)dev->dev_private;
  irqwait = (drm_i915_irq_wait_t *)data;
  if ((unsigned long )dev_priv == (unsigned long )((drm_i915_private_t *)0)) {
    printk("<3>[drm:%s] *ERROR* called with no initialization\n", "i915_irq_wait");
    return (-22);
  } else {

  }
  tmp = i915_wait_irq(dev, irqwait->irq_seq);
  return (tmp);
}
}
static void i915_enable_interrupt(struct drm_device *dev ) 
{ 
  drm_i915_private_t *dev_priv ;
  u16 flag ;

  {
  dev_priv = (drm_i915_private_t *)dev->dev_private;
  flag = 0U;
  if (dev_priv->vblank_pipe & 1) {
    flag = (u16 )((unsigned int )flag | 128U);
  } else {

  }
  if ((dev_priv->vblank_pipe & 2) != 0) {
    flag = (u16 )((unsigned int )flag | 32U);
  } else {

  }
  writew((int )((unsigned int )flag | 2U), (void volatile   *)(dev_priv->mmio_map)->handle + 8352U);
  return;
}
}
int i915_vblank_pipe_set(struct drm_device *dev , void *data , struct drm_file *file_priv ) 
{ 
  drm_i915_private_t *dev_priv ;
  drm_i915_vblank_pipe_t *pipe ;

  {
  dev_priv = (drm_i915_private_t *)dev->dev_private;
  pipe = (drm_i915_vblank_pipe_t *)data;
  if ((unsigned long )dev_priv == (unsigned long )((drm_i915_private_t *)0)) {
    printk("<3>[drm:%s] *ERROR* called with no initialization\n", "i915_vblank_pipe_set");
    return (-22);
  } else {

  }
  if ((pipe->pipe & -4) != 0) {
    printk("<3>[drm:%s] *ERROR* called with invalid pipe 0x%x\n", "i915_vblank_pipe_set",
           pipe->pipe);
    return (-22);
  } else {

  }
  dev_priv->vblank_pipe = pipe->pipe;
  i915_enable_interrupt(dev);
  return (0);
}
}
int i915_vblank_pipe_get(struct drm_device *dev , void *data , struct drm_file *file_priv ) 
{ 
  drm_i915_private_t *dev_priv ;
  drm_i915_vblank_pipe_t *pipe ;
  u16 flag ;
  unsigned int tmp ;

  {
  dev_priv = (drm_i915_private_t *)dev->dev_private;
  pipe = (drm_i915_vblank_pipe_t *)data;
  if ((unsigned long )dev_priv == (unsigned long )((drm_i915_private_t *)0)) {
    printk("<3>[drm:%s] *ERROR* called with no initialization\n", "i915_vblank_pipe_get");
    return (-22);
  } else {

  }
  tmp = readl((void const volatile   *)(dev_priv->mmio_map)->handle + 8352U);
  flag = (u16 )tmp;
  pipe->pipe = 0;
  if (((int )flag & 128) != 0) {
    pipe->pipe = pipe->pipe | 1;
  } else {

  }
  if (((int )flag & 32) != 0) {
    pipe->pipe = pipe->pipe | 2;
  } else {

  }
  return (0);
}
}
int i915_vblank_swap(struct drm_device *dev , void *data , struct drm_file *file_priv ) 
{ 
  drm_i915_private_t *dev_priv ;
  drm_i915_vblank_swap_t *swap ;
  drm_i915_vbl_swap_t *vbl_swap ;
  unsigned int pipe ;
  unsigned int seqtype ;
  unsigned int curseq ;
  unsigned long irqflags ;
  struct list_head *list ;
  struct drm_drawable_info *tmp ;
  struct list_head  const  *__mptr ;
  void *tmp___0 ;

  {
  dev_priv = (drm_i915_private_t *)dev->dev_private;
  swap = (drm_i915_vblank_swap_t *)data;
  if ((unsigned long )dev_priv == (unsigned long )((drm_i915_private_t *)0)) {
    printk("<3>[drm:%s] *ERROR* %s called with no initialization\n", "i915_vblank_swap",
           "i915_vblank_swap");
    return (-22);
  } else {

  }
  if ((dev_priv->sarea_priv)->rotation != 0) {
    if (drm_debug != 0U) {
      printk("<7>[drm:%s] Rotation not supported\n", "i915_vblank_swap");
    } else {

    }
    return (-22);
  } else {

  }
  if (((unsigned int )swap->seqtype & 3489660926U) != 0U) {
    printk("<3>[drm:%s] *ERROR* Invalid sequence type 0x%x\n", "i915_vblank_swap",
           (unsigned int )swap->seqtype);
    return (-22);
  } else {

  }
  pipe = ((unsigned int )swap->seqtype & 536870912U) != 0U;
  seqtype = (unsigned int )swap->seqtype & 1U;
  if (((dev_priv->vblank_pipe >> (int )pipe) & 1) == 0) {
    printk("<3>[drm:%s] *ERROR* Invalid pipe %d\n", "i915_vblank_swap", pipe);
    return (-22);
  } else {

  }
  irqflags = _spin_lock_irqsave(& dev->drw_lock);
  tmp = drm_get_drawable_info(dev, swap->drawable);
  if ((unsigned long )tmp == (unsigned long )((struct drm_drawable_info *)0)) {
    _spin_unlock_irqrestore(& dev->drw_lock, irqflags);
    if (drm_debug != 0U) {
      printk("<7>[drm:%s] Invalid drawable ID %d\n", "i915_vblank_swap", swap->drawable);
    } else {

    }
    return (-22);
  } else {

  }
  _spin_unlock_irqrestore(& dev->drw_lock, irqflags);
  curseq = (unsigned int )(pipe != 0U ? & dev->vbl_received2 : & dev->vbl_received)->counter;
  if (seqtype == 1U) {
    swap->sequence = swap->sequence + curseq;
  } else {

  }
  if (curseq - swap->sequence <= 8388608U) {
    if (((unsigned int )swap->seqtype & 268435456U) != 0U) {
      swap->sequence = curseq + 1U;
    } else {
      if (drm_debug != 0U) {
        printk("<7>[drm:%s] Missed target sequence\n", "i915_vblank_swap");
      } else {

      }
      return (-22);
    }
  } else {

  }
  irqflags = _spin_lock_irqsave(& dev_priv->swaps_lock);
  list = dev_priv->vbl_swaps.head.next;
  goto ldv_22873;
  ldv_22872: 
  __mptr = (struct list_head  const  *)list;
  vbl_swap = (drm_i915_vbl_swap_t *)__mptr;
  if ((vbl_swap->drw_id == swap->drawable && vbl_swap->pipe == pipe) && vbl_swap->sequence == swap->sequence) {
    _spin_unlock_irqrestore(& dev_priv->swaps_lock, irqflags);
    if (drm_debug != 0U) {
      printk("<7>[drm:%s] Already scheduled\n", "i915_vblank_swap");
    } else {

    }
    return (0);
  } else {

  }
  list = list->next;
  ldv_22873: 
  __builtin_prefetch((void const   *)list->next);
  if ((unsigned long )(& dev_priv->vbl_swaps.head) != (unsigned long )list) {
    goto ldv_22872;
  } else {

  }
  _spin_unlock_irqrestore(& dev_priv->swaps_lock, irqflags);
  if (dev_priv->swaps_pending > 99U) {
    if (drm_debug != 0U) {
      printk("<7>[drm:%s] Too many swaps queued\n", "i915_vblank_swap");
    } else {

    }
    return (-16);
  } else {

  }
  tmp___0 = drm_calloc(1UL, 32UL, 2);
  vbl_swap = (drm_i915_vbl_swap_t *)tmp___0;
  if ((unsigned long )vbl_swap == (unsigned long )((drm_i915_vbl_swap_t *)0)) {
    printk("<3>[drm:%s] *ERROR* Failed to allocate memory to queue swap\n", "i915_vblank_swap");
    return (-12);
  } else {

  }
  if (drm_debug != 0U) {
    printk("<7>[drm:%s] \n", "i915_vblank_swap");
  } else {

  }
  vbl_swap->drw_id = swap->drawable;
  vbl_swap->pipe = pipe;
  vbl_swap->sequence = swap->sequence;
  irqflags = _spin_lock_irqsave(& dev_priv->swaps_lock);
  list_add_tail(& vbl_swap->head, & dev_priv->vbl_swaps.head);
  dev_priv->swaps_pending = dev_priv->swaps_pending + 1U;
  _spin_unlock_irqrestore(& dev_priv->swaps_lock, irqflags);
  return (0);
}
}
void i915_driver_irq_preinstall(struct drm_device *dev ) 
{ 
  drm_i915_private_t *dev_priv ;

  {
  dev_priv = (drm_i915_private_t *)dev->dev_private;
  writew(65534, (void volatile   *)(dev_priv->mmio_map)->handle + 8344U);
  writew(0, (void volatile   *)(dev_priv->mmio_map)->handle + 8360U);
  writew(0, (void volatile   *)(dev_priv->mmio_map)->handle + 8352U);
  return;
}
}
void i915_driver_irq_postinstall(struct drm_device *dev ) 
{ 
  drm_i915_private_t *dev_priv ;
  struct lock_class_key __key ;

  {
  dev_priv = (drm_i915_private_t *)dev->dev_private;
  __spin_lock_init(& dev_priv->swaps_lock, "&dev_priv->swaps_lock", & __key);
  INIT_LIST_HEAD(& dev_priv->vbl_swaps.head);
  dev_priv->swaps_pending = 0U;
  if (dev_priv->vblank_pipe == 0) {
    dev_priv->vblank_pipe = 1;
  } else {

  }
  i915_enable_interrupt(dev);
  init_waitqueue_head(& dev_priv->irq_queue);
  return;
}
}
void i915_driver_irq_uninstall(struct drm_device *dev ) 
{ 
  drm_i915_private_t *dev_priv ;
  u16 temp ;

  {
  dev_priv = (drm_i915_private_t *)dev->dev_private;
  if ((unsigned long )dev_priv == (unsigned long )((drm_i915_private_t *)0)) {
    return;
  } else {

  }
  writew(65535, (void volatile   *)(dev_priv->mmio_map)->handle + 8344U);
  writew(65535, (void volatile   *)(dev_priv->mmio_map)->handle + 8360U);
  writew(0, (void volatile   *)(dev_priv->mmio_map)->handle + 8352U);
  temp = readw((void const volatile   *)(dev_priv->mmio_map)->handle + 8356U);
  writew((int )temp, (void volatile   *)(dev_priv->mmio_map)->handle + 8356U);
  return;
}
}
static void mark_block(struct drm_device *dev , struct mem_block *p , int in_use ) 
{ 
  drm_i915_private_t *dev_priv ;
  drm_i915_sarea_t *sarea_priv ;
  struct drm_tex_region *list ;
  unsigned int shift ;
  unsigned int nr ;
  unsigned int start ;
  unsigned int end ;
  unsigned int i ;
  int age ;

  {
  dev_priv = (drm_i915_private_t *)dev->dev_private;
  sarea_priv = dev_priv->sarea_priv;
  shift = (unsigned int )dev_priv->tex_lru_log_granularity;
  nr = 255U;
  start = (unsigned int )(p->start >> (int )shift);
  end = (unsigned int )(((p->start + p->size) + -1) >> (int )shift);
  sarea_priv->texAge = sarea_priv->texAge + 1;
  age = sarea_priv->texAge;
  list = (struct drm_tex_region *)(& sarea_priv->texList);
  i = start;
  goto ldv_22663;
  ldv_22662: 
  (list + (unsigned long )i)->in_use = (unsigned char )in_use;
  (list + (unsigned long )i)->age = (unsigned int )age;
  (list + (unsigned long )(list + (unsigned long )i)->next)->prev = (list + (unsigned long )i)->prev;
  (list + (unsigned long )(list + (unsigned long )i)->prev)->next = (list + (unsigned long )i)->next;
  (list + (unsigned long )i)->prev = (unsigned char )nr;
  (list + (unsigned long )i)->next = (list + (unsigned long )nr)->next;
  (list + (unsigned long )(list + (unsigned long )nr)->next)->prev = (unsigned char )i;
  (list + (unsigned long )nr)->next = (unsigned char )i;
  i = i + 1U;
  ldv_22663: ;
  if (i <= end) {
    goto ldv_22662;
  } else {

  }

  return;
}
}
static struct mem_block *split_block(struct mem_block *p , int start , int size ,
                                     struct drm_file *file_priv ) 
{ 
  struct mem_block *newblock ;
  void *tmp ;
  struct mem_block *newblock___0 ;
  void *tmp___0 ;

  {
  if (p->start < start) {
    tmp = drm_alloc(32UL, 14);
    newblock = (struct mem_block *)tmp;
    if ((unsigned long )newblock == (unsigned long )((struct mem_block *)0)) {
      goto out;
    } else {

    }
    newblock->start = start;
    newblock->size = p->size + (p->start - start);
    newblock->file_priv = 0;
    newblock->next = p->next;
    newblock->prev = p;
    (p->next)->prev = newblock;
    p->next = newblock;
    p->size = p->size - newblock->size;
    p = newblock;
  } else {

  }
  if (p->size > size) {
    tmp___0 = drm_alloc(32UL, 14);
    newblock___0 = (struct mem_block *)tmp___0;
    if ((unsigned long )newblock___0 == (unsigned long )((struct mem_block *)0)) {
      goto out;
    } else {

    }
    newblock___0->start = start + size;
    newblock___0->size = p->size - size;
    newblock___0->file_priv = 0;
    newblock___0->next = p->next;
    newblock___0->prev = p;
    (p->next)->prev = newblock___0;
    p->next = newblock___0;
    p->size = size;
  } else {

  }
  out: 
  p->file_priv = file_priv;
  return (p);
}
}
static struct mem_block *alloc_block(struct mem_block *heap , int size , int align2 ,
                                     struct drm_file *file_priv ) 
{ 
  struct mem_block *p ;
  int mask ;
  int start ;
  struct mem_block *tmp ;

  {
  mask = (1 << align2) + -1;
  p = heap->next;
  goto ldv_22684;
  ldv_22683: 
  start = (p->start + mask) & ~ mask;
  if ((unsigned long )p->file_priv == (unsigned long )((struct drm_file *)0) && start + size <= p->start + p->size) {
    tmp = split_block(p, start, size, file_priv);
    return (tmp);
  } else {

  }
  p = p->next;
  ldv_22684: ;
  if ((unsigned long )p != (unsigned long )heap) {
    goto ldv_22683;
  } else {

  }

  return (0);
}
}
static struct mem_block *find_block(struct mem_block *heap , int start ) 
{ 
  struct mem_block *p ;

  {
  p = heap->next;
  goto ldv_22692;
  ldv_22691: ;
  if (p->start == start) {
    return (p);
  } else {

  }
  p = p->next;
  ldv_22692: ;
  if ((unsigned long )p != (unsigned long )heap) {
    goto ldv_22691;
  } else {

  }

  return (0);
}
}
static void free_block(struct mem_block *p ) 
{ 
  struct mem_block *q ;
  struct mem_block *q___0 ;

  {
  p->file_priv = 0;
  if ((unsigned long )(p->next)->file_priv == (unsigned long )((struct drm_file *)0)) {
    q = p->next;
    p->size = p->size + q->size;
    p->next = q->next;
    (p->next)->prev = p;
    drm_free((void *)q, 32UL, 14);
  } else {

  }
  if ((unsigned long )(p->prev)->file_priv == (unsigned long )((struct drm_file *)0)) {
    q___0 = p->prev;
    q___0->size = q___0->size + p->size;
    q___0->next = p->next;
    (q___0->next)->prev = q___0;
    drm_free((void *)p, 32UL, 14);
  } else {

  }
  return;
}
}
static int init_heap(struct mem_block **heap , int start , int size ) 
{ 
  struct mem_block *blocks ;
  void *tmp ;
  void *tmp___0 ;
  struct mem_block *tmp___1 ;
  struct mem_block *tmp___2 ;

  {
  tmp = drm_alloc(32UL, 14);
  blocks = (struct mem_block *)tmp;
  if ((unsigned long )blocks == (unsigned long )((struct mem_block *)0)) {
    return (-12);
  } else {

  }
  tmp___0 = drm_alloc(32UL, 14);
  *heap = (struct mem_block *)tmp___0;
  if ((unsigned long )*heap == (unsigned long )((struct mem_block *)0)) {
    drm_free((void *)blocks, 32UL, 14);
    return (-12);
  } else {

  }
  blocks->start = start;
  blocks->size = size;
  blocks->file_priv = 0;
  tmp___1 = *heap;
  blocks->prev = tmp___1;
  blocks->next = tmp___1;
  memset((void *)*heap, 0, 32UL);
  (*heap)->file_priv = 0xffffffffffffffffUL;
  tmp___2 = blocks;
  (*heap)->prev = tmp___2;
  (*heap)->next = tmp___2;
  return (0);
}
}
void i915_mem_release(struct drm_device *dev , struct drm_file *file_priv , struct mem_block *heap ) 
{ 
  struct mem_block *p ;
  struct mem_block *q ;

  {
  if ((unsigned long )heap == (unsigned long )((struct mem_block *)0) || (unsigned long )heap->next == (unsigned long )((struct mem_block *)0)) {
    return;
  } else {

  }
  p = heap->next;
  goto ldv_22712;
  ldv_22711: ;
  if ((unsigned long )p->file_priv == (unsigned long )file_priv) {
    p->file_priv = 0;
    mark_block(dev, p, 0);
  } else {

  }
  p = p->next;
  ldv_22712: ;
  if ((unsigned long )p != (unsigned long )heap) {
    goto ldv_22711;
  } else {

  }
  p = heap->next;
  goto ldv_22719;
  ldv_22718: ;
  goto ldv_22716;
  ldv_22715: 
  q = p->next;
  p->size = p->size + q->size;
  p->next = q->next;
  (p->next)->prev = p;
  drm_free((void *)q, 32UL, 14);
  ldv_22716: ;
  if ((unsigned long )p->file_priv == (unsigned long )((struct drm_file *)0) && (unsigned long )(p->next)->file_priv == (unsigned long )((struct drm_file *)0)) {
    goto ldv_22715;
  } else {

  }
  p = p->next;
  ldv_22719: ;
  if ((unsigned long )p != (unsigned long )heap) {
    goto ldv_22718;
  } else {

  }

  return;
}
}
void i915_mem_takedown(struct mem_block **heap ) 
{ 
  struct mem_block *p ;
  struct mem_block *q ;

  {
  if ((unsigned long )*heap == (unsigned long )((struct mem_block *)0)) {
    return;
  } else {

  }
  p = (*heap)->next;
  goto ldv_22727;
  ldv_22726: 
  q = p;
  p = p->next;
  drm_free((void *)q, 32UL, 14);
  ldv_22727: ;
  if ((unsigned long )*heap != (unsigned long )p) {
    goto ldv_22726;
  } else {

  }
  drm_free((void *)*heap, 32UL, 14);
  *heap = 0;
  return;
}
}
static struct mem_block **get_heap(drm_i915_private_t *dev_priv , int region ) 
{ 


  {
  switch (region) {
  case 1: ;
  return (& dev_priv->agp_heap);
  default: ;
  return (0);
  }
}
}
int i915_mem_alloc(struct drm_device *dev , void *data , struct drm_file *file_priv ) 
{ 
  drm_i915_private_t *dev_priv ;
  drm_i915_mem_alloc_t *alloc ;
  struct mem_block *block ;
  struct mem_block **heap ;
  unsigned long tmp ;

  {
  dev_priv = (drm_i915_private_t *)dev->dev_private;
  alloc = (drm_i915_mem_alloc_t *)data;
  if ((unsigned long )dev_priv == (unsigned long )((drm_i915_private_t *)0)) {
    printk("<3>[drm:%s] *ERROR* called with no initialization\n", "i915_mem_alloc");
    return (-22);
  } else {

  }
  heap = get_heap(dev_priv, alloc->region);
  if ((unsigned long )heap == (unsigned long )((struct mem_block **)0) || (unsigned long )*heap == (unsigned long )((struct mem_block *)0)) {
    return (-14);
  } else {

  }
  if (alloc->alignment <= 11) {
    alloc->alignment = 12;
  } else {

  }
  block = alloc_block(*heap, alloc->size, alloc->alignment, file_priv);
  if ((unsigned long )block == (unsigned long )((struct mem_block *)0)) {
    return (-12);
  } else {

  }
  mark_block(dev, block, 1);
  tmp = copy_to_user((void *)alloc->region_offset, (void const   *)(& block->start),
                     4U);
  if (tmp != 0UL) {
    printk("<3>[drm:%s] *ERROR* copy_to_user\n", "i915_mem_alloc");
    return (-14);
  } else {

  }
  return (0);
}
}
int i915_mem_free(struct drm_device *dev , void *data , struct drm_file *file_priv ) 
{ 
  drm_i915_private_t *dev_priv ;
  drm_i915_mem_free_t *memfree ;
  struct mem_block *block ;
  struct mem_block **heap ;

  {
  dev_priv = (drm_i915_private_t *)dev->dev_private;
  memfree = (drm_i915_mem_free_t *)data;
  if ((unsigned long )dev_priv == (unsigned long )((drm_i915_private_t *)0)) {
    printk("<3>[drm:%s] *ERROR* called with no initialization\n", "i915_mem_free");
    return (-22);
  } else {

  }
  heap = get_heap(dev_priv, memfree->region);
  if ((unsigned long )heap == (unsigned long )((struct mem_block **)0) || (unsigned long )*heap == (unsigned long )((struct mem_block *)0)) {
    return (-14);
  } else {

  }
  block = find_block(*heap, memfree->region_offset);
  if ((unsigned long )block == (unsigned long )((struct mem_block *)0)) {
    return (-14);
  } else {

  }
  if ((unsigned long )block->file_priv != (unsigned long )file_priv) {
    return (-1);
  } else {

  }
  mark_block(dev, block, 0);
  free_block(block);
  return (0);
}
}
int i915_mem_init_heap(struct drm_device *dev , void *data , struct drm_file *file_priv ) 
{ 
  drm_i915_private_t *dev_priv ;
  drm_i915_mem_init_heap_t *initheap ;
  struct mem_block **heap ;
  int tmp ;

  {
  dev_priv = (drm_i915_private_t *)dev->dev_private;
  initheap = (drm_i915_mem_init_heap_t *)data;
  if ((unsigned long )dev_priv == (unsigned long )((drm_i915_private_t *)0)) {
    printk("<3>[drm:%s] *ERROR* called with no initialization\n", "i915_mem_init_heap");
    return (-22);
  } else {

  }
  heap = get_heap(dev_priv, initheap->region);
  if ((unsigned long )heap == (unsigned long )((struct mem_block **)0)) {
    return (-14);
  } else {

  }
  if ((unsigned long )*heap != (unsigned long )((struct mem_block *)0)) {
    printk("<3>[drm:%s] *ERROR* heap already initialized?", "i915_mem_init_heap");
    return (-14);
  } else {

  }
  tmp = init_heap(heap, initheap->start, initheap->size);
  return (tmp);
}
}
int i915_mem_destroy_heap(struct drm_device *dev , void *data , struct drm_file *file_priv ) 
{ 
  drm_i915_private_t *dev_priv ;
  drm_i915_mem_destroy_heap_t *destroyheap ;
  struct mem_block **heap ;

  {
  dev_priv = (drm_i915_private_t *)dev->dev_private;
  destroyheap = (drm_i915_mem_destroy_heap_t *)data;
  if ((unsigned long )dev_priv == (unsigned long )((drm_i915_private_t *)0)) {
    printk("<3>[drm:%s] *ERROR* called with no initialization\n", "i915_mem_destroy_heap");
    return (-22);
  } else {

  }
  heap = get_heap(dev_priv, destroyheap->region);
  if ((unsigned long )heap == (unsigned long )((struct mem_block **)0)) {
    printk("<3>[drm:%s] *ERROR* get_heap failed", "i915_mem_destroy_heap");
    return (-14);
  } else {

  }
  if ((unsigned long )*heap == (unsigned long )((struct mem_block *)0)) {
    printk("<3>[drm:%s] *ERROR* heap not initialized?", "i915_mem_destroy_heap");
    return (-14);
  } else {

  }
  i915_mem_takedown(heap);
  return (0);
}
}
__inline static void *compat_alloc_user_space(long len ) 
{ 
  struct pt_regs *regs ;
  struct task_struct *tmp ;

  {
  tmp = get_current();
  regs = (struct pt_regs *)(tmp->thread.sp0 + 0xffffffffffffffffUL);
  return ((void *)(regs->sp - (unsigned long )len));
}
}
extern void lock_kernel(void) ;
extern void unlock_kernel(void) ;
extern void __put_user_bad(void) ;
extern unsigned long copy_from_user(void * , void const   * , unsigned int  ) ;
extern long drm_compat_ioctl(struct file * , unsigned int  , unsigned long  ) ;
static int compat_i915_batchbuffer(struct file *file , unsigned int cmd , unsigned long arg ) 
{ 
  drm_i915_batchbuffer32_t batchbuffer32 ;
  drm_i915_batchbuffer_t *batchbuffer ;
  unsigned long tmp ;
  void *tmp___0 ;
  unsigned long flag ;
  unsigned long roksum ;
  struct thread_info *tmp___1 ;
  long tmp___2 ;
  long __pu_err ;
  long __pu_err___0 ;
  long __pu_err___1 ;
  long __pu_err___2 ;
  long __pu_err___3 ;
  long __pu_err___4 ;
  int tmp___3 ;

  {
  tmp = copy_from_user((void *)(& batchbuffer32), (void const   *)arg, 24U);
  if (tmp != 0UL) {
    return (-14);
  } else {

  }
  tmp___0 = compat_alloc_user_space(32L);
  batchbuffer = (drm_i915_batchbuffer_t *)tmp___0;
  tmp___1 = current_thread_info();
  __asm__  ("add %3,%1 ; sbb %0,%0 ; cmp %1,%4 ; sbb $0,%0": "=&r" (flag), "=r" (roksum): "1" (batchbuffer),
            "g" (32L), "rm" (tmp___1->addr_limit.seg));
  tmp___2 = ldv__builtin_expect(flag == 0UL, 1L);
  if (tmp___2 == 0L) {
    return (-14);
  } else {
    __pu_err = 0L;
    switch (4UL) {
    case 1UL: 
    __asm__  volatile   ("1:\tmovb %b1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err): "iq" (batchbuffer32.start),
                         "m" (*((struct __large_struct *)(& batchbuffer->start))),
                         "i" (-14), "0" (__pu_err));
    goto ldv_22443;
    case 2UL: 
    __asm__  volatile   ("1:\tmovw %w1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err): "ir" (batchbuffer32.start),
                         "m" (*((struct __large_struct *)(& batchbuffer->start))),
                         "i" (-14), "0" (__pu_err));
    goto ldv_22443;
    case 4UL: 
    __asm__  volatile   ("1:\tmovl %k1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err): "ir" (batchbuffer32.start),
                         "m" (*((struct __large_struct *)(& batchbuffer->start))),
                         "i" (-14), "0" (__pu_err));
    goto ldv_22443;
    case 8UL: 
    __asm__  volatile   ("1:\tmovq %1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err): "Zr" (batchbuffer32.start),
                         "m" (*((struct __large_struct *)(& batchbuffer->start))),
                         "i" (-14), "0" (__pu_err));
    goto ldv_22443;
    default: 
    __put_user_bad();
    }
    ldv_22443: ;
    if (__pu_err != 0L) {
      return (-14);
    } else {
      __pu_err___0 = 0L;
      switch (4UL) {
      case 1UL: 
      __asm__  volatile   ("1:\tmovb %b1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___0): "iq" (batchbuffer32.used),
                           "m" (*((struct __large_struct *)(& batchbuffer->used))),
                           "i" (-14), "0" (__pu_err___0));
      goto ldv_22451;
      case 2UL: 
      __asm__  volatile   ("1:\tmovw %w1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___0): "ir" (batchbuffer32.used),
                           "m" (*((struct __large_struct *)(& batchbuffer->used))),
                           "i" (-14), "0" (__pu_err___0));
      goto ldv_22451;
      case 4UL: 
      __asm__  volatile   ("1:\tmovl %k1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___0): "ir" (batchbuffer32.used),
                           "m" (*((struct __large_struct *)(& batchbuffer->used))),
                           "i" (-14), "0" (__pu_err___0));
      goto ldv_22451;
      case 8UL: 
      __asm__  volatile   ("1:\tmovq %1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___0): "Zr" (batchbuffer32.used),
                           "m" (*((struct __large_struct *)(& batchbuffer->used))),
                           "i" (-14), "0" (__pu_err___0));
      goto ldv_22451;
      default: 
      __put_user_bad();
      }
      ldv_22451: ;
      if (__pu_err___0 != 0L) {
        return (-14);
      } else {
        __pu_err___1 = 0L;
        switch (4UL) {
        case 1UL: 
        __asm__  volatile   ("1:\tmovb %b1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___1): "iq" (batchbuffer32.DR1),
                             "m" (*((struct __large_struct *)(& batchbuffer->DR1))),
                             "i" (-14), "0" (__pu_err___1));
        goto ldv_22459;
        case 2UL: 
        __asm__  volatile   ("1:\tmovw %w1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___1): "ir" (batchbuffer32.DR1),
                             "m" (*((struct __large_struct *)(& batchbuffer->DR1))),
                             "i" (-14), "0" (__pu_err___1));
        goto ldv_22459;
        case 4UL: 
        __asm__  volatile   ("1:\tmovl %k1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___1): "ir" (batchbuffer32.DR1),
                             "m" (*((struct __large_struct *)(& batchbuffer->DR1))),
                             "i" (-14), "0" (__pu_err___1));
        goto ldv_22459;
        case 8UL: 
        __asm__  volatile   ("1:\tmovq %1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___1): "Zr" (batchbuffer32.DR1),
                             "m" (*((struct __large_struct *)(& batchbuffer->DR1))),
                             "i" (-14), "0" (__pu_err___1));
        goto ldv_22459;
        default: 
        __put_user_bad();
        }
        ldv_22459: ;
        if (__pu_err___1 != 0L) {
          return (-14);
        } else {
          __pu_err___2 = 0L;
          switch (4UL) {
          case 1UL: 
          __asm__  volatile   ("1:\tmovb %b1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___2): "iq" (batchbuffer32.DR4),
                               "m" (*((struct __large_struct *)(& batchbuffer->DR4))),
                               "i" (-14), "0" (__pu_err___2));
          goto ldv_22467;
          case 2UL: 
          __asm__  volatile   ("1:\tmovw %w1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___2): "ir" (batchbuffer32.DR4),
                               "m" (*((struct __large_struct *)(& batchbuffer->DR4))),
                               "i" (-14), "0" (__pu_err___2));
          goto ldv_22467;
          case 4UL: 
          __asm__  volatile   ("1:\tmovl %k1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___2): "ir" (batchbuffer32.DR4),
                               "m" (*((struct __large_struct *)(& batchbuffer->DR4))),
                               "i" (-14), "0" (__pu_err___2));
          goto ldv_22467;
          case 8UL: 
          __asm__  volatile   ("1:\tmovq %1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___2): "Zr" (batchbuffer32.DR4),
                               "m" (*((struct __large_struct *)(& batchbuffer->DR4))),
                               "i" (-14), "0" (__pu_err___2));
          goto ldv_22467;
          default: 
          __put_user_bad();
          }
          ldv_22467: ;
          if (__pu_err___2 != 0L) {
            return (-14);
          } else {
            __pu_err___3 = 0L;
            switch (4UL) {
            case 1UL: 
            __asm__  volatile   ("1:\tmovb %b1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___3): "iq" (batchbuffer32.num_cliprects),
                                 "m" (*((struct __large_struct *)(& batchbuffer->num_cliprects))),
                                 "i" (-14), "0" (__pu_err___3));
            goto ldv_22475;
            case 2UL: 
            __asm__  volatile   ("1:\tmovw %w1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___3): "ir" (batchbuffer32.num_cliprects),
                                 "m" (*((struct __large_struct *)(& batchbuffer->num_cliprects))),
                                 "i" (-14), "0" (__pu_err___3));
            goto ldv_22475;
            case 4UL: 
            __asm__  volatile   ("1:\tmovl %k1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___3): "ir" (batchbuffer32.num_cliprects),
                                 "m" (*((struct __large_struct *)(& batchbuffer->num_cliprects))),
                                 "i" (-14), "0" (__pu_err___3));
            goto ldv_22475;
            case 8UL: 
            __asm__  volatile   ("1:\tmovq %1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___3): "Zr" (batchbuffer32.num_cliprects),
                                 "m" (*((struct __large_struct *)(& batchbuffer->num_cliprects))),
                                 "i" (-14), "0" (__pu_err___3));
            goto ldv_22475;
            default: 
            __put_user_bad();
            }
            ldv_22475: ;
            if (__pu_err___3 != 0L) {
              return (-14);
            } else {
              __pu_err___4 = 0L;
              switch (8UL) {
              case 1UL: 
              __asm__  volatile   ("1:\tmovb %b1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___4): "iq" ((struct drm_clip_rect *)((unsigned long )batchbuffer32.cliprects)),
                                   "m" (*((struct __large_struct *)(& batchbuffer->cliprects))),
                                   "i" (-14), "0" (__pu_err___4));
              goto ldv_22483;
              case 2UL: 
              __asm__  volatile   ("1:\tmovw %w1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___4): "ir" ((struct drm_clip_rect *)((unsigned long )batchbuffer32.cliprects)),
                                   "m" (*((struct __large_struct *)(& batchbuffer->cliprects))),
                                   "i" (-14), "0" (__pu_err___4));
              goto ldv_22483;
              case 4UL: 
              __asm__  volatile   ("1:\tmovl %k1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___4): "ir" ((struct drm_clip_rect *)((unsigned long )batchbuffer32.cliprects)),
                                   "m" (*((struct __large_struct *)(& batchbuffer->cliprects))),
                                   "i" (-14), "0" (__pu_err___4));
              goto ldv_22483;
              case 8UL: 
              __asm__  volatile   ("1:\tmovq %1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___4): "Zr" ((struct drm_clip_rect *)((unsigned long )batchbuffer32.cliprects)),
                                   "m" (*((struct __large_struct *)(& batchbuffer->cliprects))),
                                   "i" (-14), "0" (__pu_err___4));
              goto ldv_22483;
              default: 
              __put_user_bad();
              }
              ldv_22483: ;
              if (__pu_err___4 != 0L) {
                return (-14);
              } else {

              }
            }
          }
        }
      }
    }
  }
  tmp___3 = drm_ioctl((file->f_path.dentry)->d_inode, file, 1075864643U, (unsigned long )batchbuffer);
  return (tmp___3);
}
}
static int compat_i915_cmdbuffer(struct file *file , unsigned int cmd , unsigned long arg ) 
{ 
  drm_i915_cmdbuffer32_t cmdbuffer32 ;
  drm_i915_cmdbuffer_t *cmdbuffer ;
  unsigned long tmp ;
  void *tmp___0 ;
  unsigned long flag ;
  unsigned long roksum ;
  struct thread_info *tmp___1 ;
  long tmp___2 ;
  long __pu_err ;
  long __pu_err___0 ;
  long __pu_err___1 ;
  long __pu_err___2 ;
  long __pu_err___3 ;
  long __pu_err___4 ;
  int tmp___3 ;

  {
  tmp = copy_from_user((void *)(& cmdbuffer32), (void const   *)arg, 24U);
  if (tmp != 0UL) {
    return (-14);
  } else {

  }
  tmp___0 = compat_alloc_user_space(32L);
  cmdbuffer = (drm_i915_cmdbuffer_t *)tmp___0;
  tmp___1 = current_thread_info();
  __asm__  ("add %3,%1 ; sbb %0,%0 ; cmp %1,%4 ; sbb $0,%0": "=&r" (flag), "=r" (roksum): "1" (cmdbuffer),
            "g" (32L), "rm" (tmp___1->addr_limit.seg));
  tmp___2 = ldv__builtin_expect(flag == 0UL, 1L);
  if (tmp___2 == 0L) {
    return (-14);
  } else {
    __pu_err = 0L;
    switch (8UL) {
    case 1UL: 
    __asm__  volatile   ("1:\tmovb %b1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err): "iq" ((char *)((unsigned long )cmdbuffer32.buf)),
                         "m" (*((struct __large_struct *)(& cmdbuffer->buf))), "i" (-14),
                         "0" (__pu_err));
    goto ldv_22509;
    case 2UL: 
    __asm__  volatile   ("1:\tmovw %w1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err): "ir" ((char *)((unsigned long )cmdbuffer32.buf)),
                         "m" (*((struct __large_struct *)(& cmdbuffer->buf))), "i" (-14),
                         "0" (__pu_err));
    goto ldv_22509;
    case 4UL: 
    __asm__  volatile   ("1:\tmovl %k1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err): "ir" ((char *)((unsigned long )cmdbuffer32.buf)),
                         "m" (*((struct __large_struct *)(& cmdbuffer->buf))), "i" (-14),
                         "0" (__pu_err));
    goto ldv_22509;
    case 8UL: 
    __asm__  volatile   ("1:\tmovq %1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err): "Zr" ((char *)((unsigned long )cmdbuffer32.buf)),
                         "m" (*((struct __large_struct *)(& cmdbuffer->buf))), "i" (-14),
                         "0" (__pu_err));
    goto ldv_22509;
    default: 
    __put_user_bad();
    }
    ldv_22509: ;
    if (__pu_err != 0L) {
      return (-14);
    } else {
      __pu_err___0 = 0L;
      switch (4UL) {
      case 1UL: 
      __asm__  volatile   ("1:\tmovb %b1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___0): "iq" (cmdbuffer32.sz),
                           "m" (*((struct __large_struct *)(& cmdbuffer->sz))), "i" (-14),
                           "0" (__pu_err___0));
      goto ldv_22517;
      case 2UL: 
      __asm__  volatile   ("1:\tmovw %w1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___0): "ir" (cmdbuffer32.sz),
                           "m" (*((struct __large_struct *)(& cmdbuffer->sz))), "i" (-14),
                           "0" (__pu_err___0));
      goto ldv_22517;
      case 4UL: 
      __asm__  volatile   ("1:\tmovl %k1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___0): "ir" (cmdbuffer32.sz),
                           "m" (*((struct __large_struct *)(& cmdbuffer->sz))), "i" (-14),
                           "0" (__pu_err___0));
      goto ldv_22517;
      case 8UL: 
      __asm__  volatile   ("1:\tmovq %1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___0): "Zr" (cmdbuffer32.sz),
                           "m" (*((struct __large_struct *)(& cmdbuffer->sz))), "i" (-14),
                           "0" (__pu_err___0));
      goto ldv_22517;
      default: 
      __put_user_bad();
      }
      ldv_22517: ;
      if (__pu_err___0 != 0L) {
        return (-14);
      } else {
        __pu_err___1 = 0L;
        switch (4UL) {
        case 1UL: 
        __asm__  volatile   ("1:\tmovb %b1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___1): "iq" (cmdbuffer32.DR1),
                             "m" (*((struct __large_struct *)(& cmdbuffer->DR1))),
                             "i" (-14), "0" (__pu_err___1));
        goto ldv_22525;
        case 2UL: 
        __asm__  volatile   ("1:\tmovw %w1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___1): "ir" (cmdbuffer32.DR1),
                             "m" (*((struct __large_struct *)(& cmdbuffer->DR1))),
                             "i" (-14), "0" (__pu_err___1));
        goto ldv_22525;
        case 4UL: 
        __asm__  volatile   ("1:\tmovl %k1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___1): "ir" (cmdbuffer32.DR1),
                             "m" (*((struct __large_struct *)(& cmdbuffer->DR1))),
                             "i" (-14), "0" (__pu_err___1));
        goto ldv_22525;
        case 8UL: 
        __asm__  volatile   ("1:\tmovq %1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___1): "Zr" (cmdbuffer32.DR1),
                             "m" (*((struct __large_struct *)(& cmdbuffer->DR1))),
                             "i" (-14), "0" (__pu_err___1));
        goto ldv_22525;
        default: 
        __put_user_bad();
        }
        ldv_22525: ;
        if (__pu_err___1 != 0L) {
          return (-14);
        } else {
          __pu_err___2 = 0L;
          switch (4UL) {
          case 1UL: 
          __asm__  volatile   ("1:\tmovb %b1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___2): "iq" (cmdbuffer32.DR4),
                               "m" (*((struct __large_struct *)(& cmdbuffer->DR4))),
                               "i" (-14), "0" (__pu_err___2));
          goto ldv_22533;
          case 2UL: 
          __asm__  volatile   ("1:\tmovw %w1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___2): "ir" (cmdbuffer32.DR4),
                               "m" (*((struct __large_struct *)(& cmdbuffer->DR4))),
                               "i" (-14), "0" (__pu_err___2));
          goto ldv_22533;
          case 4UL: 
          __asm__  volatile   ("1:\tmovl %k1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___2): "ir" (cmdbuffer32.DR4),
                               "m" (*((struct __large_struct *)(& cmdbuffer->DR4))),
                               "i" (-14), "0" (__pu_err___2));
          goto ldv_22533;
          case 8UL: 
          __asm__  volatile   ("1:\tmovq %1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___2): "Zr" (cmdbuffer32.DR4),
                               "m" (*((struct __large_struct *)(& cmdbuffer->DR4))),
                               "i" (-14), "0" (__pu_err___2));
          goto ldv_22533;
          default: 
          __put_user_bad();
          }
          ldv_22533: ;
          if (__pu_err___2 != 0L) {
            return (-14);
          } else {
            __pu_err___3 = 0L;
            switch (4UL) {
            case 1UL: 
            __asm__  volatile   ("1:\tmovb %b1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___3): "iq" (cmdbuffer32.num_cliprects),
                                 "m" (*((struct __large_struct *)(& cmdbuffer->num_cliprects))),
                                 "i" (-14), "0" (__pu_err___3));
            goto ldv_22541;
            case 2UL: 
            __asm__  volatile   ("1:\tmovw %w1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___3): "ir" (cmdbuffer32.num_cliprects),
                                 "m" (*((struct __large_struct *)(& cmdbuffer->num_cliprects))),
                                 "i" (-14), "0" (__pu_err___3));
            goto ldv_22541;
            case 4UL: 
            __asm__  volatile   ("1:\tmovl %k1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___3): "ir" (cmdbuffer32.num_cliprects),
                                 "m" (*((struct __large_struct *)(& cmdbuffer->num_cliprects))),
                                 "i" (-14), "0" (__pu_err___3));
            goto ldv_22541;
            case 8UL: 
            __asm__  volatile   ("1:\tmovq %1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___3): "Zr" (cmdbuffer32.num_cliprects),
                                 "m" (*((struct __large_struct *)(& cmdbuffer->num_cliprects))),
                                 "i" (-14), "0" (__pu_err___3));
            goto ldv_22541;
            default: 
            __put_user_bad();
            }
            ldv_22541: ;
            if (__pu_err___3 != 0L) {
              return (-14);
            } else {
              __pu_err___4 = 0L;
              switch (8UL) {
              case 1UL: 
              __asm__  volatile   ("1:\tmovb %b1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___4): "iq" ((struct drm_clip_rect *)((unsigned long )cmdbuffer32.cliprects)),
                                   "m" (*((struct __large_struct *)(& cmdbuffer->cliprects))),
                                   "i" (-14), "0" (__pu_err___4));
              goto ldv_22549;
              case 2UL: 
              __asm__  volatile   ("1:\tmovw %w1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___4): "ir" ((struct drm_clip_rect *)((unsigned long )cmdbuffer32.cliprects)),
                                   "m" (*((struct __large_struct *)(& cmdbuffer->cliprects))),
                                   "i" (-14), "0" (__pu_err___4));
              goto ldv_22549;
              case 4UL: 
              __asm__  volatile   ("1:\tmovl %k1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___4): "ir" ((struct drm_clip_rect *)((unsigned long )cmdbuffer32.cliprects)),
                                   "m" (*((struct __large_struct *)(& cmdbuffer->cliprects))),
                                   "i" (-14), "0" (__pu_err___4));
              goto ldv_22549;
              case 8UL: 
              __asm__  volatile   ("1:\tmovq %1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___4): "Zr" ((struct drm_clip_rect *)((unsigned long )cmdbuffer32.cliprects)),
                                   "m" (*((struct __large_struct *)(& cmdbuffer->cliprects))),
                                   "i" (-14), "0" (__pu_err___4));
              goto ldv_22549;
              default: 
              __put_user_bad();
              }
              ldv_22549: ;
              if (__pu_err___4 != 0L) {
                return (-14);
              } else {

              }
            }
          }
        }
      }
    }
  }
  tmp___3 = drm_ioctl((file->f_path.dentry)->d_inode, file, 1075864651U, (unsigned long )cmdbuffer);
  return (tmp___3);
}
}
static int compat_i915_irq_emit(struct file *file , unsigned int cmd , unsigned long arg ) 
{ 
  drm_i915_irq_emit32_t req32 ;
  drm_i915_irq_emit_t *request ;
  unsigned long tmp ;
  void *tmp___0 ;
  unsigned long flag ;
  unsigned long roksum ;
  struct thread_info *tmp___1 ;
  long tmp___2 ;
  long __pu_err ;
  int tmp___3 ;

  {
  tmp = copy_from_user((void *)(& req32), (void const   *)arg, 4U);
  if (tmp != 0UL) {
    return (-14);
  } else {

  }
  tmp___0 = compat_alloc_user_space(8L);
  request = (drm_i915_irq_emit_t *)tmp___0;
  tmp___1 = current_thread_info();
  __asm__  ("add %3,%1 ; sbb %0,%0 ; cmp %1,%4 ; sbb $0,%0": "=&r" (flag), "=r" (roksum): "1" (request),
            "g" (8L), "rm" (tmp___1->addr_limit.seg));
  tmp___2 = ldv__builtin_expect(flag == 0UL, 1L);
  if (tmp___2 == 0L) {
    return (-14);
  } else {
    __pu_err = 0L;
    switch (8UL) {
    case 1UL: 
    __asm__  volatile   ("1:\tmovb %b1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err): "iq" ((int *)((unsigned long )req32.irq_seq)),
                         "m" (*((struct __large_struct *)(& request->irq_seq))), "i" (-14),
                         "0" (__pu_err));
    goto ldv_22570;
    case 2UL: 
    __asm__  volatile   ("1:\tmovw %w1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err): "ir" ((int *)((unsigned long )req32.irq_seq)),
                         "m" (*((struct __large_struct *)(& request->irq_seq))), "i" (-14),
                         "0" (__pu_err));
    goto ldv_22570;
    case 4UL: 
    __asm__  volatile   ("1:\tmovl %k1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err): "ir" ((int *)((unsigned long )req32.irq_seq)),
                         "m" (*((struct __large_struct *)(& request->irq_seq))), "i" (-14),
                         "0" (__pu_err));
    goto ldv_22570;
    case 8UL: 
    __asm__  volatile   ("1:\tmovq %1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err): "Zr" ((int *)((unsigned long )req32.irq_seq)),
                         "m" (*((struct __large_struct *)(& request->irq_seq))), "i" (-14),
                         "0" (__pu_err));
    goto ldv_22570;
    default: 
    __put_user_bad();
    }
    ldv_22570: ;
    if (__pu_err != 0L) {
      return (-14);
    } else {

    }
  }
  tmp___3 = drm_ioctl((file->f_path.dentry)->d_inode, file, 3221775428U, (unsigned long )request);
  return (tmp___3);
}
}
static int compat_i915_getparam(struct file *file , unsigned int cmd , unsigned long arg ) 
{ 
  drm_i915_getparam32_t req32 ;
  drm_i915_getparam_t *request ;
  unsigned long tmp ;
  void *tmp___0 ;
  unsigned long flag ;
  unsigned long roksum ;
  struct thread_info *tmp___1 ;
  long tmp___2 ;
  long __pu_err ;
  long __pu_err___0 ;
  int tmp___3 ;

  {
  tmp = copy_from_user((void *)(& req32), (void const   *)arg, 8U);
  if (tmp != 0UL) {
    return (-14);
  } else {

  }
  tmp___0 = compat_alloc_user_space(16L);
  request = (drm_i915_getparam_t *)tmp___0;
  tmp___1 = current_thread_info();
  __asm__  ("add %3,%1 ; sbb %0,%0 ; cmp %1,%4 ; sbb $0,%0": "=&r" (flag), "=r" (roksum): "1" (request),
            "g" (16L), "rm" (tmp___1->addr_limit.seg));
  tmp___2 = ldv__builtin_expect(flag == 0UL, 1L);
  if (tmp___2 == 0L) {
    return (-14);
  } else {
    __pu_err = 0L;
    switch (4UL) {
    case 1UL: 
    __asm__  volatile   ("1:\tmovb %b1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err): "iq" (req32.param),
                         "m" (*((struct __large_struct *)(& request->param))), "i" (-14),
                         "0" (__pu_err));
    goto ldv_22592;
    case 2UL: 
    __asm__  volatile   ("1:\tmovw %w1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err): "ir" (req32.param),
                         "m" (*((struct __large_struct *)(& request->param))), "i" (-14),
                         "0" (__pu_err));
    goto ldv_22592;
    case 4UL: 
    __asm__  volatile   ("1:\tmovl %k1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err): "ir" (req32.param),
                         "m" (*((struct __large_struct *)(& request->param))), "i" (-14),
                         "0" (__pu_err));
    goto ldv_22592;
    case 8UL: 
    __asm__  volatile   ("1:\tmovq %1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err): "Zr" (req32.param),
                         "m" (*((struct __large_struct *)(& request->param))), "i" (-14),
                         "0" (__pu_err));
    goto ldv_22592;
    default: 
    __put_user_bad();
    }
    ldv_22592: ;
    if (__pu_err != 0L) {
      return (-14);
    } else {
      __pu_err___0 = 0L;
      switch (8UL) {
      case 1UL: 
      __asm__  volatile   ("1:\tmovb %b1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___0): "iq" ((int *)((unsigned long )req32.value)),
                           "m" (*((struct __large_struct *)(& request->value))), "i" (-14),
                           "0" (__pu_err___0));
      goto ldv_22600;
      case 2UL: 
      __asm__  volatile   ("1:\tmovw %w1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___0): "ir" ((int *)((unsigned long )req32.value)),
                           "m" (*((struct __large_struct *)(& request->value))), "i" (-14),
                           "0" (__pu_err___0));
      goto ldv_22600;
      case 4UL: 
      __asm__  volatile   ("1:\tmovl %k1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___0): "ir" ((int *)((unsigned long )req32.value)),
                           "m" (*((struct __large_struct *)(& request->value))), "i" (-14),
                           "0" (__pu_err___0));
      goto ldv_22600;
      case 8UL: 
      __asm__  volatile   ("1:\tmovq %1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___0): "Zr" ((int *)((unsigned long )req32.value)),
                           "m" (*((struct __large_struct *)(& request->value))), "i" (-14),
                           "0" (__pu_err___0));
      goto ldv_22600;
      default: 
      __put_user_bad();
      }
      ldv_22600: ;
      if (__pu_err___0 != 0L) {
        return (-14);
      } else {

      }
    }
  }
  tmp___3 = drm_ioctl((file->f_path.dentry)->d_inode, file, 3222299718U, (unsigned long )request);
  return (tmp___3);
}
}
static int compat_i915_alloc(struct file *file , unsigned int cmd , unsigned long arg ) 
{ 
  drm_i915_mem_alloc32_t req32 ;
  drm_i915_mem_alloc_t *request ;
  unsigned long tmp ;
  void *tmp___0 ;
  unsigned long flag ;
  unsigned long roksum ;
  struct thread_info *tmp___1 ;
  long tmp___2 ;
  long __pu_err ;
  long __pu_err___0 ;
  long __pu_err___1 ;
  long __pu_err___2 ;
  int tmp___3 ;

  {
  tmp = copy_from_user((void *)(& req32), (void const   *)arg, 16U);
  if (tmp != 0UL) {
    return (-14);
  } else {

  }
  tmp___0 = compat_alloc_user_space(24L);
  request = (drm_i915_mem_alloc_t *)tmp___0;
  tmp___1 = current_thread_info();
  __asm__  ("add %3,%1 ; sbb %0,%0 ; cmp %1,%4 ; sbb $0,%0": "=&r" (flag), "=r" (roksum): "1" (request),
            "g" (24L), "rm" (tmp___1->addr_limit.seg));
  tmp___2 = ldv__builtin_expect(flag == 0UL, 1L);
  if (tmp___2 == 0L) {
    return (-14);
  } else {
    __pu_err = 0L;
    switch (4UL) {
    case 1UL: 
    __asm__  volatile   ("1:\tmovb %b1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err): "iq" (req32.region),
                         "m" (*((struct __large_struct *)(& request->region))), "i" (-14),
                         "0" (__pu_err));
    goto ldv_22624;
    case 2UL: 
    __asm__  volatile   ("1:\tmovw %w1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err): "ir" (req32.region),
                         "m" (*((struct __large_struct *)(& request->region))), "i" (-14),
                         "0" (__pu_err));
    goto ldv_22624;
    case 4UL: 
    __asm__  volatile   ("1:\tmovl %k1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err): "ir" (req32.region),
                         "m" (*((struct __large_struct *)(& request->region))), "i" (-14),
                         "0" (__pu_err));
    goto ldv_22624;
    case 8UL: 
    __asm__  volatile   ("1:\tmovq %1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err): "Zr" (req32.region),
                         "m" (*((struct __large_struct *)(& request->region))), "i" (-14),
                         "0" (__pu_err));
    goto ldv_22624;
    default: 
    __put_user_bad();
    }
    ldv_22624: ;
    if (__pu_err != 0L) {
      return (-14);
    } else {
      __pu_err___0 = 0L;
      switch (4UL) {
      case 1UL: 
      __asm__  volatile   ("1:\tmovb %b1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___0): "iq" (req32.alignment),
                           "m" (*((struct __large_struct *)(& request->alignment))),
                           "i" (-14), "0" (__pu_err___0));
      goto ldv_22632;
      case 2UL: 
      __asm__  volatile   ("1:\tmovw %w1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___0): "ir" (req32.alignment),
                           "m" (*((struct __large_struct *)(& request->alignment))),
                           "i" (-14), "0" (__pu_err___0));
      goto ldv_22632;
      case 4UL: 
      __asm__  volatile   ("1:\tmovl %k1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___0): "ir" (req32.alignment),
                           "m" (*((struct __large_struct *)(& request->alignment))),
                           "i" (-14), "0" (__pu_err___0));
      goto ldv_22632;
      case 8UL: 
      __asm__  volatile   ("1:\tmovq %1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___0): "Zr" (req32.alignment),
                           "m" (*((struct __large_struct *)(& request->alignment))),
                           "i" (-14), "0" (__pu_err___0));
      goto ldv_22632;
      default: 
      __put_user_bad();
      }
      ldv_22632: ;
      if (__pu_err___0 != 0L) {
        return (-14);
      } else {
        __pu_err___1 = 0L;
        switch (4UL) {
        case 1UL: 
        __asm__  volatile   ("1:\tmovb %b1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___1): "iq" (req32.size),
                             "m" (*((struct __large_struct *)(& request->size))),
                             "i" (-14), "0" (__pu_err___1));
        goto ldv_22640;
        case 2UL: 
        __asm__  volatile   ("1:\tmovw %w1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___1): "ir" (req32.size),
                             "m" (*((struct __large_struct *)(& request->size))),
                             "i" (-14), "0" (__pu_err___1));
        goto ldv_22640;
        case 4UL: 
        __asm__  volatile   ("1:\tmovl %k1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___1): "ir" (req32.size),
                             "m" (*((struct __large_struct *)(& request->size))),
                             "i" (-14), "0" (__pu_err___1));
        goto ldv_22640;
        case 8UL: 
        __asm__  volatile   ("1:\tmovq %1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___1): "Zr" (req32.size),
                             "m" (*((struct __large_struct *)(& request->size))),
                             "i" (-14), "0" (__pu_err___1));
        goto ldv_22640;
        default: 
        __put_user_bad();
        }
        ldv_22640: ;
        if (__pu_err___1 != 0L) {
          return (-14);
        } else {
          __pu_err___2 = 0L;
          switch (8UL) {
          case 1UL: 
          __asm__  volatile   ("1:\tmovb %b1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___2): "iq" ((int *)((unsigned long )req32.region_offset)),
                               "m" (*((struct __large_struct *)(& request->region_offset))),
                               "i" (-14), "0" (__pu_err___2));
          goto ldv_22648;
          case 2UL: 
          __asm__  volatile   ("1:\tmovw %w1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___2): "ir" ((int *)((unsigned long )req32.region_offset)),
                               "m" (*((struct __large_struct *)(& request->region_offset))),
                               "i" (-14), "0" (__pu_err___2));
          goto ldv_22648;
          case 4UL: 
          __asm__  volatile   ("1:\tmovl %k1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___2): "ir" ((int *)((unsigned long )req32.region_offset)),
                               "m" (*((struct __large_struct *)(& request->region_offset))),
                               "i" (-14), "0" (__pu_err___2));
          goto ldv_22648;
          case 8UL: 
          __asm__  volatile   ("1:\tmovq %1,%2\n2:\n.section .fixup,\"ax\"\n3:\tmov %3,%0\n\tjmp 2b\n.previous\n .section __ex_table,\"a\"\n .balign 8 \n .quad 1b,3b\n .previous\n": "=r" (__pu_err___2): "Zr" ((int *)((unsigned long )req32.region_offset)),
                               "m" (*((struct __large_struct *)(& request->region_offset))),
                               "i" (-14), "0" (__pu_err___2));
          goto ldv_22648;
          default: 
          __put_user_bad();
          }
          ldv_22648: ;
          if (__pu_err___2 != 0L) {
            return (-14);
          } else {

          }
        }
      }
    }
  }
  tmp___3 = drm_ioctl((file->f_path.dentry)->d_inode, file, 3222824008U, (unsigned long )request);
  return (tmp___3);
}
}
drm_ioctl_compat_t *i915_compat_ioctls[12U]  = 
  {      0,      0,      0,      & compat_i915_batchbuffer, 
        & compat_i915_irq_emit,      0,      & compat_i915_getparam,      0, 
        & compat_i915_alloc,      0,      0,      & compat_i915_cmdbuffer};
long i915_compat_ioctl(struct file *filp , unsigned int cmd , unsigned long arg ) 
{ 
  unsigned int nr ;
  drm_ioctl_compat_t *fn ;
  int ret ;
  long tmp ;

  {
  nr = cmd & 255U;
  fn = 0;
  if (nr <= 63U) {
    tmp = drm_compat_ioctl(filp, cmd, arg);
    return (tmp);
  } else {

  }
  if (nr <= 75U) {
    fn = i915_compat_ioctls[nr - 64U];
  } else {

  }
  lock_kernel();
  if ((unsigned long )fn != (unsigned long )((drm_ioctl_compat_t *)0)) {
    ret = (*fn)(filp, cmd, arg);
  } else {
    ret = drm_ioctl((filp->f_path.dentry)->d_inode, filp, cmd, arg);
  }
  unlock_kernel();
  return ((long )ret);
}
}
long ldv__builtin_expect(long exp , long c ) 
{ 


  {
  return (exp);
}
}
void ldv_initialize(void) 
{ 


  {
  return;
}
}
void ldv_check_final_state(void) 
{ 


  {
  return;
}
}