// File: /workspace/github_c_makefile_star2_O3/msteveb[P]autosetup/./jimsh0.c
// Function: JimCreateProcedureCmd
static Jim_Cmd *JimCreateProcedureCmd(Jim_Interp *interp, Jim_Obj *argListObjPtr,
    Jim_Obj *staticsListObjPtr, Jim_Obj *bodyObjPtr, Jim_Obj *nsObj)
{
    Jim_Cmd *cmdPtr;
    int argListLen;
    int i;

    argListLen = Jim_ListLength(interp, argListObjPtr);


    cmdPtr = Jim_Alloc(sizeof(*cmdPtr) + sizeof(struct Jim_ProcArg) * argListLen);
    assert(cmdPtr);
    memset(cmdPtr, 0, sizeof(*cmdPtr));
    cmdPtr->inUse = 1;
    cmdPtr->isproc = 1;
    cmdPtr->u.proc.argListObjPtr = argListObjPtr;
    cmdPtr->u.proc.argListLen = argListLen;
    cmdPtr->u.proc.bodyObjPtr = bodyObjPtr;
    cmdPtr->u.proc.argsPos = -1;
    cmdPtr->u.proc.arglist = (struct Jim_ProcArg *)(cmdPtr + 1);
    cmdPtr->u.proc.nsObj = nsObj ? nsObj : interp->emptyObj;
    Jim_IncrRefCount(argListObjPtr);
    Jim_IncrRefCount(bodyObjPtr);
    Jim_IncrRefCount(cmdPtr->u.proc.nsObj);


    if (staticsListObjPtr && JimCreateProcedureStatics(interp, cmdPtr, staticsListObjPtr) != JIM_OK) {
        goto err;
    }



    for (i = 0; i < argListLen; i++) {
        Jim_Obj *argPtr;
        Jim_Obj *nameObjPtr;
        Jim_Obj *defaultObjPtr;
        int len;


        argPtr = Jim_ListGetIndex(interp, argListObjPtr, i);
        len = Jim_ListLength(interp, argPtr);
        if (len == 0) {
            Jim_SetResultString(interp, "argument with no name", -1);
err:
            JimDecrCmdRefCount(interp, cmdPtr);
            return NULL;
        }
        if (len > 2) {
            Jim_SetResultFormatted(interp, "too many fields in argument specifier \"%#s\"", argPtr);
            goto err;
        }

        if (len == 2) {

            nameObjPtr = Jim_ListGetIndex(interp, argPtr, 0);
            defaultObjPtr = Jim_ListGetIndex(interp, argPtr, 1);
        }
        else {

            nameObjPtr = argPtr;
            defaultObjPtr = NULL;
        }


        if (Jim_CompareStringImmediate(interp, nameObjPtr, "args")) {
            if (cmdPtr->u.proc.argsPos >= 0) {
                Jim_SetResultString(interp, "'args' specified more than once", -1);
                goto err;
            }
            cmdPtr->u.proc.argsPos = i;
        }
        else {
            if (len == 2) {
                cmdPtr->u.proc.optArity++;
            }
            else {
                cmdPtr->u.proc.reqArity++;
            }
        }

        cmdPtr->u.proc.arglist[i].nameObjPtr = nameObjPtr;
        cmdPtr->u.proc.arglist[i].defaultObjPtr = defaultObjPtr;
    }

    return cmdPtr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, %r15
movq %rdx, -0x48(%rbp)
movq %rsi, %r12
movq %rdi, %r14
callq 0xe2fe
movslq 0x20(%r12), %r13
movq %r13, %rax
shlq $0x4, %rax
movq %rax, -0x58(%rbp)
leaq 0x58(%rax), %rsi
xorl %edi, %edi
callq *0x144e2(%rip)          # 0x37288
testq %rax, %rax
je 0x23220
movq %rax, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rax)
movups %xmm0, 0x28(%rax)
movups %xmm0, 0x38(%rax)
movups %xmm0, 0x48(%rax)
movups %xmm0, 0x8(%rax)
movabsq $0x100000001, %rax      # imm = 0x100000001
movq %rax, (%rbx)
movq %r12, 0x18(%rbx)
movq %r13, -0x50(%rbp)
movl %r13d, 0x30(%rbx)
movq %r15, 0x20(%rbx)
movl $0xffffffff, 0x3c(%rbx) # imm = 0xFFFFFFFF
movq %rbx, %rax
addq $0x58, %rax
movq %rax, 0x48(%rbx)
movq 0x128(%r14), %rax
movq %rax, 0x50(%rbx)
movq %r12, -0x60(%rbp)
incl 0x10(%r12)
incl 0x10(%r15)
movq 0x50(%rbx), %rax
incl 0x10(%rax)
movq -0x48(%rbp), %r12
testq %r12, %r12
movq %rbx, -0x30(%rbp)
je 0x22ff3
movq %r14, %rdi
movq %r12, %rsi
callq 0xe2fe
movl 0x20(%r12), %eax
movl %eax, -0x3c(%rbp)
testl %eax, %eax
je 0x22ff3
xorl %r13d, %r13d
movl $0x30, %esi
xorl %edi, %edi
callq *0x14435(%rip)          # 0x37288
movq %rax, 0x28(%rbx)
movq $0x0, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rax)
movl $0x0, 0x28(%rax)
leaq 0x12f5d(%rip), %rcx     # 0x35dd0
movq %rcx, 0x8(%rax)
movq %r14, 0x10(%rax)
cmpl $0x0, -0x3c(%rbp)
jle 0x22ff3
movq %r14, %rdi
movq %r12, %rsi
movl %r13d, %edx
callq 0xe803
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0xe2fe
movl 0x20(%r15), %ebx
leal -0x3(%rbx), %eax
cmpl $-0x3, %eax
jbe 0x2315f
movq %r14, %rdi
movq %r15, %rsi
callq 0xe2fe
cmpl $0x0, 0x20(%r15)
jle 0x22ecc
movq 0x18(%r15), %rax
movq (%rax), %r12
jmp 0x22ecf
xorl %r12d, %r12d
cmpl $0x1, %ebx
jne 0x22f38
movq (%r12), %rsi
testq %rsi, %rsi
jne 0x22eec
movq 0x8(%r12), %rax
movq %r12, %rdi
callq *0x18(%rax)
movq (%r12), %rsi
movb (%rsi), %bl
cmpb $0x26, %bl
jne 0x22f08
movl 0x14(%r12), %edx
incq %rsi
decl %edx
movq %r14, %rdi
callq 0x7508
movq %rax, %r12
leaq 0x10(%r12), %r15
incl 0x10(%r12)
movq %r14, %rdi
movq %r12, %rsi
callq 0xc1c1
testl %eax, %eax
movq %r15, -0x38(%rbp)
je 0x22f62
cmpl $0x1, %eax
je 0x231e2
cmpl $0x64, %eax
jne 0x22f71
jmp 0x231cb
leaq 0x10(%r12), %rax
movq %rax, -0x38(%rbp)
incl 0x10(%r12)
movq %r14, %rdi
movq %r15, %rsi
callq 0xe2fe
cmpl $0x2, 0x20(%r15)
jl 0x22f71
movq 0x18(%r15), %rax
movq 0x8(%rax), %rbx
jmp 0x22f73
cmpb $0x26, %bl
jne 0x22fe1
movq 0x18(%r12), %r15
testq %r15, %r15
jne 0x22f98
xorl %ebx, %ebx
movl $0x18, %esi
xorl %edi, %edi
callq *0x14308(%rip)          # 0x37288
movq %rax, %r15
movq %rbx, (%rax)
incl 0x10(%rbx)
movq $0x0, 0x8(%rax)
movl $0x0, 0x10(%rax)
movq -0x30(%rbp), %rbx
movq 0x28(%rbx), %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0xa8a8
testl %eax, %eax
jne 0x23196
movq -0x38(%rbp), %rdx
movl (%rdx), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rdx)
cmpl $0x1, %eax
jg 0x22fce
movq %r14, %rdi
movq %r12, %rsi
callq 0x758c
incl %r13d
cmpl %r13d, -0x3c(%rbp)
movq -0x48(%rbp), %r12
jne 0x22e85
jmp 0x22ff3
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x98e7
movq %rax, %rbx
jmp 0x22f73
cmpl $0x0, -0x50(%rbp)
jle 0x23184
xorl %r15d, %r15d
xorl %r13d, %r13d
movq %r14, -0x38(%rbp)
movq %r14, %rdi
movq -0x60(%rbp), %rsi
movl %r13d, %edx
callq 0xe803
movq %rax, %r12
movq %r14, %rdi
movq %rax, %rsi
callq 0xe2fe
movl 0x20(%r12), %eax
testl %eax, %eax
je 0x23104
cmpl $0x3, %eax
jge 0x2310d
cmpl $0x2, %eax
jne 0x2305c
movq %r14, %rdi
movq %r12, %rsi
callq 0xe2fe
cmpl $0x0, 0x20(%r12)
jle 0x23077
movq 0x18(%r12), %rax
movq (%rax), %rbx
jmp 0x23079
movq %r14, %rdi
movq %r12, %rsi
leaq 0x98f2(%rip), %rdx      # 0x2c95b
callq 0x73c6
testl %eax, %eax
je 0x230c4
xorl %r14d, %r14d
jmp 0x230b8
xorl %ebx, %ebx
movq %r14, %rdi
movq %r12, %rsi
callq 0xe2fe
cmpl $0x2, 0x20(%r12)
jl 0x23097
movq 0x18(%r12), %rax
movq 0x8(%rax), %r14
jmp 0x2309a
xorl %r14d, %r14d
movq -0x38(%rbp), %rdi
movq %rbx, %rsi
leaq 0x98b3(%rip), %rdx      # 0x2c95b
callq 0x73c6
testl %eax, %eax
je 0x230cc
movq %rbx, %r12
movq -0x30(%rbp), %rbx
cmpl $0x0, 0x3c(%rbx)
jns 0x23123
movl %r13d, 0x3c(%rbx)
jmp 0x230d9
incl 0x34(%rbx)
xorl %r14d, %r14d
jmp 0x230d9
movq -0x30(%rbp), %rax
incl 0x38(%rax)
movq %rbx, %r12
movq %rax, %rbx
movq 0x48(%rbx), %rax
movq %r12, (%rax,%r15)
movq 0x48(%rbx), %rax
movq %r14, 0x8(%rax,%r15)
incl %r13d
addq $0x10, %r15
cmpq %r15, -0x58(%rbp)
movq -0x38(%rbp), %r14
jne 0x23007
jmp 0x23184
leaq 0x980e(%rip), %rsi      # 0x2c919
jmp 0x2312e
leaq 0x981b(%rip), %rsi      # 0x2c92f
movq %r14, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x6923
jmp 0x23177
leaq 0x9836(%rip), %rsi      # 0x2c960
movq -0x38(%rbp), %r14
movq %r14, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x7508
movq %rax, %rbx
incl 0x10(%rax)
movq (%r14), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0x2315a
movq %r14, %rdi
callq 0x758c
movq %rbx, (%r14)
jmp 0x23173
leaq 0x981a(%rip), %rsi      # 0x2c980
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x6923
movq -0x30(%rbp), %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x189aa
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x989f(%rip), %rsi      # 0x2ca3c
movq %r14, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x6923
incl 0x10(%r15)
movq %r14, %rdi
movq %r15, %rsi
callq 0x18c3b
movq -0x38(%rbp), %rdx
movl (%rdx), %eax
leal -0x1(%rax), %ecx
movl %ecx, (%rdx)
cmpl $0x1, %eax
jg 0x23177
jmp 0x23210
cmpb $0x26, %bl
leaq 0x97d5(%rip), %rax      # 0x2c9aa
leaq 0x97f0(%rip), %rsi      # 0x2c9cc
cmoveq %rax, %rsi
jmp 0x231e9
leaq 0x9808(%rip), %rsi      # 0x2c9f1
movq %r14, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x6923
movl 0x10(%r12), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%r12)
cmpl $0x1, %eax
movq -0x30(%rbp), %rbx
jg 0x23177
movq %r14, %rdi
movq %r12, %rsi
callq 0x758c
jmp 0x23177
leaq 0x9692(%rip), %rdi      # 0x2c8b9
leaq 0x797d(%rip), %rsi      # 0x2abab
leaq 0x968b(%rip), %rcx      # 0x2c8c0
movl $0x28ff, %edx           # imm = 0x28FF
callq 0x6220