// File: /workspace/github_c_makefile_star2_O0/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
subq $0x100, %rsp            # imm = 0x100
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x7b50
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x10(%rbp)
jg 0x1c22f
movq -0x8(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x1fba8(%rip), %rsi     # 0x3bd5b
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x7990
movq -0x70(%rbp), %rdi
movq -0x68(%rbp), %rsi
movq %rax, %rdx
callq 0x7bd0
movq -0x8(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x8d60
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rsi
movq %rax, %rdx
callq 0x7bd0
movq -0x8(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rdi
movq $-0x1, %rsi
callq 0x8d60
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq %rax, %rdx
callq 0x7bd0
jmp 0x1c47d
movl -0x14(%rbp), %eax
andl $0x7f, %eax
cmpl $0x0, %eax
jne 0x1c2f4
movq -0x8(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x1fb01(%rip), %rsi     # 0x3bd60
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x7990
movq -0xa0(%rbp), %rdi
movq -0x98(%rbp), %rsi
movq %rax, %rdx
callq 0x7bd0
movq -0x8(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x8d60
movq -0x90(%rbp), %rdi
movq -0x88(%rbp), %rsi
movq %rax, %rdx
callq 0x7bd0
movq -0x8(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %eax
andl $0xff00, %eax           # imm = 0xFF00
sarl $0x8, %eax
movslq %eax, %rsi
callq 0x8d60
movq -0x80(%rbp), %rdi
movq -0x78(%rbp), %rsi
movq %rax, %rdx
callq 0x7bd0
jmp 0x1c47b
movl -0x14(%rbp), %eax
andl $0x7f, %eax
addl $0x1, %eax
movsbl %al, %eax
sarl %eax
cmpl $0x0, %eax
jle 0x1c32e
leaq 0x1fa5e(%rip), %rax     # 0x3bd6c
movq %rax, -0x30(%rbp)
leaq 0x1fa5f(%rip), %rax     # 0x3bd78
movq %rax, -0x38(%rbp)
movl -0x14(%rbp), %edi
andl $0x7f, %edi
callq 0x168a0
movq %rax, -0x40(%rbp)
jmp 0x1c34f
leaq 0x1fa4a(%rip), %rax     # 0x3bd7f
movq %rax, -0x30(%rbp)
leaq 0x1fa49(%rip), %rax     # 0x3bd89
movq %rax, -0x38(%rbp)
leaq 0x1f530(%rip), %rax     # 0x3b87b
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x7990
movq -0xb0(%rbp), %rdi
movq -0xa8(%rbp), %rsi
movq %rax, %rdx
callq 0x7bd0
cmpq $0x0, -0x20(%rbp)
je 0x1c404
movq -0x8(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0xc0(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0xb8(%rbp)
movl -0x14(%rbp), %edi
andl $0x7f, %edi
callq 0x168a0
movq -0xc8(%rbp), %rdi
movq -0xc0(%rbp), %rsi
movq -0xb8(%rbp), %rcx
movq %rax, %r9
leaq 0x1f9b4(%rip), %rdx     # 0x3bd93
leaq 0x1f9b4(%rip), %r8      # 0x3bd9a
leaq 0x1f2bc(%rip), %rax     # 0x3b6a9
xorl %r10d, %r10d
movq %rax, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, %al
callq 0xca20
movq -0x8(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x8d60
movq -0xe8(%rbp), %rdi
movq -0xe0(%rbp), %rsi
movq %rax, %rdx
callq 0x7bd0
movq -0x8(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0x8(%rbp), %rdi
movq -0x40(%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x7990
movq -0xd8(%rbp), %rdi
movq -0xd0(%rbp), %rsi
movq %rax, %rdx
callq 0x7bd0
jmp 0x1c47d
movq -0x28(%rbp), %rax
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
nopw (%rax,%rax)