// File: /workspace/github_c_makefile_star2_O0/msteveb[P]autosetup/./jimsh0.c
// Function: JimCreateProcedureStatics
static int JimCreateProcedureStatics(Jim_Interp *interp, Jim_Cmd *cmdPtr, Jim_Obj *staticsListObjPtr)
{
    int len, i;

    len = Jim_ListLength(interp, staticsListObjPtr);
    if (len == 0) {
        return JIM_OK;
    }

    cmdPtr->u.proc.staticVars = Jim_Alloc(sizeof(Jim_HashTable));
    Jim_InitHashTable(cmdPtr->u.proc.staticVars, &JimVariablesHashTableType, interp);
    for (i = 0; i < len; i++) {
        Jim_Obj *initObjPtr = NULL;
        Jim_Obj *nameObjPtr;
        Jim_VarVal *vv = NULL;
        Jim_Obj *objPtr = Jim_ListGetIndex(interp, staticsListObjPtr, i);
        int subLen = Jim_ListLength(interp, objPtr);
        int byref = 0;


        if (subLen != 1 && subLen != 2) {
            Jim_SetResultFormatted(interp, "too many fields in static specifier \"%#s\"",
                objPtr);
            return JIM_ERR;
        }

        nameObjPtr = Jim_ListGetIndex(interp, objPtr, 0);


        if (subLen == 1) {
            int len;
            const char *pt = Jim_GetString(nameObjPtr, &len);
            if (*pt == '&') {

                nameObjPtr = Jim_NewStringObj(interp, pt + 1, len - 1);
                byref = 1;
            }
        }
        Jim_IncrRefCount(nameObjPtr);

        if (subLen == 1) {
            switch (SetVariableFromAny(interp, nameObjPtr)) {
                case JIM_DICT_SUGAR:

                    if (byref) {
                        Jim_SetResultFormatted(interp, "Can't link to array element \"%#s\"", nameObjPtr);
                    }
                    else {
                        Jim_SetResultFormatted(interp, "Can't initialise array element \"%#s\"", nameObjPtr);
                    }
                    Jim_DecrRefCount(interp, nameObjPtr);
                    return JIM_ERR;

                case JIM_OK:
                    if (byref) {
                        vv = nameObjPtr->internalRep.varValue.vv;
                    }
                    else {
                        initObjPtr = Jim_GetVariable(interp, nameObjPtr, JIM_NONE);
                    }
                    break;

                case JIM_ERR:

                    Jim_SetResultFormatted(interp,
                        "variable for initialization of static \"%#s\" not found in the local context",
                        nameObjPtr);
                    Jim_DecrRefCount(interp, nameObjPtr);
                    return JIM_ERR;
            }
        }
        else {
            initObjPtr = Jim_ListGetIndex(interp, objPtr, 1);
        }

        if (vv == NULL) {
            vv = Jim_Alloc(sizeof(*vv));
            vv->objPtr = initObjPtr;
            Jim_IncrRefCount(vv->objPtr);
            vv->linkFramePtr = NULL;
            vv->refCount = 0;
        }

        if (JimSetNewVariable(cmdPtr->u.proc.staticVars, nameObjPtr, vv) != JIM_OK) {
            Jim_SetResultFormatted(interp,
                "static variable name \"%#s\" duplicated in statics list", nameObjPtr);
            JimIncrVarRef(vv);
            JimDecrVarRef(interp, vv);
            Jim_DecrRefCount(interp, nameObjPtr);
            return JIM_ERR;
        }

        Jim_DecrRefCount(interp, nameObjPtr);
    }
    return JIM_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x9b50
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jne 0x30216
movl $0x0, -0x4(%rbp)
jmp 0x3053a
xorl %eax, %eax
movl %eax, %edi
movl $0x30, %esi
callq *0x1806b(%rip)          # 0x48290
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x10(%rbp), %rdx
leaq 0x16c0d(%rip), %rsi     # 0x46e50
callq 0xb920
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x30533
movq $0x0, -0x30(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl -0x28(%rbp), %edx
callq 0x101d0
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x9b50
movl %eax, -0x4c(%rbp)
movl $0x0, -0x50(%rbp)
cmpl $0x1, -0x4c(%rbp)
je 0x302c4
cmpl $0x2, -0x4c(%rbp)
je 0x302c4
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rdx
leaq 0xca91(%rip), %rsi      # 0x3cd42
movb $0x0, %al
callq 0x6b40
movl $0x1, -0x4(%rbp)
jmp 0x3053a
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rsi
xorl %edx, %edx
callq 0x101d0
movq %rax, -0x38(%rbp)
cmpl $0x1, -0x4c(%rbp)
jne 0x3031e
movq -0x38(%rbp), %rdi
leaq -0x54(%rbp), %rsi
callq 0x89b0
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x26, %eax
jne 0x3031c
movq -0x10(%rbp), %rdi
movq -0x60(%rbp), %rsi
addq $0x1, %rsi
movl -0x54(%rbp), %edx
subl $0x1, %edx
callq 0x7990
movq %rax, -0x38(%rbp)
movl $0x1, -0x50(%rbp)
jmp 0x3031e
movq -0x38(%rbp), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
cmpl $0x1, -0x4c(%rbp)
jne 0x30434
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0xd9d0
movl %eax, %ecx
movl %ecx, -0x64(%rbp)
testl %eax, %eax
je 0x303c8
jmp 0x3034d
movl -0x64(%rbp), %eax
subl $0x1, %eax
je 0x303f1
jmp 0x3035b
movl -0x64(%rbp), %eax
subl $0x64, %eax
jne 0x30432
jmp 0x30369
cmpl $0x0, -0x50(%rbp)
je 0x30387
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rdx
leaq 0xc9ee(%rip), %rsi      # 0x3cd6c
movb $0x0, %al
callq 0x6b40
jmp 0x3039d
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rdx
leaq 0xc9f8(%rip), %rsi      # 0x3cd8e
movb $0x0, %al
callq 0x6b40
movq -0x38(%rbp), %rcx
movl 0x10(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rcx)
cmpl $0x0, %eax
jg 0x303bc
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x7a10
movl $0x1, -0x4(%rbp)
jmp 0x3053a
cmpl $0x0, -0x50(%rbp)
je 0x303dc
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x303ef
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
xorl %edx, %edx
callq 0xa7b0
movq %rax, -0x30(%rbp)
jmp 0x30432
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rdx
leaq 0xc9b3(%rip), %rsi      # 0x3cdb3
movb $0x0, %al
callq 0x6b40
movq -0x38(%rbp), %rcx
movl 0x10(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rcx)
cmpl $0x0, %eax
jg 0x30426
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x7a10
movl $0x1, -0x4(%rbp)
jmp 0x3053a
jmp 0x3044a
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rsi
movl $0x1, %edx
callq 0x101d0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x30496
xorl %eax, %eax
movl %eax, %edi
movl $0x18, %esi
callq *0x17e30(%rip)          # 0x48290
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, (%rax)
movq -0x40(%rbp), %rax
movq (%rax), %rax
movl 0x10(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x10(%rax)
movq -0x40(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x40(%rbp), %rax
movl $0x0, 0x10(%rax)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x1f7c0
cmpl $0x0, %eax
je 0x30504
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rdx
leaq 0xc93f(%rip), %rsi      # 0x3cdfe
movb $0x0, %al
callq 0x6b40
movq -0x40(%rbp), %rdi
callq 0x20070
movq -0x10(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x20090
movq -0x38(%rbp), %rcx
movl 0x10(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rcx)
cmpl $0x0, %eax
jg 0x304fb
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x7a10
movl $0x1, -0x4(%rbp)
jmp 0x3053a
movq -0x38(%rbp), %rcx
movl 0x10(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x10(%rcx)
cmpl $0x0, %eax
jg 0x30523
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x7a10
jmp 0x30525
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x3024f
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)