LCOV - code coverage report
Current view: top level - home/alexey/klever/native-scheduler-work-dir/native-scheduler-work-dir/scheduler/jobs/032ed983781f2acce615a4df71b22f31/klever-core-work-dir/929d281/linux-drivers-clk2/avtg/drivers/serial/8250.ko/linux:drivers:clk2/weaver - 8250.c.aux (source / functions) Hit Total Coverage
Test: coverage.info Lines: 589 607 97.0 %
Date: 2017-01-25 Functions: 100 104 96.2 %

          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 <linux/platform_device.h>
      29             : #include <linux/pm.h>
      30             : #include <linux/serial_core.h>
      31             : #include <linux/timer.h>
      32             : #include <linux/interrupt.h>
      33             : 
      34             : 
      35             : struct ldv_struct_free_irq_9 {
      36             :  int arg0;
      37             :  int signal_pending;
      38             : };
      39           1 : 
      40             : struct ldv_struct_interrupt_scenario_1 {
      41             :  int arg0;
      42             :  irqreturn_t (*arg1)(int, void *);
      43             :  irqreturn_t (*arg2)(int, void *);
      44             :  void *arg3;
      45             :  int signal_pending;
      46             : };
      47           1 : 
      48             : struct ldv_struct_platform_instance_2 {
      49             :  struct platform_driver *arg0;
      50             :  int signal_pending;
      51             : };
      52           1 : 
      53             : struct ldv_struct_timer_scenario_6 {
      54             :  struct timer_list *arg0;
      55             :  int signal_pending;
      56             : };
      57           1 : 
      58             : struct ldv_struct_uart_instance_4 {
      59             :  struct uart_port *arg0;
      60             :  int signal_pending;
      61             : };
      62             : 
      63             : /* EMG Function declarations */
      64             : void ldv_dispatch_default_deregister_13_7_4(void);
      65             : void ldv_dispatch_default_register_13_7_5(void);
      66             : void ldv_dispatch_deregister_11_1(struct platform_driver *);
      67             : void ldv_dispatch_deregister_14_3(struct uart_port *);
      68             : void ldv_dispatch_insmod_deregister_16_2(void);
      69             : void ldv_dispatch_insmod_register_16_3(void);
      70             : void ldv_dispatch_instance_deregister_8_1(struct timer_list *);
      71             : void ldv_dispatch_instance_register_10_3(struct timer_list *);
      72             : void ldv_dispatch_irq_deregister_9_1(int);
      73             : void ldv_dispatch_irq_register_12_3(int, irqreturn_t (*)(int, void *), irqreturn_t (*)(int, void *), void *);
      74             : void ldv_dispatch_pm_deregister_2_5(void);
      75             : void ldv_dispatch_pm_register_2_6(void);
      76             : void ldv_dispatch_register_13_3(struct uart_port *);
      77             : void ldv_dispatch_register_15_3(struct platform_driver *);
      78             : int ldv_emg_del_timer_sync(struct timer_list *);
      79             : void ldv_emg_free_irq(int, void *);
      80             : int ldv_emg_mod_timer(struct timer_list *, long unsigned int);
      81             : int ldv_emg_platform_driver_register(struct platform_driver *);
      82             : void ldv_emg_platform_driver_unregister(struct platform_driver *);
      83             : int ldv_emg_request_irq(unsigned int, irq_handler_t , long unsigned int, char *, void *);
      84             : int ldv_emg_uart_add_one_port(struct uart_driver *, struct uart_port *);
      85             : int ldv_emg_uart_remove_one_port(struct uart_driver *, struct uart_port *);
      86             : void ldv_insmod_7(void *);
      87             : void ldv_insmod_serial8250_exit_7_2(void (*)(void));
      88             : int ldv_insmod_serial8250_init_7_9(int (*)(void));
      89             : void ldv_interrupt_scenario_1(void *);
      90             : enum irqreturn ldv_interrupt_scenario_handler_1_5(irqreturn_t (*)(int, void *), int, void *);
      91             : void ldv_interrupt_scenario_thread_1_3(irqreturn_t (*)(int, void *), int, void *);
      92             : void ldv_main_16(void *);
      93             : void ldv_platform_instance_2(void *);
      94             : void ldv_platform_instance_callback_2_18(int (*)(struct platform_device *, pm_message_t ), struct platform_device *, struct pm_message);
      95             : void ldv_platform_instance_callback_2_7(int (*)(struct platform_device *), struct platform_device *);
      96             : int ldv_platform_instance_probe_2_14(int (*)(struct platform_device *), struct platform_device *);
      97             : void ldv_platform_instance_release_2_3(int (*)(struct platform_device *), struct platform_device *);
      98             : void ldv_pm_ops_scenario_3(void *);
      99             : void ldv_pm_ops_scenario_complete_3_3(void (*)(struct device *), struct device *);
     100             : void ldv_pm_ops_scenario_freeze_3_13(int (*)(struct device *), struct device *);
     101             : void ldv_pm_ops_scenario_freeze_noirq_3_11(int (*)(struct device *), struct device *);
     102             : void ldv_pm_ops_scenario_poweroff_3_8(int (*)(struct device *), struct device *);
     103             : void ldv_pm_ops_scenario_poweroff_noirq_3_7(int (*)(struct device *), struct device *);
     104             : void ldv_pm_ops_scenario_prepare_3_19(int (*)(struct device *), struct device *);
     105             : void ldv_pm_ops_scenario_restore_3_4(int (*)(struct device *), struct device *);
     106             : void ldv_pm_ops_scenario_restore_noirq_3_6(int (*)(struct device *), struct device *);
     107             : void ldv_pm_ops_scenario_resume_3_14(int (*)(struct device *), struct device *);
     108             : void ldv_pm_ops_scenario_resume_noirq_3_16(int (*)(struct device *), struct device *);
     109             : void ldv_pm_ops_scenario_runtime_idle_3_24(int (*)(struct device *), struct device *);
     110             : void ldv_pm_ops_scenario_runtime_resume_3_21(int (*)(struct device *), struct device *);
     111             : void ldv_pm_ops_scenario_runtime_suspend_3_22(int (*)(struct device *), struct device *);
     112             : void ldv_pm_ops_scenario_suspend_3_18(int (*)(struct device *), struct device *);
     113             : void ldv_pm_ops_scenario_suspend_noirq_3_17(int (*)(struct device *), struct device *);
     114             : void ldv_pm_ops_scenario_thaw_3_9(int (*)(struct device *), struct device *);
     115             : void ldv_pm_ops_scenario_thaw_noirq_3_10(int (*)(struct device *), struct device *);
     116             : void ldv_random_containerless_scenario_5(void *);
     117             : void ldv_random_containerless_scenario_callback_5_10(int (*)(char *, struct kernel_param *), char *, struct kernel_param *);
     118             : void ldv_random_containerless_scenario_callback_5_4(int (*)(char *, struct kernel_param *), char *, struct kernel_param *);
     119             : void ldv_timer_scenario_6(void *);
     120             : void ldv_timer_scenario_callback_6_2(void (*)(unsigned long), unsigned long);
     121             : void ldv_uart_instance_4(void *);
     122             : void ldv_uart_instance_callback_4_16(void (*)(struct uart_port *, int), struct uart_port *, int);
     123             : void ldv_uart_instance_callback_4_52(void (*)(struct uart_port *, int), struct uart_port *, int);
     124             : void ldv_uart_instance_callback_4_55(void (*)(struct uart_port *), struct uart_port *);
     125             : void ldv_uart_instance_callback_4_56(void (*)(struct uart_port *), struct uart_port *);
     126             : void ldv_uart_instance_callback_4_57(int (*)(struct uart_port *), struct uart_port *);
     127             : void ldv_uart_instance_callback_4_58(unsigned int (*)(struct uart_port *), struct uart_port *);
     128             : void ldv_uart_instance_callback_4_59(char *(*)(struct uart_port *), struct uart_port *);
     129             : unsigned int ldv_uart_instance_get_mctrl_4_30(unsigned int (*)(struct uart_port *), struct uart_port *);
     130             : void ldv_uart_instance_pm_off_4_19(void (*)(struct uart_port *, unsigned int, unsigned int), struct uart_port *, unsigned int, unsigned int);
     131             : void ldv_uart_instance_pm_off_4_2(void (*)(struct uart_port *, unsigned int, unsigned int), struct uart_port *, unsigned int, unsigned int);
     132             : void ldv_uart_instance_pm_on_4_35(void (*)(struct uart_port *, unsigned int, unsigned int), struct uart_port *, unsigned int, unsigned int);
     133             : void ldv_uart_instance_send_xchar_4_11(void (*)(struct uart_port *, char), struct uart_port *, char);
     134             : void ldv_uart_instance_send_xchar_4_13(void (*)(struct uart_port *, char), struct uart_port *, char);
     135             : void ldv_uart_instance_set_mctrl_4_14(void (*)(struct uart_port *, unsigned int), struct uart_port *, unsigned int);
     136             : void ldv_uart_instance_set_mctrl_4_25(void (*)(struct uart_port *, unsigned int), struct uart_port *, unsigned int);
     137             : void ldv_uart_instance_set_mctrl_4_5(void (*)(struct uart_port *, unsigned int), struct uart_port *, unsigned int);
     138             : void ldv_uart_instance_set_termios_4_15(void (*)(struct uart_port *, struct ktermios *, struct ktermios *), struct uart_port *, struct ktermios *, struct ktermios *);
     139             : void ldv_uart_instance_set_termios_4_31(void (*)(struct uart_port *, struct ktermios *, struct ktermios *), struct uart_port *, struct ktermios *, struct ktermios *);
     140             : void ldv_uart_instance_shutdown_4_21(void (*)(struct uart_port *), struct uart_port *);
     141             : void ldv_uart_instance_shutdown_4_4(void (*)(struct uart_port *), struct uart_port *);
     142             : void ldv_uart_instance_start_tx_4_26(void (*)(struct uart_port *), struct uart_port *);
     143             : void ldv_uart_instance_start_tx_4_9(void (*)(struct uart_port *), struct uart_port *);
     144             : void ldv_uart_instance_start_tx_if_4_10(void (*)(struct uart_port *), struct uart_port *);
     145             : void ldv_uart_instance_start_tx_if_4_12(void (*)(struct uart_port *), struct uart_port *);
     146             : int ldv_uart_instance_startup_4_33(int (*)(struct uart_port *), struct uart_port *);
     147             : void ldv_uart_instance_stop_rx_4_22(void (*)(struct uart_port *), struct uart_port *);
     148             : void ldv_uart_instance_stop_rx_4_6(void (*)(struct uart_port *), struct uart_port *);
     149             : void ldv_uart_instance_stop_tx_4_28(void (*)(struct uart_port *), struct uart_port *);
     150             : void ldv_uart_instance_stop_tx_4_8(void (*)(struct uart_port *), struct uart_port *);
     151             : void ldv_uart_instance_verify_port_4_34(int (*)(struct uart_port *, struct serial_struct *), struct uart_port *, struct serial_struct *);
     152             : int main(void);
     153             : 
     154             : /* EMG variable declarations */
     155           1 : struct ldv_thread ldv_thread_1;
     156           1 : struct ldv_thread ldv_thread_16;
     157           1 : struct ldv_thread ldv_thread_2;
     158           1 : struct ldv_thread ldv_thread_3;
     159           1 : struct ldv_thread ldv_thread_4;
     160           1 : struct ldv_thread ldv_thread_5;
     161           1 : struct ldv_thread ldv_thread_6;
     162           1 : struct ldv_thread ldv_thread_7;
     163             : 
     164             : /* EMG variable initialization */
     165             : 
     166             : /* EMG function definitions */
     167             : /* AUX_FUNC ldv_dispatch_default_deregister_13_7_4 */
     168             : void ldv_dispatch_default_deregister_13_7_4() {
     169             :  struct ldv_struct_platform_instance_2 *cf_arg_5;
     170             :  /* Skip thread join call */
     171           1 :  return;
     172             : }
     173             : 
     174             : /* AUX_FUNC ldv_dispatch_default_register_13_7_5 */
     175             : void ldv_dispatch_default_register_13_7_5() {
     176             :  struct ldv_struct_platform_instance_2 *cf_arg_5;
     177           4 :  cf_arg_5 = ldv_xmalloc(sizeof(struct ldv_struct_platform_instance_2));
     178           3 :  ldv_random_containerless_scenario_5(cf_arg_5);
     179           1 :  return;
     180             : }
     181             : 
     182             : /* AUX_FUNC ldv_dispatch_deregister_11_1 */
     183             : void ldv_dispatch_deregister_11_1(struct platform_driver *arg0) {
     184             :  struct ldv_struct_platform_instance_2 *cf_arg_2;
     185             :  /* Skip thread join call */
     186           2 :  return;
     187             : }
     188             : 
     189             : /* AUX_FUNC ldv_dispatch_deregister_14_3 */
     190             : void ldv_dispatch_deregister_14_3(struct uart_port *arg0) {
     191             :  struct ldv_struct_uart_instance_4 *cf_arg_4;
     192             :  /* Skip thread join call */
     193           1 :  return;
     194             : }
     195             : 
     196             : /* AUX_FUNC ldv_dispatch_insmod_deregister_16_2 */
     197             : void ldv_dispatch_insmod_deregister_16_2() {
     198             :  struct ldv_struct_platform_instance_2 *cf_arg_7;
     199             :  /* Skip thread join call */
     200           1 :  return;
     201             : }
     202             : 
     203             : /* AUX_FUNC ldv_dispatch_insmod_register_16_3 */
     204             : void ldv_dispatch_insmod_register_16_3() {
     205             :  struct ldv_struct_platform_instance_2 *cf_arg_7;
     206           4 :  cf_arg_7 = ldv_xmalloc(sizeof(struct ldv_struct_platform_instance_2));
     207           4 :  ldv_insmod_7(cf_arg_7);
     208           1 :  return;
     209             : }
     210             : 
     211             : /* AUX_FUNC ldv_dispatch_instance_deregister_8_1 */
     212             : void ldv_dispatch_instance_deregister_8_1(struct timer_list *arg0) {
     213             :  struct ldv_struct_timer_scenario_6 *cf_arg_6;
     214             :  /* Skip thread join call */
     215           4 :  return;
     216             : }
     217             : 
     218             : /* AUX_FUNC ldv_dispatch_instance_register_10_3 */
     219             : void ldv_dispatch_instance_register_10_3(struct timer_list *arg0) {
     220             :  struct ldv_struct_timer_scenario_6 *cf_arg_6;
     221          16 :  cf_arg_6 = ldv_xmalloc(sizeof(struct ldv_struct_timer_scenario_6));
     222           8 :  cf_arg_6->arg0 = arg0;
     223          16 :  ldv_timer_scenario_6(cf_arg_6);
     224           4 :  return;
     225             : }
     226             : 
     227             : /* AUX_FUNC ldv_dispatch_irq_deregister_9_1 */
     228             : void ldv_dispatch_irq_deregister_9_1(int arg0) {
     229             :  struct ldv_struct_free_irq_9 *cf_arg_1;
     230             :  /* Skip thread join call */
     231           4 :  return;
     232             : }
     233             : 
     234             : /* AUX_FUNC ldv_dispatch_irq_register_12_3 */
     235             : void ldv_dispatch_irq_register_12_3(int arg0, irqreturn_t (*arg1)(int, void *), irqreturn_t (*arg2)(int, void *), void *arg3) {
     236             :  struct ldv_struct_interrupt_scenario_1 *cf_arg_1;
     237          18 :  cf_arg_1 = ldv_xmalloc(sizeof(struct ldv_struct_interrupt_scenario_1));
     238          12 :  cf_arg_1->arg0 = arg0;
     239          12 :  cf_arg_1->arg1 = arg1;
     240           6 :  cf_arg_1->arg2 = arg2;
     241           6 :  cf_arg_1->arg3 = arg3;
     242          24 :  ldv_interrupt_scenario_1(cf_arg_1);
     243           6 :  return;
     244             : }
     245             : 
     246             : /* AUX_FUNC ldv_dispatch_pm_deregister_2_5 */
     247             : void ldv_dispatch_pm_deregister_2_5() {
     248             :  struct ldv_struct_platform_instance_2 *cf_arg_3;
     249             :  /* Skip thread join call */
     250           1 :  return;
     251             : }
     252             : 
     253             : /* AUX_FUNC ldv_dispatch_pm_register_2_6 */
     254             : void ldv_dispatch_pm_register_2_6() {
     255             :  struct ldv_struct_platform_instance_2 *cf_arg_3;
     256           4 :  cf_arg_3 = ldv_xmalloc(sizeof(struct ldv_struct_platform_instance_2));
     257           3 :  ldv_pm_ops_scenario_3(cf_arg_3);
     258           1 :  return;
     259             : }
     260             : 
     261             : /* AUX_FUNC ldv_dispatch_register_13_3 */
     262             : void ldv_dispatch_register_13_3(struct uart_port *arg0) {
     263             :  struct ldv_struct_uart_instance_4 *cf_arg_4;
     264           8 :  cf_arg_4 = ldv_xmalloc(sizeof(struct ldv_struct_uart_instance_4));
     265           4 :  cf_arg_4->arg0 = arg0;
     266           4 :  ldv_uart_instance_4(cf_arg_4);
     267           2 :  return;
     268             : }
     269             : 
     270             : /* AUX_FUNC ldv_dispatch_register_15_3 */
     271             : void ldv_dispatch_register_15_3(struct platform_driver *arg0) {
     272             :  struct ldv_struct_platform_instance_2 *cf_arg_2;
     273           4 :  cf_arg_2 = ldv_xmalloc(sizeof(struct ldv_struct_platform_instance_2));
     274           2 :  cf_arg_2->arg0 = arg0;
     275           2 :  ldv_platform_instance_2(cf_arg_2);
     276           1 :  return;
     277             : }
     278             : 
     279             : /* AUX_FUNC ldv_emg_del_timer_sync */
     280             : int ldv_emg_del_timer_sync(struct timer_list *arg0) {
     281             :  /* LDV {"comment": "Control function 'del_timer_sync'", "type": "CONTROL_FUNCTION_BEGIN", "function": "ldv_emg_del_timer_sync"} */
     282           4 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     283             :  struct timer_list *ldv_8_timer_list_timer_list;
     284             :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     285             :  /* LDV {"action": "ASSIGN", "type": "CONDITION_BEGIN", "comment": "Get timer representing structure."} */
     286           4 :  ldv_8_timer_list_timer_list = arg0;
     287             :  /* LDV {"action": "ASSIGN", "type": "CONDITION_END"} */
     288             : 
     289             :  /* LDV {"action": "INSTANCE_DEREGISTER", "type": "DISPATCH_BEGIN", "comment": "Deregister TIMER callbacks."} */
     290           8 :  ldv_dispatch_instance_deregister_8_1(ldv_8_timer_list_timer_list);
     291           4 :  /* LDV {"action": "INSTANCE_DEREGISTER", "type": "DISPATCH_END"} */
     292             : 
     293             :  /* Exit function at a terminal state */
     294             :  /* End of the process */
     295             :  /* LDV {"comment": "End of control function based on process 'del_timer_sync'", "type": "CONTROL_FUNCTION_END", "function": "ldv_emg_del_timer_sync"} */
     296             : }
     297             : 
     298             : /* AUX_FUNC ldv_emg_free_irq */
     299             : void ldv_emg_free_irq(int arg0, void *arg1) {
     300             :  /* LDV {"comment": "Control function 'free_irq'", "type": "CONTROL_FUNCTION_BEGIN", "function": "ldv_emg_free_irq"} */
     301           4 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     302             :  int ldv_9_line_line;
     303             :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     304             :  /* LDV {"action": "ASSIGN", "type": "CONDITION_BEGIN", "comment": "Get an interrupt line argument."} */
     305           4 :  ldv_9_line_line = arg0;
     306             :  /* LDV {"action": "ASSIGN", "type": "CONDITION_END"} */
     307             : 
     308             :  /* LDV {"action": "IRQ_DEREGISTER", "type": "DISPATCH_BEGIN", "comment": "The interrupt line is freed."} */
     309           8 :  ldv_dispatch_irq_deregister_9_1(ldv_9_line_line);
     310             :  /* LDV {"action": "IRQ_DEREGISTER", "type": "DISPATCH_END"} */
     311             : 
     312             :  /* Exit function at a terminal state */
     313           4 :  return;
     314             :  /* End of the process */
     315             :  return;
     316             :  /* LDV {"comment": "End of control function based on process 'free_irq'", "type": "CONTROL_FUNCTION_END", "function": "ldv_emg_free_irq"} */
     317             : }
     318             : 
     319             : /* AUX_FUNC ldv_emg_mod_timer */
     320             : int ldv_emg_mod_timer(struct timer_list *arg0, long unsigned int arg1) {
     321             :  /* LDV {"comment": "Control function 'mod_timer'", "type": "CONTROL_FUNCTION_BEGIN", "function": "ldv_emg_mod_timer"} */
     322           4 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     323           4 :  struct timer_list *ldv_10_timer_list_timer_list;
     324           4 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     325             :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
     326             : 
     327          16 :  if (ldv_undef_int()) {
     328             :   /* LDV {"action": "ASSIGN", "type": "CONDITION_BEGIN", "comment": "Get timer representing structure."} */
     329           4 :   ldv_10_timer_list_timer_list = arg0;
     330             :   /* LDV {"action": "ASSIGN", "type": "CONDITION_END"} */
     331             : 
     332             :   /* LDV {"action": "INSTANCE_REGISTER", "type": "DISPATCH_BEGIN", "comment": "Register TIMER callbacks."} */
     333           8 :   ldv_dispatch_instance_register_10_3(ldv_10_timer_list_timer_list);
     334             :   /* LDV {"action": "INSTANCE_REGISTER", "type": "DISPATCH_END"} */
     335             : 
     336             :   /* LDV {"action": "SUCCESS", "type": "CONDITION_BEGIN", "comment": "Successfully modified a timer's timeout"} */
     337           4 :   return 0;
     338             :   /* LDV {"action": "SUCCESS", "type": "CONDITION_END"} */
     339             : 
     340             :   /* Exit function at a terminal state */
     341             :  }
     342             :  else {
     343             :   /* LDV {"action": "FAIL", "type": "CONDITION_BEGIN", "comment": "Failed to modify a timer's timeout"} */
     344          12 :   return ldv_undef_int_negative();
     345             :   /* LDV {"action": "FAIL", "type": "CONDITION_END"} */
     346             : 
     347             :   /* Exit function at a terminal state */
     348             :  }
     349             :  /* End of the process */
     350             :  /* LDV {"comment": "End of control function based on process 'mod_timer'", "type": "CONTROL_FUNCTION_END", "function": "ldv_emg_mod_timer"} */
     351             : }
     352             : 
     353             : /* AUX_FUNC ldv_emg_platform_driver_register */
     354             : int ldv_emg_platform_driver_register(struct platform_driver *arg0) {
     355             :  /* LDV {"comment": "Control function 'platform_driver_register'", "type": "CONTROL_FUNCTION_BEGIN", "function": "ldv_emg_platform_driver_register"} */
     356           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     357           1 :  struct platform_driver *ldv_15_platform_driver_platform_driver;
     358           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     359             :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
     360             : 
     361           4 :  if (ldv_undef_int()) {
     362             :   /* LDV {"action": "ASSIGN", "type": "CONDITION_BEGIN", "comment": "Get 'platform' callbacks to register."} */
     363           1 :   ldv_15_platform_driver_platform_driver = arg0;
     364             :   /* LDV {"action": "ASSIGN", "type": "CONDITION_END"} */
     365             : 
     366             :   /* LDV {"action": "REGISTER", "type": "DISPATCH_BEGIN", "comment": "Register PLATFORM callbacks."} */
     367           2 :   ldv_dispatch_register_15_3(ldv_15_platform_driver_platform_driver);
     368             :   /* LDV {"action": "REGISTER", "type": "DISPATCH_END"} */
     369             : 
     370             :   /* LDV {"action": "FAIL", "type": "CONDITION_BEGIN", "comment": "Fail registration of 'platform' callbacks."} */
     371           3 :   return ldv_undef_int_negative();
     372             :   /* LDV {"action": "FAIL", "type": "CONDITION_END"} */
     373             : 
     374             :   /* Exit function at a terminal state */
     375             :  }
     376             :  else {
     377             :   /* LDV {"action": "SUCCESS", "type": "CONDITION_BEGIN", "comment": "Registration of 'platform' callbacks has been successful."} */
     378           1 :   return 0;
     379             :   /* LDV {"action": "SUCCESS", "type": "CONDITION_END"} */
     380             : 
     381             :   /* Exit function at a terminal state */
     382             :  }
     383             :  /* End of the process */
     384             :  /* LDV {"comment": "End of control function based on process 'platform_driver_register'", "type": "CONTROL_FUNCTION_END", "function": "ldv_emg_platform_driver_register"} */
     385             : }
     386             : 
     387             : /* AUX_FUNC ldv_emg_platform_driver_unregister */
     388             : void ldv_emg_platform_driver_unregister(struct platform_driver *arg0) {
     389             :  /* LDV {"comment": "Control function 'platform_driver_unregister'", "type": "CONTROL_FUNCTION_BEGIN", "function": "ldv_emg_platform_driver_unregister"} */
     390           2 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     391             :  struct platform_driver *ldv_11_platform_driver_platform_driver;
     392             :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     393             :  /* LDV {"action": "ASSIGN", "type": "CONDITION_BEGIN", "comment": "Get 'platform_driver' argument."} */
     394           2 :  ldv_11_platform_driver_platform_driver = arg0;
     395             :  /* LDV {"action": "ASSIGN", "type": "CONDITION_END"} */
     396             : 
     397             :  /* LDV {"action": "DEREGISTER", "type": "DISPATCH_BEGIN", "comment": "Deregister 'platform_driver' callbacks."} */
     398           4 :  ldv_dispatch_deregister_11_1(ldv_11_platform_driver_platform_driver);
     399             :  /* LDV {"action": "DEREGISTER", "type": "DISPATCH_END"} */
     400             : 
     401             :  /* Exit function at a terminal state */
     402           2 :  return;
     403             :  /* End of the process */
     404             :  return;
     405             :  /* LDV {"comment": "End of control function based on process 'platform_driver_unregister'", "type": "CONTROL_FUNCTION_END", "function": "ldv_emg_platform_driver_unregister"} */
     406             : }
     407             : 
     408             : /* AUX_FUNC ldv_emg_request_irq */
     409             : int ldv_emg_request_irq(unsigned int arg0, irqreturn_t (*arg1)(int, void *), long unsigned int arg2, char *arg3, void *arg4) {
     410             :  /* LDV {"comment": "Control function 'request_irq'", "type": "CONTROL_FUNCTION_BEGIN", "function": "ldv_emg_request_irq"} */
     411             :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     412           6 :  irqreturn_t (*ldv_12_callback_handler)(int, void *);
     413           6 :  void *ldv_12_data_data;
     414           6 :  int ldv_12_line_line;
     415           6 :  irqreturn_t (*ldv_12_thread_thread)(int, void *);
     416           6 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     417           6 :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
     418             : 
     419          24 :  if (ldv_undef_int()) {
     420             :   /* LDV {"action": "ASSIGN", "type": "CONDITION_BEGIN", "comment": "Get line, callbacks and data arguments."} */
     421           6 :   ldv_12_line_line = arg0;
     422           6 :   ldv_12_callback_handler = arg1;
     423           6 :   ldv_12_thread_thread = 0;
     424           6 :   ldv_12_data_data = arg4;
     425             :   /* LDV {"action": "ASSIGN", "type": "CONDITION_END"} */
     426             : 
     427             :   /* LDV {"action": "IRQ_REGISTER", "type": "DISPATCH_BEGIN", "comment": "Register interrupt callback (callbacks)."} */
     428          12 :   ldv_dispatch_irq_register_12_3(ldv_12_line_line, ldv_12_callback_handler, ldv_12_thread_thread, ldv_12_data_data);
     429             :   /* LDV {"action": "IRQ_REGISTER", "type": "DISPATCH_END"} */
     430             : 
     431             :   /* LDV {"action": "SUCCESS", "type": "CONDITION_BEGIN", "comment": "Successfully allocated an interrupt line for a managed device."} */
     432           6 :   return 0;
     433             :   /* LDV {"action": "SUCCESS", "type": "CONDITION_END"} */
     434             : 
     435             :   /* Exit function at a terminal state */
     436             :  }
     437             :  else {
     438             :   /* LDV {"action": "FAIL", "type": "CONDITION_BEGIN", "comment": "Failed to allocate an interrupt line for a managed device."} */
     439          18 :   return ldv_undef_int_negative();
     440             :   /* LDV {"action": "FAIL", "type": "CONDITION_END"} */
     441             : 
     442             :   /* Exit function at a terminal state */
     443             :  }
     444             :  /* End of the process */
     445             :  /* LDV {"comment": "End of control function based on process 'request_irq'", "type": "CONTROL_FUNCTION_END", "function": "ldv_emg_request_irq"} */
     446             : }
     447             : 
     448             : /* AUX_FUNC ldv_emg_uart_add_one_port */
     449             : int ldv_emg_uart_add_one_port(struct uart_driver *arg0, struct uart_port *arg1) {
     450             :  /* LDV {"comment": "Control function 'uart_add_one_port'", "type": "CONTROL_FUNCTION_BEGIN", "function": "ldv_emg_uart_add_one_port"} */
     451           2 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     452           2 :  struct uart_port *ldv_13_uart_port_uart_port;
     453           2 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     454             :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
     455             : 
     456           8 :  if (ldv_undef_int()) {
     457             :   /* LDV {"action": "ALLOC", "type": "CONDITION_BEGIN", "comment": "Get port structure."} */
     458           2 :   ldv_13_uart_port_uart_port = arg1;
     459             :   /* LDV {"action": "ALLOC", "type": "CONDITION_END"} */
     460             : 
     461             :   /* LDV {"action": "REGISTER", "type": "DISPATCH_BEGIN", "comment": "Register SERIAL_CORE callbacks."} */
     462           4 :   ldv_dispatch_register_13_3(ldv_13_uart_port_uart_port);
     463             :   /* LDV {"action": "REGISTER", "type": "DISPATCH_END"} */
     464             : 
     465             :   /* LDV {"action": "SUCCESS", "type": "CONDITION_BEGIN", "comment": "Successfully attached a driver-defined port structure."} */
     466           2 :   return 0;
     467             :   /* LDV {"action": "SUCCESS", "type": "CONDITION_END"} */
     468             : 
     469             :   /* Exit function at a terminal state */
     470             :  }
     471             :  else {
     472             :   /* LDV {"action": "FAIL", "type": "CONDITION_BEGIN", "comment": "Failed to attach a driver-defined port structure."} */
     473           6 :   return ldv_undef_int_negative();
     474             :   /* LDV {"action": "FAIL", "type": "CONDITION_END"} */
     475             : 
     476             :   /* Exit function at a terminal state */
     477             :  }
     478             :  /* End of the process */
     479             :  /* LDV {"comment": "End of control function based on process 'uart_add_one_port'", "type": "CONTROL_FUNCTION_END", "function": "ldv_emg_uart_add_one_port"} */
     480             : }
     481             : 
     482             : /* AUX_FUNC ldv_emg_uart_remove_one_port */
     483             : int ldv_emg_uart_remove_one_port(struct uart_driver *arg0, struct uart_port *arg1) {
     484             :  /* LDV {"comment": "Control function 'uart_remove_one_port'", "type": "CONTROL_FUNCTION_BEGIN", "function": "ldv_emg_uart_remove_one_port"} */
     485           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     486           1 :  struct uart_port *ldv_14_uart_port_uart_port;
     487           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     488             :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
     489             : 
     490           4 :  if (ldv_undef_int()) {
     491             :   /* LDV {"action": "ASSIGN", "type": "CONDITION_BEGIN", "comment": "Get port structure."} */
     492           1 :   ldv_14_uart_port_uart_port = arg1;
     493             :   /* LDV {"action": "ASSIGN", "type": "CONDITION_END"} */
     494             : 
     495             :   /* LDV {"action": "DEREGISTER", "type": "DISPATCH_BEGIN", "comment": "Deregister SERIAL_CORE callbacks."} */
     496           2 :   ldv_dispatch_deregister_14_3(ldv_14_uart_port_uart_port);
     497             :   /* LDV {"action": "DEREGISTER", "type": "DISPATCH_END"} */
     498             : 
     499             :   /* LDV {"action": "SUCCESS", "type": "CONDITION_BEGIN", "comment": "Successfully detached a driver-defined port structure."} */
     500           1 :   return 0;
     501             :   /* LDV {"action": "SUCCESS", "type": "CONDITION_END"} */
     502             : 
     503             :   /* Exit function at a terminal state */
     504             :  }
     505             :  else {
     506             :   /* LDV {"action": "FAIL", "type": "CONDITION_BEGIN", "comment": "Failed to detach a driver-defined port structure."} */
     507           3 :   return ldv_undef_int_negative();
     508             :   /* LDV {"action": "FAIL", "type": "CONDITION_END"} */
     509             : 
     510             :   /* Exit function at a terminal state */
     511             :  }
     512             :  /* End of the process */
     513             :  /* LDV {"comment": "End of control function based on process 'uart_remove_one_port'", "type": "CONTROL_FUNCTION_END", "function": "ldv_emg_uart_remove_one_port"} */
     514             : }
     515             : 
     516             : /* AUX_FUNC ldv_insmod_7 */
     517             : void ldv_insmod_7(void *arg0) {
     518             :  /* LDV {"thread": 7, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'insmod(artificial)'", "function": "ldv_insmod_7"} */
     519           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     520           1 :  int ldv_7_ret_default;
     521           1 :  void (*ldv_7_serial8250_exit_default)(void);
     522           1 :  int (*ldv_7_serial8250_init_default)(void);
     523           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     524             :  /* LDV {"action": "INSMOD_REGISTER", "type": "RECEIVE_BEGIN", "comment": "Trigger module initialization."} */
     525           2 :  ldv_free(arg0);
     526             :  /* LDV {"action": "INSMOD_REGISTER", "type": "RECEIVE_END"} */
     527             : 
     528             :  /* LDV {"action": "SERIAL8250_INIT", "type": "CALL_BEGIN", "callback": true, "comment": "Initialize the module after insmod with 'serial8250_init' function. Invoke callback serial8250_init from ARTIFICIAL."} */
     529             :  /* LDV {"type": "CALLBACK", "call": "ldv_7_ret_default = (serial8250_init)();", "comment": "serial8250_init"} */
     530           2 :  ldv_7_ret_default = ldv_insmod_serial8250_init_7_9(ldv_7_serial8250_init_default);
     531             :  /* Callback post-call */
     532           2 :  ldv_7_ret_default = ldv_post_init(ldv_7_ret_default);
     533             :  /* LDV {"action": "SERIAL8250_INIT", "type": "CALL_END"} */
     534             : 
     535           4 :  if (ldv_undef_int()) {
     536             :   /* LDV {"action": "INIT_FAILED", "type": "CONDITION_BEGIN", "comment": "Failed to initialize the module."} */
     537           2 :   ldv_assume(ldv_7_ret_default != 0);
     538             :   /* LDV {"action": "INIT_FAILED", "type": "CONDITION_END"} */
     539             : 
     540             :   /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Trigger module exit."} */
     541             :   /* Skip a non-replicative signal receiving */
     542             :   /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_END"} */
     543             : 
     544             :   /* Exit function at a terminal state */
     545           1 :   return;
     546             :  }
     547             :  else {
     548             :   /* LDV {"action": "INIT_SUCCESS", "type": "CONDITION_BEGIN", "comment": "Module has been initialized."} */
     549           2 :   ldv_assume(ldv_7_ret_default == 0);
     550             :   /* LDV {"action": "INIT_SUCCESS", "type": "CONDITION_END"} */
     551             : 
     552           4 :   if (ldv_undef_int()) {
     553             :    /* LDV {"action": "DEFAULT_REGISTER_13", "type": "DISPATCH_BEGIN", "comment": "Register 'STRUCT_KERNEL_PARAM' callbacks with unknown registration function."} */
     554           2 :    ldv_dispatch_default_register_13_7_5();
     555             :    /* LDV {"action": "DEFAULT_REGISTER_13", "type": "DISPATCH_END"} */
     556             : 
     557             :    /* LDV {"action": "DEFAULT_DEREGISTER_13", "type": "DISPATCH_BEGIN", "comment": "Deregister 'STRUCT_KERNEL_PARAM' callbacks with unknown deregistration function."} */
     558           2 :    ldv_dispatch_default_deregister_13_7_4();
     559             :    /* LDV {"action": "DEFAULT_DEREGISTER_13", "type": "DISPATCH_END"} */
     560             : 
     561             :   }
     562             :   else {
     563             :    /* LDV {"action": "NONE", "type": "CONDITION_BEGIN", "comment": "Skip default callbacks registrations and deregistrations."} */
     564             :    /* LDV {"action": "NONE", "type": "CONDITION_END"} */
     565             : 
     566             :   }
     567             :   /* LDV {"action": "SERIAL8250_EXIT", "type": "CALL_BEGIN", "callback": true, "comment": "Exit the module before its unloading with 'serial8250_exit' function. Invoke callback serial8250_exit from ARTIFICIAL."} */
     568             :   /* LDV {"type": "CALLBACK", "call": "(serial8250_exit)();", "comment": "serial8250_exit"} */
     569           4 :   ldv_insmod_serial8250_exit_7_2(ldv_7_serial8250_exit_default);
     570             :   /* LDV {"action": "SERIAL8250_EXIT", "type": "CALL_END"} */
     571             : 
     572             :   /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Trigger module exit."} */
     573             :   /* Skip a non-replicative signal receiving */
     574             :   /* LDV {"action": "INSMOD_DEREGISTER", "type": "RECEIVE_END"} */
     575             : 
     576             :   /* Exit function at a terminal state */
     577           1 :   return;
     578             :  }
     579             :  /* End of the process */
     580             :  return;
     581             :  /* LDV {"comment": "End of control function based on process 'insmod(artificial)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_insmod_7"} */
     582             : }
     583             : 
     584             : /* AUX_FUNC_CALLBACK ldv_insmod_serial8250_exit_7_2 */
     585             : void ldv_insmod_serial8250_exit_7_2(void (*arg0)(void)) {
     586           4 :  (serial8250_exit)();
     587           2 : }
     588             : 
     589             : /* AUX_FUNC_CALLBACK ldv_insmod_serial8250_init_7_9 */
     590             : int ldv_insmod_serial8250_init_7_9(int (*arg0)(void)) {
     591           4 :  return (serial8250_init)();
     592           1 : }
     593             : 
     594             : /* AUX_FUNC ldv_interrupt_scenario_1 */
     595             : void ldv_interrupt_scenario_1(void *arg0) {
     596             :  /* LDV {"thread": 1, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'interrupt_scenario(interrupt)'", "function": "ldv_interrupt_scenario_1"} */
     597           6 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     598           6 :  irqreturn_t (*ldv_1_callback_handler)(int, void *);
     599           6 :  void *ldv_1_data_data;
     600           6 :  int ldv_1_line_line;
     601           6 :  enum irqreturn ldv_1_ret_val_default;
     602           6 :  irqreturn_t (*ldv_1_thread_thread)(int, void *);
     603           6 :  /* Received labels */
     604           6 :  struct ldv_struct_interrupt_scenario_1 *data = (struct ldv_struct_interrupt_scenario_1*) arg0;
     605             : 
     606             :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     607             :  /* LDV {"action": "IRQ_REGISTER", "type": "RECEIVE_BEGIN", "comment": "An interrupt is registered."} */
     608             :  /* Assign recieved labels */
     609          12 :  if (data) {
     610           6 :   ldv_1_line_line = data->arg0;
     611           6 :   ldv_1_callback_handler = data->arg1;
     612           6 :   ldv_1_thread_thread = data->arg2;
     613           6 :   ldv_1_data_data = data->arg3;
     614          12 :   ldv_free(data);
     615             :  }
     616             :  /* LDV {"action": "IRQ_REGISTER", "type": "RECEIVE_END"} */
     617             : 
     618             :  /* LDV {"action": "HANDLER", "type": "CALL_BEGIN", "callback": true, "comment": "An interrupt happens, execute the bottom half function to handle it. Invoke callback handler from INTERRUPT."} */
     619             :  /* Callback pre-call */
     620          12 :  ldv_switch_to_interrupt_context();
     621             :  /* LDV {"type": "CALLBACK", "call": "ldv_1_ret_val_default = ((serial8250_interrupt))(ldv_1_line_line, ldv_1_data_data);", "comment": "handler"} */
     622          24 :  ldv_1_ret_val_default = ldv_interrupt_scenario_handler_1_5(ldv_1_callback_handler, ldv_1_line_line, ldv_1_data_data);
     623             :  /* Callback post-call */
     624           6 :  ldv_switch_to_process_context();
     625             :  /* LDV {"action": "HANDLER", "type": "CALL_END"} */
     626             : 
     627          24 :  if (ldv_undef_int()) {
     628             :   /* LDV {"action": "NEED_THREAD", "type": "CONDITION_BEGIN", "comment": "Wake a thread to continue an interrupt handling."} */
     629          12 :   ldv_assume(ldv_1_ret_val_default == IRQ_WAKE_THREAD);
     630             :   /* LDV {"action": "NEED_THREAD", "type": "CONDITION_END"} */
     631             : 
     632             :   /* LDV {"action": "THREAD", "type": "CALL_BEGIN", "callback": true, "comment": "Proceed with the interrupt handling, execute the top half function. Invoke callback thread from INTERRUPT."} */
     633          12 :   if (ldv_1_thread_thread) {
     634             :   /* LDV {"type": "CALLBACK", "call": "(ldv_1_thread_thread)(ldv_1_line_line, ldv_1_data_data);", "comment": "thread"} */
     635          12 :    ldv_interrupt_scenario_thread_1_3(ldv_1_thread_thread, ldv_1_line_line, ldv_1_data_data);
     636             :   }
     637             :   /* LDV {"action": "THREAD", "type": "CALL_END"} */
     638             : 
     639             :  }
     640             :  else {
     641             :   /* LDV {"action": "HANDLED", "type": "CONDITION_BEGIN", "comment": "An interrupt has been handled."} */
     642          12 :   ldv_assume(ldv_1_ret_val_default != IRQ_WAKE_THREAD);
     643             :   /* LDV {"action": "HANDLED", "type": "CONDITION_END"} */
     644             : 
     645             :  }
     646             :  /* LDV {"action": "IRQ_DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "An interrupt is deregistered."} */
     647             :  /* Skip a non-replicative signal receiving */
     648             :  /* LDV {"action": "IRQ_DEREGISTER", "type": "RECEIVE_END"} */
     649             : 
     650             :  /* Exit function at a terminal state */
     651          18 :  return;
     652             :  /* End of the process */
     653             :  return;
     654             :  /* LDV {"comment": "End of control function based on process 'interrupt_scenario(interrupt)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_interrupt_scenario_1"} */
     655             : }
     656             : 
     657             : /* AUX_FUNC_CALLBACK ldv_interrupt_scenario_handler_1_5 */
     658             : enum irqreturn ldv_interrupt_scenario_handler_1_5(irqreturn_t (*arg0)(int, void *), int arg1, void *arg2) {
     659          36 :  return ((serial8250_interrupt))(arg1, arg2);
     660             : }
     661          12 : 
     662             : /* AUX_FUNC_CALLBACK ldv_interrupt_scenario_thread_1_3 */
     663             : void ldv_interrupt_scenario_thread_1_3(irqreturn_t (*arg0)(int, void *), int arg1, void *arg2) {
     664          12 :  (*arg0)(arg1, arg2);
     665           6 : }
     666             : 
     667             : /* AUX_FUNC ldv_main_16 */
     668             : void ldv_main_16(void *arg0) {
     669             :  /* LDV {"thread": 16, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'main(main)'", "function": "ldv_main_16"} */
     670             :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     671             :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     672             :  /* LDV {"action": "INIT", "type": "CONDITION_BEGIN", "comment": "Initialize rule models."} */
     673           1 :  ldv_initialize();
     674             :  /* LDV {"action": "INIT", "type": "CONDITION_END"} */
     675             : 
     676             :  /* LDV {"action": "INSMOD_REGISTER", "type": "DISPATCH_BEGIN", "comment": "Start environment model scenarios."} */
     677           2 :  ldv_dispatch_insmod_register_16_3();
     678             :  /* LDV {"action": "INSMOD_REGISTER", "type": "DISPATCH_END"} */
     679             : 
     680             :  /* LDV {"action": "INSMOD_DEREGISTER", "type": "DISPATCH_BEGIN", "comment": "Stop environment model scenarios."} */
     681           2 :  ldv_dispatch_insmod_deregister_16_2();
     682             :  /* LDV {"action": "INSMOD_DEREGISTER", "type": "DISPATCH_END"} */
     683             : 
     684             :  /* LDV {"action": "FINAL", "type": "CONDITION_BEGIN", "comment": "Check rule model state at the exit."} */
     685           1 :  ldv_check_final_state();
     686           1 :  ldv_stop();
     687             :  /* LDV {"action": "FINAL", "type": "CONDITION_END"} */
     688             : 
     689             :  /* Exit function at a terminal state */
     690           0 :  return;
     691             :  /* End of the process */
     692             :  return;
     693             :  /* LDV {"comment": "End of control function based on process 'main(main)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_main_16"} */
     694             : }
     695             : 
     696             : /* AUX_FUNC ldv_platform_instance_2 */
     697             : void ldv_platform_instance_2(void *arg0) {
     698             :  /* LDV {"thread": 2, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'platform_instance(platform)'", "function": "ldv_platform_instance_2"} */
     699           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     700           1 :  int (*ldv_2_callback_resume)(struct platform_device *);
     701           1 :  int (*ldv_2_callback_suspend)(struct platform_device *, pm_message_t );
     702           1 :  struct platform_driver *ldv_2_container_platform_driver;
     703           1 :  int ldv_2_probed_default;
     704           1 :  struct platform_device *ldv_2_resource_platform_device;
     705           1 :  struct pm_message ldv_2_resource_struct_pm_message;
     706           1 :  /* Received labels */
     707           2 :  struct ldv_struct_platform_instance_2 *data = (struct ldv_struct_platform_instance_2*) arg0;
     708           1 : 
     709           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     710             :  /* Initialize automaton variables */
     711           1 :  ldv_2_probed_default = 1;
     712             :  /* LDV {"action": "REGISTER", "type": "RECEIVE_BEGIN", "comment": "Register a driver callbacks for platform-level device."} */
     713             :  /* Assign recieved labels */
     714           2 :  if (data) {
     715           1 :   ldv_2_container_platform_driver = data->arg0;
     716           2 :   ldv_free(data);
     717             :  }
     718             :  /* LDV {"action": "REGISTER", "type": "RECEIVE_END"} */
     719             : 
     720             :  /* LDV {"action": "INIT", "type": "CONDITION_BEGIN", "comment": "Alloc memory for 'platform_device' structure."} */
     721           5 :  ldv_2_resource_platform_device = ldv_xmalloc(sizeof(struct platform_device));
     722             :  /* LDV {"action": "INIT", "type": "CONDITION_END"} */
     723             : 
     724             :  /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Check that device is truely in the system and begin callback invocations."} */
     725             :  /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
     726             : 
     727             :  /* Jump to a subprocess 'main' initial state */
     728           1 :  goto ldv_main_2;
     729             :  /* End of the process */
     730             :  return;
     731           1 : 
     732             :  /* Sbprocess main */
     733             :  ldv_main_2:
     734             :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
     735             : 
     736           4 :  if (ldv_undef_int()) {
     737             :   /* LDV {"action": "PROBE", "type": "CALL_BEGIN", "callback": true, "comment": "Check that the device in the system and do driver initializations. Invoke callback probe from platform_driver."} */
     738             :   /* Callback pre-call */
     739           1 :   ldv_pre_probe();
     740             :   /* LDV {"type": "CALLBACK", "call": "ldv_2_probed_default = ((& serial8250_probe))(ldv_2_resource_platform_device);", "comment": "probe"} */
     741           2 :   ldv_2_probed_default = ldv_platform_instance_probe_2_14(ldv_2_container_platform_driver->probe, ldv_2_resource_platform_device);
     742             :   /* Callback post-call */
     743           2 :   ldv_2_probed_default = ldv_post_probe(ldv_2_probed_default);
     744             :   /* LDV {"action": "PROBE", "type": "CALL_END"} */
     745             : 
     746           4 :   if (ldv_undef_int()) {
     747             :    /* LDV {"action": "POSITIVE_PROBE", "type": "CONDITION_BEGIN", "comment": "Platform device is probed successfully now."} */
     748           2 :    ldv_assume(ldv_2_probed_default == 0);
     749             :    /* LDV {"action": "POSITIVE_PROBE", "type": "CONDITION_END"} */
     750             : 
     751             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Driver is probed. Call power management callbacks or release the device."} */
     752             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
     753             : 
     754             :    /* Jump to a subprocess 'call' initial state */
     755           1 :    goto ldv_call_2;
     756             :   }
     757             :   else {
     758             :    /* LDV {"action": "NEGATIVE_PROBE", "type": "CONDITION_BEGIN", "comment": "Failed to probe the device."} */
     759           2 :    ldv_assume(ldv_2_probed_default != 0);
     760             :    /* LDV {"action": "NEGATIVE_PROBE", "type": "CONDITION_END"} */
     761             : 
     762             :    /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Check that device is truely in the system and begin callback invocations."} */
     763             :    /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
     764             : 
     765             :    /* Jump to a subprocess 'main' initial state */
     766           1 :    goto ldv_main_2;
     767             :   }
     768             :  }
     769             :  else {
     770             :   /* LDV {"action": "FREE", "type": "CONDITION_BEGIN", "comment": "Free memory for 'platform_device' structure."} */
     771           2 :   ldv_free(ldv_2_resource_platform_device);
     772             :   /* LDV {"action": "FREE", "type": "CONDITION_END"} */
     773             : 
     774             :   /* LDV {"action": "DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Finish PLATFORM callbacks invocations scenario."} */
     775             :   /* Skip a non-replicative signal receiving */
     776             :   /* LDV {"action": "DEREGISTER", "type": "RECEIVE_END"} */
     777             : 
     778             :   /* Exit function at a terminal state */
     779           1 :   return;
     780             :  }
     781             :  /* End of the subprocess 'main' */
     782             :  return;
     783           1 : 
     784             :  /* Sbprocess call */
     785             :  ldv_call_2:
     786             :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
     787             : 
     788           2 :  switch (ldv_undef_int()) {
     789           3 :   case 1: {
     790             :    /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback suspend from platform_driver."} */
     791             :    /* LDV {"type": "CALLBACK", "call": "((& serial8250_suspend))(ldv_2_resource_platform_device, ldv_2_resource_struct_pm_message);", "comment": "callback"} */
     792           2 :    ldv_platform_instance_callback_2_18(ldv_2_callback_suspend, ldv_2_resource_platform_device, ldv_2_resource_struct_pm_message);
     793             :    /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     794             : 
     795             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Driver is probed. Call power management callbacks or release the device."} */
     796             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
     797             : 
     798             :    /* Jump to a subprocess 'call' initial state */
     799           1 :    goto ldv_call_2;
     800           1 :    break;
     801             :   }
     802           3 :   case 2: {
     803             :    /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback resume from platform_driver."} */
     804             :    /* LDV {"type": "CALLBACK", "call": "((& serial8250_resume))(ldv_2_resource_platform_device);", "comment": "callback"} */
     805           2 :    ldv_platform_instance_callback_2_7(ldv_2_callback_resume, ldv_2_resource_platform_device);
     806             :    /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
     807             : 
     808             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Driver is probed. Call power management callbacks or release the device."} */
     809             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
     810             : 
     811             :    /* Jump to a subprocess 'call' initial state */
     812           1 :    goto ldv_call_2;
     813             :    /* Jump to a subprocess 'call' initial state */
     814             :    goto ldv_call_2;
     815           1 :    break;
     816             :   }
     817           3 :   case 3: {
     818             :    /* LDV {"action": "PM_REGISTER", "type": "DISPATCH_BEGIN", "comment": "Proceed to a power management scenario."} */
     819           2 :    ldv_dispatch_pm_register_2_6();
     820             :    /* LDV {"action": "PM_REGISTER", "type": "DISPATCH_END"} */
     821             : 
     822             :    /* LDV {"action": "PM_DEREGISTER", "type": "DISPATCH_BEGIN", "comment": "Finish the power management scenario."} */
     823           2 :    ldv_dispatch_pm_deregister_2_5();
     824             :    /* LDV {"action": "PM_DEREGISTER", "type": "DISPATCH_END"} */
     825             : 
     826             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Driver is probed. Call power management callbacks or release the device."} */
     827             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
     828             : 
     829             :    /* Jump to a subprocess 'call' initial state */
     830           1 :    goto ldv_call_2;
     831             :    /* Jump to a subprocess 'call' initial state */
     832             :    goto ldv_call_2;
     833             :    /* Jump to a subprocess 'call' initial state */
     834             :    goto ldv_call_2;
     835           1 :    break;
     836             :   }
     837           3 :   case 4: {
     838             :    /* LDV {"action": "RELEASE", "type": "CALL_BEGIN", "callback": true, "comment": "Remove device from the system. Invoke callback release from PLATFORM."} */
     839           3 :    if (ldv_2_container_platform_driver->remove) {
     840             :    /* LDV {"type": "CALLBACK", "call": "(ldv_2_container_platform_driver->remove)(ldv_2_resource_platform_device);", "comment": "release"} */
     841           2 :     ldv_platform_instance_release_2_3(ldv_2_container_platform_driver->remove, ldv_2_resource_platform_device);
     842             :    }
     843             :    /* LDV {"action": "RELEASE", "type": "CALL_END"} */
     844             : 
     845             :    /* LDV {"action": "AFTER_RELEASE", "type": "CONDITION_BEGIN", "comment": "Platform device is released now."} */
     846           2 :    ldv_2_probed_default = 1;
     847             :    /* LDV {"action": "AFTER_RELEASE", "type": "CONDITION_END"} */
     848             : 
     849             :    /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Check that device is truely in the system and begin callback invocations."} */
     850             :    /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
     851             : 
     852             :    /* Jump to a subprocess 'main' initial state */
     853           2 :    goto ldv_main_2;
     854           1 :    break;
     855             :   }
     856           2 :   default: ldv_stop();
     857           1 :  }
     858           0 :  /* End of the subprocess 'call' */
     859           0 :  return;
     860             :  /* LDV {"comment": "End of control function based on process 'platform_instance(platform)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_platform_instance_2"} */
     861             : }
     862             : 
     863             : /* AUX_FUNC_CALLBACK ldv_platform_instance_callback_2_18 */
     864             : void ldv_platform_instance_callback_2_18(int (*arg0)(struct platform_device *, pm_message_t ), struct platform_device *arg1, struct pm_message arg2) {
     865           2 :  ((& serial8250_suspend))(arg1, arg2);
     866           1 : }
     867             : 
     868             : /* AUX_FUNC_CALLBACK ldv_platform_instance_callback_2_7 */
     869             : void ldv_platform_instance_callback_2_7(int (*arg0)(struct platform_device *), struct platform_device *arg1) {
     870           2 :  ((& serial8250_resume))(arg1);
     871           1 : }
     872             : 
     873             : /* AUX_FUNC_CALLBACK ldv_platform_instance_probe_2_14 */
     874             : int ldv_platform_instance_probe_2_14(int (*arg0)(struct platform_device *), struct platform_device *arg1) {
     875           3 :  return ((& serial8250_probe))(arg1);
     876           1 : }
     877             : 
     878             : /* AUX_FUNC_CALLBACK ldv_platform_instance_release_2_3 */
     879             : void ldv_platform_instance_release_2_3(int (*arg0)(struct platform_device *), struct platform_device *arg1) {
     880           3 :  (*arg0)(arg1);
     881           1 : }
     882             : 
     883             : /* AUX_FUNC ldv_pm_ops_scenario_3 */
     884             : void ldv_pm_ops_scenario_3(void *arg0) {
     885             :  /* LDV {"thread": 3, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'pm_ops_scenario(platform)'", "function": "ldv_pm_ops_scenario_3"} */
     886           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
     887           1 :  struct device *ldv_3_device_device;
     888           1 :  struct dev_pm_ops *ldv_3_pm_ops_dev_pm_ops;
     889           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
     890           1 :  /* LDV {"action": "PM_REGISTER", "type": "RECEIVE_BEGIN", "comment": "Ready for a power management scenarios."} */
     891           3 :  ldv_free(arg0);
     892           1 :  /* LDV {"action": "PM_REGISTER", "type": "RECEIVE_END"} */
     893             : 
     894             :  /* LDV {"action": "DO", "type": "SUBPROCESS_BEGIN", "comment": "Begin a power management scenario."} */
     895             :  /* LDV {"action": "DO", "type": "SUBPROCESS_END"} */
     896             : 
     897             :  /* Jump to a subprocess 'do' initial state */
     898           1 :  goto ldv_do_3;
     899             :  /* End of the process */
     900             :  return;
     901           1 : 
     902             :  /* Sbprocess do */
     903             :  ldv_do_3:
     904             :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
     905             : 
     906           2 :  switch (ldv_undef_int()) {
     907           3 :   case 1: {
     908             :    /* LDV {"action": "RUNTIME_IDLE", "type": "CALL_BEGIN", "callback": true, "comment": "Device appears to be inactive and it might be put into a low-power state if all of the necessary conditions are satisfied. Invoke callback runtime_idle from PLATFORM."} */
     909           3 :    if (ldv_3_pm_ops_dev_pm_ops->runtime_idle) {
     910             :    /* LDV {"type": "CALLBACK", "call": "(ldv_3_pm_ops_dev_pm_ops->runtime_idle)(ldv_3_device_device);", "comment": "runtime_idle"} */
     911           2 :     ldv_pm_ops_scenario_runtime_idle_3_24(ldv_3_pm_ops_dev_pm_ops->runtime_idle, ldv_3_device_device);
     912             :    }
     913             :    /* LDV {"action": "RUNTIME_IDLE", "type": "CALL_END"} */
     914             : 
     915             :    /* LDV {"action": "DO", "type": "SUBPROCESS_BEGIN", "comment": "Begin a power management scenario."} */
     916             :    /* LDV {"action": "DO", "type": "SUBPROCESS_END"} */
     917             : 
     918             :    /* Jump to a subprocess 'do' initial state */
     919           2 :    goto ldv_do_3;
     920           1 :    break;
     921             :   }
     922           3 :   case 2: {
     923             :    /* LDV {"action": "RUNTIME_SUSPEND", "type": "CALL_BEGIN", "callback": true, "comment": "The device should be put into a low-power state to prevent communication of the device with the CPU(s) and RAM. Invoke callback runtime_suspend from PLATFORM."} */
     924           3 :    if (ldv_3_pm_ops_dev_pm_ops->runtime_suspend) {
     925             :    /* LDV {"type": "CALLBACK", "call": "(ldv_3_pm_ops_dev_pm_ops->runtime_suspend)(ldv_3_device_device);", "comment": "runtime_suspend"} */
     926           2 :     ldv_pm_ops_scenario_runtime_suspend_3_22(ldv_3_pm_ops_dev_pm_ops->runtime_suspend, ldv_3_device_device);
     927             :    }
     928             :    /* LDV {"action": "RUNTIME_SUSPEND", "type": "CALL_END"} */
     929             : 
     930             :    /* LDV {"action": "RUNTIME_RESUME", "type": "CALL_BEGIN", "callback": true, "comment": "Put the device into the fully active state in response to a wakeup event generated by hardware or at the request of software. Invoke callback runtime_resume from PLATFORM."} */
     931           6 :    if (ldv_3_pm_ops_dev_pm_ops->runtime_resume) {
     932             :    /* LDV {"type": "CALLBACK", "call": "(ldv_3_pm_ops_dev_pm_ops->runtime_resume)(ldv_3_device_device);", "comment": "runtime_resume"} */
     933           4 :     ldv_pm_ops_scenario_runtime_resume_3_21(ldv_3_pm_ops_dev_pm_ops->runtime_resume, ldv_3_device_device);
     934             :    }
     935             :    /* LDV {"action": "RUNTIME_RESUME", "type": "CALL_END"} */
     936             : 
     937             :    /* LDV {"action": "DO", "type": "SUBPROCESS_BEGIN", "comment": "Begin a power management scenario."} */
     938             :    /* LDV {"action": "DO", "type": "SUBPROCESS_END"} */
     939             : 
     940             :    /* Jump to a subprocess 'do' initial state */
     941           3 :    goto ldv_do_3;
     942           1 :    break;
     943             :   }
     944           3 :   case 3: {
     945             :    /* LDV {"action": "PREPARE", "type": "CALL_BEGIN", "callback": true, "comment": "Prevent new children of the device from being registered. Invoke callback prepare from PLATFORM."} */
     946           3 :    if (ldv_3_pm_ops_dev_pm_ops->prepare) {
     947             :    /* LDV {"type": "CALLBACK", "call": "(ldv_3_pm_ops_dev_pm_ops->prepare)(ldv_3_device_device);", "comment": "prepare"} */
     948           2 :     ldv_pm_ops_scenario_prepare_3_19(ldv_3_pm_ops_dev_pm_ops->prepare, ldv_3_device_device);
     949             :    }
     950             :    /* LDV {"action": "PREPARE", "type": "CALL_END"} */
     951             : 
     952           4 :    switch (ldv_undef_int()) {
     953           3 :     case 1: {
     954             :      /* LDV {"action": "SUSPEND", "type": "CALL_BEGIN", "callback": true, "comment": "Quiesce subsystem-level device before suspend. Invoke callback suspend from PLATFORM."} */
     955           3 :      if (ldv_3_pm_ops_dev_pm_ops->suspend) {
     956             :      /* LDV {"type": "CALLBACK", "call": "(ldv_3_pm_ops_dev_pm_ops->suspend)(ldv_3_device_device);", "comment": "suspend"} */
     957           2 :       ldv_pm_ops_scenario_suspend_3_18(ldv_3_pm_ops_dev_pm_ops->suspend, ldv_3_device_device);
     958             :      }
     959             :      /* LDV {"action": "SUSPEND", "type": "CALL_END"} */
     960             : 
     961           6 :      if (ldv_undef_int()) {
     962             :       /* LDV {"action": "SUSPEND_NOIRQ", "type": "CALL_BEGIN", "callback": true, "comment": "Expect that the device will be in a low-power state. Invoke callback suspend_noirq from PLATFORM."} */
     963           3 :       if (ldv_3_pm_ops_dev_pm_ops->suspend_noirq) {
     964             :       /* LDV {"type": "CALLBACK", "call": "(ldv_3_pm_ops_dev_pm_ops->suspend_noirq)(ldv_3_device_device);", "comment": "suspend_noirq"} */
     965           2 :        ldv_pm_ops_scenario_suspend_noirq_3_17(ldv_3_pm_ops_dev_pm_ops->suspend_noirq, ldv_3_device_device);
     966             :       }
     967             :       /* LDV {"action": "SUSPEND_NOIRQ", "type": "CALL_END"} */
     968             : 
     969             :       /* LDV {"action": "RESUME_NOIRQ", "type": "CALL_BEGIN", "callback": true, "comment": "Prepare for the #resume() performing actions that might be racing with device's interrupt handler. Invoke callback resume_noirq from PLATFORM."} */
     970           6 :       if (ldv_3_pm_ops_dev_pm_ops->resume_noirq) {
     971             :       /* LDV {"type": "CALLBACK", "call": "(ldv_3_pm_ops_dev_pm_ops->resume_noirq)(ldv_3_device_device);", "comment": "resume_noirq"} */
     972           4 :        ldv_pm_ops_scenario_resume_noirq_3_16(ldv_3_pm_ops_dev_pm_ops->resume_noirq, ldv_3_device_device);
     973             :       }
     974             :       /* LDV {"action": "RESUME_NOIRQ", "type": "CALL_END"} */
     975             : 
     976             :      }
     977             :      else {
     978             :       /* LDV {"action": "SKIP_NOIRQ", "type": "CONDITION_BEGIN", "comment": "Skip noirq callbacks"} */
     979             :       /* LDV {"action": "SKIP_NOIRQ", "type": "CONDITION_END"} */
     980             : 
     981             :      }
     982             :      /* LDV {"action": "RESUME", "type": "CALL_BEGIN", "callback": true, "comment": "Make the device start working again after resume. Invoke callback resume from PLATFORM."} */
     983           9 :      if (ldv_3_pm_ops_dev_pm_ops->resume) {
     984             :      /* LDV {"type": "CALLBACK", "call": "(ldv_3_pm_ops_dev_pm_ops->resume)(ldv_3_device_device);", "comment": "resume"} */
     985           6 :       ldv_pm_ops_scenario_resume_3_14(ldv_3_pm_ops_dev_pm_ops->resume, ldv_3_device_device);
     986             :      }
     987             :      /* LDV {"action": "RESUME", "type": "CALL_END"} */
     988             : 
     989           4 :      break;
     990           1 :     }
     991           3 :     case 2: {
     992             :      /* LDV {"action": "FREEZE", "type": "CALL_BEGIN", "callback": true, "comment": "Prepare for creating a hibernation image. Invoke callback freeze from PLATFORM."} */
     993           3 :      if (ldv_3_pm_ops_dev_pm_ops->freeze) {
     994             :      /* LDV {"type": "CALLBACK", "call": "(ldv_3_pm_ops_dev_pm_ops->freeze)(ldv_3_device_device);", "comment": "freeze"} */
     995           2 :       ldv_pm_ops_scenario_freeze_3_13(ldv_3_pm_ops_dev_pm_ops->freeze, ldv_3_device_device);
     996             :      }
     997             :      /* LDV {"action": "FREEZE", "type": "CALL_END"} */
     998             : 
     999           6 :      if (ldv_undef_int()) {
    1000             :       /* LDV {"action": "SKIP_NOIRQ", "type": "CONDITION_BEGIN", "comment": "Skip noirq callbacks"} */
    1001             :       /* LDV {"action": "SKIP_NOIRQ", "type": "CONDITION_END"} */
    1002             : 
    1003             :      }
    1004             :      else {
    1005             :       /* LDV {"action": "FREEZE_NOIRQ", "type": "CALL_BEGIN", "callback": true, "comment": "Complete the actions started by #freeze() that might be racing with device's interrupt handler. Invoke callback freeze_noirq from PLATFORM."} */
    1006           3 :       if (ldv_3_pm_ops_dev_pm_ops->freeze_noirq) {
    1007             :       /* LDV {"type": "CALLBACK", "call": "(ldv_3_pm_ops_dev_pm_ops->freeze_noirq)(ldv_3_device_device);", "comment": "freeze_noirq"} */
    1008           2 :        ldv_pm_ops_scenario_freeze_noirq_3_11(ldv_3_pm_ops_dev_pm_ops->freeze_noirq, ldv_3_device_device);
    1009             :       }
    1010             :       /* LDV {"action": "FREEZE_NOIRQ", "type": "CALL_END"} */
    1011             : 
    1012             :       /* LDV {"action": "THAW_NOIRQ", "type": "CALL_BEGIN", "callback": true, "comment": "Prepare for the execution of #thaw() performing actions that might be racing with device's interrupt handler. Invoke callback thaw_noirq from PLATFORM."} */
    1013           6 :       if (ldv_3_pm_ops_dev_pm_ops->thaw_noirq) {
    1014             :       /* LDV {"type": "CALLBACK", "call": "(ldv_3_pm_ops_dev_pm_ops->thaw_noirq)(ldv_3_device_device);", "comment": "thaw_noirq"} */
    1015           4 :        ldv_pm_ops_scenario_thaw_noirq_3_10(ldv_3_pm_ops_dev_pm_ops->thaw_noirq, ldv_3_device_device);
    1016             :       }
    1017             :       /* LDV {"action": "THAW_NOIRQ", "type": "CALL_END"} */
    1018             : 
    1019             :      }
    1020             :      /* LDV {"action": "THAW", "type": "CALL_BEGIN", "callback": true, "comment": "The hibernation image has created or creation has failed. Invoke callback thaw from PLATFORM."} */
    1021           9 :      if (ldv_3_pm_ops_dev_pm_ops->thaw) {
    1022             :      /* LDV {"type": "CALLBACK", "call": "(ldv_3_pm_ops_dev_pm_ops->thaw)(ldv_3_device_device);", "comment": "thaw"} */
    1023           6 :       ldv_pm_ops_scenario_thaw_3_9(ldv_3_pm_ops_dev_pm_ops->thaw, ldv_3_device_device);
    1024             :      }
    1025             :      /* LDV {"action": "THAW", "type": "CALL_END"} */
    1026             : 
    1027           4 :      break;
    1028           1 :     }
    1029           3 :     case 3: {
    1030             :      /* LDV {"action": "POWEROFF", "type": "CALL_BEGIN", "callback": true, "comment": "Hibernation image has been created. Invoke callback poweroff from PLATFORM."} */
    1031           3 :      if (ldv_3_pm_ops_dev_pm_ops->poweroff) {
    1032             :      /* LDV {"type": "CALLBACK", "call": "(ldv_3_pm_ops_dev_pm_ops->poweroff)(ldv_3_device_device);", "comment": "poweroff"} */
    1033           2 :       ldv_pm_ops_scenario_poweroff_3_8(ldv_3_pm_ops_dev_pm_ops->poweroff, ldv_3_device_device);
    1034             :      }
    1035             :      /* LDV {"action": "POWEROFF", "type": "CALL_END"} */
    1036             : 
    1037           6 :      if (ldv_undef_int()) {
    1038             :       /* LDV {"action": "POWEROFF_NOIRQ", "type": "CALL_BEGIN", "callback": true, "comment": "Complete the actions started by #poweroff(). Invoke callback poweroff_noirq from PLATFORM."} */
    1039           3 :       if (ldv_3_pm_ops_dev_pm_ops->poweroff_noirq) {
    1040             :       /* LDV {"type": "CALLBACK", "call": "(ldv_3_pm_ops_dev_pm_ops->poweroff_noirq)(ldv_3_device_device);", "comment": "poweroff_noirq"} */
    1041           2 :        ldv_pm_ops_scenario_poweroff_noirq_3_7(ldv_3_pm_ops_dev_pm_ops->poweroff_noirq, ldv_3_device_device);
    1042             :       }
    1043             :       /* LDV {"action": "POWEROFF_NOIRQ", "type": "CALL_END"} */
    1044             : 
    1045             :       /* LDV {"action": "RESTORE_NOIRQ", "type": "CALL_BEGIN", "callback": true, "comment": "Prepare for the execution of #restore() performing actions that might be racing with device's interrupt handler. Invoke callback restore_noirq from PLATFORM."} */
    1046           6 :       if (ldv_3_pm_ops_dev_pm_ops->restore_noirq) {
    1047             :       /* LDV {"type": "CALLBACK", "call": "(ldv_3_pm_ops_dev_pm_ops->restore_noirq)(ldv_3_device_device);", "comment": "restore_noirq"} */
    1048           4 :        ldv_pm_ops_scenario_restore_noirq_3_6(ldv_3_pm_ops_dev_pm_ops->restore_noirq, ldv_3_device_device);
    1049             :       }
    1050             :       /* LDV {"action": "RESTORE_NOIRQ", "type": "CALL_END"} */
    1051             : 
    1052             :      }
    1053             :      else {
    1054             :       /* LDV {"action": "SKIP_NOIRQ", "type": "CONDITION_BEGIN", "comment": "Skip noirq callbacks"} */
    1055             :       /* LDV {"action": "SKIP_NOIRQ", "type": "CONDITION_END"} */
    1056             : 
    1057             :      }
    1058             :      /* LDV {"action": "RESTORE", "type": "CALL_BEGIN", "callback": true, "comment": "Restoration of the contents of main memory from a hibernation image has been done. Invoke callback restore from PLATFORM."} */
    1059           9 :      if (ldv_3_pm_ops_dev_pm_ops->restore) {
    1060             :      /* LDV {"type": "CALLBACK", "call": "(ldv_3_pm_ops_dev_pm_ops->restore)(ldv_3_device_device);", "comment": "restore"} */
    1061           6 :       ldv_pm_ops_scenario_restore_3_4(ldv_3_pm_ops_dev_pm_ops->restore, ldv_3_device_device);
    1062             :      }
    1063             :      /* LDV {"action": "RESTORE", "type": "CALL_END"} */
    1064             : 
    1065           4 :      break;
    1066           1 :     }
    1067           2 :     default: ldv_stop();
    1068           1 :    }
    1069           0 :    /* LDV {"action": "COMPLETE", "type": "CALL_BEGIN", "callback": true, "comment": "Undo the changes made by #prepare(). Invoke callback complete from PLATFORM."} */
    1070          36 :    if (ldv_3_pm_ops_dev_pm_ops->complete) {
    1071           0 :    /* LDV {"type": "CALLBACK", "call": "(ldv_3_pm_ops_dev_pm_ops->complete)(ldv_3_device_device);", "comment": "complete"} */
    1072          24 :     ldv_pm_ops_scenario_complete_3_3(ldv_3_pm_ops_dev_pm_ops->complete, ldv_3_device_device);
    1073             :    }
    1074             :    /* LDV {"action": "COMPLETE", "type": "CALL_END"} */
    1075             : 
    1076             :    /* LDV {"action": "DO", "type": "SUBPROCESS_BEGIN", "comment": "Begin a power management scenario."} */
    1077             :    /* LDV {"action": "DO", "type": "SUBPROCESS_END"} */
    1078             : 
    1079             :    /* Jump to a subprocess 'do' initial state */
    1080          13 :    goto ldv_do_3;
    1081           1 :    break;
    1082             :   }
    1083           3 :   case 4: {
    1084             :    /* LDV {"action": "PM_DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Do not expect power management scenarios."} */
    1085             :    /* Skip a non-replicative signal receiving */
    1086             :    /* LDV {"action": "PM_DEREGISTER", "type": "RECEIVE_END"} */
    1087             : 
    1088             :    /* Exit function at a terminal state */
    1089           1 :    return;
    1090           1 :    break;
    1091             :   }
    1092           2 :   default: ldv_stop();
    1093           1 :  }
    1094           0 :  /* End of the subprocess 'do' */
    1095           0 :  return;
    1096             :  /* LDV {"comment": "End of control function based on process 'pm_ops_scenario(platform)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_pm_ops_scenario_3"} */
    1097             : }
    1098             : 
    1099             : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_complete_3_3 */
    1100             : void ldv_pm_ops_scenario_complete_3_3(void (*arg0)(struct device *), struct device *arg1) {
    1101          12 :  (*arg0)(arg1);
    1102          12 : }
    1103             : 
    1104             : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_freeze_3_13 */
    1105             : void ldv_pm_ops_scenario_freeze_3_13(int (*arg0)(struct device *), struct device *arg1) {
    1106           1 :  (*arg0)(arg1);
    1107           1 : }
    1108             : 
    1109             : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_freeze_noirq_3_11 */
    1110             : void ldv_pm_ops_scenario_freeze_noirq_3_11(int (*arg0)(struct device *), struct device *arg1) {
    1111           1 :  (*arg0)(arg1);
    1112           1 : }
    1113             : 
    1114             : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_poweroff_3_8 */
    1115             : void ldv_pm_ops_scenario_poweroff_3_8(int (*arg0)(struct device *), struct device *arg1) {
    1116           1 :  (*arg0)(arg1);
    1117           1 : }
    1118             : 
    1119             : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_poweroff_noirq_3_7 */
    1120             : void ldv_pm_ops_scenario_poweroff_noirq_3_7(int (*arg0)(struct device *), struct device *arg1) {
    1121           1 :  (*arg0)(arg1);
    1122           1 : }
    1123             : 
    1124             : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_prepare_3_19 */
    1125             : void ldv_pm_ops_scenario_prepare_3_19(int (*arg0)(struct device *), struct device *arg1) {
    1126           1 :  (*arg0)(arg1);
    1127           1 : }
    1128             : 
    1129             : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_restore_3_4 */
    1130             : void ldv_pm_ops_scenario_restore_3_4(int (*arg0)(struct device *), struct device *arg1) {
    1131           3 :  (*arg0)(arg1);
    1132           3 : }
    1133             : 
    1134             : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_restore_noirq_3_6 */
    1135             : void ldv_pm_ops_scenario_restore_noirq_3_6(int (*arg0)(struct device *), struct device *arg1) {
    1136           2 :  (*arg0)(arg1);
    1137           2 : }
    1138             : 
    1139             : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_resume_3_14 */
    1140             : void ldv_pm_ops_scenario_resume_3_14(int (*arg0)(struct device *), struct device *arg1) {
    1141           3 :  (*arg0)(arg1);
    1142           3 : }
    1143             : 
    1144             : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_resume_noirq_3_16 */
    1145             : void ldv_pm_ops_scenario_resume_noirq_3_16(int (*arg0)(struct device *), struct device *arg1) {
    1146           2 :  (*arg0)(arg1);
    1147           2 : }
    1148             : 
    1149             : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_runtime_idle_3_24 */
    1150             : void ldv_pm_ops_scenario_runtime_idle_3_24(int (*arg0)(struct device *), struct device *arg1) {
    1151           1 :  (*arg0)(arg1);
    1152           1 : }
    1153             : 
    1154             : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_runtime_resume_3_21 */
    1155             : void ldv_pm_ops_scenario_runtime_resume_3_21(int (*arg0)(struct device *), struct device *arg1) {
    1156           2 :  (*arg0)(arg1);
    1157           2 : }
    1158             : 
    1159             : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_runtime_suspend_3_22 */
    1160             : void ldv_pm_ops_scenario_runtime_suspend_3_22(int (*arg0)(struct device *), struct device *arg1) {
    1161           1 :  (*arg0)(arg1);
    1162           1 : }
    1163             : 
    1164             : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_suspend_3_18 */
    1165             : void ldv_pm_ops_scenario_suspend_3_18(int (*arg0)(struct device *), struct device *arg1) {
    1166           1 :  (*arg0)(arg1);
    1167           1 : }
    1168             : 
    1169             : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_suspend_noirq_3_17 */
    1170             : void ldv_pm_ops_scenario_suspend_noirq_3_17(int (*arg0)(struct device *), struct device *arg1) {
    1171           1 :  (*arg0)(arg1);
    1172           1 : }
    1173             : 
    1174             : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_thaw_3_9 */
    1175             : void ldv_pm_ops_scenario_thaw_3_9(int (*arg0)(struct device *), struct device *arg1) {
    1176           3 :  (*arg0)(arg1);
    1177           3 : }
    1178             : 
    1179             : /* AUX_FUNC_CALLBACK ldv_pm_ops_scenario_thaw_noirq_3_10 */
    1180             : void ldv_pm_ops_scenario_thaw_noirq_3_10(int (*arg0)(struct device *), struct device *arg1) {
    1181           2 :  (*arg0)(arg1);
    1182           2 : }
    1183             : 
    1184             : /* AUX_FUNC ldv_random_containerless_scenario_5 */
    1185             : void ldv_random_containerless_scenario_5(void *arg0) {
    1186             :  /* LDV {"thread": 5, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'random_containerless_scenario(struct_kernel_param)'", "function": "ldv_random_containerless_scenario_5"} */
    1187           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
    1188           1 :  int (*ldv_5_callback_get)(char *, struct kernel_param *);
    1189           1 :  int (*ldv_5_callback_set)(char *, struct kernel_param *);
    1190           1 :  struct kernel_param *ldv_5_container_struct_kernel_param;
    1191           1 :  char *ldv_5_ldv_param_10_0_default;
    1192           1 :  char *ldv_5_ldv_param_4_0_default;
    1193           1 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
    1194           1 :  /* LDV {"action": "DEFAULT_REGISTER_13", "type": "RECEIVE_BEGIN", "comment": "Begin STRUCT_KERNEL_PARAM callbacks invocations scenario."} */
    1195           3 :  ldv_free(arg0);
    1196           1 :  /* LDV {"action": "DEFAULT_REGISTER_13", "type": "RECEIVE_END"} */
    1197             : 
    1198             :  /* LDV {"action": "DEFAULT_ALLOC_13", "type": "CONDITION_BEGIN", "comment": "Allocate memory after default registration."} */
    1199           3 :  ldv_5_container_struct_kernel_param = ldv_xmalloc_unknown_size(0);
    1200             :  /* LDV {"action": "DEFAULT_ALLOC_13", "type": "CONDITION_END"} */
    1201             : 
    1202             :  /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
    1203             :  /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
    1204             : 
    1205             :  /* Jump to a subprocess 'call' initial state */
    1206           1 :  goto ldv_call_5;
    1207             :  /* End of the process */
    1208             :  return;
    1209           1 : 
    1210             :  /* Sbprocess call */
    1211             :  ldv_call_5:
    1212             :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
    1213             : 
    1214           4 :  if (ldv_undef_int()) {
    1215             :   /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
    1216           3 :   ldv_5_ldv_param_4_0_default = ldv_xmalloc_unknown_size(0);
    1217             :   /* LDV {"action": "PRE_CALL_4", "type": "CONDITION_END"} */
    1218             : 
    1219           4 :   if (ldv_undef_int()) {
    1220             :    /* LDV {"action": "PRE_CALL_10", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
    1221           3 :    ldv_5_ldv_param_10_0_default = ldv_xmalloc_unknown_size(0);
    1222             :    /* LDV {"action": "PRE_CALL_10", "type": "CONDITION_END"} */
    1223             : 
    1224             :    /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback set from kernel_param."} */
    1225             :    /* LDV {"type": "CALLBACK", "call": "((& param_set_uint))(ldv_5_ldv_param_10_0_default, ldv_5_container_struct_kernel_param);", "comment": "callback"} */
    1226           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);
    1227             :    /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
    1228             : 
    1229             :    /* LDV {"action": "POST_CALL_10", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
    1230           2 :    ldv_free(ldv_5_ldv_param_10_0_default);
    1231             :    /* LDV {"action": "POST_CALL_10", "type": "CONDITION_END"} */
    1232             : 
    1233             :   }
    1234             :   else {
    1235             :    /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Call any random callback. Invoke callback get from kernel_param."} */
    1236             :    /* LDV {"type": "CALLBACK", "call": "((& param_get_uint))(ldv_5_ldv_param_4_0_default, ldv_5_container_struct_kernel_param);", "comment": "callback"} */
    1237           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);
    1238             :    /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
    1239             : 
    1240             :   }
    1241             :   /* LDV {"action": "POST_CALL_4", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
    1242           4 :   ldv_free(ldv_5_ldv_param_4_0_default);
    1243             :   /* LDV {"action": "POST_CALL_4", "type": "CONDITION_END"} */
    1244             : 
    1245             :   /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Prepare to call a random callback or deregister the callbacks."} */
    1246             :   /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
    1247             : 
    1248             :   /* Jump to a subprocess 'call' initial state */
    1249           1 :   goto ldv_call_5;
    1250             :  }
    1251             :  else {
    1252             :   /* LDV {"action": "DEFAULT_FREE_13", "type": "CONDITION_BEGIN", "comment": "Free memory before default deregistration."} */
    1253           2 :   ldv_free(ldv_5_container_struct_kernel_param);
    1254             :   /* LDV {"action": "DEFAULT_FREE_13", "type": "CONDITION_END"} */
    1255             : 
    1256             :   /* LDV {"action": "DEFAULT_DEREGISTER_13", "type": "RECEIVE_BEGIN", "comment": "Finish STRUCT_KERNEL_PARAM callbacks invocations scenario."} */
    1257             :   /* Skip a non-replicative signal receiving */
    1258             :   /* LDV {"action": "DEFAULT_DEREGISTER_13", "type": "RECEIVE_END"} */
    1259             : 
    1260             :   /* Exit function at a terminal state */
    1261           1 :   return;
    1262             :  }
    1263             :  /* End of the subprocess 'call' */
    1264             :  return;
    1265             :  /* 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"} */
    1266             : }
    1267             : 
    1268             : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_5_10 */
    1269             : void ldv_random_containerless_scenario_callback_5_10(int (*arg0)(char *, struct kernel_param *), char *arg1, struct kernel_param *arg2) {
    1270           1 :  ((& param_set_uint))(arg1, arg2);
    1271           1 : }
    1272             : 
    1273             : /* AUX_FUNC_CALLBACK ldv_random_containerless_scenario_callback_5_4 */
    1274             : void ldv_random_containerless_scenario_callback_5_4(int (*arg0)(char *, struct kernel_param *), char *arg1, struct kernel_param *arg2) {
    1275           1 :  ((& param_get_uint))(arg1, arg2);
    1276           1 : }
    1277             : 
    1278             : /* AUX_FUNC ldv_timer_scenario_6 */
    1279             : void ldv_timer_scenario_6(void *arg0) {
    1280             :  /* LDV {"thread": 6, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'timer_scenario(timer)'", "function": "ldv_timer_scenario_6"} */
    1281           4 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
    1282           4 :  struct timer_list *ldv_6_container_timer_list;
    1283             :  /* Received labels */
    1284           4 :  struct ldv_struct_timer_scenario_6 *data = (struct ldv_struct_timer_scenario_6*) arg0;
    1285             : 
    1286             :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
    1287             :  /* LDV {"action": "INSTANCE_REGISTER", "type": "RECEIVE_BEGIN", "comment": "Begin TIMER callbacks invocations scenario."} */
    1288             :  /* Assign recieved labels */
    1289           8 :  if (data) {
    1290           4 :   ldv_6_container_timer_list = data->arg0;
    1291           8 :   ldv_free(data);
    1292             :  }
    1293             :  /* LDV {"action": "INSTANCE_REGISTER", "type": "RECEIVE_END"} */
    1294             : 
    1295             :  /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Time has come: call the timer callback. Invoke callback callback from TIMER."} */
    1296             :  /* Callback pre-call */
    1297           8 :  ldv_switch_to_interrupt_context();
    1298          24 :  if (ldv_6_container_timer_list->function) {
    1299             :  /* LDV {"type": "CALLBACK", "call": "(ldv_6_container_timer_list->function)(ldv_6_container_timer_list->data);", "comment": "callback"} */
    1300          16 :   ldv_timer_scenario_callback_6_2(ldv_6_container_timer_list->function, ldv_6_container_timer_list->data);
    1301             :  }
    1302             :  /* Callback post-call */
    1303          12 :  ldv_switch_to_process_context();
    1304             :  /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
    1305             : 
    1306             :  /* LDV {"action": "INSTANCE_DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Finish TIMER callbacks invocations scenario."} */
    1307             :  /* Skip a non-replicative signal receiving */
    1308             :  /* LDV {"action": "INSTANCE_DEREGISTER", "type": "RECEIVE_END"} */
    1309             : 
    1310             :  /* Exit function at a terminal state */
    1311          12 :  return;
    1312             :  /* End of the process */
    1313             :  return;
    1314             :  /* LDV {"comment": "End of control function based on process 'timer_scenario(timer)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_timer_scenario_6"} */
    1315             : }
    1316             : 
    1317             : /* AUX_FUNC_CALLBACK ldv_timer_scenario_callback_6_2 */
    1318             : void ldv_timer_scenario_callback_6_2(void (*arg0)(unsigned long), unsigned long arg1) {
    1319          24 :  (*arg0)(arg1);
    1320           8 : }
    1321             : 
    1322             : /* AUX_FUNC ldv_uart_instance_4 */
    1323             : void ldv_uart_instance_4(void *arg0) {
    1324             :  /* LDV {"thread": 4, "type": "CONTROL_FUNCTION_BEGIN", "comment": "Control function 'uart_instance(serial_core)'", "function": "ldv_uart_instance_4"} */
    1325           2 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_BEGIN", "comment": "Declare auxiliary variables."} */
    1326           2 :  void (*ldv_4_callback_break_ctl)(struct uart_port *, int);
    1327           2 :  void (*ldv_4_callback_config_port)(struct uart_port *, int);
    1328           2 :  void (*ldv_4_callback_enable_ms)(struct uart_port *);
    1329           2 :  void (*ldv_4_callback_release_port)(struct uart_port *);
    1330           2 :  int (*ldv_4_callback_request_port)(struct uart_port *);
    1331           2 :  unsigned int (*ldv_4_callback_tx_empty)(struct uart_port *);
    1332           2 :  char *(*ldv_4_callback_type)(struct uart_port *);
    1333           2 :  char ldv_4_ldv_param_11_1_default;
    1334           2 :  char ldv_4_ldv_param_13_1_default;
    1335           2 :  unsigned int ldv_4_ldv_param_14_1_default;
    1336           2 :  struct ktermios *ldv_4_ldv_param_15_1_default;
    1337           2 :  struct ktermios *ldv_4_ldv_param_15_2_default;
    1338           2 :  int ldv_4_ldv_param_16_1_default;
    1339           2 :  unsigned int ldv_4_ldv_param_25_1_default;
    1340           2 :  struct ktermios *ldv_4_ldv_param_31_1_default;
    1341           2 :  struct ktermios *ldv_4_ldv_param_31_2_default;
    1342           2 :  struct serial_struct *ldv_4_ldv_param_34_1_default;
    1343           2 :  int ldv_4_ldv_param_52_1_default;
    1344           2 :  unsigned int ldv_4_ldv_param_5_1_default;
    1345           2 :  unsigned int ldv_4_oldstate_oldstate;
    1346           2 :  int ldv_4_ret_default;
    1347           2 :  unsigned int ldv_4_state_state;
    1348           2 :  struct uart_port *ldv_4_uart_port_uart_port;
    1349           2 :  unsigned int ldv_4_uret_default;
    1350           2 :  /* Received labels */
    1351           4 :  struct ldv_struct_uart_instance_4 *data = (struct ldv_struct_uart_instance_4*) arg0;
    1352           2 : 
    1353           2 :  /* LDV {"type": "CONTROL_FUNCTION_INIT_END", "comment": "Declare auxiliary variables."} */
    1354           2 :  /* Initialize automaton variables */
    1355           4 :  ldv_4_ret_default = 1;
    1356           4 :  ldv_4_uret_default = 1;
    1357           2 :  /* LDV {"action": "REGISTER", "type": "RECEIVE_BEGIN", "comment": "Begin SERIAL_CORE callbacks invocations scenario."} */
    1358           2 :  /* Assign recieved labels */
    1359           6 :  if (data) {
    1360           4 :   ldv_4_uart_port_uart_port = data->arg0;
    1361           4 :   ldv_free(data);
    1362             :  }
    1363             :  /* LDV {"action": "REGISTER", "type": "RECEIVE_END"} */
    1364             : 
    1365             :  /* LDV {"action": "INIT_STATE", "type": "CONDITION_BEGIN", "comment": "Initialize UART PM state."} */
    1366           4 :  ldv_4_oldstate_oldstate = 4U;
    1367             :  /* LDV {"action": "INIT_STATE", "type": "CONDITION_END"} */
    1368             : 
    1369             :  /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Start initialization."} */
    1370             :  /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
    1371             : 
    1372             :  /* Jump to a subprocess 'main' initial state */
    1373           4 :  goto ldv_main_4;
    1374             :  /* End of the process */
    1375             :  return;
    1376           2 : 
    1377             :  /* Sbprocess main */
    1378             :  ldv_main_4:
    1379             :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
    1380             : 
    1381           8 :  if (ldv_undef_int()) {
    1382             :   /* LDV {"action": "SET_STATE_ON", "type": "CONDITION_BEGIN", "comment": "Set UART PM state on."} */
    1383           2 :   ldv_4_state_state = 0U;
    1384             :   /* LDV {"action": "SET_STATE_ON", "type": "CONDITION_END"} */
    1385             : 
    1386             :   /* LDV {"action": "PM_ON", "type": "CALL_BEGIN", "callback": true, "comment": "Set UART_PM_STATE_ON state. Invoke callback pm from uart_ops."} */
    1387             :   /* LDV {"type": "CALLBACK", "call": "((& serial8250_pm))(ldv_4_uart_port_uart_port, ldv_4_state_state, ldv_4_oldstate_oldstate);", "comment": "pm_on"} */
    1388           4 :   ldv_uart_instance_pm_on_4_35(ldv_4_uart_port_uart_port->ops->pm, ldv_4_uart_port_uart_port, ldv_4_state_state, ldv_4_oldstate_oldstate);
    1389             :   /* LDV {"action": "PM_ON", "type": "CALL_END"} */
    1390             : 
    1391             :   /* LDV {"action": "PRE_CALL_34", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
    1392           6 :   ldv_4_ldv_param_34_1_default = ldv_xmalloc_unknown_size(0);
    1393             :   /* LDV {"action": "PRE_CALL_34", "type": "CONDITION_END"} */
    1394             : 
    1395             :   /* LDV {"action": "VERIFY_PORT", "type": "CALL_BEGIN", "callback": true, "comment": "Verify the new serial port information contained within serinfo is suitable for this port type. Invoke callback verify_port from uart_ops."} */
    1396             :   /* LDV {"type": "CALLBACK", "call": "((& serial8250_verify_port))(ldv_4_uart_port_uart_port, ldv_4_ldv_param_34_1_default);", "comment": "verify_port"} */
    1397           4 :   ldv_uart_instance_verify_port_4_34(ldv_4_uart_port_uart_port->ops->verify_port, ldv_4_uart_port_uart_port, ldv_4_ldv_param_34_1_default);
    1398             :   /* LDV {"action": "VERIFY_PORT", "type": "CALL_END"} */
    1399             : 
    1400             :   /* LDV {"action": "POST_CALL_34", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
    1401           4 :   ldv_free(ldv_4_ldv_param_34_1_default);
    1402             :   /* LDV {"action": "POST_CALL_34", "type": "CONDITION_END"} */
    1403             : 
    1404             :   /* LDV {"action": "STARTUP", "type": "CALL_BEGIN", "callback": true, "comment": "Grab any interrupt resources and initialise any low level driver state. Invoke callback startup from uart_ops."} */
    1405             :   /* LDV {"type": "CALLBACK", "call": "ldv_4_ret_default = ((& serial8250_startup))(ldv_4_uart_port_uart_port);", "comment": "startup"} */
    1406           4 :   ldv_4_ret_default = ldv_uart_instance_startup_4_33(ldv_4_uart_port_uart_port->ops->startup, ldv_4_uart_port_uart_port);
    1407             :   /* Callback post-call */
    1408           4 :   ldv_4_ret_default = ldv_filter_err_code(ldv_4_ret_default);
    1409             :   /* LDV {"action": "STARTUP", "type": "CALL_END"} */
    1410             : 
    1411           8 :   if (ldv_undef_int()) {
    1412             :    /* LDV {"action": "N_RET", "type": "CONDITION_BEGIN", "comment": "Failed to initialise any low level driver state."} */
    1413           4 :    ldv_assume(ldv_4_ret_default != 0);
    1414             :    /* LDV {"action": "N_RET", "type": "CONDITION_END"} */
    1415             : 
    1416             :    /* LDV {"action": "STOP_RX", "type": "CALL_BEGIN", "callback": true, "comment": "Stop receiving characters. Invoke callback stop_rx from uart_ops."} */
    1417             :    /* LDV {"type": "CALLBACK", "call": "((& serial8250_stop_rx))(ldv_4_uart_port_uart_port);", "comment": "stop_rx"} */
    1418           4 :    ldv_uart_instance_stop_rx_4_22(ldv_4_uart_port_uart_port->ops->stop_rx, ldv_4_uart_port_uart_port);
    1419             :    /* LDV {"action": "STOP_RX", "type": "CALL_END"} */
    1420             : 
    1421             :    /* LDV {"action": "SHUTDOWN", "type": "CALL_BEGIN", "callback": true, "comment": "Disable the port. Invoke callback shutdown from uart_ops."} */
    1422             :    /* LDV {"type": "CALLBACK", "call": "((& serial8250_shutdown))(ldv_4_uart_port_uart_port);", "comment": "shutdown"} */
    1423           4 :    ldv_uart_instance_shutdown_4_21(ldv_4_uart_port_uart_port->ops->shutdown, ldv_4_uart_port_uart_port);
    1424             :    /* LDV {"action": "SHUTDOWN", "type": "CALL_END"} */
    1425             : 
    1426             :    /* LDV {"action": "SET_STATE_OFF", "type": "CONDITION_BEGIN", "comment": "Set UART PM state off."} */
    1427           2 :    ldv_4_state_state = 3U;
    1428             :    /* LDV {"action": "SET_STATE_OFF", "type": "CONDITION_END"} */
    1429             : 
    1430             :    /* LDV {"action": "PM_OFF", "type": "CALL_BEGIN", "callback": true, "comment": "Set UART_PM_STATE_OFF state. Invoke callback pm from uart_ops."} */
    1431             :    /* LDV {"type": "CALLBACK", "call": "((& serial8250_pm))(ldv_4_uart_port_uart_port, ldv_4_state_state, ldv_4_oldstate_oldstate);", "comment": "pm_off"} */
    1432           4 :    ldv_uart_instance_pm_off_4_19(ldv_4_uart_port_uart_port->ops->pm, ldv_4_uart_port_uart_port, ldv_4_state_state, ldv_4_oldstate_oldstate);
    1433             :    /* LDV {"action": "PM_OFF", "type": "CALL_END"} */
    1434             : 
    1435             :    /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Start initialization."} */
    1436             :    /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
    1437             : 
    1438             :    /* Jump to a subprocess 'main' initial state */
    1439           2 :    goto ldv_main_4;
    1440             :   }
    1441             :   else {
    1442             :    /* LDV {"action": "Y_RET", "type": "CONDITION_BEGIN", "comment": "Successfully initialised any low level driver state."} */
    1443           4 :    ldv_assume(ldv_4_ret_default == 0);
    1444             :    /* LDV {"action": "Y_RET", "type": "CONDITION_END"} */
    1445             : 
    1446             :    /* LDV {"action": "PRE_CALL_31", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
    1447           6 :    ldv_4_ldv_param_31_1_default = ldv_xmalloc_unknown_size(0);
    1448           6 :    ldv_4_ldv_param_31_2_default = ldv_xmalloc_unknown_size(0);
    1449             :    /* LDV {"action": "PRE_CALL_31", "type": "CONDITION_END"} */
    1450             : 
    1451             :    /* LDV {"action": "SET_TERMIOS", "type": "CALL_BEGIN", "callback": true, "comment": "Change the port parameters, including word length, parity, stop bits. Invoke callback set_termios from uart_ops."} */
    1452             :    /* LDV {"type": "CALLBACK", "call": "((& serial8250_set_termios))(ldv_4_uart_port_uart_port, ldv_4_ldv_param_31_1_default, ldv_4_ldv_param_31_2_default);", "comment": "set_termios"} */
    1453           4 :    ldv_uart_instance_set_termios_4_31(ldv_4_uart_port_uart_port->ops->set_termios, ldv_4_uart_port_uart_port, ldv_4_ldv_param_31_1_default, ldv_4_ldv_param_31_2_default);
    1454             :    /* LDV {"action": "SET_TERMIOS", "type": "CALL_END"} */
    1455             : 
    1456             :    /* LDV {"action": "POST_CALL_31", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
    1457           4 :    ldv_free(ldv_4_ldv_param_31_1_default);
    1458           4 :    ldv_free(ldv_4_ldv_param_31_2_default);
    1459             :    /* LDV {"action": "POST_CALL_31", "type": "CONDITION_END"} */
    1460             : 
    1461             :    /* LDV {"action": "GET_MCTRL", "type": "CALL_BEGIN", "callback": true, "comment": "Returns the current state of modem control inputs. Invoke callback get_mctrl from uart_ops."} */
    1462             :    /* LDV {"type": "CALLBACK", "call": "ldv_4_uret_default = ((& serial8250_get_mctrl))(ldv_4_uart_port_uart_port);", "comment": "get_mctrl"} */
    1463           4 :    ldv_4_uret_default = ldv_uart_instance_get_mctrl_4_30(ldv_4_uart_port_uart_port->ops->get_mctrl, ldv_4_uart_port_uart_port);
    1464             :    /* Callback post-call */
    1465           6 :    ldv_4_uret_default = ldv_filter_err_code(ldv_4_uret_default);
    1466             :    /* LDV {"action": "GET_MCTRL", "type": "CALL_END"} */
    1467             : 
    1468           8 :    if (ldv_undef_int()) {
    1469             :     /* LDV {"action": "Y_URET", "type": "CONDITION_BEGIN", "comment": "Ready to start transmitting characters."} */
    1470           4 :     ldv_assume(ldv_4_uret_default == 0);
    1471             :     /* LDV {"action": "Y_URET", "type": "CONDITION_END"} */
    1472             : 
    1473             :     /* LDV {"action": "STOP_TX", "type": "CALL_BEGIN", "callback": true, "comment": "Stop transmitting characters. Invoke callback stop_tx from uart_ops."} */
    1474             :     /* LDV {"type": "CALLBACK", "call": "((& serial8250_stop_tx))(ldv_4_uart_port_uart_port);", "comment": "stop_tx"} */
    1475           4 :     ldv_uart_instance_stop_tx_4_28(ldv_4_uart_port_uart_port->ops->stop_tx, ldv_4_uart_port_uart_port);
    1476             :     /* LDV {"action": "STOP_TX", "type": "CALL_END"} */
    1477             : 
    1478             :    }
    1479             :    else {
    1480             :     /* LDV {"action": "N_URET", "type": "CONDITION_BEGIN", "comment": "The port is in the process of being closed."} */
    1481           4 :     ldv_assume(ldv_4_uret_default != 0);
    1482             :     /* LDV {"action": "N_URET", "type": "CONDITION_END"} */
    1483             : 
    1484             :     /* LDV {"action": "START_TX", "type": "CALL_BEGIN", "callback": true, "comment": "Start transmitting characters. Invoke callback start_tx from uart_ops."} */
    1485             :     /* LDV {"type": "CALLBACK", "call": "((& serial8250_start_tx))(ldv_4_uart_port_uart_port);", "comment": "start_tx"} */
    1486           4 :     ldv_uart_instance_start_tx_4_26(ldv_4_uart_port_uart_port->ops->start_tx, ldv_4_uart_port_uart_port);
    1487             :     /* LDV {"action": "START_TX", "type": "CALL_END"} */
    1488             : 
    1489             :    }
    1490             :   }
    1491             :   /* LDV {"action": "PRE_CALL_25", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
    1492             :   /* LDV {"action": "PRE_CALL_25", "type": "CONDITION_END"} */
    1493             : 
    1494             :   /* LDV {"action": "SET_MCTRL", "type": "CALL_BEGIN", "callback": true, "comment": "Set the modem control lines for port described by 'port' to the state described by mctrl. Invoke callback set_mctrl from uart_ops."} */
    1495             :   /* LDV {"type": "CALLBACK", "call": "((& serial8250_set_mctrl))(ldv_4_uart_port_uart_port, ldv_4_ldv_param_25_1_default);", "comment": "set_mctrl"} */
    1496           8 :   ldv_uart_instance_set_mctrl_4_25(ldv_4_uart_port_uart_port->ops->set_mctrl, ldv_4_uart_port_uart_port, ldv_4_ldv_param_25_1_default);
    1497             :   /* LDV {"action": "SET_MCTRL", "type": "CALL_END"} */
    1498             : 
    1499             :   /* LDV {"action": "POST_CALL_25", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
    1500             :   /* LDV {"action": "POST_CALL_25", "type": "CONDITION_END"} */
    1501             : 
    1502             :   /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Call rest TTY callbacks."} */
    1503             :   /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
    1504             : 
    1505             :   /* Jump to a subprocess 'call' initial state */
    1506           2 :   goto ldv_call_4;
    1507             :  }
    1508             :  else {
    1509             :   /* LDV {"action": "DEREGISTER", "type": "RECEIVE_BEGIN", "comment": "Finish SERIAL_CORE callbacks invocations scenario."} */
    1510             :   /* Skip a non-replicative signal receiving */
    1511             :   /* LDV {"action": "DEREGISTER", "type": "RECEIVE_END"} */
    1512             : 
    1513             :   /* Exit function at a terminal state */
    1514           2 :   return;
    1515             :  }
    1516             :  /* End of the subprocess 'main' */
    1517             :  return;
    1518           2 : 
    1519             :  /* Sbprocess call */
    1520             :  ldv_call_4:
    1521             :  /* LDV {"action": null, "type": "ARTIFICIAL", "comment": "Artificial state in scenario"} */
    1522             : 
    1523           4 :  switch (ldv_undef_int()) {
    1524           6 :   case 1: {
    1525             :    /* LDV {"action": "PRE_CALL_15", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
    1526           6 :    ldv_4_ldv_param_15_1_default = ldv_xmalloc_unknown_size(0);
    1527           6 :    ldv_4_ldv_param_15_2_default = ldv_xmalloc_unknown_size(0);
    1528             :    /* LDV {"action": "PRE_CALL_15", "type": "CONDITION_END"} */
    1529             : 
    1530             :    /* LDV {"action": "SET_TERMIOS", "type": "CALL_BEGIN", "callback": true, "comment": "Change the port parameters, including word length, parity, stop bits. Invoke callback set_termios from uart_ops."} */
    1531             :    /* LDV {"type": "CALLBACK", "call": "((& serial8250_set_termios))(ldv_4_uart_port_uart_port, ldv_4_ldv_param_15_1_default, ldv_4_ldv_param_15_2_default);", "comment": "set_termios"} */
    1532           4 :    ldv_uart_instance_set_termios_4_15(ldv_4_uart_port_uart_port->ops->set_termios, ldv_4_uart_port_uart_port, ldv_4_ldv_param_15_1_default, ldv_4_ldv_param_15_2_default);
    1533             :    /* LDV {"action": "SET_TERMIOS", "type": "CALL_END"} */
    1534             : 
    1535             :    /* LDV {"action": "POST_CALL_15", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
    1536           4 :    ldv_free(ldv_4_ldv_param_15_1_default);
    1537           4 :    ldv_free(ldv_4_ldv_param_15_2_default);
    1538             :    /* LDV {"action": "POST_CALL_15", "type": "CONDITION_END"} */
    1539             : 
    1540             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Call rest TTY callbacks."} */
    1541             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
    1542             : 
    1543             :    /* Jump to a subprocess 'call' initial state */
    1544           2 :    goto ldv_call_4;
    1545           2 :    break;
    1546             :   }
    1547           6 :   case 2: {
    1548             :    /* LDV {"action": "PRE_CALL_14", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
    1549             :    /* LDV {"action": "PRE_CALL_14", "type": "CONDITION_END"} */
    1550             : 
    1551             :    /* LDV {"action": "SET_MCTRL", "type": "CALL_BEGIN", "callback": true, "comment": "Set the modem control lines for port described by 'port' to the state described by mctrl. Invoke callback set_mctrl from uart_ops."} */
    1552             :    /* LDV {"type": "CALLBACK", "call": "((& serial8250_set_mctrl))(ldv_4_uart_port_uart_port, ldv_4_ldv_param_14_1_default);", "comment": "set_mctrl"} */
    1553           4 :    ldv_uart_instance_set_mctrl_4_14(ldv_4_uart_port_uart_port->ops->set_mctrl, ldv_4_uart_port_uart_port, ldv_4_ldv_param_14_1_default);
    1554             :    /* LDV {"action": "SET_MCTRL", "type": "CALL_END"} */
    1555             : 
    1556             :    /* LDV {"action": "POST_CALL_14", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
    1557             :    /* LDV {"action": "POST_CALL_14", "type": "CONDITION_END"} */
    1558             : 
    1559             :    /* LDV {"action": "PRE_CALL_13", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
    1560             :    /* LDV {"action": "PRE_CALL_13", "type": "CONDITION_END"} */
    1561             : 
    1562             :    /* LDV {"action": "SEND_XCHAR", "type": "CALL_BEGIN", "callback": true, "comment": "Transmit a high priority character. Invoke callback send_xchar from SERIAL_CORE."} */
    1563           6 :    if (ldv_4_uart_port_uart_port->ops->send_xchar) {
    1564             :    /* LDV {"type": "CALLBACK", "call": "(ldv_4_uart_port_uart_port->ops->send_xchar)(ldv_4_uart_port_uart_port, ldv_4_ldv_param_13_1_default);", "comment": "send_xchar"} */
    1565           4 :     ldv_uart_instance_send_xchar_4_13(ldv_4_uart_port_uart_port->ops->send_xchar, ldv_4_uart_port_uart_port, ldv_4_ldv_param_13_1_default);
    1566             :    }
    1567             :    /* LDV {"action": "SEND_XCHAR", "type": "CALL_END"} */
    1568             : 
    1569             :    /* LDV {"action": "POST_CALL_13", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
    1570             :    /* LDV {"action": "POST_CALL_13", "type": "CONDITION_END"} */
    1571             : 
    1572             :    /* LDV {"action": "START_TX_IF", "type": "CALL_BEGIN", "callback": true, "comment": "Transmit a high priority character. Invoke callback start_tx from uart_ops."} */
    1573             :    /* LDV {"type": "CALLBACK", "call": "((& serial8250_start_tx))(ldv_4_uart_port_uart_port);", "comment": "start_tx_if"} */
    1574           8 :    ldv_uart_instance_start_tx_if_4_12(ldv_4_uart_port_uart_port->ops->start_tx, ldv_4_uart_port_uart_port);
    1575             :    /* LDV {"action": "START_TX_IF", "type": "CALL_END"} */
    1576             : 
    1577             :    /* LDV {"action": "PRE_CALL_11", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
    1578             :    /* LDV {"action": "PRE_CALL_11", "type": "CONDITION_END"} */
    1579             : 
    1580             :    /* LDV {"action": "SEND_XCHAR", "type": "CALL_BEGIN", "callback": true, "comment": "Transmit a high priority character. Invoke callback send_xchar from SERIAL_CORE."} */
    1581           6 :    if (ldv_4_uart_port_uart_port->ops->send_xchar) {
    1582             :    /* LDV {"type": "CALLBACK", "call": "(ldv_4_uart_port_uart_port->ops->send_xchar)(ldv_4_uart_port_uart_port, ldv_4_ldv_param_11_1_default);", "comment": "send_xchar"} */
    1583           4 :     ldv_uart_instance_send_xchar_4_11(ldv_4_uart_port_uart_port->ops->send_xchar, ldv_4_uart_port_uart_port, ldv_4_ldv_param_11_1_default);
    1584             :    }
    1585             :    /* LDV {"action": "SEND_XCHAR", "type": "CALL_END"} */
    1586             : 
    1587             :    /* LDV {"action": "POST_CALL_11", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
    1588             :    /* LDV {"action": "POST_CALL_11", "type": "CONDITION_END"} */
    1589             : 
    1590             :    /* LDV {"action": "START_TX_IF", "type": "CALL_BEGIN", "callback": true, "comment": "Transmit a high priority character. Invoke callback start_tx from uart_ops."} */
    1591             :    /* LDV {"type": "CALLBACK", "call": "((& serial8250_start_tx))(ldv_4_uart_port_uart_port);", "comment": "start_tx_if"} */
    1592           8 :    ldv_uart_instance_start_tx_if_4_10(ldv_4_uart_port_uart_port->ops->start_tx, ldv_4_uart_port_uart_port);
    1593             :    /* LDV {"action": "START_TX_IF", "type": "CALL_END"} */
    1594             : 
    1595             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Call rest TTY callbacks."} */
    1596             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
    1597             : 
    1598             :    /* Jump to a subprocess 'call' initial state */
    1599           2 :    goto ldv_call_4;
    1600             :    /* Jump to a subprocess 'call' initial state */
    1601             :    goto ldv_call_4;
    1602           2 :    break;
    1603             :   }
    1604           6 :   case 3: {
    1605             :    /* LDV {"action": "START_TX", "type": "CALL_BEGIN", "callback": true, "comment": "Start transmitting characters. Invoke callback start_tx from uart_ops."} */
    1606             :    /* LDV {"type": "CALLBACK", "call": "((& serial8250_start_tx))(ldv_4_uart_port_uart_port);", "comment": "start_tx"} */
    1607           4 :    ldv_uart_instance_start_tx_4_9(ldv_4_uart_port_uart_port->ops->start_tx, ldv_4_uart_port_uart_port);
    1608             :    /* LDV {"action": "START_TX", "type": "CALL_END"} */
    1609             : 
    1610             :    /* LDV {"action": "STOP_TX", "type": "CALL_BEGIN", "callback": true, "comment": "Stop transmitting characters. Invoke callback stop_tx from uart_ops."} */
    1611             :    /* LDV {"type": "CALLBACK", "call": "((& serial8250_stop_tx))(ldv_4_uart_port_uart_port);", "comment": "stop_tx"} */
    1612           4 :    ldv_uart_instance_stop_tx_4_8(ldv_4_uart_port_uart_port->ops->stop_tx, ldv_4_uart_port_uart_port);
    1613             :    /* LDV {"action": "STOP_TX", "type": "CALL_END"} */
    1614             : 
    1615             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Call rest TTY callbacks."} */
    1616             :    /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
    1617             : 
    1618             :    /* Jump to a subprocess 'call' initial state */
    1619           2 :    goto ldv_call_4;
    1620             :    /* Jump to a subprocess 'call' initial state */
    1621             :    goto ldv_call_4;
    1622             :    /* Jump to a subprocess 'call' initial state */
    1623             :    goto ldv_call_4;
    1624           2 :    break;
    1625             :   }
    1626           6 :   case 4: {
    1627             :    /* LDV {"action": "STOP_RX", "type": "CALL_BEGIN", "callback": true, "comment": "Stop receiving characters. Invoke callback stop_rx from uart_ops."} */
    1628             :    /* LDV {"type": "CALLBACK", "call": "((& serial8250_stop_rx))(ldv_4_uart_port_uart_port);", "comment": "stop_rx"} */
    1629           4 :    ldv_uart_instance_stop_rx_4_6(ldv_4_uart_port_uart_port->ops->stop_rx, ldv_4_uart_port_uart_port);
    1630             :    /* LDV {"action": "STOP_RX", "type": "CALL_END"} */
    1631             : 
    1632             :    /* LDV {"action": "PRE_CALL_5", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
    1633             :    /* LDV {"action": "PRE_CALL_5", "type": "CONDITION_END"} */
    1634             : 
    1635             :    /* LDV {"action": "SET_MCTRL", "type": "CALL_BEGIN", "callback": true, "comment": "Set the modem control lines for port described by 'port' to the state described by mctrl. Invoke callback set_mctrl from uart_ops."} */
    1636             :    /* LDV {"type": "CALLBACK", "call": "((& serial8250_set_mctrl))(ldv_4_uart_port_uart_port, ldv_4_ldv_param_5_1_default);", "comment": "set_mctrl"} */
    1637           4 :    ldv_uart_instance_set_mctrl_4_5(ldv_4_uart_port_uart_port->ops->set_mctrl, ldv_4_uart_port_uart_port, ldv_4_ldv_param_5_1_default);
    1638             :    /* LDV {"action": "SET_MCTRL", "type": "CALL_END"} */
    1639             : 
    1640             :    /* LDV {"action": "POST_CALL_5", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
    1641             :    /* LDV {"action": "POST_CALL_5", "type": "CONDITION_END"} */
    1642             : 
    1643             :    /* LDV {"action": "SHUTDOWN", "type": "CALL_BEGIN", "callback": true, "comment": "Disable the port. Invoke callback shutdown from uart_ops."} */
    1644             :    /* LDV {"type": "CALLBACK", "call": "((& serial8250_shutdown))(ldv_4_uart_port_uart_port);", "comment": "shutdown"} */
    1645           4 :    ldv_uart_instance_shutdown_4_4(ldv_4_uart_port_uart_port->ops->shutdown, ldv_4_uart_port_uart_port);
    1646             :    /* LDV {"action": "SHUTDOWN", "type": "CALL_END"} */
    1647             : 
    1648             :    /* LDV {"action": "SET_STATE_OFF", "type": "CONDITION_BEGIN", "comment": "Set UART PM state off."} */
    1649           2 :    ldv_4_state_state = 3U;
    1650             :    /* LDV {"action": "SET_STATE_OFF", "type": "CONDITION_END"} */
    1651             : 
    1652             :    /* LDV {"action": "PM_OFF", "type": "CALL_BEGIN", "callback": true, "comment": "Set UART_PM_STATE_OFF state. Invoke callback pm from uart_ops."} */
    1653             :    /* LDV {"type": "CALLBACK", "call": "((& serial8250_pm))(ldv_4_uart_port_uart_port, ldv_4_state_state, ldv_4_oldstate_oldstate);", "comment": "pm_off"} */
    1654           4 :    ldv_uart_instance_pm_off_4_2(ldv_4_uart_port_uart_port->ops->pm, ldv_4_uart_port_uart_port, ldv_4_state_state, ldv_4_oldstate_oldstate);
    1655             :    /* LDV {"action": "PM_OFF", "type": "CALL_END"} */
    1656             : 
    1657             :    /* LDV {"action": "MAIN", "type": "SUBPROCESS_BEGIN", "comment": "Start initialization."} */
    1658             :    /* LDV {"action": "MAIN", "type": "SUBPROCESS_END"} */
    1659             : 
    1660             :    /* Jump to a subprocess 'main' initial state */
    1661           2 :    goto ldv_main_4;
    1662           2 :    break;
    1663             :   }
    1664           6 :   case 5: {
    1665             :    /* LDV {"action": "PRE_CALL_16", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
    1666             :    /* LDV {"action": "PRE_CALL_16", "type": "CONDITION_END"} */
    1667             : 
    1668           4 :    switch (ldv_undef_int()) {
    1669           6 :     case 1: {
    1670             :      /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback type from uart_ops."} */
    1671             :      /* LDV {"type": "CALLBACK", "call": "((& serial8250_type))(ldv_4_uart_port_uart_port);", "comment": "callback"} */
    1672           4 :      ldv_uart_instance_callback_4_59(ldv_4_callback_type, ldv_4_uart_port_uart_port);
    1673             :      /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
    1674             : 
    1675           2 :      break;
    1676           2 :     }
    1677           6 :     case 2: {
    1678             :      /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback tx_empty from uart_ops."} */
    1679             :      /* LDV {"type": "CALLBACK", "call": "((& serial8250_tx_empty))(ldv_4_uart_port_uart_port);", "comment": "callback"} */
    1680           4 :      ldv_uart_instance_callback_4_58(ldv_4_callback_tx_empty, ldv_4_uart_port_uart_port);
    1681             :      /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
    1682             : 
    1683           2 :      break;
    1684           2 :     }
    1685           6 :     case 3: {
    1686             :      /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback request_port from uart_ops."} */
    1687             :      /* LDV {"type": "CALLBACK", "call": "((& serial8250_request_port))(ldv_4_uart_port_uart_port);", "comment": "callback"} */
    1688           4 :      ldv_uart_instance_callback_4_57(ldv_4_callback_request_port, ldv_4_uart_port_uart_port);
    1689             :      /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
    1690             : 
    1691           2 :      break;
    1692           2 :     }
    1693           6 :     case 4: {
    1694             :      /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback release_port from uart_ops."} */
    1695             :      /* LDV {"type": "CALLBACK", "call": "((& serial8250_release_port))(ldv_4_uart_port_uart_port);", "comment": "callback"} */
    1696           4 :      ldv_uart_instance_callback_4_56(ldv_4_callback_release_port, ldv_4_uart_port_uart_port);
    1697             :      /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
    1698             : 
    1699           2 :      break;
    1700           2 :     }
    1701           6 :     case 5: {
    1702             :      /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback enable_ms from uart_ops."} */
    1703             :      /* LDV {"type": "CALLBACK", "call": "((& serial8250_enable_ms))(ldv_4_uart_port_uart_port);", "comment": "callback"} */
    1704           4 :      ldv_uart_instance_callback_4_55(ldv_4_callback_enable_ms, ldv_4_uart_port_uart_port);
    1705             :      /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
    1706             : 
    1707           2 :      break;
    1708           2 :     }
    1709           6 :     case 6: {
    1710             :      /* LDV {"action": "PRE_CALL_52", "type": "CONDITION_BEGIN", "comment": "Allocate memory for adhoc callback parameters."} */
    1711             :      /* LDV {"action": "PRE_CALL_52", "type": "CONDITION_END"} */
    1712             : 
    1713             :      /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback config_port from uart_ops."} */
    1714             :      /* LDV {"type": "CALLBACK", "call": "((& serial8250_config_port))(ldv_4_uart_port_uart_port, ldv_4_ldv_param_52_1_default);", "comment": "callback"} */
    1715           4 :      ldv_uart_instance_callback_4_52(ldv_4_callback_config_port, ldv_4_uart_port_uart_port, ldv_4_ldv_param_52_1_default);
    1716             :      /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
    1717             : 
    1718             :      /* LDV {"action": "POST_CALL_52", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
    1719             :      /* LDV {"action": "POST_CALL_52", "type": "CONDITION_END"} */
    1720             : 
    1721           2 :      break;
    1722           2 :     }
    1723           6 :     case 7: {
    1724             :      /* LDV {"action": "CALLBACK", "type": "CALL_BEGIN", "callback": true, "comment": "Invoke callback break_ctl from uart_ops."} */
    1725             :      /* LDV {"type": "CALLBACK", "call": "((& serial8250_break_ctl))(ldv_4_uart_port_uart_port, ldv_4_ldv_param_16_1_default);", "comment": "callback"} */
    1726           4 :      ldv_uart_instance_callback_4_16(ldv_4_callback_break_ctl, ldv_4_uart_port_uart_port, ldv_4_ldv_param_16_1_default);
    1727             :      /* LDV {"action": "CALLBACK", "type": "CALL_END"} */
    1728             : 
    1729           2 :      break;
    1730           2 :     }
    1731           4 :     default: ldv_stop();
    1732           2 :    }
    1733          14 :    break;
    1734           2 :   }
    1735           4 :   default: ldv_stop();
    1736           2 :  }
    1737           0 :  /* LDV {"action": "POST_CALL_16", "type": "CONDITION_BEGIN", "comment": "Free memory of adhoc callback parameters."} */
    1738             :  /* LDV {"action": "POST_CALL_16", "type": "CONDITION_END"} */
    1739           0 : 
    1740             :  /* LDV {"action": "CALL", "type": "SUBPROCESS_BEGIN", "comment": "Call rest TTY callbacks."} */
    1741             :  /* LDV {"action": "CALL", "type": "SUBPROCESS_END"} */
    1742             : 
    1743             :  /* Jump to a subprocess 'call' initial state */
    1744          14 :  goto ldv_call_4;
    1745             :  /* Jump to a subprocess 'call' initial state */
    1746             :  goto ldv_call_4;
    1747             :  /* Jump to a subprocess 'call' initial state */
    1748             :  goto ldv_call_4;
    1749             :  /* Jump to a subprocess 'call' initial state */
    1750             :  goto ldv_call_4;
    1751             :  /* End of the subprocess 'call' */
    1752             :  return;
    1753             :  /* LDV {"comment": "End of control function based on process 'uart_instance(serial_core)'", "type": "CONTROL_FUNCTION_END", "function": "ldv_uart_instance_4"} */
    1754             : }
    1755             : 
    1756             : /* AUX_FUNC_CALLBACK ldv_uart_instance_callback_4_16 */
    1757             : void ldv_uart_instance_callback_4_16(void (*arg0)(struct uart_port *, int), struct uart_port *arg1, int arg2) {
    1758           4 :  ((& serial8250_break_ctl))(arg1, arg2);
    1759           2 : }
    1760             : 
    1761             : /* AUX_FUNC_CALLBACK ldv_uart_instance_callback_4_52 */
    1762             : void ldv_uart_instance_callback_4_52(void (*arg0)(struct uart_port *, int), struct uart_port *arg1, int arg2) {
    1763          16 :  ((& serial8250_config_port))(arg1, arg2);
    1764           2 : }
    1765             : 
    1766             : /* AUX_FUNC_CALLBACK ldv_uart_instance_callback_4_55 */
    1767             : void ldv_uart_instance_callback_4_55(void (*arg0)(struct uart_port *), struct uart_port *arg1) {
    1768           4 :  ((& serial8250_enable_ms))(arg1);
    1769           2 : }
    1770             : 
    1771             : /* AUX_FUNC_CALLBACK ldv_uart_instance_callback_4_56 */
    1772             : void ldv_uart_instance_callback_4_56(void (*arg0)(struct uart_port *), struct uart_port *arg1) {
    1773           6 :  ((& serial8250_release_port))(arg1);
    1774           2 : }
    1775             : 
    1776             : /* AUX_FUNC_CALLBACK ldv_uart_instance_callback_4_57 */
    1777             : void ldv_uart_instance_callback_4_57(int (*arg0)(struct uart_port *), struct uart_port *arg1) {
    1778           8 :  ((& serial8250_request_port))(arg1);
    1779           2 : }
    1780             : 
    1781             : /* AUX_FUNC_CALLBACK ldv_uart_instance_callback_4_58 */
    1782             : void ldv_uart_instance_callback_4_58(unsigned int (*arg0)(struct uart_port *), struct uart_port *arg1) {
    1783           4 :  ((& serial8250_tx_empty))(arg1);
    1784           2 : }
    1785             : 
    1786             : /* AUX_FUNC_CALLBACK ldv_uart_instance_callback_4_59 */
    1787             : void ldv_uart_instance_callback_4_59(char *(*arg0)(struct uart_port *), struct uart_port *arg1) {
    1788           4 :  ((& serial8250_type))(arg1);
    1789           2 : }
    1790             : 
    1791             : /* AUX_FUNC_CALLBACK ldv_uart_instance_get_mctrl_4_30 */
    1792             : unsigned int ldv_uart_instance_get_mctrl_4_30(unsigned int (*arg0)(struct uart_port *), struct uart_port *arg1) {
    1793           6 :  return ((& serial8250_get_mctrl))(arg1);
    1794             : }
    1795           2 : 
    1796             : /* AUX_FUNC_CALLBACK ldv_uart_instance_pm_off_4_19 */
    1797             : void ldv_uart_instance_pm_off_4_19(void (*arg0)(struct uart_port *, unsigned int, unsigned int), struct uart_port *arg1, unsigned int arg2, unsigned int arg3) {
    1798           4 :  ((& serial8250_pm))(arg1, arg2, arg3);
    1799           2 : }
    1800             : 
    1801             : /* AUX_FUNC_CALLBACK ldv_uart_instance_pm_off_4_2 */
    1802             : void ldv_uart_instance_pm_off_4_2(void (*arg0)(struct uart_port *, unsigned int, unsigned int), struct uart_port *arg1, unsigned int arg2, unsigned int arg3) {
    1803           4 :  ((& serial8250_pm))(arg1, arg2, arg3);
    1804           2 : }
    1805             : 
    1806             : /* AUX_FUNC_CALLBACK ldv_uart_instance_pm_on_4_35 */
    1807             : void ldv_uart_instance_pm_on_4_35(void (*arg0)(struct uart_port *, unsigned int, unsigned int), struct uart_port *arg1, unsigned int arg2, unsigned int arg3) {
    1808           4 :  ((& serial8250_pm))(arg1, arg2, arg3);
    1809           2 : }
    1810             : 
    1811             : /* AUX_FUNC_CALLBACK ldv_uart_instance_send_xchar_4_11 */
    1812             : void ldv_uart_instance_send_xchar_4_11(void (*arg0)(struct uart_port *, char), struct uart_port *arg1, char arg2) {
    1813           8 :  (*arg0)(arg1, arg2);
    1814           2 : }
    1815             : 
    1816             : /* AUX_FUNC_CALLBACK ldv_uart_instance_send_xchar_4_13 */
    1817             : void ldv_uart_instance_send_xchar_4_13(void (*arg0)(struct uart_port *, char), struct uart_port *arg1, char arg2) {
    1818           8 :  (*arg0)(arg1, arg2);
    1819           2 : }
    1820             : 
    1821             : /* AUX_FUNC_CALLBACK ldv_uart_instance_set_mctrl_4_14 */
    1822             : void ldv_uart_instance_set_mctrl_4_14(void (*arg0)(struct uart_port *, unsigned int), struct uart_port *arg1, unsigned int arg2) {
    1823           4 :  ((& serial8250_set_mctrl))(arg1, arg2);
    1824           2 : }
    1825             : 
    1826             : /* AUX_FUNC_CALLBACK ldv_uart_instance_set_mctrl_4_25 */
    1827             : void ldv_uart_instance_set_mctrl_4_25(void (*arg0)(struct uart_port *, unsigned int), struct uart_port *arg1, unsigned int arg2) {
    1828           8 :  ((& serial8250_set_mctrl))(arg1, arg2);
    1829           4 : }
    1830             : 
    1831             : /* AUX_FUNC_CALLBACK ldv_uart_instance_set_mctrl_4_5 */
    1832             : void ldv_uart_instance_set_mctrl_4_5(void (*arg0)(struct uart_port *, unsigned int), struct uart_port *arg1, unsigned int arg2) {
    1833           4 :  ((& serial8250_set_mctrl))(arg1, arg2);
    1834           2 : }
    1835             : 
    1836             : /* AUX_FUNC_CALLBACK ldv_uart_instance_set_termios_4_15 */
    1837             : void ldv_uart_instance_set_termios_4_15(void (*arg0)(struct uart_port *, struct ktermios *, struct ktermios *), struct uart_port *arg1, struct ktermios *arg2, struct ktermios *arg3) {
    1838           4 :  ((& serial8250_set_termios))(arg1, arg2, arg3);
    1839           2 : }
    1840             : 
    1841             : /* AUX_FUNC_CALLBACK ldv_uart_instance_set_termios_4_31 */
    1842             : void ldv_uart_instance_set_termios_4_31(void (*arg0)(struct uart_port *, struct ktermios *, struct ktermios *), struct uart_port *arg1, struct ktermios *arg2, struct ktermios *arg3) {
    1843           4 :  ((& serial8250_set_termios))(arg1, arg2, arg3);
    1844           2 : }
    1845             : 
    1846             : /* AUX_FUNC_CALLBACK ldv_uart_instance_shutdown_4_21 */
    1847             : void ldv_uart_instance_shutdown_4_21(void (*arg0)(struct uart_port *), struct uart_port *arg1) {
    1848           6 :  ((& serial8250_shutdown))(arg1);
    1849           2 : }
    1850             : 
    1851             : /* AUX_FUNC_CALLBACK ldv_uart_instance_shutdown_4_4 */
    1852             : void ldv_uart_instance_shutdown_4_4(void (*arg0)(struct uart_port *), struct uart_port *arg1) {
    1853           6 :  ((& serial8250_shutdown))(arg1);
    1854           2 : }
    1855             : 
    1856             : /* AUX_FUNC_CALLBACK ldv_uart_instance_start_tx_4_26 */
    1857             : void ldv_uart_instance_start_tx_4_26(void (*arg0)(struct uart_port *), struct uart_port *arg1) {
    1858           8 :  ((& serial8250_start_tx))(arg1);
    1859           2 : }
    1860             : 
    1861             : /* AUX_FUNC_CALLBACK ldv_uart_instance_start_tx_4_9 */
    1862             : void ldv_uart_instance_start_tx_4_9(void (*arg0)(struct uart_port *), struct uart_port *arg1) {
    1863           8 :  ((& serial8250_start_tx))(arg1);
    1864           2 : }
    1865             : 
    1866             : /* AUX_FUNC_CALLBACK ldv_uart_instance_start_tx_if_4_10 */
    1867             : void ldv_uart_instance_start_tx_if_4_10(void (*arg0)(struct uart_port *), struct uart_port *arg1) {
    1868          16 :  ((& serial8250_start_tx))(arg1);
    1869           4 : }
    1870             : 
    1871             : /* AUX_FUNC_CALLBACK ldv_uart_instance_start_tx_if_4_12 */
    1872             : void ldv_uart_instance_start_tx_if_4_12(void (*arg0)(struct uart_port *), struct uart_port *arg1) {
    1873          16 :  ((& serial8250_start_tx))(arg1);
    1874           4 : }
    1875             : 
    1876             : /* AUX_FUNC_CALLBACK ldv_uart_instance_startup_4_33 */
    1877             : int ldv_uart_instance_startup_4_33(int (*arg0)(struct uart_port *), struct uart_port *arg1) {
    1878          12 :  return ((& serial8250_startup))(arg1);
    1879           2 : }
    1880             : 
    1881             : /* AUX_FUNC_CALLBACK ldv_uart_instance_stop_rx_4_22 */
    1882             : void ldv_uart_instance_stop_rx_4_22(void (*arg0)(struct uart_port *), struct uart_port *arg1) {
    1883           4 :  ((& serial8250_stop_rx))(arg1);
    1884           2 : }
    1885             : 
    1886             : /* AUX_FUNC_CALLBACK ldv_uart_instance_stop_rx_4_6 */
    1887             : void ldv_uart_instance_stop_rx_4_6(void (*arg0)(struct uart_port *), struct uart_port *arg1) {
    1888           4 :  ((& serial8250_stop_rx))(arg1);
    1889           2 : }
    1890             : 
    1891             : /* AUX_FUNC_CALLBACK ldv_uart_instance_stop_tx_4_28 */
    1892             : void ldv_uart_instance_stop_tx_4_28(void (*arg0)(struct uart_port *), struct uart_port *arg1) {
    1893           6 :  ((& serial8250_stop_tx))(arg1);
    1894           2 : }
    1895             : 
    1896             : /* AUX_FUNC_CALLBACK ldv_uart_instance_stop_tx_4_8 */
    1897             : void ldv_uart_instance_stop_tx_4_8(void (*arg0)(struct uart_port *), struct uart_port *arg1) {
    1898           6 :  ((& serial8250_stop_tx))(arg1);
    1899           2 : }
    1900             : 
    1901             : /* AUX_FUNC_CALLBACK ldv_uart_instance_verify_port_4_34 */
    1902             : void ldv_uart_instance_verify_port_4_34(int (*arg0)(struct uart_port *, struct serial_struct *), struct uart_port *arg1, struct serial_struct *arg2) {
    1903           4 :  ((& serial8250_verify_port))(arg1, arg2);
    1904           2 : }
    1905             : 
    1906             : /* AUX_FUNC main */
    1907             : int main() {
    1908           1 :  ldv_main_16(0);
    1909           0 :  return 0;
    1910             : }
    1911             : 
    1912             : 
    1913             : /* AUX_FUNC  ERR_PTR */
    1914             : static inline void *ERR_PTR (long int error)
    1915             : {
    1916             : 
    1917             :  return ldv_err_ptr(error);
    1918             : }
    1919             : 
    1920             : /* AUX_FUNC  PTR_ERR */
    1921             : static inline long int PTR_ERR (void const *ptr)
    1922             : {
    1923             : 
    1924             :  return ldv_ptr_err(ptr);
    1925             : }
    1926             : 
    1927             : /* AUX_FUNC  IS_ERR */
    1928             : static inline long int IS_ERR (void const *ptr)
    1929             : {
    1930             : 
    1931             :  return ldv_is_err(ptr);
    1932             : }
    1933             : 
    1934             : /* AUX_FUNC  IS_ERR_OR_NULL */
    1935             : static inline long int IS_ERR_OR_NULL (void const *ptr)
    1936             : {
    1937             : 
    1938             :  return ldv_is_err_or_null(ptr);
    1939             : }
    1940             : 
    1941             : /* AUX_FUNC  ldv_del_timer_sync_5 */
    1942             : int ldv_del_timer_sync_5 (struct timer_list *ldv_func_arg1)
    1943             : {
    1944             : 
    1945             :  /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'del_timer_sync'"} */
    1946             :  return ldv_emg_del_timer_sync(ldv_func_arg1);
    1947             : }
    1948             : 
    1949             : /* AUX_FUNC  kzalloc */
    1950             : static inline void *kzalloc (size_t size, gfp_t flags)
    1951             : {
    1952           6 : 
    1953          18 :  return ldv_kzalloc(size, flags);
    1954             : }
    1955             : 
    1956             : /* AUX_FUNC  ldv_request_irq_7 */
    1957             : static inline int ldv_request_irq_7 (unsigned int irq, irqreturn_t (*handler)(int, void *), long unsigned int flags, char const *name, void *dev)
    1958             : {
    1959             : 
    1960             :  /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'request_irq'"} */
    1961          30 :  return ldv_emg_request_irq(irq, handler, flags, name, dev);
    1962             : }
    1963             : 
    1964             : /* AUX_FUNC  ldv_free_irq_8 */
    1965             : void ldv_free_irq_8 (unsigned int ldv_func_arg1, void *ldv_func_arg2)
    1966             : {
    1967             : 
    1968             :  /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'free_irq'"} */
    1969           8 :  ldv_emg_free_irq(ldv_func_arg1, ldv_func_arg2);
    1970           4 : }
    1971             : 
    1972             : /* AUX_FUNC  ldv_mod_timer_9 */
    1973             : int ldv_mod_timer_9 (struct timer_list *ldv_func_arg1, long unsigned int ldv_func_arg2)
    1974             : {
    1975           0 : 
    1976             :  /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'mod_timer'"} */
    1977           0 :  return ldv_emg_mod_timer(ldv_func_arg1, ldv_func_arg2);
    1978             : }
    1979             : 
    1980             : /* AUX_FUNC  ldv_mod_timer_10 */
    1981             : int ldv_mod_timer_10 (struct timer_list *ldv_func_arg1, long unsigned int ldv_func_arg2)
    1982             : {
    1983           0 : 
    1984             :  /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'mod_timer'"} */
    1985           0 :  return ldv_emg_mod_timer(ldv_func_arg1, ldv_func_arg2);
    1986             : }
    1987             : 
    1988             : /* AUX_FUNC  ldv_mod_timer_11 */
    1989             : int ldv_mod_timer_11 (struct timer_list *ldv_func_arg1, long unsigned int ldv_func_arg2)
    1990             : {
    1991           2 : 
    1992             :  /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'mod_timer'"} */
    1993           8 :  return ldv_emg_mod_timer(ldv_func_arg1, ldv_func_arg2);
    1994             : }
    1995             : 
    1996             : /* AUX_FUNC  ldv_mod_timer_12 */
    1997             : int ldv_mod_timer_12 (struct timer_list *ldv_func_arg1, long unsigned int ldv_func_arg2)
    1998             : {
    1999           2 : 
    2000             :  /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'mod_timer'"} */
    2001           8 :  return ldv_emg_mod_timer(ldv_func_arg1, ldv_func_arg2);
    2002             : }
    2003             : 
    2004             : /* AUX_FUNC  ldv_del_timer_sync_13 */
    2005             : int ldv_del_timer_sync_13 (struct timer_list *ldv_func_arg1)
    2006             : {
    2007           4 : 
    2008             :  /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'del_timer_sync'"} */
    2009          12 :  return ldv_emg_del_timer_sync(ldv_func_arg1);
    2010             : }
    2011             : 
    2012             : /* AUX_FUNC  ldv_uart_add_one_port_14 */
    2013             : int ldv_uart_add_one_port_14 (struct uart_driver *ldv_func_arg1, struct uart_port *ldv_func_arg2)
    2014             : {
    2015           1 : 
    2016             :  /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'uart_add_one_port'"} */
    2017           4 :  return ldv_emg_uart_add_one_port(ldv_func_arg1, ldv_func_arg2);
    2018             : }
    2019             : 
    2020             : /* AUX_FUNC  ldv_uart_remove_one_port_15 */
    2021             : int ldv_uart_remove_one_port_15 (struct uart_driver *ldv_func_arg1, struct uart_port *ldv_func_arg2)
    2022             : {
    2023           1 : 
    2024             :  /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'uart_remove_one_port'"} */
    2025           4 :  return ldv_emg_uart_remove_one_port(ldv_func_arg1, ldv_func_arg2);
    2026             : }
    2027             : 
    2028             : /* AUX_FUNC  ldv_uart_add_one_port_16 */
    2029             : int ldv_uart_add_one_port_16 (struct uart_driver *ldv_func_arg1, struct uart_port *ldv_func_arg2)
    2030             : {
    2031           1 : 
    2032             :  /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'uart_add_one_port'"} */
    2033           4 :  return ldv_emg_uart_add_one_port(ldv_func_arg1, ldv_func_arg2);
    2034             : }
    2035             : 
    2036             : /* AUX_FUNC  ldv_uart_remove_one_port_17 */
    2037             : int ldv_uart_remove_one_port_17 (struct uart_driver *ldv_func_arg1, struct uart_port *ldv_func_arg2)
    2038             : {
    2039           0 : 
    2040             :  /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'uart_remove_one_port'"} */
    2041           0 :  return ldv_emg_uart_remove_one_port(ldv_func_arg1, ldv_func_arg2);
    2042             : }
    2043             : 
    2044             : /* AUX_FUNC  ldv_uart_add_one_port_18 */
    2045             : int ldv_uart_add_one_port_18 (struct uart_driver *ldv_func_arg1, struct uart_port *ldv_func_arg2)
    2046             : {
    2047           0 : 
    2048             :  /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'uart_add_one_port'"} */
    2049           0 :  return ldv_emg_uart_add_one_port(ldv_func_arg1, ldv_func_arg2);
    2050             : }
    2051             : 
    2052             : /* AUX_FUNC  ldv_platform_driver_register_19 */
    2053             : int ldv_platform_driver_register_19 (struct platform_driver *ldv_func_arg1)
    2054             : {
    2055           1 : 
    2056             :  /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'platform_driver_register'"} */
    2057           4 :  return ldv_emg_platform_driver_register(ldv_func_arg1);
    2058             : }
    2059             : 
    2060             : /* AUX_FUNC  ldv_platform_driver_unregister_20 */
    2061             : void ldv_platform_driver_unregister_20 (struct platform_driver *ldv_func_arg1)
    2062             : {
    2063             : 
    2064             :  /* LDV {"type": "KERNEL_MODEL", "comment": "Perform the model code of the function 'platform_driver_unregister'"} */
    2065           4 :  ldv_emg_platform_driver_unregister(ldv_func_arg1);
    2066           2 : }

Generated by: LCOV version 1.10