// File: /workspace/github_c_makefile_star2_O0/sachinites[P]CommandParser/testapp.c
// Function: main
int
main(int argc, char **argv){
    
    init_libcli();
    /*Level 0*/

    param_t *show   = libcli_get_show_hook();
    //param_t *debug  = libcli_get_debug_hook();
    param_t *config = libcli_get_config_hook();

    static param_t cmsh;
    init_param(&cmsh, CMD, "cmsh", 0, 0, INVALID, 0, "cmsh hidden commands");
    libcli_register_param(0, &cmsh);

    /*Level 1*/
    static param_t ip;
    init_param(&ip, CMD, "ip", 0, 0, INVALID, 0, "Internet Protocol(IP)");
    libcli_register_param(show, &ip);

    static param_t ipv6;
    init_param(&ipv6, CMD, "ipv6", 0, 0, INVALID, 0, "Internet Protocol(IPV6)");
    libcli_register_param(show, &ipv6);

    static param_t config_router;
    init_param(&config_router, CMD, "router", 0, 0, INVALID, 0, "Configuration Router");
    libcli_register_param(config, &config_router);

    /*Level 2*/
    static param_t config_router_name;
    init_param(&config_router_name, CMD, "name", 0, 0, INVALID, 0, "configure router name");
    libcli_register_param(&config_router, &config_router_name);

    static param_t igmp;
    init_param(&igmp, CMD, "igmp", 0, 0, INVALID, 0, "IGMP Protocol");
    libcli_register_param(&ip, &igmp);
    
    static param_t igmp_config;
    init_param(&igmp_config, CMD, "configuration", show_ip_igmp_groups_handler, 0, INVALID, 0, "IGMP Protocol Configuration");
    libcli_register_param(&igmp, &igmp_config);

    /*Level 3*/
    static param_t config_router_name_name;
    init_param(&config_router_name_name, LEAF, 0, config_router_name_handler, 0,  
                                              STRING, "cons-name", "Name of Console");
    libcli_register_param(&config_router_name, &config_router_name_name);
    
    static param_t show_ip_igmp_groups;
    init_param(&show_ip_igmp_groups, CMD, "groups", show_ip_igmp_groups_handler, 0, INVALID, 0, "Ipv4 Group Address");
    libcli_register_param(&igmp, &show_ip_igmp_groups);

    static param_t show_ip_igmp_groups_vlan;
    init_param(&show_ip_igmp_groups_vlan, CMD, "vlan", 0, 0, INVALID, 0, "vlan");
    libcli_register_param(&show_ip_igmp_groups, &show_ip_igmp_groups_vlan);
    libcli_register_display_callback(&show_ip_igmp_groups_vlan, list_vlans);

    static param_t show_ip_igmp_groups_vlan_vlan;
    init_param(&show_ip_igmp_groups_vlan_vlan, LEAF, 0, show_ip_igmp_groups_handler, user_vlan_validation_callback,
        INT, "vlan-id", "Vlan id(1-4095)");
    libcli_register_param(&show_ip_igmp_groups_vlan, &show_ip_igmp_groups_vlan_vlan);

    /*Level 5*/
    static param_t  show_ip_igmp_groups_group_ip;
    init_param(&show_ip_igmp_groups_group_ip, LEAF, 0, show_ip_igmp_groups_handler, 0, IPV4, 
                "group-ip" ,"Multicast Group Address");
    libcli_register_param(&show_ip_igmp_groups, &show_ip_igmp_groups_group_ip);

    /*level 6*/
    static param_t show_ip_igmp_groups_group_ip_vlan;
    init_param(&show_ip_igmp_groups_group_ip_vlan, CMD, "vlan", 0, 0, INVALID, 0, "Vlan");
    libcli_register_param(&show_ip_igmp_groups_group_ip, &show_ip_igmp_groups_group_ip_vlan);

    /*level 7*/
    static param_t show_ip_igmp_groups_group_ip_vlan_vlan_id;
    init_param(&show_ip_igmp_groups_group_ip_vlan_vlan_id, LEAF, 0, show_ip_igmp_groups_handler, 
                                    user_vlan_validation_callback, INT, "vlan-id" ,"Vlan id(1-4095)");
    libcli_register_param(&show_ip_igmp_groups_group_ip_vlan, &show_ip_igmp_groups_group_ip_vlan_vlan_id);

    /*mtrace command implementation*/
    static param_t mtrace;
    init_param(&mtrace, CMD, "mtrace", 0, 0, INVALID, 0, "mtrace command");
    libcli_register_param(config, &mtrace);

    static param_t source;
    init_param(&source, CMD, "source", 0, 0, INVALID, 0, "source command");
    libcli_register_param(&mtrace, &source);

    static param_t source_ip;
    init_param(&source_ip, LEAF, 0, mtrace_handler, 0, IPV4, "source-ip", "Source Ipv4 address");
    libcli_register_param(&source, &source_ip);
    set_param_cmd_code(&source_ip, MTRACE_SOURCE);

    /*mtrace source <source ip> destination <dest-ip>*/

    static param_t destination;
    init_param(&destination, CMD, "destination", 0, 0, INVALID, 0, "destination command");
    libcli_register_param(&source_ip, &destination);

    static param_t dest_ip;
    init_param(&dest_ip, LEAF, 0, mtrace_handler, 0, IPV4, "destination-ip", "Destination Ipv4 address");
    libcli_register_param(&destination, &dest_ip);
    set_param_cmd_code(&dest_ip, MTRACE_SOURCE_DEST);

    /*mtrace source <source ip> group <group-ip>*/

    static param_t group;
    init_param(&group, CMD, "group", 0, 0, INVALID, 0, "group command");
    libcli_register_param(&source_ip, &group);

    static param_t group_ip;
    init_param(&group_ip, LEAF, 0, mtrace_handler, 0, IPV4, "group-ip", "Multicast Group Ipv4 address");
    libcli_register_param(&group, &group_ip);
    set_param_cmd_code(&group_ip, MTRACE_SOURCE_GROUP);

    /*mtrace source <source ip> destination <dest-ip> group <group_ip>*/

    static param_t group2;
    init_param(&group2, CMD, "group", 0, 0, INVALID, 0, "group command");
    libcli_register_param(&dest_ip, &group2);

    static param_t group_ip2;
    init_param(&group_ip2, LEAF, 0, mtrace_handler, 0, IPV4, "group-ip", "Multicast Group Ipv4 address");
    libcli_register_param(&group2, &group_ip2);
    set_param_cmd_code(&group_ip2, MTRACE_SOURCE_DEST_GROUP);

    support_cmd_negation(config);

    start_shell();
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x0, %al
callq 0x22f0
callq 0x1da0
movq %rax, -0x18(%rbp)
callq 0x1dd0
movq %rax, -0x20(%rbp)
leaq 0xdbf2(%rip), %rdi      # 0xf158
xorl %esi, %esi
leaq 0x8abc(%rip), %rdx      # 0xa02b
xorl %eax, %eax
movl %eax, %r8d
movl $0x6, %r9d
leaq 0x8aaf(%rip), %rax      # 0xa030
movq %r8, %rcx
movq $0x0, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x2e80
xorl %eax, %eax
movl %eax, %edi
leaq 0xdbb7(%rip), %rsi      # 0xf158
callq 0x1e80
leaq 0xdca3(%rip), %rdi      # 0xf250
xorl %esi, %esi
leaq 0x8bdb(%rip), %rdx      # 0xa191
xorl %eax, %eax
movl %eax, %r8d
movl $0x6, %r9d
leaq 0x8a7d(%rip), %rax      # 0xa045
movq %r8, %rcx
movq $0x0, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x2e80
movq -0x18(%rbp), %rdi
leaq 0xdc68(%rip), %rsi      # 0xf250
callq 0x1e80
leaq 0xdd54(%rip), %rdi      # 0xf348
xorl %esi, %esi
leaq 0x8a5e(%rip), %rdx      # 0xa05b
xorl %eax, %eax
movl %eax, %r8d
movl $0x6, %r9d
leaq 0x8a51(%rip), %rax      # 0xa060
movq %r8, %rcx
movq $0x0, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x2e80
movq -0x18(%rbp), %rdi
leaq 0xdd19(%rip), %rsi      # 0xf348
callq 0x1e80
leaq 0xde05(%rip), %rdi      # 0xf440
xorl %esi, %esi
leaq 0x8a34(%rip), %rdx      # 0xa078
xorl %eax, %eax
movl %eax, %r8d
movl $0x6, %r9d
leaq 0x8a29(%rip), %rax      # 0xa07f
movq %r8, %rcx
movq $0x0, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x2e80
movq -0x20(%rbp), %rdi
leaq 0xddca(%rip), %rsi      # 0xf440
callq 0x1e80
leaq 0xdeb6(%rip), %rdi      # 0xf538
xorl %esi, %esi
leaq 0x8fc9(%rip), %rdx      # 0xa654
xorl %eax, %eax
movl %eax, %r8d
movl $0x6, %r9d
leaq 0x89f7(%rip), %rax      # 0xa094
movq %r8, %rcx
movq $0x0, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x2e80
leaq 0xdd87(%rip), %rdi      # 0xf440
leaq 0xde78(%rip), %rsi      # 0xf538
callq 0x1e80
leaq 0xdf64(%rip), %rdi      # 0xf630
xorl %esi, %esi
leaq 0x89d5(%rip), %rdx      # 0xa0aa
xorl %eax, %eax
movl %eax, %r8d
movl $0x6, %r9d
leaq 0x89c8(%rip), %rax      # 0xa0af
movq %r8, %rcx
movq $0x0, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x2e80
leaq 0xdb4d(%rip), %rdi      # 0xf250
leaq 0xdf26(%rip), %rsi      # 0xf630
callq 0x1e80
leaq 0xe012(%rip), %rdi      # 0xf728
xorl %esi, %esi
leaq 0x899e(%rip), %rdx      # 0xa0bd
leaq -0x3c6(%rip), %rcx      # 0x1360
xorl %eax, %eax
movl %eax, %r8d
movl $0x6, %r9d
leaq 0x8993(%rip), %rax      # 0xa0cb
movq $0x0, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x2e80
leaq 0xdedf(%rip), %rdi      # 0xf630
leaq 0xdfd0(%rip), %rsi      # 0xf728
callq 0x1e80
leaq 0xe0bc(%rip), %rdi      # 0xf820
movl $0x1, %r9d
xorl %eax, %eax
movl %eax, %r8d
leaq -0x2c6(%rip), %rcx      # 0x14b0
leaq 0x896a(%rip), %r10      # 0xa0e7
leaq 0x896d(%rip), %rax      # 0xa0f1
movl %r9d, %esi
movq %r8, %rdx
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x2e80
leaq 0xdd99(%rip), %rdi      # 0xf538
leaq 0xe07a(%rip), %rsi      # 0xf820
callq 0x1e80
leaq 0xe166(%rip), %rdi      # 0xf918
xorl %esi, %esi
leaq 0x8946(%rip), %rdx      # 0xa101
leaq -0x462(%rip), %rcx      # 0x1360
xorl %eax, %eax
movl %eax, %r8d
movl $0x6, %r9d
leaq 0x8934(%rip), %rax      # 0xa108
movq $0x0, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x2e80
leaq 0xde43(%rip), %rdi      # 0xf630
leaq 0xe124(%rip), %rsi      # 0xf918
callq 0x1e80
leaq 0xe210(%rip), %rdi      # 0xfa10
xorl %esi, %esi
leaq 0x8912(%rip), %rax      # 0xa11b
xorl %ecx, %ecx
movl %ecx, %r8d
movl $0x6, %r9d
movq %rax, %rdx
movq %r8, %rcx
movq $0x0, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x2e80
leaq 0xe0e5(%rip), %rdi      # 0xf918
leaq 0xe1d6(%rip), %rsi      # 0xfa10
callq 0x1e80
leaq 0xe1ca(%rip), %rdi      # 0xfa10
leaq 0x453(%rip), %rsi       # 0x1ca0
callq 0x2050
leaq 0xe2af(%rip), %rdi      # 0xfb08
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
leaq -0x509(%rip), %rcx      # 0x1360
leaq -0x390(%rip), %r8       # 0x14e0
xorl %r9d, %r9d
leaq 0x88a6(%rip), %r10      # 0xa120
leaq 0x88a7(%rip), %rax      # 0xa128
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x2e80
leaq 0xe17a(%rip), %rdi      # 0xfa10
leaq 0xe26b(%rip), %rsi      # 0xfb08
callq 0x1e80
leaq 0xe357(%rip), %rdi      # 0xfc00
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %r8d
leaq -0x55a(%rip), %rcx      # 0x1360
movl $0x2, %r9d
leaq 0x8871(%rip), %r10      # 0xa138
leaq 0x8873(%rip), %rax      # 0xa141
movq %r8, %rdx
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x2e80
leaq 0xe032(%rip), %rdi      # 0xf918
leaq 0xe313(%rip), %rsi      # 0xfc00
callq 0x1e80
leaq 0xe3ff(%rip), %rdi      # 0xfcf8
xorl %esi, %esi
leaq 0x8819(%rip), %rdx      # 0xa11b
xorl %eax, %eax
movl %eax, %r8d
movl $0x6, %r9d
leaq 0x8845(%rip), %rax      # 0xa159
movq %r8, %rcx
movq $0x0, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x2e80
leaq 0xe2d0(%rip), %rdi      # 0xfc00
leaq 0xe3c1(%rip), %rsi      # 0xfcf8
callq 0x1e80
leaq 0xe4ad(%rip), %rdi      # 0xfdf0
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
leaq -0x5f3(%rip), %rcx      # 0x1360
leaq -0x47a(%rip), %r8       # 0x14e0
xorl %r9d, %r9d
leaq 0x87bc(%rip), %r10      # 0xa120
leaq 0x87bd(%rip), %rax      # 0xa128
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x2e80
leaq 0xe378(%rip), %rdi      # 0xfcf8
leaq 0xe469(%rip), %rsi      # 0xfdf0
callq 0x1e80
leaq 0xe555(%rip), %rdi      # 0xfee8
xorl %esi, %esi
leaq 0x87c2(%rip), %rdx      # 0xa15e
xorl %eax, %eax
movl %eax, %r8d
movl $0x6, %r9d
leaq 0x87b7(%rip), %rax      # 0xa165
movq %r8, %rcx
movq $0x0, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x2e80
movq -0x20(%rbp), %rdi
leaq 0xe51a(%rip), %rsi      # 0xfee8
callq 0x1e80
leaq 0xe606(%rip), %rdi      # 0xffe0
xorl %esi, %esi
leaq 0x8791(%rip), %rdx      # 0xa174
xorl %eax, %eax
movl %eax, %r8d
movl $0x6, %r9d
leaq 0x8786(%rip), %rax      # 0xa17b
movq %r8, %rcx
movq $0x0, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x2e80
leaq 0xe4d7(%rip), %rdi      # 0xfee8
leaq 0xe5c8(%rip), %rsi      # 0xffe0
callq 0x1e80
leaq 0xe6b4(%rip), %rdi      # 0x100d8
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %r8d
leaq -0x5b5(%rip), %rcx      # 0x1480
movl $0x2, %r9d
leaq 0x8748(%rip), %r10      # 0xa18a
leaq 0x874b(%rip), %rax      # 0xa194
movq %r8, %rdx
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x2e80
leaq 0xe57f(%rip), %rdi      # 0xffe0
leaq 0xe670(%rip), %rsi      # 0x100d8
callq 0x1e80
leaq 0xe664(%rip), %rdi      # 0x100d8
movl $0x1, %esi
callq 0x31e0
leaq 0xe74b(%rip), %rdi      # 0x101d0
xorl %esi, %esi
leaq 0x871a(%rip), %rdx      # 0xa1a8
xorl %eax, %eax
movl %eax, %r8d
movl $0x6, %r9d
leaq 0x8714(%rip), %rax      # 0xa1b4
movq %r8, %rcx
movq $0x0, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x2e80
leaq 0xe61c(%rip), %rdi      # 0x100d8
leaq 0xe70d(%rip), %rsi      # 0x101d0
callq 0x1e80
leaq 0xe7f9(%rip), %rdi      # 0x102c8
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %r8d
leaq -0x660(%rip), %rcx      # 0x1480
movl $0x2, %r9d
leaq 0x86db(%rip), %r10      # 0xa1c8
leaq 0x86e3(%rip), %rax      # 0xa1d7
movq %r8, %rdx
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x2e80
leaq 0xe6c4(%rip), %rdi      # 0x101d0
leaq 0xe7b5(%rip), %rsi      # 0x102c8
callq 0x1e80
leaq 0xe7a9(%rip), %rdi      # 0x102c8
movl $0x2, %esi
callq 0x31e0
leaq 0xe890(%rip), %rdi      # 0x103c0
xorl %esi, %esi
leaq 0x86b7(%rip), %rdx      # 0xa1f0
xorl %eax, %eax
movl %eax, %r8d
movl $0x6, %r9d
leaq 0x86ab(%rip), %rax      # 0xa1f6
movq %r8, %rcx
movq $0x0, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x2e80
leaq 0xe571(%rip), %rdi      # 0x100d8
leaq 0xe852(%rip), %rsi      # 0x103c0
callq 0x1e80
leaq 0xe93e(%rip), %rdi      # 0x104b8
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %r8d
leaq -0x70b(%rip), %rcx      # 0x1480
movl $0x2, %r9d
leaq 0x85a0(%rip), %r10      # 0xa138
leaq 0x8665(%rip), %rax      # 0xa204
movq %r8, %rdx
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x2e80
leaq 0xe809(%rip), %rdi      # 0x103c0
leaq 0xe8fa(%rip), %rsi      # 0x104b8
callq 0x1e80
leaq 0xe8ee(%rip), %rdi      # 0x104b8
movl $0x4, %esi
callq 0x31e0
leaq 0xe9d5(%rip), %rdi      # 0x105b0
xorl %esi, %esi
leaq 0x860c(%rip), %rdx      # 0xa1f0
xorl %eax, %eax
movl %eax, %r8d
movl $0x6, %r9d
leaq 0x8600(%rip), %rax      # 0xa1f6
movq %r8, %rcx
movq $0x0, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x2e80
leaq 0xe6b6(%rip), %rdi      # 0x102c8
leaq 0xe997(%rip), %rsi      # 0x105b0
callq 0x1e80
leaq 0xea83(%rip), %rdi      # 0x106a8
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %r8d
leaq -0x7b6(%rip), %rcx      # 0x1480
movl $0x2, %r9d
leaq 0x84f5(%rip), %r10      # 0xa138
leaq 0x85ba(%rip), %rax      # 0xa204
movq %r8, %rdx
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x2e80
leaq 0xe94e(%rip), %rdi      # 0x105b0
leaq 0xea3f(%rip), %rsi      # 0x106a8
callq 0x1e80
leaq 0xea33(%rip), %rdi      # 0x106a8
movl $0x3, %esi
callq 0x31e0
movq -0x20(%rbp), %rdi
callq 0x3280
callq 0x3620
xorl %eax, %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)