// File: /workspace/github_c_makefile_star2_O0/JimKent[P]linearSat/lib/errabort.c
// Function: warnWithBackTrace
void warnWithBackTrace(char *format, ...)
/* Issue a warning message and append backtrace. */
{
va_list args;
va_start(args, format);
struct dyString *dy = newDyString(255);
dyStringAppend(dy, format);

#define STACK_LIMIT 20
char **strings = NULL;
int count = 0;

// developer: this is an occasionally useful means of getting stack info without crashing
// however, it is not supported on cygwin.  Conditionally compile this in when desired.
// The define is at top to include execinfo.h
#ifdef BACKTRACE_EXISTS
void *buffer[STACK_LIMIT];
count = backtrace(buffer, STACK_LIMIT);
strings = backtrace_symbols(buffer, count);
#endif///def BACKTRACE_EXISTS

if (strings == NULL)
    dyStringAppend(dy,"\nno backtrace_symbols available in errabort::warnWithBackTrace().");
else
    {
    int ix = 1;
    dyStringAppend(dy,"\nBACKTRACE (use on cmdLine):");
    if (strings[1] != NULL)
        {
        strSwapChar(strings[1],' ','\0');
        dyStringPrintf(dy,"\naddr2line -Cfise %s",strings[1]);
        strings[1] += strlen(strings[1]) + 1;
        }
    for (; ix < count && strings[ix] != NULL; ix++)
        {
        strings[ix] = skipBeyondDelimit(strings[ix],'[');
        strSwapChar(strings[ix],']','\0');
        dyStringPrintf(dy," %s",strings[ix]);
        }

    free(strings);
    }
vaWarn(dyStringCannibalize(&dy), args);
va_end(args);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
testb %al, %al
je 0xf9cb
movaps %xmm0, -0xc0(%rbp)
movaps %xmm1, -0xb0(%rbp)
movaps %xmm2, -0xa0(%rbp)
movaps %xmm3, -0x90(%rbp)
movaps %xmm4, -0x80(%rbp)
movaps %xmm5, -0x70(%rbp)
movaps %xmm6, -0x60(%rbp)
movaps %xmm7, -0x50(%rbp)
movq %r9, -0xc8(%rbp)
movq %r8, -0xd0(%rbp)
movq %rcx, -0xd8(%rbp)
movq %rdx, -0xe0(%rbp)
movq %rsi, -0xe8(%rbp)
movq %rdi, -0x8(%rbp)
leaq -0x20(%rbp), %rax
leaq -0xf0(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x8, (%rax)
movl $0xff, %edi
callq 0xf030
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0xf3c0
movq $0x0, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0xfa5c
movq -0x28(%rbp), %rdi
leaq 0x14f2a(%rip), %rsi     # 0x2497c
callq 0xf3c0
jmp 0xfbb3
movl $0x1, -0x38(%rbp)
movq -0x28(%rbp), %rdi
leaq 0x14f50(%rip), %rsi     # 0x249be
callq 0xf3c0
movq -0x30(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0xfae9
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0xf8(%rbp)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x31f0
movq -0xf8(%rbp), %rdi
movl %eax, %esi
movl $0x20, %edx
xorl %ecx, %ecx
callq 0xb1b0
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0x14f19(%rip), %rsi     # 0x249db
movb $0x0, %al
callq 0xf550
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x31f0
movq %rax, %rcx
addq $0x1, %rcx
movq -0x30(%rbp), %rax
addq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
jmp 0xfaeb
movl -0x38(%rbp), %ecx
xorl %eax, %eax
cmpl -0x34(%rbp), %ecx
movb %al, -0xf9(%rbp)
jge 0xfb11
movq -0x30(%rbp), %rax
movslq -0x38(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
setne %al
movb %al, -0xf9(%rbp)
movb -0xf9(%rbp), %al
testb $0x1, %al
jne 0xfb20
jmp 0xfbaa
movq -0x30(%rbp), %rax
movslq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movl $0x5b, %esi
callq 0xbc10
movq %rax, %rdx
movq -0x30(%rbp), %rax
movslq -0x38(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x30(%rbp), %rax
movslq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x108(%rbp)
movq -0x30(%rbp), %rax
movslq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x31f0
movq -0x108(%rbp), %rdi
movl %eax, %esi
movl $0x5d, %edx
xorl %ecx, %ecx
callq 0xb1b0
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rax
movslq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x152ee(%rip), %rsi     # 0x24e83
movb $0x0, %al
callq 0xf550
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0xfaeb
movq -0x30(%rbp), %rdi
callq 0x3060
leaq -0x28(%rbp), %rdi
callq 0xf0d0
movq %rax, %rdi
leaq -0x20(%rbp), %rsi
callq 0xf8b0
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
nopw %cs:(%rax,%rax)