user: Translate the below assembly code into C programming language:

```asm
<make_num>:
  endbr64
  push   %r15
  movslq %edx,%r10
  push   %r14
  push   %r13
  push   %r12
  mov    %r9d,%r12d
  push   %rbp
  mov    %ecx,%ebp
  push   %rbx
  mov    %rdi,%rbx
  mov    %rsi,%rdi
  mov    %rbx,%rcx
  sub    $0x8,%rsp
  mov    0x40(%rsp),%r13d
  mov    0x48(%rsp),%r11d
  jmp    L102
  nop
L50:
  add    $0x30,%edx
  mov    %dl,-0x1(%rcx)
  cmp    %r10,%rdi
  jb     L114
L56:
  mov    %rax,%rdi
L102:
  mov    %rdi,%rax
  xor    %edx,%edx
  mov    %rcx,%rsi
  add    $0x1,%rcx
  div    %r10
  cmp    $0x9,%edx
  jle    L50
  lea    0x37(%rdx),%r9d
  add    $0x57,%edx
  test   %r11d,%r11d
  cmovne %r9d,%edx
  mov    %dl,-0x1(%rcx)
  cmp    %r10,%rdi
  jae    L56
L114:
  test   %ebp,%ebp
  je     L145
  movb   $0x2d,(%rcx)
  lea    0x2(%rsi),%rcx
L145:
  sub    %rbx,%rcx
  mov    %ecx,%r14d
  cmp    %ecx,%r8d
  mov    %rcx,%r15
  cmovge %r8d,%r14d
  cmp    0x50(%rsp),%r14d
  jg     L12
L13:
  test   %r12d,%r12d
  jne    L81
  test   %ebp,%ebp
  je     L59
  cmp    $0x30,%r13b
  jne    L59
  lea    -0x1(%r15),%eax
  lea    -0x1(%r14),%ebp
  cmp    %r15d,%r14d
  jle    L134
  mov    %r14d,%edx
  cltq
  mov    $0x30,%esi
  sub    %r15d,%edx
  lea    (%rbx,%rax,1),%rdi
  sub    $0x1,%edx
  add    $0x1,%rdx
  call   <memset@plt>
L134:
  movslq %r14d,%rax
  movslq %ebp,%rdx
  movb   $0x2d,-0x1(%rbx,%rax,1)
  xor    %eax,%eax
  test   %ebp,%ebp
  jg     L173
L73:
  add    $0x8,%rsp
  mov    %r14d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  xchg   %ax,%ax
L59:
  cmp    %r15d,%r14d
  jle    L128
  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>
L128:
  lea    -0x1(%r14),%ebp
L92:
  movslq %ebp,%rdx
  xor    %eax,%eax
  test   %ebp,%ebp
  jle    L73
  nop
L173:
  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     L173
  jmp    L73
  nopl   (%rax)
L81:
  cmp    %r15d,%r14d
  jle    L11
  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>
L11:
  lea    -0x1(%r15),%ebp
  jmp    L92
  nopl   0x0(%rax,%rax,1)
L12:
  xor    %eax,%eax
  call   <panic_buffer_overflow@plt>
  jmp    L13
```

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