int DiskPerfForwardIrpSynchronous(int DeviceObject , int Irp ) { int Irp__Tail__Overlay__CurrentStackLocation = __VERIFIER_nondet_int() ; int DeviceObject__DeviceExtension = __VERIFIER_nondet_int() ; int deviceExtension__TargetDeviceObject = __VERIFIER_nondet_int() ; int deviceExtension ; int event = __VERIFIER_nondet_int() ; int status ; int nextIrpSp__Control ; int irpSp ; int nextIrpSp ; int irpSp__Context ; int irpSp__Control ; int irpSp___0 ; long __cil_tmp15 ; { deviceExtension = DeviceObject__DeviceExtension; irpSp = Irp__Tail__Overlay__CurrentStackLocation; nextIrpSp = Irp__Tail__Overlay__CurrentStackLocation - 1; nextIrpSp__Control = 0; if (s != NP) { { errorFn(); } } else { if (compRegistered != 0) { { errorFn(); } } else { compRegistered = 1; routine = 0; } } { irpSp___0 = Irp__Tail__Overlay__CurrentStackLocation - 1; irpSp__Context = event; irpSp__Control = 224; status = IofCallDriver(deviceExtension__TargetDeviceObject, Irp); } { __cil_tmp15 = (long )status; if (__cil_tmp15 == 259L) { { KeWaitForSingleObject(event, Executive, KernelMode, 0, 0); status = myStatus; } } } return (status); } }
int KbFilter_DispatchPassThrough(int DeviceObject , int Irp ) { int Irp__Tail__Overlay__CurrentStackLocation = __VERIFIER_nondet_int() ; int Irp__CurrentLocation = __VERIFIER_nondet_int() ; int DeviceObject__DeviceExtension__TopOfStack = __VERIFIER_nondet_int() ; int irpStack ; int tmp ; { #line 691 irpStack = Irp__Tail__Overlay__CurrentStackLocation; #line 692 if (s == NP) { #line 693 s = SKIP1; } else { { #line 696 errorFn(); } } { #line 700 Irp__CurrentLocation ++; #line 701 Irp__Tail__Overlay__CurrentStackLocation ++; #line 702 tmp = IofCallDriver(DeviceObject__DeviceExtension__TopOfStack, Irp); } #line 704 return (tmp); } }
int DiskPerfDispatchPower(int DeviceObject , int Irp ) { int Irp__CurrentLocation = __VERIFIER_nondet_int() ; int Irp__Tail__Overlay__CurrentStackLocation = __VERIFIER_nondet_int() ; int DeviceObject__DeviceExtension = __VERIFIER_nondet_int() ; int deviceExtension__TargetDeviceObject = __VERIFIER_nondet_int() ; int deviceExtension ; int tmp ; { if (s == NP) { s = SKIP1; } else { { errorFn(); } } { Irp__CurrentLocation ++; Irp__Tail__Overlay__CurrentStackLocation ++; deviceExtension = DeviceObject__DeviceExtension; tmp = PoCallDriver(deviceExtension__TargetDeviceObject, Irp); } return (tmp); } }
int DiskPerfDispatchPower(int DeviceObject , int Irp ) { int Irp__CurrentLocation = __VERIFIER_nondet_int() ; int Irp__Tail__Overlay__CurrentStackLocation = __VERIFIER_nondet_int() ; int DeviceObject__DeviceExtension = __VERIFIER_nondet_int() ; int deviceExtension__TargetDeviceObject = __VERIFIER_nondet_int() ; int deviceExtension ; int tmp ; { #line 224 if (s == NP) { #line 225 s = SKIP1; } else { { #line 228 errorFn(); } } { #line 232 Irp__CurrentLocation ++; #line 233 Irp__Tail__Overlay__CurrentStackLocation ++; #line 234 deviceExtension = DeviceObject__DeviceExtension; #line 235 tmp = PoCallDriver(deviceExtension__TargetDeviceObject, Irp); } #line 237 return (tmp); } }
int DiskPerfSendToNextDriver(int DeviceObject , int Irp ) { int Irp__CurrentLocation = __VERIFIER_nondet_int() ; int Irp__Tail__Overlay__CurrentStackLocation = __VERIFIER_nondet_int() ; int DeviceObject__DeviceExtension = __VERIFIER_nondet_int() ; int deviceExtension__TargetDeviceObject = __VERIFIER_nondet_int() ; int deviceExtension ; int tmp ; { #line 199 if (s == NP) { #line 200 s = SKIP1; } else { { #line 203 errorFn(); } } { #line 207 Irp__CurrentLocation ++; #line 208 Irp__Tail__Overlay__CurrentStackLocation ++; #line 209 deviceExtension = DeviceObject__DeviceExtension; #line 210 tmp = IofCallDriver(deviceExtension__TargetDeviceObject, Irp); } #line 212 return (tmp); } }
int release_qp(struct inode * inode, struct file * file) { unsigned char status; int temp_1; //assert(lockStatus == 0); //////////////////////////////////////////////////// lock_kernel(); //////////////////////////////////////////////////// fasync_qp(-1, file, 0); qp_count--; if (!qp_count) { temp_1 = poll_qp_status(); if (!temp_1) printk ("Warning: Mouse device busy in release_qp()\n"); status = inb_p(qp_status); outb_p(status & /* ~ */(0x80 | 0x10 ), qp_status); temp_1 = poll_qp_status(); if (!temp_1) printk ("Warning: Mouse device busy in release_qp()\n"); free_irq (12 , ((void *)0) ); // TRACER (atomic_dec(&( &__this_module )->uc.usecount), ( &__this_module )->flags |= 8 ) ; } // assert(lockStatus == 1); if (lockStatus != 1){ errorFn();} //////////////////////////////////////////////////// unlock_kernel(); //////////////////////////////////////////////////// return 0; }
void Quorum::dispatch(sys::DispatchHandle&) { try { cman_dispatch(cman, CMAN_DISPATCH_ALL); int fd = getFd(); if (fd != cmanFd) watch(fd); } catch (const std::exception& e) { QPID_LOG(critical, "Error in quorum dispatch: " << e.what()); errorFn(); } }
int KeWaitForSingleObject(int Object , int WaitReason , int WaitMode , int Alertable , int Timeout ) { { #line 1047 if (s == MPR3) { #line 1048 if (setEventCalled == 1) { #line 1049 s = NP; #line 1050 setEventCalled = 0; } else { goto _L; } } else { _L: #line 1056 if (customIrp == 1) { #line 1057 s = NP; #line 1058 customIrp = 0; } else { #line 1060 if (s == MPR3) { { #line 1062 errorFn(); } } } } #line 1069 int tmp_ndt_8; tmp_ndt_8 = __VERIFIER_nondet_int(); if (tmp_ndt_8 == 0) { goto switch_9_0; } else { goto switch_9_default; #line 1074 if (0) { switch_9_0: #line 1076 return (0); switch_9_default: ; #line 1078 return (-1073741823); } else { } } } }
int KeWaitForSingleObject(int Object , int WaitReason , int WaitMode , int Alertable , int Timeout ) { //int __VERIFIER_nondet_int() ; ; { #line 553 if (s == MPR3) { #line 554 if (setEventCalled == 1) { #line 555 s = NP; #line 556 setEventCalled = 0; } else { goto _L; } } else { _L: #line 562 if (customIrp == 1) { #line 563 s = NP; #line 564 customIrp = 0; } else { #line 566 if (s == MPR3) { { #line 568 errorFn(); } } } } #line 575 int tmp_ndt_4; tmp_ndt_4 = __VERIFIER_nondet_int(); if (tmp_ndt_4 == 0) { goto switch_3_0; } else { goto switch_3_default; #line 580 if (0) { switch_3_0: #line 582 return (0); switch_3_default: ; #line 584 return (-1073741823); } else { } } } }
int KeWaitForSingleObject(int Object , int WaitReason , int WaitMode , int Alertable , int Timeout ) { { #line 949 if (s == MPR3) { #line 950 if (setEventCalled == 1) { #line 951 s = NP; #line 952 setEventCalled = 0; } else { goto _L; } } else { _L: #line 958 if (customIrp == 1) { #line 959 s = NP; #line 960 customIrp = 0; } else { #line 962 if (s == MPR3) { { #line 964 errorFn(); } } } } #line 971 int tmp_ndt_10; tmp_ndt_10 = __VERIFIER_nondet_int(); if (tmp_ndt_10 == 0) { goto switch_5_0; } else { goto switch_5_default; #line 976 if (0) { switch_5_0: ; #line 978 return (0); switch_5_default: ; #line 980 return (-1073741823); } else { } } } }
int KeWaitForSingleObject(int Object , int WaitReason , int WaitMode , int Alertable , int Timeout ) { { #line 595 if (s == MPR3) { #line 596 if (setEventCalled == 1) { #line 597 s = NP; #line 598 setEventCalled = 0; } else { goto _L; } } else { _L: #line 604 if (customIrp == 1) { #line 605 s = NP; #line 606 customIrp = 0; } else { #line 608 if (s == MPR3) { { #line 610 errorFn(); } } } } #line 617 int tmp_ndt_8; tmp_ndt_8 = __VERIFIER_nondet_int(); if (tmp_ndt_8 == 0) { goto switch_3_0; } else { goto switch_3_default; #line 622 if (0) { switch_3_0: #line 624 return (0); switch_3_default: ; #line 626 return (-1073741823); } else { } } } }
int DiskPerfIoCompletion(int DeviceObject , int Irp , int Context ) { int irpStack__MajorFunction = __VERIFIER_nondet_int() ; int partitionCounters__BytesRead__QuadPart = __VERIFIER_nondet_int() ; int Irp__IoStatus__Information = __VERIFIER_nondet_int() ; int partitionCounters__ReadCount = __VERIFIER_nondet_int() ; int partitionCounters__ReadTime__QuadPart = __VERIFIER_nondet_int() ; int difference__QuadPart = __VERIFIER_nondet_int() ; int partitionCounters__BytesWritten__QuadPart = __VERIFIER_nondet_int() ; int partitionCounters__WriteCount = __VERIFIER_nondet_int() ; int partitionCounters__WriteTime__QuadPart = __VERIFIER_nondet_int() ; int Irp__Flags = __VERIFIER_nondet_int() ; int partitionCounters__SplitCount = __VERIFIER_nondet_int() ; int Irp__PendingReturned = __VERIFIER_nondet_int() ; int Irp__Tail__Overlay__CurrentStackLocation__Control ; int partitionCounters = __VERIFIER_nondet_int() ; int queueLen = __VERIFIER_nondet_int() ; { if (partitionCounters == 0) { return (0); } if (queueLen < 0) { } if (queueLen == 0) { } if (irpStack__MajorFunction == 3) { partitionCounters__BytesRead__QuadPart += Irp__IoStatus__Information; partitionCounters__ReadCount ++; partitionCounters__ReadTime__QuadPart += difference__QuadPart; } else { partitionCounters__BytesWritten__QuadPart += Irp__IoStatus__Information; partitionCounters__WriteCount ++; partitionCounters__WriteTime__QuadPart += difference__QuadPart; } if (Irp__Flags != 8) { partitionCounters__SplitCount ++; } else { } if (Irp__PendingReturned) { if (pended == 0) { pended = 1; } else { { errorFn(); } } //Irp__Tail__Overlay__CurrentStackLocation__Control |= 1; } return (0); } }
void stubMoreProcessingRequired(void) { { if (s == NP) { s = MPR1; } else { { errorFn(); } } return; } }
void IofCompleteRequest(int Irp , int PriorityBoost ) { { if (s == NP) { s = DC; } else { { errorFn(); } } return; } }
void stubMoreProcessingRequired(void) { { #line 487 if (s == NP) { #line 488 s = MPR1; } else { { #line 491 errorFn(); } } #line 494 return; } }
void IofCompleteRequest(int Irp , int PriorityBoost ) { { #line 926 if (s == NP) { #line 927 s = DC; } else { { #line 930 errorFn(); } } #line 933 return; } }
void IofCompleteRequest(int Irp , int PriorityBoost ) { { #line 530 if (s == NP) { #line 531 s = DC; } else { { #line 534 errorFn(); } } #line 537 return; } }
void stubMoreProcessingRequired(void) { { #line 939 if (s == NP) { #line 940 s = MPR1; } else { { #line 943 errorFn(); } } #line 946 return; } }
void stubMoreProcessingRequired(void) { { #line 445 if (s == NP) { #line 446 s = MPR1; } else { { #line 449 errorFn(); } } #line 452 return; } }
void stubMoreProcessingRequired(void) { { #line 835 if (s == NP) { #line 836 s = MPR1; } else { { #line 839 errorFn(); } } #line 842 return; } }
void IofCompleteRequest(int Irp , int PriorityBoost ) { { #line 1024 if (s == NP) { #line 1025 s = DC; } else { { #line 1028 errorFn(); } } #line 1031 return; } }
void IofCompleteRequest(int Irp , int PriorityBoost ) { { #line 572 if (s == NP) { #line 573 s = DC; } else { { #line 576 errorFn(); } } #line 579 return; } }
int KeWaitForSingleObject(int Object , int WaitReason , int WaitMode , int Alertable , int Timeout ) { { if (s == MPR3) { if (setEventCalled == 1) { s = NP; setEventCalled = 0; } else { goto _L; } } else { _L: if (customIrp == 1) { s = NP; customIrp = 0; } else { if (s == MPR3) { { errorFn(); } } } } int tmp_ndt_9; tmp_ndt_9 = __VERIFIER_nondet_int(); if (tmp_ndt_9 == 0) { goto switch_9_0; } else { goto switch_9_default; if (0) { switch_9_0: return (0); switch_9_default: ; return (-1073741823); } else { } } } }
int main() { struct inode *inode; struct file *file; char *buffer; const char *wbuffer; int fd, on; size_t count; loff_t *ppos; poll_table *wait; struct file *filp; TRACER_init_global_vars__(); lockStatus = 0; qpmouse_init(); open_qp(inode, file); read_qp(file, buffer, count, ppos); write_qp(file, wbuffer,count, ppos); poll_qp(file, wait); fasync_qp(fd, filp, on); release_qp(inode, file); if (lockStatus==1) errorFn(); }
int FlQueueIrpToThread(int Irp , int DisketteExtension ) { int status ; int threadHandle = __VERIFIER_nondet_int() ; int DisketteExtension__PoweringDown = __VERIFIER_nondet_int() ; int DisketteExtension__ThreadReferenceCount = __VERIFIER_nondet_int() ; int DisketteExtension__FloppyThread = __VERIFIER_nondet_int() ; int Irp__IoStatus__Status ; int Irp__IoStatus__Information ; int Irp__Tail__Overlay__CurrentStackLocation__Control ; int ObjAttributes = __VERIFIER_nondet_int() ; int __cil_tmp12 ; int __cil_tmp13 ; { if (DisketteExtension__PoweringDown == 1) { myStatus = -1073741101; Irp__IoStatus__Status = -1073741101; Irp__IoStatus__Information = 0; return (-1073741101); } DisketteExtension__ThreadReferenceCount ++; if (DisketteExtension__ThreadReferenceCount == 0) { DisketteExtension__ThreadReferenceCount ++; PagingReferenceCount ++; if (PagingReferenceCount == 1) { } { status = PsCreateSystemThread(threadHandle, 0, ObjAttributes, 0, 0, FloppyThread, DisketteExtension); } { if (status < 0) { DisketteExtension__ThreadReferenceCount = -1; PagingReferenceCount --; if (PagingReferenceCount == 0) { } return (status); } } { status = ObReferenceObjectByHandle(threadHandle, 1048576, 0, KernelMode, DisketteExtension__FloppyThread, 0); ZwClose(threadHandle); } { if (status < 0) { return (status); } } } // Irp__Tail__Overlay__CurrentStackLocation__Control |= 1; if (pended == 0) { pended = 1; } else { { errorFn(); } } return (259); } }
int IofCallDriver(int DeviceObject , int Irp ) { int returnVal2 ; int compRetStatus1 ; int lcontext = __VERIFIER_nondet_int() ; unsigned long __cil_tmp7 ; { if (compRegistered) { { compRetStatus1 = FloppyPnpComplete(DeviceObject, Irp, lcontext); } { __cil_tmp7 = (unsigned long )compRetStatus1; if (__cil_tmp7 == -1073741802) { { stubMoreProcessingRequired(); } } } } int tmp_ndt_7; tmp_ndt_7 = __VERIFIER_nondet_int(); if (tmp_ndt_7 == 0) { goto switch_8_0; } else { int tmp_ndt_8; tmp_ndt_8 = __VERIFIER_nondet_int(); if (tmp_ndt_8 == 1) { goto switch_8_1; } else { goto switch_8_default; if (0) { switch_8_0: returnVal2 = 0; goto switch_8_break; switch_8_1: returnVal2 = -1073741823; goto switch_8_break; switch_8_default: returnVal2 = 259; goto switch_8_break; } else { switch_8_break: ; } } } if (s == NP) { s = IPC; lowerDriverReturn = returnVal2; } else { if (s == MPR1) { if (returnVal2 == 259) { s = MPR3; lowerDriverReturn = returnVal2; } else { s = NP; lowerDriverReturn = returnVal2; } } else { if (s == SKIP1) { s = SKIP2; lowerDriverReturn = returnVal2; } else { { errorFn(); } } } } return (returnVal2); } }
void unlock_kernel() { if (lockStatus == 1) lockStatus = 0; else errorFn(); }
int main(void) { int status ; int irp = __VERIFIER_nondet_int() ; int pirp ; int pirp__IoStatus__Status ; int irp_choice = __VERIFIER_nondet_int() ; int devobj = __VERIFIER_nondet_int() ; int __cil_tmp8 ; FloppyThread = 0; KernelMode = 0; Suspended = 0; Executive = 0; DiskController = 0; FloppyDiskPeripheral = 0; FlConfigCallBack = 0; MaximumInterfaceType = 0; MOUNTDEV_MOUNTED_DEVICE_GUID = 0; myStatus = 0; s = 0; UNLOADED = 0; NP = 0; DC = 0; SKIP1 = 0; SKIP2 = 0; MPR1 = 0; MPR3 = 0; IPC = 0; pended = 0; compRegistered = 0; lowerDriverReturn = 0; setEventCalled = 0; customIrp = 0; { { status = 0; pirp = irp; _BLAST_init(); } if (status >= 0) { s = NP; customIrp = 0; setEventCalled = customIrp; lowerDriverReturn = setEventCalled; compRegistered = lowerDriverReturn; pended = compRegistered; pirp__IoStatus__Status = 0; myStatus = 0; if (irp_choice == 0) { pirp__IoStatus__Status = -1073741637; myStatus = -1073741637; } { stub_driver_init(); } { if (status < 0) { return (-1); } } int tmp_ndt_1; tmp_ndt_1 = __VERIFIER_nondet_int(); if (tmp_ndt_1 == 3) { goto switch_2_3; } else { goto switch_2_default; if (0) { switch_2_3: { status = FloppyPnp(devobj, pirp); } goto switch_2_break; switch_2_default: ; return (-1); } else { switch_2_break: ; } } } if (pended == 1) { if (s == NP) { s = NP; } else { goto _L___2; } } else { _L___2: if (pended == 1) { if (s == MPR3) { s = MPR3; } else { goto _L___1; } } else { _L___1: if (s != UNLOADED) { if (status != -1) { if (s != SKIP2) { if (s != IPC) { if (s != DC) { { errorFn(); } } else { goto _L___0; } } else { goto _L___0; } } else { _L___0: if (pended == 1) { if (status != 259) { status = 0; } } else { if (s == DC) { if (status == 259) { { errorFn(); } } } else { if (status != lowerDriverReturn) { { errorFn(); } } } } } } } } } status = 0; return (status); } }
int FloppyStartDevice(int DeviceObject , int Irp ) { int DeviceObject__DeviceExtension = __VERIFIER_nondet_int() ; int Irp__Tail__Overlay__CurrentStackLocation = __VERIFIER_nondet_int() ; int Irp__IoStatus__Status ; int disketteExtension__TargetObject = __VERIFIER_nondet_int() ; int disketteExtension__MaxTransferSize ; int disketteExtension__DriveType = __VERIFIER_nondet_int() ; int disketteExtension__PerpendicularMode ; int disketteExtension__DeviceUnit ; int disketteExtension__DriveOnValue ; int disketteExtension__UnderlyingPDO = __VERIFIER_nondet_int() ; int disketteExtension__InterfaceString = __VERIFIER_nondet_int() ; int disketteExtension__IsStarted ; int disketteExtension__HoldNewRequests ; int ntStatus ; int pnpStatus ; int doneEvent = __VERIFIER_nondet_int() ; int fdcInfo = __VERIFIER_nondet_int() ; int fdcInfo__BufferCount ; int fdcInfo__BufferSize ; int fdcInfo__MaxTransferSize = __VERIFIER_nondet_int() ; int fdcInfo__AcpiBios = __VERIFIER_nondet_int() ; int fdcInfo__AcpiFdiSupported = __VERIFIER_nondet_int() ; int fdcInfo__PeripheralNumber = __VERIFIER_nondet_int() ; int fdcInfo__BusType ; int fdcInfo__ControllerNumber = __VERIFIER_nondet_int() ; int fdcInfo__UnitNumber = __VERIFIER_nondet_int() ; int fdcInfo__BusNumber = __VERIFIER_nondet_int() ; int Dc ; int Fp ; int disketteExtension ; int irpSp ; int irpSp___0 ; int nextIrpSp ; int nextIrpSp__Control ; int irpSp___1 ; int irpSp__Control ; int irpSp__Context ; int InterfaceType ; int KUSER_SHARED_DATA__AlternativeArchitecture_NEC98x86 = __VERIFIER_nondet_int() ; long __cil_tmp42 ; int __cil_tmp43 ; int __cil_tmp44 ; int __cil_tmp45 ; int __cil_tmp46 ; int __cil_tmp47 ; int __cil_tmp48 ; int __cil_tmp49 ; { Dc = DiskController; Fp = FloppyDiskPeripheral; disketteExtension = DeviceObject__DeviceExtension; irpSp = Irp__Tail__Overlay__CurrentStackLocation; irpSp___0 = Irp__Tail__Overlay__CurrentStackLocation; nextIrpSp = Irp__Tail__Overlay__CurrentStackLocation - 1; nextIrpSp__Control = 0; if (s != NP) { { errorFn(); } } else { if (compRegistered != 0) { { errorFn(); } } else { compRegistered = 1; } } { irpSp___1 = Irp__Tail__Overlay__CurrentStackLocation - 1; irpSp__Context = doneEvent; irpSp__Control = 224; ntStatus = IofCallDriver(disketteExtension__TargetObject, Irp); } { __cil_tmp42 = (long )ntStatus; if (__cil_tmp42 == 259L) { { ntStatus = KeWaitForSingleObject(doneEvent, Executive, KernelMode, 0, 0); ntStatus = myStatus; } } } { fdcInfo__BufferCount = 0; fdcInfo__BufferSize = 0; __cil_tmp43 = 3080; __cil_tmp44 = 458752; __cil_tmp45 = 461832; __cil_tmp46 = 461835; ntStatus = FlFdcDeviceIo(disketteExtension__TargetObject, __cil_tmp46, fdcInfo); } if (ntStatus >= 0) { disketteExtension__MaxTransferSize = fdcInfo__MaxTransferSize; if (fdcInfo__AcpiBios) { if (fdcInfo__AcpiFdiSupported) { { ntStatus = FlAcpiConfigureFloppy(disketteExtension, fdcInfo); } if (disketteExtension__DriveType == 4) { //__cil_tmp47 = uninf1(); //disketteExtension__PerpendicularMode |= __cil_tmp47; } } else { goto _L; } } else { _L: if (disketteExtension__DriveType == 4) { //__cil_tmp48 = uninf1(); //disketteExtension__PerpendicularMode |= __cil_tmp48; } InterfaceType = 0; { while (1) { while_0_continue: /* CIL Label */ ; if (InterfaceType >= MaximumInterfaceType) { goto while_1_break; } { fdcInfo__BusType = InterfaceType; ntStatus = IoQueryDeviceDescription(fdcInfo__BusType, fdcInfo__BusNumber, Dc, fdcInfo__ControllerNumber, Fp, fdcInfo__PeripheralNumber, FlConfigCallBack, disketteExtension); } if (ntStatus >= 0) { goto while_1_break; } InterfaceType ++; } while_0_break: /* CIL Label */ ; } while_1_break: ; } if (ntStatus >= 0) { if (KUSER_SHARED_DATA__AlternativeArchitecture_NEC98x86 != 0) { disketteExtension__DeviceUnit = fdcInfo__UnitNumber; //disketteExtension__DriveOnValue = fdcInfo__UnitNumber; } else { disketteExtension__DeviceUnit = fdcInfo__PeripheralNumber; //__cil_tmp49 = 16 << fdcInfo__PeripheralNumber; //disketteExtension__DriveOnValue = fdcInfo__PeripheralNumber | __cil_tmp49; } { pnpStatus = IoRegisterDeviceInterface(disketteExtension__UnderlyingPDO, MOUNTDEV_MOUNTED_DEVICE_GUID, 0, disketteExtension__InterfaceString); } if (pnpStatus >= 0) { { pnpStatus = IoSetDeviceInterfaceState(disketteExtension__InterfaceString, 1); } } disketteExtension__IsStarted = 1; disketteExtension__HoldNewRequests = 0; } } { Irp__IoStatus__Status = ntStatus; myStatus = ntStatus; IofCompleteRequest(Irp, 0); } return (ntStatus); } }
int FloppyPnp(int DeviceObject , int Irp ) { int DeviceObject__DeviceExtension = __VERIFIER_nondet_int() ; int Irp__Tail__Overlay__CurrentStackLocation = __VERIFIER_nondet_int() ; int Irp__IoStatus__Information ; int Irp__IoStatus__Status ; int Irp__CurrentLocation = __VERIFIER_nondet_int() ; int disketteExtension__IsRemoved = __VERIFIER_nondet_int() ; int disketteExtension__IsStarted = __VERIFIER_nondet_int() ; int disketteExtension__TargetObject = __VERIFIER_nondet_int() ; int disketteExtension__HoldNewRequests ; int disketteExtension__FloppyThread = __VERIFIER_nondet_int() ; int disketteExtension__InterfaceString__Buffer = __VERIFIER_nondet_int() ; int disketteExtension__InterfaceString = __VERIFIER_nondet_int() ; int disketteExtension__ArcName__Length = __VERIFIER_nondet_int() ; int disketteExtension__ArcName = __VERIFIER_nondet_int() ; int irpSp__MinorFunction = __VERIFIER_nondet_int() ; int IoGetConfigurationInformation__FloppyCount = __VERIFIER_nondet_int() ; int irpSp ; int disketteExtension ; int ntStatus ; int doneEvent = __VERIFIER_nondet_int() ; int irpSp___0 ; int nextIrpSp ; int nextIrpSp__Control ; int irpSp___1 ; int irpSp__Context ; int irpSp__Control ; long __cil_tmp29 ; long __cil_tmp30 ; { ntStatus = 0; PagingReferenceCount ++; if (PagingReferenceCount == 1) { } disketteExtension = DeviceObject__DeviceExtension; irpSp = Irp__Tail__Overlay__CurrentStackLocation; if (disketteExtension__IsRemoved) { { Irp__IoStatus__Information = 0; Irp__IoStatus__Status = -1073741738; myStatus = -1073741738; IofCompleteRequest(Irp, 0); } return (-1073741738); } if (irpSp__MinorFunction == 0) { goto switch_0_0; } else { if (irpSp__MinorFunction == 5) { goto switch_0_5; } else { if (irpSp__MinorFunction == 1) { goto switch_0_5; } else { if (irpSp__MinorFunction == 6) { goto switch_0_6; } else { if (irpSp__MinorFunction == 3) { goto switch_0_6; } else { if (irpSp__MinorFunction == 4) { goto switch_0_4; } else { if (irpSp__MinorFunction == 2) { goto switch_0_2; } else { goto switch_0_default; if (0) { switch_0_0: { ntStatus = FloppyStartDevice(DeviceObject, Irp); } goto switch_0_break; switch_0_5: if (irpSp__MinorFunction == 5) { } if (! disketteExtension__IsStarted) { if (s == NP) { s = SKIP1; } else { { errorFn(); } } { Irp__CurrentLocation ++; Irp__Tail__Overlay__CurrentStackLocation ++; ntStatus = IofCallDriver(disketteExtension__TargetObject, Irp); } return (ntStatus); } { disketteExtension__HoldNewRequests = 1; ntStatus = FlQueueIrpToThread(Irp, disketteExtension); } { __cil_tmp29 = (long )ntStatus; if (__cil_tmp29 == 259L) { { KeWaitForSingleObject(disketteExtension__FloppyThread, Executive, KernelMode, 0, 0); } if (disketteExtension__FloppyThread != 0) { } disketteExtension__FloppyThread = 0; Irp__IoStatus__Status = 0; myStatus = 0; if (s == NP) { s = SKIP1; } else { { errorFn(); } } { Irp__CurrentLocation ++; Irp__Tail__Overlay__CurrentStackLocation ++; ntStatus = IofCallDriver(disketteExtension__TargetObject, Irp); } } else { { ntStatus = -1073741823; Irp__IoStatus__Status = ntStatus; myStatus = ntStatus; Irp__IoStatus__Information = 0; IofCompleteRequest(Irp, 0); } } } goto switch_0_break; switch_0_6: if (irpSp__MinorFunction == 6) { } if (! disketteExtension__IsStarted) { Irp__IoStatus__Status = 0; myStatus = 0; if (s == NP) { s = SKIP1; } else { { errorFn(); } } { Irp__CurrentLocation ++; Irp__Tail__Overlay__CurrentStackLocation ++; ntStatus = IofCallDriver(disketteExtension__TargetObject, Irp); } } else { Irp__IoStatus__Status = 0; myStatus = 0; irpSp___0 = Irp__Tail__Overlay__CurrentStackLocation; nextIrpSp = Irp__Tail__Overlay__CurrentStackLocation - 1; nextIrpSp__Control = 0; if (s != NP) { { errorFn(); } } else { if (compRegistered != 0) { { errorFn(); } } else { compRegistered = 1; } } { irpSp___1 = Irp__Tail__Overlay__CurrentStackLocation - 1; irpSp__Context = doneEvent; irpSp__Control = 224; ntStatus = IofCallDriver(disketteExtension__TargetObject, Irp); } { __cil_tmp30 = (long )ntStatus; if (__cil_tmp30 == 259L) { { KeWaitForSingleObject(doneEvent, Executive, KernelMode, 0, 0); ntStatus = myStatus; } } } { disketteExtension__HoldNewRequests = 0; Irp__IoStatus__Status = ntStatus; myStatus = ntStatus; Irp__IoStatus__Information = 0; IofCompleteRequest(Irp, 0); } } goto switch_0_break; switch_0_4: disketteExtension__IsStarted = 0; Irp__IoStatus__Status = 0; myStatus = 0; if (s == NP) { s = SKIP1; } else { { errorFn(); } } { Irp__CurrentLocation ++; Irp__Tail__Overlay__CurrentStackLocation ++; ntStatus = IofCallDriver(disketteExtension__TargetObject, Irp); } goto switch_0_break; switch_0_2: disketteExtension__HoldNewRequests = 0; disketteExtension__IsStarted = 0; disketteExtension__IsRemoved = 1; if (s == NP) { s = SKIP1; } else { { errorFn(); } } { Irp__CurrentLocation ++; Irp__Tail__Overlay__CurrentStackLocation ++; Irp__IoStatus__Status = 0; myStatus = 0; ntStatus = IofCallDriver(disketteExtension__TargetObject, Irp); } if (disketteExtension__InterfaceString__Buffer != 0) { { IoSetDeviceInterfaceState(disketteExtension__InterfaceString, 0); } } if (disketteExtension__ArcName__Length != 0) { { IoDeleteSymbolicLink(disketteExtension__ArcName); } } IoGetConfigurationInformation__FloppyCount --; goto switch_0_break; switch_0_default: ; if (s == NP) { s = SKIP1; } else { { errorFn(); } } { Irp__CurrentLocation ++; Irp__Tail__Overlay__CurrentStackLocation ++; ntStatus = IofCallDriver(disketteExtension__TargetObject, Irp); } } else { switch_0_break: ; } } } } } } } } PagingReferenceCount --; if (PagingReferenceCount == 0) { } return (ntStatus); } }