// File: /workspace/github_c_makefile_star2_O0/sachinites[P]CommandParser/cmd_hier.c
// Function: support_cmd_negation
void
support_cmd_negation(param_t *param){
    
    int i = 0;
    assert(param);
    assert(get_current_branch_hook(param) == libcli_get_config_hook());

    param_t *negate_param = find_matching_param(&param->options[0], NEGATE_CHARACTER);

    if(negate_param && IS_PARAM_NO_CMD(negate_param)){
        printf("Error : Attempt to add Duplicate Negate param in cmd : %s\n", GET_CMD_NAME(param));
        return;
    }

    param_t *no_param = (param_t *)calloc(1, sizeof(param_t));
    init_param(no_param, NO_CMD, NEGATE_CHARACTER, negate_callback, 0, INVALID, 0, "Command Negation");
   
    /*We cant leave the MODE_PARAM_INDEX empty, 
     * so a hack - fill it with suboptions param. I dont see any implication of this.
     * We dont support MODE with negate cmd*/ 

    no_param->options[MODE_PARAM_INDEX] = libcli_get_suboptions_param();//libcli_get_mode_param();
    no_param->options[SUBOPTIONS_INDEX] = libcli_get_suboptions_param();
    no_param->options[CMD_EXPANSION_INDEX] = libcli_get_cmd_expansion_param();
     
    for(i = CHILDREN_START_INDEX; i <= CHILDREN_END_INDEX; i++){
        if(param->options[i]){
            no_param->options[i] = param->options[i];
            continue;
        }
        break;
    }

    assert(i <= CHILDREN_END_INDEX);
    param->options[i] = no_param;
    no_param->parent = param;
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x329c
jmp 0x32bb
leaq 0x7756(%rip), %rdi      # 0xa9f9
leaq 0x7060(%rip), %rsi      # 0xa30a
movl $0x1fc, %edx            # imm = 0x1FC
leaq 0x7464(%rip), %rcx      # 0xa71a
callq 0x10c0
movq -0x8(%rbp), %rdi
callq 0x3450
movq %rax, -0x28(%rbp)
callq 0x1dd0
movq %rax, %rcx
movq -0x28(%rbp), %rax
cmpq %rcx, %rax
jne 0x32db
jmp 0x32fa
leaq 0x745d(%rip), %rdi      # 0xa73f
leaq 0x7021(%rip), %rsi      # 0xa30a
movl $0x1fd, %edx            # imm = 0x1FD
leaq 0x7425(%rip), %rcx      # 0xa71a
callq 0x10c0
movq -0x8(%rbp), %rdi
addq $0x60, %rdi
leaq 0x7353(%rip), %rsi      # 0xa65c
callq 0x3f20
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x333d
movq -0x18(%rbp), %rax
cmpl $0x2, (%rax)
jne 0x333d
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
leaq 0x7449(%rip), %rdi      # 0xa77a
movb $0x0, %al
callq 0x10b0
jmp 0x3448
movl $0x1, %edi
movl $0xf8, %esi
callq 0x1100
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movl $0x2, %esi
leaq 0x72fc(%rip), %rdx      # 0xa65c
leaq 0x41c9(%rip), %rcx      # 0x7530
xorl %eax, %eax
movl %eax, %r8d
movl $0x6, %r9d
leaq 0x743c(%rip), %rax      # 0xa7b5
movq $0x0, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x2e80
callq 0x1d60
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x60(%rax)
callq 0x1d60
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x68(%rax)
callq 0x1d70
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x70(%rax)
movl $0x3, -0xc(%rbp)
cmpl $0xf, -0xc(%rbp)
jg 0x3401
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
cmpq $0x0, 0x60(%rax,%rcx,8)
je 0x33f4
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq 0x60(%rax,%rcx,8), %rdx
movq -0x20(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq %rdx, 0x60(%rax,%rcx,8)
jmp 0x33f6
jmp 0x3401
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x33c2
cmpl $0xf, -0xc(%rbp)
jg 0x3409
jmp 0x3428
leaq 0x73b6(%rip), %rdi      # 0xa7c6
leaq 0x6ef3(%rip), %rsi      # 0xa30a
movl $0x219, %edx            # imm = 0x219
leaq 0x72f7(%rip), %rcx      # 0xa71a
callq 0x10c0
movq -0x20(%rbp), %rdx
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq %rdx, 0x60(%rax,%rcx,8)
movq -0x8(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0xe0(%rax)
addq $0x40, %rsp
popq %rbp
retq
nop