user: 请将以下的汇编代码转换成C语言代码：

```asm
<make_num>:
  endbr64
  push   %r15
  movslq %edx,%r10
  push   %r14
  push   %r13
  push   %r12
  mov    %r9d,%r12d
  push   %rbp
  mov    %ecx,%ebp
  mov    %rdi,%rcx
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x8,%rsp
  mov    0x48(%rsp),%eax
  mov    0x40(%rsp),%r13d
  test   %eax,%eax
  jne    L68
  jmp    L189
  nopl   0x0(%rax,%rax,1)
L145:
  add    $0x57,%edx
  mov    %dl,-0x1(%rcx)
  cmp    %r10,%rsi
  jb     L143
L25:
  mov    %rax,%rsi
L189:
  mov    %rsi,%rax
  xor    %edx,%edx
  add    $0x1,%rcx
  div    %r10
  cmp    $0x9,%edx
  jg     L145
  add    $0x30,%edx
  mov    %dl,-0x1(%rcx)
  cmp    %r10,%rsi
  jae    L25
L143:
  test   %ebp,%ebp
  je     L62
  movb   $0x2d,(%rcx)
  add    $0x1,%rcx
L62:
  sub    %rbx,%rcx
  mov    %ecx,%r14d
  cmp    %ecx,%r8d
  mov    %rcx,%r15
  cmovge %r8d,%r14d
  cmp    0x50(%rsp),%r14d
  jg     L69
L227:
  test   %r12d,%r12d
  jne    L36
  test   %ebp,%ebp
  je     L147
  cmp    $0x30,%r13b
  jne    L147
  lea    -0x1(%r15),%eax
  lea    -0x1(%r14),%ebp
  cmp    %r15d,%r14d
  jle    L26
  mov    %r14d,%edx
  cltq
  mov    $0x30,%esi
  sub    %r15d,%edx
  lea    (%rbx,%rax,1),%rdi
  sub    $0x1,%edx
  add    $0x1,%rdx
  call   <memset@plt>
L26:
  movslq %r14d,%rax
  movslq %ebp,%rdx
  movb   $0x2d,-0x1(%rbx,%rax,1)
  xor    %eax,%eax
  test   %ebp,%ebp
  jg     L40
L208:
  add    $0x8,%rsp
  mov    %r14d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L117:
  add    $0x37,%edx
  mov    %dl,-0x1(%rcx)
  cmp    %r10,%rsi
  jb     L143
L157:
  mov    %rax,%rsi
L68:
  mov    %rsi,%rax
  xor    %edx,%edx
  add    $0x1,%rcx
  div    %r10
  cmp    $0x9,%edx
  jg     L117
  add    $0x30,%edx
  mov    %dl,-0x1(%rcx)
  cmp    %r10,%rsi
  jae    L157
  jmp    L143
  nopl   0x0(%rax,%rax,1)
L147:
  cmp    %r15d,%r14d
  jle    L121
  mov    %r14d,%eax
  movslq %r15d,%rcx
  movsbl %r13b,%esi
  sub    %r15d,%eax
  lea    (%rbx,%rcx,1),%rdi
  lea    -0x1(%rax),%edx
  add    $0x1,%rdx
  call   <memset@plt>
L121:
  lea    -0x1(%r14),%ebp
L146:
  movslq %ebp,%rdx
  xor    %eax,%eax
  test   %ebp,%ebp
  jle    L208
  nopl   0x0(%rax,%rax,1)
L40:
  movzbl (%rbx,%rax,1),%ecx
  movzbl (%rbx,%rdx,1),%esi
  mov    %sil,(%rbx,%rax,1)
  add    $0x1,%rax
  mov    %cl,(%rbx,%rdx,1)
  sub    $0x1,%rdx
  cmp    %edx,%eax
  jl     L40
  jmp    L208
  nopl   0x0(%rax,%rax,1)
L36:
  cmp    %r15d,%r14d
  jle    L167
  mov    %r14d,%eax
  movslq %r15d,%rdi
  mov    $0x20,%esi
  sub    %r15d,%eax
  add    %rbx,%rdi
  lea    -0x1(%rax),%edx
  add    $0x1,%rdx
  call   <memset@plt>
L167:
  lea    -0x1(%r15),%ebp
  jmp    L146
  nopl   0x0(%rax,%rax,1)
L69:
  xor    %eax,%eax
  call   <panic_buffer_overflow@plt>
  jmp    L227
```

assistant: ```c
int make_num(char *to, unsigned long u, int base, int negFlag, int length, int ladjust, char padc, int upcase, int max_buf) {
  int actualLength = 0;
  char *p = to;
  int i;
  do {
    int tmp = u % base;
    if (tmp <= 9) {
      *p++ = '0' + tmp;
    } else if (upcase) {
      *p++ = 'A' + tmp - 10;
    } else {
      *p++ = 'a' + tmp - 10;
    }
    u /= base;
  } while (u != 0);
  if (negFlag) {
    *p++ = '-';
  }
  actualLength = p - to;
  if (length < actualLength) {
    length = actualLength;
  }
  if (length > max_buf) {
    panic_buffer_overflow();
  }
  if (ladjust) {
    padc = ' ';
  }
  if (negFlag && !ladjust && (padc == '0')) {
    for (i = actualLength - 1; i < length - 1; i++) {
      to[i] = padc;
    }
    to[length - 1] = '-';
  } else {
    for (i = actualLength; i < length; i++) {
      to[i] = padc;
    }
  }
  {
    int begin = 0;
    int end;
    if (ladjust) {
      end = actualLength - 1;
    } else {
      end = length - 1;
    }
    while (end > begin) {
      char tmp = to[begin];
      to[begin] = to[end];
      to[end] = tmp;
      begin++;
      end--;
    }
  }
  return length;
}
```