user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x108,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    %rsp,%rax
  mov    %rax,%rbx
  movl   $0x0,-0xfc(%rbp)
  jmp    L18
L103:
  mov    -0xfc(%rbp),%eax
  add    $0x61,%eax
  mov    %eax,%edx
  mov    -0xfc(%rbp),%eax
  cltq
  mov    %dl,-0x60(%rbp,%rax,1)
  mov    -0xfc(%rbp),%eax
  cltq
  mov    -0xfc(%rbp),%edx
  mov    %edx,-0xd0(%rbp,%rax,4)
  addl   $0x1,-0xfc(%rbp)
L18:
  cmpl   $0x19,-0xfc(%rbp)
  jle    L103
  lea    -0x100(%rbp),%rdx
  lea    -0x104(%rbp),%rax
  mov    %rax,%rsi
  lea    D3(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    -0x104(%rbp),%eax
  add    $0x1,%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0xf0(%rbp)
  movslq %eax,%rdx
  mov    %rdx,-0x120(%rbp)
  movq   $0x0,-0x118(%rbp)
  movslq %eax,%rdx
  mov    %rdx,-0x130(%rbp)
  movq   $0x0,-0x128(%rbp)
  cltq
  mov    $0x10,%edx
  sub    $0x1,%rdx
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L131:
  cmp    %rdx,%rsp
  je     L45
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L131
L45:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L106
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L106:
  mov    %rsp,%rax
  add    $0x0,%rax
  mov    %rax,-0xe8(%rbp)
  mov    -0xe8(%rbp),%rax
  mov    %rax,%rsi
  lea    D6(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  mov    -0x104(%rbp),%eax
  add    $0x1,%eax
  movslq %eax,%rdx
  sub    $0x1,%rdx
  mov    %rdx,-0xe0(%rbp)
  movslq %eax,%rdx
  mov    %rdx,%r14
  mov    $0x0,%r15d
  movslq %eax,%rdx
  mov    %rdx,%r12
  mov    $0x0,%r13d
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%esi
  mov    $0x0,%edx
  div    %rsi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L58:
  cmp    %rdx,%rsp
  je     L81
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L58
L81:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L44
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L44:
  mov    %rsp,%rax
  add    $0x7,%rax
  shr    $0x3,%rax
  shl    $0x3,%rax
  mov    %rax,-0xd8(%rbp)
  movl   $0x0,-0xfc(%rbp)
  jmp    L109
L116:
  mov    -0xe8(%rbp),%rdx
  mov    -0xfc(%rbp),%eax
  cltq
  movzbl (%rdx,%rax,1),%eax
  movsbq %al,%rax
  lea    -0x61(%rax),%rdx
  lea    -0x60(%rbp),%rax
  lea    (%rax,%rdx,1),%rcx
  mov    -0xd8(%rbp),%rax
  mov    -0xfc(%rbp),%edx
  movslq %edx,%rdx
  mov    %rcx,(%rax,%rdx,8)
  addl   $0x1,-0xfc(%rbp)
L109:
  mov    -0x104(%rbp),%eax
  cmp    %eax,-0xfc(%rbp)
  jl     L116
  movl   $0x0,-0xfc(%rbp)
  jmp    L30
L149:
  lea    -0x105(%rbp),%rdx
  lea    -0x106(%rbp),%rax
  mov    %rax,%rsi
  lea    D10(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <scanf@plt>
  movzbl -0x105(%rbp),%eax
  movsbl %al,%eax
  sub    $0x61,%eax
  cltq
  mov    -0xd0(%rbp,%rax,4),%eax
  movzbl -0x106(%rbp),%edx
  cltq
  mov    %dl,-0x60(%rbp,%rax,1)
  movzbl -0x106(%rbp),%eax
  movsbl %al,%eax
  sub    $0x61,%eax
  cltq
  mov    -0xd0(%rbp,%rax,4),%eax
  movzbl -0x105(%rbp),%edx
  cltq
  mov    %dl,-0x60(%rbp,%rax,1)
  movzbl -0x106(%rbp),%eax
  movsbl %al,%eax
  sub    $0x61,%eax
  cltq
  mov    -0xd0(%rbp,%rax,4),%eax
  mov    %eax,-0xf4(%rbp)
  movzbl -0x105(%rbp),%eax
  movsbl %al,%eax
  lea    -0x61(%rax),%edx
  movzbl -0x106(%rbp),%eax
  movsbl %al,%eax
  lea    -0x61(%rax),%ecx
  movslq %edx,%rax
  mov    -0xd0(%rbp,%rax,4),%edx
  movslq %ecx,%rax
  mov    %edx,-0xd0(%rbp,%rax,4)
  movzbl -0x105(%rbp),%eax
  movsbl %al,%eax
  sub    $0x61,%eax
  cltq
  mov    -0xf4(%rbp),%edx
  mov    %edx,-0xd0(%rbp,%rax,4)
  addl   $0x1,-0xfc(%rbp)
L30:
  mov    -0x100(%rbp),%eax
  cmp    %eax,-0xfc(%rbp)
  jl     L149
  movl   $0x0,-0xf8(%rbp)
  jmp    L96
L4:
  mov    -0xd8(%rbp),%rax
  mov    -0xf8(%rbp),%edx
  movslq %edx,%rdx
  mov    (%rax,%rdx,8),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <putchar@plt>
  addl   $0x1,-0xf8(%rbp)
L96:
  mov    -0x104(%rbp),%eax
  cmp    %eax,-0xf8(%rbp)
  jl     L4
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    $0x0,%eax
  mov    %rbx,%rsp
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L77
  call   <__stack_chk_fail@plt>
L77:
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

tool_calls: name: retrieve_data
arguments: data_tag: D3
type: string
name: retrieve_data
arguments: data_tag: D6
type: string
name: retrieve_data
arguments: data_tag: D10
type: string

tool: D3: %d %d

tool: D6: %s

tool: D10:  %c %c

assistant: ```c
int main(void) {
  char alphabet[26];
  int pos[26];
  int n, m;
  int i, j;
  for (i = 0; i < 26; i++) {
    alphabet[i] = 'a' + i;
    pos[i] = i;
  }
  scanf("%d %d", &n, &m);
  char s[n + 1];
  scanf("%s", s);
  char *a[n + 1];
  for (i = 0; i < n; i++) {
    a[i] = alphabet + (s[i] - 'a');
  }
  for (i = 0; i < m; i++) {
    char x, y;
    scanf(" %c %c", &x, &y);
    alphabet[pos[y - 'a']] = x;
    alphabet[pos[x - 'a']] = y;
    int temp = pos[x - 'a'];
    pos[x - 'a'] = pos[y - 'a'];
    pos[y - 'a'] = temp;
  }
  for (j = 0; j < n; j++) {
    printf("%c", *(a[j]));
  }
  printf("\n");
  return 0;
}
```