// File: /workspace/github_c_makefile_star2_O1/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 %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x2c76
movq %rdi, %rbx
leaq 0xbf3b(%rip), %rax      # 0xeaa8
cmpq %rax, %rdi
je 0x2c95
movq %rbx, %rdx
movq %rdx, %rcx
movq 0xe0(%rdx), %rdx
cmpq %rax, %rdx
jne 0x2b79
leaq 0xc3f1(%rip), %rax      # 0xef80
cmpq %rax, %rcx
jne 0x2cb4
leaq 0x60(%rbx), %rdi
leaq 0x5a4f(%rip), %rsi      # 0x85f2
callq 0x3429
testq %rax, %rax
je 0x2bcb
cmpl $0x2, (%rax)
jne 0x2bcb
movq 0x8(%rbx), %rsi
leaq 0x5b53(%rip), %rdi      # 0x8710
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x10e0
movl $0x1, %edi
movl $0xf8, %esi
callq 0x1140
movq %rax, %r14
leaq 0x5b67(%rip), %rax      # 0x874b
leaq 0x5a07(%rip), %rdx      # 0x85f2
leaq 0x2bac(%rip), %rcx      # 0x579e
movq %r14, %rdi
movl $0x2, %esi
xorl %r8d, %r8d
movl $0x6, %r9d
pushq %rax
pushq $0x0
callq 0x28c3
addq $0x10, %rsp
leaq 0xbca2(%rip), %rax      # 0xe8b8
movq %rax, 0x60(%r14)
movq %rax, 0x68(%r14)
leaq 0xbd8b(%rip), %rax      # 0xe9b0
movq %rax, 0x70(%r14)
movl $0xf, %eax
movq (%rbx,%rax,8), %rcx
testq %rcx, %rcx
je 0x2c63
movq %rcx, (%r14,%rax,8)
incq %rax
cmpq $0x1c, %rax
jne 0x2c2e
leaq 0x5b11(%rip), %rdi      # 0x875c
leaq 0x564e(%rip), %rsi      # 0x82a0
leaq 0x5a57(%rip), %rcx      # 0x86b0
movl $0x219, %edx            # imm = 0x219
callq 0x10f0
movq %r14, (%rbx,%rax,8)
movq %rbx, 0xe0(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x5d10(%rip), %rdi      # 0x898d
leaq 0x561c(%rip), %rsi      # 0x82a0
leaq 0x5a25(%rip), %rcx      # 0x86b0
movl $0x1fc, %edx            # imm = 0x1FC
callq 0x10f0
leaq 0x5baf(%rip), %rdi      # 0x884b
leaq 0x55fd(%rip), %rsi      # 0x82a0
leaq 0x5b75(%rip), %rcx      # 0x881f
movl $0x282, %edx            # imm = 0x282
callq 0x10f0
leaq 0x5a1a(%rip), %rdi      # 0x86d5
leaq 0x55de(%rip), %rsi      # 0x82a0
leaq 0x59e7(%rip), %rcx      # 0x86b0
movl $0x1fd, %edx            # imm = 0x1FD
callq 0x10f0