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

```asm
<add>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <reverse@plt>
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <reverse@plt>
  movl   $0x0,-0x18(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x10(%rbp)
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0xc(%rbp)
  mov    -0xc(%rbp),%edx
  mov    -0x10(%rbp),%eax
  cmp    %eax,%edx
  cmovge %edx,%eax
  mov    %eax,-0x8(%rbp)
  movl   $0x0,-0x14(%rbp)
  movl   $0x0,-0x18(%rbp)
  jmp    L30
L40:
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  lea    -0x30(%rax),%ecx
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
  addl   $0x1,-0x18(%rbp)
L30:
  mov    -0x18(%rbp),%eax
  cmp    -0x10(%rbp),%eax
  jl     L40
  movl   $0x0,-0x18(%rbp)
  jmp    L51
L63:
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  lea    -0x30(%rax),%ecx
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
  addl   $0x1,-0x18(%rbp)
L51:
  mov    -0x18(%rbp),%eax
  cmp    -0xc(%rbp),%eax
  jl     L63
  movl   $0x0,-0x18(%rbp)
  jmp    L0
L31:
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%edx
  mov    -0x18(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  add    %eax,%edx
  mov    -0x14(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x4(%rbp)
  mov    -0x4(%rbp),%edx
  movslq %edx,%rax
  imul   $0x66666667,%rax,%rax
  shr    $0x20,%rax
  sar    $0x2,%eax
  mov    %edx,%esi
  sar    $0x1f,%esi
  sub    %esi,%eax
  mov    %eax,%ecx
  mov    %ecx,%eax
  shl    $0x2,%eax
  add    %ecx,%eax
  add    %eax,%eax
  mov    %edx,%ecx
  sub    %eax,%ecx
  mov    %ecx,%eax
  lea    0x30(%rax),%ecx
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0x4(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x66666667,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x2,%edx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x14(%rbp)
  addl   $0x1,-0x18(%rbp)
L0:
  mov    -0x18(%rbp),%eax
  cmp    -0x8(%rbp),%eax
  jl     L31
  cmpl   $0x0,-0x14(%rbp)
  je     L67
  mov    -0x14(%rbp),%eax
  lea    0x30(%rax),%ecx
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
  addl   $0x1,-0x8(%rbp)
  mov    -0x8(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
L67:
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <reverse@plt>
  nop
  leave
  ret
```

assistant: ```c
void add(char *s1, char *s2) {
  reverse(s1);
  reverse(s2);
  int i = 0;
  int l1 = strlen(s1);
  int l2 = strlen(s2);
  int l = (l1 > l2) ? l1 : l2;
  int up = 0;
  for (i = 0; i < l1; ++i) {
    s1[i] = s1[i] - '0';
  }
  for (i = 0; i < l2; ++i) {
    s2[i] = s2[i] - '0';
  }
  for (i = 0; i < l; ++i) {
    int tmp = s1[i] + s2[i] + up;
    s1[i] = tmp % 10 + '0';
    up = tmp / 10;
  }
  if (up != 0) {
    s1[l] = up + '0';
    ++l;
    s1[l] = '\0';
  }
  reverse(s1);
}
```