user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<create_letter_distribution_diagram>:
  endbr64
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  push   %rbx
  sub    $0x108,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0xf8(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rbx
  lea    0x80(%rsp),%rbp
  call   <strlen@plt>
  mov    $0xd,%ecx
  mov    %rbx,%rdi
  mov    $0x61,%edx
  movslq %eax,%rsi
  xor    %eax,%eax
  rep stos %rax,%es:(%rdi)
  mov    %rbp,%rdi
  lea    0xe8(%rsp),%rcx
  mov    %rbp,%rax
  nopw   0x0(%rax,%rax,1)
L5:
  mov    %edx,(%rax)
  add    $0x4,%rax
  add    $0x1,%edx
  cmp    %rcx,%rax
  jne    L5
  mov    %esi,%eax
  sub    $0x1,%eax
  js     L140
  movslq %eax,%r8
  lea    -0x2(%r12,%rsi,1),%r9
  mov    %eax,%eax
  add    %r12,%r8
  sub    %rax,%r9
  nopl   (%rax)
L145:
  movsbl (%r8),%esi
  mov    %rbx,%rcx
  mov    $0x61,%edx
  mov    $0x41,%eax
  jmp    L49
  nopl   0x0(%rax,%rax,1)
L123:
  cmp    $0x7a,%edx
  jg     L151
L49:
  cmp    %eax,%esi
  je     L208
  cmp    %edx,%esi
  jne    L186
L208:
  addl   $0x1,(%rcx)
L186:
  add    $0x1,%eax
  add    $0x1,%edx
  add    $0x4,%rcx
  cmp    $0x5a,%eax
  jle    L123
L151:
  sub    $0x1,%r8
  cmp    %r9,%r8
  jne    L145
L140:
  mov    %rbp,%r11
  mov    %rbx,%r10
  xor    %r9d,%r9d
  mov    %rbx,%rsi
  mov    (%r10),%r12d
  mov    (%r11),%r13d
  movslq %r9d,%r8
  cmp    $0x19,%r9
  je     L161
  nopl   0x0(%rax,%rax,1)
L89:
  add    $0x1,%r9
  mov    %r12d,%ecx
  mov    %r9,%rax
  nopw   0x0(%rax,%rax,1)
L202:
  mov    (%rbx,%rax,4),%edx
  cmp    %ecx,%edx
  jle    L31
  mov    %edx,%ecx
  movslq %eax,%r8
L31:
  add    $0x1,%rax
  cmp    $0x1a,%eax
  jne    L202
  mov    0x80(%rsp,%r8,4),%eax
  mov    %r12d,(%rsp,%r8,4)
  add    $0x4,%r10
  add    $0x4,%r11
  mov    %r13d,0x80(%rsp,%r8,4)
  movslq %r9d,%r8
  mov    %ecx,-0x4(%r10)
  mov    (%r10),%r12d
  mov    %eax,-0x4(%r11)
  mov    (%r11),%r13d
  cmp    $0x19,%r9
  jne    L89
L161:
  xor    %r10d,%r10d
  mov    $0x1a,%r11d
  add    $0x1,%r10d
  cmp    $0x1a,%r10d
  je     L66
  nopl   0x0(%rax,%rax,1)
L150:
  mov    %r11d,%edx
  mov    (%rsi),%ecx
  xor    %eax,%eax
  sub    %r10d,%edx
  jmp    L87
  nopl   0x0(%rax)
L98:
  add    $0x1,%rax
  cmp    %rax,%rdx
  je     L193
L87:
  cmp    0x4(%rsi,%rax,4),%ecx
  jne    L98
  mov    (%rdi),%r8d
  mov    0x4(%rdi,%rax,4),%r9d
  cmp    %r9d,%r8d
  jle    L98
  mov    %r9d,(%rdi)
  mov    %r8d,0x4(%rdi,%rax,4)
  add    $0x1,%rax
  cmp    %rax,%rdx
  jne    L87
  nopl   (%rax)
L193:
  add    $0x1,%r10d
  add    $0x4,%rdi
  add    $0x4,%rsi
  cmp    $0x1a,%r10d
  jne    L150
L66:
  xor    %r12d,%r12d
  lea    D7(%rip),%r13
  nopl   0x0(%rax)
L18:
  mov    (%rbx,%r12,1),%edx
  mov    0x0(%rbp,%r12,1),%esi
  mov    %r13,%rdi
  add    $0x4,%r12
  call   <printf@plt>
  cmp    $0x68,%r12
  jne    L18
  mov    0xf8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L175
  add    $0x108,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L175:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_label: D7
type_guessed: string

tool: D7: %c %d


assistant: ```c
int create_letter_distribution_diagram(char sentence[1000]) {
  int length = strlen(sentence);
  int letters[30];
  int count = 0;
  int ascii_letters[30];
  for (; count < 26; count++) {
    letters[count] = 0;
  }
  for (count = 0; count < 26; count++) {
    ascii_letters[count] = count + 97;
  }
  for (length--; length >= 0; length--) {
    int ascii_uppercase = 65;
    int ascii_lowercase = 97;
    for (; ascii_uppercase < 91 && ascii_lowercase < 123; ascii_uppercase++, ascii_lowercase++) {
      if (sentence[length] == ascii_uppercase) {
        count = ascii_uppercase - 65;
        letters[count]++;
      }
      if (sentence[length] == ascii_lowercase) {
        count = ascii_lowercase - 97;
        letters[count]++;
      }
    }
  }
  for (count = 0; count < 26; count++) {
    int min = count;
    int helper;
    int help_sort;
    for (helper = count + 1; helper < 26; helper++)
      if (letters[min] < letters[helper])
        min = helper;
    help_sort = letters[min];
    letters[min] = letters[count];
    letters[count] = help_sort;
    help_sort = ascii_letters[min];
    ascii_letters[min] = ascii_letters[count];
    ascii_letters[count] = help_sort;
  }
  for (count = 0; count < 26; count++) {
    int helper;
    for (helper = count + 1; helper < 26; helper++)
      if (letters[count] == letters[helper] && ascii_letters[count] > ascii_letters[helper]) {
        int help_sort = ascii_letters[count];
        ascii_letters[count] = ascii_letters[helper];
        ascii_letters[helper] = help_sort;
      }
  }
  for (count = 0; count < 26; count++) {
    printf("%c %d\n", ascii_letters[count], letters[count]);
  }
  return 0;
}
```