user: 这段汇编代码用C语言表示是什么样的?

```asm
<resolve>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %rbp,%r13
  sub    $0x18,%rsp
  call   <strlen@plt>
  test   %eax,%eax
  je     L103
  mov    %rbp,%rdi
  mov    %rax,%rbx
  mov    %eax,%r14d
  mov    %r12,%r13
  call   <strlen@plt>
  test   %eax,%eax
  je     L103
  movslq %ebx,%r15
  movzbl 0x0(%rbp),%edx
  movzbl -0x1(%r12,%r15,1),%ecx
  lea    -0x1(%r15),%r9
  cmp    $0x1,%eax
  jle    L129
  cmp    $0x5c,%dl
  je     L130
  cmp    $0x5c,%cl
  je     L46
  add    %eax,%ebx
  mov    %eax,%r8d
L18:
  lea    0x2(%rbx),%edi
  mov    %r8d,0x8(%rsp)
  movslq %ebx,%rbx
  call   <malloc@plt>
  mov    %r14d,%edx
  mov    %r12,%rsi
  mov    %rax,%r13
  mov    %rax,%rdi
  call   <memcpy@plt>
  movb   $0x5c,0x0(%r13,%r15,1)
  mov    0x8(%rsp),%edx
  mov    %rbp,%rsi
  lea    0x1(%r13,%r15,1),%rdi
  call   <memcpy@plt>
  movb   $0x0,0x1(%r13,%rbx,1)
L103:
  add    $0x18,%rsp
  mov    %r13,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L130:
  cmpb   $0x5c,0x1(%rbp)
  je     L58
  add    $0x1,%rbp
  lea    -0x1(%rax),%r8d
  mov    $0x1,%esi
L99:
  movzbl 0x0(%rbp),%edx
  cmp    $0x5c,%cl
  je     L76
L39:
  add    %r14d,%eax
  sub    %esi,%eax
  movslq %eax,%rbx
  cmp    $0x5c,%dl
  jne    L18
  lea    0x1(%rbx),%edi
  mov    %r8d,0x8(%rsp)
  call   <malloc@plt>
  mov    %r14d,%edx
  mov    %r12,%rsi
  mov    %rax,%rdi
  mov    %rax,%r13
  call   <memcpy@plt>
  mov    0x8(%rsp),%edx
  lea    0x0(%r13,%r15,1),%rdi
  mov    %rbp,%rsi
  call   <memcpy@plt>
  movb   $0x0,0x0(%r13,%rbx,1)
  jmp    L103
  nopl   0x0(%rax)
L129:
  mov    %eax,%r8d
  xor    %esi,%esi
  jmp    L99
  nop
L46:
  mov    %eax,%r8d
  xor    %esi,%esi
L76:
  lea    -0x1(%rbx),%r14d
  mov    %r9,%r15
  jmp    L39
  xchg   %ax,%ax
L58:
  cmp    $0x2,%eax
  jne    L75
  cmp    $0x5c,%cl
  jne    L103
  mov    %r12,%rdi
  mov    %r9,0x8(%rsp)
  call   <strdup@plt>
  mov    0x8(%rsp),%r9
  mov    %rax,%r13
  movb   $0x0,(%rax,%r9,1)
  jmp    L103
L75:
  add    $0x2,%rbp
  lea    -0x2(%rax),%r8d
  mov    $0x2,%esi
  jmp    L99
```

assistant: ```c
char *resolve(const char *parent, const char *child) {
  char *c;
  char *theChars;
  int parentEnd, childStart, len;
  int pn = (int)strlen(parent);
  int cn = (int)strlen(child);
  if (pn == 0)
    return (char *)child;
  if (cn == 0)
    return (char *)parent;
  c = (char *)child;
  childStart = 0;
  parentEnd = pn;
  if ((cn > 1) && (c[0] == '\\')) {
    if (c[1] == '\\') {
      childStart = 2;
    } else {
      childStart = 1;
    }
    if (cn == childStart) {
      if (parent[pn - 1] == '\\') {
        char *str = strdup(parent);
        str[pn - 1] = '\0';
        return str;
      }
      return (char *)parent;
    }
  }
  if (parent[pn - 1] == '\\')
    parentEnd--;
  len = parentEnd + cn - childStart;
  if (child[childStart] == '\\') {
    theChars = (char *)malloc(len + 1);
    memcpy(theChars, parent, parentEnd);
    memcpy(theChars + parentEnd, child + childStart, (cn - childStart));
    theChars[len] = '\0';
  } else {
    theChars = (char *)malloc(len + 2);
    memcpy(theChars, parent, parentEnd);
    theChars[parentEnd] = '\\';
    memcpy(theChars + parentEnd + 1, child + childStart, (cn - childStart));
    theChars[len + 1] = '\0';
  }
  return theChars;
}
```