// File: /workspace/github_c_makefile_star2_O3/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 0x2c5c
movq %rdi, %rbx
leaq 0xbf55(%rip), %rax      # 0xeaa8
cmpq %rax, %rdi
je 0x2c7b
movq %rbx, %rdx
movq %rdx, %rcx
movq 0xe0(%rdx), %rdx
cmpq %rax, %rdx
jne 0x2b5f
leaq 0xc40b(%rip), %rax      # 0xef80
cmpq %rax, %rcx
jne 0x2c9a
leaq 0x60(%rbx), %rdi
leaq 0x5a69(%rip), %rsi      # 0x85f2
callq 0x33e9
testq %rax, %rax
je 0x2bb1
cmpl $0x2, (%rax)
jne 0x2bb1
movq 0x8(%rbx), %rsi
leaq 0x5b6d(%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 0x5b81(%rip), %rax      # 0x874b
leaq 0x5a21(%rip), %rdx      # 0x85f2
leaq 0x2a7e(%rip), %rcx      # 0x5656
movq %r14, %rdi
movl $0x2, %esi
xorl %r8d, %r8d
movl $0x6, %r9d
pushq %rax
pushq $0x0
callq 0x28b0
addq $0x10, %rsp
leaq 0xbcbc(%rip), %rax      # 0xe8b8
movq %rax, 0x60(%r14)
movq %rax, 0x68(%r14)
leaq 0xbda5(%rip), %rax      # 0xe9b0
movq %rax, 0x70(%r14)
movl $0xf, %eax
movq (%rbx,%rax,8), %rcx
testq %rcx, %rcx
je 0x2c49
movq %rcx, (%r14,%rax,8)
incq %rax
cmpq $0x1c, %rax
jne 0x2c14
leaq 0x5b2b(%rip), %rdi      # 0x875c
leaq 0x5668(%rip), %rsi      # 0x82a0
leaq 0x5a71(%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 0x5d2a(%rip), %rdi      # 0x898d
leaq 0x5636(%rip), %rsi      # 0x82a0
leaq 0x5a3f(%rip), %rcx      # 0x86b0
movl $0x1fc, %edx            # imm = 0x1FC
callq 0x10f0
leaq 0x5bc9(%rip), %rdi      # 0x884b
leaq 0x5617(%rip), %rsi      # 0x82a0
leaq 0x5b8f(%rip), %rcx      # 0x881f
movl $0x282, %edx            # imm = 0x282
callq 0x10f0
leaq 0x5a34(%rip), %rdi      # 0x86d5
leaq 0x55f8(%rip), %rsi      # 0x82a0
leaq 0x5a01(%rip), %rcx      # 0x86b0
movl $0x1fd, %edx            # imm = 0x1FD
callq 0x10f0