user: 请从给定的汇编指令推导出C源代码:

```asm
<dump_log>:
  endbr64
  lea    0xf(%rsi),%eax
  shr    $0x4,%eax
  je     L45
  push   %r15
  add    $0x1,%eax
  push   %r14
  shl    $0x4,%eax
  lea    D4(%rip),%r14
  push   %r13
  mov    $0x10,%r13d
  push   %r12
  mov    %esi,%r12d
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,0x8(%rsp)
  mov    %eax,0x1c(%rsp)
  movq   $0x0,0x10(%rsp)
  cs nopw 0x0(%rax,%rax,1)
L48:
  mov    0x10(%rsp),%ebx
  xor    %r15d,%r15d
  lea    D58(%rip),%rsi
  xor    %eax,%eax
  mov    $0x8,%edi
  mov    %ebx,%edx
  call   <log_redirect@plt>
  mov    %r13d,0x18(%rsp)
  mov    %r15,%r13
  mov    0x8(%rsp),%r15
  jmp    L50
  nopl   0x0(%rax,%rax,1)
L11:
  movzbl (%r15,%r13,1),%edx
  mov    $0x8,%edi
  xor    %eax,%eax
  and    $0x3,%ebp
  lea    D44(%rip),%rsi
  call   <log_redirect@plt>
  cmp    $0x3,%ebp
  je     L139
L108:
  add    $0x1,%r13
  cmp    $0x10,%r13
  je     L91
L50:
  lea    (%rbx,%r13,1),%eax
  mov    %r13d,%ebp
  cmp    %eax,%r12d
  ja     L11
  mov    %r14,%rsi
  mov    $0x8,%edi
  xor    %eax,%eax
  and    $0x3,%ebp
  call   <log_redirect@plt>
  cmp    $0x3,%ebp
  jne    L108
L139:
  lea    D38(%rip),%rsi
  mov    $0x8,%edi
  xor    %eax,%eax
  add    $0x1,%r13
  call   <log_redirect@plt>
  cmp    $0x10,%r13
  jne    L50
L91:
  mov    %r14,%rsi
  mov    $0x8,%edi
  xor    %eax,%eax
  mov    0x18(%rsp),%r13d
  call   <log_redirect@plt>
  lea    D60(%rip),%r15
  mov    0x8(%rsp),%rbp
  jmp    L89
  nopl   0x0(%rax)
L77:
  mov    %r15,%rsi
  mov    $0x8,%edi
  xor    %eax,%eax
  call   <log_redirect@plt>
L4:
  add    $0x1,%ebx
  add    $0x1,%rbp
  cmp    %r13d,%ebx
  je     L33
L89:
  cmp    %r12d,%ebx
  jae    L120
  movzbl 0x0(%rbp),%edx
  lea    -0x20(%rdx),%eax
  cmp    $0x5e,%al
  ja     L77
  lea    D12(%rip),%rsi
  xor    %eax,%eax
  add    $0x1,%ebx
  add    $0x1,%rbp
  mov    $0x8,%edi
  call   <log_redirect@plt>
  cmp    %r13d,%ebx
  jne    L89
L33:
  lea    D45(%rip),%rsi
  mov    $0x8,%edi
  xor    %eax,%eax
  add    $0x10,%r13d
  call   <log_redirect@plt>
  addq   $0x10,0x10(%rsp)
  addq   $0x10,0x8(%rsp)
  cmp    0x1c(%rsp),%r13d
  jne    L48
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L120:
  mov    %r14,%rsi
  mov    $0x8,%edi
  xor    %eax,%eax
  call   <log_redirect@plt>
  jmp    L4
L45:
  ret
```

tool_calls: name: read_data
arguments: label: D4
type: string
name: read_data
arguments: label: D58
type: string
name: read_data
arguments: label: D44
type: string
name: read_data
arguments: label: D38
type: string
name: read_data
arguments: label: D60
type: string
name: read_data
arguments: label: D12
type: string
name: read_data
arguments: label: D45
type: string

tool: D4:   

tool: D58: %04X 

tool: D44: %02x

tool: D38:  

tool: D60: .

tool: D12: %c

tool: D45: 


assistant: ```c
void dump_log(const void *nom_dump, unsigned int lng) {
  unsigned int i, j;
  unsigned int nbr_line;
  unsigned char car;
  nbr_line = (lng + 0x10 - 1) / 0x10;
  for (i = 0; (i < nbr_line); i++) {
    log_redirect((1 << 3), "%04X ", i * 0x10);
    for (j = 0; j < 0x10; j++) {
      if (i * 0x10 + j < lng) {
        car = *((const unsigned char *)nom_dump + i * 0x10 + j);
        log_redirect((1 << 3), "%02x", car);
      } else
        log_redirect((1 << 3), "  ");
      if (j % 4 == (4 - 1))
        log_redirect((1 << 3), " ");
    }
    log_redirect((1 << 3), "  ");
    for (j = 0; j < 0x10; j++) {
      if (i * 0x10 + j < lng) {
        car = *((const unsigned char *)nom_dump + i * 0x10 + j);
        if ((car < 32) || (car >= 127))
          log_redirect((1 << 3), ".");
        else
          log_redirect((1 << 3), "%c", car);
      } else
        log_redirect((1 << 3), "  ");
    }
    log_redirect((1 << 3), "\n");
  }
}
```