user: Converte this assembly snippet into its equivalent C code:

```asm
<originalDigits>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x148,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x138(%rsp)
  lea    D68(%rip),%rax
  lea    0xd0(%rsp),%r13
  movq   $0x7a,0x80(%rsp)
  mov    %rax,0x30(%rsp)
  lea    D9(%rip),%rax
  mov    %rax,0x38(%rsp)
  lea    D74(%rip),%rax
  mov    %rax,0x40(%rsp)
  lea    D56(%rip),%rax
  mov    %rax,0x48(%rsp)
  lea    D6(%rip),%rax
  mov    %rax,0x50(%rsp)
  lea    D88(%rip),%rax
  mov    %rax,0x58(%rsp)
  lea    D50(%rip),%rax
  mov    %rax,0x60(%rsp)
  lea    D70(%rip),%rax
  mov    %rax,0x68(%rsp)
  lea    D76(%rip),%rax
  mov    %rax,0x70(%rsp)
  lea    D63(%rip),%rax
  mov    %rax,0x78(%rsp)
  movabs $0x200000077,%rax
  mov    %rax,0x88(%rsp)
  movabs $0x600000078,%rax
  mov    %rax,0x90(%rsp)
  movabs $0x800000067,%rax
  mov    %rax,0x98(%rsp)
  movabs $0x700000073,%rax
  mov    %rax,0xa0(%rsp)
  movabs $0x500000076,%rax
  mov    %rax,0xa8(%rsp)
  movabs $0x400000066,%rax
  mov    %rax,0xb0(%rsp)
  movabs $0x300000072,%rax
  mov    %rax,0xb8(%rsp)
  movabs $0x10000006f,%rax
  mov    %rax,0xc0(%rsp)
  movabs $0x900000069,%rax
  mov    %rax,0xc8(%rsp)
  call   <strlen@plt>
  xor    %esi,%esi
  mov    $0x68,%edx
  mov    %r13,%rdi
  mov    %eax,%ebp
  call   <memset@plt>
  test   %ebp,%ebp
  jle    L17
  lea    -0x1(%rbp),%eax
  mov    %rbx,%rdi
  lea    0x1(%rbx,%rax,1),%rdx
  nopl   0x0(%rax)
L28:
  movsbl (%rdi),%eax
  add    $0x1,%rdi
  sub    $0x61,%eax
  cltq
  addl   $0x1,0xd0(%rsp,%rax,4)
  cmp    %rdx,%rdi
  jne    L28
L17:
  mov    %rsp,%rbx
  mov    $0x28,%edx
  xor    %esi,%esi
  xor    %ebp,%ebp
  mov    %rbx,%rdi
  lea    0x80(%rsp),%r14
  call   <memset@plt>
  jmp    L9
  nopw   0x0(%rax,%rax,1)
L44:
  add    $0x8,%r14
  cmp    %r13,%r14
  je     L30
L9:
  mov    (%r14),%eax
  sub    $0x61,%eax
  cltq
  mov    0xd0(%rsp,%rax,4),%r15d
  test   %r15d,%r15d
  je     L44
  movslq 0x4(%r14),%rax
  add    %r15d,%ebp
  mov    0x30(%rsp,%rax,8),%r12
  mov    %r15d,(%rsp,%rax,4)
  mov    %r12,%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jle    L44
  sub    $0x1,%eax
  mov    %r12,%rdx
  lea    0x1(%r12,%rax,1),%rcx
  nopl   (%rax)
L5:
  movsbl (%rdx),%eax
  add    $0x1,%rdx
  sub    $0x61,%eax
  cltq
  sub    %r15d,0xd0(%rsp,%rax,4)
  cmp    %rcx,%rdx
  jne    L5
  add    $0x8,%r14
  cmp    %r13,%r14
  jne    L9
  nopw   0x0(%rax,%rax,1)
L30:
  lea    0x1(%rbp),%edi
  call   <malloc@plt>
  mov    %rbx,%rsi
  lea    0x28(%rsp),%r10
  xor    %ecx,%ecx
  mov    $0x30,%edi
  nopw   0x0(%rax,%rax,1)
L56:
  mov    (%rsi),%r11d
  xor    %edx,%edx
  movslq %ecx,%r9
  lea    0x1(%rcx),%r8d
  test   %r11d,%r11d
  jle    L119
  nopl   0x0(%rax)
L4:
  lea    (%rax,%rdx,1),%rcx
  mov    %dil,(%rcx,%r9,1)
  lea    (%r8,%rdx,1),%ecx
  add    $0x1,%rdx
  cmp    %edx,(%rsi)
  jg     L4
L119:
  add    $0x4,%rsi
  add    $0x1,%edi
  cmp    %r10,%rsi
  jne    L56
  movslq %ebp,%rbp
  movb   $0x0,(%rax,%rbp,1)
  mov    0x138(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L90
  add    $0x148,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L90:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_label: D68
type_guessed: string
name: read_data
arguments: data_label: D9
type_guessed: string
name: read_data
arguments: data_label: D74
type_guessed: string
name: read_data
arguments: data_label: D56
type_guessed: string
name: read_data
arguments: data_label: D6
type_guessed: string
name: read_data
arguments: data_label: D88
type_guessed: string
name: read_data
arguments: data_label: D50
type_guessed: string
name: read_data
arguments: data_label: D70
type_guessed: string
name: read_data
arguments: data_label: D76
type_guessed: string
name: read_data
arguments: data_label: D63
type_guessed: string

tool: D68: zero

tool: D9: one

tool: D74: two

tool: D56: three

tool: D6: four

tool: D88: five

tool: D50: six

tool: D70: seven

tool: D76: eight

tool: D63: nine

assistant: ```c
char *originalDigits(char *s) {
  char *pres[10] = {"zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"};
  int pair[10][2] = {{'z', 0}, {'w', 2}, {'x', 6}, {'g', 8}, {'s', 7}, {'v', 5}, {'f', 4}, {'r', 3}, {'o', 1}, {'i', 9}};
  int size = strlen(s);
  int cnt[26];
  memset(cnt, 0, 26 * sizeof(int));
  for (int i = 0; i < size; i++) {
    cnt[s[i] - 'a']++;
  }
  int res[10];
  int resLen = 0;
  memset(res, 0, 10 * sizeof(int));
  for (int i = 0; i < 10; i++) {
    int c = cnt[pair[i][0] - 'a'];
    if (c != 0) {
      resLen += c;
      res[pair[i][1]] = c;
      int len = strlen(pres[pair[i][1]]);
      for (int j = 0; j < len; j++) {
        cnt[pres[pair[i][1]][j] - 'a'] -= c;
      }
    }
  }
  char *resString = (char *)malloc((resLen + 1) * sizeof(char));
  int idx = 0;
  for (int i = 0; i < 10; i++) {
    for (int j = 0; j < res[i]; j++) {
      resString[idx] = '0' + i;
      idx++;
    }
  }
  resString[resLen] = 0;
  return resString;
}
```