user: What is the c source code of the assembly code below?

```asm
<show_last_n_error_page>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  lea    -0x4(%rsi),%ebx
  sub    $0xa8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x98(%rsp)
  xor    %eax,%eax
  cmp    $0x3,%ebx
  jle    L173
  mov    %edx,%ebp
  lea    0x4(%rdi),%r15
  lea    0x10(%rsp),%r14
  lea    D25(%rip),%rdi
  lea    D59(%rip),%r13
  call   <puts@plt>
  test   %ebp,%ebp
  je     L26
  nopw   0x0(%rax,%rax,1)
L80:
  movzbl (%r15),%esi
  movzbl 0x3(%r15),%r8d
  mov    %r13,%rdi
  movzbl 0x1(%r15),%eax
  movzbl 0x2(%r15),%r12d
  shl    $0x8,%esi
  lea    0x4(%r8),%ebp
  mov    %r8d,(%rsp)
  add    %eax,%esi
  xor    %eax,%eax
  call   <printf@plt>
  cmp    $0x4,%ebp
  je     L154
  mov    %r12d,%eax
  mov    (%rsp),%r8d
  lea    0x4(%r15),%r9
  and    $0x3,%eax
  cmp    $0x3,%al
  je     L103
  test   $0x1,%r12b
  jne    L90
  mov    %r9,0x8(%rsp)
  lea    D9(%rip),%rdi
  mov    %r8d,(%rsp)
L157:
  call   <puts@plt>
  mov    (%rsp),%esi
  mov    0x8(%rsp),%rdi
  xor    %eax,%eax
  mov    $0x1,%edx
  call   <dStrHex@plt>
L154:
  movzbl %r12b,%edi
  mov    $0x80,%edx
  mov    %r14,%rsi
  xor    %eax,%eax
  call   <get_pcb_str@plt>
  sub    %ebp,%ebx
  mov    %r14,%rsi
  xor    %eax,%eax
  lea    D56(%rip),%rdi
  movslq %ebp,%rbp
  call   <printf@plt>
  add    %rbp,%r15
  test   %ebx,%ebx
  jle    L9
  cmp    $0x2,%ebx
  jg     L80
L138:
  lea    D58(%rip),%rdi
  call   <puts@plt>
L9:
  mov    0x98(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L169
  add    $0xa8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L175:
  mov    %r8,(%rsp)
  lea    D9(%rip),%rdi
L14:
  call   <puts@plt>
  mov    (%rsp),%rdi
  mov    $0x1,%edx
  xor    %eax,%eax
  mov    %r14d,%esi
  call   <dStrHex@plt>
L10:
  movslq %r12d,%r8
  sub    %r12d,%ebx
  add    %r8,%r15
  test   %ebx,%ebx
  jle    L9
  cmp    $0x2,%ebx
  jle    L138
L26:
  movzbl (%r15),%esi
  movzbl 0x1(%r15),%eax
  mov    %r13,%rdi
  movzbl 0x3(%r15),%r14d
  movzbl 0x2(%r15),%ebp
  shl    $0x8,%esi
  add    %eax,%esi
  lea    0x4(%r14),%r12d
  xor    %eax,%eax
  call   <printf@plt>
  cmp    $0x4,%r12d
  je     L10
  mov    %ebp,%eax
  lea    0x4(%r15),%r8
  and    $0x3,%eax
  cmp    $0x3,%al
  je     L39
  and    $0x1,%ebp
  je     L175
  mov    %r8,%rdx
  mov    %r14d,%esi
  lea    D99(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L10
  nopl   0x0(%rax)
L90:
  mov    %r9,%rdx
  mov    %r8d,%esi
  lea    D99(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L154
  nopl   0x0(%rax)
L39:
  mov    %r8,(%rsp)
  lea    D7(%rip),%rdi
  jmp    L14
L173:
  mov    0x98(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L169
  add    $0xa8,%rsp
  lea    D106(%rip),%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1090 <puts@plt>
L103:
  mov    %r9,0x8(%rsp)
  lea    D7(%rip),%rdi
  jmp    L157
L169:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_label: D25
data_type: string
name: disassemble_data
arguments: data_label: D59
data_type: string
name: disassemble_data
arguments: data_label: D9
data_type: string
name: disassemble_data
arguments: data_label: D56
data_type: string
name: disassemble_data
arguments: data_label: D58
data_type: string
name: disassemble_data
arguments: data_label: D99
data_type: string
name: disassemble_data
arguments: data_label: D7
data_type: string
name: disassemble_data
arguments: data_label: D106
data_type: string

tool: D25: Last n error events log page

tool: D59:   Error event %d:


tool: D9:     [data counter?? (LP bit should be set)]:

tool: D56:         <%s>


tool: D58: short Last n error events log page

tool: D99:     %.*s


tool: D7:     [binary]:

tool: D106: No error events logged

assistant: ```c
void show_last_n_error_page(unsigned char *resp, int len, int show_pcb) {
  int k, num, pl, pc, pcb;
  unsigned char *ucp;
  char pcb_str[128];
  num = len - 4;
  ucp = &resp[0] + 4;
  if (num < 4) {
    printf("No error events logged\n");
    return;
  }
  printf("Last n error events log page\n");
  for (k = num; k > 0; k -= pl, ucp += pl) {
    if (k < 3) {
      printf("short Last n error events log page\n");
      return;
    }
    pl = ucp[3] + 4;
    pc = (ucp[0] << 8) + ucp[1];
    pcb = ucp[2];
    printf("  Error event %d:\n", pc);
    if (pl > 4) {
      if ((pcb & 0x1) && (pcb & 0x2)) {
        printf("    [binary]:\n");
        dStrHex((const char *)ucp + 4, pl - 4, 1);
      } else if (pcb & 0x1)
        printf("    %.*s\n", pl - 4, (const char *)(ucp + 4));
      else {
        printf("    [data counter?? (LP bit should be set)]:\n");
        dStrHex((const char *)ucp + 4, pl - 4, 1);
      }
    }
    if (show_pcb) {
      get_pcb_str(pcb, pcb_str, sizeof(pcb_str));
      printf("        <%s>\n", pcb_str);
    }
  }
}
```