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

```asm
<addBinary>:
  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   <strlen@plt>
  mov    %eax,-0x14(%rbp)
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,-0x10(%rbp)
  mov    -0x14(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  mov    -0x14(%rbp),%eax
  cmp    -0x10(%rbp),%eax
  jge    L7
  mov    -0x10(%rbp),%eax
  mov    %eax,-0xc(%rbp)
L7:
  addl   $0x1,-0xc(%rbp)
  mov    -0xc(%rbp),%eax
  add    $0x1,%eax
  mov    $0x1,%esi
  mov    %eax,%edi
  call   <calloc@plt>
  mov    %rax,-0x8(%rbp)
  jmp    L95
L30:
  subl   $0x1,-0xc(%rbp)
  cmpl   $0x0,-0x14(%rbp)
  je     L31
  subl   $0x1,-0x14(%rbp)
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  lea    -0x30(%rax),%edx
  jmp    L54
L31:
  mov    $0x0,%edx
L54:
  cmpl   $0x0,-0x10(%rbp)
  je     L86
  subl   $0x1,-0x10(%rbp)
  mov    -0x10(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x30,%eax
  jmp    L88
L86:
  mov    $0x0,%eax
L88:
  lea    (%rdx,%rax,1),%ecx
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %eax,%edx
  mov    %ecx,%eax
  lea    (%rdx,%rax,1),%ecx
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    -0xc(%rbp),%edx
  movslq %edx,%rdx
  lea    -0x1(%rdx),%rcx
  mov    -0x8(%rbp),%rdx
  add    %rcx,%rdx
  mov    %eax,%ecx
  shr    $0x7,%cl
  add    %ecx,%eax
  sar    %al
  mov    %al,(%rdx)
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    -0xc(%rbp),%edx
  movslq %edx,%rcx
  mov    -0x8(%rbp),%rdx
  add    %rcx,%rdx
  mov    %eax,%ecx
  sar    $0x7,%cl
  shr    $0x7,%cl
  add    %ecx,%eax
  and    $0x1,%eax
  sub    %ecx,%eax
  mov    %al,(%rdx)
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  lea    0x30(%rax),%ecx
  mov    -0xc(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    %ecx,%edx
  mov    %dl,(%rax)
L95:
  cmpl   $0x0,-0x14(%rbp)
  jne    L30
  cmpl   $0x0,-0x10(%rbp)
  jne    L30
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L4
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  jmp    L41
L4:
  mov    -0x8(%rbp),%rax
  movb   $0x31,(%rax)
  mov    -0x8(%rbp),%rax
L41:
  leave
  ret
```

assistant: ```c
char *addBinary(char *a, char *b) {
  int lengthA = strlen(a);
  int lengthB = strlen(b);
  int lengthSum = lengthA;
  if (lengthA < lengthB)
    lengthSum = lengthB;
  ++lengthSum;
  char *sum = calloc(lengthSum + 1, sizeof(char));
  while (lengthA || lengthB) {
    --lengthSum;
    sum[lengthSum] += (lengthA ? a[--lengthA] - '0' : 0) + (lengthB ? b[--lengthB] - '0' : 0);
    sum[lengthSum - 1] = sum[lengthSum] / 2;
    sum[lengthSum] %= 2;
    sum[lengthSum] += '0';
  }
  if (!sum[0])
    return sum + 1;
  sum[0] = '1';
  return sum;
}
```