extern void abort(void); extern void __assert_fail(const char *, const char *, unsigned int, const char *) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__noreturn__)); void reach_error() { __assert_fail("0", "drivers--mtd--ar7part.ko_005.e0d6511.39_7a.cil_true-unreach-call.i", 3, "reach_error"); } /* Generated by CIL v. 1.5.1 */ /* print_CIL_Input is false */ typedef unsigned char __u8; typedef unsigned short __u16; typedef unsigned int __u32; typedef unsigned long long __u64; typedef unsigned char u8; typedef unsigned short u16; typedef unsigned int u32; typedef long long s64; typedef unsigned long long u64; typedef unsigned int __kernel_mode_t; typedef unsigned long __kernel_size_t; typedef long __kernel_ssize_t; typedef long long __kernel_loff_t; typedef __u32 __kernel_dev_t; typedef __kernel_dev_t dev_t; typedef __kernel_mode_t mode_t; typedef _Bool bool; typedef __kernel_loff_t loff_t; typedef __kernel_size_t size_t; typedef __kernel_ssize_t ssize_t; typedef unsigned char u_char; typedef unsigned long u_long; typedef __u8 uint8_t; typedef __u32 uint32_t; typedef __u64 uint64_t; typedef unsigned int gfp_t; typedef u64 phys_addr_t; typedef phys_addr_t resource_size_t; struct __anonstruct_atomic_t_6 { int counter ; }; typedef struct __anonstruct_atomic_t_6 atomic_t; struct __anonstruct_atomic64_t_7 { long counter ; }; typedef struct __anonstruct_atomic64_t_7 atomic64_t; struct list_head { struct list_head *next ; struct list_head *prev ; }; struct module; typedef void (*ctor_fn_t)(void); struct device; struct bug_entry { int bug_addr_disp ; int file_disp ; unsigned short line ; unsigned short flags ; }; struct completion; struct page; struct task_struct; struct file; struct arch_spinlock; struct jump_label_key; struct kmem_cache; typedef atomic64_t atomic_long_t; typedef u16 __ticket_t; typedef u32 __ticketpair_t; struct __raw_tickets { __ticket_t head ; __ticket_t tail ; }; union __anonunion_ldv_5907_29 { __ticketpair_t head_tail ; struct __raw_tickets tickets ; }; struct arch_spinlock { union __anonunion_ldv_5907_29 ldv_5907 ; }; typedef struct arch_spinlock arch_spinlock_t; struct lockdep_map; struct stack_trace { unsigned int nr_entries ; unsigned int max_entries ; unsigned long *entries ; int skip ; }; struct lockdep_subclass_key { char __one_byte ; }; struct lock_class_key { struct lockdep_subclass_key subkeys[8U] ; }; struct lock_class { struct list_head hash_entry ; struct list_head lock_entry ; struct lockdep_subclass_key *key ; unsigned int subclass ; unsigned int dep_gen_id ; unsigned long usage_mask ; struct stack_trace usage_traces[13U] ; struct list_head locks_after ; struct list_head locks_before ; unsigned int version ; unsigned long ops ; char const *name ; int name_version ; unsigned long contention_point[4U] ; unsigned long contending_point[4U] ; }; struct lockdep_map { struct lock_class_key *key ; struct lock_class *class_cache[2U] ; char const *name ; int cpu ; unsigned long ip ; }; struct raw_spinlock { arch_spinlock_t raw_lock ; unsigned int magic ; unsigned int owner_cpu ; void *owner ; struct lockdep_map dep_map ; }; struct __anonstruct_ldv_6126_33 { u8 __padding[24U] ; struct lockdep_map dep_map ; }; union __anonunion_ldv_6127_32 { struct raw_spinlock rlock ; struct __anonstruct_ldv_6126_33 ldv_6126 ; }; struct spinlock { union __anonunion_ldv_6127_32 ldv_6127 ; }; typedef struct spinlock spinlock_t; struct __wait_queue_head { spinlock_t lock ; struct list_head task_list ; }; typedef struct __wait_queue_head wait_queue_head_t; struct mutex { atomic_t count ; spinlock_t wait_lock ; struct list_head wait_list ; struct task_struct *owner ; char const *name ; void *magic ; struct lockdep_map dep_map ; }; struct notifier_block { int (*notifier_call)(struct notifier_block * , unsigned long , void * ) ; struct notifier_block *next ; int priority ; }; union ktime { s64 tv64 ; }; typedef union ktime ktime_t; struct tvec_base; struct timer_list { struct list_head entry ; unsigned long expires ; struct tvec_base *base ; void (*function)(unsigned long ) ; unsigned long data ; int slack ; int start_pid ; void *start_site ; char start_comm[16U] ; struct lockdep_map lockdep_map ; }; struct work_struct; struct work_struct { atomic_long_t data ; struct list_head entry ; void (*func)(struct work_struct * ) ; struct lockdep_map lockdep_map ; }; struct completion { unsigned int done ; wait_queue_head_t wait ; }; struct pm_message { int event ; }; typedef struct pm_message pm_message_t; struct dev_pm_ops { int (*prepare)(struct device * ) ; void (*complete)(struct device * ) ; int (*suspend)(struct device * ) ; int (*resume)(struct device * ) ; int (*freeze)(struct device * ) ; int (*thaw)(struct device * ) ; int (*poweroff)(struct device * ) ; int (*restore)(struct device * ) ; int (*suspend_noirq)(struct device * ) ; int (*resume_noirq)(struct device * ) ; int (*freeze_noirq)(struct device * ) ; int (*thaw_noirq)(struct device * ) ; int (*poweroff_noirq)(struct device * ) ; int (*restore_noirq)(struct device * ) ; int (*runtime_suspend)(struct device * ) ; int (*runtime_resume)(struct device * ) ; int (*runtime_idle)(struct device * ) ; }; enum rpm_status { RPM_ACTIVE = 0, RPM_RESUMING = 1, RPM_SUSPENDED = 2, RPM_SUSPENDING = 3 } ; enum rpm_request { RPM_REQ_NONE = 0, RPM_REQ_IDLE = 1, RPM_REQ_SUSPEND = 2, RPM_REQ_AUTOSUSPEND = 3, RPM_REQ_RESUME = 4 } ; struct wakeup_source; struct pm_subsys_data { spinlock_t lock ; unsigned int refcount ; }; struct pm_qos_constraints; struct dev_pm_info { pm_message_t power_state ; unsigned char can_wakeup : 1 ; unsigned char async_suspend : 1 ; bool is_prepared ; bool is_suspended ; spinlock_t lock ; struct list_head entry ; struct completion completion ; struct wakeup_source *wakeup ; bool wakeup_path ; struct timer_list suspend_timer ; unsigned long timer_expires ; struct work_struct work ; wait_queue_head_t wait_queue ; atomic_t usage_count ; atomic_t child_count ; unsigned char disable_depth : 3 ; unsigned char ignore_children : 1 ; unsigned char idle_notification : 1 ; unsigned char request_pending : 1 ; unsigned char deferred_resume : 1 ; unsigned char run_wake : 1 ; unsigned char runtime_auto : 1 ; unsigned char no_callbacks : 1 ; unsigned char irq_safe : 1 ; unsigned char use_autosuspend : 1 ; unsigned char timer_autosuspends : 1 ; enum rpm_request request ; enum rpm_status runtime_status ; int runtime_error ; int autosuspend_delay ; unsigned long last_busy ; unsigned long active_jiffies ; unsigned long suspended_jiffies ; unsigned long accounting_timestamp ; struct pm_subsys_data *subsys_data ; struct pm_qos_constraints *constraints ; }; struct dev_pm_domain { struct dev_pm_ops ops ; }; struct vm_area_struct; struct sock; struct kobject; enum kobj_ns_type { KOBJ_NS_TYPE_NONE = 0, KOBJ_NS_TYPE_NET = 1, KOBJ_NS_TYPES = 2 } ; struct kobj_ns_type_operations { enum kobj_ns_type type ; void *(*grab_current_ns)(void) ; void const *(*netlink_ns)(struct sock * ) ; void const *(*initial_ns)(void) ; void (*drop_ns)(void * ) ; }; struct attribute { char const *name ; mode_t mode ; struct lock_class_key *key ; struct lock_class_key skey ; }; struct attribute_group { char const *name ; mode_t (*is_visible)(struct kobject * , struct attribute * , int ) ; struct attribute **attrs ; }; struct bin_attribute { struct attribute attr ; size_t size ; void *private ; ssize_t (*read)(struct file * , struct kobject * , struct bin_attribute * , char * , loff_t , size_t ) ; ssize_t (*write)(struct file * , struct kobject * , struct bin_attribute * , char * , loff_t , size_t ) ; int (*mmap)(struct file * , struct kobject * , struct bin_attribute * , struct vm_area_struct * ) ; }; struct sysfs_ops { ssize_t (*show)(struct kobject * , struct attribute * , char * ) ; ssize_t (*store)(struct kobject * , struct attribute * , char const * , size_t ) ; void const *(*namespace)(struct kobject * , struct attribute const * ) ; }; struct sysfs_dirent; struct kref { atomic_t refcount ; }; struct kset; struct kobj_type; struct kobject { char const *name ; struct list_head entry ; struct kobject *parent ; struct kset *kset ; struct kobj_type *ktype ; struct sysfs_dirent *sd ; struct kref kref ; unsigned char state_initialized : 1 ; unsigned char state_in_sysfs : 1 ; unsigned char state_add_uevent_sent : 1 ; unsigned char state_remove_uevent_sent : 1 ; unsigned char uevent_suppress : 1 ; }; struct kobj_type { void (*release)(struct kobject * ) ; struct sysfs_ops const *sysfs_ops ; struct attribute **default_attrs ; struct kobj_ns_type_operations const *(*child_ns_type)(struct kobject * ) ; void const *(*namespace)(struct kobject * ) ; }; struct kobj_uevent_env { char *envp[32U] ; int envp_idx ; char buf[2048U] ; int buflen ; }; struct kset_uevent_ops { int (* const filter)(struct kset * , struct kobject * ) ; char const *(* const name)(struct kset * , struct kobject * ) ; int (* const uevent)(struct kset * , struct kobject * , struct kobj_uevent_env * ) ; }; struct kset { struct list_head list ; spinlock_t list_lock ; struct kobject kobj ; struct kset_uevent_ops const *uevent_ops ; }; struct kmem_cache_cpu { void **freelist ; unsigned long tid ; struct page *page ; struct page *partial ; int node ; unsigned int stat[24U] ; }; struct kmem_cache_node { spinlock_t list_lock ; unsigned long nr_partial ; struct list_head partial ; atomic_long_t nr_slabs ; atomic_long_t total_objects ; struct list_head full ; }; struct kmem_cache_order_objects { unsigned long x ; }; struct kmem_cache { struct kmem_cache_cpu *cpu_slab ; unsigned long flags ; unsigned long min_partial ; int size ; int objsize ; int offset ; int cpu_partial ; struct kmem_cache_order_objects oo ; struct kmem_cache_order_objects max ; struct kmem_cache_order_objects min ; gfp_t allocflags ; int refcount ; void (*ctor)(void * ) ; int inuse ; int align ; int reserved ; char const *name ; struct list_head list ; struct kobject kobj ; int remote_node_defrag_ratio ; struct kmem_cache_node *node[1024U] ; }; struct kvec { void *iov_base ; size_t iov_len ; }; struct klist_node; struct klist_node { void *n_klist ; struct list_head n_node ; struct kref n_ref ; }; struct dma_map_ops; struct dev_archdata { void *acpi_handle ; struct dma_map_ops *dma_ops ; void *iommu ; }; struct device_private; struct device_driver; struct driver_private; struct class; struct subsys_private; struct bus_type; struct device_node; struct iommu_ops; struct bus_attribute { struct attribute attr ; ssize_t (*show)(struct bus_type * , char * ) ; ssize_t (*store)(struct bus_type * , char const * , size_t ) ; }; struct device_attribute; struct driver_attribute; struct bus_type { char const *name ; struct bus_attribute *bus_attrs ; struct device_attribute *dev_attrs ; struct driver_attribute *drv_attrs ; int (*match)(struct device * , struct device_driver * ) ; int (*uevent)(struct device * , struct kobj_uevent_env * ) ; int (*probe)(struct device * ) ; int (*remove)(struct device * ) ; void (*shutdown)(struct device * ) ; int (*suspend)(struct device * , pm_message_t ) ; int (*resume)(struct device * ) ; struct dev_pm_ops const *pm ; struct iommu_ops *iommu_ops ; struct subsys_private *p ; }; struct of_device_id; struct device_driver { char const *name ; struct bus_type *bus ; struct module *owner ; char const *mod_name ; bool suppress_bind_attrs ; struct of_device_id const *of_match_table ; int (*probe)(struct device * ) ; int (*remove)(struct device * ) ; void (*shutdown)(struct device * ) ; int (*suspend)(struct device * , pm_message_t ) ; int (*resume)(struct device * ) ; struct attribute_group const **groups ; struct dev_pm_ops const *pm ; struct driver_private *p ; }; struct driver_attribute { struct attribute attr ; ssize_t (*show)(struct device_driver * , char * ) ; ssize_t (*store)(struct device_driver * , char const * , size_t ) ; }; struct class_attribute; struct class { char const *name ; struct module *owner ; struct class_attribute *class_attrs ; struct device_attribute *dev_attrs ; struct bin_attribute *dev_bin_attrs ; struct kobject *dev_kobj ; int (*dev_uevent)(struct device * , struct kobj_uevent_env * ) ; char *(*devnode)(struct device * , mode_t * ) ; void (*class_release)(struct class * ) ; void (*dev_release)(struct device * ) ; int (*suspend)(struct device * , pm_message_t ) ; int (*resume)(struct device * ) ; struct kobj_ns_type_operations const *ns_type ; void const *(*namespace)(struct device * ) ; struct dev_pm_ops const *pm ; struct subsys_private *p ; }; struct device_type; struct class_attribute { struct attribute attr ; ssize_t (*show)(struct class * , struct class_attribute * , char * ) ; ssize_t (*store)(struct class * , struct class_attribute * , char const * , size_t ) ; void const *(*namespace)(struct class * , struct class_attribute const * ) ; }; struct device_type { char const *name ; struct attribute_group const **groups ; int (*uevent)(struct device * , struct kobj_uevent_env * ) ; char *(*devnode)(struct device * , mode_t * ) ; void (*release)(struct device * ) ; struct dev_pm_ops const *pm ; }; struct device_attribute { struct attribute attr ; ssize_t (*show)(struct device * , struct device_attribute * , char * ) ; ssize_t (*store)(struct device * , struct device_attribute * , char const * , size_t ) ; }; struct device_dma_parameters { unsigned int max_segment_size ; unsigned long segment_boundary_mask ; }; struct dma_coherent_mem; struct device { struct device *parent ; struct device_private *p ; struct kobject kobj ; char const *init_name ; struct device_type const *type ; struct mutex mutex ; struct bus_type *bus ; struct device_driver *driver ; void *platform_data ; struct dev_pm_info power ; struct dev_pm_domain *pm_domain ; int numa_node ; u64 *dma_mask ; u64 coherent_dma_mask ; struct device_dma_parameters *dma_parms ; struct list_head dma_pools ; struct dma_coherent_mem *dma_mem ; struct dev_archdata archdata ; struct device_node *of_node ; dev_t devt ; spinlock_t devres_lock ; struct list_head devres_head ; struct klist_node knode_class ; struct class *class ; struct attribute_group const **groups ; void (*release)(struct device * ) ; }; struct wakeup_source { char *name ; struct list_head entry ; spinlock_t lock ; struct timer_list timer ; unsigned long timer_expires ; ktime_t total_time ; ktime_t max_time ; ktime_t last_time ; unsigned long event_count ; unsigned long active_count ; unsigned long relax_count ; unsigned long hit_count ; unsigned char active : 1 ; }; struct otp_info { __u32 start ; __u32 length ; __u32 locked ; }; struct nand_oobfree { __u32 offset ; __u32 length ; }; struct mtd_ecc_stats { __u32 corrected ; __u32 failed ; __u32 badblocks ; __u32 bbtblocks ; }; struct mtd_info; struct erase_info { struct mtd_info *mtd ; uint64_t addr ; uint64_t len ; uint64_t fail_addr ; u_long time ; u_long retries ; unsigned int dev ; unsigned int cell ; void (*callback)(struct erase_info * ) ; u_long priv ; u_char state ; struct erase_info *next ; }; struct mtd_erase_region_info { uint64_t offset ; uint32_t erasesize ; uint32_t numblocks ; unsigned long *lockmap ; }; struct mtd_oob_ops { unsigned int mode ; size_t len ; size_t retlen ; size_t ooblen ; size_t oobretlen ; uint32_t ooboffs ; uint8_t *datbuf ; uint8_t *oobbuf ; }; struct nand_ecclayout { __u32 eccbytes ; __u32 eccpos[448U] ; __u32 oobavail ; struct nand_oobfree oobfree[32U] ; }; struct backing_dev_info; struct mtd_info { u_char type ; uint32_t flags ; uint64_t size ; uint32_t erasesize ; uint32_t writesize ; uint32_t writebufsize ; uint32_t oobsize ; uint32_t oobavail ; unsigned int erasesize_shift ; unsigned int writesize_shift ; unsigned int erasesize_mask ; unsigned int writesize_mask ; char const *name ; int index ; struct nand_ecclayout *ecclayout ; int numeraseregions ; struct mtd_erase_region_info *eraseregions ; int (*erase)(struct mtd_info * , struct erase_info * ) ; int (*point)(struct mtd_info * , loff_t , size_t , size_t * , void ** , resource_size_t * ) ; void (*unpoint)(struct mtd_info * , loff_t , size_t ) ; unsigned long (*get_unmapped_area)(struct mtd_info * , unsigned long , unsigned long , unsigned long ) ; struct backing_dev_info *backing_dev_info ; int (*read)(struct mtd_info * , loff_t , size_t , size_t * , u_char * ) ; int (*write)(struct mtd_info * , loff_t , size_t , size_t * , u_char const * ) ; int (*panic_write)(struct mtd_info * , loff_t , size_t , size_t * , u_char const * ) ; int (*read_oob)(struct mtd_info * , loff_t , struct mtd_oob_ops * ) ; int (*write_oob)(struct mtd_info * , loff_t , struct mtd_oob_ops * ) ; int (*get_fact_prot_info)(struct mtd_info * , struct otp_info * , size_t ) ; int (*read_fact_prot_reg)(struct mtd_info * , loff_t , size_t , size_t * , u_char * ) ; int (*get_user_prot_info)(struct mtd_info * , struct otp_info * , size_t ) ; int (*read_user_prot_reg)(struct mtd_info * , loff_t , size_t , size_t * , u_char * ) ; int (*write_user_prot_reg)(struct mtd_info * , loff_t , size_t , size_t * , u_char * ) ; int (*lock_user_prot_reg)(struct mtd_info * , loff_t , size_t ) ; int (*writev)(struct mtd_info * , struct kvec const * , unsigned long , loff_t , size_t * ) ; void (*sync)(struct mtd_info * ) ; int (*lock)(struct mtd_info * , loff_t , uint64_t ) ; int (*unlock)(struct mtd_info * , loff_t , uint64_t ) ; int (*is_locked)(struct mtd_info * , loff_t , uint64_t ) ; int (*suspend)(struct mtd_info * ) ; void (*resume)(struct mtd_info * ) ; int (*block_isbad)(struct mtd_info * , loff_t ) ; int (*block_markbad)(struct mtd_info * , loff_t ) ; struct notifier_block reboot_notifier ; struct mtd_ecc_stats ecc_stats ; int subpage_sft ; void *priv ; struct module *owner ; struct device dev ; int usecount ; int (*get_device)(struct mtd_info * ) ; void (*put_device)(struct mtd_info * ) ; }; struct mtd_partition; struct mtd_part_parser_data; struct mtd_partition { char *name ; uint64_t size ; uint64_t offset ; uint32_t mask_flags ; struct nand_ecclayout *ecclayout ; }; struct mtd_part_parser_data { unsigned long origin ; struct device_node *of_node ; }; struct mtd_part_parser { struct list_head list ; struct module *owner ; char const *name ; int (*parse_fn)(struct mtd_info * , struct mtd_partition ** , struct mtd_part_parser_data * ) ; }; typedef __u64 Elf64_Addr; typedef __u16 Elf64_Half; typedef __u32 Elf64_Word; typedef __u64 Elf64_Xword; struct elf64_sym { Elf64_Word st_name ; unsigned char st_info ; unsigned char st_other ; Elf64_Half st_shndx ; Elf64_Addr st_value ; Elf64_Xword st_size ; }; typedef struct elf64_sym Elf64_Sym; struct kernel_param; struct kernel_param_ops { int (*set)(char const * , struct kernel_param const * ) ; int (*get)(char * , struct kernel_param const * ) ; void (*free)(void * ) ; }; struct kparam_string; struct kparam_array; union __anonunion_ldv_14658_134 { void *arg ; struct kparam_string const *str ; struct kparam_array const *arr ; }; struct kernel_param { char const *name ; struct kernel_param_ops const *ops ; u16 perm ; u16 flags ; union __anonunion_ldv_14658_134 ldv_14658 ; }; struct kparam_string { unsigned int maxlen ; char *string ; }; struct kparam_array { unsigned int max ; unsigned int elemsize ; unsigned int *num ; struct kernel_param_ops const *ops ; void *elem ; }; struct jump_label_key { atomic_t enabled ; }; struct tracepoint; struct tracepoint_func { void *func ; void *data ; }; struct tracepoint { char const *name ; struct jump_label_key key ; void (*regfunc)(void) ; void (*unregfunc)(void) ; struct tracepoint_func *funcs ; }; struct kernel_symbol { unsigned long value ; char const *name ; }; struct mod_arch_specific { }; struct module_param_attrs; struct module_kobject { struct kobject kobj ; struct module *mod ; struct kobject *drivers_dir ; struct module_param_attrs *mp ; }; struct module_attribute { struct attribute attr ; ssize_t (*show)(struct module_attribute * , struct module_kobject * , char * ) ; ssize_t (*store)(struct module_attribute * , struct module_kobject * , char const * , size_t ) ; void (*setup)(struct module * , char const * ) ; int (*test)(struct module * ) ; void (*free)(struct module * ) ; }; struct exception_table_entry; enum module_state { MODULE_STATE_LIVE = 0, MODULE_STATE_COMING = 1, MODULE_STATE_GOING = 2 } ; struct module_ref { unsigned int incs ; unsigned int decs ; }; struct module_sect_attrs; struct module_notes_attrs; struct ftrace_event_call; struct module { enum module_state state ; struct list_head list ; char name[56U] ; struct module_kobject mkobj ; struct module_attribute *modinfo_attrs ; char const *version ; char const *srcversion ; struct kobject *holders_dir ; struct kernel_symbol const *syms ; unsigned long const *crcs ; unsigned int num_syms ; struct kernel_param *kp ; unsigned int num_kp ; unsigned int num_gpl_syms ; struct kernel_symbol const *gpl_syms ; unsigned long const *gpl_crcs ; struct kernel_symbol const *unused_syms ; unsigned long const *unused_crcs ; unsigned int num_unused_syms ; unsigned int num_unused_gpl_syms ; struct kernel_symbol const *unused_gpl_syms ; unsigned long const *unused_gpl_crcs ; struct kernel_symbol const *gpl_future_syms ; unsigned long const *gpl_future_crcs ; unsigned int num_gpl_future_syms ; unsigned int num_exentries ; struct exception_table_entry *extable ; int (*init)(void) ; void *module_init ; void *module_core ; unsigned int init_size ; unsigned int core_size ; unsigned int init_text_size ; unsigned int core_text_size ; unsigned int init_ro_size ; unsigned int core_ro_size ; struct mod_arch_specific arch ; unsigned int taints ; unsigned int num_bugs ; struct list_head bug_list ; struct bug_entry *bug_table ; Elf64_Sym *symtab ; Elf64_Sym *core_symtab ; unsigned int num_symtab ; unsigned int core_num_syms ; char *strtab ; char *core_strtab ; struct module_sect_attrs *sect_attrs ; struct module_notes_attrs *notes_attrs ; char *args ; void *percpu ; unsigned int percpu_size ; unsigned int num_tracepoints ; struct tracepoint * const *tracepoints_ptrs ; unsigned int num_trace_bprintk_fmt ; char const **trace_bprintk_fmt_start ; struct ftrace_event_call **trace_events ; unsigned int num_trace_events ; struct list_head source_list ; struct list_head target_list ; struct task_struct *waiter ; void (*exit)(void) ; struct module_ref *refptr ; ctor_fn_t (**ctors)(void) ; unsigned int num_ctors ; }; struct ar7_bin_rec { unsigned int checksum ; unsigned int length ; unsigned int address ; }; extern int printk(char const * , ...) ; extern int strncmp(char const * , char const * , __kernel_size_t ) ; extern void __ldv_spin_lock(spinlock_t * ) ; void ldv___ldv_spin_lock_4(spinlock_t *ldv_func_arg1 ) ; void ldv___ldv_spin_lock_6(spinlock_t *ldv_func_arg1 ) ; void ldv_spin_lock_dma_spin_lock(void) ; void ldv_spin_lock_node_size_lock_of_pglist_data(void) ; extern void *__kmalloc(size_t , gfp_t ) ; __inline static void *kmalloc(size_t size , gfp_t flags ) { void *tmp___2 ; { tmp___2 = __kmalloc(size, flags); return (tmp___2); } } __inline static void *kzalloc(size_t size , gfp_t flags ) { void *tmp ; { tmp = kmalloc(size, flags | 32768U); return (tmp); } } extern int register_mtd_parser(struct mtd_part_parser * ) ; extern struct module __this_module ; static int create_mtd_partitions(struct mtd_info *master , struct mtd_partition **pparts , struct mtd_part_parser_data *data ) { struct ar7_bin_rec header ; unsigned int offset ; size_t len ; unsigned int pre_size ; unsigned int post_size ; unsigned int root_offset ; int retries ; struct mtd_partition *ar7_parts ; void *tmp ; int tmp___0 ; int tmp___1 ; { pre_size = master->erasesize; post_size = 0U; root_offset = 917504U; retries = 10; tmp = kzalloc(160UL, 208U); ar7_parts = (struct mtd_partition *)tmp; if ((unsigned long )ar7_parts == (unsigned long )((struct mtd_partition *)0)) { return (-12); } else { } ar7_parts->name = (char *)"loader"; ar7_parts->offset = 0ULL; ar7_parts->size = (uint64_t )master->erasesize; ar7_parts->mask_flags = 1024U; (ar7_parts + 1UL)->name = (char *)"config"; (ar7_parts + 1UL)->offset = 0ULL; (ar7_parts + 1UL)->size = (uint64_t )master->erasesize; (ar7_parts + 1UL)->mask_flags = 0U; ldv_15404: offset = pre_size; (*(master->read))(master, (loff_t )offset, 12UL, & len, (u_char *)(& header)); tmp___0 = strncmp((char const *)(& header), "TIENV0.8", 8UL); if (tmp___0 == 0) { (ar7_parts + 1UL)->offset = (uint64_t )pre_size; } else { } if (header.checksum == 4277008962U) { goto ldv_15403; } else { } if (header.checksum == 4276949633U) { goto ldv_15403; } else { } pre_size = master->erasesize + pre_size; tmp___1 = retries; retries = retries - 1; if (tmp___1 != 0) { goto ldv_15404; } else { } ldv_15403: pre_size = offset; if ((ar7_parts + 1UL)->offset == 0ULL) { (ar7_parts + 1UL)->offset = master->size - (uint64_t )master->erasesize; post_size = master->erasesize; } else { } switch (header.checksum) { case 4277008962U: ; goto ldv_15407; ldv_15406: offset = (header.length + offset) + 12U; (*(master->read))(master, (loff_t )offset, 12UL, & len, (u_char *)(& header)); ldv_15407: ; if (header.length != 0U) { goto ldv_15406; } else { } root_offset = offset + 16U; goto ldv_15409; case 4276949633U: ; goto ldv_15412; ldv_15411: offset = (header.length + offset) + 12U; (*(master->read))(master, (loff_t )offset, 12UL, & len, (u_char *)(& header)); ldv_15412: ; if (header.length != 0U) { goto ldv_15411; } else { } root_offset = offset + 271U; root_offset = root_offset & 4294967040U; goto ldv_15409; default: printk("<4>Unknown magic: %08x\n", header.checksum); goto ldv_15409; } ldv_15409: (*(master->read))(master, (loff_t )root_offset, 12UL, & len, (u_char *)(& header)); if (header.checksum != 1936814952U) { root_offset = (master->erasesize + root_offset) - 1U; root_offset = - master->erasesize & root_offset; } else { } (ar7_parts + 2UL)->name = (char *)"linux"; (ar7_parts + 2UL)->offset = (uint64_t )pre_size; (ar7_parts + 2UL)->size = (master->size - (uint64_t )pre_size) - (uint64_t )post_size; (ar7_parts + 2UL)->mask_flags = 0U; (ar7_parts + 3UL)->name = (char *)"rootfs"; (ar7_parts + 3UL)->offset = (uint64_t )root_offset; (ar7_parts + 3UL)->size = (master->size - (uint64_t )root_offset) - (uint64_t )post_size; (ar7_parts + 3UL)->mask_flags = 0U; *pparts = ar7_parts; return (4); } } static struct mtd_part_parser ar7_parser = {{0, 0}, & __this_module, "ar7part", & create_mtd_partitions}; static int ar7_parser_init(void) { int tmp ; { tmp = register_mtd_parser(& ar7_parser); return (tmp); } } void ldv_check_final_state(void) ; void ldv_initialize(void) ; extern void ldv_handler_precall(void) ; extern int nondet_int(void) ; int LDV_IN_INTERRUPT ; int main(void) { struct mtd_info *var_group1 ; struct mtd_partition **var_group2 ; struct mtd_part_parser_data *var_create_mtd_partitions_0_p2 ; int tmp ; int tmp___0 ; int tmp___1 ; { LDV_IN_INTERRUPT = 1; ldv_initialize(); ldv_handler_precall(); tmp = ar7_parser_init(); if (tmp != 0) { goto ldv_final; } else { } goto ldv_15451; ldv_15450: tmp___0 = nondet_int(); switch (tmp___0) { case 0: ldv_handler_precall(); create_mtd_partitions(var_group1, var_group2, var_create_mtd_partitions_0_p2); goto ldv_15448; default: ; goto ldv_15448; } ldv_15448: ; ldv_15451: tmp___1 = nondet_int(); if (tmp___1 != 0) { goto ldv_15450; } else { } ldv_final: ldv_check_final_state(); return 0; } } void ldv___ldv_spin_lock_4(spinlock_t *ldv_func_arg1 ) { { ldv_spin_lock_node_size_lock_of_pglist_data(); __ldv_spin_lock(ldv_func_arg1); return; } } void ldv___ldv_spin_lock_6(spinlock_t *ldv_func_arg1 ) { { ldv_spin_lock_dma_spin_lock(); __ldv_spin_lock(ldv_func_arg1); return; } } long ldv__builtin_expect(long exp , long c ) ; __inline static void ldv_error(void) { { LDV_ERROR: {reach_error();abort();} } } extern int ldv_undef_int(void) ; long ldv__builtin_expect(long exp , long c ) { { return (exp); } } static int ldv_spin_dma_spin_lock ; void ldv_spin_lock_dma_spin_lock(void) { { if (ldv_spin_dma_spin_lock == 1) { } else { ldv_error(); } ldv_spin_dma_spin_lock = 2; return; } } void ldv_spin_unlock_dma_spin_lock(void) { { if (ldv_spin_dma_spin_lock == 2) { } else { ldv_error(); } ldv_spin_dma_spin_lock = 1; return; } } int ldv_spin_trylock_dma_spin_lock(void) { int is_spin_held_by_another_thread ; { if (ldv_spin_dma_spin_lock == 1) { } else { ldv_error(); } is_spin_held_by_another_thread = ldv_undef_int(); if (is_spin_held_by_another_thread) { return (0); } else { ldv_spin_dma_spin_lock = 2; return (1); } } } void ldv_spin_unlock_wait_dma_spin_lock(void) { { if (ldv_spin_dma_spin_lock == 1) { } else { ldv_error(); } return; } } int ldv_spin_is_locked_dma_spin_lock(void) { int is_spin_held_by_another_thread ; { is_spin_held_by_another_thread = ldv_undef_int(); if (ldv_spin_dma_spin_lock == 1 && ! is_spin_held_by_another_thread) { return (0); } else { return (1); } } } int ldv_spin_can_lock_dma_spin_lock(void) { int tmp ; int tmp___0 ; { tmp = ldv_spin_is_locked_dma_spin_lock(); if (tmp) { tmp___0 = 0; } else { tmp___0 = 1; } return (tmp___0); } } int ldv_spin_is_contended_dma_spin_lock(void) { int is_spin_contended ; { is_spin_contended = ldv_undef_int(); if (is_spin_contended) { return (0); } else { return (1); } } } int ldv_atomic_dec_and_lock_dma_spin_lock(void) { int atomic_value_after_dec ; { if (ldv_spin_dma_spin_lock == 1) { } else { ldv_error(); } atomic_value_after_dec = ldv_undef_int(); if (atomic_value_after_dec == 0) { ldv_spin_dma_spin_lock = 2; return (1); } else { } return (0); } } static int ldv_spin_lock_of_NOT_ARG_SIGN ; void ldv_spin_lock_lock_of_NOT_ARG_SIGN(void) { { if (ldv_spin_lock_of_NOT_ARG_SIGN == 1) { } else { ldv_error(); } ldv_spin_lock_of_NOT_ARG_SIGN = 2; return; } } void ldv_spin_unlock_lock_of_NOT_ARG_SIGN(void) { { if (ldv_spin_lock_of_NOT_ARG_SIGN == 2) { } else { ldv_error(); } ldv_spin_lock_of_NOT_ARG_SIGN = 1; return; } } int ldv_spin_trylock_lock_of_NOT_ARG_SIGN(void) { int is_spin_held_by_another_thread ; { if (ldv_spin_lock_of_NOT_ARG_SIGN == 1) { } else { ldv_error(); } is_spin_held_by_another_thread = ldv_undef_int(); if (is_spin_held_by_another_thread) { return (0); } else { ldv_spin_lock_of_NOT_ARG_SIGN = 2; return (1); } } } void ldv_spin_unlock_wait_lock_of_NOT_ARG_SIGN(void) { { if (ldv_spin_lock_of_NOT_ARG_SIGN == 1) { } else { ldv_error(); } return; } } int ldv_spin_is_locked_lock_of_NOT_ARG_SIGN(void) { int is_spin_held_by_another_thread ; { is_spin_held_by_another_thread = ldv_undef_int(); if (ldv_spin_lock_of_NOT_ARG_SIGN == 1 && ! is_spin_held_by_another_thread) { return (0); } else { return (1); } } } int ldv_spin_can_lock_lock_of_NOT_ARG_SIGN(void) { int tmp ; int tmp___0 ; { tmp = ldv_spin_is_locked_lock_of_NOT_ARG_SIGN(); if (tmp) { tmp___0 = 0; } else { tmp___0 = 1; } return (tmp___0); } } int ldv_spin_is_contended_lock_of_NOT_ARG_SIGN(void) { int is_spin_contended ; { is_spin_contended = ldv_undef_int(); if (is_spin_contended) { return (0); } else { return (1); } } } int ldv_atomic_dec_and_lock_lock_of_NOT_ARG_SIGN(void) { int atomic_value_after_dec ; { if (ldv_spin_lock_of_NOT_ARG_SIGN == 1) { } else { ldv_error(); } atomic_value_after_dec = ldv_undef_int(); if (atomic_value_after_dec == 0) { ldv_spin_lock_of_NOT_ARG_SIGN = 2; return (1); } else { } return (0); } } static int ldv_spin_node_size_lock_of_pglist_data ; void ldv_spin_lock_node_size_lock_of_pglist_data(void) { { if (ldv_spin_node_size_lock_of_pglist_data == 1) { } else { ldv_error(); } ldv_spin_node_size_lock_of_pglist_data = 2; return; } } void ldv_spin_unlock_node_size_lock_of_pglist_data(void) { { if (ldv_spin_node_size_lock_of_pglist_data == 2) { } else { ldv_error(); } ldv_spin_node_size_lock_of_pglist_data = 1; return; } } int ldv_spin_trylock_node_size_lock_of_pglist_data(void) { int is_spin_held_by_another_thread ; { if (ldv_spin_node_size_lock_of_pglist_data == 1) { } else { ldv_error(); } is_spin_held_by_another_thread = ldv_undef_int(); if (is_spin_held_by_another_thread) { return (0); } else { ldv_spin_node_size_lock_of_pglist_data = 2; return (1); } } } void ldv_spin_unlock_wait_node_size_lock_of_pglist_data(void) { { if (ldv_spin_node_size_lock_of_pglist_data == 1) { } else { ldv_error(); } return; } } int ldv_spin_is_locked_node_size_lock_of_pglist_data(void) { int is_spin_held_by_another_thread ; { is_spin_held_by_another_thread = ldv_undef_int(); if (ldv_spin_node_size_lock_of_pglist_data == 1 && ! is_spin_held_by_another_thread) { return (0); } else { return (1); } } } int ldv_spin_can_lock_node_size_lock_of_pglist_data(void) { int tmp ; int tmp___0 ; { tmp = ldv_spin_is_locked_node_size_lock_of_pglist_data(); if (tmp) { tmp___0 = 0; } else { tmp___0 = 1; } return (tmp___0); } } int ldv_spin_is_contended_node_size_lock_of_pglist_data(void) { int is_spin_contended ; { is_spin_contended = ldv_undef_int(); if (is_spin_contended) { return (0); } else { return (1); } } } int ldv_atomic_dec_and_lock_node_size_lock_of_pglist_data(void) { int atomic_value_after_dec ; { if (ldv_spin_node_size_lock_of_pglist_data == 1) { } else { ldv_error(); } atomic_value_after_dec = ldv_undef_int(); if (atomic_value_after_dec == 0) { ldv_spin_node_size_lock_of_pglist_data = 2; return (1); } else { } return (0); } } void ldv_initialize(void) { { ldv_spin_dma_spin_lock = 1; ldv_spin_lock_of_NOT_ARG_SIGN = 1; ldv_spin_node_size_lock_of_pglist_data = 1; return; } } void ldv_check_final_state(void) { { if (ldv_spin_dma_spin_lock == 1) { } else { ldv_error(); } if (ldv_spin_lock_of_NOT_ARG_SIGN == 1) { } else { ldv_error(); } if (ldv_spin_node_size_lock_of_pglist_data == 1) { } else { ldv_error(); } return; } }