// File: /workspace/github_c_makefile_star2_O0/nilyang[P]redis-tdd-annotation/src/redis-check-dump.c
// Function: printErrorStack
void printErrorStack(entry *e) {
    unsigned int i;
    char body[64];

    if (e->type == -1) {
        sprintf(body, "Error trace");
    } else if (e->type >= 253) {
        sprintf(body, "Error trace (%s)", types[e->type]);
    } else if (!e->key) {
        sprintf(body, "Error trace (%s: (unknown))", types[e->type]);
    } else {
        char tmp[41];
        strncpy(tmp, e->key, 40);

        /* display truncation at the last 3 chars */
        if (strlen(e->key) > 40) {
            memset(&tmp[37], '.', 3);
        }

        /* display unprintable characters as ? */
        for (i = 0; i < strlen(tmp); i++) {
            if (tmp[i] <= 32) tmp[i] = '?';
        }
        sprintf(body, "Error trace (%s: %s)", types[e->type], tmp);
    }

    printCentered(4, 80, body);

    /* display error stack */
    for (i = 0; i < errors.level; i++) {
        printf("0x%08lx - %s\n",
            (unsigned long) errors.offset[i], errors.error[i]);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $-0x1, 0x8(%rax)
jne 0x2920
leaq -0x50(%rbp), %rdi
leaq 0x1a2d(%rip), %rsi      # 0x4341
movb $0x0, %al
callq 0x1120
jmp 0x2a4a
movq -0x8(%rbp), %rax
cmpl $0xfd, 0x8(%rax)
jl 0x295a
leaq -0x50(%rbp), %rdi
movq -0x8(%rbp), %rax
movslq 0x8(%rax), %rax
leaq 0x89c0(%rip), %rdx      # 0xb300
shlq $0x4, %rax
addq %rax, %rdx
leaq 0x19ff(%rip), %rsi      # 0x434d
movb $0x0, %al
callq 0x1120
jmp 0x2a48
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
jne 0x2991
leaq -0x50(%rbp), %rdi
movq -0x8(%rbp), %rax
movslq 0x8(%rax), %rax
leaq 0x8989(%rip), %rdx      # 0xb300
shlq $0x4, %rax
addq %rax, %rdx
leaq 0x19d9(%rip), %rsi      # 0x435e
movb $0x0, %al
callq 0x1120
jmp 0x2a46
leaq -0x80(%rbp), %rdi
movq -0x8(%rbp), %rax
movq (%rax), %rsi
movl $0x28, %edx
callq 0x1050
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x1060
cmpq $0x28, %rax
jbe 0x29cf
leaq -0x80(%rbp), %rdi
addq $0x25, %rdi
movl $0x2e, %esi
movl $0x3, %edx
callq 0x1090
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq %rax, -0x88(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x1060
movq %rax, %rcx
movq -0x88(%rbp), %rax
cmpq %rcx, %rax
jae 0x2a1a
movl -0xc(%rbp), %eax
movsbl -0x80(%rbp,%rax), %eax
cmpl $0x20, %eax
jg 0x2a0d
movl -0xc(%rbp), %eax
movb $0x3f, -0x80(%rbp,%rax)
jmp 0x2a0f
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x29d6
leaq -0x50(%rbp), %rdi
movq -0x8(%rbp), %rax
movslq 0x8(%rax), %rax
leaq 0x88d3(%rip), %rdx      # 0xb300
shlq $0x4, %rax
addq %rax, %rdx
leaq -0x80(%rbp), %rcx
leaq 0x193b(%rip), %rsi      # 0x437a
movb $0x0, %al
callq 0x1120
jmp 0x2a48
jmp 0x2a4a
leaq -0x50(%rbp), %rdx
movl $0x4, %edi
movl $0x50, %esi
callq 0x2790
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpq 0x886a(%rip), %rax      # 0xb2d8
jae 0x2aae
movl -0xc(%rbp), %eax
movl %eax, %ecx
leaq 0x47dc(%rip), %rax      # 0x7258
movq 0x4000(%rax,%rcx,8), %rsi
movl -0xc(%rbp), %eax
leaq 0x47ca(%rip), %rdx      # 0x7258
shlq $0xa, %rax
addq %rax, %rdx
leaq 0x18f3(%rip), %rdi      # 0x438f
movb $0x0, %al
callq 0x1080
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x2a64
addq $0x90, %rsp
popq %rbp
retq
nopw (%rax,%rax)