1int KernelMode ;
2int Executive ;
3int DevicePowerState ;
4int s ;
5int UNLOADED ;
6int NP ;
7int DC ;
8int SKIP1 ;
9int SKIP2 ;
10int MPR1 ;
11int MPR3 ;
12int IPC ;
13int pended ;
14int compFptr ;
15int compRegistered ;
16int lowerDriverReturn ;
17int setEventCalled ;
18int customIrp ;
19int myStatus ;
20
21void stub_driver_init(void)
22{
23
24 {
25#line 52
26 s = NP;
27#line 53
28 pended = 0;
29#line 54
30 compFptr = 0;
31#line 55
32 compRegistered = 0;
33#line 56
34 lowerDriverReturn = 0;
35#line 57
36 setEventCalled = 0;
37#line 58
38 customIrp = 0;
39#line 59
40 return;
41}
42}
43#line 62 "kbfiltr_simpl2.cil.c"
44void _BLAST_init(void)
45{
46
47 {
48#line 66
49 UNLOADED = 0;
50#line 67
51 NP = 1;
52#line 68
53 DC = 2;
54#line 69
55 SKIP1 = 3;
56#line 70
57 SKIP2 = 4;
58#line 71
59 MPR1 = 5;
60#line 72
61 MPR3 = 6;
62#line 73
63 IPC = 7;
64#line 74
65 s = UNLOADED;
66#line 75
67 pended = 0;
68#line 76
69 compFptr = 0;
70#line 77
71 compRegistered = 0;
72#line 78
73 lowerDriverReturn = 0;
74#line 79
75 setEventCalled = 0;
76#line 80
77 customIrp = 0;
78#line 81
79 return;
80}
81}
82#line 84 "kbfiltr_simpl2.cil.c"
83int KbFilter_PnP(int DeviceObject , int Irp )
84{ int devExt ;
85 int irpStack ;
86 int status ;
87 int event ;
88 int DeviceObject__DeviceExtension ;
89 int Irp__Tail__Overlay__CurrentStackLocation ;
90 int irpStack__MinorFunction ;
91 int devExt__TopOfStack ;
92 int devExt__Started ;
93 int devExt__Removed ;
94 int devExt__SurpriseRemoved ;
95 int Irp__IoStatus__Status ;
96 int Irp__IoStatus__Information ;
97 int Irp__CurrentLocation ;
98 int irpSp ;
99 int nextIrpSp ;
100 int nextIrpSp__Control ;
101 int irpSp___0 ;
102 int irpSp__Context ;
103 int irpSp__Control ;
104 long __cil_tmp23 ;
105
106 {
107#line 107
108 status = 0;
109#line 108
110 devExt = DeviceObject__DeviceExtension;
111#line 109
112 irpStack = Irp__Tail__Overlay__CurrentStackLocation;
113#line 110
114 if (irpStack__MinorFunction == 0) {
115 goto switch_0_0;
116 } else {
117#line 113
118 if (irpStack__MinorFunction == 23) {
119 goto switch_0_23;
120 } else {
121#line 116
122 if (irpStack__MinorFunction == 2) {
123 goto switch_0_2;
124 } else {
125#line 119
126 if (irpStack__MinorFunction == 1) {
127 goto switch_0_1;
128 } else {
129#line 122
130 if (irpStack__MinorFunction == 5) {
131 goto switch_0_1;
132 } else {
133#line 125
134 if (irpStack__MinorFunction == 3) {
135 goto switch_0_1;
136 } else {
137#line 128
138 if (irpStack__MinorFunction == 6) {
139 goto switch_0_1;
140 } else {
141#line 131
142 if (irpStack__MinorFunction == 13) {
143 goto switch_0_1;
144 } else {
145#line 134
146 if (irpStack__MinorFunction == 4) {
147 goto switch_0_1;
148 } else {
149#line 137
150 if (irpStack__MinorFunction == 7) {
151 goto switch_0_1;
152 } else {
153#line 140
154 if (irpStack__MinorFunction == 8) {
155 goto switch_0_1;
156 } else {
157#line 143
158 if (irpStack__MinorFunction == 9) {
159 goto switch_0_1;
160 } else {
161#line 146
162 if (irpStack__MinorFunction == 12) {
163 goto switch_0_1;
164 } else {
165#line 149
166 if (irpStack__MinorFunction == 10) {
167 goto switch_0_1;
168 } else {
169#line 152
170 if (irpStack__MinorFunction == 11) {
171 goto switch_0_1;
172 } else {
173#line 155
174 if (irpStack__MinorFunction == 15) {
175 goto switch_0_1;
176 } else {
177#line 158
178 if (irpStack__MinorFunction == 16) {
179 goto switch_0_1;
180 } else {
181#line 161
182 if (irpStack__MinorFunction == 17) {
183 goto switch_0_1;
184 } else {
185#line 164
186 if (irpStack__MinorFunction == 18) {
187 goto switch_0_1;
188 } else {
189#line 167
190 if (irpStack__MinorFunction == 19) {
191 goto switch_0_1;
192 } else {
193#line 170
194 if (irpStack__MinorFunction == 20) {
195 goto switch_0_1;
196 } else {
197 goto switch_0_1;
198#line 175
199 if (0) {
200 switch_0_0:
201#line 177
202 irpSp = Irp__Tail__Overlay__CurrentStackLocation;
203#line 178
204 nextIrpSp = Irp__Tail__Overlay__CurrentStackLocation - 1;
205#line 179
206 nextIrpSp__Control = 0;
207#line 180
208 if (s != NP) {
209 {
210#line 182
211 errorFn();
212 }
213 } else {
214#line 185
215 if (compRegistered != 0) {
216 {
217#line 187
218 errorFn();
219 }
220 } else {
221#line 190
222 compRegistered = 1;
223 }
224 }
225 {
226#line 194
227 irpSp___0 = Irp__Tail__Overlay__CurrentStackLocation - 1;
228#line 195
229 irpSp__Context = event;
230#line 196
231 irpSp__Control = 224;
232#line 200
233 status = IofCallDriver(devExt__TopOfStack,
234 Irp);
235 }
236 {
237#line 203
238 __cil_tmp23 = (long )status;
239#line 203
240 if (__cil_tmp23 == 259) {
241 {
242#line 205
243 KeWaitForSingleObject(event, Executive,
244 KernelMode,
245 0, 0);
246 }
247 }
248 }
249#line 212
250 if (status >= 0) {
251#line 213
252 if (myStatus >= 0) {
253#line 214
254 devExt__Started = 1;
255#line 215
256 devExt__Removed = 0;
257#line 216
258 devExt__SurpriseRemoved = 0;
259 }
260 }
261 {
262#line 224
263 Irp__IoStatus__Status = status;
264#line 225
265 myStatus = status;
266#line 226
267 Irp__IoStatus__Information = 0;
268#line 227
269 IofCompleteRequest(Irp, 0);
270 }
271 goto switch_0_break;
272 switch_0_23:
273#line 231
274 devExt__SurpriseRemoved = 1;
275#line 232
276 if (s == NP) {
277#line 233
278 s = SKIP1;
279 } else {
280 {
281#line 236
282 errorFn();
283 }
284 }
285 {
286#line 240
287 Irp__CurrentLocation ++;
288#line 241
289 Irp__Tail__Overlay__CurrentStackLocation ++;
290#line 242
291 status = IofCallDriver(devExt__TopOfStack,
292 Irp);
293 }
294 goto switch_0_break;
295 switch_0_2:
296#line 247
297 devExt__Removed = 1;
298#line 248
299 if (s == NP) {
300#line 249
301 s = SKIP1;
302 } else {
303 {
304#line 252
305 errorFn();
306 }
307 }
308 {
309#line 256
310 Irp__CurrentLocation ++;
311#line 257
312 Irp__Tail__Overlay__CurrentStackLocation ++;
313#line 258
314 IofCallDriver(devExt__TopOfStack, Irp);
315#line 259
316 status = 0;
317 }
318 goto switch_0_break;
319 switch_0_1: ;
320#line 281
321 if (s == NP) {
322#line 282
323 s = SKIP1;
324 } else {
325 {
326#line 285
327 errorFn();
328 }
329 }
330 {
331#line 289
332 Irp__CurrentLocation ++;
333#line 290
334 Irp__Tail__Overlay__CurrentStackLocation ++;
335#line 291
336 status = IofCallDriver(devExt__TopOfStack,
337 Irp);
338 }
339 goto switch_0_break;
340 } else {
341 switch_0_break: ;
342 }
343 }
344 }
345 }
346 }
347 }
348 }
349 }
350 }
351 }
352 }
353 }
354 }
355 }
356 }
357 }
358 }
359 }
360 }
361 }
362 }
363 }
364#line 320
365 return (status);
366}
367}
368#line 323 "kbfiltr_simpl2.cil.c"
369int main(void)
370{ int status ;
371 int irp ;
372 int pirp ;
373 int pirp__IoStatus__Status ;
374
375 int irp_choice ;
376 int devobj ;
377 int __cil_tmp8 ;
378
379 KernelMode = 0;
380 Executive = 0;
381 DevicePowerState = 1;
382 s = 0;
383 UNLOADED = 0;
384 NP = 0;
385 DC = 0;
386 SKIP1 = 0;
387 SKIP2 = 0 ;
388 MPR1 = 0;
389 MPR3 = 0;
390 IPC = 0;
391 pended = 0;
392 compFptr = 0;
393 compRegistered = 0;
394 lowerDriverReturn = 0;
395 setEventCalled = 0;
396 customIrp = 0;
397 myStatus = 0;
398
399 {
400 {
401#line 334
402 status = 0;
403#line 335
404 pirp = irp;
405#line 336
406 _BLAST_init();
407 }
408#line 338
409 if (status >= 0) {
410#line 339
411 s = NP;
412#line 340
413 customIrp = 0;
414#line 341
415 setEventCalled = customIrp;
416#line 342
417 lowerDriverReturn = setEventCalled;
418#line 343
419 compRegistered = lowerDriverReturn;
420#line 344
421 pended = compRegistered;
422#line 345
423 pirp__IoStatus__Status = 0;
424#line 346
425 myStatus = 0;
426#line 347
427 if (irp_choice == 0) {
428#line 348
429 pirp__IoStatus__Status = -1073741637;
430#line 349
431 myStatus = -1073741637;
432 }
433 {
434#line 354
435 stub_driver_init();
436 }
437 {
438#line 356
439#line 356
440 if (status < 0) {
441#line 357
442 return (-1);
443 }
444 }
445#line 361
446 int tmp_ndt_1;
447 tmp_ndt_1 = __VERIFIER_nondet_int();
448 if (tmp_ndt_1 == 0) {
449 goto switch_1_0;
450 } else {
451#line 364
452 int tmp_ndt_2;
453 tmp_ndt_2 = __VERIFIER_nondet_int();
454 if (tmp_ndt_2 == 1) {
455 goto switch_1_1;
456 } else {
457#line 367
458 int tmp_ndt_3;
459 tmp_ndt_3 = __VERIFIER_nondet_int();
460 if (tmp_ndt_3 == 3) {
461 goto switch_1_3;
462 } else {
463#line 370
464 int tmp_ndt_4;
465 tmp_ndt_4 = __VERIFIER_nondet_int();
466 if (tmp_ndt_4 == 4) {
467 goto switch_1_4;
468 } else {
469#line 373
470 int tmp_ndt_5;
471 tmp_ndt_5 = __VERIFIER_nondet_int();
472 if (tmp_ndt_5 == 8) {
473 goto switch_1_8;
474 } else {
475 goto switch_1_default;
476#line 378
477 if (0) {
478 switch_1_0:
479 {
480#line 381
481 status = KbFilter_CreateClose(devobj, pirp);
482 }
483 goto switch_1_break;
484 switch_1_1:
485 {
486#line 386
487 status = KbFilter_CreateClose(devobj, pirp);
488 }
489 goto switch_1_break;
490 switch_1_3:
491 {
492#line 391
493 status = KbFilter_PnP(devobj, pirp);
494 }
495 goto switch_1_break;
496 switch_1_4:
497 {
498#line 396
499 status = KbFilter_Power(devobj, pirp);
500 }
501 goto switch_1_break;
502 switch_1_8:
503 {
504#line 401
505 status = KbFilter_InternIoCtl(devobj, pirp);
506 }
507 goto switch_1_break;
508 switch_1_default: ;
509#line 405
510 return (-1);
511 } else {
512 switch_1_break: ;
513 }
514 }
515 }
516 }
517 }
518 }
519 }
520#line 418
521 if (pended == 1) {
522#line 419
523 if (s == NP) {
524#line 420
525 s = NP;
526 } else {
527 goto _L___2;
528 }
529 } else {
530 _L___2:
531#line 426
532 if (pended == 1) {
533#line 427
534 if (s == MPR3) {
535#line 428
536 s = MPR3;
537 } else {
538 goto _L___1;
539 }
540 } else {
541 _L___1:
542#line 434
543 if (s != UNLOADED) {
544#line 437
545 if (status != -1) {
546#line 440
547 if (s != SKIP2) {
548#line 441
549 if (s != IPC) {
550#line 442
551 if (s == DC) {
552 goto _L___0;
553 }
554 } else {
555 goto _L___0;
556 }
557 } else {
558 _L___0:
559#line 452
560 if (pended == 1) {
561#line 453
562 if (status != 259) {
563 {
564#line 455
565 errorFn();
566 }
567 }
568 } else {
569#line 461
570 if (s == DC) {
571#line 462
572 if (status == 259) {
573
574 }
575 } else {
576#line 468
577 if (status != lowerDriverReturn) {
578 errorFn();
579 }
580 else{
581 }
582 }
583 }
584 }
585 }
586 }
587 }
588 }
589#line 480
590 return (status);
591}
592}
593#line 483 "kbfiltr_simpl2.cil.c"
594void stubMoreProcessingRequired(void)
595{
596
597 {
598#line 487
599 if (s == NP) {
600#line 488
601 s = MPR1;
602 } else {
603 {
604#line 491
605 errorFn();
606 }
607 }
608#line 494
609 return;
610}
611}
612#line 497 "kbfiltr_simpl2.cil.c"
613int IofCallDriver(int DeviceObject , int Irp )
614{
615 int returnVal2 ;
616 int compRetStatus ;
617 int lcontext ;
618 long long __cil_tmp7 ;
619
620 {
621#line 504
622 if (compRegistered) {
623 {
624#line 506
625 compRetStatus = KbFilter_Complete(DeviceObject, Irp, lcontext);
626 }
627 {
628#line 508
629 __cil_tmp7 = (long long )compRetStatus;
630#line 508
631 if (__cil_tmp7 == -1073741802) {
632 {
633#line 510
634 stubMoreProcessingRequired();
635 }
636 }
637 }
638 }
639#line 518
640 int tmp_ndt_6;
641 tmp_ndt_6 = __VERIFIER_nondet_int();
642 if (tmp_ndt_6 == 0) {
643 goto switch_2_0;
644 } else {
645#line 521
646 int tmp_ndt_7;
647 tmp_ndt_7 = __VERIFIER_nondet_int();
648 if (tmp_ndt_7 == 1) {
649 goto switch_2_1;
650 } else {
651 goto switch_2_default;
652#line 526
653 if (0) {
654 switch_2_0:
655#line 528
656 returnVal2 = 0;
657 goto switch_2_break;
658 switch_2_1:
659#line 531
660 returnVal2 = -1073741823;
661 goto switch_2_break;
662 switch_2_default:
663#line 534
664 returnVal2 = 259;
665 goto switch_2_break;
666 } else {
667 switch_2_break: ;
668 }
669 }
670 }
671#line 542
672 if (s == NP) {
673#line 543
674 s = IPC;
675#line 544
676 lowerDriverReturn = returnVal2;
677 } else {
678#line 546
679 if (s == MPR1) {
680#line 547
681 if (returnVal2 == 259) {
682#line 548
683 s = MPR3;
684#line 549
685 lowerDriverReturn = returnVal2;
686 } else {
687#line 551
688 s = NP;
689#line 552
690 lowerDriverReturn = returnVal2;
691 }
692 } else {
693#line 555
694 if (s == SKIP1) {
695#line 556
696 s = SKIP2;
697#line 557
698 lowerDriverReturn = returnVal2;
699 } else {
700 {
701#line 560
702 errorFn();
703 }
704 }
705 }
706 }
707#line 565
708 return (returnVal2);
709}
710}
711#line 568 "kbfiltr_simpl2.cil.c"
712void IofCompleteRequest(int Irp , int PriorityBoost )
713{
714
715 {
716#line 572
717 if (s == NP) {
718#line 573
719 s = DC;
720 } else {
721 {
722#line 576
723 errorFn();
724 }
725 }
726#line 579
727 return;
728}
729}
730#line 582 "kbfiltr_simpl2.cil.c"
731int KeSetEvent(int Event , int Increment , int Wait )
732{ int l ;
733
734 {
735#line 586
736 setEventCalled = 1;
737#line 587
738 return (l);
739}
740}
741#line 590 "kbfiltr_simpl2.cil.c"
742int KeWaitForSingleObject(int Object , int WaitReason , int WaitMode , int Alertable ,
743 int Timeout )
744{
745
746 {
747#line 595
748 if (s == MPR3) {
749#line 596
750 if (setEventCalled == 1) {
751#line 597
752 s = NP;
753#line 598
754 setEventCalled = 0;
755 } else {
756 goto _L;
757 }
758 } else {
759 _L:
760#line 604
761 if (customIrp == 1) {
762#line 605
763 s = NP;
764#line 606
765 customIrp = 0;
766 } else {
767#line 608
768 if (s == MPR3) {
769 {
770#line 610
771 errorFn();
772 }
773 }
774 }
775 }
776#line 617
777 int tmp_ndt_8;
778 tmp_ndt_8 = __VERIFIER_nondet_int();
779 if (tmp_ndt_8 == 0) {
780 goto switch_3_0;
781 } else {
782 goto switch_3_default;
783#line 622
784 if (0) {
785 switch_3_0:
786#line 624
787 return (0);
788 switch_3_default: ;
789#line 626
790 return (-1073741823);
791 } else {
792
793 }
794 }
795}
796}
797#line 634 "kbfiltr_simpl2.cil.c"
798int KbFilter_Complete(int DeviceObject , int Irp , int Context )
799{ int event ;
800
801 {
802 {
803#line 639
804 event = Context;
805#line 640
806 KeSetEvent(event, 0, 0);
807 }
808#line 642
809 return (-1073741802);
810}
811}
812#line 645 "kbfiltr_simpl2.cil.c"
813int KbFilter_CreateClose(int DeviceObject , int Irp )
814{ int irpStack__MajorFunction ;
815 int devExt__UpperConnectData__ClassService ;
816 int Irp__IoStatus__Status ;
817 int status ;
818 int tmp ;
819
820 {
821#line 653
822 status = myStatus;
823#line 654
824 if (irpStack__MajorFunction == 0) {
825 goto switch_4_0;
826 } else {
827#line 657
828 if (irpStack__MajorFunction == 2) {
829 goto switch_4_2;
830 } else {
831#line 660
832 if (0) {
833 switch_4_0: ;
834#line 662
835 if (devExt__UpperConnectData__ClassService == 0) {
836#line 663
837 status = -1073741436;
838 }
839 goto switch_4_break;
840 switch_4_2: ;
841 goto switch_4_break;
842 } else {
843 switch_4_break: ;
844 }
845 }
846 }
847 {
848#line 676
849 Irp__IoStatus__Status = status;
850#line 677
851 myStatus = status;
852#line 678
853 tmp = KbFilter_DispatchPassThrough(DeviceObject, Irp);
854 }
855#line 680
856 return (tmp);
857}
858}
859#line 683 "kbfiltr_simpl2.cil.c"
860int KbFilter_DispatchPassThrough(int DeviceObject , int Irp )
861{ int Irp__Tail__Overlay__CurrentStackLocation ;
862 int Irp__CurrentLocation ;
863 int DeviceObject__DeviceExtension__TopOfStack ;
864 int irpStack ;
865 int tmp ;
866
867 {
868#line 691
869 irpStack = Irp__Tail__Overlay__CurrentStackLocation;
870#line 692
871 if (s == NP) {
872#line 693
873 s = SKIP1;
874 } else {
875 {
876#line 696
877 errorFn();
878 }
879 }
880 {
881#line 700
882 Irp__CurrentLocation ++;
883#line 701
884 Irp__Tail__Overlay__CurrentStackLocation ++;
885#line 702
886 tmp = IofCallDriver(DeviceObject__DeviceExtension__TopOfStack, Irp);
887 }
888#line 704
889 return (tmp);
890}
891}
892#line 707 "kbfiltr_simpl2.cil.c"
893int KbFilter_Power(int DeviceObject , int Irp )
894{ int irpStack__MinorFunction ;
895 int devExt__DeviceState ;
896 int powerState__DeviceState ;
897 int Irp__CurrentLocation ;
898 int Irp__Tail__Overlay__CurrentStackLocation ;
899 int devExt__TopOfStack ;
900 int powerType ;
901 int tmp ;
902
903 {
904#line 718
905 if (irpStack__MinorFunction == 2) {
906 goto switch_5_2;
907 } else {
908#line 721
909 if (irpStack__MinorFunction == 1) {
910 goto switch_5_1;
911 } else {
912#line 724
913 if (irpStack__MinorFunction == 0) {
914 goto switch_5_0;
915 } else {
916#line 727
917 if (irpStack__MinorFunction == 3) {
918 goto switch_5_3;
919 } else {
920 goto switch_5_default;
921#line 732
922 if (0) {
923 switch_5_2: ;
924#line 734
925 if (powerType == DevicePowerState) {
926#line 735
927 devExt__DeviceState = powerState__DeviceState;
928 }
929 switch_5_1: ;
930 switch_5_0: ;
931 switch_5_3: ;
932 switch_5_default: ;
933 goto switch_5_break;
934 } else {
935 switch_5_break: ;
936 }
937 }
938 }
939 }
940 }
941#line 752
942 if (s == NP) {
943#line 753
944 s = SKIP1;
945 } else {
946 {
947#line 756
948 errorFn();
949 }
950 }
951 {
952#line 760
953 Irp__CurrentLocation ++;
954#line 761
955 Irp__Tail__Overlay__CurrentStackLocation ++;
956#line 762
957 tmp = PoCallDriver(devExt__TopOfStack, Irp);
958 }
959#line 764
960 return (tmp);
961}
962}
963#line 767 "kbfiltr_simpl2.cil.c"
964int PoCallDriver(int DeviceObject , int Irp )
965{
966 int compRetStatus ;
967 int returnVal ;
968 int lcontext ;
969 unsigned long __cil_tmp7 ;
970 long __cil_tmp8 ;
971
972 {
973#line 774
974 if (compRegistered) {
975 {
976#line 776
977 compRetStatus = KbFilter_Complete(DeviceObject, Irp, lcontext);
978 }
979 {
980#line 778
981 __cil_tmp7 = (unsigned long )compRetStatus;
982#line 778
983 if (__cil_tmp7 == -1073741802) {
984 {
985#line 780
986 stubMoreProcessingRequired();
987 }
988 }
989 }
990 }
991#line 788
992 int tmp_ndt_9;
993 tmp_ndt_9 = __VERIFIER_nondet_int();
994 if (tmp_ndt_9 == 0) {
995 goto switch_6_0;
996 } else {
997#line 791
998 int tmp_ndt_10;
999 tmp_ndt_10 = __VERIFIER_nondet_int();
1000 if (tmp_ndt_10 == 1) {
1001 goto switch_6_1;
1002 } else {
1003 goto switch_6_default;
1004#line 796
1005 if (0) {
1006 switch_6_0:
1007#line 798
1008 returnVal = 0;
1009 goto switch_6_break;
1010 switch_6_1:
1011#line 801
1012 returnVal = -1073741823;
1013 goto switch_6_break;
1014 switch_6_default:
1015#line 804
1016 returnVal = 259;
1017 goto switch_6_break;
1018 } else {
1019 switch_6_break: ;
1020 }
1021 }
1022 }
1023#line 812
1024 if (s == NP) {
1025#line 813
1026 s = IPC;
1027#line 814
1028 lowerDriverReturn = returnVal;
1029 } else {
1030#line 816
1031 if (s == MPR1) {
1032 {
1033#line 817
1034 __cil_tmp8 = (long )returnVal;
1035#line 817
1036 if (__cil_tmp8 == 259L) {
1037#line 818
1038 s = MPR3;
1039#line 819
1040 lowerDriverReturn = returnVal;
1041 } else {
1042#line 821
1043 s = NP;
1044#line 822
1045 lowerDriverReturn = returnVal;
1046 }
1047 }
1048 } else {
1049#line 825
1050 if (s == SKIP1) {
1051#line 826
1052 s = SKIP2;
1053#line 827
1054 lowerDriverReturn = returnVal;
1055 } else {
1056 {
1057#line 830
1058 errorFn();
1059 }
1060 }
1061 }
1062 }
1063#line 835
1064 return (returnVal);
1065}
1066}
1067#line 838 "kbfiltr_simpl2.cil.c"
1068int KbFilter_InternIoCtl(int DeviceObject , int Irp )
1069{ int Irp__IoStatus__Information ;
1070 int irpStack__Parameters__DeviceIoControl__IoControlCode ;
1071 int devExt__UpperConnectData__ClassService ;
1072 int irpStack__Parameters__DeviceIoControl__InputBufferLength ;
1073 int sizeof__CONNECT_DATA ;
1074 int irpStack__Parameters__DeviceIoControl__Type3InputBuffer ;
1075 int sizeof__INTERNAL_I8042_HOOK_KEYBOARD ;
1076 int hookKeyboard__InitializationRoutine ;
1077 int hookKeyboard__IsrRoutine ;
1078 int Irp__IoStatus__Status ;
1079 int hookKeyboard ;
1080 int connectData ;
1081 int status ;
1082 int tmp ;
1083 int __cil_tmp17 ;
1084 int __cil_tmp18 ;
1085 int __cil_tmp19 ;
1086 int __cil_tmp20 ;
1087 int __cil_tmp21 ;
1088 int __cil_tmp22 ;
1089 int __cil_tmp23 ;
1090 int __cil_tmp24 ;
1091 int __cil_tmp25 ;
1092 int __cil_tmp26 ;
1093 int __cil_tmp27 ;
1094 int __cil_tmp28 ;
1095 int __cil_tmp29 ;
1096 int __cil_tmp30 ;
1097 int __cil_tmp31 ;
1098 int __cil_tmp32 ;
1099 int __cil_tmp33 ;
1100 int __cil_tmp34 ;
1101 int __cil_tmp35 ;
1102 int __cil_tmp36 ;
1103 int __cil_tmp37 ;
1104 int __cil_tmp38 ;
1105 int __cil_tmp39 ;
1106 int __cil_tmp40 ;
1107 int __cil_tmp41 ;
1108 int __cil_tmp42 ;
1109 int __cil_tmp43 ;
1110 int __cil_tmp44 ;
1111 int __cil_tmp45 ;
1112
1113 {
1114#line 855
1115 status = 0;
1116#line 856
1117 Irp__IoStatus__Information = 0;
1118 {
1119#line 857
1120
1121#line 857
1122
1123#line 857
1124
1125#line 857
1126
1127#line 857
1128 if (irpStack__Parameters__DeviceIoControl__IoControlCode == __cil_tmp20) {
1129 goto switch_7_exp_0;
1130 } else {
1131 {
1132#line 860
1133
1134#line 860
1135
1136#line 860
1137
1138#line 860
1139
1140#line 860
1141 if (irpStack__Parameters__DeviceIoControl__IoControlCode == __cil_tmp24) {
1142 goto switch_7_exp_1;
1143 } else {
1144 {
1145#line 863
1146
1147#line 863
1148
1149#line 863
1150
1151#line 863
1152
1153#line 863
1154 if (irpStack__Parameters__DeviceIoControl__IoControlCode == __cil_tmp28) {
1155 goto switch_7_exp_2;
1156 } else {
1157 {
1158#line 866
1159
1160#line 866
1161 if (irpStack__Parameters__DeviceIoControl__IoControlCode == __cil_tmp29) {
1162 goto switch_7_exp_3;
1163 } else {
1164 {
1165#line 869
1166
1167#line 869
1168
1169#line 869
1170
1171#line 869
1172 if (irpStack__Parameters__DeviceIoControl__IoControlCode == __cil_tmp32) {
1173 goto switch_7_exp_4;
1174 } else {
1175 {
1176#line 872
1177
1178#line 872
1179
1180#line 872
1181
1182#line 872
1183 if (irpStack__Parameters__DeviceIoControl__IoControlCode == __cil_tmp35) {
1184 goto switch_7_exp_5;
1185 } else {
1186 {
1187#line 875
1188
1189#line 875
1190
1191#line 875
1192
1193#line 875
1194 if (irpStack__Parameters__DeviceIoControl__IoControlCode == __cil_tmp38) {
1195 goto switch_7_exp_6;
1196 } else {
1197 {
1198#line 878
1199
1200#line 878
1201
1202#line 878
1203
1204#line 878
1205 if (irpStack__Parameters__DeviceIoControl__IoControlCode == __cil_tmp41) {
1206 goto switch_7_exp_7;
1207 } else {
1208 {
1209#line 881
1210
1211#line 881
1212
1213#line 881
1214
1215#line 881
1216 if (irpStack__Parameters__DeviceIoControl__IoControlCode == __cil_tmp44) {
1217 goto switch_7_exp_8;
1218 } else {
1219#line 884
1220 if (0) {
1221 switch_7_exp_0: ;
1222#line 886
1223 if (devExt__UpperConnectData__ClassService != 0) {
1224#line 887
1225 status = -1073741757;
1226 goto switch_7_break;
1227 } else {
1228#line 890
1229 if (irpStack__Parameters__DeviceIoControl__InputBufferLength < sizeof__CONNECT_DATA) {
1230#line 891
1231 status = -1073741811;
1232 goto switch_7_break;
1233 }
1234 }
1235#line 897
1236 connectData = irpStack__Parameters__DeviceIoControl__Type3InputBuffer;
1237 goto switch_7_break;
1238 switch_7_exp_1:
1239#line 900
1240 status = -1073741822;
1241 goto switch_7_break;
1242 switch_7_exp_2: ;
1243#line 903
1244 if (irpStack__Parameters__DeviceIoControl__InputBufferLength < sizeof__INTERNAL_I8042_HOOK_KEYBOARD) {
1245#line 904
1246 status = -1073741811;
1247 goto switch_7_break;
1248 }
1249#line 909
1250 hookKeyboard = irpStack__Parameters__DeviceIoControl__Type3InputBuffer;
1251#line 910
1252 if (hookKeyboard__InitializationRoutine) {
1253
1254 }
1255#line 915
1256 if (hookKeyboard__IsrRoutine) {
1257
1258 }
1259#line 920
1260 status = 0;
1261 goto switch_7_break;
1262 switch_7_exp_3: ;
1263 switch_7_exp_4: ;
1264 switch_7_exp_5: ;
1265 switch_7_exp_6: ;
1266 switch_7_exp_7: ;
1267 switch_7_exp_8: ;
1268 goto switch_7_break;
1269 } else {
1270 switch_7_break: ;
1271 }
1272 }
1273 }
1274 }
1275 }
1276 }
1277 }
1278 }
1279 }
1280 }
1281 }
1282 }
1283 }
1284 }
1285 }
1286 }
1287 }
1288 }
1289 }
1290 {
1291#line 941
1292#line 941
1293 if (status < 0) {
1294 {
1295#line 943
1296 Irp__IoStatus__Status = status;
1297#line 944
1298 myStatus = status;
1299#line 945
1300 IofCompleteRequest(Irp, 0);
1301 }
1302#line 947
1303 return (status);
1304 }
1305 }
1306 {
1307#line 952
1308 tmp = KbFilter_DispatchPassThrough(DeviceObject, Irp);
1309 }
1310#line 954
1311 return (tmp);
1312}
1313}
1314
1315void errorFn(void)
1316{
1317
1318 {
1319 goto ERROR;
1320 ERROR:
1321#line 29
1322 return;
1323}
1324}