LCOV - code coverage report
Current view: top level - avtg/drivers/usb/storage/usb-storage.ko/linux:drivers:clk2/weaver - usb.c.aux (source / functions) Hit Total Coverage
Test: coverage.info Lines: 429 435 98.6 %
Date: 2017-01-25 Functions: 56 56 100.0 %

          Line data    Source code
       1             : 
       2             : struct device;
       3             : 
       4             : void *ldv_dev_get_drvdata(const struct device *dev);
       5             : int ldv_dev_set_drvdata(struct device *dev, void *data);
       6             : 
       7             : struct spi_master;
       8             : struct device;
       9             : struct spi_master *ldv_spi_alloc_master(struct device *host, unsigned size);
      10             : 
      11             : #include <linux/ldv/err.h>
      12             : 
      13             : #include <linux/types.h>
      14             : void *ldv_kzalloc(size_t size, gfp_t flags);
      15             : 
      16             : struct clk;
      17             : 
      18             : extern void ldv_clk_disable(struct clk *clk);
      19             : extern int ldv_clk_enable(void);
      20             : 
      21             : #include <linux/ldv/common.h>
      22             : #include <linux/ldv/irq.h>
      23             : #include <verifier/common.h>
      24             : #include <verifier/nondet.h>
      25             : #include <verifier/memory.h>
      26             : #include <verifier/thread.h>
      27             : 
      28             : #include <scsi/scsi_host.h>
      29             : #include <linux/usb.h>
      30             : 
      31             : 
      32             : struct ldv_struct_insmod_12 {
      33             :  int signal_pending;
      34             : };
      35           1 : 
      36             : struct ldv_struct_scsi_LLDd_scenario_1 {
      37             :  struct Scsi_Host *arg0;
      38             :  int signal_pending;
      39             : };
      40           1 : 
      41             : struct ldv_struct_usb_scenario_11 {
      42             :  struct usb_driver *arg0;
      43             :  int signal_pending;
      44             : };
      45             : 
      46             : /* EMG Function declarations */
      47             : void ldv_dispatch_default_deregister_7_12_6(void);
      48             : void ldv_dispatch_default_deregister_8_12_4(void);
      49             : void ldv_dispatch_default_deregister_9_12_5(void);
      50             : void ldv_dispatch_default_register_7_12_7(void);
      51             : void ldv_dispatch_default_register_8_12_9(void);
      52             : void ldv_dispatch_default_register_9_12_8(void);
      53             : void ldv_dispatch_deregister_15_1(struct Scsi_Host *);
      54             : void ldv_dispatch_deregister_16_1(struct usb_driver *);
      55             : void ldv_dispatch_insmod_deregister_19_2(void);
      56             : void ldv_dispatch_insmod_register_19_3(void);
      57             : void ldv_dispatch_register_13_3(struct Scsi_Host *);
      58             : void ldv_dispatch_register_18_3(struct usb_driver *);
      59             : int ldv_emg_scsi_add_host(struct Scsi_Host *, struct device *);
      60             : extern struct Scsi_Host *ldv_emg_scsi_host_alloc(struct scsi_host_template *, int);
      61             : void ldv_emg_scsi_remove_host(struct Scsi_Host *);
      62             : void ldv_emg_usb_deregister(struct usb_driver *);
      63             : int ldv_emg_usb_register(struct usb_driver *);
      64             : extern int ldv_emg_usb_reset_device(struct usb_device *);
      65             : void ldv_insmod_12(void *);
      66             : void ldv_insmod_usb_stor_exit_12_2(void (*)(void));
      67             : int ldv_insmod_usb_stor_init_12_13(int (*)(void));
      68             : void ldv_main_19(void *);
      69             : void ldv_random_containerless_scenario_10(void *);
      70             : extern void ldv_random_containerless_scenario_2(void *);
      71             : extern void ldv_random_containerless_scenario_3(void *);
      72             : void ldv_random_containerless_scenario_4(void *);
      73             : void ldv_random_containerless_scenario_5(void *);
      74             : void ldv_random_containerless_scenario_6(void *);
      75             : void ldv_random_containerless_scenario_7(void *);
      76             : void ldv_random_containerless_scenario_8(void *);
      77             : void ldv_random_containerless_scenario_9(void *);
      78             : void ldv_random_containerless_scenario_callback_10_4(int (*)(struct us_data *), struct us_data *);
      79             : void ldv_random_containerless_scenario_callback_3_10(ssize_t (*)(struct device *, struct device_attribute *, char *, size_t ), struct device *, struct device_attribute *, char *, long unsigned int);
      80             : void ldv_random_containerless_scenario_callback_4_10(int (*)(char *, struct kernel_param *), char *, struct kernel_param *);
      81             : void ldv_random_containerless_scenario_callback_4_4(int (*)(char *, struct kernel_param *), char *, struct kernel_param *);
      82             : void ldv_random_containerless_scenario_callback_5_10(int (*)(char *, struct kernel_param *), char *, struct kernel_param *);
      83             : void ldv_random_containerless_scenario_callback_5_4(int (*)(char *, struct kernel_param *), char *, struct kernel_param *);
      84             : void ldv_random_containerless_scenario_callback_6_4(int (*)(struct us_data *), struct us_data *);
      85             : void ldv_random_containerless_scenario_callback_7_4(int (*)(struct us_data *), struct us_data *);
      86             : void ldv_random_containerless_scenario_callback_8_4(int (*)(struct us_data *), struct us_data *);
      87             : void ldv_random_containerless_scenario_callback_9_4(int (*)(struct us_data *), struct us_data *);
      88             : void ldv_scsi_LLDd_scenario_1(void *);
      89             : extern void ldv_scsi_LLDd_scenario_callback_1_13(int (*)(struct scsi_cmnd *), struct scsi_cmnd *);
      90             : extern void ldv_scsi_LLDd_scenario_callback_1_14(int (*)(struct scsi_cmnd *), struct scsi_cmnd *);
      91             : extern void ldv_scsi_LLDd_scenario_callback_1_15(char *(*)(struct Scsi_Host *), struct Scsi_Host *);
      92             : extern void ldv_scsi_LLDd_scenario_callback_1_16(int (*)(struct Scsi_Host *, char *, char **, long int, int, int), struct Scsi_Host *, char *, char **, long int, int, int);
      93             : extern void ldv_scsi_LLDd_scenario_callback_1_19(int (*)(struct scsi_cmnd *, void (*)(struct scsi_cmnd *)), struct scsi_cmnd *, void (*)(struct scsi_cmnd *));
      94             : extern void ldv_scsi_LLDd_scenario_callback_1_22(int (*)(struct scsi_device *), struct scsi_device *);
      95             : extern void ldv_scsi_LLDd_scenario_callback_1_23(int (*)(struct scsi_device *), struct scsi_device *);
      96             : extern void ldv_scsi_LLDd_scenario_callback_1_4(int (*)(struct scsi_cmnd *), struct scsi_cmnd *);
      97             : int ldv_scsi_LLDd_scenario_probe_1_10(int (*)(struct Scsi_Host *), struct Scsi_Host *);
      98             : void ldv_scsi_LLDd_scenario_release_1_2(int (*)(struct Scsi_Host *), struct Scsi_Host *);
      99             : void ldv_usb_scenario_11(void *);
     100             : void ldv_usb_scenario_post_11_10(int (*)(struct usb_interface *), struct usb_interface *);
     101             : void ldv_usb_scenario_pre_11_11(int (*)(struct usb_interface *), struct usb_interface *);
     102             : int ldv_usb_scenario_probe_11_14(int (*)(struct usb_interface *, struct usb_device_id *), struct usb_interface *, struct usb_device_id *);
     103             : void ldv_usb_scenario_release_11_5(void (*)(struct usb_interface *), struct usb_interface *);
     104             : void ldv_usb_scenario_resume_11_8(int (*)(struct usb_interface *), struct usb_interface *);
     105             : void ldv_usb_scenario_suspend_11_9(int (*)(struct usb_interface *, pm_message_t ), struct usb_interface *, pm_message_t *);
     106             : int main(void);
     107             : 
     108             : /* EMG variable declarations */
     109           1 : struct ldv_thread ldv_thread_1;
     110           1 : struct ldv_thread ldv_thread_10;
     111           1 : struct ldv_thread ldv_thread_11;
     112           1 : struct ldv_thread ldv_thread_12;
     113           1 : struct ldv_thread ldv_thread_19;
     114           1 : struct ldv_thread ldv_thread_4;
     115           1 : struct ldv_thread ldv_thread_5;
     116           1 : struct ldv_thread ldv_thread_6;
     117           1 : struct ldv_thread ldv_thread_7;
     118           1 : struct ldv_thread ldv_thread_8;
     119           1 : struct ldv_thread ldv_thread_9;
     120             : 
     121             : /* EMG variable initialization */
     122             : 
     123             : /* EMG function definitions */
     124             : /* AUX_FUNC ldv_dispatch_default_deregister_7_12_6 */
     125             : void ldv_dispatch_default_deregister_7_12_6() {
     126             :  struct ldv_struct_insmod_12 *cf_arg_2;
     127             :  struct ldv_struct_insmod_12 *cf_arg_3;
     128             :  /* Skip thread join call */
     129             :  /* Skip thread join call */
     130           1 :  return;
     131             : }
     132             : 
     133             : /* AUX_FUNC ldv_dispatch_default_deregister_8_12_4 */
     134             : void ldv_dispatch_default_deregister_8_12_4() {
     135             :  struct ldv_struct_insmod_12 *cf_arg_4;
     136             :  struct ldv_struct_insmod_12 *cf_arg_5;
     137             :  /* Skip thread join call */
     138             :  /* Skip thread join call */
     139           1 :  return;
     140             : }
     141             : 
     142             : /* AUX_FUNC ldv_dispatch_default_deregister_9_12_5 */
     143             : void ldv_dispatch_default_deregister_9_12_5() {
     144             :  struct ldv_struct_insmod_12 *cf_arg_8;
     145             :  struct ldv_struct_insmod_12 *cf_arg_9;
     146             :  struct ldv_struct_insmod_12 *cf_arg_10;
     147             :  struct ldv_struct_insmod_12 *cf_arg_6;
     148             :  struct ldv_struct_insmod_12 *cf_arg_7;
     149             :  /* Skip thread join call */
     150             :  /* Skip thread join call */
     151             :  /* Skip thread join call */
     152             :  /* Skip thread join call */
     153             :  /* Skip thread join call */
     154           1 :  return;
     155             : }
     156             : 
     157             : /* AUX_FUNC ldv_dispatch_default_register_7_12_7 */
     158             : void ldv_dispatch_default_register_7_12_7() {
     159             :  struct ldv_struct_insmod_12 *cf_arg_2;
     160           1 :  struct ldv_struct_insmod_12 *cf_arg_3;
     161           4 :  cf_arg_2 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_12));
     162           3 :  ldv_random_containerless_scenario_2(cf_arg_2);
     163           4 :  cf_arg_3 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_12));
     164           2 :  ldv_random_containerless_scenario_3(cf_arg_3);
     165           1 :  return;
     166             : }
     167             : 
     168             : /* AUX_FUNC ldv_dispatch_default_register_8_12_9 */
     169             : void ldv_dispatch_default_register_8_12_9() {
     170             :  struct ldv_struct_insmod_12 *cf_arg_4;
     171           1 :  struct ldv_struct_insmod_12 *cf_arg_5;
     172           4 :  cf_arg_4 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_12));
     173           3 :  ldv_random_containerless_scenario_4(cf_arg_4);
     174           4 :  cf_arg_5 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_12));
     175           2 :  ldv_random_containerless_scenario_5(cf_arg_5);
     176           1 :  return;
     177             : }
     178             : 
     179             : /* AUX_FUNC ldv_dispatch_default_register_9_12_8 */
     180             : void ldv_dispatch_default_register_9_12_8() {
     181             :  struct ldv_struct_insmod_12 *cf_arg_8;
     182           1 :  struct ldv_struct_insmod_12 *cf_arg_9;
     183           1 :  struct ldv_struct_insmod_12 *cf_arg_10;
     184           1 :  struct ldv_struct_insmod_12 *cf_arg_6;
     185           1 :  struct ldv_struct_insmod_12 *cf_arg_7;
     186           4 :  cf_arg_8 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_12));
     187           3 :  ldv_random_containerless_scenario_8(cf_arg_8);
     188           4 :  cf_arg_9 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_12));
     189           3 :  ldv_random_containerless_scenario_9(cf_arg_9);
     190           4 :  cf_arg_10 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_12));
     191           3 :  ldv_random_containerless_scenario_10(cf_arg_10);
     192           3 :  cf_arg_6 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_12));
     193           2 :  ldv_random_containerless_scenario_6(cf_arg_6);
     194           3 :  cf_arg_7 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_12));
     195           2 :  ldv_random_containerless_scenario_7(cf_arg_7);
     196           1 :  return;
     197             : }
     198             : 
     199             : /* AUX_FUNC ldv_dispatch_deregister_15_1 */
     200             : void ldv_dispatch_deregister_15_1(struct Scsi_Host *arg0) {
     201             :  struct ldv_struct_scsi_LLDd_scenario_1 *cf_arg_1;
     202             :  /* Skip thread join call */
     203           5 :  return;
     204             : }
     205             : 
     206             : /* AUX_FUNC ldv_dispatch_deregister_16_1 */
     207             : void ldv_dispatch_deregister_16_1(struct usb_driver *arg0) {
     208             :  struct ldv_struct_usb_scenario_11 *cf_arg_11;
     209             :  /* Skip thread join call */
     210           2 :  return;
     211             : }
     212             : 
     213             : /* AUX_FUNC ldv_dispatch_insmod_deregister_19_2 */
     214             : void ldv_dispatch_insmod_deregister_19_2() {
     215             :  struct ldv_struct_insmod_12 *cf_arg_12;
     216             :  /* Skip thread join call */
     217           1 :  return;
     218             : }
     219             : 
     220             : /* AUX_FUNC ldv_dispatch_insmod_register_19_3 */
     221             : void ldv_dispatch_insmod_register_19_3() {
     222             :  struct ldv_struct_insmod_12 *cf_arg_12;
     223           4 :  cf_arg_12 = ldv_xmalloc(sizeof(struct ldv_struct_insmod_12));
     224           4 :  ldv_insmod_12(cf_arg_12);
     225           1 :  return;
     226             : }
     227             : 
     228             : /* AUX_FUNC ldv_dispatch_register_13_3 */
     229             : void ldv_dispatch_register_13_3(struct Scsi_Host *arg0) {
     230             :  struct ldv_struct_scsi_LLDd_scenario_1 *cf_arg_1;
     231           4 :  cf_arg_1 = ldv_xmalloc(sizeof(struct ldv_struct_scsi_LLDd_scenario_1));
     232           2 :  cf_arg_1->arg0 = arg0;
     233           2 :  ldv_scsi_LLDd_scenario_1(cf_arg_1);
     234           1 :  return;
     235             : }
     236             : 
     237             : /* AUX_FUNC ldv_dispatch_register_18_3 */
     238             : void ldv_dispatch_register_18_3(struct usb_driver *arg0) {
     239             :  struct ldv_struct_usb_scenario_11 *cf_arg_11;
     240           4 :  cf_arg_11 = ldv_xmalloc(sizeof(struct ldv_struct_usb_scenario_11));
     241           2 :  cf_arg_11->arg0 = arg0;
     242           3 :  ldv_usb_scenario_11(cf_arg_11);
     243           1 :  return;
     244             : }
     245             : 
     246             : /* AUX_FUNC ldv_emg_scsi_add_host */
     247             : int ldv_emg_scsi_add_host(struct Scsi_Host *arg0, struct device *arg1) {
     248             :  /* LDV {"comment": "Control function 'scsi_add_host'", "type": "CONTROL_FUNCTION_BEGIN", "function": "ldv_emg_scsi_add_host"} */
     249           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     250           1 :  struct Scsi_Host *ldv_13_host_host;
     251           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     252             :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
     253             : 
     254           4 :  if (ldv_undef_int()) {
     255             :   /* LDV {"action": "ASSIGN", "type": "CONDITION_BEGIN", "comment": "Get Scsi_Host structure from parameters."} */
     256           1 :   ldv_13_host_host = arg0;
     257             :   /* LDV {"action": "ASSIGN", "type": "CONDITION_END"} */
     258             : 
     259             :   /* LDV {"action": "REGISTER", "type": "DISPATCH_BEGIN", "comment": "Register SCSI_HOST_TEMPLATE callbacks."} */
     260           2 :   ldv_dispatch_register_13_3(ldv_13_host_host);
     261             :   /* LDV {"action": "REGISTER", "type": "DISPATCH_END"} */
     262             : 
     263             :   /* LDV {"action": "SUCCESS", "type": "CONDITION_BEGIN", "comment": "Sysfs registration has been successful."} */
     264           1 :   return 0;
     265             :   /* LDV {"action": "SUCCESS", "type": "CONDITION_END"} */
     266             : 
     267             :   /* Exit function at a terminal state */
     268             :  }
     269             :  else {
     270             :   /* LDV {"action": "FAIL", "type": "CONDITION_BEGIN", "comment": "Failed to perform sysfs registration."} */
     271           3 :   return ldv_undef_int_negative();
     272             :   /* LDV {"action": "FAIL", "type": "CONDITION_END"} */
     273             : 
     274             :   /* Exit function at a terminal state */
     275             :  }
     276             :  /* End of the process */
     277             :  /* LDV {"comment": "End of control function based on process 'scsi_add_host'", "type": "CONTROL_FUNCTION_END", "function": "ldv_emg_scsi_add_host"} */
     278             : }
     279             : 
     280             : /* AUX_FUNC ldv_emg_scsi_remove_host */
     281             : void ldv_emg_scsi_remove_host(struct Scsi_Host *arg0) {
     282             :  /* LDV {"comment": "Control function 'scsi_remove_host'", "type": "CONTROL_FUNCTION_BEGIN", "function": "ldv_emg_scsi_remove_host"} */
     283           5 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     284             :  struct Scsi_Host *ldv_15_host_host;
     285             :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     286             :  /* LDV {"action": "ASSIGN", "type": "CONDITION_BEGIN", "comment": "Get Scsi_Host structure from parameters."} */
     287           5 :  ldv_15_host_host = arg0;
     288             :  /* LDV {"action": "ASSIGN", "type": "CONDITION_END"} */
     289             : 
     290             :  /* LDV {"action": "DEREGISTER", "type": "DISPATCH_BEGIN", "comment": "Deregister SCSI_HOST_TEMPLATE callbacks."} */
     291          10 :  ldv_dispatch_deregister_15_1(ldv_15_host_host);
     292             :  /* LDV {"action": "DEREGISTER", "type": "DISPATCH_END"} */
     293             : 
     294             :  /* Exit function at a terminal state */
     295           5 :  return;
     296             :  /* End of the process */
     297             :  return;
     298             :  /* LDV {"comment": "End of control function based on process 'scsi_remove_host'", "type": "CONTROL_FUNCTION_END", "function": "ldv_emg_scsi_remove_host"} */
     299             : }
     300             : 
     301             : /* AUX_FUNC ldv_emg_usb_deregister */
     302             : void ldv_emg_usb_deregister(struct usb_driver *arg0) {
     303             :  /* LDV {"comment": "Control function 'usb_deregister'", "type": "CONTROL_FUNCTION_BEGIN", "function": "ldv_emg_usb_deregister"} */
     304           2 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     305             :  struct usb_driver *ldv_16_usb_driver_usb_driver;
     306             :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     307             :  /* LDV {"action": "ASSIGN", "type": "CONDITION_BEGIN", "comment": "Get callbacks to deregister provided within 'usb_driver' argument."} */
     308           2 :  ldv_16_usb_driver_usb_driver = arg0;
     309             :  /* LDV {"action": "ASSIGN", "type": "CONDITION_END"} */
     310             : 
     311             :  /* LDV {"action": "DEREGISTER", "type": "DISPATCH_BEGIN", "comment": "Deregister USB callbacks."} */
     312           4 :  ldv_dispatch_deregister_16_1(ldv_16_usb_driver_usb_driver);
     313             :  /* LDV {"action": "DEREGISTER", "type": "DISPATCH_END"} */
     314             : 
     315             :  /* Exit function at a terminal state */
     316           2 :  return;
     317             :  /* End of the process */
     318             :  return;
     319             :  /* LDV {"comment": "End of control function based on process 'usb_deregister'", "type": "CONTROL_FUNCTION_END", "function": "ldv_emg_usb_deregister"} */
     320             : }
     321             : 
     322             : /* AUX_FUNC ldv_emg_usb_register */
     323             : int ldv_emg_usb_register(struct usb_driver *arg0) {
     324             :  /* LDV {"comment": "Control function 'usb_register'", "type": "CONTROL_FUNCTION_BEGIN", "function": "ldv_emg_usb_register"} */
     325           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     326           1 :  struct usb_driver *ldv_18_usb_driver_usb_driver;
     327           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     328             :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
     329             : 
     330           4 :  if (ldv_undef_int()) {
     331             :   /* LDV {"action": "ASSIGN", "type": "CONDITION_BEGIN", "comment": "Get 'usb' callbacks to register."} */
     332           1 :   ldv_18_usb_driver_usb_driver = arg0;
     333             :   /* LDV {"action": "ASSIGN", "type": "CONDITION_END"} */
     334             : 
     335             :   /* LDV {"action": "REGISTER", "type": "DISPATCH_BEGIN", "comment": "Register USB callbacks."} */
     336           2 :   ldv_dispatch_register_18_3(ldv_18_usb_driver_usb_driver);
     337             :   /* LDV {"action": "REGISTER", "type": "DISPATCH_END"} */
     338             : 
     339             :   /* LDV {"action": "FAIL", "type": "CONDITION_BEGIN", "comment": "Fail registration of 'usb' callbacks."} */
     340           3 :   return ldv_undef_int_negative();
     341             :   /* LDV {"action": "FAIL", "type": "CONDITION_END"} */
     342             : 
     343             :   /* Exit function at a terminal state */
     344             :  }
     345             :  else {
     346             :   /* LDV {"action": "SUCCESS", "type": "CONDITION_BEGIN", "comment": "Registration of 'usb' callbacks has been successful."} */
     347           1 :   return 0;
     348             :   /* LDV {"action": "SUCCESS", "type": "CONDITION_END"} */
     349             : 
     350             :   /* Exit function at a terminal state */
     351             :  }
     352             :  /* End of the process */
     353             :  /* LDV {"comment": "End of control function based on process 'usb_register'", "type": "CONTROL_FUNCTION_END", "function": "ldv_emg_usb_register"} */
     354             : }
     355             : 
     356             : /* AUX_FUNC ldv_insmod_12 */
     357             : void ldv_insmod_12(void *arg0) {
     358             :  /* LDV {"thread": 12, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'insmod(artificial)'", "function": "ldv_insmod_12"} */
     359           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     360           1 :  int ldv_12_ret_default;
     361           1 :  void (*ldv_12_usb_stor_exit_default)(void);
     362           1 :  int (*ldv_12_usb_stor_init_default)(void);
     363           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     364             :  /* LDV {"action": "INSMOD_REGISTER", "type": "RECEIVE_BEGIN", "comment": "Trigger module initialization."} */
     365           2 :  ldv_free(arg0);
     366             :  /* LDV {"action": "INSMOD_REGISTER", "type": "RECEIVE_END"} */
     367             : 
     368             :  /* LDV {"action": "USB_STOR_INIT", "type": "CALL_BEGIN", "callback": true, "comment": "Initialize the module after insmod with 'usb_stor_init' function. Invoke callback usb_stor_init from ARTIFICIAL."} */
     369             :  /* LDV {"type": "CALLBACK", "call": "ldv_12_ret_default = (usb_stor_init)();", "comment": "usb_stor_init"} */
     370           2 :  ldv_12_ret_default = ldv_insmod_usb_stor_init_12_13(ldv_12_usb_stor_init_default);
     371             :  /* Callback post-call */
     372           2 :  ldv_12_ret_default = ldv_post_init(ldv_12_ret_default);
     373             :  /* LDV {"action": "USB_STOR_INIT", "type": "CALL_END"} */
     374             : 
     375           4 :  if (ldv_undef_int()) {
     376             :   /* LDV {"action": "INIT_FAILED", "type": "CONDITION_BEGIN", "comment": "Failed to initialize the module."} */
     377           2 :   ldv_assume(ldv_12_ret_default != 0);
     378             :   /* LDV {"action": "INIT_FAILED", "type": "CONDITION_END"} */
     379             : 
     380             :   /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Trigger module exit."} */
     381             :   /* Skip a non-replicative signal receiving */
     382             :   /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_END"} */
     383             : 
     384             :   /* Exit function at a terminal state */
     385           1 :   return;
     386             :  }
     387             :  else {
     388             :   /* LDV {"action": "INIT_SUCCESS", "type": "CONDITION_BEGIN", "comment": "Module has been initialized."} */
     389           2 :   ldv_assume(ldv_12_ret_default == 0);
     390             :   /* LDV {"action": "INIT_SUCCESS", "type": "CONDITION_END"} */
     391             : 
     392           4 :   if (ldv_undef_int()) {
     393             :    /* LDV {"action": "DEFAULT_REGISTER_8", "type": "DISPATCH_BEGIN", "comment": "Register 'STRUCT_KERNEL_PARAM' callbacks with unknown registration function."} */
     394           2 :    ldv_dispatch_default_register_8_12_9();
     395             :    /* LDV {"action": "DEFAULT_REGISTER_8", "type": "DISPATCH_END"} */
     396             : 
     397             :    /* LDV {"action": "DEFAULT_REGISTER_9", "type": "DISPATCH_BEGIN", "comment": "Register 'STRUCT_US_UNUSUAL_DEV' callbacks with unknown registration function."} */
     398           2 :    ldv_dispatch_default_register_9_12_8();
     399             :    /* LDV {"action": "DEFAULT_REGISTER_9", "type": "DISPATCH_END"} */
     400             : 
     401             :    /* LDV {"action": "DEFAULT_REGISTER_7", "type": "DISPATCH_BEGIN", "comment": "Register 'STRUCT_DEVICE_ATTRIBUTE' callbacks with unknown registration function."} */
     402           2 :    ldv_dispatch_default_register_7_12_7();
     403             :    /* LDV {"action": "DEFAULT_REGISTER_7", "type": "DISPATCH_END"} */
     404             : 
     405             :    /* LDV {"action": "DEFAULT_DEREGISTER_7", "type": "DISPATCH_BEGIN", "comment": "Deregister 'STRUCT_DEVICE_ATTRIBUTE' callbacks with unknown deregistration function."} */
     406           2 :    ldv_dispatch_default_deregister_7_12_6();
     407             :    /* LDV {"action": "DEFAULT_DEREGISTER_7", "type": "DISPATCH_END"} */
     408             : 
     409             :    /* LDV {"action": "DEFAULT_DEREGISTER_9", "type": "DISPATCH_BEGIN", "comment": "Deregister 'STRUCT_US_UNUSUAL_DEV' callbacks with unknown deregistration function."} */
     410           2 :    ldv_dispatch_default_deregister_9_12_5();
     411             :    /* LDV {"action": "DEFAULT_DEREGISTER_9", "type": "DISPATCH_END"} */
     412             : 
     413             :    /* LDV {"action": "DEFAULT_DEREGISTER_8", "type": "DISPATCH_BEGIN", "comment": "Deregister 'STRUCT_KERNEL_PARAM' callbacks with unknown deregistration function."} */
     414           2 :    ldv_dispatch_default_deregister_8_12_4();
     415             :    /* LDV {"action": "DEFAULT_DEREGISTER_8", "type": "DISPATCH_END"} */
     416             : 
     417             :   }
     418             :   else {
     419             :    /* LDV {"action": "NONE", "type": "CONDITION_BEGIN", "comment": "Skip default callbacks registrations and deregistrations."} */
     420             :    /* LDV {"action": "NONE", "type": "CONDITION_END"} */
     421             : 
     422             :   }
     423             :   /* LDV {"action": "USB_STOR_EXIT", "type": "CALL_BEGIN", "callback": true, "comment": "Exit the module before its unloading with 'usb_stor_exit' function. Invoke callback usb_stor_exit from ARTIFICIAL."} */
     424             :   /* LDV {"type": "CALLBACK", "call": "(usb_stor_exit)();", "comment": "usb_stor_exit"} */
     425           4 :   ldv_insmod_usb_stor_exit_12_2(ldv_12_usb_stor_exit_default);
     426             :   /* LDV {"action": "USB_STOR_EXIT", "type": "CALL_END"} */
     427             : 
     428             :   /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Trigger module exit."} */
     429             :   /* Skip a non-replicative signal receiving */
     430             :   /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_END"} */
     431             : 
     432             :   /* Exit function at a terminal state */
     433           1 :   return;
     434             :  }
     435             :  /* End of the process */
     436             :  return;
     437             :  /* LDV {"comment": "End of control function based on process 'insmod(artificial)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_insmod_12"} */
     438             : }
     439             : 
     440             : /* AUX_FUNC_CALLBACK ldv_insmod_usb_stor_exit_12_2 */
     441             : void ldv_insmod_usb_stor_exit_12_2(void (*arg0)(void)) {
     442           4 :  (usb_stor_exit)();
     443           2 : }
     444             : 
     445             : /* AUX_FUNC_CALLBACK ldv_insmod_usb_stor_init_12_13 */
     446             : int ldv_insmod_usb_stor_init_12_13(int (*arg0)(void)) {
     447           3 :  return (usb_stor_init)();
     448           1 : }
     449             : 
     450             : /* AUX_FUNC ldv_main_19 */
     451             : void ldv_main_19(void *arg0) {
     452             :  /* LDV {"thread": 19, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'main(main)'", "function": "ldv_main_19"} */
     453             :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     454             :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     455             :  /* LDV {"action": "INIT", "type": "CONDITION_BEGIN", "comment": "Initialize rule models."} */
     456           1 :  ldv_initialize();
     457             :  /* LDV {"action": "INIT", "type": "CONDITION_END"} */
     458             : 
     459             :  /* LDV {"action": "INSMOD_REGISTER", "type": "DISPATCH_BEGIN", "comment": "Start environment model scenarios."} */
     460           2 :  ldv_dispatch_insmod_register_19_3();
     461             :  /* LDV {"action": "INSMOD_REGISTER", "type": "DISPATCH_END"} */
     462             : 
     463             :  /* LDV {"action": "INSMOD_DEREGISTER", "type": "DISPATCH_BEGIN", "comment": "Stop environment model scenarios."} */
     464           2 :  ldv_dispatch_insmod_deregister_19_2();
     465             :  /* LDV {"action": "INSMOD_DEREGISTER", "type": "DISPATCH_END"} */
     466             : 
     467             :  /* LDV {"action": "FINAL", "type": "CONDITION_BEGIN", "comment": "Check rule model state at the exit."} */
     468           1 :  ldv_check_final_state();
     469           1 :  ldv_stop();
     470             :  /* LDV {"action": "FINAL", "type": "CONDITION_END"} */
     471             : 
     472             :  /* Exit function at a terminal state */
     473           0 :  return;
     474             :  /* End of the process */
     475             :  return;
     476             :  /* LDV {"comment": "End of control function based on process 'main(main)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_main_19"} */
     477             : }
     478             : 
     479             : /* AUX_FUNC ldv_random_containerless_scenario_10 */
     480             : void ldv_random_containerless_scenario_10(void *arg0) {
     481             :  /* LDV {"thread": 10, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_us_unusual_dev)'", "function": "ldv_random_containerless_scenario_10"} */
     482           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     483           1 :  int (*ldv_10_callback_initFunction)(struct us_data *);
     484           1 :  struct us_data *ldv_10_container_struct_us_data_ptr;
     485           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     486             :  /* LDV {"action": "DEFAULT_REGISTER_9", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_US_UNUSUAL_DEV callbacks invocations scenario."} */
     487           2 :  ldv_free(arg0);
     488             :  /* LDV {"action": "DEFAULT_REGISTER_9", "type": "RECEIVE_END"} */
     489             : 
     490             :  /* LDV {"action": "DEFAULT_ALLOC_9", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
     491           3 :  ldv_10_container_struct_us_data_ptr = ldv_xmalloc_unknown_size(0);
     492             :  /* LDV {"action": "DEFAULT_ALLOC_9", "type": "CONDITION_END"} */
     493             : 
     494             :  /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
     495             :  /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
     496             : 
     497             :  /* Jump to a subprocess 'call' initial state */
     498           1 :  goto ldv_call_10;
     499             :  /* End of the process */
     500             :  return;
     501           1 : 
     502             :  /* Sbprocess call */
     503             :  ldv_call_10:
     504             :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
     505             : 
     506           4 :  if (ldv_undef_int()) {
     507             :   /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback initFunction from us_unusual_dev."} */
     508             :   /* LDV {"type": "CALLBACK", "call": "((& usb_stor_ucr61s2b_init))(ldv_10_container_struct_us_data_ptr);", "comment": "callback"} */
     509           2 :   ldv_random_containerless_scenario_callback_10_4(ldv_10_callback_initFunction, ldv_10_container_struct_us_data_ptr);
     510             :   /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     511             : 
     512             :   /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
     513             :   /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
     514             : 
     515             :   /* Jump to a subprocess 'call' initial state */
     516           1 :   goto ldv_call_10;
     517             :  }
     518             :  else {
     519             :   /* LDV {"action": "DEFAULT_FREE_9", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
     520           2 :   ldv_free(ldv_10_container_struct_us_data_ptr);
     521             :   /* LDV {"action": "DEFAULT_FREE_9", "type": "CONDITION_END"} */
     522             : 
     523             :   /* LDV {"action": "DEFAULT_DEREGISTER_9", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_US_UNUSUAL_DEV callbacks invocations scenario."} */
     524             :   /* Skip a non-replicative signal receiving */
     525             :   /* LDV {"action": "DEFAULT_DEREGISTER_9", "type": "RECEIVE_END"} */
     526             : 
     527             :   /* Exit function at a terminal state */
     528           1 :   return;
     529             :  }
     530             :  /* End of the subprocess 'call' */
     531             :  return;
     532             :  /* LDV {"comment": "End of control function based on process 'random_containerless_scenario(struct_us_unusual_dev)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_random_containerless_scenario_10"} */
     533             : }
     534             : 
     535             : /* AUX_FUNC ldv_random_containerless_scenario_4 */
     536             : void ldv_random_containerless_scenario_4(void *arg0) {
     537             :  /* LDV {"thread": 4, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_kernel_param)'", "function": "ldv_random_containerless_scenario_4"} */
     538           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     539           1 :  int (*ldv_4_callback_get)(char *, struct kernel_param *);
     540           1 :  int (*ldv_4_callback_set)(char *, struct kernel_param *);
     541           1 :  struct kernel_param *ldv_4_container_struct_kernel_param;
     542           1 :  char *ldv_4_ldv_param_10_0_default;
     543           1 :  char *ldv_4_ldv_param_4_0_default;
     544           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     545           1 :  /* LDV {"action": "DEFAULT_REGISTER_8", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_KERNEL_PARAM callbacks invocations scenario."} */
     546           3 :  ldv_free(arg0);
     547           1 :  /* LDV {"action": "DEFAULT_REGISTER_8", "type": "RECEIVE_END"} */
     548             : 
     549             :  /* LDV {"action": "DEFAULT_ALLOC_8", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
     550           3 :  ldv_4_container_struct_kernel_param = ldv_xmalloc_unknown_size(0);
     551             :  /* LDV {"action": "DEFAULT_ALLOC_8", "type": "CONDITION_END"} */
     552             : 
     553             :  /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
     554             :  /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
     555             : 
     556             :  /* Jump to a subprocess 'call' initial state */
     557           1 :  goto ldv_call_4;
     558             :  /* End of the process */
     559             :  return;
     560           1 : 
     561             :  /* Sbprocess call */
     562             :  ldv_call_4:
     563             :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
     564             : 
     565           4 :  if (ldv_undef_int()) {
     566             :   /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
     567           3 :   ldv_4_ldv_param_4_0_default = ldv_xmalloc_unknown_size(0);
     568             :   /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
     569             : 
     570           4 :   if (ldv_undef_int()) {
     571             :    /* LDV {"action": "PRE_CALL_10", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
     572           3 :    ldv_4_ldv_param_10_0_default = ldv_xmalloc_unknown_size(0);
     573             :    /* LDV {"action": "PRE_CALL_10", "type": "CONDITION_END"} */
     574             : 
     575             :    /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback set from kernel_param."} */
     576             :    /* LDV {"type": "CALLBACK", "call": "((& param_set_uint))(ldv_4_ldv_param_10_0_default, ldv_4_container_struct_kernel_param);", "comment": "callback"} */
     577           2 :    ldv_random_containerless_scenario_callback_4_10(ldv_4_callback_set, ldv_4_ldv_param_10_0_default, ldv_4_container_struct_kernel_param);
     578             :    /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     579             : 
     580             :    /* LDV {"action": "POST_CALL_10", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
     581           2 :    ldv_free(ldv_4_ldv_param_10_0_default);
     582             :    /* LDV {"action": "POST_CALL_10", "type": "CONDITION_END"} */
     583             : 
     584             :   }
     585             :   else {
     586             :    /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback get from kernel_param."} */
     587             :    /* LDV {"type": "CALLBACK", "call": "((& param_get_uint))(ldv_4_ldv_param_4_0_default, ldv_4_container_struct_kernel_param);", "comment": "callback"} */
     588           2 :    ldv_random_containerless_scenario_callback_4_4(ldv_4_callback_get, ldv_4_ldv_param_4_0_default, ldv_4_container_struct_kernel_param);
     589             :    /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     590             : 
     591             :   }
     592             :   /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
     593           4 :   ldv_free(ldv_4_ldv_param_4_0_default);
     594             :   /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
     595             : 
     596             :   /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
     597             :   /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
     598             : 
     599             :   /* Jump to a subprocess 'call' initial state */
     600           1 :   goto ldv_call_4;
     601             :  }
     602             :  else {
     603             :   /* LDV {"action": "DEFAULT_FREE_8", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
     604           2 :   ldv_free(ldv_4_container_struct_kernel_param);
     605             :   /* LDV {"action": "DEFAULT_FREE_8", "type": "CONDITION_END"} */
     606             : 
     607             :   /* LDV {"action": "DEFAULT_DEREGISTER_8", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_KERNEL_PARAM callbacks invocations scenario."} */
     608             :   /* Skip a non-replicative signal receiving */
     609             :   /* LDV {"action": "DEFAULT_DEREGISTER_8", "type": "RECEIVE_END"} */
     610             : 
     611             :   /* Exit function at a terminal state */
     612           1 :   return;
     613             :  }
     614             :  /* End of the subprocess 'call' */
     615             :  return;
     616             :  /* LDV {"comment": "End of control function based on process 'random_containerless_scenario(struct_kernel_param)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_random_containerless_scenario_4"} */
     617             : }
     618             : 
     619             : /* AUX_FUNC ldv_random_containerless_scenario_5 */
     620             : void ldv_random_containerless_scenario_5(void *arg0) {
     621             :  /* LDV {"thread": 5, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_kernel_param)'", "function": "ldv_random_containerless_scenario_5"} */
     622           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     623           1 :  int (*ldv_5_callback_get)(char *, struct kernel_param *);
     624           1 :  int (*ldv_5_callback_set)(char *, struct kernel_param *);
     625           1 :  struct kernel_param *ldv_5_container_struct_kernel_param;
     626           1 :  char *ldv_5_ldv_param_10_0_default;
     627           1 :  char *ldv_5_ldv_param_4_0_default;
     628           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     629           1 :  /* LDV {"action": "DEFAULT_REGISTER_8", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_KERNEL_PARAM callbacks invocations scenario."} */
     630           3 :  ldv_free(arg0);
     631           1 :  /* LDV {"action": "DEFAULT_REGISTER_8", "type": "RECEIVE_END"} */
     632             : 
     633             :  /* LDV {"action": "DEFAULT_ALLOC_8", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
     634           3 :  ldv_5_container_struct_kernel_param = ldv_xmalloc_unknown_size(0);
     635             :  /* LDV {"action": "DEFAULT_ALLOC_8", "type": "CONDITION_END"} */
     636             : 
     637             :  /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
     638             :  /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
     639             : 
     640             :  /* Jump to a subprocess 'call' initial state */
     641           1 :  goto ldv_call_5;
     642             :  /* End of the process */
     643             :  return;
     644           1 : 
     645             :  /* Sbprocess call */
     646             :  ldv_call_5:
     647             :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
     648             : 
     649           4 :  if (ldv_undef_int()) {
     650             :   /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
     651           3 :   ldv_5_ldv_param_4_0_default = ldv_xmalloc_unknown_size(0);
     652             :   /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
     653             : 
     654           4 :   if (ldv_undef_int()) {
     655             :    /* LDV {"action": "PRE_CALL_10", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
     656           3 :    ldv_5_ldv_param_10_0_default = ldv_xmalloc_unknown_size(0);
     657             :    /* LDV {"action": "PRE_CALL_10", "type": "CONDITION_END"} */
     658             : 
     659             :    /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback set from kernel_param."} */
     660             :    /* LDV {"type": "CALLBACK", "call": "((& param_set_copystring))(ldv_5_ldv_param_10_0_default, ldv_5_container_struct_kernel_param);", "comment": "callback"} */
     661           2 :    ldv_random_containerless_scenario_callback_5_10(ldv_5_callback_set, ldv_5_ldv_param_10_0_default, ldv_5_container_struct_kernel_param);
     662             :    /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     663             : 
     664             :    /* LDV {"action": "POST_CALL_10", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
     665           2 :    ldv_free(ldv_5_ldv_param_10_0_default);
     666             :    /* LDV {"action": "POST_CALL_10", "type": "CONDITION_END"} */
     667             : 
     668             :   }
     669             :   else {
     670             :    /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback get from kernel_param."} */
     671             :    /* LDV {"type": "CALLBACK", "call": "((& param_get_string))(ldv_5_ldv_param_4_0_default, ldv_5_container_struct_kernel_param);", "comment": "callback"} */
     672           2 :    ldv_random_containerless_scenario_callback_5_4(ldv_5_callback_get, ldv_5_ldv_param_4_0_default, ldv_5_container_struct_kernel_param);
     673             :    /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     674             : 
     675             :   }
     676             :   /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
     677           4 :   ldv_free(ldv_5_ldv_param_4_0_default);
     678             :   /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
     679             : 
     680             :   /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
     681             :   /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
     682             : 
     683             :   /* Jump to a subprocess 'call' initial state */
     684           1 :   goto ldv_call_5;
     685             :  }
     686             :  else {
     687             :   /* LDV {"action": "DEFAULT_FREE_8", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
     688           2 :   ldv_free(ldv_5_container_struct_kernel_param);
     689             :   /* LDV {"action": "DEFAULT_FREE_8", "type": "CONDITION_END"} */
     690             : 
     691             :   /* LDV {"action": "DEFAULT_DEREGISTER_8", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_KERNEL_PARAM callbacks invocations scenario."} */
     692             :   /* Skip a non-replicative signal receiving */
     693             :   /* LDV {"action": "DEFAULT_DEREGISTER_8", "type": "RECEIVE_END"} */
     694             : 
     695             :   /* Exit function at a terminal state */
     696           1 :   return;
     697             :  }
     698             :  /* End of the subprocess 'call' */
     699             :  return;
     700             :  /* LDV {"comment": "End of control function based on process 'random_containerless_scenario(struct_kernel_param)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_random_containerless_scenario_5"} */
     701             : }
     702             : 
     703             : /* AUX_FUNC ldv_random_containerless_scenario_6 */
     704             : void ldv_random_containerless_scenario_6(void *arg0) {
     705             :  /* LDV {"thread": 6, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_us_unusual_dev)'", "function": "ldv_random_containerless_scenario_6"} */
     706           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     707           1 :  int (*ldv_6_callback_initFunction)(struct us_data *);
     708           1 :  struct us_data *ldv_6_container_struct_us_data_ptr;
     709           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     710             :  /* LDV {"action": "DEFAULT_REGISTER_9", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_US_UNUSUAL_DEV callbacks invocations scenario."} */
     711           2 :  ldv_free(arg0);
     712             :  /* LDV {"action": "DEFAULT_REGISTER_9", "type": "RECEIVE_END"} */
     713             : 
     714             :  /* LDV {"action": "DEFAULT_ALLOC_9", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
     715           3 :  ldv_6_container_struct_us_data_ptr = ldv_xmalloc_unknown_size(0);
     716             :  /* LDV {"action": "DEFAULT_ALLOC_9", "type": "CONDITION_END"} */
     717             : 
     718             :  /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
     719             :  /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
     720             : 
     721             :  /* Jump to a subprocess 'call' initial state */
     722           1 :  goto ldv_call_6;
     723             :  /* End of the process */
     724             :  return;
     725           1 : 
     726             :  /* Sbprocess call */
     727             :  ldv_call_6:
     728             :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
     729             : 
     730           4 :  if (ldv_undef_int()) {
     731             :   /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback initFunction from us_unusual_dev."} */
     732             :   /* LDV {"type": "CALLBACK", "call": "((& option_ms_init))(ldv_6_container_struct_us_data_ptr);", "comment": "callback"} */
     733           2 :   ldv_random_containerless_scenario_callback_6_4(ldv_6_callback_initFunction, ldv_6_container_struct_us_data_ptr);
     734             :   /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     735             : 
     736             :   /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
     737             :   /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
     738             : 
     739             :   /* Jump to a subprocess 'call' initial state */
     740           1 :   goto ldv_call_6;
     741             :  }
     742             :  else {
     743             :   /* LDV {"action": "DEFAULT_FREE_9", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
     744           2 :   ldv_free(ldv_6_container_struct_us_data_ptr);
     745             :   /* LDV {"action": "DEFAULT_FREE_9", "type": "CONDITION_END"} */
     746             : 
     747             :   /* LDV {"action": "DEFAULT_DEREGISTER_9", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_US_UNUSUAL_DEV callbacks invocations scenario."} */
     748             :   /* Skip a non-replicative signal receiving */
     749             :   /* LDV {"action": "DEFAULT_DEREGISTER_9", "type": "RECEIVE_END"} */
     750             : 
     751             :   /* Exit function at a terminal state */
     752           1 :   return;
     753             :  }
     754             :  /* End of the subprocess 'call' */
     755             :  return;
     756             :  /* LDV {"comment": "End of control function based on process 'random_containerless_scenario(struct_us_unusual_dev)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_random_containerless_scenario_6"} */
     757             : }
     758             : 
     759             : /* AUX_FUNC ldv_random_containerless_scenario_7 */
     760             : void ldv_random_containerless_scenario_7(void *arg0) {
     761             :  /* LDV {"thread": 7, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_us_unusual_dev)'", "function": "ldv_random_containerless_scenario_7"} */
     762           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     763           1 :  int (*ldv_7_callback_initFunction)(struct us_data *);
     764           1 :  struct us_data *ldv_7_container_struct_us_data_ptr;
     765           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     766             :  /* LDV {"action": "DEFAULT_REGISTER_9", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_US_UNUSUAL_DEV callbacks invocations scenario."} */
     767           2 :  ldv_free(arg0);
     768             :  /* LDV {"action": "DEFAULT_REGISTER_9", "type": "RECEIVE_END"} */
     769             : 
     770             :  /* LDV {"action": "DEFAULT_ALLOC_9", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
     771           3 :  ldv_7_container_struct_us_data_ptr = ldv_xmalloc_unknown_size(0);
     772             :  /* LDV {"action": "DEFAULT_ALLOC_9", "type": "CONDITION_END"} */
     773             : 
     774             :  /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
     775             :  /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
     776             : 
     777             :  /* Jump to a subprocess 'call' initial state */
     778           1 :  goto ldv_call_7;
     779             :  /* End of the process */
     780             :  return;
     781           1 : 
     782             :  /* Sbprocess call */
     783             :  ldv_call_7:
     784             :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
     785             : 
     786           4 :  if (ldv_undef_int()) {
     787             :   /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback initFunction from us_unusual_dev."} */
     788             :   /* LDV {"type": "CALLBACK", "call": "((& sierra_ms_init))(ldv_7_container_struct_us_data_ptr);", "comment": "callback"} */
     789           2 :   ldv_random_containerless_scenario_callback_7_4(ldv_7_callback_initFunction, ldv_7_container_struct_us_data_ptr);
     790             :   /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     791             : 
     792             :   /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
     793             :   /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
     794             : 
     795             :   /* Jump to a subprocess 'call' initial state */
     796           1 :   goto ldv_call_7;
     797             :  }
     798             :  else {
     799             :   /* LDV {"action": "DEFAULT_FREE_9", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
     800           2 :   ldv_free(ldv_7_container_struct_us_data_ptr);
     801             :   /* LDV {"action": "DEFAULT_FREE_9", "type": "CONDITION_END"} */
     802             : 
     803             :   /* LDV {"action": "DEFAULT_DEREGISTER_9", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_US_UNUSUAL_DEV callbacks invocations scenario."} */
     804             :   /* Skip a non-replicative signal receiving */
     805             :   /* LDV {"action": "DEFAULT_DEREGISTER_9", "type": "RECEIVE_END"} */
     806             : 
     807             :   /* Exit function at a terminal state */
     808           1 :   return;
     809             :  }
     810             :  /* End of the subprocess 'call' */
     811             :  return;
     812             :  /* LDV {"comment": "End of control function based on process 'random_containerless_scenario(struct_us_unusual_dev)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_random_containerless_scenario_7"} */
     813             : }
     814             : 
     815             : /* AUX_FUNC ldv_random_containerless_scenario_8 */
     816             : void ldv_random_containerless_scenario_8(void *arg0) {
     817             :  /* LDV {"thread": 8, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_us_unusual_dev)'", "function": "ldv_random_containerless_scenario_8"} */
     818           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     819           1 :  int (*ldv_8_callback_initFunction)(struct us_data *);
     820           1 :  struct us_data *ldv_8_container_struct_us_data_ptr;
     821           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     822             :  /* LDV {"action": "DEFAULT_REGISTER_9", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_US_UNUSUAL_DEV callbacks invocations scenario."} */
     823           2 :  ldv_free(arg0);
     824             :  /* LDV {"action": "DEFAULT_REGISTER_9", "type": "RECEIVE_END"} */
     825             : 
     826             :  /* LDV {"action": "DEFAULT_ALLOC_9", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
     827           3 :  ldv_8_container_struct_us_data_ptr = ldv_xmalloc_unknown_size(0);
     828             :  /* LDV {"action": "DEFAULT_ALLOC_9", "type": "CONDITION_END"} */
     829             : 
     830             :  /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
     831             :  /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
     832             : 
     833             :  /* Jump to a subprocess 'call' initial state */
     834           1 :  goto ldv_call_8;
     835             :  /* End of the process */
     836             :  return;
     837           1 : 
     838             :  /* Sbprocess call */
     839             :  ldv_call_8:
     840             :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
     841             : 
     842           4 :  if (ldv_undef_int()) {
     843             :   /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback initFunction from us_unusual_dev."} */
     844             :   /* LDV {"type": "CALLBACK", "call": "((& usb_stor_euscsi_init))(ldv_8_container_struct_us_data_ptr);", "comment": "callback"} */
     845           2 :   ldv_random_containerless_scenario_callback_8_4(ldv_8_callback_initFunction, ldv_8_container_struct_us_data_ptr);
     846             :   /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     847             : 
     848             :   /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
     849             :   /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
     850             : 
     851             :   /* Jump to a subprocess 'call' initial state */
     852           1 :   goto ldv_call_8;
     853             :  }
     854             :  else {
     855             :   /* LDV {"action": "DEFAULT_FREE_9", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
     856           2 :   ldv_free(ldv_8_container_struct_us_data_ptr);
     857             :   /* LDV {"action": "DEFAULT_FREE_9", "type": "CONDITION_END"} */
     858             : 
     859             :   /* LDV {"action": "DEFAULT_DEREGISTER_9", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_US_UNUSUAL_DEV callbacks invocations scenario."} */
     860             :   /* Skip a non-replicative signal receiving */
     861             :   /* LDV {"action": "DEFAULT_DEREGISTER_9", "type": "RECEIVE_END"} */
     862             : 
     863             :   /* Exit function at a terminal state */
     864           1 :   return;
     865             :  }
     866             :  /* End of the subprocess 'call' */
     867             :  return;
     868             :  /* LDV {"comment": "End of control function based on process 'random_containerless_scenario(struct_us_unusual_dev)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_random_containerless_scenario_8"} */
     869             : }
     870             : 
     871             : /* AUX_FUNC ldv_random_containerless_scenario_9 */
     872             : void ldv_random_containerless_scenario_9(void *arg0) {
     873             :  /* LDV {"thread": 9, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_us_unusual_dev)'", "function": "ldv_random_containerless_scenario_9"} */
     874           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     875           1 :  int (*ldv_9_callback_initFunction)(struct us_data *);
     876           1 :  struct us_data *ldv_9_container_struct_us_data_ptr;
     877           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     878             :  /* LDV {"action": "DEFAULT_REGISTER_9", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_US_UNUSUAL_DEV callbacks invocations scenario."} */
     879           2 :  ldv_free(arg0);
     880             :  /* LDV {"action": "DEFAULT_REGISTER_9", "type": "RECEIVE_END"} */
     881             : 
     882             :  /* LDV {"action": "DEFAULT_ALLOC_9", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
     883           3 :  ldv_9_container_struct_us_data_ptr = ldv_xmalloc_unknown_size(0);
     884             :  /* LDV {"action": "DEFAULT_ALLOC_9", "type": "CONDITION_END"} */
     885             : 
     886             :  /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
     887             :  /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
     888             : 
     889             :  /* Jump to a subprocess 'call' initial state */
     890           1 :  goto ldv_call_9;
     891             :  /* End of the process */
     892             :  return;
     893           1 : 
     894             :  /* Sbprocess call */
     895             :  ldv_call_9:
     896             :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
     897             : 
     898           4 :  if (ldv_undef_int()) {
     899             :   /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback initFunction from us_unusual_dev."} */
     900             :   /* LDV {"type": "CALLBACK", "call": "((& usb_stor_huawei_e220_init))(ldv_9_container_struct_us_data_ptr);", "comment": "callback"} */
     901           2 :   ldv_random_containerless_scenario_callback_9_4(ldv_9_callback_initFunction, ldv_9_container_struct_us_data_ptr);
     902             :   /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     903             : 
     904             :   /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
     905             :   /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
     906             : 
     907             :   /* Jump to a subprocess 'call' initial state */
     908           1 :   goto ldv_call_9;
     909             :  }
     910             :  else {
     911             :   /* LDV {"action": "DEFAULT_FREE_9", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
     912           2 :   ldv_free(ldv_9_container_struct_us_data_ptr);
     913             :   /* LDV {"action": "DEFAULT_FREE_9", "type": "CONDITION_END"} */
     914             : 
     915             :   /* LDV {"action": "DEFAULT_DEREGISTER_9", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_US_UNUSUAL_DEV callbacks invocations scenario."} */
     916             :   /* Skip a non-replicative signal receiving */
     917             :   /* LDV {"action": "DEFAULT_DEREGISTER_9", "type": "RECEIVE_END"} */
     918             : 
     919             :   /* Exit function at a terminal state */
     920           1 :   return;
     921             :  }
     922             :  /* End of the subprocess 'call' */
     923             :  return;
     924             :  /* LDV {"comment": "End of control function based on process 'random_containerless_scenario(struct_us_unusual_dev)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_random_containerless_scenario_9"} */
     925             : }
     926             : 
     927             : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_10_4 */
     928             : void ldv_random_containerless_scenario_callback_10_4(int (*arg0)(struct us_data *), struct us_data *arg1) {
     929           3 :  ((& usb_stor_ucr61s2b_init))(arg1);
     930           1 : }
     931             : 
     932             : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_3_10 */
     933             : void ldv_random_containerless_scenario_callback_3_10(ssize_t (*arg0)(struct device *, struct device_attribute *, char *, size_t ), struct device *arg1, struct device_attribute *arg2, char *arg3, long unsigned int arg4) {
     934           2 :  (*arg0)(arg1, arg2, arg3, arg4);
     935           1 : }
     936             : 
     937             : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_4_10 */
     938             : void ldv_random_containerless_scenario_callback_4_10(int (*arg0)(char *, struct kernel_param *), char *arg1, struct kernel_param *arg2) {
     939           1 :  ((& param_set_uint))(arg1, arg2);
     940           1 : }
     941             : 
     942             : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_4_4 */
     943             : void ldv_random_containerless_scenario_callback_4_4(int (*arg0)(char *, struct kernel_param *), char *arg1, struct kernel_param *arg2) {
     944           1 :  ((& param_get_uint))(arg1, arg2);
     945           1 : }
     946             : 
     947             : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_5_10 */
     948             : void ldv_random_containerless_scenario_callback_5_10(int (*arg0)(char *, struct kernel_param *), char *arg1, struct kernel_param *arg2) {
     949           1 :  ((& param_set_copystring))(arg1, arg2);
     950           1 : }
     951             : 
     952             : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_5_4 */
     953             : void ldv_random_containerless_scenario_callback_5_4(int (*arg0)(char *, struct kernel_param *), char *arg1, struct kernel_param *arg2) {
     954           1 :  ((& param_get_string))(arg1, arg2);
     955           1 : }
     956             : 
     957             : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_6_4 */
     958             : void ldv_random_containerless_scenario_callback_6_4(int (*arg0)(struct us_data *), struct us_data *arg1) {
     959           3 :  ((& option_ms_init))(arg1);
     960           1 : }
     961             : 
     962             : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_7_4 */
     963             : void ldv_random_containerless_scenario_callback_7_4(int (*arg0)(struct us_data *), struct us_data *arg1) {
     964           7 :  ((& sierra_ms_init))(arg1);
     965           1 : }
     966             : 
     967             : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_8_4 */
     968             : void ldv_random_containerless_scenario_callback_8_4(int (*arg0)(struct us_data *), struct us_data *arg1) {
     969           2 :  ((& usb_stor_euscsi_init))(arg1);
     970           1 : }
     971             : 
     972             : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_9_4 */
     973             : void ldv_random_containerless_scenario_callback_9_4(int (*arg0)(struct us_data *), struct us_data *arg1) {
     974           2 :  ((& usb_stor_huawei_e220_init))(arg1);
     975           1 : }
     976             : 
     977             : /* AUX_FUNC ldv_scsi_LLDd_scenario_1 */
     978             : void ldv_scsi_LLDd_scenario_1(void *arg0) {
     979             :  /* LDV {"thread": 1, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'scsi_LLDd_scenario(scsi_host_template)'", "function": "ldv_scsi_LLDd_scenario_1"} */
     980           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     981           1 :  int (*ldv_1_callback_eh_abort_handler)(struct scsi_cmnd *);
     982           1 :  int (*ldv_1_callback_eh_bus_reset_handler)(struct scsi_cmnd *);
     983           1 :  int (*ldv_1_callback_eh_device_reset_handler)(struct scsi_cmnd *);
     984           1 :  char *(*ldv_1_callback_info)(struct Scsi_Host *);
     985             :  int (*ldv_1_callback_proc_info)(struct Scsi_Host *, char *, char **, long int, int, int);
     986           1 :  int (*ldv_1_callback_queuecommand)(struct scsi_cmnd *, void (*)(struct scsi_cmnd *));
     987           1 :  int (*ldv_1_callback_slave_alloc)(struct scsi_device *);
     988           1 :  int (*ldv_1_callback_slave_configure)(struct scsi_device *);
     989           1 :  struct Scsi_Host *ldv_1_host_host;
     990           1 :  struct scsi_cmnd *ldv_1_host_struct_scsi_cmnd_ptr;
     991           1 :  struct scsi_device *ldv_1_host_struct_scsi_device_ptr;
     992           1 :  char *ldv_1_ldv_param_16_1_default;
     993           1 :  char **ldv_1_ldv_param_16_2_default;
     994           1 :  long int ldv_1_ldv_param_16_3_default;
     995           1 :  int ldv_1_ldv_param_16_4_default;
     996           1 :  int ldv_1_ldv_param_16_5_default;
     997           1 :  void (*ldv_1_ldv_param_19_1_default)(struct scsi_cmnd *);
     998           1 :  int ldv_1_ret_default;
     999           1 :  /* Received labels */
    1000           2 :  struct ldv_struct_scsi_LLDd_scenario_1 *data = (struct ldv_struct_scsi_LLDd_scenario_1*) arg0;
    1001           1 : 
    1002           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
    1003           1 :  /* Initialize automaton variables */
    1004           2 :  ldv_1_ret_default = 1;
    1005           1 :  /* LDV {"action": "REGISTER", "type": "RECEIVE_BEGIN", "comment": "Begin SCSI_HOST_TEMPLATE callbacks invocations scenario."} */
    1006             :  /* Assign recieved labels */
    1007           2 :  if (data) {
    1008           1 :   ldv_1_host_host = data->arg0;
    1009           2 :   ldv_free(data);
    1010             :  }
    1011             :  /* LDV {"action": "REGISTER", "type": "RECEIVE_END"} */
    1012             : 
    1013             :  /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Old style SCSI drivers initialization."} */
    1014             :  /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
    1015             : 
    1016             :  /* Jump to a subprocess 'main' initial state */
    1017           2 :  goto ldv_main_1;
    1018             :  /* End of the process */
    1019             :  return;
    1020           1 : 
    1021             :  /* Sbprocess main */
    1022             :  ldv_main_1:
    1023             :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
    1024             : 
    1025           4 :  if (ldv_undef_int()) {
    1026             :   /* LDV {"action": "PROBE", "type": "CALL_BEGIN", "callback": true, "comment": "Initialize the SCSI driver. Invoke callback probe from SCSI_HOST_TEMPLATE."} */
    1027             :   /* Callback pre-call */
    1028           1 :   ldv_pre_probe();
    1029           3 :   if (ldv_1_host_host->hostt->detect) {
    1030             :   /* LDV {"type": "CALLBACK", "call": "ldv_1_ret_default = (ldv_1_host_host->hostt->detect)(ldv_1_host_host);", "comment": "probe"} */
    1031           3 :    ldv_1_ret_default = ldv_scsi_LLDd_scenario_probe_1_10(ldv_1_host_host->hostt->detect, ldv_1_host_host);
    1032             :   }
    1033             :   /* Callback post-call */
    1034           4 :   ldv_1_ret_default = ldv_post_probe(ldv_1_ret_default);
    1035             :   /* LDV {"action": "PROBE", "type": "CALL_END"} */
    1036             : 
    1037           4 :   if (ldv_undef_int()) {
    1038             :    /* LDV {"action": "PROBE_SUCCESS", "type": "CONDITION_BEGIN", "comment": "Successfully initialized SCSI driver."} */
    1039           2 :    ldv_assume(ldv_1_ret_default == 0);
    1040             :    /* LDV {"action": "PROBE_SUCCESS", "type": "CONDITION_END"} */
    1041             : 
    1042             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Call mid-layer callbacks"} */
    1043             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
    1044             : 
    1045             :    /* Jump to a subprocess 'call' initial state */
    1046           1 :    goto ldv_call_1;
    1047             :   }
    1048             :   else {
    1049             :    /* LDV {"action": "PROBE_FAILED", "type": "CONDITION_BEGIN", "comment": "Initialization of the SCSI driver has failed."} */
    1050           2 :    ldv_assume(ldv_1_ret_default != 0);
    1051             :    /* LDV {"action": "PROBE_FAILED", "type": "CONDITION_END"} */
    1052             : 
    1053             :    /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Old style SCSI drivers initialization."} */
    1054             :    /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
    1055             : 
    1056             :    /* Jump to a subprocess 'main' initial state */
    1057           1 :    goto ldv_main_1;
    1058             :   }
    1059             :  }
    1060             :  else {
    1061             :   /* LDV {"action": "DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Finish SCSI_HOST_TEMPLATE callbacks invocations scenario."} */
    1062             :   /* Skip a non-replicative signal receiving */
    1063             :   /* LDV {"action": "DEREGISTER", "type": "RECEIVE_END"} */
    1064             : 
    1065             :   /* Exit function at a terminal state */
    1066           1 :   return;
    1067             :  }
    1068             :  /* End of the subprocess 'main' */
    1069             :  return;
    1070           1 : 
    1071             :  /* Sbprocess call */
    1072             :  ldv_call_1:
    1073             :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
    1074             : 
    1075           2 :  switch (ldv_undef_int()) {
    1076           3 :   case 1: {
    1077             :    /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random mid layer SCSI callback. Invoke callback slave_configure from scsi_host_template."} */
    1078             :    /* LDV {"type": "CALLBACK", "call": "((& slave_configure))(ldv_1_host_struct_scsi_device_ptr);", "comment": "callback"} */
    1079           2 :    ldv_scsi_LLDd_scenario_callback_1_23(ldv_1_callback_slave_configure, ldv_1_host_struct_scsi_device_ptr);
    1080             :    /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
    1081             : 
    1082             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Call mid-layer callbacks"} */
    1083             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
    1084             : 
    1085             :    /* Jump to a subprocess 'call' initial state */
    1086           1 :    goto ldv_call_1;
    1087           1 :    break;
    1088             :   }
    1089           3 :   case 2: {
    1090             :    /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random mid layer SCSI callback. Invoke callback slave_alloc from scsi_host_template."} */
    1091             :    /* LDV {"type": "CALLBACK", "call": "((& slave_alloc))(ldv_1_host_struct_scsi_device_ptr);", "comment": "callback"} */
    1092           2 :    ldv_scsi_LLDd_scenario_callback_1_22(ldv_1_callback_slave_alloc, ldv_1_host_struct_scsi_device_ptr);
    1093             :    /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
    1094             : 
    1095             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Call mid-layer callbacks"} */
    1096             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
    1097             : 
    1098             :    /* Jump to a subprocess 'call' initial state */
    1099           1 :    goto ldv_call_1;
    1100             :    /* Jump to a subprocess 'call' initial state */
    1101             :    goto ldv_call_1;
    1102           1 :    break;
    1103             :   }
    1104           3 :   case 3: {
    1105             :    /* LDV {"action": "PRE_CALL_19", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
    1106           3 :    ldv_1_ldv_param_19_1_default = ldv_xmalloc_unknown_size(0);
    1107             :    /* LDV {"action": "PRE_CALL_19", "type": "CONDITION_END"} */
    1108             : 
    1109             :    /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random mid layer SCSI callback. Invoke callback queuecommand from scsi_host_template."} */
    1110             :    /* LDV {"type": "CALLBACK", "call": "((& queuecommand))(ldv_1_host_struct_scsi_cmnd_ptr, ldv_1_ldv_param_19_1_default);", "comment": "callback"} */
    1111           2 :    ldv_scsi_LLDd_scenario_callback_1_19(ldv_1_callback_queuecommand, ldv_1_host_struct_scsi_cmnd_ptr, ldv_1_ldv_param_19_1_default);
    1112             :    /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
    1113             : 
    1114             :    /* LDV {"action": "POST_CALL_19", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
    1115           2 :    ldv_free(ldv_1_ldv_param_19_1_default);
    1116             :    /* LDV {"action": "POST_CALL_19", "type": "CONDITION_END"} */
    1117             : 
    1118             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Call mid-layer callbacks"} */
    1119             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
    1120             : 
    1121             :    /* Jump to a subprocess 'call' initial state */
    1122           1 :    goto ldv_call_1;
    1123             :    /* Jump to a subprocess 'call' initial state */
    1124             :    goto ldv_call_1;
    1125             :    /* Jump to a subprocess 'call' initial state */
    1126             :    goto ldv_call_1;
    1127           1 :    break;
    1128             :   }
    1129           3 :   case 4: {
    1130             :    /* LDV {"action": "PRE_CALL_16", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
    1131           3 :    ldv_1_ldv_param_16_1_default = ldv_xmalloc_unknown_size(0);
    1132           3 :    ldv_1_ldv_param_16_2_default = ldv_xmalloc_unknown_size(0);
    1133             :    /* LDV {"action": "PRE_CALL_16", "type": "CONDITION_END"} */
    1134             : 
    1135             :    /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random mid layer SCSI callback. Invoke callback proc_info from scsi_host_template."} */
    1136             :    /* LDV {"type": "CALLBACK", "call": "((& proc_info))(ldv_1_host_host, ldv_1_ldv_param_16_1_default, ldv_1_ldv_param_16_2_default, ldv_1_ldv_param_16_3_default, ldv_1_ldv_param_16_4_default, ldv_1_ldv_param_16_5_default);", "comment": "callback"} */
    1137           2 :    ldv_scsi_LLDd_scenario_callback_1_16(ldv_1_callback_proc_info, ldv_1_host_host, ldv_1_ldv_param_16_1_default, ldv_1_ldv_param_16_2_default, ldv_1_ldv_param_16_3_default, ldv_1_ldv_param_16_4_default, ldv_1_ldv_param_16_5_default);
    1138             :    /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
    1139             : 
    1140             :    /* LDV {"action": "POST_CALL_16", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
    1141           2 :    ldv_free(ldv_1_ldv_param_16_1_default);
    1142           2 :    ldv_free(ldv_1_ldv_param_16_2_default);
    1143             :    /* LDV {"action": "POST_CALL_16", "type": "CONDITION_END"} */
    1144             : 
    1145             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Call mid-layer callbacks"} */
    1146             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
    1147             : 
    1148             :    /* Jump to a subprocess 'call' initial state */
    1149           1 :    goto ldv_call_1;
    1150             :    /* Jump to a subprocess 'call' initial state */
    1151             :    goto ldv_call_1;
    1152             :    /* Jump to a subprocess 'call' initial state */
    1153             :    goto ldv_call_1;
    1154             :    /* Jump to a subprocess 'call' initial state */
    1155             :    goto ldv_call_1;
    1156           1 :    break;
    1157             :   }
    1158           3 :   case 5: {
    1159             :    /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random mid layer SCSI callback. Invoke callback info from scsi_host_template."} */
    1160             :    /* LDV {"type": "CALLBACK", "call": "((& host_info))(ldv_1_host_host);", "comment": "callback"} */
    1161           2 :    ldv_scsi_LLDd_scenario_callback_1_15(ldv_1_callback_info, ldv_1_host_host);
    1162             :    /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
    1163             : 
    1164             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Call mid-layer callbacks"} */
    1165             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
    1166             : 
    1167             :    /* Jump to a subprocess 'call' initial state */
    1168           1 :    goto ldv_call_1;
    1169             :    /* Jump to a subprocess 'call' initial state */
    1170             :    goto ldv_call_1;
    1171             :    /* Jump to a subprocess 'call' initial state */
    1172             :    goto ldv_call_1;
    1173             :    /* Jump to a subprocess 'call' initial state */
    1174             :    goto ldv_call_1;
    1175             :    /* Jump to a subprocess 'call' initial state */
    1176             :    goto ldv_call_1;
    1177           1 :    break;
    1178             :   }
    1179           3 :   case 6: {
    1180             :    /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random mid layer SCSI callback. Invoke callback eh_device_reset_handler from scsi_host_template."} */
    1181             :    /* LDV {"type": "CALLBACK", "call": "((& device_reset))(ldv_1_host_struct_scsi_cmnd_ptr);", "comment": "callback"} */
    1182           2 :    ldv_scsi_LLDd_scenario_callback_1_14(ldv_1_callback_eh_device_reset_handler, ldv_1_host_struct_scsi_cmnd_ptr);
    1183             :    /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
    1184             : 
    1185             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Call mid-layer callbacks"} */
    1186             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
    1187             : 
    1188             :    /* Jump to a subprocess 'call' initial state */
    1189           1 :    goto ldv_call_1;
    1190             :    /* Jump to a subprocess 'call' initial state */
    1191             :    goto ldv_call_1;
    1192             :    /* Jump to a subprocess 'call' initial state */
    1193             :    goto ldv_call_1;
    1194             :    /* Jump to a subprocess 'call' initial state */
    1195             :    goto ldv_call_1;
    1196             :    /* Jump to a subprocess 'call' initial state */
    1197             :    goto ldv_call_1;
    1198             :    /* Jump to a subprocess 'call' initial state */
    1199             :    goto ldv_call_1;
    1200           1 :    break;
    1201             :   }
    1202           3 :   case 7: {
    1203             :    /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random mid layer SCSI callback. Invoke callback eh_bus_reset_handler from scsi_host_template."} */
    1204             :    /* LDV {"type": "CALLBACK", "call": "((& bus_reset))(ldv_1_host_struct_scsi_cmnd_ptr);", "comment": "callback"} */
    1205           2 :    ldv_scsi_LLDd_scenario_callback_1_13(ldv_1_callback_eh_bus_reset_handler, ldv_1_host_struct_scsi_cmnd_ptr);
    1206             :    /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
    1207             : 
    1208             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Call mid-layer callbacks"} */
    1209             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
    1210             : 
    1211             :    /* Jump to a subprocess 'call' initial state */
    1212           1 :    goto ldv_call_1;
    1213             :    /* Jump to a subprocess 'call' initial state */
    1214             :    goto ldv_call_1;
    1215             :    /* Jump to a subprocess 'call' initial state */
    1216             :    goto ldv_call_1;
    1217             :    /* Jump to a subprocess 'call' initial state */
    1218             :    goto ldv_call_1;
    1219             :    /* Jump to a subprocess 'call' initial state */
    1220             :    goto ldv_call_1;
    1221             :    /* Jump to a subprocess 'call' initial state */
    1222             :    goto ldv_call_1;
    1223             :    /* Jump to a subprocess 'call' initial state */
    1224             :    goto ldv_call_1;
    1225           1 :    break;
    1226             :   }
    1227           3 :   case 8: {
    1228             :    /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random mid layer SCSI callback. Invoke callback eh_abort_handler from scsi_host_template."} */
    1229             :    /* LDV {"type": "CALLBACK", "call": "((& command_abort))(ldv_1_host_struct_scsi_cmnd_ptr);", "comment": "callback"} */
    1230           2 :    ldv_scsi_LLDd_scenario_callback_1_4(ldv_1_callback_eh_abort_handler, ldv_1_host_struct_scsi_cmnd_ptr);
    1231             :    /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
    1232             : 
    1233             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Call mid-layer callbacks"} */
    1234             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
    1235             : 
    1236             :    /* Jump to a subprocess 'call' initial state */
    1237           1 :    goto ldv_call_1;
    1238             :    /* Jump to a subprocess 'call' initial state */
    1239             :    goto ldv_call_1;
    1240             :    /* Jump to a subprocess 'call' initial state */
    1241             :    goto ldv_call_1;
    1242             :    /* Jump to a subprocess 'call' initial state */
    1243             :    goto ldv_call_1;
    1244             :    /* Jump to a subprocess 'call' initial state */
    1245             :    goto ldv_call_1;
    1246             :    /* Jump to a subprocess 'call' initial state */
    1247             :    goto ldv_call_1;
    1248             :    /* Jump to a subprocess 'call' initial state */
    1249             :    goto ldv_call_1;
    1250             :    /* Jump to a subprocess 'call' initial state */
    1251             :    goto ldv_call_1;
    1252           1 :    break;
    1253             :   }
    1254           3 :   case 9: {
    1255             :    /* LDV {"action": "RELEASE", "type": "CALL_BEGIN", "callback": true, "comment": "Detach the SCSI driver. Invoke callback release from SCSI_HOST_TEMPLATE."} */
    1256           3 :    if (ldv_1_host_host->hostt->release) {
    1257             :    /* LDV {"type": "CALLBACK", "call": "(ldv_1_host_host->hostt->release)(ldv_1_host_host);", "comment": "release"} */
    1258           2 :     ldv_scsi_LLDd_scenario_release_1_2(ldv_1_host_host->hostt->release, ldv_1_host_host);
    1259             :    }
    1260             :    /* LDV {"action": "RELEASE", "type": "CALL_END"} */
    1261             : 
    1262             :    /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Old style SCSI drivers initialization."} */
    1263             :    /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
    1264             : 
    1265             :    /* Jump to a subprocess 'main' initial state */
    1266           2 :    goto ldv_main_1;
    1267           1 :    break;
    1268             :   }
    1269           2 :   default: ldv_stop();
    1270           1 :  }
    1271           0 :  /* End of the subprocess 'call' */
    1272           0 :  return;
    1273             :  /* LDV {"comment": "End of control function based on process 'scsi_LLDd_scenario(scsi_host_template)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_scsi_LLDd_scenario_1"} */
    1274             : }
    1275             : 
    1276             : /* AUX_FUNC_CALLBACK ldv_scsi_LLDd_scenario_probe_1_10 */
    1277             : int ldv_scsi_LLDd_scenario_probe_1_10(int (*arg0)(struct Scsi_Host *), struct Scsi_Host *arg1) {
    1278           4 :  return (*arg0)(arg1);
    1279           1 : }
    1280             : 
    1281             : /* AUX_FUNC_CALLBACK ldv_scsi_LLDd_scenario_release_1_2 */
    1282             : void ldv_scsi_LLDd_scenario_release_1_2(int (*arg0)(struct Scsi_Host *), struct Scsi_Host *arg1) {
    1283           3 :  (*arg0)(arg1);
    1284           1 : }
    1285             : 
    1286             : /* AUX_FUNC ldv_usb_scenario_11 */
    1287             : void ldv_usb_scenario_11(void *arg0) {
    1288             :  /* LDV {"thread": 11, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'usb_scenario(usb)'", "function": "ldv_usb_scenario_11"} */
    1289           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
    1290           1 :  struct usb_driver *ldv_11_container_usb_driver;
    1291           1 :  struct usb_device_id *ldv_11_ldv_param_14_1_default;
    1292           1 :  struct pm_message *ldv_11_ldv_param_9_1_default;
    1293           1 :  int ldv_11_probe_retval_default;
    1294           1 :  _Bool ldv_11_reset_flag_default;
    1295           1 :  struct usb_interface *ldv_11_resource_usb_interface;
    1296           1 :  struct usb_device *ldv_11_usb_device_usb_device;
    1297           1 :  /* Received labels */
    1298           2 :  struct ldv_struct_usb_scenario_11 *data = (struct ldv_struct_usb_scenario_11*) arg0;
    1299           1 : 
    1300           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
    1301           1 :  /* Initialize automaton variables */
    1302           2 :  ldv_11_reset_flag_default = false;
    1303           1 :  /* LDV {"action": "REGISTER", "type": "RECEIVE_BEGIN", "comment": "Begin USB callbacks invocation scenario."} */
    1304           1 :  /* Assign recieved labels */
    1305           2 :  if (data) {
    1306           1 :   ldv_11_container_usb_driver = data->arg0;
    1307           2 :   ldv_free(data);
    1308             :  }
    1309             :  /* LDV {"action": "REGISTER", "type": "RECEIVE_END"} */
    1310             : 
    1311           6 :  if (ldv_undef_int()) {
    1312             :   /* LDV {"action": "ALLOC_INTERFACE", "type": "CONDITION_BEGIN", "comment": "Allocate memory and initialize new USB interface."} */
    1313           3 :   ldv_11_resource_usb_interface = ldv_xmalloc(sizeof(struct usb_interface));
    1314           3 :   ldv_11_usb_device_usb_device = ldv_xmalloc(sizeof(struct usb_device));
    1315           1 :   ldv_11_resource_usb_interface->dev.parent = & ldv_11_usb_device_usb_device->dev;
    1316             :   /* LDV {"action": "ALLOC_INTERFACE", "type": "CONDITION_END"} */
    1317             : 
    1318             :   /* LDV {"action": "MANAGE_INTERFACE", "type": "SUBPROCESS_BEGIN", "comment": "Manage particular interface on a device."} */
    1319             :   /* LDV {"action": "MANAGE_INTERFACE", "type": "SUBPROCESS_END"} */
    1320             : 
    1321             :   /* Jump to a subprocess 'manage_interface' initial state */
    1322           1 :   goto ldv_manage_interface_11;
    1323             :  }
    1324             :  else {
    1325             :   /* LDV {"action": "DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Finish USB callbacks invocations scenario."} */
    1326             :   /* Skip a non-replicative signal receiving */
    1327             :   /* LDV {"action": "DEREGISTER", "type": "RECEIVE_END"} */
    1328             : 
    1329             :   /* Exit function at a terminal state */
    1330           1 :   return;
    1331             :  }
    1332             :  /* End of the process */
    1333             :  return;
    1334           1 : 
    1335             :  /* Sbprocess manage_interface */
    1336             :  ldv_manage_interface_11:
    1337             :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
    1338             : 
    1339           4 :  if (ldv_undef_int()) {
    1340             :   /* LDV {"action": "PRE_CALL_14", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
    1341           3 :   ldv_11_ldv_param_14_1_default = ldv_xmalloc_unknown_size(0);
    1342             :   /* LDV {"action": "PRE_CALL_14", "type": "CONDITION_END"} */
    1343             : 
    1344             :   /* LDV {"action": "PROBE", "type": "CALL_BEGIN", "callback": true, "comment": "Associate driver-specific data with the USB interface. Invoke callback probe from usb_driver."} */
    1345             :   /* Callback pre-call */
    1346           1 :   ldv_pre_probe();
    1347             :   /* LDV {"type": "CALLBACK", "call": "ldv_11_probe_retval_default = ((& storage_probe))(ldv_11_resource_usb_interface, ldv_11_ldv_param_14_1_default);", "comment": "probe"} */
    1348           3 :   ldv_11_probe_retval_default = ldv_usb_scenario_probe_11_14(ldv_11_container_usb_driver->probe, ldv_11_resource_usb_interface, ldv_11_ldv_param_14_1_default);
    1349             :   /* Callback post-call */
    1350           2 :   ldv_11_probe_retval_default = ldv_post_probe(ldv_11_probe_retval_default);
    1351             :   /* LDV {"action": "PROBE", "type": "CALL_END"} */
    1352             : 
    1353             :   /* LDV {"action": "POST_CALL_14", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
    1354           2 :   ldv_free(ldv_11_ldv_param_14_1_default);
    1355             :   /* LDV {"action": "POST_CALL_14", "type": "CONDITION_END"} */
    1356             : 
    1357           4 :   if (ldv_undef_int()) {
    1358             :    /* LDV {"action": "FAILED_PROBE", "type": "CONDITION_BEGIN", "comment": "Association of driver-specific data with the USB interface has been failed."} */
    1359           2 :    ldv_assume(ldv_11_probe_retval_default != 0);
    1360             :    /* LDV {"action": "FAILED_PROBE", "type": "CONDITION_END"} */
    1361             : 
    1362             :    /* LDV {"action": "MANAGE_INTERFACE", "type": "SUBPROCESS_BEGIN", "comment": "Manage particular interface on a device."} */
    1363             :    /* LDV {"action": "MANAGE_INTERFACE", "type": "SUBPROCESS_END"} */
    1364             : 
    1365             :    /* Jump to a subprocess 'manage_interface' initial state */
    1366           1 :    goto ldv_manage_interface_11;
    1367             :   }
    1368             :   else {
    1369             :    /* LDV {"action": "PROBE_SUCCESS", "type": "CONDITION_BEGIN", "comment": "Check that interface has been probed successfully."} */
    1370           2 :    ldv_assume(ldv_11_probe_retval_default == 0);
    1371             :    /* LDV {"action": "PROBE_SUCCESS", "type": "CONDITION_END"} */
    1372             : 
    1373           2 :    switch (ldv_undef_int()) {
    1374           3 :     case 1: {
    1375             :      /* LDV {"action": "PRE_CALL_9", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
    1376           3 :      ldv_11_ldv_param_9_1_default = ldv_xmalloc_unknown_size(0);
    1377             :      /* LDV {"action": "PRE_CALL_9", "type": "CONDITION_END"} */
    1378             : 
    1379             :      /* LDV {"action": "SUSPEND", "type": "CALL_BEGIN", "callback": true, "comment": "Device is about to be suspended. Invoke callback suspend from USB."} */
    1380           3 :      if (ldv_11_container_usb_driver->suspend) {
    1381             :      /* LDV {"type": "CALLBACK", "call": "(ldv_11_container_usb_driver->suspend)(ldv_11_resource_usb_interface, ldv_11_ldv_param_9_1_default);", "comment": "suspend"} */
    1382           2 :       ldv_usb_scenario_suspend_11_9(ldv_11_container_usb_driver->suspend, ldv_11_resource_usb_interface, ldv_11_ldv_param_9_1_default);
    1383             :      }
    1384             :      /* LDV {"action": "SUSPEND", "type": "CALL_END"} */
    1385             : 
    1386             :      /* LDV {"action": "POST_CALL_9", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
    1387           4 :      ldv_free(ldv_11_ldv_param_9_1_default);
    1388             :      /* LDV {"action": "POST_CALL_9", "type": "CONDITION_END"} */
    1389             : 
    1390             :      /* LDV {"action": "RESUME", "type": "CALL_BEGIN", "callback": true, "comment": "Device is about to be resumed. Invoke callback resume from USB."} */
    1391           3 :      if (ldv_11_container_usb_driver->resume) {
    1392             :      /* LDV {"type": "CALLBACK", "call": "(ldv_11_container_usb_driver->resume)(ldv_11_resource_usb_interface);", "comment": "resume"} */
    1393           2 :       ldv_usb_scenario_resume_11_8(ldv_11_container_usb_driver->resume, ldv_11_resource_usb_interface);
    1394             :      }
    1395             :      /* LDV {"action": "RESUME", "type": "CALL_END"} */
    1396             : 
    1397           2 :      break;
    1398           1 :     }
    1399           3 :     case 2: {
    1400             :      /* LDV {"action": "USB_RESET", "type": "RECEIVE_BEGIN", "comment": "Reset USB device."} */
    1401             :      /* Skip a non-replicative signal receiving */
    1402             :      /* LDV {"action": "USB_RESET", "type": "RECEIVE_END"} */
    1403             : 
    1404             :      /* LDV {"action": "PRE", "type": "CALL_BEGIN", "callback": true, "comment": "Prepare for resetting device. Invoke callback pre_reset from usb_driver."} */
    1405             :      /* LDV {"type": "CALLBACK", "call": "((& usb_stor_pre_reset))(ldv_11_resource_usb_interface);", "comment": "pre"} */
    1406           2 :      ldv_usb_scenario_pre_11_11(ldv_11_container_usb_driver->pre_reset, ldv_11_resource_usb_interface);
    1407             :      /* LDV {"action": "PRE", "type": "CALL_END"} */
    1408             : 
    1409             :      /* LDV {"action": "POST", "type": "CALL_BEGIN", "callback": true, "comment": "Initialize device after reset. Invoke callback post_reset from usb_driver."} */
    1410             :      /* LDV {"type": "CALLBACK", "call": "((& usb_stor_post_reset))(ldv_11_resource_usb_interface);", "comment": "post"} */
    1411           2 :      ldv_usb_scenario_post_11_10(ldv_11_container_usb_driver->post_reset, ldv_11_resource_usb_interface);
    1412             :      /* LDV {"action": "POST", "type": "CALL_END"} */
    1413             : 
    1414           1 :      break;
    1415           1 :     }
    1416           3 :     case 3: {
    1417             :      /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "comment": "Call callback 'callback' of a process 'usb_scenario' of an interface category 'usb'"} */
    1418             :      /* Skip callback without implementations */
    1419             :      /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
    1420             : 
    1421           1 :      break;
    1422           1 :     }
    1423           3 :     case 4: {
    1424             :      /* LDV {"action": "SKIP", "type": "CONDITION_BEGIN", "comment": "Do not suspend or reset device."} */
    1425             :      /* LDV {"action": "SKIP", "type": "CONDITION_END"} */
    1426             : 
    1427           1 :      break;
    1428           1 :     }
    1429           2 :     default: ldv_stop();
    1430           1 :    }
    1431           0 :   }
    1432             :   /* LDV {"action": "RELEASE", "type": "CALL_BEGIN", "callback": true, "comment": "USB interface is no more accessible. Invoke callback disconnect from usb_driver."} */
    1433           0 :   /* LDV {"type": "CALLBACK", "call": "((& usb_stor_disconnect))(ldv_11_resource_usb_interface);", "comment": "release"} */
    1434           8 :   ldv_usb_scenario_release_11_5(ldv_11_container_usb_driver->disconnect, ldv_11_resource_usb_interface);
    1435             :   /* LDV {"action": "RELEASE", "type": "CALL_END"} */
    1436             : 
    1437             :   /* LDV {"action": "MANAGE_INTERFACE", "type": "SUBPROCESS_BEGIN", "comment": "Manage particular interface on a device."} */
    1438             :   /* LDV {"action": "MANAGE_INTERFACE", "type": "SUBPROCESS_END"} */
    1439             : 
    1440             :   /* Jump to a subprocess 'manage_interface' initial state */
    1441           1 :   goto ldv_manage_interface_11;
    1442             :   /* Jump to a subprocess 'manage_interface' initial state */
    1443             :   goto ldv_manage_interface_11;
    1444             :  }
    1445             :  else {
    1446             :   /* LDV {"action": "FREE_INTERFACE", "type": "CONDITION_BEGIN", "comment": "Free allocated memory for USB interface."} */
    1447           2 :   ldv_free(ldv_11_resource_usb_interface);
    1448           2 :   ldv_free(ldv_11_usb_device_usb_device);
    1449             :   /* LDV {"action": "FREE_INTERFACE", "type": "CONDITION_END"} */
    1450             : 
    1451             :   /* LDV {"action": "DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Finish USB callbacks invocations scenario."} */
    1452             :   /* Skip a non-replicative signal receiving */
    1453             :   /* LDV {"action": "DEREGISTER", "type": "RECEIVE_END"} */
    1454             : 
    1455             :   /* Exit function at a terminal state */
    1456           1 :   return;
    1457             :  }
    1458             :  /* End of the subprocess 'manage_interface' */
    1459             :  return;
    1460             :  /* LDV {"comment": "End of control function based on process 'usb_scenario(usb)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_usb_scenario_11"} */
    1461             : }
    1462             : 
    1463             : /* AUX_FUNC_CALLBACK ldv_usb_scenario_post_11_10 */
    1464             : void ldv_usb_scenario_post_11_10(int (*arg0)(struct usb_interface *), struct usb_interface *arg1) {
    1465           2 :  ((& usb_stor_post_reset))(arg1);
    1466           1 : }
    1467             : 
    1468             : /* AUX_FUNC_CALLBACK ldv_usb_scenario_pre_11_11 */
    1469             : void ldv_usb_scenario_pre_11_11(int (*arg0)(struct usb_interface *), struct usb_interface *arg1) {
    1470           2 :  ((& usb_stor_pre_reset))(arg1);
    1471           1 : }
    1472             : 
    1473             : /* AUX_FUNC_CALLBACK ldv_usb_scenario_probe_11_14 */
    1474             : int ldv_usb_scenario_probe_11_14(int (*arg0)(struct usb_interface *, struct usb_device_id *), struct usb_interface *arg1, struct usb_device_id *arg2) {
    1475           5 :  return ((& storage_probe))(arg1, arg2);
    1476             : }
    1477           1 : 
    1478             : /* AUX_FUNC_CALLBACK ldv_usb_scenario_release_11_5 */
    1479             : void ldv_usb_scenario_release_11_5(void (*arg0)(struct usb_interface *), struct usb_interface *arg1) {
    1480           8 :  ((& usb_stor_disconnect))(arg1);
    1481           4 : }
    1482             : 
    1483             : /* AUX_FUNC_CALLBACK ldv_usb_scenario_resume_11_8 */
    1484             : void ldv_usb_scenario_resume_11_8(int (*arg0)(struct usb_interface *), struct usb_interface *arg1) {
    1485           5 :  (*arg0)(arg1);
    1486           1 : }
    1487             : 
    1488             : /* AUX_FUNC_CALLBACK ldv_usb_scenario_suspend_11_9 */
    1489             : void ldv_usb_scenario_suspend_11_9(int (*arg0)(struct usb_interface *, pm_message_t ), struct usb_interface *arg1, struct pm_message *arg2) {
    1490           1 :  (*arg0)(arg1, *arg2);
    1491           1 : }
    1492             : 
    1493             : /* AUX_FUNC main */
    1494             : int main() {
    1495           1 :  ldv_main_19(0);
    1496           0 :  return 0;
    1497             : }
    1498             : 
    1499             : 
    1500             : /* AUX_FUNC  ERR_PTR */
    1501             : static inline void *ERR_PTR (long int error)
    1502             : {
    1503             : 
    1504             :  return ldv_err_ptr(error);
    1505             : }
    1506             : 
    1507             : /* AUX_FUNC  PTR_ERR */
    1508             : static inline long int PTR_ERR (void const *ptr)
    1509             : {
    1510           2 : 
    1511           6 :  return ldv_ptr_err(ptr);
    1512             : }
    1513             : 
    1514             : /* AUX_FUNC  IS_ERR */
    1515             : static inline long int IS_ERR (void const *ptr)
    1516             : {
    1517           3 : 
    1518           9 :  return ldv_is_err(ptr);
    1519             : }
    1520             : 
    1521             : /* AUX_FUNC  IS_ERR_OR_NULL */
    1522             : static inline long int IS_ERR_OR_NULL (void const *ptr)
    1523             : {
    1524             : 
    1525             :  return ldv_is_err_or_null(ptr);
    1526             : }
    1527             : 
    1528             : /* AUX_FUNC  kzalloc */
    1529             : static inline void *kzalloc (size_t size, gfp_t flags)
    1530             : {
    1531             : 
    1532             :  return ldv_kzalloc(size, flags);
    1533             : }
    1534             : 
    1535             : /* AUX_FUNC  ldv_dev_get_drvdata_6 */
    1536             : void *ldv_dev_get_drvdata_6 (struct device const *dev)
    1537             : {
    1538           6 : 
    1539          18 :  return ldv_dev_get_drvdata(dev);
    1540             : }
    1541             : 
    1542             : /* AUX_FUNC  ldv_scsi_remove_host_7 */
    1543             : void ldv_scsi_remove_host_7 (struct Scsi_Host *ldv_func_arg1)
    1544             : {
    1545             : 
    1546             :  /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'scsi_remove_host'"} */
    1547          10 :  ldv_emg_scsi_remove_host(ldv_func_arg1);
    1548           5 : }
    1549             : 
    1550             : /* AUX_FUNC  ldv_scsi_host_alloc_8 */
    1551             : struct Scsi_Host *ldv_scsi_host_alloc_8 (struct scsi_host_template *ldv_func_arg1, int ldv_func_arg2)
    1552             : {
    1553             : 
    1554           1 :  /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'scsi_host_alloc'"} */
    1555           4 :  return ldv_emg_scsi_host_alloc(ldv_func_arg1, ldv_func_arg2);
    1556             : }
    1557             : 
    1558             : /* AUX_FUNC  ldv_scsi_add_host_9 */
    1559             : static inline int ldv_scsi_add_host_9 (struct Scsi_Host *host, struct device *dev)
    1560             : {
    1561           1 : 
    1562             :  /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'scsi_add_host'"} */
    1563           4 :  return ldv_emg_scsi_add_host(host, dev);
    1564             : }
    1565             : 
    1566             : /* AUX_FUNC  ldv_usb_register_10 */
    1567             : static inline int ldv_usb_register_10 (struct usb_driver *driver)
    1568             : {
    1569           1 : 
    1570             :  /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'usb_register'"} */
    1571           4 :  return ldv_emg_usb_register(driver);
    1572             : }
    1573             : 
    1574             : /* AUX_FUNC  ldv_usb_deregister_11 */
    1575             : void ldv_usb_deregister_11 (struct usb_driver *ldv_func_arg1)
    1576             : {
    1577             : 
    1578             :  /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'usb_deregister'"} */
    1579           4 :  ldv_emg_usb_deregister(ldv_func_arg1);
    1580           2 : }

Generated by: LCOV version 1.10