// File: /workspace/github_c_makefile_star2_O2/msteveb[P]autosetup/./jimsh0.c
// Function: JimMakeErrorCode
static Jim_Obj *JimMakeErrorCode(Jim_Interp *interp, long pid, int waitStatus, Jim_Obj *errStrObj)
{
    Jim_Obj *errorCode = Jim_NewListObj(interp, NULL, 0);

    if (pid <= 0) {
        Jim_ListAppendElement(interp, errorCode, Jim_NewStringObj(interp, "NONE", -1));
        Jim_ListAppendElement(interp, errorCode, Jim_NewIntObj(interp, pid));
        Jim_ListAppendElement(interp, errorCode, Jim_NewIntObj(interp, -1));
    }
    else if (WIFEXITED(waitStatus)) {
        Jim_ListAppendElement(interp, errorCode, Jim_NewStringObj(interp, "CHILDSTATUS", -1));
        Jim_ListAppendElement(interp, errorCode, Jim_NewIntObj(interp, pid));
        Jim_ListAppendElement(interp, errorCode, Jim_NewIntObj(interp, WEXITSTATUS(waitStatus)));
    }
    else {
        const char *type;
        const char *action;
        const char *signame;

        if (WIFSIGNALED(waitStatus)) {
            type = "CHILDKILLED";
            action = "killed";
            signame = Jim_SignalId(WTERMSIG(waitStatus));
        }
        else {
            type = "CHILDSUSP";
            action = "suspended";
            signame = "none";
        }

        Jim_ListAppendElement(interp, errorCode, Jim_NewStringObj(interp, type, -1));

        if (errStrObj) {
            Jim_AppendStrings(interp, errStrObj, "child ", action, " by signal ", Jim_SignalId(WTERMSIG(waitStatus)), "\n", NULL);
        }

        Jim_ListAppendElement(interp, errorCode, Jim_NewIntObj(interp, pid));
        Jim_ListAppendElement(interp, errorCode, Jim_NewStringObj(interp, signame, -1));
    }
    return errorCode;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r12
movl %edx, %r13d
movq %rsi, %r15
movq %rdi, %rbx
xorl %esi, %esi
xorl %edx, %edx
callq 0x745b
movq %rax, %r14
testq %r15, %r15
jle 0x14f12
movl %r13d, %edi
andl $0x7f, %edi
je 0x14f50
movl %edi, %eax
shll $0x18, %eax
addl $0x1000000, %eax        # imm = 0x1000000
cmpl $0x2000000, %eax        # imm = 0x2000000
jl 0x14f9c
movl %edi, %r13d
callq 0x11ad0
movq %rax, -0x38(%rbp)
leaq 0x12b04(%rip), %rax     # 0x27a06
movq %rax, -0x30(%rbp)
leaq 0x12aed(%rip), %rsi     # 0x279fa
jmp 0x14fbc
leaq 0x12ad0(%rip), %rsi     # 0x279e9
pushq $-0x1
popq %rdx
movq %rbx, %rdi
callq 0x7363
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x74ad
movq %rbx, %rdi
movq %r15, %rsi
callq 0x8212
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x74ad
pushq $-0x1
popq %rsi
jmp 0x14f8f
leaq 0x12a97(%rip), %rsi     # 0x279ee
pushq $-0x1
popq %rdx
movq %rbx, %rdi
callq 0x7363
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x74ad
movq %rbx, %rdi
movq %r15, %rsi
callq 0x8212
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x74ad
movl %r13d, %eax
movzbl %ah, %esi
movq %rbx, %rdi
callq 0x8212
jmp 0x1503d
movl %edi, %r13d
leaq 0x125c7(%rip), %rax     # 0x2756d
movq %rax, -0x38(%rbp)
leaq 0x12a66(%rip), %rax     # 0x27a17
movq %rax, -0x30(%rbp)
leaq 0x12a51(%rip), %rsi     # 0x27a0d
pushq $-0x1
popq %rdx
movq %rbx, %rdi
callq 0x7363
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x74ad
testq %r12, %r12
je 0x15015
movl %r13d, %edi
callq 0x11ad0
leaq 0x129ea(%rip), %rcx     # 0x279d3
movq %rcx, (%rsp)
andq $0x0, 0x8(%rsp)
leaq 0x12a27(%rip), %rdx     # 0x27a21
leaq 0x12a27(%rip), %r8      # 0x27a28
movq %rbx, %rdi
movq %r12, %rsi
movq -0x30(%rbp), %rcx
movq %rax, %r9
xorl %eax, %eax
callq 0xa731
movq %rbx, %rdi
movq %r15, %rsi
callq 0x8212
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x74ad
pushq $-0x1
popq %rdx
movq %rbx, %rdi
movq -0x38(%rbp), %rsi
callq 0x7363
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x74ad
movq %r14, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq