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

```asm
<make_num>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %edx,-0x34(%rbp)
  mov    %ecx,-0x38(%rbp)
  mov    %r8d,-0x3c(%rbp)
  mov    %r9d,-0x40(%rbp)
  mov    0x10(%rbp),%eax
  mov    %al,-0x44(%rbp)
  movl   $0x0,-0x10(%rbp)
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x8(%rbp)
L44:
  mov    -0x34(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x30(%rbp),%rax
  mov    $0x0,%edx
  div    %rcx
  mov    %rdx,%rax
  mov    %eax,-0xc(%rbp)
  cmpl   $0x9,-0xc(%rbp)
  jg     L206
  mov    -0xc(%rbp),%eax
  lea    0x30(%rax),%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  jmp    L18
L206:
  cmpl   $0x0,0x18(%rbp)
  je     L107
  mov    -0xc(%rbp),%eax
  lea    0x37(%rax),%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
  jmp    L18
L107:
  mov    -0xc(%rbp),%eax
  lea    0x57(%rax),%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  mov    %ecx,%edx
  mov    %dl,(%rax)
L18:
  mov    -0x34(%rbp),%eax
  movslq %eax,%rsi
  mov    -0x30(%rbp),%rax
  mov    $0x0,%edx
  div    %rsi
  mov    %rax,-0x30(%rbp)
  cmpq   $0x0,-0x30(%rbp)
  jne    L44
  cmpl   $0x0,-0x38(%rbp)
  je     L17
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  movb   $0x2d,(%rax)
L17:
  mov    -0x8(%rbp),%rax
  sub    -0x28(%rbp),%rax
  mov    %eax,-0x10(%rbp)
  mov    -0x3c(%rbp),%eax
  cmp    -0x10(%rbp),%eax
  jge    L135
  mov    -0x10(%rbp),%eax
  mov    %eax,-0x3c(%rbp)
L135:
  mov    -0x3c(%rbp),%eax
  cmp    0x20(%rbp),%eax
  jle    L194
  mov    $0x0,%eax
  call   <panic_buffer_overflow@plt>
L194:
  cmpl   $0x0,-0x40(%rbp)
  je     L77
  movb   $0x20,-0x44(%rbp)
L77:
  cmpl   $0x0,-0x38(%rbp)
  je     L148
  cmpl   $0x0,-0x40(%rbp)
  jne    L148
  cmpb   $0x30,-0x44(%rbp)
  jne    L148
  mov    -0x10(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x1c(%rbp)
  jmp    L132
L16:
  mov    -0x1c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  movzbl -0x44(%rbp),%eax
  mov    %al,(%rdx)
  addl   $0x1,-0x1c(%rbp)
L132:
  mov    -0x3c(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x1c(%rbp)
  jl     L16
  mov    -0x3c(%rbp),%eax
  cltq
  lea    -0x1(%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movb   $0x2d,(%rax)
  jmp    L59
L148:
  mov    -0x10(%rbp),%eax
  mov    %eax,-0x1c(%rbp)
  jmp    L114
L187:
  mov    -0x1c(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  movzbl -0x44(%rbp),%eax
  mov    %al,(%rdx)
  addl   $0x1,-0x1c(%rbp)
L114:
  mov    -0x1c(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jl     L187
L59:
  movl   $0x0,-0x18(%rbp)
  cmpl   $0x0,-0x40(%rbp)
  je     L101
  mov    -0x10(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x14(%rbp)
  jmp    L73
L101:
  mov    -0x3c(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x14(%rbp)
  jmp    L73
L186:
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  mov    %al,-0x1d(%rbp)
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    -0x18(%rbp),%edx
  movslq %edx,%rcx
  mov    -0x28(%rbp),%rdx
  add    %rcx,%rdx
  movzbl (%rax),%eax
  mov    %al,(%rdx)
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x28(%rbp),%rax
  add    %rax,%rdx
  movzbl -0x1d(%rbp),%eax
  mov    %al,(%rdx)
  addl   $0x1,-0x18(%rbp)
  subl   $0x1,-0x14(%rbp)
L73:
  mov    -0x14(%rbp),%eax
  cmp    -0x18(%rbp),%eax
  jg     L186
  mov    -0x3c(%rbp),%eax
  leave
  ret
```

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;
}
```