// File: /workspace/github_c_makefile_star2_O1/msteveb[P]autosetup/./jimsh0.c
// Function: Jim_IncrCoreCommand
static int Jim_IncrCoreCommand(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
{
    jim_wide wideValue, increment = 1;
    Jim_Obj *intObjPtr;

    if (argc != 2 && argc != 3) {
        Jim_WrongNumArgs(interp, 1, argv, "varName ?increment?");
        return JIM_ERR;
    }
    if (argc == 3) {
        if (Jim_GetWideExpr(interp, argv[2], &increment) != JIM_OK)
            return JIM_ERR;
    }
    intObjPtr = Jim_GetVariable(interp, argv[1], JIM_UNSHARED);
    if (!intObjPtr) {

        wideValue = 0;
    }
    else if (Jim_GetWide(interp, intObjPtr, &wideValue) != JIM_OK) {
        return JIM_ERR;
    }
    if (!intObjPtr || Jim_IsShared(intObjPtr)) {
        intObjPtr = Jim_NewIntObj(interp, wideValue + increment);
        if (Jim_SetVariable(interp, argv[1], intObjPtr) != JIM_OK) {
            Jim_FreeNewObj(interp, intObjPtr);
            return JIM_ERR;
        }
    }
    else {

        Jim_InvalidateStringRep(intObjPtr);
        JimWideValue(intObjPtr) = wideValue + increment;

        if (argv[1]->typePtr != &variableObjType) {

            Jim_SetVariable(interp, argv[1], intObjPtr);
        }
    }
    Jim_SetResult(interp, intObjPtr);
    return JIM_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
movq $0x1, -0x30(%rbp)
leal -0x4(%rsi), %eax
cmpl $-0x3, %eax
ja 0x1c2ee
leaq 0x1119a(%rip), %rcx     # 0x2d46d
movl $0x1, %r12d
movq %rbx, %rdi
movl $0x1, %esi
movq %r14, %rdx
callq 0x7454
jmp 0x1c42e
cmpl $0x3, %esi
jne 0x1c311
movq 0x10(%r14), %rsi
leaq -0x30(%rbp), %rdx
movq %rbx, %rdi
callq 0xd80a
movl $0x1, %r12d
testl %eax, %eax
jne 0x1c42e
movq 0x8(%r14), %rsi
movq %rbx, %rdi
movl $0x4, %edx
callq 0x98ef
movq %rax, %r15
testq %rax, %rax
je 0x1c364
leaq 0x19faf(%rip), %rax     # 0x362e0
cmpq %rax, 0x8(%r15)
je 0x1c34f
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0xd6d7
testl %eax, %eax
je 0x1c34f
xorl %eax, %eax
jmp 0x1c355
movq 0x18(%r15), %r13
movb $0x1, %al
movl $0x1, %r12d
testb %al, %al
jne 0x1c367
jmp 0x1c42e
xorl %r13d, %r13d
testq %r15, %r15
je 0x1c373
cmpl $0x2, 0x10(%r15)
jl 0x1c3be
addq -0x30(%rbp), %r13
movq %rbx, %rdi
callq 0xae58
movq %rax, %r15
leaq 0x19f57(%rip), %rax     # 0x362e0
movq %rax, 0x8(%r15)
movq $0x0, (%r15)
movq %r13, 0x18(%r15)
movq 0x8(%r14), %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq 0x871b
testl %eax, %eax
je 0x1c40b
movq %rbx, %rdi
movq %r15, %rsi
callq 0x759a
movl $0x1, %r12d
jmp 0x1c42e
movq (%r15), %rdi
testq %rdi, %rdi
sete %al
leaq 0x1beca(%rip), %rcx     # 0x38298
cmpq %rcx, %rdi
sete %cl
orb %al, %cl
jne 0x1c3e0
xorl %esi, %esi
callq *0x1bea8(%rip)          # 0x38288
movq $0x0, (%r15)
addq -0x30(%rbp), %r13
movq %r13, 0x18(%r15)
movq 0x8(%r14), %rsi
leaq 0x1a95e(%rip), %rax     # 0x36d58
cmpq %rax, 0x8(%rsi)
je 0x1c40b
movq %rbx, %rdi
movq %r15, %rdx
callq 0x871b
incl 0x10(%r15)
movq (%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0x1c428
movq %rbx, %rdi
callq 0x759a
movq %r15, (%rbx)
xorl %r12d, %r12d
movl %r12d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq