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

```asm
<map_reg>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x90,%rsp
  mov    %rdi,%rbp
  mov    %fs:0x28,%rax
  mov    %rax,0x88(%rsp)
  xor    %eax,%eax
  lea    D10(%rip),%rax
  mov    %rax,0x20(%rsp)
  lea    D120(%rip),%rax
  mov    %rax,0x28(%rsp)
  lea    D61(%rip),%rax
  mov    %rax,0x30(%rsp)
  lea    D86(%rip),%rax
  mov    %rax,0x38(%rsp)
  lea    D156(%rip),%rax
  mov    %rax,0x40(%rsp)
  lea    D33(%rip),%rax
  mov    %rax,0x48(%rsp)
  lea    D152(%rip),%rax
  mov    %rax,0x50(%rsp)
  lea    D23(%rip),%rax
  mov    %rax,0x58(%rsp)
  lea    D84(%rip),%rax
  mov    %rax,0x60(%rsp)
  lea    D48(%rip),%rax
  mov    %rax,0x68(%rsp)
  lea    D6(%rip),%rax
  mov    %rax,0x70(%rsp)
  lea    D41(%rip),%rax
  mov    %rax,0x78(%rsp)
  lea    D57(%rip),%rax
  mov    %rax,(%rsp)
  lea    D111(%rip),%rax
  mov    %rax,0x8(%rsp)
  lea    D4(%rip),%rax
  mov    %rax,0x10(%rsp)
  lea    D91(%rip),%rax
  mov    %rax,0x18(%rsp)
  mov    $0x0,%ebx
L48:
  mov    0x50(%rsp,%rbx,8),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L9
  add    $0x1,%rbx
  cmp    $0x6,%rbx
  jne    L48
  mov    $0x0,%ebx
L34:
  mov    (%rsp,%rbx,8),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L38
  add    $0x1,%rbx
  cmp    $0x4,%rbx
  jne    L34
  mov    %rbp,%rax
L69:
  mov    0x88(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L7
  add    $0x90,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L9:
  movslq %ebx,%r12
  mov    0x20(%rsp,%r12,8),%rax
  jmp    L69
L38:
  movslq %ebx,%r12
  mov    0x20(%rsp,%r12,8),%rax
  jmp    L69
L7:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_tag: D10
data_type: string
name: read_data
arguments: data_tag: D120
data_type: string
name: read_data
arguments: data_tag: D61
data_type: string
name: read_data
arguments: data_tag: D86
data_type: string
name: read_data
arguments: data_tag: D156
data_type: string
name: read_data
arguments: data_tag: D33
data_type: string
name: read_data
arguments: data_tag: D152
data_type: string
name: read_data
arguments: data_tag: D23
data_type: string
name: read_data
arguments: data_tag: D84
data_type: string
name: read_data
arguments: data_tag: D48
data_type: string
name: read_data
arguments: data_tag: D6
data_type: string
name: read_data
arguments: data_tag: D41
data_type: string
name: read_data
arguments: data_tag: D57
data_type: string
name: read_data
arguments: data_tag: D111
data_type: string
name: read_data
arguments: data_tag: D4
data_type: string
name: read_data
arguments: data_tag: D91
data_type: string

tool: D10: eax

tool: D120: ebx

tool: D61: ecx

tool: D86: edx

tool: D156: esi

tool: D33: edi

tool: D152: ax

tool: D23: bx

tool: D84: cx

tool: D48: dx

tool: D6: si

tool: D41: di

tool: D57: al

tool: D111: bl

tool: D4: cl

tool: D91: dl

assistant: ```c
const char *map_reg(const char *reg) {
  const char *regs_f[] = {"eax", "ebx", "ecx", "edx", "esi", "edi"};
  const char *regs_w[] = {"ax", "bx", "cx", "dx", "si", "di"};
  const char *regs_b[] = {"al", "bl", "cl", "dl"};
  int i;
  for (i = 0; i < (sizeof(regs_w) / sizeof(regs_w[0])); i++)
    if (!strcmp(reg, regs_w[i]))
      return regs_f[i];
  for (i = 0; i < (sizeof(regs_b) / sizeof(regs_b[0])); i++)
    if (!strcmp(reg, regs_b[i]))
      return regs_f[i];
  return reg;
}
```