// File: /workspace/github_c_makefile_star2_O1/msteveb[P]autosetup/./jimsh0.c
// Function: Jim_EnvCoreCommand
static int Jim_EnvCoreCommand(Jim_Interp *interp, int argc, Jim_Obj *const *argv)
{
    const char *key;
    const char *val;

    if (argc == 1) {
        char **e = Jim_GetEnviron();

        int i;
        Jim_Obj *listObjPtr = Jim_NewListObj(interp, NULL, 0);

        for (i = 0; e[i]; i++) {
            const char *equals = strchr(e[i], '=');

            if (equals) {
                Jim_ListAppendElement(interp, listObjPtr, Jim_NewStringObj(interp, e[i],
                        equals - e[i]));
                Jim_ListAppendElement(interp, listObjPtr, Jim_NewStringObj(interp, equals + 1, -1));
            }
        }

        Jim_SetResult(interp, listObjPtr);
        return JIM_OK;
    }

    if (argc > 3) {
        Jim_WrongNumArgs(interp, 1, argv, "varName ?default?");
        return JIM_ERR;
    }
    key = Jim_String(argv[1]);
    val = getenv(key);
    if (val == NULL) {
        if (argc < 3) {
            Jim_SetResultFormatted(interp, "environment variable \"%#s\" does not exist", argv[1]);
            return JIM_ERR;
        }
        val = Jim_String(argv[2]);
    }
    Jim_SetResult(interp, Jim_NewStringObj(interp, val, -1));
    return JIM_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x1, %esi
jne 0x218df
movq 0x16779(%rip), %rax     # 0x37fb8
movq (%rax), %r13
movq %rbx, %rdi
callq 0xae58
movq %rax, %r14
leaq 0x14b04(%rip), %rax     # 0x36358
movq %rax, 0x8(%r14)
movq $0x0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%r14)
movq (%r13), %r15
testq %r15, %r15
je 0x218d6
addq $0x8, %r13
movq %r15, %rdi
movl $0x3d, %esi
callq 0x61c0
testq %rax, %rax
je 0x218c9
movq %rax, %r12
movl %r12d, %edx
subl %r15d, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x7516
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x7695
incq %r12
movq %rbx, %rdi
movq %r12, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x7516
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x7695
movq (%r13), %r15
addq $0x8, %r13
testq %r15, %r15
jne 0x21874
incl 0x10(%r14)
jmp 0x21960
movq %rdx, %r14
movl %esi, %r15d
cmpl $0x4, %esi
jl 0x21909
leaq 0xcaf2(%rip), %rcx      # 0x2e3e3
movl $0x1, %r15d
movq %rbx, %rdi
movl $0x1, %esi
movq %r14, %rdx
callq 0x7454
jmp 0x2197f
movq 0x8(%r14), %r12
cmpq $0x0, (%r12)
jne 0x2191f
movq 0x8(%r12), %rax
movq %r12, %rdi
callq *0x18(%rax)
movq (%r12), %rdi
callq 0x6030
testq %rax, %rax
jne 0x2194a
cmpl $0x3, %r15d
jne 0x21991
movq 0x10(%r14), %r14
cmpq $0x0, (%r14)
jne 0x21947
movq 0x8(%r14), %rax
movq %r14, %rdi
callq *0x18(%rax)
movq (%r14), %rax
movq %rbx, %rdi
movq %rax, %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x7516
movq %rax, %r14
incl 0x10(%rax)
movq (%rbx), %rsi
movl 0x10(%rsi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0x10(%rsi)
cmpl $0x1, %eax
jg 0x21979
movq %rbx, %rdi
callq 0x759a
movq %r14, (%rbx)
xorl %r15d, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%r14), %rdx
leaq 0xca59(%rip), %rsi      # 0x2e3f5
movq %rbx, %rdi
xorl %eax, %eax
callq 0x692d
movl $0x1, %r15d
jmp 0x2197f