user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<print_uint>:
  endbr64
  push   %r15
  xor    %r15d,%r15d
  push   %r14
  push   %r13
  push   %r12
  mov    %esi,%r12d
  push   %rbp
  mov    %r8d,%ebp
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  mov    0x60(%rsp),%r8d
  test   %esi,%esi
  jle    L311
  mov    %ebp,%ebx
  mov    %rdi,%r13
  mov    %edx,%esi
  mov    %ecx,%edi
  and    $0x1,%ebx
  jne    L140
  mov    %edx,%eax
  xor    %edx,%edx
  lea    D7(%rip),%rcx
  div    %edi
  mov    %eax,%r10d
  movzbl (%rcx,%rdx,1),%eax
  mov    %al,0xd(%rsp)
  cmp    %edi,%esi
  jb     L99
  mov    %r10d,%eax
  xor    %edx,%edx
  div    %edi
  mov    %eax,%esi
  movzbl (%rcx,%rdx,1),%eax
  mov    %al,0xe(%rsp)
  cmp    %r10d,%edi
  ja     L35
  mov    %esi,%eax
  xor    %edx,%edx
  div    %edi
  mov    %eax,%r10d
  movzbl (%rcx,%rdx,1),%eax
  mov    %al,0xf(%rsp)
  cmp    %esi,%edi
  ja     L361
  mov    %r10d,%eax
  xor    %edx,%edx
  div    %edi
  mov    %eax,%esi
  movzbl (%rcx,%rdx,1),%eax
  mov    %al,0x10(%rsp)
  cmp    %r10d,%edi
  ja     L237
  mov    %esi,%eax
  xor    %edx,%edx
  div    %edi
  mov    %eax,%r10d
  movzbl (%rcx,%rdx,1),%eax
  mov    %al,0x11(%rsp)
  cmp    %esi,%edi
  ja     L218
  mov    %r10d,%eax
  xor    %edx,%edx
  div    %edi
  mov    %eax,%esi
  movzbl (%rcx,%rdx,1),%eax
  mov    %al,0x12(%rsp)
  cmp    %r10d,%edi
  ja     L58
  mov    %esi,%eax
  xor    %edx,%edx
  div    %edi
  mov    %eax,%r10d
  movzbl (%rcx,%rdx,1),%eax
  mov    %al,0x13(%rsp)
  cmp    %esi,%edi
  ja     L346
  mov    %r10d,%eax
  xor    %edx,%edx
  div    %edi
  mov    %eax,%esi
  movzbl (%rcx,%rdx,1),%eax
  mov    %al,0x14(%rsp)
  cmp    %r10d,%edi
  ja     L262
  mov    %esi,%eax
  xor    %edx,%edx
  div    %edi
  mov    %eax,%r10d
  movzbl (%rcx,%rdx,1),%eax
  mov    %al,0x15(%rsp)
  cmp    %esi,%edi
  ja     L49
  mov    %r10d,%eax
  xor    %edx,%edx
  div    %edi
  movzbl (%rcx,%rdx,1),%edx
  mov    %dl,0x16(%rsp)
  cmp    %r10d,%edi
  ja     L389
  xor    %edx,%edx
  div    %edi
  movzbl (%rcx,%rdx,1),%eax
  mov    %al,0x17(%rsp)
L73:
  mov    $0xa,%ebx
  nop
L79:
  sub    $0x1,%ebx
  xor    %r15d,%r15d
  lea    0xe(%rsp),%r14
  movslq %ebx,%rbx
  xchg   %ax,%ax
L43:
  movsbl (%r14,%rbx,1),%esi
  lea    (%r15,%r13,1),%edi
  mov    %ebp,%edx
  add    $0x1,%r15d
  call   <printc@plt>
  mov    %ebx,%eax
  not    %eax
  shr    $0x1f,%eax
  cmp    %r15d,%r12d
  setg   %dl
  sub    $0x1,%rbx
  test   %al,%dl
  jne    L43
L311:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L190
  add    $0x28,%rsp
  mov    %r15d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nop
