// File: /workspace/github_c_makefile_star2_O0/msteveb[P]autosetup/./jimsh0.c
// Function: JimBuildEnv
static char **JimBuildEnv(Jim_Interp *interp)
{
    int i;
    int size;
    int num;
    int n;
    char **envptr;
    char *envdata;

    Jim_Obj *objPtr = Jim_GetGlobalVariableStr(interp, "env", JIM_NONE);

    if (!objPtr) {
        return JimOriginalEnviron();
    }



    num = Jim_ListLength(interp, objPtr);
    if (num % 2) {

        num--;
    }
    size = Jim_Length(objPtr) + 2;

    envptr = Jim_Alloc(sizeof(*envptr) * (num / 2 + 1) + size);
    envdata = (char *)&envptr[num / 2 + 1];

    n = 0;
    for (i = 0; i < num; i += 2) {
        const char *s1, *s2;
        Jim_Obj *elemObj;

        Jim_ListIndex(interp, objPtr, i, &elemObj, JIM_NONE);
        s1 = Jim_String(elemObj);
        Jim_ListIndex(interp, objPtr, i + 1, &elemObj, JIM_NONE);
        s2 = Jim_String(elemObj);

        envptr[n] = envdata;
        envdata += sprintf(envdata, "%s=%s", s1, s2);
        envdata++;
        n++;
    }
    envptr[n] = NULL;
    *envdata = 0;

    return envptr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x20030(%rip), %rsi     # 0x3bd47
xorl %edx, %edx
callq 0xe490
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x1bd37
callq 0x1bf80
movq %rax, -0x8(%rbp)
jmp 0x1beb1
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x9b50
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
je 0x1bd60
movl -0x1c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x38(%rbp), %rdi
callq 0xc700
addl $0x2, %eax
movl %eax, -0x18(%rbp)
movq 0x2c51a(%rip), %rax     # 0x48290
movq %rax, -0x60(%rbp)
movl -0x1c(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x60(%rbp), %rax
addl $0x1, %ecx
movslq %ecx, %rsi
shlq $0x3, %rsi
movslq -0x18(%rbp), %rcx
addq %rcx, %rsi
xorl %ecx, %ecx
movl %ecx, %edi
callq *%rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x58(%rbp)
movl -0x1c(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x58(%rbp), %rax
addl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0x20(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x1be92
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl -0x14(%rbp), %edx
leaq -0x50(%rbp), %rcx
xorl %r8d, %r8d
callq 0x10260
movq -0x50(%rbp), %rdi
callq 0x7960
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl -0x14(%rbp), %edx
addl $0x1, %edx
leaq -0x50(%rbp), %rcx
xorl %r8d, %r8d
callq 0x10260
movq -0x50(%rbp), %rdi
callq 0x7960
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rdx
movq -0x28(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x30(%rbp), %rdi
movq -0x40(%rbp), %rdx
movq -0x48(%rbp), %rcx
leaq 0x1fef3(%rip), %rsi     # 0x3bd4b
movb $0x0, %al
callq 0x6490
movl %eax, %ecx
movq -0x30(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
movl -0x14(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x14(%rbp)
jmp 0x1bdde
movq -0x28(%rbp), %rax
movslq -0x20(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
movq -0x30(%rbp), %rax
movb $0x0, (%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)