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

```asm
<isAdditiveNumber>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,0x10(%rsp)
  call   <strlen@plt>
  movq   $0x1,0x30(%rsp)
  mov    %eax,%ebx
  shr    $0x1f,%eax
  add    %ebx,%eax
  sar    %eax
  mov    %eax,0x3c(%rsp)
  cmp    $0x1,%ebx
  jle    L101
L24:
  mov    0x30(%rsp),%r15
  lea    0x1(%r15),%edi
  call   <malloc@plt>
  mov    0x10(%rsp),%rbp
  mov    %r15d,%edx
  mov    %r15d,0x1c(%rsp)
  mov    %rax,%r14
  mov    %rax,%rdi
  mov    %rax,0x8(%rsp)
  mov    %rbp,%rsi
  add    %r15,%rbp
  call   <strncpy@plt>
  movb   $0x0,(%r14,%r15,1)
  movq   $0x1,0x20(%rsp)
  mov    %rbp,0x28(%rsp)
  nop
L144:
  mov    0x20(%rsp),%rdi
  mov    %ebx,%eax
  sub    0x1c(%rsp),%eax
  mov    %edi,%r13d
  cmp    %edi,%eax
  jle    L127
  mov    %rdi,%r14
  lea    0x1(%rdi),%edi
  call   <malloc@plt>
  mov    0x28(%rsp),%rsi
  mov    %r13d,%edx
  mov    %rax,%r15
  mov    %rax,%rdi
  call   <strncpy@plt>
  movb   $0x0,(%r15,%r14,1)
  mov    %r15,%rsi
  mov    %r15,%rbp
  mov    0x8(%rsp),%rdi
  addl   $0x1,0x1c(%rsp)
  mov    0x1c(%rsp),%r14d
  call   <add_two_number@plt>
  mov    %rax,%rdi
  mov    %rax,%r13
  mov    %r14d,%r15d
  call   <strlen@plt>
  xor    %r10d,%r10d
  mov    %eax,%r14d
  nopw   0x0(%rax,%rax,1)
L46:
  cmpb   $0x30,0x0(%r13)
  je     L129
  mov    %ebx,%eax
  sub    %r15d,%eax
  cmp    %r14d,%eax
  jl     L129
  test   %r14d,%r14d
  jle    L35
  movslq %r15d,%rdx
  movslq %r14d,%rcx
  xor    %eax,%eax
  add    0x10(%rsp),%rdx
  jmp    L85
  nopl   0x0(%rax)
L39:
  add    $0x1,%rax
  cmp    %rax,%rcx
  je     L35
L85:
  movzbl (%rdx,%rax,1),%esi
  cmp    %sil,0x0(%r13,%rax,1)
  je     L39
L129:
  mov    %r15d,%r14d
  and    $0x1,%r10d
  mov    %rbp,%r15
L70:
  mov    %r15,%rdi
  mov    %r10b,0x3b(%rsp)
  call   <free@plt>
  mov    %r13,%rdi
  call   <free@plt>
  addq   $0x1,0x20(%rsp)
  cmp    %ebx,%r14d
  jne    L144
  movzbl 0x3b(%rsp),%r10d
  test   %r10b,%r10b
  je     L144
  mov    0x8(%rsp),%rdi
  call   <free@plt>
  add    $0x48,%rsp
  mov    $0x1,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
L35:
  add    %r14d,%r15d
  cmp    %r15d,%ebx
  jle    L54
  mov    %r13,%rsi
  mov    %rbp,%rdi
  call   <add_two_number@plt>
  mov    %rax,%rdi
  mov    %rax,%r12
  call   <strlen@plt>
  mov    %eax,%r14d
  cmp    %rbp,0x8(%rsp)
  je     L22
  mov    %rbp,%rdi
  call   <free@plt>
L22:
  mov    %r13,%rbp
  mov    $0x1,%r10d
  mov    %r12,%r13
  jmp    L46
L54:
  mov    %r15d,%r14d
  mov    $0x1,%r10d
  mov    %rbp,%r15
  jmp    L70
L127:
  mov    0x8(%rsp),%rdi
  call   <free@plt>
  addq   $0x1,0x30(%rsp)
  mov    0x30(%rsp),%rax
  sub    $0x1,%eax
  cmp    %eax,0x3c(%rsp)
  jg     L24
L101:
  add    $0x48,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
bool isAdditiveNumber(char *num) {
  int len = strlen(num);
  int len_sum;
  int i, j, k, h;
  bool ret = false;
  char *first, *second, *sum;
  first = second = sum = NULL;
  for (i = 0; i < len / 2; i++) {
    first = (char *)malloc(i + 1 + 1);
    strncpy(first, num, i + 1);
    first[i + 1] = '\0';
    for (j = i + 1; j - i <= len - j - 1; j++) {
      second = (char *)malloc(j - i + 1);
      strncpy(second, num + i + 1, j - i);
      second[j - i] = '\0';
      h = j + 1;
      char *first2 = first;
      bool flag = false;
      ;
      do {
        sum = add_two_number(first2, second);
        len_sum = strlen(sum);
        if (first2 != first)
          free(first2);
        first2 = second;
        second = sum;
        if (sum[0] == '0' || len_sum > len - h)
          break;
        for (k = 0; k < len_sum && sum[k] == num[h + k]; k++)
          ;
        if (k < len_sum)
          break;
        flag = true;
        h = h + len_sum;
      } while (h < len);
      free(first2);
      free(second);
      if (flag && h == len) {
        free(first);
        return true;
      }
    }
    free(first);
  }
  return false;
}
```