Showing error 583

User: Jiri Slaby
Error type: Reachable Error Location
Error type description: A specified error location is reachable in some program path
File location: ldv-linux-3.4/32_1_cilled_safe_ok_nondet_linux-3.4-32_1-drivers--power--wm831x_power.ko-ldv_main0_sequence_infinite_withcheck_stateful.cil.out.c
Line in file: 4335
Project: SV-COMP 2013
Project version: 2.6.28
Tools: Manual Work
Entered: 2013-01-17 16:57:54 UTC


Source:

   1/* Generated by CIL v. 1.3.7 */
   2/* print_CIL_Input is true */
   3
   4#line 23 "include/asm-generic/int-ll64.h"
   5typedef unsigned short __u16;
   6#line 26 "include/asm-generic/int-ll64.h"
   7typedef unsigned int __u32;
   8#line 30 "include/asm-generic/int-ll64.h"
   9typedef unsigned long long __u64;
  10#line 45 "include/asm-generic/int-ll64.h"
  11typedef short s16;
  12#line 46 "include/asm-generic/int-ll64.h"
  13typedef unsigned short u16;
  14#line 48 "include/asm-generic/int-ll64.h"
  15typedef int s32;
  16#line 49 "include/asm-generic/int-ll64.h"
  17typedef unsigned int u32;
  18#line 51 "include/asm-generic/int-ll64.h"
  19typedef long long s64;
  20#line 52 "include/asm-generic/int-ll64.h"
  21typedef unsigned long long u64;
  22#line 14 "include/asm-generic/posix_types.h"
  23typedef long __kernel_long_t;
  24#line 15 "include/asm-generic/posix_types.h"
  25typedef unsigned long __kernel_ulong_t;
  26#line 75 "include/asm-generic/posix_types.h"
  27typedef __kernel_ulong_t __kernel_size_t;
  28#line 76 "include/asm-generic/posix_types.h"
  29typedef __kernel_long_t __kernel_ssize_t;
  30#line 91 "include/asm-generic/posix_types.h"
  31typedef long long __kernel_loff_t;
  32#line 21 "include/linux/types.h"
  33typedef __u32 __kernel_dev_t;
  34#line 24 "include/linux/types.h"
  35typedef __kernel_dev_t dev_t;
  36#line 27 "include/linux/types.h"
  37typedef unsigned short umode_t;
  38#line 38 "include/linux/types.h"
  39typedef _Bool bool;
  40#line 54 "include/linux/types.h"
  41typedef __kernel_loff_t loff_t;
  42#line 63 "include/linux/types.h"
  43typedef __kernel_size_t size_t;
  44#line 68 "include/linux/types.h"
  45typedef __kernel_ssize_t ssize_t;
  46#line 202 "include/linux/types.h"
  47typedef unsigned int gfp_t;
  48#line 206 "include/linux/types.h"
  49typedef u64 phys_addr_t;
  50#line 211 "include/linux/types.h"
  51typedef phys_addr_t resource_size_t;
  52#line 219 "include/linux/types.h"
  53struct __anonstruct_atomic_t_7 {
  54   int counter ;
  55};
  56#line 219 "include/linux/types.h"
  57typedef struct __anonstruct_atomic_t_7 atomic_t;
  58#line 224 "include/linux/types.h"
  59struct __anonstruct_atomic64_t_8 {
  60   long counter ;
  61};
  62#line 224 "include/linux/types.h"
  63typedef struct __anonstruct_atomic64_t_8 atomic64_t;
  64#line 229 "include/linux/types.h"
  65struct list_head {
  66   struct list_head *next ;
  67   struct list_head *prev ;
  68};
  69#line 56 "/home/zakharov/launch/inst/current/envs/linux-3.4/linux-3.4/arch/x86/include/asm/alternative.h"
  70struct module;
  71#line 56
  72struct module;
  73#line 146 "include/linux/init.h"
  74typedef void (*ctor_fn_t)(void);
  75#line 9 "include/linux/dynamic_debug.h"
  76struct _ddebug {
  77   char const   *modname ;
  78   char const   *function ;
  79   char const   *filename ;
  80   char const   *format ;
  81   unsigned int lineno : 18 ;
  82   unsigned int flags : 8 ;
  83} __attribute__((__aligned__(8))) ;
  84#line 47
  85struct device;
  86#line 47
  87struct device;
  88#line 135 "include/linux/kernel.h"
  89struct completion;
  90#line 135
  91struct completion;
  92#line 18 "/home/zakharov/launch/inst/current/envs/linux-3.4/linux-3.4/arch/x86/include/asm/page.h"
  93struct page;
  94#line 18
  95struct page;
  96#line 20 "/home/zakharov/launch/inst/current/envs/linux-3.4/linux-3.4/arch/x86/include/asm/thread_info.h"
  97struct task_struct;
  98#line 20
  99struct task_struct;
 100#line 7 "/home/zakharov/launch/inst/current/envs/linux-3.4/linux-3.4/arch/x86/include/asm/processor.h"
 101struct task_struct;
 102#line 295 "/home/zakharov/launch/inst/current/envs/linux-3.4/linux-3.4/arch/x86/include/asm/pgtable_types.h"
 103struct file;
 104#line 295
 105struct file;
 106#line 46 "/home/zakharov/launch/inst/current/envs/linux-3.4/linux-3.4/arch/x86/include/asm/paravirt_types.h"
 107struct page;
 108#line 52
 109struct task_struct;
 110#line 329
 111struct arch_spinlock;
 112#line 329
 113struct arch_spinlock;
 114#line 139 "/home/zakharov/launch/inst/current/envs/linux-3.4/linux-3.4/arch/x86/include/asm/ptrace.h"
 115struct task_struct;
 116#line 8 "/home/zakharov/launch/inst/current/envs/linux-3.4/linux-3.4/arch/x86/include/asm/current.h"
 117struct task_struct;
 118#line 10 "include/asm-generic/bug.h"
 119struct bug_entry {
 120   int bug_addr_disp ;
 121   int file_disp ;
 122   unsigned short line ;
 123   unsigned short flags ;
 124};
 125#line 234 "/home/zakharov/launch/inst/current/envs/linux-3.4/linux-3.4/arch/x86/include/asm/paravirt.h"
 126struct static_key;
 127#line 234
 128struct static_key;
 129#line 433 "/home/zakharov/launch/inst/current/envs/linux-3.4/linux-3.4/arch/x86/include/asm/processor.h"
 130struct kmem_cache;
 131#line 23 "include/asm-generic/atomic-long.h"
 132typedef atomic64_t atomic_long_t;
 133#line 14 "/home/zakharov/launch/inst/current/envs/linux-3.4/linux-3.4/arch/x86/include/asm/spinlock_types.h"
 134typedef u16 __ticket_t;
 135#line 15 "/home/zakharov/launch/inst/current/envs/linux-3.4/linux-3.4/arch/x86/include/asm/spinlock_types.h"
 136typedef u32 __ticketpair_t;
 137#line 20 "/home/zakharov/launch/inst/current/envs/linux-3.4/linux-3.4/arch/x86/include/asm/spinlock_types.h"
 138struct __raw_tickets {
 139   __ticket_t head ;
 140   __ticket_t tail ;
 141};
 142#line 20 "/home/zakharov/launch/inst/current/envs/linux-3.4/linux-3.4/arch/x86/include/asm/spinlock_types.h"
 143union __anonunion____missing_field_name_36 {
 144   __ticketpair_t head_tail ;
 145   struct __raw_tickets tickets ;
 146};
 147#line 20 "/home/zakharov/launch/inst/current/envs/linux-3.4/linux-3.4/arch/x86/include/asm/spinlock_types.h"
 148struct arch_spinlock {
 149   union __anonunion____missing_field_name_36 __annonCompField17 ;
 150};
 151#line 20 "/home/zakharov/launch/inst/current/envs/linux-3.4/linux-3.4/arch/x86/include/asm/spinlock_types.h"
 152typedef struct arch_spinlock arch_spinlock_t;
 153#line 27 "/home/zakharov/launch/inst/current/envs/linux-3.4/linux-3.4/arch/x86/include/asm/rwlock.h"
 154struct __anonstruct____missing_field_name_38 {
 155   u32 read ;
 156   s32 write ;
 157};
 158#line 27 "/home/zakharov/launch/inst/current/envs/linux-3.4/linux-3.4/arch/x86/include/asm/rwlock.h"
 159union __anonunion_arch_rwlock_t_37 {
 160   s64 lock ;
 161   struct __anonstruct____missing_field_name_38 __annonCompField18 ;
 162};
 163#line 27 "/home/zakharov/launch/inst/current/envs/linux-3.4/linux-3.4/arch/x86/include/asm/rwlock.h"
 164typedef union __anonunion_arch_rwlock_t_37 arch_rwlock_t;
 165#line 12 "include/linux/lockdep.h"
 166struct task_struct;
 167#line 20 "include/linux/spinlock_types.h"
 168struct raw_spinlock {
 169   arch_spinlock_t raw_lock ;
 170   unsigned int magic ;
 171   unsigned int owner_cpu ;
 172   void *owner ;
 173};
 174#line 20 "include/linux/spinlock_types.h"
 175typedef struct raw_spinlock raw_spinlock_t;
 176#line 64 "include/linux/spinlock_types.h"
 177union __anonunion____missing_field_name_39 {
 178   struct raw_spinlock rlock ;
 179};
 180#line 64 "include/linux/spinlock_types.h"
 181struct spinlock {
 182   union __anonunion____missing_field_name_39 __annonCompField19 ;
 183};
 184#line 64 "include/linux/spinlock_types.h"
 185typedef struct spinlock spinlock_t;
 186#line 11 "include/linux/rwlock_types.h"
 187struct __anonstruct_rwlock_t_40 {
 188   arch_rwlock_t raw_lock ;
 189   unsigned int magic ;
 190   unsigned int owner_cpu ;
 191   void *owner ;
 192};
 193#line 11 "include/linux/rwlock_types.h"
 194typedef struct __anonstruct_rwlock_t_40 rwlock_t;
 195#line 49 "include/linux/wait.h"
 196struct __wait_queue_head {
 197   spinlock_t lock ;
 198   struct list_head task_list ;
 199};
 200#line 53 "include/linux/wait.h"
 201typedef struct __wait_queue_head wait_queue_head_t;
 202#line 55
 203struct task_struct;
 204#line 60 "include/linux/pageblock-flags.h"
 205struct page;
 206#line 48 "include/linux/mutex.h"
 207struct mutex {
 208   atomic_t count ;
 209   spinlock_t wait_lock ;
 210   struct list_head wait_list ;
 211   struct task_struct *owner ;
 212   char const   *name ;
 213   void *magic ;
 214};
 215#line 19 "include/linux/rwsem.h"
 216struct rw_semaphore;
 217#line 19
 218struct rw_semaphore;
 219#line 25 "include/linux/rwsem.h"
 220struct rw_semaphore {
 221   long count ;
 222   raw_spinlock_t wait_lock ;
 223   struct list_head wait_list ;
 224};
 225#line 25 "include/linux/completion.h"
 226struct completion {
 227   unsigned int done ;
 228   wait_queue_head_t wait ;
 229};
 230#line 9 "include/linux/memory_hotplug.h"
 231struct page;
 232#line 18 "include/linux/ioport.h"
 233struct resource {
 234   resource_size_t start ;
 235   resource_size_t end ;
 236   char const   *name ;
 237   unsigned long flags ;
 238   struct resource *parent ;
 239   struct resource *sibling ;
 240   struct resource *child ;
 241};
 242#line 202
 243struct device;
 244#line 103 "/home/zakharov/launch/inst/current/envs/linux-3.4/linux-3.4/arch/x86/include/asm/mpspec.h"
 245struct device;
 246#line 46 "include/linux/ktime.h"
 247union ktime {
 248   s64 tv64 ;
 249};
 250#line 59 "include/linux/ktime.h"
 251typedef union ktime ktime_t;
 252#line 10 "include/linux/timer.h"
 253struct tvec_base;
 254#line 10
 255struct tvec_base;
 256#line 12 "include/linux/timer.h"
 257struct timer_list {
 258   struct list_head entry ;
 259   unsigned long expires ;
 260   struct tvec_base *base ;
 261   void (*function)(unsigned long  ) ;
 262   unsigned long data ;
 263   int slack ;
 264   int start_pid ;
 265   void *start_site ;
 266   char start_comm[16] ;
 267};
 268#line 17 "include/linux/workqueue.h"
 269struct work_struct;
 270#line 17
 271struct work_struct;
 272#line 79 "include/linux/workqueue.h"
 273struct work_struct {
 274   atomic_long_t data ;
 275   struct list_head entry ;
 276   void (*func)(struct work_struct *work ) ;
 277};
 278#line 42 "include/linux/pm.h"
 279struct device;
 280#line 50 "include/linux/pm.h"
 281struct pm_message {
 282   int event ;
 283};
 284#line 50 "include/linux/pm.h"
 285typedef struct pm_message pm_message_t;
 286#line 264 "include/linux/pm.h"
 287struct dev_pm_ops {
 288   int (*prepare)(struct device *dev ) ;
 289   void (*complete)(struct device *dev ) ;
 290   int (*suspend)(struct device *dev ) ;
 291   int (*resume)(struct device *dev ) ;
 292   int (*freeze)(struct device *dev ) ;
 293   int (*thaw)(struct device *dev ) ;
 294   int (*poweroff)(struct device *dev ) ;
 295   int (*restore)(struct device *dev ) ;
 296   int (*suspend_late)(struct device *dev ) ;
 297   int (*resume_early)(struct device *dev ) ;
 298   int (*freeze_late)(struct device *dev ) ;
 299   int (*thaw_early)(struct device *dev ) ;
 300   int (*poweroff_late)(struct device *dev ) ;
 301   int (*restore_early)(struct device *dev ) ;
 302   int (*suspend_noirq)(struct device *dev ) ;
 303   int (*resume_noirq)(struct device *dev ) ;
 304   int (*freeze_noirq)(struct device *dev ) ;
 305   int (*thaw_noirq)(struct device *dev ) ;
 306   int (*poweroff_noirq)(struct device *dev ) ;
 307   int (*restore_noirq)(struct device *dev ) ;
 308   int (*runtime_suspend)(struct device *dev ) ;
 309   int (*runtime_resume)(struct device *dev ) ;
 310   int (*runtime_idle)(struct device *dev ) ;
 311};
 312#line 458
 313enum rpm_status {
 314    RPM_ACTIVE = 0,
 315    RPM_RESUMING = 1,
 316    RPM_SUSPENDED = 2,
 317    RPM_SUSPENDING = 3
 318} ;
 319#line 480
 320enum rpm_request {
 321    RPM_REQ_NONE = 0,
 322    RPM_REQ_IDLE = 1,
 323    RPM_REQ_SUSPEND = 2,
 324    RPM_REQ_AUTOSUSPEND = 3,
 325    RPM_REQ_RESUME = 4
 326} ;
 327#line 488
 328struct wakeup_source;
 329#line 488
 330struct wakeup_source;
 331#line 495 "include/linux/pm.h"
 332struct pm_subsys_data {
 333   spinlock_t lock ;
 334   unsigned int refcount ;
 335};
 336#line 506
 337struct dev_pm_qos_request;
 338#line 506
 339struct pm_qos_constraints;
 340#line 506 "include/linux/pm.h"
 341struct dev_pm_info {
 342   pm_message_t power_state ;
 343   unsigned int can_wakeup : 1 ;
 344   unsigned int async_suspend : 1 ;
 345   bool is_prepared : 1 ;
 346   bool is_suspended : 1 ;
 347   bool ignore_children : 1 ;
 348   spinlock_t lock ;
 349   struct list_head entry ;
 350   struct completion completion ;
 351   struct wakeup_source *wakeup ;
 352   bool wakeup_path : 1 ;
 353   struct timer_list suspend_timer ;
 354   unsigned long timer_expires ;
 355   struct work_struct work ;
 356   wait_queue_head_t wait_queue ;
 357   atomic_t usage_count ;
 358   atomic_t child_count ;
 359   unsigned int disable_depth : 3 ;
 360   unsigned int idle_notification : 1 ;
 361   unsigned int request_pending : 1 ;
 362   unsigned int deferred_resume : 1 ;
 363   unsigned int run_wake : 1 ;
 364   unsigned int runtime_auto : 1 ;
 365   unsigned int no_callbacks : 1 ;
 366   unsigned int irq_safe : 1 ;
 367   unsigned int use_autosuspend : 1 ;
 368   unsigned int timer_autosuspends : 1 ;
 369   enum rpm_request request ;
 370   enum rpm_status runtime_status ;
 371   int runtime_error ;
 372   int autosuspend_delay ;
 373   unsigned long last_busy ;
 374   unsigned long active_jiffies ;
 375   unsigned long suspended_jiffies ;
 376   unsigned long accounting_timestamp ;
 377   ktime_t suspend_time ;
 378   s64 max_time_suspended_ns ;
 379   struct dev_pm_qos_request *pq_req ;
 380   struct pm_subsys_data *subsys_data ;
 381   struct pm_qos_constraints *constraints ;
 382};
 383#line 564 "include/linux/pm.h"
 384struct dev_pm_domain {
 385   struct dev_pm_ops ops ;
 386};
 387#line 8 "include/linux/vmalloc.h"
 388struct vm_area_struct;
 389#line 8
 390struct vm_area_struct;
 391#line 994 "include/linux/mmzone.h"
 392struct page;
 393#line 10 "include/linux/gfp.h"
 394struct vm_area_struct;
 395#line 29 "include/linux/sysctl.h"
 396struct completion;
 397#line 49 "include/linux/kmod.h"
 398struct file;
 399#line 270 "/home/zakharov/launch/inst/current/envs/linux-3.4/linux-3.4/arch/x86/include/asm/elf.h"
 400struct task_struct;
 401#line 18 "include/linux/elf.h"
 402typedef __u64 Elf64_Addr;
 403#line 19 "include/linux/elf.h"
 404typedef __u16 Elf64_Half;
 405#line 23 "include/linux/elf.h"
 406typedef __u32 Elf64_Word;
 407#line 24 "include/linux/elf.h"
 408typedef __u64 Elf64_Xword;
 409#line 194 "include/linux/elf.h"
 410struct elf64_sym {
 411   Elf64_Word st_name ;
 412   unsigned char st_info ;
 413   unsigned char st_other ;
 414   Elf64_Half st_shndx ;
 415   Elf64_Addr st_value ;
 416   Elf64_Xword st_size ;
 417};
 418#line 194 "include/linux/elf.h"
 419typedef struct elf64_sym Elf64_Sym;
 420#line 438
 421struct file;
 422#line 20 "include/linux/kobject_ns.h"
 423struct sock;
 424#line 20
 425struct sock;
 426#line 21
 427struct kobject;
 428#line 21
 429struct kobject;
 430#line 27
 431enum kobj_ns_type {
 432    KOBJ_NS_TYPE_NONE = 0,
 433    KOBJ_NS_TYPE_NET = 1,
 434    KOBJ_NS_TYPES = 2
 435} ;
 436#line 40 "include/linux/kobject_ns.h"
 437struct kobj_ns_type_operations {
 438   enum kobj_ns_type type ;
 439   void *(*grab_current_ns)(void) ;
 440   void const   *(*netlink_ns)(struct sock *sk ) ;
 441   void const   *(*initial_ns)(void) ;
 442   void (*drop_ns)(void * ) ;
 443};
 444#line 22 "include/linux/sysfs.h"
 445struct kobject;
 446#line 23
 447struct module;
 448#line 24
 449enum kobj_ns_type;
 450#line 26 "include/linux/sysfs.h"
 451struct attribute {
 452   char const   *name ;
 453   umode_t mode ;
 454};
 455#line 56 "include/linux/sysfs.h"
 456struct attribute_group {
 457   char const   *name ;
 458   umode_t (*is_visible)(struct kobject * , struct attribute * , int  ) ;
 459   struct attribute **attrs ;
 460};
 461#line 85
 462struct file;
 463#line 86
 464struct vm_area_struct;
 465#line 88 "include/linux/sysfs.h"
 466struct bin_attribute {
 467   struct attribute attr ;
 468   size_t size ;
 469   void *private ;
 470   ssize_t (*read)(struct file * , struct kobject * , struct bin_attribute * , char * ,
 471                   loff_t  , size_t  ) ;
 472   ssize_t (*write)(struct file * , struct kobject * , struct bin_attribute * , char * ,
 473                    loff_t  , size_t  ) ;
 474   int (*mmap)(struct file * , struct kobject * , struct bin_attribute *attr , struct vm_area_struct *vma ) ;
 475};
 476#line 112 "include/linux/sysfs.h"
 477struct sysfs_ops {
 478   ssize_t (*show)(struct kobject * , struct attribute * , char * ) ;
 479   ssize_t (*store)(struct kobject * , struct attribute * , char const   * , size_t  ) ;
 480   void const   *(*namespace)(struct kobject * , struct attribute  const  * ) ;
 481};
 482#line 118
 483struct sysfs_dirent;
 484#line 118
 485struct sysfs_dirent;
 486#line 22 "include/linux/kref.h"
 487struct kref {
 488   atomic_t refcount ;
 489};
 490#line 60 "include/linux/kobject.h"
 491struct kset;
 492#line 60
 493struct kobj_type;
 494#line 60 "include/linux/kobject.h"
 495struct kobject {
 496   char const   *name ;
 497   struct list_head entry ;
 498   struct kobject *parent ;
 499   struct kset *kset ;
 500   struct kobj_type *ktype ;
 501   struct sysfs_dirent *sd ;
 502   struct kref kref ;
 503   unsigned int state_initialized : 1 ;
 504   unsigned int state_in_sysfs : 1 ;
 505   unsigned int state_add_uevent_sent : 1 ;
 506   unsigned int state_remove_uevent_sent : 1 ;
 507   unsigned int uevent_suppress : 1 ;
 508};
 509#line 108 "include/linux/kobject.h"
 510struct kobj_type {
 511   void (*release)(struct kobject *kobj ) ;
 512   struct sysfs_ops  const  *sysfs_ops ;
 513   struct attribute **default_attrs ;
 514   struct kobj_ns_type_operations  const  *(*child_ns_type)(struct kobject *kobj ) ;
 515   void const   *(*namespace)(struct kobject *kobj ) ;
 516};
 517#line 116 "include/linux/kobject.h"
 518struct kobj_uevent_env {
 519   char *envp[32] ;
 520   int envp_idx ;
 521   char buf[2048] ;
 522   int buflen ;
 523};
 524#line 123 "include/linux/kobject.h"
 525struct kset_uevent_ops {
 526   int (* const  filter)(struct kset *kset , struct kobject *kobj ) ;
 527   char const   *(* const  name)(struct kset *kset , struct kobject *kobj ) ;
 528   int (* const  uevent)(struct kset *kset , struct kobject *kobj , struct kobj_uevent_env *env ) ;
 529};
 530#line 140
 531struct sock;
 532#line 159 "include/linux/kobject.h"
 533struct kset {
 534   struct list_head list ;
 535   spinlock_t list_lock ;
 536   struct kobject kobj ;
 537   struct kset_uevent_ops  const  *uevent_ops ;
 538};
 539#line 39 "include/linux/moduleparam.h"
 540struct kernel_param;
 541#line 39
 542struct kernel_param;
 543#line 41 "include/linux/moduleparam.h"
 544struct kernel_param_ops {
 545   int (*set)(char const   *val , struct kernel_param  const  *kp ) ;
 546   int (*get)(char *buffer , struct kernel_param  const  *kp ) ;
 547   void (*free)(void *arg ) ;
 548};
 549#line 50
 550struct kparam_string;
 551#line 50
 552struct kparam_array;
 553#line 50 "include/linux/moduleparam.h"
 554union __anonunion____missing_field_name_199 {
 555   void *arg ;
 556   struct kparam_string  const  *str ;
 557   struct kparam_array  const  *arr ;
 558};
 559#line 50 "include/linux/moduleparam.h"
 560struct kernel_param {
 561   char const   *name ;
 562   struct kernel_param_ops  const  *ops ;
 563   u16 perm ;
 564   s16 level ;
 565   union __anonunion____missing_field_name_199 __annonCompField32 ;
 566};
 567#line 63 "include/linux/moduleparam.h"
 568struct kparam_string {
 569   unsigned int maxlen ;
 570   char *string ;
 571};
 572#line 69 "include/linux/moduleparam.h"
 573struct kparam_array {
 574   unsigned int max ;
 575   unsigned int elemsize ;
 576   unsigned int *num ;
 577   struct kernel_param_ops  const  *ops ;
 578   void *elem ;
 579};
 580#line 445
 581struct module;
 582#line 80 "include/linux/jump_label.h"
 583struct module;
 584#line 143 "include/linux/jump_label.h"
 585struct static_key {
 586   atomic_t enabled ;
 587};
 588#line 22 "include/linux/tracepoint.h"
 589struct module;
 590#line 23
 591struct tracepoint;
 592#line 23
 593struct tracepoint;
 594#line 25 "include/linux/tracepoint.h"
 595struct tracepoint_func {
 596   void *func ;
 597   void *data ;
 598};
 599#line 30 "include/linux/tracepoint.h"
 600struct tracepoint {
 601   char const   *name ;
 602   struct static_key key ;
 603   void (*regfunc)(void) ;
 604   void (*unregfunc)(void) ;
 605   struct tracepoint_func *funcs ;
 606};
 607#line 19 "include/linux/export.h"
 608struct kernel_symbol {
 609   unsigned long value ;
 610   char const   *name ;
 611};
 612#line 8 "include/asm-generic/module.h"
 613struct mod_arch_specific {
 614
 615};
 616#line 35 "include/linux/module.h"
 617struct module;
 618#line 37
 619struct module_param_attrs;
 620#line 37 "include/linux/module.h"
 621struct module_kobject {
 622   struct kobject kobj ;
 623   struct module *mod ;
 624   struct kobject *drivers_dir ;
 625   struct module_param_attrs *mp ;
 626};
 627#line 44 "include/linux/module.h"
 628struct module_attribute {
 629   struct attribute attr ;
 630   ssize_t (*show)(struct module_attribute * , struct module_kobject * , char * ) ;
 631   ssize_t (*store)(struct module_attribute * , struct module_kobject * , char const   * ,
 632                    size_t count ) ;
 633   void (*setup)(struct module * , char const   * ) ;
 634   int (*test)(struct module * ) ;
 635   void (*free)(struct module * ) ;
 636};
 637#line 71
 638struct exception_table_entry;
 639#line 71
 640struct exception_table_entry;
 641#line 199
 642enum module_state {
 643    MODULE_STATE_LIVE = 0,
 644    MODULE_STATE_COMING = 1,
 645    MODULE_STATE_GOING = 2
 646} ;
 647#line 215 "include/linux/module.h"
 648struct module_ref {
 649   unsigned long incs ;
 650   unsigned long decs ;
 651} __attribute__((__aligned__((2) *  (sizeof(unsigned long )) ))) ;
 652#line 220
 653struct module_sect_attrs;
 654#line 220
 655struct module_notes_attrs;
 656#line 220
 657struct ftrace_event_call;
 658#line 220 "include/linux/module.h"
 659struct module {
 660   enum module_state state ;
 661   struct list_head list ;
 662   char name[64UL - sizeof(unsigned long )] ;
 663   struct module_kobject mkobj ;
 664   struct module_attribute *modinfo_attrs ;
 665   char const   *version ;
 666   char const   *srcversion ;
 667   struct kobject *holders_dir ;
 668   struct kernel_symbol  const  *syms ;
 669   unsigned long const   *crcs ;
 670   unsigned int num_syms ;
 671   struct kernel_param *kp ;
 672   unsigned int num_kp ;
 673   unsigned int num_gpl_syms ;
 674   struct kernel_symbol  const  *gpl_syms ;
 675   unsigned long const   *gpl_crcs ;
 676   struct kernel_symbol  const  *unused_syms ;
 677   unsigned long const   *unused_crcs ;
 678   unsigned int num_unused_syms ;
 679   unsigned int num_unused_gpl_syms ;
 680   struct kernel_symbol  const  *unused_gpl_syms ;
 681   unsigned long const   *unused_gpl_crcs ;
 682   struct kernel_symbol  const  *gpl_future_syms ;
 683   unsigned long const   *gpl_future_crcs ;
 684   unsigned int num_gpl_future_syms ;
 685   unsigned int num_exentries ;
 686   struct exception_table_entry *extable ;
 687   int (*init)(void) ;
 688   void *module_init ;
 689   void *module_core ;
 690   unsigned int init_size ;
 691   unsigned int core_size ;
 692   unsigned int init_text_size ;
 693   unsigned int core_text_size ;
 694   unsigned int init_ro_size ;
 695   unsigned int core_ro_size ;
 696   struct mod_arch_specific arch ;
 697   unsigned int taints ;
 698   unsigned int num_bugs ;
 699   struct list_head bug_list ;
 700   struct bug_entry *bug_table ;
 701   Elf64_Sym *symtab ;
 702   Elf64_Sym *core_symtab ;
 703   unsigned int num_symtab ;
 704   unsigned int core_num_syms ;
 705   char *strtab ;
 706   char *core_strtab ;
 707   struct module_sect_attrs *sect_attrs ;
 708   struct module_notes_attrs *notes_attrs ;
 709   char *args ;
 710   void *percpu ;
 711   unsigned int percpu_size ;
 712   unsigned int num_tracepoints ;
 713   struct tracepoint * const  *tracepoints_ptrs ;
 714   unsigned int num_trace_bprintk_fmt ;
 715   char const   **trace_bprintk_fmt_start ;
 716   struct ftrace_event_call **trace_events ;
 717   unsigned int num_trace_events ;
 718   struct list_head source_list ;
 719   struct list_head target_list ;
 720   struct task_struct *waiter ;
 721   void (*exit)(void) ;
 722   struct module_ref *refptr ;
 723   ctor_fn_t *ctors ;
 724   unsigned int num_ctors ;
 725};
 726#line 19 "include/linux/klist.h"
 727struct klist_node;
 728#line 19
 729struct klist_node;
 730#line 39 "include/linux/klist.h"
 731struct klist_node {
 732   void *n_klist ;
 733   struct list_head n_node ;
 734   struct kref n_ref ;
 735};
 736#line 4 "/home/zakharov/launch/inst/current/envs/linux-3.4/linux-3.4/arch/x86/include/asm/device.h"
 737struct dma_map_ops;
 738#line 4 "/home/zakharov/launch/inst/current/envs/linux-3.4/linux-3.4/arch/x86/include/asm/device.h"
 739struct dev_archdata {
 740   void *acpi_handle ;
 741   struct dma_map_ops *dma_ops ;
 742   void *iommu ;
 743};
 744#line 16 "/home/zakharov/launch/inst/current/envs/linux-3.4/linux-3.4/arch/x86/include/asm/device.h"
 745struct pdev_archdata {
 746
 747};
 748#line 28 "include/linux/device.h"
 749struct device;
 750#line 29
 751struct device_private;
 752#line 29
 753struct device_private;
 754#line 30
 755struct device_driver;
 756#line 30
 757struct device_driver;
 758#line 31
 759struct driver_private;
 760#line 31
 761struct driver_private;
 762#line 32
 763struct module;
 764#line 33
 765struct class;
 766#line 33
 767struct class;
 768#line 34
 769struct subsys_private;
 770#line 34
 771struct subsys_private;
 772#line 35
 773struct bus_type;
 774#line 35
 775struct bus_type;
 776#line 36
 777struct device_node;
 778#line 36
 779struct device_node;
 780#line 37
 781struct iommu_ops;
 782#line 37
 783struct iommu_ops;
 784#line 39 "include/linux/device.h"
 785struct bus_attribute {
 786   struct attribute attr ;
 787   ssize_t (*show)(struct bus_type *bus , char *buf ) ;
 788   ssize_t (*store)(struct bus_type *bus , char const   *buf , size_t count ) ;
 789};
 790#line 89
 791struct device_attribute;
 792#line 89
 793struct driver_attribute;
 794#line 89 "include/linux/device.h"
 795struct bus_type {
 796   char const   *name ;
 797   char const   *dev_name ;
 798   struct device *dev_root ;
 799   struct bus_attribute *bus_attrs ;
 800   struct device_attribute *dev_attrs ;
 801   struct driver_attribute *drv_attrs ;
 802   int (*match)(struct device *dev , struct device_driver *drv ) ;
 803   int (*uevent)(struct device *dev , struct kobj_uevent_env *env ) ;
 804   int (*probe)(struct device *dev ) ;
 805   int (*remove)(struct device *dev ) ;
 806   void (*shutdown)(struct device *dev ) ;
 807   int (*suspend)(struct device *dev , pm_message_t state ) ;
 808   int (*resume)(struct device *dev ) ;
 809   struct dev_pm_ops  const  *pm ;
 810   struct iommu_ops *iommu_ops ;
 811   struct subsys_private *p ;
 812};
 813#line 127
 814struct device_type;
 815#line 214
 816struct of_device_id;
 817#line 214 "include/linux/device.h"
 818struct device_driver {
 819   char const   *name ;
 820   struct bus_type *bus ;
 821   struct module *owner ;
 822   char const   *mod_name ;
 823   bool suppress_bind_attrs ;
 824   struct of_device_id  const  *of_match_table ;
 825   int (*probe)(struct device *dev ) ;
 826   int (*remove)(struct device *dev ) ;
 827   void (*shutdown)(struct device *dev ) ;
 828   int (*suspend)(struct device *dev , pm_message_t state ) ;
 829   int (*resume)(struct device *dev ) ;
 830   struct attribute_group  const  **groups ;
 831   struct dev_pm_ops  const  *pm ;
 832   struct driver_private *p ;
 833};
 834#line 249 "include/linux/device.h"
 835struct driver_attribute {
 836   struct attribute attr ;
 837   ssize_t (*show)(struct device_driver *driver , char *buf ) ;
 838   ssize_t (*store)(struct device_driver *driver , char const   *buf , size_t count ) ;
 839};
 840#line 330
 841struct class_attribute;
 842#line 330 "include/linux/device.h"
 843struct class {
 844   char const   *name ;
 845   struct module *owner ;
 846   struct class_attribute *class_attrs ;
 847   struct device_attribute *dev_attrs ;
 848   struct bin_attribute *dev_bin_attrs ;
 849   struct kobject *dev_kobj ;
 850   int (*dev_uevent)(struct device *dev , struct kobj_uevent_env *env ) ;
 851   char *(*devnode)(struct device *dev , umode_t *mode ) ;
 852   void (*class_release)(struct class *class ) ;
 853   void (*dev_release)(struct device *dev ) ;
 854   int (*suspend)(struct device *dev , pm_message_t state ) ;
 855   int (*resume)(struct device *dev ) ;
 856   struct kobj_ns_type_operations  const  *ns_type ;
 857   void const   *(*namespace)(struct device *dev ) ;
 858   struct dev_pm_ops  const  *pm ;
 859   struct subsys_private *p ;
 860};
 861#line 397 "include/linux/device.h"
 862struct class_attribute {
 863   struct attribute attr ;
 864   ssize_t (*show)(struct class *class , struct class_attribute *attr , char *buf ) ;
 865   ssize_t (*store)(struct class *class , struct class_attribute *attr , char const   *buf ,
 866                    size_t count ) ;
 867   void const   *(*namespace)(struct class *class , struct class_attribute  const  *attr ) ;
 868};
 869#line 465 "include/linux/device.h"
 870struct device_type {
 871   char const   *name ;
 872   struct attribute_group  const  **groups ;
 873   int (*uevent)(struct device *dev , struct kobj_uevent_env *env ) ;
 874   char *(*devnode)(struct device *dev , umode_t *mode ) ;
 875   void (*release)(struct device *dev ) ;
 876   struct dev_pm_ops  const  *pm ;
 877};
 878#line 476 "include/linux/device.h"
 879struct device_attribute {
 880   struct attribute attr ;
 881   ssize_t (*show)(struct device *dev , struct device_attribute *attr , char *buf ) ;
 882   ssize_t (*store)(struct device *dev , struct device_attribute *attr , char const   *buf ,
 883                    size_t count ) ;
 884};
 885#line 559 "include/linux/device.h"
 886struct device_dma_parameters {
 887   unsigned int max_segment_size ;
 888   unsigned long segment_boundary_mask ;
 889};
 890#line 627
 891struct dma_coherent_mem;
 892#line 627 "include/linux/device.h"
 893struct device {
 894   struct device *parent ;
 895   struct device_private *p ;
 896   struct kobject kobj ;
 897   char const   *init_name ;
 898   struct device_type  const  *type ;
 899   struct mutex mutex ;
 900   struct bus_type *bus ;
 901   struct device_driver *driver ;
 902   void *platform_data ;
 903   struct dev_pm_info power ;
 904   struct dev_pm_domain *pm_domain ;
 905   int numa_node ;
 906   u64 *dma_mask ;
 907   u64 coherent_dma_mask ;
 908   struct device_dma_parameters *dma_parms ;
 909   struct list_head dma_pools ;
 910   struct dma_coherent_mem *dma_mem ;
 911   struct dev_archdata archdata ;
 912   struct device_node *of_node ;
 913   dev_t devt ;
 914   u32 id ;
 915   spinlock_t devres_lock ;
 916   struct list_head devres_head ;
 917   struct klist_node knode_class ;
 918   struct class *class ;
 919   struct attribute_group  const  **groups ;
 920   void (*release)(struct device *dev ) ;
 921};
 922#line 43 "include/linux/pm_wakeup.h"
 923struct wakeup_source {
 924   char const   *name ;
 925   struct list_head entry ;
 926   spinlock_t lock ;
 927   struct timer_list timer ;
 928   unsigned long timer_expires ;
 929   ktime_t total_time ;
 930   ktime_t max_time ;
 931   ktime_t last_time ;
 932   unsigned long event_count ;
 933   unsigned long active_count ;
 934   unsigned long relax_count ;
 935   unsigned long hit_count ;
 936   unsigned int active : 1 ;
 937};
 938#line 12 "include/linux/mod_devicetable.h"
 939typedef unsigned long kernel_ulong_t;
 940#line 219 "include/linux/mod_devicetable.h"
 941struct of_device_id {
 942   char name[32] ;
 943   char type[32] ;
 944   char compatible[128] ;
 945   void *data ;
 946};
 947#line 506 "include/linux/mod_devicetable.h"
 948struct platform_device_id {
 949   char name[20] ;
 950   kernel_ulong_t driver_data  __attribute__((__aligned__(sizeof(kernel_ulong_t )))) ;
 951};
 952#line 17 "include/linux/platform_device.h"
 953struct mfd_cell;
 954#line 17
 955struct mfd_cell;
 956#line 19 "include/linux/platform_device.h"
 957struct platform_device {
 958   char const   *name ;
 959   int id ;
 960   struct device dev ;
 961   u32 num_resources ;
 962   struct resource *resource ;
 963   struct platform_device_id  const  *id_entry ;
 964   struct mfd_cell *mfd_cell ;
 965   struct pdev_archdata archdata ;
 966};
 967#line 164 "include/linux/platform_device.h"
 968struct platform_driver {
 969   int (*probe)(struct platform_device * ) ;
 970   int (*remove)(struct platform_device * ) ;
 971   void (*shutdown)(struct platform_device * ) ;
 972   int (*suspend)(struct platform_device * , pm_message_t state ) ;
 973   int (*resume)(struct platform_device * ) ;
 974   struct device_driver driver ;
 975   struct platform_device_id  const  *id_table ;
 976};
 977#line 20 "include/linux/leds.h"
 978struct device;
 979#line 25
 980enum led_brightness {
 981    LED_OFF = 0,
 982    LED_HALF = 127,
 983    LED_FULL = 255
 984} ;
 985#line 31
 986struct led_trigger;
 987#line 31 "include/linux/leds.h"
 988struct led_classdev {
 989   char const   *name ;
 990   int brightness ;
 991   int max_brightness ;
 992   int flags ;
 993   void (*brightness_set)(struct led_classdev *led_cdev , enum led_brightness brightness ) ;
 994   enum led_brightness (*brightness_get)(struct led_classdev *led_cdev ) ;
 995   int (*blink_set)(struct led_classdev *led_cdev , unsigned long *delay_on , unsigned long *delay_off ) ;
 996   struct device *dev ;
 997   struct list_head node ;
 998   char const   *default_trigger ;
 999   unsigned long blink_delay_on ;
1000   unsigned long blink_delay_off ;
1001   struct timer_list blink_timer ;
1002   int blink_brightness ;
1003   struct rw_semaphore trigger_lock ;
1004   struct led_trigger *trigger ;
1005   struct list_head trig_list ;
1006   void *trigger_data ;
1007};
1008#line 122 "include/linux/leds.h"
1009struct led_trigger {
1010   char const   *name ;
1011   void (*activate)(struct led_classdev *led_cdev ) ;
1012   void (*deactivate)(struct led_classdev *led_cdev ) ;
1013   rwlock_t leddev_list_lock ;
1014   struct list_head led_cdevs ;
1015   struct list_head next_trig ;
1016};
1017#line 19 "include/linux/power_supply.h"
1018struct device;
1019#line 84
1020enum power_supply_property {
1021    POWER_SUPPLY_PROP_STATUS = 0,
1022    POWER_SUPPLY_PROP_CHARGE_TYPE = 1,
1023    POWER_SUPPLY_PROP_HEALTH = 2,
1024    POWER_SUPPLY_PROP_PRESENT = 3,
1025    POWER_SUPPLY_PROP_ONLINE = 4,
1026    POWER_SUPPLY_PROP_TECHNOLOGY = 5,
1027    POWER_SUPPLY_PROP_CYCLE_COUNT = 6,
1028    POWER_SUPPLY_PROP_VOLTAGE_MAX = 7,
1029    POWER_SUPPLY_PROP_VOLTAGE_MIN = 8,
1030    POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN = 9,
1031    POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN = 10,
1032    POWER_SUPPLY_PROP_VOLTAGE_NOW = 11,
1033    POWER_SUPPLY_PROP_VOLTAGE_AVG = 12,
1034    POWER_SUPPLY_PROP_CURRENT_MAX = 13,
1035    POWER_SUPPLY_PROP_CURRENT_NOW = 14,
1036    POWER_SUPPLY_PROP_CURRENT_AVG = 15,
1037    POWER_SUPPLY_PROP_POWER_NOW = 16,
1038    POWER_SUPPLY_PROP_POWER_AVG = 17,
1039    POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN = 18,
1040    POWER_SUPPLY_PROP_CHARGE_EMPTY_DESIGN = 19,
1041    POWER_SUPPLY_PROP_CHARGE_FULL = 20,
1042    POWER_SUPPLY_PROP_CHARGE_EMPTY = 21,
1043    POWER_SUPPLY_PROP_CHARGE_NOW = 22,
1044    POWER_SUPPLY_PROP_CHARGE_AVG = 23,
1045    POWER_SUPPLY_PROP_CHARGE_COUNTER = 24,
1046    POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN = 25,
1047    POWER_SUPPLY_PROP_ENERGY_EMPTY_DESIGN = 26,
1048    POWER_SUPPLY_PROP_ENERGY_FULL = 27,
1049    POWER_SUPPLY_PROP_ENERGY_EMPTY = 28,
1050    POWER_SUPPLY_PROP_ENERGY_NOW = 29,
1051    POWER_SUPPLY_PROP_ENERGY_AVG = 30,
1052    POWER_SUPPLY_PROP_CAPACITY = 31,
1053    POWER_SUPPLY_PROP_CAPACITY_LEVEL = 32,
1054    POWER_SUPPLY_PROP_TEMP = 33,
1055    POWER_SUPPLY_PROP_TEMP_AMBIENT = 34,
1056    POWER_SUPPLY_PROP_TIME_TO_EMPTY_NOW = 35,
1057    POWER_SUPPLY_PROP_TIME_TO_EMPTY_AVG = 36,
1058    POWER_SUPPLY_PROP_TIME_TO_FULL_NOW = 37,
1059    POWER_SUPPLY_PROP_TIME_TO_FULL_AVG = 38,
1060    POWER_SUPPLY_PROP_TYPE = 39,
1061    POWER_SUPPLY_PROP_SCOPE = 40,
1062    POWER_SUPPLY_PROP_MODEL_NAME = 41,
1063    POWER_SUPPLY_PROP_MANUFACTURER = 42,
1064    POWER_SUPPLY_PROP_SERIAL_NUMBER = 43
1065} ;
1066#line 133
1067enum power_supply_type {
1068    POWER_SUPPLY_TYPE_UNKNOWN = 0,
1069    POWER_SUPPLY_TYPE_BATTERY = 1,
1070    POWER_SUPPLY_TYPE_UPS = 2,
1071    POWER_SUPPLY_TYPE_MAINS = 3,
1072    POWER_SUPPLY_TYPE_USB = 4,
1073    POWER_SUPPLY_TYPE_USB_DCP = 5,
1074    POWER_SUPPLY_TYPE_USB_CDP = 6,
1075    POWER_SUPPLY_TYPE_USB_ACA = 7
1076} ;
1077#line 144 "include/linux/power_supply.h"
1078union power_supply_propval {
1079   int intval ;
1080   char const   *strval ;
1081};
1082#line 149 "include/linux/power_supply.h"
1083struct power_supply {
1084   char const   *name ;
1085   enum power_supply_type type ;
1086   enum power_supply_property *properties ;
1087   size_t num_properties ;
1088   char **supplied_to ;
1089   size_t num_supplicants ;
1090   int (*get_property)(struct power_supply *psy , enum power_supply_property psp ,
1091                       union power_supply_propval *val ) ;
1092   int (*set_property)(struct power_supply *psy , enum power_supply_property psp ,
1093                       union power_supply_propval  const  *val ) ;
1094   int (*property_is_writeable)(struct power_supply *psy , enum power_supply_property psp ) ;
1095   void (*external_power_changed)(struct power_supply *psy ) ;
1096   void (*set_charged)(struct power_supply *psy ) ;
1097   int use_for_apm ;
1098   struct device *dev ;
1099   struct work_struct changed_work ;
1100   struct led_trigger *charging_full_trig ;
1101   char *charging_full_trig_name ;
1102   struct led_trigger *charging_trig ;
1103   char *charging_trig_name ;
1104   struct led_trigger *full_trig ;
1105   char *full_trig_name ;
1106   struct led_trigger *online_trig ;
1107   char *online_trig_name ;
1108   struct led_trigger *charging_blink_full_solid_trig ;
1109   char *charging_blink_full_solid_trig_name ;
1110};
1111#line 46 "include/linux/slub_def.h"
1112struct kmem_cache_cpu {
1113   void **freelist ;
1114   unsigned long tid ;
1115   struct page *page ;
1116   struct page *partial ;
1117   int node ;
1118   unsigned int stat[26] ;
1119};
1120#line 57 "include/linux/slub_def.h"
1121struct kmem_cache_node {
1122   spinlock_t list_lock ;
1123   unsigned long nr_partial ;
1124   struct list_head partial ;
1125   atomic_long_t nr_slabs ;
1126   atomic_long_t total_objects ;
1127   struct list_head full ;
1128};
1129#line 73 "include/linux/slub_def.h"
1130struct kmem_cache_order_objects {
1131   unsigned long x ;
1132};
1133#line 80 "include/linux/slub_def.h"
1134struct kmem_cache {
1135   struct kmem_cache_cpu *cpu_slab ;
1136   unsigned long flags ;
1137   unsigned long min_partial ;
1138   int size ;
1139   int objsize ;
1140   int offset ;
1141   int cpu_partial ;
1142   struct kmem_cache_order_objects oo ;
1143   struct kmem_cache_order_objects max ;
1144   struct kmem_cache_order_objects min ;
1145   gfp_t allocflags ;
1146   int refcount ;
1147   void (*ctor)(void * ) ;
1148   int inuse ;
1149   int align ;
1150   int reserved ;
1151   char const   *name ;
1152   struct list_head list ;
1153   struct kobject kobj ;
1154   int remote_node_defrag_ratio ;
1155   struct kmem_cache_node *node[1 << 10] ;
1156};
1157#line 10 "include/linux/irqreturn.h"
1158enum irqreturn {
1159    IRQ_NONE = 0,
1160    IRQ_HANDLED = 1,
1161    IRQ_WAKE_THREAD = 2
1162} ;
1163#line 16 "include/linux/irqreturn.h"
1164typedef enum irqreturn irqreturn_t;
1165#line 32 "include/linux/irq.h"
1166struct module;
1167#line 14 "include/linux/irqdesc.h"
1168struct module;
1169#line 65 "include/linux/profile.h"
1170struct task_struct;
1171#line 94 "/home/zakharov/launch/inst/current/envs/linux-3.4/linux-3.4/arch/x86/include/asm/uaccess.h"
1172struct exception_table_entry {
1173   unsigned long insn ;
1174   unsigned long fixup ;
1175};
1176#line 132 "include/linux/hardirq.h"
1177struct task_struct;
1178#line 187 "include/linux/interrupt.h"
1179struct device;
1180#line 18 "include/linux/regmap.h"
1181struct module;
1182#line 19
1183struct device;
1184#line 22
1185struct regmap;
1186#line 22
1187struct regmap;
1188#line 355 "include/linux/mfd/wm831x/core.h"
1189struct wm831x;
1190#line 355
1191struct wm831x;
1192#line 356
1193enum wm831x_auxadc;
1194#line 356
1195enum wm831x_auxadc;
1196#line 361 "include/linux/mfd/wm831x/core.h"
1197struct wm831x {
1198   struct mutex io_lock ;
1199   struct device *dev ;
1200   struct regmap *regmap ;
1201   int irq ;
1202   struct mutex irq_lock ;
1203   int irq_base ;
1204   int irq_masks_cur[5] ;
1205   int irq_masks_cache[5] ;
1206   bool soft_shutdown ;
1207   unsigned int has_gpio_ena : 1 ;
1208   unsigned int has_cs_sts : 1 ;
1209   unsigned int charger_irq_wake : 1 ;
1210   int num_gpio ;
1211   int gpio_update[16] ;
1212   bool gpio_level[16] ;
1213   struct mutex auxadc_lock ;
1214   struct list_head auxadc_pending ;
1215   u16 auxadc_active ;
1216   int (*auxadc_read)(struct wm831x *wm831x , enum wm831x_auxadc input ) ;
1217   struct mutex key_lock ;
1218   unsigned int locked : 1 ;
1219};
1220#line 198 "include/linux/mfd/wm831x/auxadc.h"
1221enum wm831x_auxadc {
1222    WM831X_AUX_CAL = 15,
1223    WM831X_AUX_BKUP_BATT = 10,
1224    WM831X_AUX_WALL = 9,
1225    WM831X_AUX_BATT = 8,
1226    WM831X_AUX_USB = 7,
1227    WM831X_AUX_SYSVDD = 6,
1228    WM831X_AUX_BATT_TEMP = 5,
1229    WM831X_AUX_CHIP_TEMP = 4,
1230    WM831X_AUX_AUX4 = 3,
1231    WM831X_AUX_AUX3 = 2,
1232    WM831X_AUX_AUX2 = 1,
1233    WM831X_AUX_AUX1 = 0
1234} ;
1235#line 18 "include/linux/mfd/wm831x/pdata.h"
1236struct wm831x;
1237#line 19
1238struct regulator_init_data;
1239#line 19
1240struct regulator_init_data;
1241#line 21 "include/linux/mfd/wm831x/pdata.h"
1242struct wm831x_backlight_pdata {
1243   int isink ;
1244   int max_uA ;
1245};
1246#line 26 "include/linux/mfd/wm831x/pdata.h"
1247struct wm831x_backup_pdata {
1248   int charger_enable ;
1249   int no_constant_voltage ;
1250   int vlim ;
1251   int ilim ;
1252};
1253#line 33 "include/linux/mfd/wm831x/pdata.h"
1254struct wm831x_battery_pdata {
1255   int enable ;
1256   int fast_enable ;
1257   int off_mask ;
1258   int trickle_ilim ;
1259   int vsel ;
1260   int eoc_iterm ;
1261   int fast_ilim ;
1262   int timeout ;
1263};
1264#line 64
1265enum wm831x_status_src {
1266    WM831X_STATUS_PRESERVE = 0,
1267    WM831X_STATUS_OTP = 1,
1268    WM831X_STATUS_POWER = 2,
1269    WM831X_STATUS_CHARGER = 3,
1270    WM831X_STATUS_MANUAL = 4
1271} ;
1272#line 72 "include/linux/mfd/wm831x/pdata.h"
1273struct wm831x_status_pdata {
1274   enum wm831x_status_src default_src ;
1275   char const   *name ;
1276   char const   *default_trigger ;
1277};
1278#line 78 "include/linux/mfd/wm831x/pdata.h"
1279struct wm831x_touch_pdata {
1280   int fivewire ;
1281   int isel ;
1282   int rpu ;
1283   int pressure ;
1284   unsigned int data_irq ;
1285   int data_irqf ;
1286   unsigned int pd_irq ;
1287   int pd_irqf ;
1288};
1289#line 89
1290enum wm831x_watchdog_action {
1291    WM831X_WDOG_NONE = 0,
1292    WM831X_WDOG_INTERRUPT = 1,
1293    WM831X_WDOG_RESET = 2,
1294    WM831X_WDOG_WAKE = 3
1295} ;
1296#line 96 "include/linux/mfd/wm831x/pdata.h"
1297struct wm831x_watchdog_pdata {
1298   enum wm831x_watchdog_action primary ;
1299   enum wm831x_watchdog_action secondary ;
1300   int update_gpio ;
1301   unsigned int software : 1 ;
1302};
1303#line 111 "include/linux/mfd/wm831x/pdata.h"
1304struct wm831x_pdata {
1305   int wm831x_num ;
1306   int (*pre_init)(struct wm831x *wm831x ) ;
1307   int (*post_init)(struct wm831x *wm831x ) ;
1308   bool irq_cmos ;
1309   bool disable_touch ;
1310   bool soft_shutdown ;
1311   int irq_base ;
1312   int gpio_base ;
1313   int gpio_defaults[16] ;
1314   struct wm831x_backlight_pdata *backlight ;
1315   struct wm831x_backup_pdata *backup ;
1316   struct wm831x_battery_pdata *battery ;
1317   struct wm831x_touch_pdata *touch ;
1318   struct wm831x_watchdog_pdata *watchdog ;
1319   struct wm831x_status_pdata *status[2] ;
1320   struct regulator_init_data *dcdc[4] ;
1321   struct regulator_init_data *epe[2] ;
1322   struct regulator_init_data *ldo[11] ;
1323   struct regulator_init_data *isink[2] ;
1324};
1325#line 23 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
1326struct wm831x_power {
1327   struct wm831x *wm831x ;
1328   struct power_supply wall ;
1329   struct power_supply usb ;
1330   struct power_supply battery ;
1331   char wall_name[20] ;
1332   char usb_name[20] ;
1333   char battery_name[20] ;
1334   bool have_battery ;
1335};
1336#line 130 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
1337struct chg_map {
1338   int val ;
1339   int reg_val ;
1340};
1341#line 245 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
1342struct __anonstruct_216 {
1343   int  : 0 ;
1344};
1345#line 250 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
1346struct __anonstruct_217 {
1347   int  : 0 ;
1348};
1349#line 254 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
1350struct __anonstruct_218 {
1351   int  : 0 ;
1352};
1353#line 258 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
1354struct __anonstruct_219 {
1355   int  : 0 ;
1356};
1357#line 262 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
1358struct __anonstruct_220 {
1359   int  : 0 ;
1360};
1361#line 538 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
1362struct __anonstruct_221 {
1363   int  : 0 ;
1364};
1365#line 547 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
1366struct __anonstruct_222 {
1367   int  : 0 ;
1368};
1369#line 561 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
1370struct __anonstruct_223 {
1371   int  : 0 ;
1372};
1373#line 589 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
1374struct __anonstruct_224 {
1375   int  : 0 ;
1376};
1377#line 632 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
1378struct __anonstruct_225 {
1379   int  : 0 ;
1380};
1381#line 1 "<compiler builtins>"
1382long __builtin_expect(long val , long res ) ;
1383#line 49 "include/linux/dynamic_debug.h"
1384extern int ( /* format attribute */  __dynamic_dev_dbg)(struct _ddebug *descriptor ,
1385                                                        struct device  const  *dev ,
1386                                                        char const   *fmt  , ...) ;
1387#line 322 "include/linux/kernel.h"
1388extern int ( /* format attribute */  snprintf)(char *buf , size_t size , char const   *fmt 
1389                                               , ...) ;
1390#line 152 "include/linux/mutex.h"
1391void mutex_lock(struct mutex *lock ) ;
1392#line 153
1393int __attribute__((__warn_unused_result__))  mutex_lock_interruptible(struct mutex *lock ) ;
1394#line 154
1395int __attribute__((__warn_unused_result__))  mutex_lock_killable(struct mutex *lock ) ;
1396#line 168
1397int mutex_trylock(struct mutex *lock ) ;
1398#line 169
1399void mutex_unlock(struct mutex *lock ) ;
1400#line 170
1401int atomic_dec_and_mutex_lock(atomic_t *cnt , struct mutex *lock ) ;
1402#line 67 "include/linux/module.h"
1403int init_module(void) ;
1404#line 68
1405void cleanup_module(void) ;
1406#line 792 "include/linux/device.h"
1407extern void *dev_get_drvdata(struct device  const  *dev ) ;
1408#line 793
1409extern int dev_set_drvdata(struct device *dev , void *data ) ;
1410#line 889
1411extern int ( /* format attribute */  dev_crit)(struct device  const  *dev , char const   *fmt 
1412                                               , ...) ;
1413#line 891
1414extern int ( /* format attribute */  dev_err)(struct device  const  *dev , char const   *fmt 
1415                                              , ...) ;
1416#line 893
1417extern int ( /* format attribute */  dev_warn)(struct device  const  *dev , char const   *fmt 
1418                                               , ...) ;
1419#line 897
1420extern int ( /* format attribute */  _dev_info)(struct device  const  *dev , char const   *fmt 
1421                                                , ...) ;
1422#line 49 "include/linux/platform_device.h"
1423extern int platform_get_irq_byname(struct platform_device * , char const   * ) ;
1424#line 174
1425extern int platform_driver_register(struct platform_driver * ) ;
1426#line 175
1427extern void platform_driver_unregister(struct platform_driver * ) ;
1428#line 183
1429__inline static void *platform_get_drvdata(struct platform_device  const  *pdev )  __attribute__((__no_instrument_function__)) ;
1430#line 183 "include/linux/platform_device.h"
1431__inline static void *platform_get_drvdata(struct platform_device  const  *pdev ) 
1432{ void *tmp ;
1433  unsigned long __cil_tmp3 ;
1434  unsigned long __cil_tmp4 ;
1435  struct device  const  *__cil_tmp5 ;
1436
1437  {
1438  {
1439#line 185
1440  __cil_tmp3 = (unsigned long )pdev;
1441#line 185
1442  __cil_tmp4 = __cil_tmp3 + 16;
1443#line 185
1444  __cil_tmp5 = (struct device  const  *)__cil_tmp4;
1445#line 185
1446  tmp = dev_get_drvdata(__cil_tmp5);
1447  }
1448#line 185
1449  return (tmp);
1450}
1451}
1452#line 188
1453__inline static void platform_set_drvdata(struct platform_device *pdev , void *data )  __attribute__((__no_instrument_function__)) ;
1454#line 188 "include/linux/platform_device.h"
1455__inline static void platform_set_drvdata(struct platform_device *pdev , void *data ) 
1456{ unsigned long __cil_tmp3 ;
1457  unsigned long __cil_tmp4 ;
1458  struct device *__cil_tmp5 ;
1459
1460  {
1461  {
1462#line 190
1463  __cil_tmp3 = (unsigned long )pdev;
1464#line 190
1465  __cil_tmp4 = __cil_tmp3 + 16;
1466#line 190
1467  __cil_tmp5 = (struct device *)__cil_tmp4;
1468#line 190
1469  dev_set_drvdata(__cil_tmp5, data);
1470  }
1471#line 191
1472  return;
1473}
1474}
1475#line 210 "include/linux/power_supply.h"
1476extern void power_supply_changed(struct power_supply *psy ) ;
1477#line 220
1478extern int power_supply_register(struct device *parent , struct power_supply *psy ) ;
1479#line 222
1480extern void power_supply_unregister(struct power_supply *psy ) ;
1481#line 161 "include/linux/slab.h"
1482extern void kfree(void const   * ) ;
1483#line 221 "include/linux/slub_def.h"
1484extern void *__kmalloc(size_t size , gfp_t flags ) ;
1485#line 268
1486__inline static void *( __attribute__((__always_inline__)) kmalloc)(size_t size ,
1487                                                                    gfp_t flags )  __attribute__((__no_instrument_function__)) ;
1488#line 268 "include/linux/slub_def.h"
1489__inline static void *( __attribute__((__always_inline__)) kmalloc)(size_t size ,
1490                                                                    gfp_t flags ) 
1491{ void *tmp___2 ;
1492
1493  {
1494  {
1495#line 283
1496  tmp___2 = __kmalloc(size, flags);
1497  }
1498#line 283
1499  return (tmp___2);
1500}
1501}
1502#line 349 "include/linux/slab.h"
1503__inline static void *kzalloc(size_t size , gfp_t flags )  __attribute__((__no_instrument_function__)) ;
1504#line 349 "include/linux/slab.h"
1505__inline static void *kzalloc(size_t size , gfp_t flags ) 
1506{ void *tmp ;
1507  unsigned int __cil_tmp4 ;
1508
1509  {
1510  {
1511#line 351
1512  __cil_tmp4 = flags | 32768U;
1513#line 351
1514  tmp = kmalloc(size, __cil_tmp4);
1515  }
1516#line 351
1517  return (tmp);
1518}
1519}
1520#line 126 "include/linux/interrupt.h"
1521extern int __attribute__((__warn_unused_result__))  request_threaded_irq(unsigned int irq ,
1522                                                                         irqreturn_t (*handler)(int  ,
1523                                                                                                void * ) ,
1524                                                                         irqreturn_t (*thread_fn)(int  ,
1525                                                                                                  void * ) ,
1526                                                                         unsigned long flags ,
1527                                                                         char const   *name ,
1528                                                                         void *dev ) ;
1529#line 184
1530extern void free_irq(unsigned int  , void * ) ;
1531#line 402 "include/linux/mfd/wm831x/core.h"
1532extern int wm831x_reg_read(struct wm831x *wm831x , unsigned short reg ) ;
1533#line 405
1534extern void wm831x_reg_lock(struct wm831x *wm831x ) ;
1535#line 406
1536extern int wm831x_reg_unlock(struct wm831x *wm831x ) ;
1537#line 407
1538extern int wm831x_set_bits(struct wm831x *wm831x , unsigned short reg , unsigned short mask ,
1539                           unsigned short val ) ;
1540#line 214 "include/linux/mfd/wm831x/auxadc.h"
1541extern int wm831x_auxadc_read_uv(struct wm831x *wm831x , enum wm831x_auxadc input ) ;
1542#line 34 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
1543static int wm831x_power_check_online(struct wm831x *wm831x , int supply , union power_supply_propval *val ) 
1544{ int ret ;
1545
1546  {
1547  {
1548#line 39
1549  ret = wm831x_reg_read(wm831x, (unsigned short)16397);
1550  }
1551#line 40
1552  if (ret < 0) {
1553#line 41
1554    return (ret);
1555  } else {
1556
1557  }
1558#line 43
1559  if (ret & supply) {
1560#line 44
1561    *((int *)val) = 1;
1562  } else {
1563#line 46
1564    *((int *)val) = 0;
1565  }
1566#line 48
1567  return (0);
1568}
1569}
1570#line 51 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
1571static int wm831x_power_read_voltage(struct wm831x *wm831x , enum wm831x_auxadc src ,
1572                                     union power_supply_propval *val ) 
1573{ int ret ;
1574
1575  {
1576  {
1577#line 57
1578  ret = wm831x_auxadc_read_uv(wm831x, src);
1579  }
1580#line 58
1581  if (ret >= 0) {
1582#line 59
1583    *((int *)val) = ret;
1584  } else {
1585
1586  }
1587#line 61
1588  return (ret);
1589}
1590}
1591#line 67 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
1592static int wm831x_wall_get_prop(struct power_supply *psy , enum power_supply_property psp ,
1593                                union power_supply_propval *val ) 
1594{ struct wm831x_power *wm831x_power ;
1595  void *tmp ;
1596  struct wm831x *wm831x ;
1597  int ret ;
1598  unsigned long __cil_tmp8 ;
1599  unsigned long __cil_tmp9 ;
1600  struct device *__cil_tmp10 ;
1601  struct device *__cil_tmp11 ;
1602  struct device  const  *__cil_tmp12 ;
1603  enum wm831x_auxadc __cil_tmp13 ;
1604
1605  {
1606  {
1607#line 71
1608  __cil_tmp8 = (unsigned long )psy;
1609#line 71
1610  __cil_tmp9 = __cil_tmp8 + 96;
1611#line 71
1612  __cil_tmp10 = *((struct device **)__cil_tmp9);
1613#line 71
1614  __cil_tmp11 = *((struct device **)__cil_tmp10);
1615#line 71
1616  __cil_tmp12 = (struct device  const  *)__cil_tmp11;
1617#line 71
1618  tmp = dev_get_drvdata(__cil_tmp12);
1619#line 71
1620  wm831x_power = (struct wm831x_power *)tmp;
1621#line 72
1622  wm831x = *((struct wm831x **)wm831x_power);
1623#line 73
1624  ret = 0;
1625  }
1626#line 76
1627  if ((int )psp == 4) {
1628#line 76
1629    goto case_4;
1630  } else
1631#line 79
1632  if ((int )psp == 11) {
1633#line 79
1634    goto case_11;
1635  } else {
1636    {
1637#line 82
1638    goto switch_default;
1639#line 75
1640    if (0) {
1641      case_4: /* CIL Label */ 
1642      {
1643#line 77
1644      ret = wm831x_power_check_online(wm831x, 512, val);
1645      }
1646#line 78
1647      goto switch_break;
1648      case_11: /* CIL Label */ 
1649      {
1650#line 80
1651      __cil_tmp13 = (enum wm831x_auxadc )9;
1652#line 80
1653      ret = wm831x_power_read_voltage(wm831x, __cil_tmp13, val);
1654      }
1655#line 81
1656      goto switch_break;
1657      switch_default: /* CIL Label */ 
1658#line 83
1659      ret = -22;
1660#line 84
1661      goto switch_break;
1662    } else {
1663      switch_break: /* CIL Label */ ;
1664    }
1665    }
1666  }
1667#line 87
1668  return (ret);
1669}
1670}
1671#line 90 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
1672static enum power_supply_property wm831x_wall_props[2]  = {      (enum power_supply_property )4,      (enum power_supply_property )11};
1673#line 98 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
1674static int wm831x_usb_get_prop(struct power_supply *psy , enum power_supply_property psp ,
1675                               union power_supply_propval *val ) 
1676{ struct wm831x_power *wm831x_power ;
1677  void *tmp ;
1678  struct wm831x *wm831x ;
1679  int ret ;
1680  unsigned long __cil_tmp8 ;
1681  unsigned long __cil_tmp9 ;
1682  struct device *__cil_tmp10 ;
1683  struct device *__cil_tmp11 ;
1684  struct device  const  *__cil_tmp12 ;
1685  enum wm831x_auxadc __cil_tmp13 ;
1686
1687  {
1688  {
1689#line 102
1690  __cil_tmp8 = (unsigned long )psy;
1691#line 102
1692  __cil_tmp9 = __cil_tmp8 + 96;
1693#line 102
1694  __cil_tmp10 = *((struct device **)__cil_tmp9);
1695#line 102
1696  __cil_tmp11 = *((struct device **)__cil_tmp10);
1697#line 102
1698  __cil_tmp12 = (struct device  const  *)__cil_tmp11;
1699#line 102
1700  tmp = dev_get_drvdata(__cil_tmp12);
1701#line 102
1702  wm831x_power = (struct wm831x_power *)tmp;
1703#line 103
1704  wm831x = *((struct wm831x **)wm831x_power);
1705#line 104
1706  ret = 0;
1707  }
1708#line 107
1709  if ((int )psp == 4) {
1710#line 107
1711    goto case_4;
1712  } else
1713#line 110
1714  if ((int )psp == 11) {
1715#line 110
1716    goto case_11;
1717  } else {
1718    {
1719#line 113
1720    goto switch_default;
1721#line 106
1722    if (0) {
1723      case_4: /* CIL Label */ 
1724      {
1725#line 108
1726      ret = wm831x_power_check_online(wm831x, 256, val);
1727      }
1728#line 109
1729      goto switch_break;
1730      case_11: /* CIL Label */ 
1731      {
1732#line 111
1733      __cil_tmp13 = (enum wm831x_auxadc )7;
1734#line 111
1735      ret = wm831x_power_read_voltage(wm831x, __cil_tmp13, val);
1736      }
1737#line 112
1738      goto switch_break;
1739      switch_default: /* CIL Label */ 
1740#line 114
1741      ret = -22;
1742#line 115
1743      goto switch_break;
1744    } else {
1745      switch_break: /* CIL Label */ ;
1746    }
1747    }
1748  }
1749#line 118
1750  return (ret);
1751}
1752}
1753#line 121 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
1754static enum power_supply_property wm831x_usb_props[2]  = {      (enum power_supply_property )4,      (enum power_supply_property )11};
1755#line 135 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
1756static struct chg_map trickle_ilims[4]  = {      {50, 0}, 
1757        {100, 1 << 6}, 
1758        {150, 2 << 6}, 
1759        {200, 3 << 6}};
1760#line 142 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
1761static struct chg_map vsels[4]  = {      {4050, 0}, 
1762        {4100, 1 << 4}, 
1763        {4150, 2 << 4}, 
1764        {4200, 3 << 4}};
1765#line 149 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
1766static struct chg_map fast_ilims[16]  = 
1767#line 149
1768  {      {0, 0}, 
1769        {50, 1}, 
1770        {100, 2}, 
1771        {150, 3}, 
1772        {200, 4}, 
1773        {250, 5}, 
1774        {300, 6}, 
1775        {350, 7}, 
1776        {400, 8}, 
1777        {450, 9}, 
1778        {500, 10}, 
1779        {600, 11}, 
1780        {700, 12}, 
1781        {800, 13}, 
1782        {900, 14}, 
1783        {1000, 15}};
1784#line 168 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
1785static struct chg_map eoc_iterms[8]  = 
1786#line 168
1787  {      {20, 0}, 
1788        {30, 1 << 10}, 
1789        {40, 2 << 10}, 
1790        {50, 3 << 10}, 
1791        {60, 4 << 10}, 
1792        {70, 5 << 10}, 
1793        {80, 6 << 10}, 
1794        {90, 7 << 10}};
1795#line 179 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
1796static struct chg_map chg_times[16]  = 
1797#line 179
1798  {      {60, 0}, 
1799        {90, 1 << 8}, 
1800        {120, 2 << 8}, 
1801        {150, 3 << 8}, 
1802        {180, 4 << 8}, 
1803        {210, 5 << 8}, 
1804        {240, 6 << 8}, 
1805        {270, 7 << 8}, 
1806        {300, 8 << 8}, 
1807        {330, 9 << 8}, 
1808        {360, 10 << 8}, 
1809        {390, 11 << 8}, 
1810        {420, 12 << 8}, 
1811        {450, 13 << 8}, 
1812        {480, 14 << 8}, 
1813        {510, 15 << 8}};
1814#line 213
1815static void wm831x_battey_apply_config(struct wm831x *wm831x , struct chg_map *map ,
1816                                       int count , int val , int *reg , char const   *name ,
1817                                       char const   *units ) ;
1818#line 213 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
1819static struct _ddebug  __attribute__((__aligned__(8))) descriptor  __attribute__((__used__,
1820__section__("__verbose")))  =    {"wm831x_power", "wm831x_battey_apply_config", "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c",
1821    "Set %s of %d%s\n", 213U, 1U};
1822#line 198 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
1823static void wm831x_battey_apply_config(struct wm831x *wm831x , struct chg_map *map ,
1824                                       int count , int val , int *reg , char const   *name ,
1825                                       char const   *units ) 
1826{ int i ;
1827  long tmp ;
1828  struct chg_map *__cil_tmp10 ;
1829  int __cil_tmp11 ;
1830  unsigned long __cil_tmp12 ;
1831  unsigned long __cil_tmp13 ;
1832  struct device *__cil_tmp14 ;
1833  struct device  const  *__cil_tmp15 ;
1834  struct chg_map *__cil_tmp16 ;
1835  unsigned long __cil_tmp17 ;
1836  unsigned long __cil_tmp18 ;
1837  int __cil_tmp19 ;
1838  int __cil_tmp20 ;
1839  struct _ddebug  __attribute__((__aligned__(8))) *__cil_tmp21 ;
1840  unsigned int __cil_tmp22 ;
1841  unsigned int __cil_tmp23 ;
1842  int __cil_tmp24 ;
1843  int __cil_tmp25 ;
1844  long __cil_tmp26 ;
1845  unsigned long __cil_tmp27 ;
1846  unsigned long __cil_tmp28 ;
1847  struct device *__cil_tmp29 ;
1848  struct device  const  *__cil_tmp30 ;
1849
1850  {
1851#line 205
1852  i = 0;
1853  {
1854#line 205
1855  while (1) {
1856    while_continue: /* CIL Label */ ;
1857#line 205
1858    if (i < count) {
1859
1860    } else {
1861#line 205
1862      goto while_break;
1863    }
1864    {
1865#line 206
1866    __cil_tmp10 = map + i;
1867#line 206
1868    __cil_tmp11 = *((int *)__cil_tmp10);
1869#line 206
1870    if (val == __cil_tmp11) {
1871#line 207
1872      goto while_break;
1873    } else {
1874
1875    }
1876    }
1877#line 205
1878    i = i + 1;
1879  }
1880  while_break: /* CIL Label */ ;
1881  }
1882#line 208
1883  if (i == count) {
1884    {
1885#line 209
1886    __cil_tmp12 = (unsigned long )wm831x;
1887#line 209
1888    __cil_tmp13 = __cil_tmp12 + 72;
1889#line 209
1890    __cil_tmp14 = *((struct device **)__cil_tmp13);
1891#line 209
1892    __cil_tmp15 = (struct device  const  *)__cil_tmp14;
1893#line 209
1894    dev_err(__cil_tmp15, "Invalid %s %d%s\n", name, val, units);
1895    }
1896  } else {
1897#line 212
1898    __cil_tmp16 = map + i;
1899#line 212
1900    __cil_tmp17 = (unsigned long )__cil_tmp16;
1901#line 212
1902    __cil_tmp18 = __cil_tmp17 + 4;
1903#line 212
1904    __cil_tmp19 = *((int *)__cil_tmp18);
1905#line 212
1906    __cil_tmp20 = *reg;
1907#line 212
1908    *reg = __cil_tmp20 | __cil_tmp19;
1909    {
1910#line 213
1911    while (1) {
1912      while_continue___0: /* CIL Label */ ;
1913      {
1914#line 213
1915      while (1) {
1916        while_continue___1: /* CIL Label */ ;
1917        {
1918#line 213
1919        __cil_tmp21 = & descriptor;
1920#line 213
1921        __cil_tmp22 = __cil_tmp21->flags;
1922#line 213
1923        __cil_tmp23 = __cil_tmp22 & 1U;
1924#line 213
1925        __cil_tmp24 = ! __cil_tmp23;
1926#line 213
1927        __cil_tmp25 = ! __cil_tmp24;
1928#line 213
1929        __cil_tmp26 = (long )__cil_tmp25;
1930#line 213
1931        tmp = __builtin_expect(__cil_tmp26, 0L);
1932        }
1933#line 213
1934        if (tmp) {
1935          {
1936#line 213
1937          __cil_tmp27 = (unsigned long )wm831x;
1938#line 213
1939          __cil_tmp28 = __cil_tmp27 + 72;
1940#line 213
1941          __cil_tmp29 = *((struct device **)__cil_tmp28);
1942#line 213
1943          __cil_tmp30 = (struct device  const  *)__cil_tmp29;
1944#line 213
1945          __dynamic_dev_dbg(& descriptor, __cil_tmp30, "Set %s of %d%s\n", name, val,
1946                            units);
1947          }
1948        } else {
1949
1950        }
1951#line 213
1952        goto while_break___1;
1953      }
1954      while_break___1: /* CIL Label */ ;
1955      }
1956#line 213
1957      goto while_break___0;
1958    }
1959    while_break___0: /* CIL Label */ ;
1960    }
1961  }
1962#line 215
1963  return;
1964}
1965}
1966#line 217 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
1967static void wm831x_config_battery(struct wm831x *wm831x ) 
1968{ struct wm831x_pdata *wm831x_pdata ;
1969  struct wm831x_battery_pdata *pdata ;
1970  int ret ;
1971  int reg1 ;
1972  int reg2 ;
1973  unsigned long __cil_tmp7 ;
1974  unsigned long __cil_tmp8 ;
1975  struct device *__cil_tmp9 ;
1976  unsigned long __cil_tmp10 ;
1977  unsigned long __cil_tmp11 ;
1978  void *__cil_tmp12 ;
1979  unsigned long __cil_tmp13 ;
1980  unsigned long __cil_tmp14 ;
1981  struct device *__cil_tmp15 ;
1982  struct device  const  *__cil_tmp16 ;
1983  unsigned long __cil_tmp17 ;
1984  unsigned long __cil_tmp18 ;
1985  struct wm831x_battery_pdata *__cil_tmp19 ;
1986  unsigned long __cil_tmp20 ;
1987  unsigned long __cil_tmp21 ;
1988  struct device *__cil_tmp22 ;
1989  struct device  const  *__cil_tmp23 ;
1990  unsigned long __cil_tmp24 ;
1991  unsigned long __cil_tmp25 ;
1992  int *__cil_tmp26 ;
1993  int *__cil_tmp27 ;
1994  int __cil_tmp28 ;
1995  unsigned long __cil_tmp29 ;
1996  unsigned long __cil_tmp30 ;
1997  struct device *__cil_tmp31 ;
1998  struct device  const  *__cil_tmp32 ;
1999  int *__cil_tmp33 ;
2000  int *__cil_tmp34 ;
2001  int __cil_tmp35 ;
2002  unsigned long __cil_tmp36 ;
2003  unsigned long __cil_tmp37 ;
2004  int *__cil_tmp38 ;
2005  int *__cil_tmp39 ;
2006  int __cil_tmp40 ;
2007  unsigned long __cil_tmp41 ;
2008  unsigned long __cil_tmp42 ;
2009  int *__cil_tmp43 ;
2010  int *__cil_tmp44 ;
2011  int __cil_tmp45 ;
2012  unsigned long __cil_tmp46 ;
2013  unsigned long __cil_tmp47 ;
2014  struct chg_map *__cil_tmp48 ;
2015  unsigned long __cil_tmp49 ;
2016  unsigned long __cil_tmp50 ;
2017  int __cil_tmp51 ;
2018  unsigned long __cil_tmp52 ;
2019  unsigned long __cil_tmp53 ;
2020  int __cil_tmp54 ;
2021  unsigned long __cil_tmp55 ;
2022  unsigned long __cil_tmp56 ;
2023  struct chg_map *__cil_tmp57 ;
2024  unsigned long __cil_tmp58 ;
2025  unsigned long __cil_tmp59 ;
2026  int __cil_tmp60 ;
2027  unsigned long __cil_tmp61 ;
2028  unsigned long __cil_tmp62 ;
2029  int __cil_tmp63 ;
2030  unsigned long __cil_tmp64 ;
2031  unsigned long __cil_tmp65 ;
2032  struct chg_map *__cil_tmp66 ;
2033  unsigned long __cil_tmp67 ;
2034  unsigned long __cil_tmp68 ;
2035  int __cil_tmp69 ;
2036  unsigned long __cil_tmp70 ;
2037  unsigned long __cil_tmp71 ;
2038  int __cil_tmp72 ;
2039  unsigned long __cil_tmp73 ;
2040  unsigned long __cil_tmp74 ;
2041  struct chg_map *__cil_tmp75 ;
2042  unsigned long __cil_tmp76 ;
2043  unsigned long __cil_tmp77 ;
2044  int __cil_tmp78 ;
2045  unsigned long __cil_tmp79 ;
2046  unsigned long __cil_tmp80 ;
2047  int __cil_tmp81 ;
2048  unsigned long __cil_tmp82 ;
2049  unsigned long __cil_tmp83 ;
2050  struct chg_map *__cil_tmp84 ;
2051  unsigned long __cil_tmp85 ;
2052  unsigned long __cil_tmp86 ;
2053  int __cil_tmp87 ;
2054  unsigned long __cil_tmp88 ;
2055  unsigned long __cil_tmp89 ;
2056  int __cil_tmp90 ;
2057  unsigned long __cil_tmp91 ;
2058  unsigned long __cil_tmp92 ;
2059  struct device *__cil_tmp93 ;
2060  struct device  const  *__cil_tmp94 ;
2061  int *__cil_tmp95 ;
2062  int __cil_tmp96 ;
2063  unsigned short __cil_tmp97 ;
2064  unsigned long __cil_tmp98 ;
2065  unsigned long __cil_tmp99 ;
2066  struct device *__cil_tmp100 ;
2067  struct device  const  *__cil_tmp101 ;
2068  int *__cil_tmp102 ;
2069  int __cil_tmp103 ;
2070  unsigned short __cil_tmp104 ;
2071  unsigned long __cil_tmp105 ;
2072  unsigned long __cil_tmp106 ;
2073  struct device *__cil_tmp107 ;
2074  struct device  const  *__cil_tmp108 ;
2075
2076  {
2077#line 219
2078  __cil_tmp7 = (unsigned long )wm831x;
2079#line 219
2080  __cil_tmp8 = __cil_tmp7 + 72;
2081#line 219
2082  __cil_tmp9 = *((struct device **)__cil_tmp8);
2083#line 219
2084  __cil_tmp10 = (unsigned long )__cil_tmp9;
2085#line 219
2086  __cil_tmp11 = __cil_tmp10 + 184;
2087#line 219
2088  __cil_tmp12 = *((void **)__cil_tmp11);
2089#line 219
2090  wm831x_pdata = (struct wm831x_pdata *)__cil_tmp12;
2091#line 223
2092  if (! wm831x_pdata) {
2093    {
2094#line 224
2095    __cil_tmp13 = (unsigned long )wm831x;
2096#line 224
2097    __cil_tmp14 = __cil_tmp13 + 72;
2098#line 224
2099    __cil_tmp15 = *((struct device **)__cil_tmp14);
2100#line 224
2101    __cil_tmp16 = (struct device  const  *)__cil_tmp15;
2102#line 224
2103    dev_warn(__cil_tmp16, "No battery charger configuration\n");
2104    }
2105#line 226
2106    return;
2107  } else {
2108    {
2109#line 223
2110    __cil_tmp17 = (unsigned long )wm831x_pdata;
2111#line 223
2112    __cil_tmp18 = __cil_tmp17 + 120;
2113#line 223
2114    __cil_tmp19 = *((struct wm831x_battery_pdata **)__cil_tmp18);
2115#line 223
2116    if (! __cil_tmp19) {
2117      {
2118#line 224
2119      __cil_tmp20 = (unsigned long )wm831x;
2120#line 224
2121      __cil_tmp21 = __cil_tmp20 + 72;
2122#line 224
2123      __cil_tmp22 = *((struct device **)__cil_tmp21);
2124#line 224
2125      __cil_tmp23 = (struct device  const  *)__cil_tmp22;
2126#line 224
2127      dev_warn(__cil_tmp23, "No battery charger configuration\n");
2128      }
2129#line 226
2130      return;
2131    } else {
2132
2133    }
2134    }
2135  }
2136#line 229
2137  __cil_tmp24 = (unsigned long )wm831x_pdata;
2138#line 229
2139  __cil_tmp25 = __cil_tmp24 + 120;
2140#line 229
2141  pdata = *((struct wm831x_battery_pdata **)__cil_tmp25);
2142#line 231
2143  __cil_tmp26 = & reg1;
2144#line 231
2145  *__cil_tmp26 = 0;
2146#line 232
2147  __cil_tmp27 = & reg2;
2148#line 232
2149  *__cil_tmp27 = 0;
2150  {
2151#line 234
2152  __cil_tmp28 = *((int *)pdata);
2153#line 234
2154  if (! __cil_tmp28) {
2155    {
2156#line 235
2157    __cil_tmp29 = (unsigned long )wm831x;
2158#line 235
2159    __cil_tmp30 = __cil_tmp29 + 72;
2160#line 235
2161    __cil_tmp31 = *((struct device **)__cil_tmp30);
2162#line 235
2163    __cil_tmp32 = (struct device  const  *)__cil_tmp31;
2164#line 235
2165    _dev_info(__cil_tmp32, "Battery charger disabled\n");
2166    }
2167#line 236
2168    return;
2169  } else {
2170
2171  }
2172  }
2173#line 239
2174  __cil_tmp33 = & reg1;
2175#line 239
2176  __cil_tmp34 = & reg1;
2177#line 239
2178  __cil_tmp35 = *__cil_tmp34;
2179#line 239
2180  *__cil_tmp33 = __cil_tmp35 | 32768;
2181  {
2182#line 240
2183  __cil_tmp36 = (unsigned long )pdata;
2184#line 240
2185  __cil_tmp37 = __cil_tmp36 + 8;
2186#line 240
2187  if (*((int *)__cil_tmp37)) {
2188#line 241
2189    __cil_tmp38 = & reg2;
2190#line 241
2191    __cil_tmp39 = & reg2;
2192#line 241
2193    __cil_tmp40 = *__cil_tmp39;
2194#line 241
2195    *__cil_tmp38 = __cil_tmp40 | 16384;
2196  } else {
2197
2198  }
2199  }
2200  {
2201#line 242
2202  __cil_tmp41 = (unsigned long )pdata;
2203#line 242
2204  __cil_tmp42 = __cil_tmp41 + 4;
2205#line 242
2206  if (*((int *)__cil_tmp42)) {
2207#line 243
2208    __cil_tmp43 = & reg1;
2209#line 243
2210    __cil_tmp44 = & reg1;
2211#line 243
2212    __cil_tmp45 = *__cil_tmp44;
2213#line 243
2214    *__cil_tmp43 = __cil_tmp45 | 32;
2215  } else {
2216
2217  }
2218  }
2219  {
2220#line 245
2221  __cil_tmp46 = 0 * 8UL;
2222#line 245
2223  __cil_tmp47 = (unsigned long )(trickle_ilims) + __cil_tmp46;
2224#line 245
2225  __cil_tmp48 = (struct chg_map *)__cil_tmp47;
2226#line 245
2227  __cil_tmp49 = 32UL / 8UL;
2228#line 245
2229  __cil_tmp50 = __cil_tmp49 + 0UL;
2230#line 245
2231  __cil_tmp51 = (int )__cil_tmp50;
2232#line 245
2233  __cil_tmp52 = (unsigned long )pdata;
2234#line 245
2235  __cil_tmp53 = __cil_tmp52 + 12;
2236#line 245
2237  __cil_tmp54 = *((int *)__cil_tmp53);
2238#line 245
2239  wm831x_battey_apply_config(wm831x, __cil_tmp48, __cil_tmp51, __cil_tmp54, & reg2,
2240                             "trickle charge current limit", "mA");
2241#line 250
2242  __cil_tmp55 = 0 * 8UL;
2243#line 250
2244  __cil_tmp56 = (unsigned long )(vsels) + __cil_tmp55;
2245#line 250
2246  __cil_tmp57 = (struct chg_map *)__cil_tmp56;
2247#line 250
2248  __cil_tmp58 = 32UL / 8UL;
2249#line 250
2250  __cil_tmp59 = __cil_tmp58 + 0UL;
2251#line 250
2252  __cil_tmp60 = (int )__cil_tmp59;
2253#line 250
2254  __cil_tmp61 = (unsigned long )pdata;
2255#line 250
2256  __cil_tmp62 = __cil_tmp61 + 16;
2257#line 250
2258  __cil_tmp63 = *((int *)__cil_tmp62);
2259#line 250
2260  wm831x_battey_apply_config(wm831x, __cil_tmp57, __cil_tmp60, __cil_tmp63, & reg2,
2261                             "target voltage", "mV");
2262#line 254
2263  __cil_tmp64 = 0 * 8UL;
2264#line 254
2265  __cil_tmp65 = (unsigned long )(fast_ilims) + __cil_tmp64;
2266#line 254
2267  __cil_tmp66 = (struct chg_map *)__cil_tmp65;
2268#line 254
2269  __cil_tmp67 = 128UL / 8UL;
2270#line 254
2271  __cil_tmp68 = __cil_tmp67 + 0UL;
2272#line 254
2273  __cil_tmp69 = (int )__cil_tmp68;
2274#line 254
2275  __cil_tmp70 = (unsigned long )pdata;
2276#line 254
2277  __cil_tmp71 = __cil_tmp70 + 24;
2278#line 254
2279  __cil_tmp72 = *((int *)__cil_tmp71);
2280#line 254
2281  wm831x_battey_apply_config(wm831x, __cil_tmp66, __cil_tmp69, __cil_tmp72, & reg2,
2282                             "fast charge current limit", "mA");
2283#line 258
2284  __cil_tmp73 = 0 * 8UL;
2285#line 258
2286  __cil_tmp74 = (unsigned long )(eoc_iterms) + __cil_tmp73;
2287#line 258
2288  __cil_tmp75 = (struct chg_map *)__cil_tmp74;
2289#line 258
2290  __cil_tmp76 = 64UL / 8UL;
2291#line 258
2292  __cil_tmp77 = __cil_tmp76 + 0UL;
2293#line 258
2294  __cil_tmp78 = (int )__cil_tmp77;
2295#line 258
2296  __cil_tmp79 = (unsigned long )pdata;
2297#line 258
2298  __cil_tmp80 = __cil_tmp79 + 20;
2299#line 258
2300  __cil_tmp81 = *((int *)__cil_tmp80);
2301#line 258
2302  wm831x_battey_apply_config(wm831x, __cil_tmp75, __cil_tmp78, __cil_tmp81, & reg1,
2303                             "end of charge current threshold", "mA");
2304#line 262
2305  __cil_tmp82 = 0 * 8UL;
2306#line 262
2307  __cil_tmp83 = (unsigned long )(chg_times) + __cil_tmp82;
2308#line 262
2309  __cil_tmp84 = (struct chg_map *)__cil_tmp83;
2310#line 262
2311  __cil_tmp85 = 128UL / 8UL;
2312#line 262
2313  __cil_tmp86 = __cil_tmp85 + 0UL;
2314#line 262
2315  __cil_tmp87 = (int )__cil_tmp86;
2316#line 262
2317  __cil_tmp88 = (unsigned long )pdata;
2318#line 262
2319  __cil_tmp89 = __cil_tmp88 + 28;
2320#line 262
2321  __cil_tmp90 = *((int *)__cil_tmp89);
2322#line 262
2323  wm831x_battey_apply_config(wm831x, __cil_tmp84, __cil_tmp87, __cil_tmp90, & reg2,
2324                             "charger timeout", "min");
2325#line 266
2326  ret = wm831x_reg_unlock(wm831x);
2327  }
2328#line 267
2329  if (ret != 0) {
2330    {
2331#line 268
2332    __cil_tmp91 = (unsigned long )wm831x;
2333#line 268
2334    __cil_tmp92 = __cil_tmp91 + 72;
2335#line 268
2336    __cil_tmp93 = *((struct device **)__cil_tmp92);
2337#line 268
2338    __cil_tmp94 = (struct device  const  *)__cil_tmp93;
2339#line 268
2340    dev_err(__cil_tmp94, "Failed to unlock registers: %d\n", ret);
2341    }
2342#line 269
2343    return;
2344  } else {
2345
2346  }
2347  {
2348#line 272
2349  __cil_tmp95 = & reg1;
2350#line 272
2351  __cil_tmp96 = *__cil_tmp95;
2352#line 272
2353  __cil_tmp97 = (unsigned short )__cil_tmp96;
2354#line 272
2355  ret = wm831x_set_bits(wm831x, (unsigned short)16456, (unsigned short)39968, __cil_tmp97);
2356  }
2357#line 277
2358  if (ret != 0) {
2359    {
2360#line 278
2361    __cil_tmp98 = (unsigned long )wm831x;
2362#line 278
2363    __cil_tmp99 = __cil_tmp98 + 72;
2364#line 278
2365    __cil_tmp100 = *((struct device **)__cil_tmp99);
2366#line 278
2367    __cil_tmp101 = (struct device  const  *)__cil_tmp100;
2368#line 278
2369    dev_err(__cil_tmp101, "Failed to set charger control 1: %d\n", ret);
2370    }
2371  } else {
2372
2373  }
2374  {
2375#line 281
2376  __cil_tmp102 = & reg2;
2377#line 281
2378  __cil_tmp103 = *__cil_tmp102;
2379#line 281
2380  __cil_tmp104 = (unsigned short )__cil_tmp103;
2381#line 281
2382  ret = wm831x_set_bits(wm831x, (unsigned short)16457, (unsigned short)20479, __cil_tmp104);
2383  }
2384#line 288
2385  if (ret != 0) {
2386    {
2387#line 289
2388    __cil_tmp105 = (unsigned long )wm831x;
2389#line 289
2390    __cil_tmp106 = __cil_tmp105 + 72;
2391#line 289
2392    __cil_tmp107 = *((struct device **)__cil_tmp106);
2393#line 289
2394    __cil_tmp108 = (struct device  const  *)__cil_tmp107;
2395#line 289
2396    dev_err(__cil_tmp108, "Failed to set charger control 2: %d\n", ret);
2397    }
2398  } else {
2399
2400  }
2401  {
2402#line 292
2403  wm831x_reg_lock(wm831x);
2404  }
2405#line 293
2406  return;
2407}
2408}
2409#line 295 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
2410static int wm831x_bat_check_status(struct wm831x *wm831x , int *status ) 
2411{ int ret ;
2412
2413  {
2414  {
2415#line 299
2416  ret = wm831x_reg_read(wm831x, (unsigned short)16397);
2417  }
2418#line 300
2419  if (ret < 0) {
2420#line 301
2421    return (ret);
2422  } else {
2423
2424  }
2425#line 303
2426  if (ret & 1024) {
2427#line 304
2428    *status = 2;
2429#line 305
2430    return (0);
2431  } else {
2432
2433  }
2434  {
2435#line 308
2436  ret = wm831x_reg_read(wm831x, (unsigned short)16458);
2437  }
2438#line 309
2439  if (ret < 0) {
2440#line 310
2441    return (ret);
2442  } else {
2443
2444  }
2445#line 313
2446  if ((ret & 28672) == 0) {
2447#line 313
2448    goto case_0;
2449  } else
2450#line 316
2451  if ((ret & 28672) == 1 << 12) {
2452#line 316
2453    goto case_exp;
2454  } else
2455#line 317
2456  if ((ret & 28672) == 2 << 12) {
2457#line 317
2458    goto case_exp;
2459  } else {
2460    {
2461#line 321
2462    goto switch_default;
2463#line 312
2464    if (0) {
2465      case_0: /* CIL Label */ 
2466#line 314
2467      *status = 3;
2468#line 315
2469      goto switch_break;
2470      case_exp: /* CIL Label */ 
2471      case_exp___0: /* CIL Label */ 
2472#line 318
2473      *status = 1;
2474#line 319
2475      goto switch_break;
2476      switch_default: /* CIL Label */ 
2477#line 322
2478      *status = 0;
2479#line 323
2480      goto switch_break;
2481    } else {
2482      switch_break: /* CIL Label */ ;
2483    }
2484    }
2485  }
2486#line 326
2487  return (0);
2488}
2489}
2490#line 329 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
2491static int wm831x_bat_check_type(struct wm831x *wm831x , int *type ) 
2492{ int ret ;
2493
2494  {
2495  {
2496#line 333
2497  ret = wm831x_reg_read(wm831x, (unsigned short)16458);
2498  }
2499#line 334
2500  if (ret < 0) {
2501#line 335
2502    return (ret);
2503  } else {
2504
2505  }
2506#line 338
2507  if ((ret & 28672) == 1 << 12) {
2508#line 338
2509    goto case_exp;
2510  } else
2511#line 339
2512  if ((ret & 28672) == 3 << 12) {
2513#line 339
2514    goto case_exp;
2515  } else
2516#line 342
2517  if ((ret & 28672) == 2 << 12) {
2518#line 342
2519    goto case_exp___1;
2520  } else
2521#line 343
2522  if ((ret & 28672) == 4 << 12) {
2523#line 343
2524    goto case_exp___1;
2525  } else {
2526    {
2527#line 346
2528    goto switch_default;
2529#line 337
2530    if (0) {
2531      case_exp: /* CIL Label */ 
2532      case_exp___0: /* CIL Label */ 
2533#line 340
2534      *type = 2;
2535#line 341
2536      goto switch_break;
2537      case_exp___1: /* CIL Label */ 
2538      case_exp___2: /* CIL Label */ 
2539#line 344
2540      *type = 3;
2541#line 345
2542      goto switch_break;
2543      switch_default: /* CIL Label */ 
2544#line 347
2545      *type = 1;
2546#line 348
2547      goto switch_break;
2548    } else {
2549      switch_break: /* CIL Label */ ;
2550    }
2551    }
2552  }
2553#line 351
2554  return (0);
2555}
2556}
2557#line 354 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
2558static int wm831x_bat_check_health(struct wm831x *wm831x , int *health ) 
2559{ int ret ;
2560
2561  {
2562  {
2563#line 358
2564  ret = wm831x_reg_read(wm831x, (unsigned short)16458);
2565  }
2566#line 359
2567  if (ret < 0) {
2568#line 360
2569    return (ret);
2570  } else {
2571
2572  }
2573#line 362
2574  if (ret & 2048) {
2575#line 363
2576    *health = 2;
2577#line 364
2578    return (0);
2579  } else {
2580
2581  }
2582#line 367
2583  if (ret & 1024) {
2584#line 368
2585    *health = 6;
2586#line 369
2587    return (0);
2588  } else {
2589
2590  }
2591#line 372
2592  if (ret & 32768) {
2593#line 373
2594    *health = 4;
2595#line 374
2596    return (0);
2597  } else {
2598
2599  }
2600#line 378
2601  if ((ret & 28672) == 3 << 12) {
2602#line 378
2603    goto case_exp;
2604  } else
2605#line 379
2606  if ((ret & 28672) == 4 << 12) {
2607#line 379
2608    goto case_exp;
2609  } else
2610#line 382
2611  if ((ret & 28672) == 5 << 12) {
2612#line 382
2613    goto case_exp___1;
2614  } else {
2615    {
2616#line 385
2617    goto switch_default;
2618#line 377
2619    if (0) {
2620      case_exp: /* CIL Label */ 
2621      case_exp___0: /* CIL Label */ 
2622#line 380
2623      *health = 2;
2624#line 381
2625      goto switch_break;
2626      case_exp___1: /* CIL Label */ 
2627#line 383
2628      *health = 5;
2629#line 384
2630      goto switch_break;
2631      switch_default: /* CIL Label */ 
2632#line 386
2633      *health = 1;
2634#line 387
2635      goto switch_break;
2636    } else {
2637      switch_break: /* CIL Label */ ;
2638    }
2639    }
2640  }
2641#line 390
2642  return (0);
2643}
2644}
2645#line 393 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
2646static int wm831x_bat_get_prop(struct power_supply *psy , enum power_supply_property psp ,
2647                               union power_supply_propval *val ) 
2648{ struct wm831x_power *wm831x_power ;
2649  void *tmp ;
2650  struct wm831x *wm831x ;
2651  int ret ;
2652  unsigned long __cil_tmp8 ;
2653  unsigned long __cil_tmp9 ;
2654  struct device *__cil_tmp10 ;
2655  struct device *__cil_tmp11 ;
2656  struct device  const  *__cil_tmp12 ;
2657  int *__cil_tmp13 ;
2658  enum wm831x_auxadc __cil_tmp14 ;
2659  int *__cil_tmp15 ;
2660  int *__cil_tmp16 ;
2661
2662  {
2663  {
2664#line 397
2665  __cil_tmp8 = (unsigned long )psy;
2666#line 397
2667  __cil_tmp9 = __cil_tmp8 + 96;
2668#line 397
2669  __cil_tmp10 = *((struct device **)__cil_tmp9);
2670#line 397
2671  __cil_tmp11 = *((struct device **)__cil_tmp10);
2672#line 397
2673  __cil_tmp12 = (struct device  const  *)__cil_tmp11;
2674#line 397
2675  tmp = dev_get_drvdata(__cil_tmp12);
2676#line 397
2677  wm831x_power = (struct wm831x_power *)tmp;
2678#line 398
2679  wm831x = *((struct wm831x **)wm831x_power);
2680#line 399
2681  ret = 0;
2682  }
2683#line 402
2684  if ((int )psp == 0) {
2685#line 402
2686    goto case_0;
2687  } else
2688#line 405
2689  if ((int )psp == 4) {
2690#line 405
2691    goto case_4;
2692  } else
2693#line 409
2694  if ((int )psp == 11) {
2695#line 409
2696    goto case_11;
2697  } else
2698#line 412
2699  if ((int )psp == 2) {
2700#line 412
2701    goto case_2;
2702  } else
2703#line 415
2704  if ((int )psp == 1) {
2705#line 415
2706    goto case_1;
2707  } else {
2708    {
2709#line 418
2710    goto switch_default;
2711#line 401
2712    if (0) {
2713      case_0: /* CIL Label */ 
2714      {
2715#line 403
2716      __cil_tmp13 = (int *)val;
2717#line 403
2718      ret = wm831x_bat_check_status(wm831x, __cil_tmp13);
2719      }
2720#line 404
2721      goto switch_break;
2722      case_4: /* CIL Label */ 
2723      {
2724#line 406
2725      ret = wm831x_power_check_online(wm831x, 1024, val);
2726      }
2727#line 408
2728      goto switch_break;
2729      case_11: /* CIL Label */ 
2730      {
2731#line 410
2732      __cil_tmp14 = (enum wm831x_auxadc )8;
2733#line 410
2734      ret = wm831x_power_read_voltage(wm831x, __cil_tmp14, val);
2735      }
2736#line 411
2737      goto switch_break;
2738      case_2: /* CIL Label */ 
2739      {
2740#line 413
2741      __cil_tmp15 = (int *)val;
2742#line 413
2743      ret = wm831x_bat_check_health(wm831x, __cil_tmp15);
2744      }
2745#line 414
2746      goto switch_break;
2747      case_1: /* CIL Label */ 
2748      {
2749#line 416
2750      __cil_tmp16 = (int *)val;
2751#line 416
2752      ret = wm831x_bat_check_type(wm831x, __cil_tmp16);
2753      }
2754#line 417
2755      goto switch_break;
2756      switch_default: /* CIL Label */ 
2757#line 419
2758      ret = -22;
2759#line 420
2760      goto switch_break;
2761    } else {
2762      switch_break: /* CIL Label */ ;
2763    }
2764    }
2765  }
2766#line 423
2767  return (ret);
2768}
2769}
2770#line 426 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
2771static enum power_supply_property wm831x_bat_props[5]  = {      (enum power_supply_property )0,      (enum power_supply_property )4,      (enum power_supply_property )11,      (enum power_supply_property )2, 
2772        (enum power_supply_property )1};
2773#line 434 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
2774static char const   *wm831x_bat_irqs[8]  = 
2775#line 434
2776  {      "BATT HOT",      "BATT COLD",      "BATT FAIL",      "OV", 
2777        "END",      "TO",      "MODE",      "START"};
2778#line 450
2779static irqreturn_t wm831x_bat_irq(int irq , void *data ) ;
2780#line 450 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
2781static struct _ddebug  __attribute__((__aligned__(8))) descriptor___0  __attribute__((__used__,
2782__section__("__verbose")))  =    {"wm831x_power", "wm831x_bat_irq", "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c",
2783    "Battery status changed: %d\n", 450U, 1U};
2784#line 445 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
2785static irqreturn_t wm831x_bat_irq(int irq , void *data ) 
2786{ struct wm831x_power *wm831x_power ;
2787  struct wm831x *wm831x ;
2788  long tmp ;
2789  struct _ddebug  __attribute__((__aligned__(8))) *__cil_tmp6 ;
2790  unsigned int __cil_tmp7 ;
2791  unsigned int __cil_tmp8 ;
2792  int __cil_tmp9 ;
2793  int __cil_tmp10 ;
2794  long __cil_tmp11 ;
2795  unsigned long __cil_tmp12 ;
2796  unsigned long __cil_tmp13 ;
2797  struct device *__cil_tmp14 ;
2798  struct device  const  *__cil_tmp15 ;
2799  unsigned long __cil_tmp16 ;
2800  unsigned long __cil_tmp17 ;
2801  unsigned long __cil_tmp18 ;
2802  unsigned long __cil_tmp19 ;
2803  struct power_supply *__cil_tmp20 ;
2804
2805  {
2806#line 447
2807  wm831x_power = (struct wm831x_power *)data;
2808#line 448
2809  wm831x = *((struct wm831x **)wm831x_power);
2810  {
2811#line 450
2812  while (1) {
2813    while_continue: /* CIL Label */ ;
2814    {
2815#line 450
2816    while (1) {
2817      while_continue___0: /* CIL Label */ ;
2818      {
2819#line 450
2820      __cil_tmp6 = & descriptor___0;
2821#line 450
2822      __cil_tmp7 = __cil_tmp6->flags;
2823#line 450
2824      __cil_tmp8 = __cil_tmp7 & 1U;
2825#line 450
2826      __cil_tmp9 = ! __cil_tmp8;
2827#line 450
2828      __cil_tmp10 = ! __cil_tmp9;
2829#line 450
2830      __cil_tmp11 = (long )__cil_tmp10;
2831#line 450
2832      tmp = __builtin_expect(__cil_tmp11, 0L);
2833      }
2834#line 450
2835      if (tmp) {
2836        {
2837#line 450
2838        __cil_tmp12 = (unsigned long )wm831x;
2839#line 450
2840        __cil_tmp13 = __cil_tmp12 + 72;
2841#line 450
2842        __cil_tmp14 = *((struct device **)__cil_tmp13);
2843#line 450
2844        __cil_tmp15 = (struct device  const  *)__cil_tmp14;
2845#line 450
2846        __dynamic_dev_dbg(& descriptor___0, __cil_tmp15, "Battery status changed: %d\n",
2847                          irq);
2848        }
2849      } else {
2850
2851      }
2852#line 450
2853      goto while_break___0;
2854    }
2855    while_break___0: /* CIL Label */ ;
2856    }
2857#line 450
2858    goto while_break;
2859  }
2860  while_break: /* CIL Label */ ;
2861  }
2862  {
2863#line 454
2864  __cil_tmp16 = (unsigned long )wm831x_power;
2865#line 454
2866  __cil_tmp17 = __cil_tmp16 + 716;
2867#line 454
2868  if (*((bool *)__cil_tmp17)) {
2869    {
2870#line 455
2871    __cil_tmp18 = (unsigned long )wm831x_power;
2872#line 455
2873    __cil_tmp19 = __cil_tmp18 + 440;
2874#line 455
2875    __cil_tmp20 = (struct power_supply *)__cil_tmp19;
2876#line 455
2877    power_supply_changed(__cil_tmp20);
2878    }
2879  } else {
2880
2881  }
2882  }
2883#line 457
2884  return ((irqreturn_t )1);
2885}
2886}
2887#line 465 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
2888static irqreturn_t wm831x_syslo_irq(int irq , void *data ) 
2889{ struct wm831x_power *wm831x_power ;
2890  struct wm831x *wm831x ;
2891  unsigned long __cil_tmp5 ;
2892  unsigned long __cil_tmp6 ;
2893  struct device *__cil_tmp7 ;
2894  struct device  const  *__cil_tmp8 ;
2895
2896  {
2897  {
2898#line 467
2899  wm831x_power = (struct wm831x_power *)data;
2900#line 468
2901  wm831x = *((struct wm831x **)wm831x_power);
2902#line 472
2903  __cil_tmp5 = (unsigned long )wm831x;
2904#line 472
2905  __cil_tmp6 = __cil_tmp5 + 72;
2906#line 472
2907  __cil_tmp7 = *((struct device **)__cil_tmp6);
2908#line 472
2909  __cil_tmp8 = (struct device  const  *)__cil_tmp7;
2910#line 472
2911  dev_crit(__cil_tmp8, "SYSVDD under voltage\n");
2912  }
2913#line 474
2914  return ((irqreturn_t )1);
2915}
2916}
2917#line 482
2918static irqreturn_t wm831x_pwr_src_irq(int irq , void *data ) ;
2919#line 482 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
2920static struct _ddebug  __attribute__((__aligned__(8))) descriptor___1  __attribute__((__used__,
2921__section__("__verbose")))  =    {"wm831x_power", "wm831x_pwr_src_irq", "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c",
2922    "Power source changed\n", 482U, 1U};
2923#line 477 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
2924static irqreturn_t wm831x_pwr_src_irq(int irq , void *data ) 
2925{ struct wm831x_power *wm831x_power ;
2926  struct wm831x *wm831x ;
2927  long tmp ;
2928  struct _ddebug  __attribute__((__aligned__(8))) *__cil_tmp6 ;
2929  unsigned int __cil_tmp7 ;
2930  unsigned int __cil_tmp8 ;
2931  int __cil_tmp9 ;
2932  int __cil_tmp10 ;
2933  long __cil_tmp11 ;
2934  unsigned long __cil_tmp12 ;
2935  unsigned long __cil_tmp13 ;
2936  struct device *__cil_tmp14 ;
2937  struct device  const  *__cil_tmp15 ;
2938  unsigned long __cil_tmp16 ;
2939  unsigned long __cil_tmp17 ;
2940  unsigned long __cil_tmp18 ;
2941  unsigned long __cil_tmp19 ;
2942  struct power_supply *__cil_tmp20 ;
2943  unsigned long __cil_tmp21 ;
2944  unsigned long __cil_tmp22 ;
2945  struct power_supply *__cil_tmp23 ;
2946  unsigned long __cil_tmp24 ;
2947  unsigned long __cil_tmp25 ;
2948  struct power_supply *__cil_tmp26 ;
2949
2950  {
2951#line 479
2952  wm831x_power = (struct wm831x_power *)data;
2953#line 480
2954  wm831x = *((struct wm831x **)wm831x_power);
2955  {
2956#line 482
2957  while (1) {
2958    while_continue: /* CIL Label */ ;
2959    {
2960#line 482
2961    while (1) {
2962      while_continue___0: /* CIL Label */ ;
2963      {
2964#line 482
2965      __cil_tmp6 = & descriptor___1;
2966#line 482
2967      __cil_tmp7 = __cil_tmp6->flags;
2968#line 482
2969      __cil_tmp8 = __cil_tmp7 & 1U;
2970#line 482
2971      __cil_tmp9 = ! __cil_tmp8;
2972#line 482
2973      __cil_tmp10 = ! __cil_tmp9;
2974#line 482
2975      __cil_tmp11 = (long )__cil_tmp10;
2976#line 482
2977      tmp = __builtin_expect(__cil_tmp11, 0L);
2978      }
2979#line 482
2980      if (tmp) {
2981        {
2982#line 482
2983        __cil_tmp12 = (unsigned long )wm831x;
2984#line 482
2985        __cil_tmp13 = __cil_tmp12 + 72;
2986#line 482
2987        __cil_tmp14 = *((struct device **)__cil_tmp13);
2988#line 482
2989        __cil_tmp15 = (struct device  const  *)__cil_tmp14;
2990#line 482
2991        __dynamic_dev_dbg(& descriptor___1, __cil_tmp15, "Power source changed\n");
2992        }
2993      } else {
2994
2995      }
2996#line 482
2997      goto while_break___0;
2998    }
2999    while_break___0: /* CIL Label */ ;
3000    }
3001#line 482
3002    goto while_break;
3003  }
3004  while_break: /* CIL Label */ ;
3005  }
3006  {
3007#line 485
3008  __cil_tmp16 = (unsigned long )wm831x_power;
3009#line 485
3010  __cil_tmp17 = __cil_tmp16 + 716;
3011#line 485
3012  if (*((bool *)__cil_tmp17)) {
3013    {
3014#line 486
3015    __cil_tmp18 = (unsigned long )wm831x_power;
3016#line 486
3017    __cil_tmp19 = __cil_tmp18 + 440;
3018#line 486
3019    __cil_tmp20 = (struct power_supply *)__cil_tmp19;
3020#line 486
3021    power_supply_changed(__cil_tmp20);
3022    }
3023  } else {
3024
3025  }
3026  }
3027  {
3028#line 487
3029  __cil_tmp21 = (unsigned long )wm831x_power;
3030#line 487
3031  __cil_tmp22 = __cil_tmp21 + 224;
3032#line 487
3033  __cil_tmp23 = (struct power_supply *)__cil_tmp22;
3034#line 487
3035  power_supply_changed(__cil_tmp23);
3036#line 488
3037  __cil_tmp24 = (unsigned long )wm831x_power;
3038#line 488
3039  __cil_tmp25 = __cil_tmp24 + 8;
3040#line 488
3041  __cil_tmp26 = (struct power_supply *)__cil_tmp25;
3042#line 488
3043  power_supply_changed(__cil_tmp26);
3044  }
3045#line 490
3046  return ((irqreturn_t )1);
3047}
3048}
3049#line 493
3050static int wm831x_power_probe(struct platform_device *pdev )  __attribute__((__section__(".devinit.text"),
3051__no_instrument_function__)) ;
3052#line 493 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
3053static int wm831x_power_probe(struct platform_device *pdev ) 
3054{ struct wm831x *wm831x ;
3055  void *tmp ;
3056  struct wm831x_pdata *wm831x_pdata ;
3057  struct wm831x_power *power ;
3058  struct power_supply *usb ;
3059  struct power_supply *battery ;
3060  struct power_supply *wall ;
3061  int ret ;
3062  int irq ;
3063  int i ;
3064  void *tmp___0 ;
3065  unsigned long __cil_tmp13 ;
3066  unsigned long __cil_tmp14 ;
3067  struct device *__cil_tmp15 ;
3068  struct device  const  *__cil_tmp16 ;
3069  unsigned long __cil_tmp17 ;
3070  unsigned long __cil_tmp18 ;
3071  struct device *__cil_tmp19 ;
3072  unsigned long __cil_tmp20 ;
3073  unsigned long __cil_tmp21 ;
3074  void *__cil_tmp22 ;
3075  void *__cil_tmp23 ;
3076  unsigned long __cil_tmp24 ;
3077  unsigned long __cil_tmp25 ;
3078  void *__cil_tmp26 ;
3079  unsigned long __cil_tmp27 ;
3080  unsigned long __cil_tmp28 ;
3081  unsigned long __cil_tmp29 ;
3082  unsigned long __cil_tmp30 ;
3083  unsigned long __cil_tmp31 ;
3084  unsigned long __cil_tmp32 ;
3085  unsigned long __cil_tmp33 ;
3086  unsigned long __cil_tmp34 ;
3087  unsigned long __cil_tmp35 ;
3088  unsigned long __cil_tmp36 ;
3089  char *__cil_tmp37 ;
3090  int __cil_tmp38 ;
3091  unsigned long __cil_tmp39 ;
3092  unsigned long __cil_tmp40 ;
3093  unsigned long __cil_tmp41 ;
3094  unsigned long __cil_tmp42 ;
3095  char *__cil_tmp43 ;
3096  int __cil_tmp44 ;
3097  unsigned long __cil_tmp45 ;
3098  unsigned long __cil_tmp46 ;
3099  unsigned long __cil_tmp47 ;
3100  unsigned long __cil_tmp48 ;
3101  char *__cil_tmp49 ;
3102  int __cil_tmp50 ;
3103  unsigned long __cil_tmp51 ;
3104  unsigned long __cil_tmp52 ;
3105  unsigned long __cil_tmp53 ;
3106  unsigned long __cil_tmp54 ;
3107  char *__cil_tmp55 ;
3108  unsigned long __cil_tmp56 ;
3109  unsigned long __cil_tmp57 ;
3110  unsigned long __cil_tmp58 ;
3111  unsigned long __cil_tmp59 ;
3112  char *__cil_tmp60 ;
3113  unsigned long __cil_tmp61 ;
3114  unsigned long __cil_tmp62 ;
3115  unsigned long __cil_tmp63 ;
3116  unsigned long __cil_tmp64 ;
3117  char *__cil_tmp65 ;
3118  unsigned long __cil_tmp66 ;
3119  unsigned long __cil_tmp67 ;
3120  unsigned long __cil_tmp68 ;
3121  unsigned long __cil_tmp69 ;
3122  char *__cil_tmp70 ;
3123  unsigned long __cil_tmp71 ;
3124  unsigned long __cil_tmp72 ;
3125  unsigned long __cil_tmp73 ;
3126  unsigned long __cil_tmp74 ;
3127  char *__cil_tmp75 ;
3128  unsigned long __cil_tmp76 ;
3129  unsigned long __cil_tmp77 ;
3130  unsigned long __cil_tmp78 ;
3131  unsigned long __cil_tmp79 ;
3132  char *__cil_tmp80 ;
3133  unsigned long __cil_tmp81 ;
3134  unsigned long __cil_tmp82 ;
3135  unsigned long __cil_tmp83 ;
3136  unsigned long __cil_tmp84 ;
3137  char *__cil_tmp85 ;
3138  unsigned long __cil_tmp86 ;
3139  unsigned long __cil_tmp87 ;
3140  unsigned long __cil_tmp88 ;
3141  unsigned long __cil_tmp89 ;
3142  unsigned long __cil_tmp90 ;
3143  unsigned long __cil_tmp91 ;
3144  unsigned long __cil_tmp92 ;
3145  unsigned long __cil_tmp93 ;
3146  unsigned long __cil_tmp94 ;
3147  unsigned long __cil_tmp95 ;
3148  unsigned long __cil_tmp96 ;
3149  unsigned long __cil_tmp97 ;
3150  unsigned long __cil_tmp98 ;
3151  struct device *__cil_tmp99 ;
3152  unsigned long __cil_tmp100 ;
3153  unsigned long __cil_tmp101 ;
3154  unsigned long __cil_tmp102 ;
3155  unsigned long __cil_tmp103 ;
3156  char *__cil_tmp104 ;
3157  unsigned long __cil_tmp105 ;
3158  unsigned long __cil_tmp106 ;
3159  unsigned long __cil_tmp107 ;
3160  unsigned long __cil_tmp108 ;
3161  unsigned long __cil_tmp109 ;
3162  unsigned long __cil_tmp110 ;
3163  unsigned long __cil_tmp111 ;
3164  unsigned long __cil_tmp112 ;
3165  unsigned long __cil_tmp113 ;
3166  unsigned long __cil_tmp114 ;
3167  unsigned long __cil_tmp115 ;
3168  unsigned long __cil_tmp116 ;
3169  unsigned long __cil_tmp117 ;
3170  struct device *__cil_tmp118 ;
3171  unsigned long __cil_tmp119 ;
3172  unsigned long __cil_tmp120 ;
3173  int __cil_tmp121 ;
3174  unsigned long __cil_tmp122 ;
3175  unsigned long __cil_tmp123 ;
3176  unsigned long __cil_tmp124 ;
3177  unsigned long __cil_tmp125 ;
3178  unsigned long __cil_tmp126 ;
3179  unsigned long __cil_tmp127 ;
3180  char *__cil_tmp128 ;
3181  unsigned long __cil_tmp129 ;
3182  unsigned long __cil_tmp130 ;
3183  unsigned long __cil_tmp131 ;
3184  unsigned long __cil_tmp132 ;
3185  unsigned long __cil_tmp133 ;
3186  unsigned long __cil_tmp134 ;
3187  unsigned long __cil_tmp135 ;
3188  unsigned long __cil_tmp136 ;
3189  unsigned long __cil_tmp137 ;
3190  unsigned long __cil_tmp138 ;
3191  unsigned long __cil_tmp139 ;
3192  unsigned long __cil_tmp140 ;
3193  unsigned long __cil_tmp141 ;
3194  struct device *__cil_tmp142 ;
3195  unsigned int __cil_tmp143 ;
3196  void *__cil_tmp144 ;
3197  irqreturn_t (*__cil_tmp145)(int  , void * ) ;
3198  void *__cil_tmp146 ;
3199  unsigned long __cil_tmp147 ;
3200  unsigned long __cil_tmp148 ;
3201  struct device *__cil_tmp149 ;
3202  struct device  const  *__cil_tmp150 ;
3203  unsigned int __cil_tmp151 ;
3204  void *__cil_tmp152 ;
3205  irqreturn_t (*__cil_tmp153)(int  , void * ) ;
3206  void *__cil_tmp154 ;
3207  unsigned long __cil_tmp155 ;
3208  unsigned long __cil_tmp156 ;
3209  struct device *__cil_tmp157 ;
3210  struct device  const  *__cil_tmp158 ;
3211  unsigned long __cil_tmp159 ;
3212  unsigned long __cil_tmp160 ;
3213  unsigned long __cil_tmp161 ;
3214  unsigned long __cil_tmp162 ;
3215  unsigned long __cil_tmp163 ;
3216  char const   *__cil_tmp164 ;
3217  unsigned int __cil_tmp165 ;
3218  void *__cil_tmp166 ;
3219  irqreturn_t (*__cil_tmp167)(int  , void * ) ;
3220  unsigned long __cil_tmp168 ;
3221  unsigned long __cil_tmp169 ;
3222  char const   *__cil_tmp170 ;
3223  void *__cil_tmp171 ;
3224  unsigned long __cil_tmp172 ;
3225  unsigned long __cil_tmp173 ;
3226  struct device *__cil_tmp174 ;
3227  struct device  const  *__cil_tmp175 ;
3228  unsigned long __cil_tmp176 ;
3229  unsigned long __cil_tmp177 ;
3230  char const   *__cil_tmp178 ;
3231  unsigned long __cil_tmp179 ;
3232  unsigned long __cil_tmp180 ;
3233  char const   *__cil_tmp181 ;
3234  unsigned int __cil_tmp182 ;
3235  void *__cil_tmp183 ;
3236  unsigned int __cil_tmp184 ;
3237  void *__cil_tmp185 ;
3238  unsigned int __cil_tmp186 ;
3239  void *__cil_tmp187 ;
3240  unsigned long __cil_tmp188 ;
3241  unsigned long __cil_tmp189 ;
3242  void const   *__cil_tmp190 ;
3243
3244  {
3245  {
3246#line 495
3247  __cil_tmp13 = (unsigned long )pdev;
3248#line 495
3249  __cil_tmp14 = __cil_tmp13 + 16;
3250#line 495
3251  __cil_tmp15 = *((struct device **)__cil_tmp14);
3252#line 495
3253  __cil_tmp16 = (struct device  const  *)__cil_tmp15;
3254#line 495
3255  tmp = dev_get_drvdata(__cil_tmp16);
3256#line 495
3257  wm831x = (struct wm831x *)tmp;
3258#line 496
3259  __cil_tmp17 = (unsigned long )wm831x;
3260#line 496
3261  __cil_tmp18 = __cil_tmp17 + 72;
3262#line 496
3263  __cil_tmp19 = *((struct device **)__cil_tmp18);
3264#line 496
3265  __cil_tmp20 = (unsigned long )__cil_tmp19;
3266#line 496
3267  __cil_tmp21 = __cil_tmp20 + 184;
3268#line 496
3269  __cil_tmp22 = *((void **)__cil_tmp21);
3270#line 496
3271  wm831x_pdata = (struct wm831x_pdata *)__cil_tmp22;
3272#line 503
3273  tmp___0 = kzalloc(720UL, 208U);
3274#line 503
3275  power = (struct wm831x_power *)tmp___0;
3276  }
3277  {
3278#line 504
3279  __cil_tmp23 = (void *)0;
3280#line 504
3281  __cil_tmp24 = (unsigned long )__cil_tmp23;
3282#line 504
3283  __cil_tmp25 = (unsigned long )power;
3284#line 504
3285  if (__cil_tmp25 == __cil_tmp24) {
3286#line 505
3287    return (-12);
3288  } else {
3289
3290  }
3291  }
3292  {
3293#line 507
3294  *((struct wm831x **)power) = wm831x;
3295#line 508
3296  __cil_tmp26 = (void *)power;
3297#line 508
3298  platform_set_drvdata(pdev, __cil_tmp26);
3299#line 510
3300  __cil_tmp27 = (unsigned long )power;
3301#line 510
3302  __cil_tmp28 = __cil_tmp27 + 224;
3303#line 510
3304  usb = (struct power_supply *)__cil_tmp28;
3305#line 511
3306  __cil_tmp29 = (unsigned long )power;
3307#line 511
3308  __cil_tmp30 = __cil_tmp29 + 440;
3309#line 511
3310  battery = (struct power_supply *)__cil_tmp30;
3311#line 512
3312  __cil_tmp31 = (unsigned long )power;
3313#line 512
3314  __cil_tmp32 = __cil_tmp31 + 8;
3315#line 512
3316  wall = (struct power_supply *)__cil_tmp32;
3317  }
3318#line 514
3319  if (wm831x_pdata) {
3320#line 514
3321    if (*((int *)wm831x_pdata)) {
3322      {
3323#line 515
3324      __cil_tmp33 = 0 * 1UL;
3325#line 515
3326      __cil_tmp34 = 656 + __cil_tmp33;
3327#line 515
3328      __cil_tmp35 = (unsigned long )power;
3329#line 515
3330      __cil_tmp36 = __cil_tmp35 + __cil_tmp34;
3331#line 515
3332      __cil_tmp37 = (char *)__cil_tmp36;
3333#line 515
3334      __cil_tmp38 = *((int *)wm831x_pdata);
3335#line 515
3336      snprintf(__cil_tmp37, 20UL, "wm831x-wall.%d", __cil_tmp38);
3337#line 517
3338      __cil_tmp39 = 0 * 1UL;
3339#line 517
3340      __cil_tmp40 = 696 + __cil_tmp39;
3341#line 517
3342      __cil_tmp41 = (unsigned long )power;
3343#line 517
3344      __cil_tmp42 = __cil_tmp41 + __cil_tmp40;
3345#line 517
3346      __cil_tmp43 = (char *)__cil_tmp42;
3347#line 517
3348      __cil_tmp44 = *((int *)wm831x_pdata);
3349#line 517
3350      snprintf(__cil_tmp43, 20UL, "wm831x-battery.%d", __cil_tmp44);
3351#line 519
3352      __cil_tmp45 = 0 * 1UL;
3353#line 519
3354      __cil_tmp46 = 676 + __cil_tmp45;
3355#line 519
3356      __cil_tmp47 = (unsigned long )power;
3357#line 519
3358      __cil_tmp48 = __cil_tmp47 + __cil_tmp46;
3359#line 519
3360      __cil_tmp49 = (char *)__cil_tmp48;
3361#line 519
3362      __cil_tmp50 = *((int *)wm831x_pdata);
3363#line 519
3364      snprintf(__cil_tmp49, 20UL, "wm831x-usb.%d", __cil_tmp50);
3365      }
3366    } else {
3367      {
3368#line 522
3369      __cil_tmp51 = 0 * 1UL;
3370#line 522
3371      __cil_tmp52 = 656 + __cil_tmp51;
3372#line 522
3373      __cil_tmp53 = (unsigned long )power;
3374#line 522
3375      __cil_tmp54 = __cil_tmp53 + __cil_tmp52;
3376#line 522
3377      __cil_tmp55 = (char *)__cil_tmp54;
3378#line 522
3379      snprintf(__cil_tmp55, 20UL, "wm831x-wall");
3380#line 524
3381      __cil_tmp56 = 0 * 1UL;
3382#line 524
3383      __cil_tmp57 = 696 + __cil_tmp56;
3384#line 524
3385      __cil_tmp58 = (unsigned long )power;
3386#line 524
3387      __cil_tmp59 = __cil_tmp58 + __cil_tmp57;
3388#line 524
3389      __cil_tmp60 = (char *)__cil_tmp59;
3390#line 524
3391      snprintf(__cil_tmp60, 20UL, "wm831x-battery");
3392#line 526
3393      __cil_tmp61 = 0 * 1UL;
3394#line 526
3395      __cil_tmp62 = 676 + __cil_tmp61;
3396#line 526
3397      __cil_tmp63 = (unsigned long )power;
3398#line 526
3399      __cil_tmp64 = __cil_tmp63 + __cil_tmp62;
3400#line 526
3401      __cil_tmp65 = (char *)__cil_tmp64;
3402#line 526
3403      snprintf(__cil_tmp65, 20UL, "wm831x-usb");
3404      }
3405    }
3406  } else {
3407    {
3408#line 522
3409    __cil_tmp66 = 0 * 1UL;
3410#line 522
3411    __cil_tmp67 = 656 + __cil_tmp66;
3412#line 522
3413    __cil_tmp68 = (unsigned long )power;
3414#line 522
3415    __cil_tmp69 = __cil_tmp68 + __cil_tmp67;
3416#line 522
3417    __cil_tmp70 = (char *)__cil_tmp69;
3418#line 522
3419    snprintf(__cil_tmp70, 20UL, "wm831x-wall");
3420#line 524
3421    __cil_tmp71 = 0 * 1UL;
3422#line 524
3423    __cil_tmp72 = 696 + __cil_tmp71;
3424#line 524
3425    __cil_tmp73 = (unsigned long )power;
3426#line 524
3427    __cil_tmp74 = __cil_tmp73 + __cil_tmp72;
3428#line 524
3429    __cil_tmp75 = (char *)__cil_tmp74;
3430#line 524
3431    snprintf(__cil_tmp75, 20UL, "wm831x-battery");
3432#line 526
3433    __cil_tmp76 = 0 * 1UL;
3434#line 526
3435    __cil_tmp77 = 676 + __cil_tmp76;
3436#line 526
3437    __cil_tmp78 = (unsigned long )power;
3438#line 526
3439    __cil_tmp79 = __cil_tmp78 + __cil_tmp77;
3440#line 526
3441    __cil_tmp80 = (char *)__cil_tmp79;
3442#line 526
3443    snprintf(__cil_tmp80, 20UL, "wm831x-usb");
3444    }
3445  }
3446  {
3447#line 533
3448  wm831x_config_battery(wm831x);
3449#line 535
3450  __cil_tmp81 = 0 * 1UL;
3451#line 535
3452  __cil_tmp82 = 656 + __cil_tmp81;
3453#line 535
3454  __cil_tmp83 = (unsigned long )power;
3455#line 535
3456  __cil_tmp84 = __cil_tmp83 + __cil_tmp82;
3457#line 535
3458  __cil_tmp85 = (char *)__cil_tmp84;
3459#line 535
3460  *((char const   **)wall) = (char const   *)__cil_tmp85;
3461#line 536
3462  __cil_tmp86 = (unsigned long )wall;
3463#line 536
3464  __cil_tmp87 = __cil_tmp86 + 8;
3465#line 536
3466  *((enum power_supply_type *)__cil_tmp87) = (enum power_supply_type )3;
3467#line 537
3468  __cil_tmp88 = (unsigned long )wall;
3469#line 537
3470  __cil_tmp89 = __cil_tmp88 + 16;
3471#line 537
3472  __cil_tmp90 = 0 * 4UL;
3473#line 537
3474  __cil_tmp91 = (unsigned long )(wm831x_wall_props) + __cil_tmp90;
3475#line 537
3476  *((enum power_supply_property **)__cil_tmp89) = (enum power_supply_property *)__cil_tmp91;
3477#line 538
3478  __cil_tmp92 = (unsigned long )wall;
3479#line 538
3480  __cil_tmp93 = __cil_tmp92 + 24;
3481#line 538
3482  __cil_tmp94 = 8UL / 4UL;
3483#line 538
3484  *((size_t *)__cil_tmp93) = __cil_tmp94 + 0UL;
3485#line 539
3486  __cil_tmp95 = (unsigned long )wall;
3487#line 539
3488  __cil_tmp96 = __cil_tmp95 + 48;
3489#line 539
3490  *((int (**)(struct power_supply *psy , enum power_supply_property psp , union power_supply_propval *val ))__cil_tmp96) = & wm831x_wall_get_prop;
3491#line 540
3492  __cil_tmp97 = (unsigned long )pdev;
3493#line 540
3494  __cil_tmp98 = __cil_tmp97 + 16;
3495#line 540
3496  __cil_tmp99 = (struct device *)__cil_tmp98;
3497#line 540
3498  ret = power_supply_register(__cil_tmp99, wall);
3499  }
3500#line 541
3501  if (ret) {
3502#line 542
3503    goto err_kmalloc;
3504  } else {
3505
3506  }
3507  {
3508#line 544
3509  __cil_tmp100 = 0 * 1UL;
3510#line 544
3511  __cil_tmp101 = 676 + __cil_tmp100;
3512#line 544
3513  __cil_tmp102 = (unsigned long )power;
3514#line 544
3515  __cil_tmp103 = __cil_tmp102 + __cil_tmp101;
3516#line 544
3517  __cil_tmp104 = (char *)__cil_tmp103;
3518#line 544
3519  *((char const   **)usb) = (char const   *)__cil_tmp104;
3520#line 544
3521  __cil_tmp105 = (unsigned long )usb;
3522#line 544
3523  __cil_tmp106 = __cil_tmp105 + 8;
3524#line 544
3525  *((enum power_supply_type *)__cil_tmp106) = (enum power_supply_type )4;
3526#line 546
3527  __cil_tmp107 = (unsigned long )usb;
3528#line 546
3529  __cil_tmp108 = __cil_tmp107 + 16;
3530#line 546
3531  __cil_tmp109 = 0 * 4UL;
3532#line 546
3533  __cil_tmp110 = (unsigned long )(wm831x_usb_props) + __cil_tmp109;
3534#line 546
3535  *((enum power_supply_property **)__cil_tmp108) = (enum power_supply_property *)__cil_tmp110;
3536#line 547
3537  __cil_tmp111 = (unsigned long )usb;
3538#line 547
3539  __cil_tmp112 = __cil_tmp111 + 24;
3540#line 547
3541  __cil_tmp113 = 8UL / 4UL;
3542#line 547
3543  *((size_t *)__cil_tmp112) = __cil_tmp113 + 0UL;
3544#line 548
3545  __cil_tmp114 = (unsigned long )usb;
3546#line 548
3547  __cil_tmp115 = __cil_tmp114 + 48;
3548#line 548
3549  *((int (**)(struct power_supply *psy , enum power_supply_property psp , union power_supply_propval *val ))__cil_tmp115) = & wm831x_usb_get_prop;
3550#line 549
3551  __cil_tmp116 = (unsigned long )pdev;
3552#line 549
3553  __cil_tmp117 = __cil_tmp116 + 16;
3554#line 549
3555  __cil_tmp118 = (struct device *)__cil_tmp117;
3556#line 549
3557  ret = power_supply_register(__cil_tmp118, usb);
3558  }
3559#line 550
3560  if (ret) {
3561#line 551
3562    goto err_wall;
3563  } else {
3564
3565  }
3566  {
3567#line 553
3568  ret = wm831x_reg_read(wm831x, (unsigned short)16456);
3569  }
3570#line 554
3571  if (ret < 0) {
3572#line 555
3573    goto err_wall;
3574  } else {
3575
3576  }
3577#line 556
3578  __cil_tmp119 = (unsigned long )power;
3579#line 556
3580  __cil_tmp120 = __cil_tmp119 + 716;
3581#line 556
3582  __cil_tmp121 = ret & 32768;
3583#line 556
3584  *((bool *)__cil_tmp120) = (bool )__cil_tmp121;
3585  {
3586#line 558
3587  __cil_tmp122 = (unsigned long )power;
3588#line 558
3589  __cil_tmp123 = __cil_tmp122 + 716;
3590#line 558
3591  if (*((bool *)__cil_tmp123)) {
3592    {
3593#line 559
3594    __cil_tmp124 = 0 * 1UL;
3595#line 559
3596    __cil_tmp125 = 696 + __cil_tmp124;
3597#line 559
3598    __cil_tmp126 = (unsigned long )power;
3599#line 559
3600    __cil_tmp127 = __cil_tmp126 + __cil_tmp125;
3601#line 559
3602    __cil_tmp128 = (char *)__cil_tmp127;
3603#line 559
3604    *((char const   **)battery) = (char const   *)__cil_tmp128;
3605#line 560
3606    __cil_tmp129 = (unsigned long )battery;
3607#line 560
3608    __cil_tmp130 = __cil_tmp129 + 16;
3609#line 560
3610    __cil_tmp131 = 0 * 4UL;
3611#line 560
3612    __cil_tmp132 = (unsigned long )(wm831x_bat_props) + __cil_tmp131;
3613#line 560
3614    *((enum power_supply_property **)__cil_tmp130) = (enum power_supply_property *)__cil_tmp132;
3615#line 561
3616    __cil_tmp133 = (unsigned long )battery;
3617#line 561
3618    __cil_tmp134 = __cil_tmp133 + 24;
3619#line 561
3620    __cil_tmp135 = 20UL / 4UL;
3621#line 561
3622    *((size_t *)__cil_tmp134) = __cil_tmp135 + 0UL;
3623#line 562
3624    __cil_tmp136 = (unsigned long )battery;
3625#line 562
3626    __cil_tmp137 = __cil_tmp136 + 48;
3627#line 562
3628    *((int (**)(struct power_supply *psy , enum power_supply_property psp , union power_supply_propval *val ))__cil_tmp137) = & wm831x_bat_get_prop;
3629#line 563
3630    __cil_tmp138 = (unsigned long )battery;
3631#line 563
3632    __cil_tmp139 = __cil_tmp138 + 88;
3633#line 563
3634    *((int *)__cil_tmp139) = 1;
3635#line 564
3636    __cil_tmp140 = (unsigned long )pdev;
3637#line 564
3638    __cil_tmp141 = __cil_tmp140 + 16;
3639#line 564
3640    __cil_tmp142 = (struct device *)__cil_tmp141;
3641#line 564
3642    ret = power_supply_register(__cil_tmp142, battery);
3643    }
3644#line 565
3645    if (ret) {
3646#line 566
3647      goto err_usb;
3648    } else {
3649
3650    }
3651  } else {
3652
3653  }
3654  }
3655  {
3656#line 569
3657  irq = platform_get_irq_byname(pdev, "SYSLO");
3658#line 570
3659  __cil_tmp143 = (unsigned int )irq;
3660#line 570
3661  __cil_tmp144 = (void *)0;
3662#line 570
3663  __cil_tmp145 = (irqreturn_t (*)(int  , void * ))__cil_tmp144;
3664#line 570
3665  __cil_tmp146 = (void *)power;
3666#line 570
3667  ret = (int )request_threaded_irq(__cil_tmp143, __cil_tmp145, & wm831x_syslo_irq,
3668                                   1UL, "System power low", __cil_tmp146);
3669  }
3670#line 573
3671  if (ret != 0) {
3672    {
3673#line 574
3674    __cil_tmp147 = (unsigned long )pdev;
3675#line 574
3676    __cil_tmp148 = __cil_tmp147 + 16;
3677#line 574
3678    __cil_tmp149 = (struct device *)__cil_tmp148;
3679#line 574
3680    __cil_tmp150 = (struct device  const  *)__cil_tmp149;
3681#line 574
3682    dev_err(__cil_tmp150, "Failed to request SYSLO IRQ %d: %d\n", irq, ret);
3683    }
3684#line 576
3685    goto err_battery;
3686  } else {
3687
3688  }
3689  {
3690#line 579
3691  irq = platform_get_irq_byname(pdev, "PWR SRC");
3692#line 580
3693  __cil_tmp151 = (unsigned int )irq;
3694#line 580
3695  __cil_tmp152 = (void *)0;
3696#line 580
3697  __cil_tmp153 = (irqreturn_t (*)(int  , void * ))__cil_tmp152;
3698#line 580
3699  __cil_tmp154 = (void *)power;
3700#line 580
3701  ret = (int )request_threaded_irq(__cil_tmp151, __cil_tmp153, & wm831x_pwr_src_irq,
3702                                   1UL, "Power source", __cil_tmp154);
3703  }
3704#line 583
3705  if (ret != 0) {
3706    {
3707#line 584
3708    __cil_tmp155 = (unsigned long )pdev;
3709#line 584
3710    __cil_tmp156 = __cil_tmp155 + 16;
3711#line 584
3712    __cil_tmp157 = (struct device *)__cil_tmp156;
3713#line 584
3714    __cil_tmp158 = (struct device  const  *)__cil_tmp157;
3715#line 584
3716    dev_err(__cil_tmp158, "Failed to request PWR SRC IRQ %d: %d\n", irq, ret);
3717    }
3718#line 586
3719    goto err_syslo;
3720  } else {
3721
3722  }
3723#line 589
3724  i = 0;
3725  {
3726#line 589
3727  while (1) {
3728    while_continue: /* CIL Label */ ;
3729    {
3730#line 589
3731    __cil_tmp159 = 64UL / 8UL;
3732#line 589
3733    __cil_tmp160 = __cil_tmp159 + 0UL;
3734#line 589
3735    __cil_tmp161 = (unsigned long )i;
3736#line 589
3737    if (__cil_tmp161 < __cil_tmp160) {
3738
3739    } else {
3740#line 589
3741      goto while_break;
3742    }
3743    }
3744    {
3745#line 590
3746    __cil_tmp162 = i * 8UL;
3747#line 590
3748    __cil_tmp163 = (unsigned long )(wm831x_bat_irqs) + __cil_tmp162;
3749#line 590
3750    __cil_tmp164 = *((char const   **)__cil_tmp163);
3751#line 590
3752    irq = platform_get_irq_byname(pdev, __cil_tmp164);
3753#line 591
3754    __cil_tmp165 = (unsigned int )irq;
3755#line 591
3756    __cil_tmp166 = (void *)0;
3757#line 591
3758    __cil_tmp167 = (irqreturn_t (*)(int  , void * ))__cil_tmp166;
3759#line 591
3760    __cil_tmp168 = i * 8UL;
3761#line 591
3762    __cil_tmp169 = (unsigned long )(wm831x_bat_irqs) + __cil_tmp168;
3763#line 591
3764    __cil_tmp170 = *((char const   **)__cil_tmp169);
3765#line 591
3766    __cil_tmp171 = (void *)power;
3767#line 591
3768    ret = (int )request_threaded_irq(__cil_tmp165, __cil_tmp167, & wm831x_bat_irq,
3769                                     1UL, __cil_tmp170, __cil_tmp171);
3770    }
3771#line 595
3772    if (ret != 0) {
3773      {
3774#line 596
3775      __cil_tmp172 = (unsigned long )pdev;
3776#line 596
3777      __cil_tmp173 = __cil_tmp172 + 16;
3778#line 596
3779      __cil_tmp174 = (struct device *)__cil_tmp173;
3780#line 596
3781      __cil_tmp175 = (struct device  const  *)__cil_tmp174;
3782#line 596
3783      __cil_tmp176 = i * 8UL;
3784#line 596
3785      __cil_tmp177 = (unsigned long )(wm831x_bat_irqs) + __cil_tmp176;
3786#line 596
3787      __cil_tmp178 = *((char const   **)__cil_tmp177);
3788#line 596
3789      dev_err(__cil_tmp175, "Failed to request %s IRQ %d: %d\n", __cil_tmp178, irq,
3790              ret);
3791      }
3792#line 599
3793      goto err_bat_irq;
3794    } else {
3795
3796    }
3797#line 589
3798    i = i + 1;
3799  }
3800  while_break: /* CIL Label */ ;
3801  }
3802#line 603
3803  return (ret);
3804  err_bat_irq: 
3805  {
3806#line 606
3807  while (1) {
3808    while_continue___0: /* CIL Label */ ;
3809#line 606
3810    if (i >= 0) {
3811
3812    } else {
3813#line 606
3814      goto while_break___0;
3815    }
3816    {
3817#line 607
3818    __cil_tmp179 = i * 8UL;
3819#line 607
3820    __cil_tmp180 = (unsigned long )(wm831x_bat_irqs) + __cil_tmp179;
3821#line 607
3822    __cil_tmp181 = *((char const   **)__cil_tmp180);
3823#line 607
3824    irq = platform_get_irq_byname(pdev, __cil_tmp181);
3825#line 608
3826    __cil_tmp182 = (unsigned int )irq;
3827#line 608
3828    __cil_tmp183 = (void *)power;
3829#line 608
3830    free_irq(__cil_tmp182, __cil_tmp183);
3831#line 606
3832    i = i - 1;
3833    }
3834  }
3835  while_break___0: /* CIL Label */ ;
3836  }
3837  {
3838#line 610
3839  irq = platform_get_irq_byname(pdev, "PWR SRC");
3840#line 611
3841  __cil_tmp184 = (unsigned int )irq;
3842#line 611
3843  __cil_tmp185 = (void *)power;
3844#line 611
3845  free_irq(__cil_tmp184, __cil_tmp185);
3846  }
3847  err_syslo: 
3848  {
3849#line 613
3850  irq = platform_get_irq_byname(pdev, "SYSLO");
3851#line 614
3852  __cil_tmp186 = (unsigned int )irq;
3853#line 614
3854  __cil_tmp187 = (void *)power;
3855#line 614
3856  free_irq(__cil_tmp186, __cil_tmp187);
3857  }
3858  err_battery: 
3859  {
3860#line 616
3861  __cil_tmp188 = (unsigned long )power;
3862#line 616
3863  __cil_tmp189 = __cil_tmp188 + 716;
3864#line 616
3865  if (*((bool *)__cil_tmp189)) {
3866    {
3867#line 617
3868    power_supply_unregister(battery);
3869    }
3870  } else {
3871
3872  }
3873  }
3874  err_usb: 
3875  {
3876#line 619
3877  power_supply_unregister(usb);
3878  }
3879  err_wall: 
3880  {
3881#line 621
3882  power_supply_unregister(wall);
3883  }
3884  err_kmalloc: 
3885  {
3886#line 623
3887  __cil_tmp190 = (void const   *)power;
3888#line 623
3889  kfree(__cil_tmp190);
3890  }
3891#line 624
3892  return (ret);
3893}
3894}
3895#line 627
3896static int wm831x_power_remove(struct platform_device *pdev )  __attribute__((__section__(".devexit.text"),
3897__no_instrument_function__)) ;
3898#line 627 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
3899static int wm831x_power_remove(struct platform_device *pdev ) 
3900{ struct wm831x_power *wm831x_power ;
3901  void *tmp ;
3902  int irq ;
3903  int i ;
3904  struct platform_device  const  *__cil_tmp6 ;
3905  unsigned long __cil_tmp7 ;
3906  unsigned long __cil_tmp8 ;
3907  unsigned long __cil_tmp9 ;
3908  unsigned long __cil_tmp10 ;
3909  unsigned long __cil_tmp11 ;
3910  char const   *__cil_tmp12 ;
3911  unsigned int __cil_tmp13 ;
3912  void *__cil_tmp14 ;
3913  unsigned int __cil_tmp15 ;
3914  void *__cil_tmp16 ;
3915  unsigned int __cil_tmp17 ;
3916  void *__cil_tmp18 ;
3917  unsigned long __cil_tmp19 ;
3918  unsigned long __cil_tmp20 ;
3919  unsigned long __cil_tmp21 ;
3920  unsigned long __cil_tmp22 ;
3921  struct power_supply *__cil_tmp23 ;
3922  unsigned long __cil_tmp24 ;
3923  unsigned long __cil_tmp25 ;
3924  struct power_supply *__cil_tmp26 ;
3925  unsigned long __cil_tmp27 ;
3926  unsigned long __cil_tmp28 ;
3927  struct power_supply *__cil_tmp29 ;
3928  void const   *__cil_tmp30 ;
3929
3930  {
3931  {
3932#line 629
3933  __cil_tmp6 = (struct platform_device  const  *)pdev;
3934#line 629
3935  tmp = platform_get_drvdata(__cil_tmp6);
3936#line 629
3937  wm831x_power = (struct wm831x_power *)tmp;
3938#line 632
3939  i = 0;
3940  }
3941  {
3942#line 632
3943  while (1) {
3944    while_continue: /* CIL Label */ ;
3945    {
3946#line 632
3947    __cil_tmp7 = 64UL / 8UL;
3948#line 632
3949    __cil_tmp8 = __cil_tmp7 + 0UL;
3950#line 632
3951    __cil_tmp9 = (unsigned long )i;
3952#line 632
3953    if (__cil_tmp9 < __cil_tmp8) {
3954
3955    } else {
3956#line 632
3957      goto while_break;
3958    }
3959    }
3960    {
3961#line 633
3962    __cil_tmp10 = i * 8UL;
3963#line 633
3964    __cil_tmp11 = (unsigned long )(wm831x_bat_irqs) + __cil_tmp10;
3965#line 633
3966    __cil_tmp12 = *((char const   **)__cil_tmp11);
3967#line 633
3968    irq = platform_get_irq_byname(pdev, __cil_tmp12);
3969#line 634
3970    __cil_tmp13 = (unsigned int )irq;
3971#line 634
3972    __cil_tmp14 = (void *)wm831x_power;
3973#line 634
3974    free_irq(__cil_tmp13, __cil_tmp14);
3975#line 632
3976    i = i + 1;
3977    }
3978  }
3979  while_break: /* CIL Label */ ;
3980  }
3981  {
3982#line 637
3983  irq = platform_get_irq_byname(pdev, "PWR SRC");
3984#line 638
3985  __cil_tmp15 = (unsigned int )irq;
3986#line 638
3987  __cil_tmp16 = (void *)wm831x_power;
3988#line 638
3989  free_irq(__cil_tmp15, __cil_tmp16);
3990#line 640
3991  irq = platform_get_irq_byname(pdev, "SYSLO");
3992#line 641
3993  __cil_tmp17 = (unsigned int )irq;
3994#line 641
3995  __cil_tmp18 = (void *)wm831x_power;
3996#line 641
3997  free_irq(__cil_tmp17, __cil_tmp18);
3998  }
3999  {
4000#line 643
4001  __cil_tmp19 = (unsigned long )wm831x_power;
4002#line 643
4003  __cil_tmp20 = __cil_tmp19 + 716;
4004#line 643
4005  if (*((bool *)__cil_tmp20)) {
4006    {
4007#line 644
4008    __cil_tmp21 = (unsigned long )wm831x_power;
4009#line 644
4010    __cil_tmp22 = __cil_tmp21 + 440;
4011#line 644
4012    __cil_tmp23 = (struct power_supply *)__cil_tmp22;
4013#line 644
4014    power_supply_unregister(__cil_tmp23);
4015    }
4016  } else {
4017
4018  }
4019  }
4020  {
4021#line 645
4022  __cil_tmp24 = (unsigned long )wm831x_power;
4023#line 645
4024  __cil_tmp25 = __cil_tmp24 + 8;
4025#line 645
4026  __cil_tmp26 = (struct power_supply *)__cil_tmp25;
4027#line 645
4028  power_supply_unregister(__cil_tmp26);
4029#line 646
4030  __cil_tmp27 = (unsigned long )wm831x_power;
4031#line 646
4032  __cil_tmp28 = __cil_tmp27 + 224;
4033#line 646
4034  __cil_tmp29 = (struct power_supply *)__cil_tmp28;
4035#line 646
4036  power_supply_unregister(__cil_tmp29);
4037#line 647
4038  __cil_tmp30 = (void const   *)wm831x_power;
4039#line 647
4040  kfree(__cil_tmp30);
4041  }
4042#line 648
4043  return (0);
4044}
4045}
4046#line 651 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
4047static struct platform_driver wm831x_power_driver  =    {& wm831x_power_probe, & wm831x_power_remove, (void (*)(struct platform_device * ))0,
4048    (int (*)(struct platform_device * , pm_message_t state ))0, (int (*)(struct platform_device * ))0,
4049    {"wm831x-power", (struct bus_type *)0, (struct module *)0, (char const   *)0,
4050     (_Bool)0, (struct of_device_id  const  *)0, (int (*)(struct device *dev ))0,
4051     (int (*)(struct device *dev ))0, (void (*)(struct device *dev ))0, (int (*)(struct device *dev ,
4052                                                                                 pm_message_t state ))0,
4053     (int (*)(struct device *dev ))0, (struct attribute_group  const  **)0, (struct dev_pm_ops  const  *)0,
4054     (struct driver_private *)0}, (struct platform_device_id  const  *)0};
4055#line 659
4056static int wm831x_power_driver_init(void)  __attribute__((__section__(".init.text"),
4057__no_instrument_function__)) ;
4058#line 659 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
4059static int wm831x_power_driver_init(void) 
4060{ int tmp ;
4061
4062  {
4063  {
4064#line 659
4065  tmp = platform_driver_register(& wm831x_power_driver);
4066  }
4067#line 659
4068  return (tmp);
4069}
4070}
4071#line 659 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
4072int init_module(void) 
4073{ int tmp ;
4074
4075  {
4076  {
4077#line 659
4078  tmp = wm831x_power_driver_init();
4079  }
4080#line 659
4081  return (tmp);
4082}
4083}
4084#line 659
4085static void wm831x_power_driver_exit(void)  __attribute__((__section__(".exit.text"),
4086__no_instrument_function__)) ;
4087#line 659 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
4088static void wm831x_power_driver_exit(void) 
4089{ 
4090
4091  {
4092  {
4093#line 659
4094  platform_driver_unregister(& wm831x_power_driver);
4095  }
4096#line 659
4097  return;
4098}
4099}
4100#line 659 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
4101void cleanup_module(void) 
4102{ 
4103
4104  {
4105  {
4106#line 659
4107  wm831x_power_driver_exit();
4108  }
4109#line 659
4110  return;
4111}
4112}
4113#line 661 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
4114static char const   __mod_description661[49]  __attribute__((__used__, __unused__,
4115__section__(".modinfo"), __aligned__(1)))  = 
4116#line 661
4117  {      (char const   )'d',      (char const   )'e',      (char const   )'s',      (char const   )'c', 
4118        (char const   )'r',      (char const   )'i',      (char const   )'p',      (char const   )'t', 
4119        (char const   )'i',      (char const   )'o',      (char const   )'n',      (char const   )'=', 
4120        (char const   )'P',      (char const   )'o',      (char const   )'w',      (char const   )'e', 
4121        (char const   )'r',      (char const   )' ',      (char const   )'s',      (char const   )'u', 
4122        (char const   )'p',      (char const   )'p',      (char const   )'l',      (char const   )'y', 
4123        (char const   )' ',      (char const   )'d',      (char const   )'r',      (char const   )'i', 
4124        (char const   )'v',      (char const   )'e',      (char const   )'r',      (char const   )' ', 
4125        (char const   )'f',      (char const   )'o',      (char const   )'r',      (char const   )' ', 
4126        (char const   )'W',      (char const   )'M',      (char const   )'8',      (char const   )'3', 
4127        (char const   )'1',      (char const   )'x',      (char const   )' ',      (char const   )'P', 
4128        (char const   )'M',      (char const   )'I',      (char const   )'C',      (char const   )'s', 
4129        (char const   )'\000'};
4130#line 662 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
4131static char const   __mod_author662[56]  __attribute__((__used__, __unused__, __section__(".modinfo"),
4132__aligned__(1)))  = 
4133#line 662
4134  {      (char const   )'a',      (char const   )'u',      (char const   )'t',      (char const   )'h', 
4135        (char const   )'o',      (char const   )'r',      (char const   )'=',      (char const   )'M', 
4136        (char const   )'a',      (char const   )'r',      (char const   )'k',      (char const   )' ', 
4137        (char const   )'B',      (char const   )'r',      (char const   )'o',      (char const   )'w', 
4138        (char const   )'n',      (char const   )' ',      (char const   )'<',      (char const   )'b', 
4139        (char const   )'r',      (char const   )'o',      (char const   )'o',      (char const   )'n', 
4140        (char const   )'i',      (char const   )'e',      (char const   )'@',      (char const   )'o', 
4141        (char const   )'p',      (char const   )'e',      (char const   )'n',      (char const   )'s', 
4142        (char const   )'o',      (char const   )'u',      (char const   )'r',      (char const   )'c', 
4143        (char const   )'e',      (char const   )'.',      (char const   )'w',      (char const   )'o', 
4144        (char const   )'l',      (char const   )'f',      (char const   )'s',      (char const   )'o', 
4145        (char const   )'n',      (char const   )'m',      (char const   )'i',      (char const   )'c', 
4146        (char const   )'r',      (char const   )'o',      (char const   )'.',      (char const   )'c', 
4147        (char const   )'o',      (char const   )'m',      (char const   )'>',      (char const   )'\000'};
4148#line 663 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
4149static char const   __mod_license663[12]  __attribute__((__used__, __unused__, __section__(".modinfo"),
4150__aligned__(1)))  = 
4151#line 663
4152  {      (char const   )'l',      (char const   )'i',      (char const   )'c',      (char const   )'e', 
4153        (char const   )'n',      (char const   )'s',      (char const   )'e',      (char const   )'=', 
4154        (char const   )'G',      (char const   )'P',      (char const   )'L',      (char const   )'\000'};
4155#line 664 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
4156static char const   __mod_alias664[28]  __attribute__((__used__, __unused__, __section__(".modinfo"),
4157__aligned__(1)))  = 
4158#line 664
4159  {      (char const   )'a',      (char const   )'l',      (char const   )'i',      (char const   )'a', 
4160        (char const   )'s',      (char const   )'=',      (char const   )'p',      (char const   )'l', 
4161        (char const   )'a',      (char const   )'t',      (char const   )'f',      (char const   )'o', 
4162        (char const   )'r',      (char const   )'m',      (char const   )':',      (char const   )'w', 
4163        (char const   )'m',      (char const   )'8',      (char const   )'3',      (char const   )'1', 
4164        (char const   )'x',      (char const   )'-',      (char const   )'p',      (char const   )'o', 
4165        (char const   )'w',      (char const   )'e',      (char const   )'r',      (char const   )'\000'};
4166#line 682
4167void ldv_check_final_state(void) ;
4168#line 685
4169extern void ldv_check_return_value(int res ) ;
4170#line 688
4171extern void ldv_initialize(void) ;
4172#line 691
4173extern int __VERIFIER_nondet_int(void) ;
4174#line 694 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
4175int LDV_IN_INTERRUPT  ;
4176#line 709 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
4177static int res_wm831x_power_probe_13  ;
4178#line 697 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
4179void main(void) 
4180{ struct platform_device *var_group1 ;
4181  int var_wm831x_bat_irq_10_p0 ;
4182  void *var_wm831x_bat_irq_10_p1 ;
4183  int var_wm831x_pwr_src_irq_12_p0 ;
4184  void *var_wm831x_pwr_src_irq_12_p1 ;
4185  int var_wm831x_syslo_irq_11_p0 ;
4186  void *var_wm831x_syslo_irq_11_p1 ;
4187  int ldv_s_wm831x_power_driver_platform_driver ;
4188  int tmp ;
4189  int tmp___0 ;
4190  int __cil_tmp11 ;
4191
4192  {
4193  {
4194#line 737
4195  LDV_IN_INTERRUPT = 1;
4196#line 746
4197  ldv_initialize();
4198#line 747
4199  ldv_s_wm831x_power_driver_platform_driver = 0;
4200  }
4201  {
4202#line 752
4203  while (1) {
4204    while_continue: /* CIL Label */ ;
4205    {
4206#line 752
4207    tmp___0 = __VERIFIER_nondet_int();
4208    }
4209#line 752
4210    if (tmp___0) {
4211
4212    } else {
4213      {
4214#line 752
4215      __cil_tmp11 = ldv_s_wm831x_power_driver_platform_driver == 0;
4216#line 752
4217      if (! __cil_tmp11) {
4218
4219      } else {
4220#line 752
4221        goto while_break;
4222      }
4223      }
4224    }
4225    {
4226#line 756
4227    tmp = __VERIFIER_nondet_int();
4228    }
4229#line 758
4230    if (tmp == 0) {
4231#line 758
4232      goto case_0;
4233    } else
4234#line 777
4235    if (tmp == 1) {
4236#line 777
4237      goto case_1;
4238    } else
4239#line 793
4240    if (tmp == 2) {
4241#line 793
4242      goto case_2;
4243    } else
4244#line 809
4245    if (tmp == 3) {
4246#line 809
4247      goto case_3;
4248    } else {
4249      {
4250#line 825
4251      goto switch_default;
4252#line 756
4253      if (0) {
4254        case_0: /* CIL Label */ 
4255#line 761
4256        if (ldv_s_wm831x_power_driver_platform_driver == 0) {
4257          {
4258#line 766
4259          res_wm831x_power_probe_13 = wm831x_power_probe(var_group1);
4260#line 767
4261          ldv_check_return_value(res_wm831x_power_probe_13);
4262          }
4263#line 768
4264          if (res_wm831x_power_probe_13) {
4265#line 769
4266            goto ldv_module_exit;
4267          } else {
4268
4269          }
4270#line 770
4271          ldv_s_wm831x_power_driver_platform_driver = 0;
4272        } else {
4273
4274        }
4275#line 776
4276        goto switch_break;
4277        case_1: /* CIL Label */ 
4278        {
4279#line 780
4280        LDV_IN_INTERRUPT = 2;
4281#line 785
4282        wm831x_bat_irq(var_wm831x_bat_irq_10_p0, var_wm831x_bat_irq_10_p1);
4283#line 786
4284        LDV_IN_INTERRUPT = 1;
4285        }
4286#line 792
4287        goto switch_break;
4288        case_2: /* CIL Label */ 
4289        {
4290#line 796
4291        LDV_IN_INTERRUPT = 2;
4292#line 801
4293        wm831x_pwr_src_irq(var_wm831x_pwr_src_irq_12_p0, var_wm831x_pwr_src_irq_12_p1);
4294#line 802
4295        LDV_IN_INTERRUPT = 1;
4296        }
4297#line 808
4298        goto switch_break;
4299        case_3: /* CIL Label */ 
4300        {
4301#line 812
4302        LDV_IN_INTERRUPT = 2;
4303#line 817
4304        wm831x_syslo_irq(var_wm831x_syslo_irq_11_p0, var_wm831x_syslo_irq_11_p1);
4305#line 818
4306        LDV_IN_INTERRUPT = 1;
4307        }
4308#line 824
4309        goto switch_break;
4310        switch_default: /* CIL Label */ 
4311#line 825
4312        goto switch_break;
4313      } else {
4314        switch_break: /* CIL Label */ ;
4315      }
4316      }
4317    }
4318  }
4319  while_break: /* CIL Label */ ;
4320  }
4321  ldv_module_exit: 
4322  {
4323#line 834
4324  ldv_check_final_state();
4325  }
4326#line 837
4327  return;
4328}
4329}
4330#line 5 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/kernel-rules/files/engine-blast-assert.h"
4331void ldv_blast_assert(void) 
4332{ 
4333
4334  {
4335  ERROR: 
4336#line 6
4337  goto ERROR;
4338}
4339}
4340#line 6 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/kernel-rules/files/engine-blast.h"
4341extern int __VERIFIER_nondet_int(void) ;
4342#line 19 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/kernel-rules/files/model0032.c"
4343int ldv_mutex  =    1;
4344#line 22 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/kernel-rules/files/model0032.c"
4345int __attribute__((__warn_unused_result__))  mutex_lock_interruptible(struct mutex *lock ) 
4346{ int nondetermined ;
4347
4348  {
4349#line 29
4350  if (ldv_mutex == 1) {
4351
4352  } else {
4353    {
4354#line 29
4355    ldv_blast_assert();
4356    }
4357  }
4358  {
4359#line 32
4360  nondetermined = __VERIFIER_nondet_int();
4361  }
4362#line 35
4363  if (nondetermined) {
4364#line 38
4365    ldv_mutex = 2;
4366#line 40
4367    return (0);
4368  } else {
4369#line 45
4370    return (-4);
4371  }
4372}
4373}
4374#line 50 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/kernel-rules/files/model0032.c"
4375int __attribute__((__warn_unused_result__))  mutex_lock_killable(struct mutex *lock ) 
4376{ int nondetermined ;
4377
4378  {
4379#line 57
4380  if (ldv_mutex == 1) {
4381
4382  } else {
4383    {
4384#line 57
4385    ldv_blast_assert();
4386    }
4387  }
4388  {
4389#line 60
4390  nondetermined = __VERIFIER_nondet_int();
4391  }
4392#line 63
4393  if (nondetermined) {
4394#line 66
4395    ldv_mutex = 2;
4396#line 68
4397    return (0);
4398  } else {
4399#line 73
4400    return (-4);
4401  }
4402}
4403}
4404#line 78 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/kernel-rules/files/model0032.c"
4405int atomic_dec_and_mutex_lock(atomic_t *cnt , struct mutex *lock ) 
4406{ int atomic_value_after_dec ;
4407
4408  {
4409#line 83
4410  if (ldv_mutex == 1) {
4411
4412  } else {
4413    {
4414#line 83
4415    ldv_blast_assert();
4416    }
4417  }
4418  {
4419#line 86
4420  atomic_value_after_dec = __VERIFIER_nondet_int();
4421  }
4422#line 89
4423  if (atomic_value_after_dec == 0) {
4424#line 92
4425    ldv_mutex = 2;
4426#line 94
4427    return (1);
4428  } else {
4429
4430  }
4431#line 98
4432  return (0);
4433}
4434}
4435#line 103 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/kernel-rules/files/model0032.c"
4436void mutex_lock(struct mutex *lock ) 
4437{ 
4438
4439  {
4440#line 108
4441  if (ldv_mutex == 1) {
4442
4443  } else {
4444    {
4445#line 108
4446    ldv_blast_assert();
4447    }
4448  }
4449#line 110
4450  ldv_mutex = 2;
4451#line 111
4452  return;
4453}
4454}
4455#line 114 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/kernel-rules/files/model0032.c"
4456int mutex_trylock(struct mutex *lock ) 
4457{ int nondetermined ;
4458
4459  {
4460#line 121
4461  if (ldv_mutex == 1) {
4462
4463  } else {
4464    {
4465#line 121
4466    ldv_blast_assert();
4467    }
4468  }
4469  {
4470#line 124
4471  nondetermined = __VERIFIER_nondet_int();
4472  }
4473#line 127
4474  if (nondetermined) {
4475#line 130
4476    ldv_mutex = 2;
4477#line 132
4478    return (1);
4479  } else {
4480#line 137
4481    return (0);
4482  }
4483}
4484}
4485#line 142 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/kernel-rules/files/model0032.c"
4486void mutex_unlock(struct mutex *lock ) 
4487{ 
4488
4489  {
4490#line 147
4491  if (ldv_mutex == 2) {
4492
4493  } else {
4494    {
4495#line 147
4496    ldv_blast_assert();
4497    }
4498  }
4499#line 149
4500  ldv_mutex = 1;
4501#line 150
4502  return;
4503}
4504}
4505#line 153 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/kernel-rules/files/model0032.c"
4506void ldv_check_final_state(void) 
4507{ 
4508
4509  {
4510#line 156
4511  if (ldv_mutex == 1) {
4512
4513  } else {
4514    {
4515#line 156
4516    ldv_blast_assert();
4517    }
4518  }
4519#line 157
4520  return;
4521}
4522}
4523#line 846 "/home/zakharov/launch/work/current--X--drivers/--X--defaultlinux-3.4--X--32_1--X--cpachecker/linux-3.4/csd_deg_dscv/1060/dscv_tempdir/dscv/ri/32_1/drivers/power/wm831x_power.c.common.c"
4524long s__builtin_expect(long val , long res ) 
4525{ 
4526
4527  {
4528#line 847
4529  return (val);
4530}
4531}