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

```asm
<main>:
  endbr64
  push   %rbx
  lea    D3(%rip),%rdi
  sub    $0xb0,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0xa8(%rsp)
  xor    %eax,%eax
  mov    %rsp,%rbx
  mov    %rbx,%rsi
  call   <scanf@plt>
  mov    %rbx,%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jle    L90
  sub    $0x1,%eax
  mov    %rbx,%rdx
  xor    %esi,%esi
  mov    $0x1,%r8d
  lea    0x1(%rsp,%rax,1),%r9
  lea    D28(%rip),%rdi
  jmp    L83
  nopl   (%rax)
L143:
  sub    $0x61,%ecx
  mov    %r8,%rax
  shl    %cl,%rax
  test   $0x9249,%eax
  jne    L147
  test   $0x4924,%eax
  jne    L42
  test   $0x2492,%eax
  je     L45
L82:
  add    $0x2,%esi
L45:
  add    $0x1,%rdx
  cmp    %r9,%rdx
  je     L34
L83:
  movzbl (%rdx),%ecx
  cmp    $0x70,%cl
  jg     L49
  cmp    $0x60,%cl
  jg     L143
  cmp    $0x20,%cl
  jne    L45
L147:
  add    $0x1,%rdx
  add    $0x1,%esi
  cmp    %r9,%rdx
  jne    L83
L34:
  lea    D10(%rip),%rdi
  call   <printf@plt>
  mov    0xa8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L8
  add    $0xb0,%rsp
  xor    %eax,%eax
  pop    %rbx
  ret
  cs nopw 0x0(%rax,%rax,1)
L49:
  lea    -0x71(%rcx),%eax
  cmp    $0x9,%al
  ja     L45
  sub    $0x72,%ecx
  cmp    $0x8,%cl
  ja     L82
  movzbl %cl,%ecx
  movslq (%rdi,%rcx,4),%rax
  add    %rdi,%rax
  notrack jmp *%rax
  nopl   0x0(%rax)
L42:
  add    $0x3,%esi
  jmp    L45
  add    $0x4,%esi
  jmp    L45
L90:
  xor    %esi,%esi
  jmp    L34
L8:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D3
data_type: string
name: extract_symbolic_data
arguments: label: D10
data_type: string

tool: D3: %[^
]s

tool: D10: %d

assistant: ```c
int main() {
  int counter = 0, clicks = 0, l = 0;
  char sms[160];
  scanf("%[^\n]s", sms);
  l = strlen(sms);
  for (counter = 0; counter < l; counter++) {
    switch (sms[counter]) {
    case 'a':
      clicks += 1;
      break;
    case 'd':
      clicks += 1;
      break;
    case 'g':
      clicks += 1;
      break;
    case 'j':
      clicks += 1;
      break;
    case 'm':
      clicks += 1;
      break;
    case 'p':
      clicks += 1;
      break;
    case 't':
      clicks += 1;
      break;
    case 'w':
      clicks += 1;
      break;
    case ' ':
      clicks += 1;
      break;
    case 'b':
      clicks += 2;
      break;
    case 'e':
      clicks += 2;
      break;
    case 'h':
      clicks += 2;
      break;
    case 'k':
      clicks += 2;
      break;
    case 'n':
      clicks += 2;
      break;
    case 'q':
      clicks += 2;
      break;
    case 'u':
      clicks += 2;
      break;
    case 'x':
      clicks += 2;
      break;
    case 'c':
      clicks += 3;
      break;
    case 'f':
      clicks += 3;
      break;
    case 'i':
      clicks += 3;
      break;
    case 'l':
      clicks += 3;
      break;
    case 'o':
      clicks += 3;
      break;
    case 'r':
      clicks += 3;
      break;
    case 'v':
      clicks += 3;
      break;
    case 'y':
      clicks += 3;
      break;
    case 's':
      clicks += 4;
      break;
    case 'z':
      clicks += 4;
      break;
    }
  }
  printf("%d", clicks);
  return 0;
}
```