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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %edi,-0x14(%rbp)
  mov    %rsi,-0x20(%rbp)
  lea    D373(%rip),%rax
  mov    %rax,%rsi
  lea    D18(%rip),%rax
  mov    %rax,%rdi
  call   <utl_log_open@plt>
  mov    $0x23,%edx
  lea    D132(%rip),%rax
  mov    %rax,%rsi
  mov    $0x20,%edi
  call   <utl_malloc@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  mov    $0x24,%edx
  lea    D132(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <utl_check@plt>
  test   %eax,%eax
  sete   %al
  movzbl %al,%eax
  mov    $0x24,%ecx
  lea    D132(%rip),%rdx
  lea    D113(%rip),%rsi
  mov    %eax,%edi
  call   <utl_log_check@plt>
  mov    $0x0,%eax
  call   <utl_mem_used@plt>
  cmp    $0x20,%eax
  sete   %al
  movzbl %al,%eax
  mov    $0x25,%ecx
  lea    D132(%rip),%rdx
  lea    D153(%rip),%rsi
  mov    %eax,%edi
  call   <utl_log_check@plt>
  mov    -0x8(%rbp),%rax
  mov    $0x27,%edx
  lea    D132(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <utl_free@plt>
  mov    -0x8(%rbp),%rax
  mov    $0x28,%edx
  lea    D132(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <utl_check@plt>
  test   %eax,%eax
  setne  %al
  movzbl %al,%eax
  mov    $0x28,%ecx
  lea    D132(%rip),%rdx
  lea    D128(%rip),%rsi
  mov    %eax,%edi
  call   <utl_log_check@plt>
  mov    $0x0,%eax
  call   <utl_mem_used@plt>
  test   %eax,%eax
  sete   %al
  movzbl %al,%eax
  mov    $0x29,%ecx
  lea    D132(%rip),%rdx
  lea    D27(%rip),%rsi
  mov    %eax,%edi
  call   <utl_log_check@plt>
  mov    -0x8(%rbp),%rax
  mov    $0x2b,%edx
  lea    D132(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <utl_free@plt>
  mov    -0x8(%rbp),%rax
  mov    $0x2c,%edx
  lea    D132(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <utl_check@plt>
  test   %eax,%eax
  setne  %al
  movzbl %al,%eax
  mov    $0x2c,%ecx
  lea    D132(%rip),%rdx
  lea    D128(%rip),%rsi
  mov    %eax,%edi
  call   <utl_log_check@plt>
  mov    $0x2e,%edx
  lea    D132(%rip),%rax
  mov    %rax,%rsi
  mov    $0x0,%edi
  call   <utl_malloc@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  mov    $0x2f,%edx
  lea    D132(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <utl_check@plt>
  test   %eax,%eax
  sete   %al
  movzbl %al,%eax
  mov    $0x2f,%ecx
  lea    D132(%rip),%rdx
  lea    D113(%rip),%rsi
  mov    %eax,%edi
  call   <utl_log_check@plt>
  mov    -0x8(%rbp),%rax
  mov    $0x31,%edx
  lea    D132(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <utl_free@plt>
  mov    $0x32,%ecx
  lea    D132(%rip),%rax
  mov    %rax,%rdx
  mov    $0x4,%esi
  mov    $0x8,%edi
  call   <utl_calloc@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  mov    $0x33,%edx
  lea    D132(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <utl_check@plt>
  test   %eax,%eax
  sete   %al
  movzbl %al,%eax
  mov    $0x33,%ecx
  lea    D132(%rip),%rdx
  lea    D113(%rip),%rsi
  mov    %eax,%edi
  call   <utl_log_check@plt>
  movl   $0x0,-0xc(%rbp)
  movl   $0x0,-0x10(%rbp)
  jmp    L17
L1:
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  add    %eax,-0x10(%rbp)
  addl   $0x1,-0xc(%rbp)
L17:
  cmpl   $0x1f,-0xc(%rbp)
  jle    L1
  cmpl   $0x0,-0x10(%rbp)
  sete   %al
  movzbl %al,%eax
  mov    $0x36,%ecx
  lea    D132(%rip),%rdx
  lea    D136(%rip),%rsi
  mov    %eax,%edi
  call   <utl_log_check@plt>
  mov    -0x8(%rbp),%rax
  mov    $0x37,%edx
  lea    D132(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <utl_free@plt>
  mov    $0x39,%edx
  lea    D132(%rip),%rax
  mov    %rax,%rsi
  mov    $0x10,%edi
  call   <utl_malloc@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  mov    $0x3a,%edx
  lea    D132(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <utl_check@plt>
  test   %eax,%eax
  sete   %al
  movzbl %al,%eax
  mov    $0x3a,%ecx
  lea    D132(%rip),%rdx
  lea    D113(%rip),%rsi
  mov    %eax,%edi
  call   <utl_log_check@plt>
  mov    $0x0,%eax
  call   <utl_mem_used@plt>
  cmp    $0x10,%eax
  sete   %al
  movzbl %al,%eax
  mov    $0x3b,%ecx
  lea    D132(%rip),%rdx
  lea    D231(%rip),%rsi
  mov    %eax,%edi
  call   <utl_log_check@plt>
  mov    -0x8(%rbp),%rax
  add    $0x10,%rax
  movb   $0x0,(%rax)
  mov    -0x8(%rbp),%rax
  mov    $0x3e,%edx
  lea    D132(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <utl_check@plt>
  cmp    $0xffffffff,%eax
  sete   %al
  movzbl %al,%eax
  mov    $0x3e,%ecx
  lea    D132(%rip),%rdx
  lea    D188(%rip),%rsi
  mov    %eax,%edi
  call   <utl_log_check@plt>
  mov    -0x8(%rbp),%rax
  mov    $0x3f,%edx
  lea    D132(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <utl_free@plt>
  lea    D285(%rip),%rax
  mov    %rax,%rdi
  call   <utl_log_close@plt>
  mov    $0x0,%eax
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D373
data_type: string
name: disassemble_data
arguments: data_label: D18
data_type: string
name: disassemble_data
arguments: data_label: D132
data_type: string
name: disassemble_data
arguments: data_label: D113
data_type: string
name: disassemble_data
arguments: data_label: D153
data_type: string
name: disassemble_data
arguments: data_label: D128
data_type: string
name: disassemble_data
arguments: data_label: D27
data_type: string
name: disassemble_data
arguments: data_label: D136
data_type: string
name: disassemble_data
arguments: data_label: D231
data_type: string
name: disassemble_data
arguments: data_label: D188
data_type: string
name: disassemble_data
arguments: data_label: D285
data_type: string

tool: D373: w

tool: D18: l_mem.log

tool: D132: /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/rdentato/clibutl/refs/heads/master/test/ut_mem.c

tool: D113: memVALID == memcheck(ptr_a)

tool: D153: 32 == memused()

tool: D128: memVALID != memcheck(ptr_a)

tool: D27: 0 == memused()

tool: D136: 0 == valid

tool: D231: 16 == memused()

tool: D188: memOVERFLOW == memcheck(ptr_a)

tool: D285: LOG STOP

assistant: ```c
int main(int argc, char *argv[]) {
  char *ptr_a;
  int valid;
  int k;
  utl_log_open("l_mem.log", "w");
  ptr_a = (char *)utl_malloc(32, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/rdentato/clibutl/refs/heads/master/test/ut_mem.c", 35);
  utl_log_check(!!(0 == utl_check(ptr_a, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/rdentato/clibutl/refs/heads/master/test/ut_mem.c", 36)), "memVALID == memcheck(ptr_a)", "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/rdentato/clibutl/refs/heads/master/test/ut_mem.c", 36);
  utl_log_check(!!(32 == utl_mem_used()), "32 == memused()", "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/rdentato/clibutl/refs/heads/master/test/ut_mem.c", 37);
  utl_free(ptr_a, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/rdentato/clibutl/refs/heads/master/test/ut_mem.c", 39);
  utl_log_check(!!(0 != utl_check(ptr_a, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/rdentato/clibutl/refs/heads/master/test/ut_mem.c", 40)), "memVALID != memcheck(ptr_a)", "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/rdentato/clibutl/refs/heads/master/test/ut_mem.c", 40);
  utl_log_check(!!(0 == utl_mem_used()), "0 == memused()", "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/rdentato/clibutl/refs/heads/master/test/ut_mem.c", 41);
  utl_free(ptr_a, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/rdentato/clibutl/refs/heads/master/test/ut_mem.c", 43);
  utl_log_check(!!(0 != utl_check(ptr_a, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/rdentato/clibutl/refs/heads/master/test/ut_mem.c", 44)), "memVALID != memcheck(ptr_a)", "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/rdentato/clibutl/refs/heads/master/test/ut_mem.c", 44);
  ptr_a = (char *)utl_malloc(0, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/rdentato/clibutl/refs/heads/master/test/ut_mem.c", 46);
  utl_log_check(!!(0 == utl_check(ptr_a, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/rdentato/clibutl/refs/heads/master/test/ut_mem.c", 47)), "memVALID == memcheck(ptr_a)", "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/rdentato/clibutl/refs/heads/master/test/ut_mem.c", 47);
  utl_free(ptr_a, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/rdentato/clibutl/refs/heads/master/test/ut_mem.c", 49);
  ptr_a = (char *)utl_calloc(8, 4, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/rdentato/clibutl/refs/heads/master/test/ut_mem.c", 50);
  utl_log_check(!!(0 == utl_check(ptr_a, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/rdentato/clibutl/refs/heads/master/test/ut_mem.c", 51)), "memVALID == memcheck(ptr_a)", "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/rdentato/clibutl/refs/heads/master/test/ut_mem.c", 51);
  for (k = 0, valid = 0; k < 32; k++)
    valid += ptr_a[k];
  utl_log_check(!!(0 == valid), "0 == valid", "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/rdentato/clibutl/refs/heads/master/test/ut_mem.c", 54);
  utl_free(ptr_a, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/rdentato/clibutl/refs/heads/master/test/ut_mem.c", 55);
  ptr_a = (char *)utl_malloc(16, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/rdentato/clibutl/refs/heads/master/test/ut_mem.c", 57);
  utl_log_check(!!(0 == utl_check(ptr_a, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/rdentato/clibutl/refs/heads/master/test/ut_mem.c", 58)), "memVALID == memcheck(ptr_a)", "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/rdentato/clibutl/refs/heads/master/test/ut_mem.c", 58);
  utl_log_check(!!(16 == utl_mem_used()), "16 == memused()", "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/rdentato/clibutl/refs/heads/master/test/ut_mem.c", 59);
  ptr_a[16] = '\0';
  utl_log_check(!!(-1 == utl_check(ptr_a, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/rdentato/clibutl/refs/heads/master/test/ut_mem.c", 62)), "memOVERFLOW == memcheck(ptr_a)", "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/rdentato/clibutl/refs/heads/master/test/ut_mem.c", 62);
  utl_free(ptr_a, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/rdentato/clibutl/refs/heads/master/test/ut_mem.c", 63);
  utl_log_close("LOG STOP");
  return 0;
}
```