// File: /workspace/github_c_makefile_star2_O1/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, %r12
movq %rsi, %rbx
movq %rdi, %r14
callq 0xe338
movslq 0x20(%rbx), %r13
movq %r13, %rax
shlq $0x4, %rax
movq %rax, -0x50(%rbp)
leaq 0x58(%rax), %rsi
xorl %edi, %edi
callq *0x14c05(%rip)          # 0x38288
testq %rax, %rax
je 0x23ad0
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, 0x30(%rax)
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x40(%rax)
movq $0x0, 0x50(%rax)
movabsq $0x100000001, %rcx      # imm = 0x100000001
movq %rcx, (%rax)
movq %rbx, 0x18(%rax)
movq %r13, -0x48(%rbp)
movl %r13d, 0x30(%rax)
movq %r15, 0x20(%rax)
movl $0xffffffff, 0x3c(%rax) # imm = 0xFFFFFFFF
movq %rax, %rcx
addq $0x58, %rcx
movq %rcx, 0x48(%rax)
movq 0x128(%r14), %rcx
movq %rcx, 0x50(%rax)
movq %rbx, -0x58(%rbp)
incl 0x10(%rbx)
incl 0x10(%r15)
movq %rax, -0x30(%rbp)
movq 0x50(%rax), %rax
incl 0x10(%rax)
testq %r12, %r12
je 0x238df
movq %r14, %rdi
movq %r12, %rsi
callq 0xe338
movl 0x20(%r12), %eax
movl %eax, -0x38(%rbp)
testl %eax, %eax
je 0x238df
xorl %r13d, %r13d
movl $0x30, %esi
xorl %edi, %edi
callq *0x14b5a(%rip)          # 0x38288
movq -0x30(%rbp), %rcx
movq %rax, 0x28(%rcx)
movq $0x0, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rax)
movl $0x0, 0x28(%rax)
leaq 0x1367e(%rip), %rcx     # 0x36dd0
movq %rcx, 0x8(%rax)
movq %r14, 0x10(%rax)
cmpl $0x0, -0x38(%rbp)
jle 0x238df
movq %r12, -0x40(%rbp)
movq %r14, %rdi
movq %r12, %rsi
movl %r13d, %edx
callq 0xe871
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0xe338
movl 0x20(%r15), %ebx
leal -0x3(%rbx), %eax
cmpl $-0x3, %eax
jbe 0x23a2e
movq %r14, %rdi
movq %r15, %rsi
callq 0xe338
cmpl $0x0, 0x20(%r15)
jle 0x237af
movq 0x18(%r15), %rax
movq (%rax), %r12
jmp 0x237b2
xorl %r12d, %r12d
movb $0x1, %al
cmpl $0x1, %ebx
jne 0x237ee
cmpq $0x0, (%r12)
jne 0x237cb
movq 0x8(%r12), %rax
movq %r12, %rdi
callq *0x18(%rax)
movq (%r12), %rsi
cmpb $0x26, (%rsi)
setne %al
jne 0x237ee
movl 0x14(%r12), %edx
incq %rsi
decl %edx
movq %r14, %rdi
callq 0x7516
movq %rax, %r12
xorl %eax, %eax
incl 0x10(%r12)
cmpl $0x1, %ebx
jne 0x23820
movl %eax, %ebx
movq %r14, %rdi
movq %r12, %rsi
callq 0xc1a3
testl %eax, %eax
je 0x238ba
cmpl $0x1, %eax
je 0x23a9a
cmpl $0x64, %eax
jne 0x2383c
jmp 0x23a84
movq %r14, %rdi
movq %r15, %rsi
callq 0xe338
cmpl $0x2, 0x20(%r15)
jl 0x2383c
movq 0x18(%r15), %rax
movq 0x8(%rax), %rbx
jmp 0x2383e
xorl %ebx, %ebx
xorl %r15d, %r15d
movq -0x30(%rbp), %rcx
testq %r15, %r15
jne 0x23873
movl $0x18, %esi
xorl %edi, %edi
callq *0x14a31(%rip)          # 0x38288
movq -0x30(%rbp), %rcx
movq %rax, %r15
movq %rbx, (%rax)
incl 0x10(%rbx)
movq $0x0, 0x8(%rax)
movl $0x0, 0x10(%rax)
movq 0x28(%rcx), %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0xa8c2
testl %eax, %eax
jne 0x23a5f
movl 0x10(%r12), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%r12)
cmpl $0x1, %eax
jg 0x238a7
movq %r14, %rdi
movq %r12, %rsi
callq 0x759a
incl %r13d
cmpl %r13d, -0x38(%rbp)
movq -0x40(%rbp), %r12
jne 0x23768
jmp 0x238df
testb %bl, %bl
je 0x238d3
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x98ef
movq %rax, %rbx
jmp 0x2383e
movq 0x18(%r12), %r15
xorl %ebx, %ebx
jmp 0x23841
cmpl $0x0, -0x48(%rbp)
jle 0x239da
xorl %ebx, %ebx
xorl %r13d, %r13d
movq %r14, -0x38(%rbp)
movq %r14, %rdi
movq -0x58(%rbp), %rsi
movl %r13d, %edx
callq 0xe871
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0xe338
movl 0x20(%r15), %r12d
testl %r12d, %r12d
je 0x239e0
cmpl $0x3, %r12d
jge 0x239e9
cmpl $0x2, %r12d
jne 0x2394b
movq %r14, %rdi
movq %r15, %rsi
callq 0xe338
cmpl $0x0, 0x20(%r15)
jle 0x23950
movq 0x18(%r15), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x23958
xorl %r14d, %r14d
jmp 0x2397b
movq $0x0, -0x40(%rbp)
movq %r14, %rdi
movq %r15, %rsi
callq 0xe338
cmpl $0x2, 0x20(%r15)
jl 0x23974
movq 0x18(%r15), %rax
movq 0x8(%rax), %r14
jmp 0x23977
xorl %r14d, %r14d
movq -0x40(%rbp), %r15
movq -0x38(%rbp), %rdi
movq %r15, %rsi
leaq 0xa030(%rip), %rdx      # 0x2d9b9
callq 0x73d6
testl %eax, %eax
je 0x239a2
movq -0x30(%rbp), %rcx
cmpl $0x0, 0x3c(%rcx)
jns 0x239f2
movl %r13d, 0x3c(%rcx)
jmp 0x239b4
cmpl $0x2, %r12d
movq -0x30(%rbp), %rcx
jne 0x239b1
incl 0x38(%rcx)
jmp 0x239b4
incl 0x34(%rcx)
movq 0x48(%rcx), %rax
movq %r15, (%rax,%rbx)
movq 0x48(%rcx), %rax
movq %r14, 0x8(%rax,%rbx)
incl %r13d
addq $0x10, %rbx
cmpq %rbx, -0x50(%rbp)
movq -0x38(%rbp), %r14
jne 0x238f2
movq -0x30(%rbp), %rax
jmp 0x23a50
leaq 0x9f90(%rip), %rsi      # 0x2d977
jmp 0x239fd
leaq 0x9f9d(%rip), %rsi      # 0x2d98d
jmp 0x23a35
leaq 0x9fc5(%rip), %rsi      # 0x2d9be
movq -0x38(%rbp), %r14
movq %r14, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x7516
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 0x23a29
movq %r14, %rdi
callq 0x759a
movq %rbx, (%r14)
jmp 0x23a42
leaq 0x9fa9(%rip), %rsi      # 0x2d9de
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x692d
movq %r14, %rdi
movq -0x30(%rbp), %rsi
callq 0x18e6b
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xa034(%rip), %rsi      # 0x2da9a
movq %r14, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x692d
incl 0x10(%r15)
movq %r14, %rdi
movq %r15, %rsi
callq 0x190fc
jmp 0x23aae
leaq 0x9f9f(%rip), %rax      # 0x2da2a
leaq 0x9f76(%rip), %rsi      # 0x2da08
testb %bl, %bl
cmovneq %rax, %rsi
jmp 0x23aa1
leaq 0x9fae(%rip), %rsi      # 0x2da4f
movq %r14, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x692d
movl 0x10(%r12), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%r12)
cmpl $0x1, %eax
jg 0x23a42
movq %r14, %rdi
movq %r12, %rsi
callq 0x759a
jmp 0x23a42
leaq 0x9e40(%rip), %rdi      # 0x2d917
leaq 0x8125(%rip), %rsi      # 0x2bc03
leaq 0x9e39(%rip), %rcx      # 0x2d91e
movl $0x28ff, %edx           # imm = 0x28FF
callq 0x6220