This repository has been archived by the owner on Oct 3, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 169
/
32_1_cilled_true-unreach-call_ok_nondet_linux-3.4-32_1-drivers--auxdisplay--cfag12864b.ko-ldv_main0_sequence_infinite_withcheck_stateful.cil.out.c
1517 lines (1444 loc) · 43.7 KB
/
32_1_cilled_true-unreach-call_ok_nondet_linux-3.4-32_1-drivers--auxdisplay--cfag12864b.ko-ldv_main0_sequence_infinite_withcheck_stateful.cil.out.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
extern void __VERIFIER_error() __attribute__ ((__noreturn__));
/* Generated by CIL v. 1.3.7 */
/* print_CIL_Input is true */
typedef short s16;
typedef unsigned short u16;
typedef unsigned int u32;
typedef long __kernel_long_t;
typedef unsigned long __kernel_ulong_t;
typedef __kernel_ulong_t __kernel_size_t;
typedef __kernel_long_t __kernel_ssize_t;
typedef unsigned short umode_t;
typedef _Bool bool;
typedef __kernel_size_t size_t;
typedef __kernel_ssize_t ssize_t;
typedef unsigned int gfp_t;
struct __anonstruct_atomic_t_7 {
int counter ;
};
typedef struct __anonstruct_atomic_t_7 atomic_t;
struct __anonstruct_atomic64_t_8 {
long counter ;
};
typedef struct __anonstruct_atomic64_t_8 atomic64_t;
struct list_head {
struct list_head *next ;
struct list_head *prev ;
};
struct page;
struct page;
struct task_struct;
struct task_struct;
struct task_struct;
struct page;
struct task_struct;
struct arch_spinlock;
struct arch_spinlock;
struct task_struct;
struct task_struct;
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____missing_field_name_36 {
__ticketpair_t head_tail ;
struct __raw_tickets tickets ;
};
struct arch_spinlock {
union __anonunion____missing_field_name_36 __annonCompField17 ;
};
typedef struct arch_spinlock arch_spinlock_t;
struct task_struct;
struct lock_class_key {
};
struct raw_spinlock {
arch_spinlock_t raw_lock ;
unsigned int magic ;
unsigned int owner_cpu ;
void *owner ;
};
union __anonunion____missing_field_name_39 {
struct raw_spinlock rlock ;
};
struct spinlock {
union __anonunion____missing_field_name_39 __annonCompField19 ;
};
typedef struct spinlock spinlock_t;
struct task_struct;
struct page;
struct mutex {
atomic_t count ;
spinlock_t wait_lock ;
struct list_head wait_list ;
struct task_struct *owner ;
char const *name ;
void *magic ;
};
struct page;
struct tvec_base;
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[16] ;
};
struct workqueue_struct;
struct workqueue_struct;
struct work_struct;
struct work_struct;
struct work_struct {
atomic_long_t data ;
struct list_head entry ;
void (*func)(struct work_struct *work ) ;
};
struct delayed_work {
struct work_struct work ;
struct timer_list timer ;
};
struct page;
struct task_struct;
struct sock;
struct sock;
struct kobject;
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 *sk ) ;
void const *(*initial_ns)(void) ;
void (*drop_ns)(void * ) ;
};
struct kobject;
enum kobj_ns_type;
struct attribute {
char const *name ;
umode_t mode ;
};
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 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 int state_initialized : 1 ;
unsigned int state_in_sysfs : 1 ;
unsigned int state_add_uevent_sent : 1 ;
unsigned int state_remove_uevent_sent : 1 ;
unsigned int uevent_suppress : 1 ;
};
struct kobj_type {
void (*release)(struct kobject *kobj ) ;
struct sysfs_ops const *sysfs_ops ;
struct attribute **default_attrs ;
struct kobj_ns_type_operations const *(*child_ns_type)(struct kobject *kobj ) ;
void const *(*namespace)(struct kobject *kobj ) ;
};
struct kobj_uevent_env {
char *envp[32] ;
int envp_idx ;
char buf[2048] ;
int buflen ;
};
struct kset_uevent_ops {
int (* const filter)(struct kset *kset , struct kobject *kobj ) ;
char const *(* const name)(struct kset *kset , struct kobject *kobj ) ;
int (* const uevent)(struct kset *kset , struct kobject *kobj , struct kobj_uevent_env *env ) ;
};
struct sock;
struct kset {
struct list_head list ;
spinlock_t list_lock ;
struct kobject kobj ;
struct kset_uevent_ops const *uevent_ops ;
};
struct kernel_param;
struct kernel_param;
struct kernel_param_ops {
int (*set)(char const *val , struct kernel_param const *kp ) ;
int (*get)(char *buffer , struct kernel_param const *kp ) ;
void (*free)(void *arg ) ;
};
struct kparam_string;
struct kparam_array;
union __anonunion____missing_field_name_199 {
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 ;
s16 level ;
union __anonunion____missing_field_name_199 __annonCompField32 ;
};
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 kernel_symbol {
unsigned long value ;
char const *name ;
};
struct page;
struct task_struct;
struct kobject;
struct page;
struct kmem_cache_cpu {
void **freelist ;
unsigned long tid ;
struct page *page ;
struct page *partial ;
int node ;
unsigned int stat[26] ;
};
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[1 << 10] ;
};
long ldv__builtin_expect(long val , long res ) ;
__inline static void ( __attribute__((__always_inline__)) clear_bit)(int nr , unsigned long volatile *addr ) __attribute__((__no_instrument_function__)) ;
__inline static void ( __attribute__((__always_inline__)) clear_bit)(int nr , unsigned long volatile *addr )
{ long volatile *__cil_tmp3 ;
{
__cil_tmp3 = (long volatile *)addr;
__asm__ volatile (".section .smp_locks,\"a\"\n"
".balign 4\n"
".long 671f - .\n"
".previous\n"
"671:"
"\n\tlock; "
"btr %1,%0": "+m" (*__cil_tmp3): "Ir" (nr));
return;
}
}
extern int ( /* format attribute */ printk)(char const *fmt , ...) ;
extern void *memcpy(void *to , void const *from , size_t len ) ;
extern int memcmp(void const *cs , void const *ct , unsigned long count ) ;
void mutex_lock(struct mutex *lock ) ;
int __attribute__((__warn_unused_result__)) mutex_lock_interruptible(struct mutex *lock ) ;
int __attribute__((__warn_unused_result__)) mutex_lock_killable(struct mutex *lock ) ;
int mutex_trylock(struct mutex *lock ) ;
void mutex_unlock(struct mutex *lock ) ;
int atomic_dec_and_mutex_lock(atomic_t *cnt , struct mutex *lock ) ;
extern struct tvec_base boot_tvec_bases ;
extern int del_timer_sync(struct timer_list *timer ) ;
extern struct workqueue_struct *( /* format attribute */ __alloc_workqueue_key)(char const *fmt ,
unsigned int flags ,
int max_active ,
struct lock_class_key *key ,
char const *lock_name
, ...) ;
extern void destroy_workqueue(struct workqueue_struct *wq ) ;
extern int queue_delayed_work(struct workqueue_struct *wq , struct delayed_work *work ,
unsigned long delay ) ;
extern void flush_workqueue(struct workqueue_struct *wq ) ;
__inline static bool cancel_delayed_work(struct delayed_work *work ) __attribute__((__no_instrument_function__)) ;
__inline static bool cancel_delayed_work(struct delayed_work *work )
{ bool ret ;
int tmp ;
unsigned long __cil_tmp4 ;
unsigned long __cil_tmp5 ;
struct timer_list *__cil_tmp6 ;
atomic_long_t *__cil_tmp7 ;
unsigned long *__cil_tmp8 ;
unsigned long volatile *__cil_tmp9 ;
{
{
__cil_tmp4 = (unsigned long )work;
__cil_tmp5 = __cil_tmp4 + 32;
__cil_tmp6 = (struct timer_list *)__cil_tmp5;
tmp = del_timer_sync(__cil_tmp6);
ret = (bool )tmp;
}
if (ret) {
{
__cil_tmp7 = (atomic_long_t *)work;
__cil_tmp8 = (unsigned long *)__cil_tmp7;
__cil_tmp9 = (unsigned long volatile *)__cil_tmp8;
clear_bit(0, __cil_tmp9);
}
} else {
}
return (ret);
}
}
extern unsigned long get_zeroed_page(gfp_t gfp_mask ) ;
extern void free_pages(unsigned long addr , unsigned int order ) ;
extern struct kernel_param_ops param_ops_uint ;
int init_module(void) ;
void cleanup_module(void) ;
extern void kfree(void const * ) ;
extern int __VERIFIER_nondet_int(void);
extern void __VERIFIER_assume(int);
extern void *malloc(size_t size);
long ldv_is_err(const void *ptr)
{
return ((unsigned long)ptr > ((unsigned long)-4095));
}
void *ldv_malloc(size_t size)
{
if (__VERIFIER_nondet_int()) {
void *res = malloc(size);
__VERIFIER_assume(!ldv_is_err(res));
return res;
} else {
return ((void *)0);
}
}
void *__kmalloc(size_t size, gfp_t t)
{
return ldv_malloc(size);
}
__inline static void *( __attribute__((__always_inline__)) kmalloc)(size_t size ,
gfp_t flags ) __attribute__((__no_instrument_function__)) ;
__inline static void *( __attribute__((__always_inline__)) kmalloc)(size_t size ,
gfp_t flags )
{ void *tmp___2 ;
{
{
tmp___2 = __kmalloc(size, flags);
}
return (tmp___2);
}
}
extern void ks0108_writedata(unsigned char byte ) ;
extern void ks0108_writecontrol(unsigned char byte ) ;
extern void ks0108_displaystate(unsigned char state ) ;
extern void ks0108_startline(unsigned char startline ) ;
extern void ks0108_address(unsigned char address ) ;
extern void ks0108_page(unsigned char page ) ;
extern unsigned char ks0108_isinited(void) ;
unsigned char *cfag12864b_buffer ;
unsigned int cfag12864b_getrate(void) ;
unsigned char cfag12864b_enable(void) ;
void cfag12864b_disable(void) ;
unsigned char cfag12864b_isenabled(void) ;
unsigned char cfag12864b_isinited(void) ;
static unsigned int cfag12864b_rate = 20U;
static char const __param_str_cfag12864b_rate[16] =
{ (char const )'c', (char const )'f', (char const )'a', (char const )'g',
(char const )'1', (char const )'2', (char const )'8', (char const )'6',
(char const )'4', (char const )'b', (char const )'_', (char const )'r',
(char const )'a', (char const )'t', (char const )'e', (char const )'\000'};
static struct kernel_param const __param_cfag12864b_rate __attribute__((__used__,
__unused__, __section__("__param"), __aligned__(sizeof(void *)))) = {__param_str_cfag12864b_rate, (struct kernel_param_ops const *)(& param_ops_uint),
(u16 )292, (s16 )0, {(void *)(& cfag12864b_rate)}};
static char const __mod_cfag12864b_ratetype51[30] __attribute__((__used__, __unused__,
__section__(".modinfo"), __aligned__(1))) =
{ (char const )'p', (char const )'a', (char const )'r', (char const )'m',
(char const )'t', (char const )'y', (char const )'p', (char const )'e',
(char const )'=', (char const )'c', (char const )'f', (char const )'a',
(char const )'g', (char const )'1', (char const )'2', (char const )'8',
(char const )'6', (char const )'4', (char const )'b', (char const )'_',
(char const )'r', (char const )'a', (char const )'t', (char const )'e',
(char const )':', (char const )'u', (char const )'i', (char const )'n',
(char const )'t', (char const )'\000'};
static char const __mod_cfag12864b_rate53[42] __attribute__((__used__, __unused__,
__section__(".modinfo"), __aligned__(1))) =
{ (char const )'p', (char const )'a', (char const )'r', (char const )'m',
(char const )'=', (char const )'c', (char const )'f', (char const )'a',
(char const )'g', (char const )'1', (char const )'2', (char const )'8',
(char const )'6', (char const )'4', (char const )'b', (char const )'_',
(char const )'r', (char const )'a', (char const )'t', (char const )'e',
(char const )':', (char const )'R', (char const )'e', (char const )'f',
(char const )'r', (char const )'e', (char const )'s', (char const )'h',
(char const )' ', (char const )'r', (char const )'a', (char const )'t',
(char const )'e', (char const )' ', (char const )'(', (char const )'h',
(char const )'e', (char const )'r', (char const )'t', (char const )'z',
(char const )')', (char const )'\000'};
unsigned int cfag12864b_getrate(void)
{ unsigned int *__cil_tmp1 ;
{
{
__cil_tmp1 = & cfag12864b_rate;
return (*__cil_tmp1);
}
}
}
static unsigned char cfag12864b_state ;
static void cfag12864b_set(void)
{
{
{
ks0108_writecontrol(cfag12864b_state);
}
return;
}
}
static void cfag12864b_setbit(unsigned char state , unsigned char n )
{ int __cil_tmp3 ;
int __cil_tmp4 ;
int __cil_tmp5 ;
int __cil_tmp6 ;
int __cil_tmp7 ;
int __cil_tmp8 ;
int __cil_tmp9 ;
int __cil_tmp10 ;
int __cil_tmp11 ;
{
if (state) {
__cil_tmp3 = (int )n;
__cil_tmp4 = 1 << __cil_tmp3;
__cil_tmp5 = (int )cfag12864b_state;
__cil_tmp6 = __cil_tmp5 | __cil_tmp4;
cfag12864b_state = (unsigned char )__cil_tmp6;
} else {
__cil_tmp7 = (int )n;
__cil_tmp8 = 1 << __cil_tmp7;
__cil_tmp9 = ~ __cil_tmp8;
__cil_tmp10 = (int )cfag12864b_state;
__cil_tmp11 = __cil_tmp10 & __cil_tmp9;
cfag12864b_state = (unsigned char )__cil_tmp11;
}
return;
}
}
static void cfag12864b_e(unsigned char state )
{
{
{
cfag12864b_setbit(state, (unsigned char)0);
cfag12864b_set();
}
return;
}
}
static void cfag12864b_cs1(unsigned char state )
{
{
{
cfag12864b_setbit(state, (unsigned char)2);
}
return;
}
}
static void cfag12864b_cs2(unsigned char state )
{
{
{
cfag12864b_setbit(state, (unsigned char)1);
}
return;
}
}
static void cfag12864b_di(unsigned char state )
{
{
{
cfag12864b_setbit(state, (unsigned char)3);
}
return;
}
}
static void cfag12864b_setcontrollers(unsigned char first , unsigned char second )
{
{
if (first) {
{
cfag12864b_cs1((unsigned char)0);
}
} else {
{
cfag12864b_cs1((unsigned char)1);
}
}
if (second) {
{
cfag12864b_cs2((unsigned char)0);
}
} else {
{
cfag12864b_cs2((unsigned char)1);
}
}
return;
}
}
static void cfag12864b_controller(unsigned char which )
{ int __cil_tmp2 ;
int __cil_tmp3 ;
{
{
__cil_tmp2 = (int )which;
if (__cil_tmp2 == 0) {
{
cfag12864b_setcontrollers((unsigned char)1, (unsigned char)0);
}
} else {
{
__cil_tmp3 = (int )which;
if (__cil_tmp3 == 1) {
{
cfag12864b_setcontrollers((unsigned char)0, (unsigned char)1);
}
} else {
}
}
}
}
return;
}
}
static void cfag12864b_displaystate(unsigned char state )
{
{
{
cfag12864b_di((unsigned char)0);
cfag12864b_e((unsigned char)1);
ks0108_displaystate(state);
cfag12864b_e((unsigned char)0);
}
return;
}
}
static void cfag12864b_address(unsigned char address )
{
{
{
cfag12864b_di((unsigned char)0);
cfag12864b_e((unsigned char)1);
ks0108_address(address);
cfag12864b_e((unsigned char)0);
}
return;
}
}
static void cfag12864b_page(unsigned char page )
{
{
{
cfag12864b_di((unsigned char)0);
cfag12864b_e((unsigned char)1);
ks0108_page(page);
cfag12864b_e((unsigned char)0);
}
return;
}
}
static void cfag12864b_startline(unsigned char startline )
{
{
{
cfag12864b_di((unsigned char)0);
cfag12864b_e((unsigned char)1);
ks0108_startline(startline);
cfag12864b_e((unsigned char)0);
}
return;
}
}
static void cfag12864b_writebyte(unsigned char byte )
{
{
{
cfag12864b_di((unsigned char)1);
cfag12864b_e((unsigned char)1);
ks0108_writedata(byte);
cfag12864b_e((unsigned char)0);
}
return;
}
}
static void cfag12864b_nop(void)
{
{
{
cfag12864b_startline((unsigned char)0);
}
return;
}
}
static void cfag12864b_on(void)
{
{
{
cfag12864b_setcontrollers((unsigned char)1, (unsigned char)1);
cfag12864b_displaystate((unsigned char)1);
}
return;
}
}
static void cfag12864b_off(void)
{
{
{
cfag12864b_setcontrollers((unsigned char)1, (unsigned char)1);
cfag12864b_displaystate((unsigned char)0);
}
return;
}
}
static void cfag12864b_clear(void)
{ unsigned char i ;
unsigned char j ;
int __cil_tmp3 ;
int __cil_tmp4 ;
int __cil_tmp5 ;
int __cil_tmp6 ;
int __cil_tmp7 ;
int __cil_tmp8 ;
{
{
cfag12864b_setcontrollers((unsigned char)1, (unsigned char)1);
i = (unsigned char)0;
}
{
while (1) {
while_continue: /* CIL Label */ ;
{
__cil_tmp3 = (int )i;
if (__cil_tmp3 < 8) {
} else {
goto while_break;
}
}
{
cfag12864b_page(i);
cfag12864b_address((unsigned char)0);
j = (unsigned char)0;
}
{
while (1) {
while_continue___0: /* CIL Label */ ;
{
__cil_tmp4 = (int )j;
if (__cil_tmp4 < 64) {
} else {
goto while_break___0;
}
}
{
cfag12864b_writebyte((unsigned char)0);
__cil_tmp5 = (int )j;
__cil_tmp6 = __cil_tmp5 + 1;
j = (unsigned char )__cil_tmp6;
}
}
while_break___0: /* CIL Label */ ;
}
__cil_tmp7 = (int )i;
__cil_tmp8 = __cil_tmp7 + 1;
i = (unsigned char )__cil_tmp8;
}
while_break: /* CIL Label */ ;
}
return;
}
}
static unsigned char *cfag12864b_cache ;
static struct mutex cfag12864b_mutex = {{1}, {{{{{(__ticketpair_t )0}}, 3735899821U, 4294967295U, (void *)-1L}}}, {& cfag12864b_mutex.wait_list,
& cfag12864b_mutex.wait_list},
(struct task_struct *)0, (char const *)0, (void *)(& cfag12864b_mutex)};
static unsigned char cfag12864b_updating ;
static void cfag12864b_update(struct work_struct *work ) ;
static struct workqueue_struct *cfag12864b_workqueue ;
static struct delayed_work cfag12864b_work = {{{2097680L}, {& cfag12864b_work.work.entry, & cfag12864b_work.work.entry}, & cfag12864b_update},
{{(struct list_head *)0, (struct list_head *)((void *)1953723489)}, 0UL, & boot_tvec_bases,
(void (*)(unsigned long ))((void *)0), 0UL, -1, 0, (void *)0, {(char)0, (char)0,
(char)0, (char)0,
(char)0, (char)0,
(char)0, (char)0,
(char)0, (char)0,
(char)0, (char)0,
(char)0, (char)0,
(char)0, (char)0}}};
static void cfag12864b_queue(void)
{ unsigned int *__cil_tmp1 ;
unsigned int __cil_tmp2 ;
unsigned int __cil_tmp3 ;
unsigned long __cil_tmp4 ;
{
{
__cil_tmp1 = & cfag12864b_rate;
__cil_tmp2 = *__cil_tmp1;
__cil_tmp3 = 250U / __cil_tmp2;
__cil_tmp4 = (unsigned long )__cil_tmp3;
queue_delayed_work(cfag12864b_workqueue, & cfag12864b_work, __cil_tmp4);
}
return;
}
}
unsigned char cfag12864b_enable(void)
{ unsigned char ret ;
{
{
mutex_lock(& cfag12864b_mutex);
}
if (! cfag12864b_updating) {
{
cfag12864b_updating = (unsigned char)1;
cfag12864b_queue();
ret = (unsigned char)0;
}
} else {
ret = (unsigned char)1;
}
{
mutex_unlock(& cfag12864b_mutex);
}
return (ret);
}
}
void cfag12864b_disable(void)
{
{
{
mutex_lock(& cfag12864b_mutex);
}
if (cfag12864b_updating) {
{
cfag12864b_updating = (unsigned char)0;
cancel_delayed_work(& cfag12864b_work);
flush_workqueue(cfag12864b_workqueue);
}
} else {
}
{
mutex_unlock(& cfag12864b_mutex);
}
return;
}
}
unsigned char cfag12864b_isenabled(void)
{
{
return (cfag12864b_updating);
}
}
static void cfag12864b_update(struct work_struct *work )
{ unsigned char c ;
unsigned short i ;
unsigned short j ;
unsigned short k ;
unsigned short b ;
size_t __len ;
void *__ret ;
int tmp ;
void const *__cil_tmp10 ;
unsigned char **__cil_tmp11 ;
unsigned char *__cil_tmp12 ;
void const *__cil_tmp13 ;
int __cil_tmp14 ;
unsigned char __cil_tmp15 ;
int __cil_tmp16 ;
unsigned char __cil_tmp17 ;
int __cil_tmp18 ;
int __cil_tmp19 ;
int __cil_tmp20 ;
int __cil_tmp21 ;
int __cil_tmp22 ;
int __cil_tmp23 ;
int __cil_tmp24 ;
int __cil_tmp25 ;
int __cil_tmp26 ;
int __cil_tmp27 ;
int __cil_tmp28 ;
int __cil_tmp29 ;
int __cil_tmp30 ;
int __cil_tmp31 ;
int __cil_tmp32 ;
int __cil_tmp33 ;
int __cil_tmp34 ;
int __cil_tmp35 ;
unsigned char **__cil_tmp36 ;
unsigned char *__cil_tmp37 ;
unsigned char *__cil_tmp38 ;
unsigned char __cil_tmp39 ;
int __cil_tmp40 ;
int __cil_tmp41 ;
int __cil_tmp42 ;
int __cil_tmp43 ;
int __cil_tmp44 ;
int __cil_tmp45 ;
int __cil_tmp46 ;
int __cil_tmp47 ;
int __cil_tmp48 ;
int __cil_tmp49 ;
int __cil_tmp50 ;
int __cil_tmp51 ;
int __cil_tmp52 ;
void *__cil_tmp53 ;
unsigned char **__cil_tmp54 ;
unsigned char *__cil_tmp55 ;
void const *__cil_tmp56 ;
void *__cil_tmp57 ;
unsigned char **__cil_tmp58 ;
unsigned char *__cil_tmp59 ;
void const *__cil_tmp60 ;
{
{
__cil_tmp10 = (void const *)cfag12864b_cache;
__cil_tmp11 = & cfag12864b_buffer;
__cil_tmp12 = *__cil_tmp11;
__cil_tmp13 = (void const *)__cil_tmp12;
tmp = memcmp(__cil_tmp10, __cil_tmp13, 1024UL);
}
if (tmp) {
i = (unsigned short)0;
{
while (1) {
while_continue: /* CIL Label */ ;
{
__cil_tmp14 = (int )i;
if (__cil_tmp14 < 2) {
} else {
goto while_break;
}
}
{
__cil_tmp15 = (unsigned char )i;
cfag12864b_controller(__cil_tmp15);
cfag12864b_nop();
j = (unsigned short)0;
}
{
while (1) {
while_continue___0: /* CIL Label */ ;
{
__cil_tmp16 = (int )j;
if (__cil_tmp16 < 8) {
} else {
goto while_break___0;
}
}
{
__cil_tmp17 = (unsigned char )j;
cfag12864b_page(__cil_tmp17);
cfag12864b_nop();
cfag12864b_address((unsigned char)0);
cfag12864b_nop();
k = (unsigned short)0;
}
{
while (1) {
while_continue___1: /* CIL Label */ ;
{
__cil_tmp18 = (int )k;
if (__cil_tmp18 < 64) {
} else {
goto while_break___1;
}
}
c = (unsigned char)0;
b = (unsigned short)0;
{
while (1) {
while_continue___2: /* CIL Label */ ;
{
__cil_tmp19 = (int )b;
if (__cil_tmp19 < 8) {
} else {
goto while_break___2;
}
}
{
__cil_tmp20 = (int )k;
__cil_tmp21 = __cil_tmp20 % 8;
__cil_tmp22 = 1 << __cil_tmp21;
__cil_tmp23 = (int )b;
__cil_tmp24 = (int )j;
__cil_tmp25 = __cil_tmp24 * 8;
__cil_tmp26 = __cil_tmp25 + __cil_tmp23;
__cil_tmp27 = __cil_tmp26 * 128;
__cil_tmp28 = __cil_tmp27 / 8;
__cil_tmp29 = (int )k;
__cil_tmp30 = __cil_tmp29 / 8;
__cil_tmp31 = (int )i;
__cil_tmp32 = __cil_tmp31 * 64;
__cil_tmp33 = __cil_tmp32 / 8;
__cil_tmp34 = __cil_tmp33 + __cil_tmp30;
__cil_tmp35 = __cil_tmp34 + __cil_tmp28;
__cil_tmp36 = & cfag12864b_buffer;
__cil_tmp37 = *__cil_tmp36;
__cil_tmp38 = __cil_tmp37 + __cil_tmp35;
__cil_tmp39 = *__cil_tmp38;
__cil_tmp40 = (int )__cil_tmp39;
if (__cil_tmp40 & __cil_tmp22) {
__cil_tmp41 = (int )b;
__cil_tmp42 = 1 << __cil_tmp41;
__cil_tmp43 = (int )c;
__cil_tmp44 = __cil_tmp43 | __cil_tmp42;
c = (unsigned char )__cil_tmp44;
} else {
}
}
__cil_tmp45 = (int )b;
__cil_tmp46 = __cil_tmp45 + 1;
b = (unsigned short )__cil_tmp46;
}
while_break___2: /* CIL Label */ ;
}
{
cfag12864b_writebyte(c);
__cil_tmp47 = (int )k;
__cil_tmp48 = __cil_tmp47 + 1;
k = (unsigned short )__cil_tmp48;
}
}
while_break___1: /* CIL Label */ ;
}
__cil_tmp49 = (int )j;
__cil_tmp50 = __cil_tmp49 + 1;
j = (unsigned short )__cil_tmp50;
}
while_break___0: /* CIL Label */ ;
}
__cil_tmp51 = (int )i;
__cil_tmp52 = __cil_tmp51 + 1;
i = (unsigned short )__cil_tmp52;
}
while_break: /* CIL Label */ ;
}