L140:
  mov    %edx,%eax
  xor    %edx,%edx
  div    %ecx
  lea    D7(%rip),%rcx
  mov    %eax,%r10d
  lea    0x10(%rdx),%eax
  movzbl (%rcx,%rax,1),%eax
  mov    %al,0xd(%rsp)
  cmp    %edi,%esi
  jb     L356
  mov    %r10d,%eax
  xor    %edx,%edx
  div    %edi
  mov    %eax,%esi
  lea    0x10(%rdx),%eax
  movzbl (%rcx,%rax,1),%eax
  mov    %al,0xe(%rsp)
  cmp    %r10d,%edi
  ja     L63
  mov    %esi,%eax
  xor    %edx,%edx
  div    %edi
  mov    %eax,%r10d
  lea    0x10(%rdx),%eax
  movzbl (%rcx,%rax,1),%eax
  mov    %al,0xf(%rsp)
  cmp    %esi,%edi
  ja     L361
  mov    %r10d,%eax
  xor    %edx,%edx
  div    %edi
  mov    %eax,%esi
  lea    0x10(%rdx),%eax
  movzbl (%rcx,%rax,1),%eax
  mov    %al,0x10(%rsp)
  cmp    %r10d,%edi
  ja     L237
  mov    %esi,%eax
  xor    %edx,%edx
  div    %edi
  mov    %eax,%r10d
  lea    0x10(%rdx),%eax
  movzbl (%rcx,%rax,1),%eax
  mov    %al,0x11(%rsp)
  cmp    %esi,%edi
  ja     L218
  mov    %r10d,%eax
  xor    %edx,%edx
  div    %edi
  mov    %eax,%esi
  lea    0x10(%rdx),%eax
  movzbl (%rcx,%rax,1),%eax
  mov    %al,0x12(%rsp)
  cmp    %r10d,%edi
  ja     L58
  mov    %esi,%eax
  xor    %edx,%edx
  div    %edi
  mov    %eax,%r10d
  lea    0x10(%rdx),%eax
  movzbl (%rcx,%rax,1),%eax
  mov    %al,0x13(%rsp)
  cmp    %esi,%edi
  ja     L346
  mov    %r10d,%eax
  xor    %edx,%edx
  div    %edi
  mov    %eax,%esi
  lea    0x10(%rdx),%eax
  movzbl (%rcx,%rax,1),%eax
  mov    %al,0x14(%rsp)
  cmp    %r10d,%edi
  ja     L262
  mov    %esi,%eax
  xor    %edx,%edx
  div    %edi
  mov    %eax,%r10d
  lea    0x10(%rdx),%eax
  movzbl (%rcx,%rax,1),%eax
  mov    %al,0x15(%rsp)
  cmp    %esi,%edi
  ja     L49
  mov    %r10d,%eax
  xor    %edx,%edx
  div    %edi
  add    $0x10,%edx
  movzbl (%rcx,%rdx,1),%edx
  mov    %dl,0x16(%rsp)
  cmp    %r10d,%edi
  ja     L389
  xor    %edx,%edx
  div    %edi
  lea    0x10(%rdx),%eax
  movzbl (%rcx,%rax,1),%eax
  mov    %al,0x17(%rsp)
  jmp    L73
L361:
  mov    $0x3,%eax
  mov    $0x2,%ebx
L256:
  mov    $0xb,%edx
  mov    $0xb,%r15d
  cmp    %edx,%r9d
  cmovle %r9d,%edx
  cmp    %r15d,%r8d
  cmovle %r8d,%r15d
  movslq %edx,%r14
  cmp    %eax,%r14d
  jle    L209
  lea    -0x1(%r14),%ebx
  lea    0xd(%rsp,%rax,1),%rdi
  mov    $0x30,%esi
  mov    %ebx,%edx
  sub    %eax,%edx
  add    $0x1,%rdx
  call   <memset@plt>
L323:
  cmp    %r14d,%r15d
  jle    L79
  lea    -0x1(%r15),%ebx
  lea    0xd(%rsp,%r14,1),%rdi
  mov    $0x20,%esi
  mov    %ebx,%edx
  sub    %r14d,%edx
  add    $0x1,%rdx
  call   <memset@plt>
  jmp    L79
L237:
  mov    $0x4,%eax
  mov    $0x3,%ebx
  jmp    L256
L218:
  mov    $0x5,%eax
  mov    $0x4,%ebx
  jmp    L256
L58:
  mov    $0x6,%eax
  mov    $0x5,%ebx
  jmp    L256
L346:
  mov    $0x7,%eax
  mov    $0x6,%ebx
  jmp    L256
L99:
  mov    $0x1,%eax
  jmp    L256
L356:
  movslq %ebx,%rax
  xor    %ebx,%ebx
  jmp    L256
L262:
  mov    $0x8,%eax
  mov    $0x7,%ebx
  jmp    L256
L35:
  mov    $0x2,%eax
  mov    $0x1,%ebx
  jmp    L256
L63:
  mov    $0x2,%eax
  jmp    L256
L49:
  mov    $0x9,%eax
  mov    $0x8,%ebx
  jmp    L256
L389:
  mov    $0xa,%eax
  mov    $0x9,%ebx
  jmp    L256
L190:
  call   <__stack_chk_fail@plt>
L209:
  movslq %eax,%r14
  jmp    L323
```

assistant: ```c
int print_uint(char *buf, int size, unsigned int n, unsigned int base, int flags, int prec, int width) {
  static const char digits[32] = "0123456789ABCDEF0123456789abcdef";
  char rev[11];
  int i = 0, written = 0;
  if (size <= 0)
    return 0;
  do {
    if (flags & 0x01)
      rev[i] = digits[16 + n % base];
    else
      rev[i] = digits[n % base];
    i++;
    n /= base;
  } while (n != 0);
  prec = ((prec) > (11) ? (11) : (prec));
  width = ((width) > (11) ? (11) : (width));
  while (i < prec) {
    rev[i] = '0';
    i++;
  }
  while (i < width) {
    rev[i] = ' ';
    i++;
  }
  i--;
  while (i >= 0 && written < size) {
    printc(buf++, rev[i], flags);
    written++;
    i--;
  }
  return written;
}
```