user: What is the c source code of the assembly code below?

```asm
<hprint2>:
  endbr64
  sub    $0x28,%rsp
  mov    %rdx,%rax
  mov    %fs:0x28,%rdx
  mov    %rdx,0x18(%rsp)
  mov    %rax,%rdx
  shr    $0x1c,%rdx
  and    $0xf,%edx
  cmp    $0x9,%rdx
  ja     L165
  lea    0x30(%rdx),%r8d
  test   %rdx,%rdx
  je     L313
L0:
  mov    %r8b,(%rsp)
  mov    %rax,%r8
  mov    $0x1,%edx
  shr    $0x18,%r8
  and    $0xf,%r8d
  cmp    $0x9,%r8
  jbe    L221
L200:
  add    $0x57,%r8d
  add    $0x1,%edx
L236:
  mov    %r8b,0x1(%rsp)
  mov    %rax,%r8
  shr    $0x14,%r8
  and    $0xf,%r8d
  cmp    $0x9,%r8
  jbe    L64
L144:
  add    $0x57,%r8d
  add    $0x1,%edx
L183:
  mov    %r8b,0x2(%rsp)
  mov    %rax,%r8
  shr    $0x10,%r8
  and    $0xf,%r8d
  cmp    $0x9,%r8
  jbe    L115
L98:
  add    $0x57,%r8d
  add    $0x1,%edx
L81:
  mov    %r8b,0x3(%rsp)
  mov    %rax,%r8
  shr    $0xc,%r8
  and    $0xf,%r8d
  cmp    $0x9,%r8
  jbe    L220
L268:
  add    $0x57,%r8d
  add    $0x1,%edx
L319:
  mov    %r8b,0x4(%rsp)
  mov    %rax,%r8
  shr    $0x8,%r8
  and    $0xf,%r8d
  cmp    $0x9,%r8
  jbe    L242
L62:
  add    $0x57,%r8d
  add    $0x1,%edx
L153:
  mov    %r8b,0x5(%rsp)
  mov    %rax,%r8
  shr    $0x4,%r8
  and    $0xf,%r8d
  cmp    $0x9,%r8
  jbe    L287
L354:
  add    $0x57,%r8d
  add    $0x1,%edx
L264:
  mov    %r8b,0x6(%rsp)
L7:
  and    $0xf,%eax
  cmp    $0x9,%rax
  jbe    L310
  add    $0x57,%eax
  add    $0x1,%edx
L54:
  mov    %al,0x7(%rsp)
  mov    $0x8,%eax
  cmp    %eax,%ecx
  movb   $0x0,0x8(%rsp)
  cmovle %ecx,%eax
  cmp    %edx,%eax
  cmovl  %edx,%eax
  mov    $0x8,%edx
  sub    %eax,%edx
  movslq %edx,%rax
  lea    (%rsp,%rax,1),%rdx
  call   <cprint@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L77
  add    $0x28,%rsp
  ret
L165:
  lea    0x57(%rdx),%r8d
  jmp    L0
L309:
  xor    %edx,%edx
  nopl   0x0(%rax,%rax,1)
L64:
  add    $0x30,%r8d
  add    $0x1,%edx
  jmp    L183
L93:
  xor    %edx,%edx
  xchg   %ax,%ax
L221:
  add    $0x30,%r8d
  add    $0x1,%edx
  jmp    L236
L97:
  xor    %edx,%edx
  xchg   %ax,%ax
L115:
  add    $0x30,%r8d
  add    $0x1,%edx
  jmp    L81
  nopl   0x0(%rax)
L310:
  add    $0x30,%eax
  add    $0x1,%edx
  jmp    L54
  nopl   0x0(%rax,%rax,1)
L313:
  mov    %rax,%r8
  movb   $0x30,(%rsp)
  shr    $0x18,%r8
  and    $0xf,%r8d
  cmp    $0x9,%r8
  ja     L200
  test   %r8,%r8
  jne    L93
  mov    %rax,%r8
  movb   $0x30,0x1(%rsp)
  shr    $0x14,%r8
  and    $0xf,%r8d
  cmp    $0x9,%r8
  ja     L121
  test   %r8,%r8
  jne    L309
  mov    %rax,%r8
  movb   $0x30,0x2(%rsp)
  shr    $0x10,%r8
  and    $0xf,%r8d
  cmp    $0x9,%r8
  ja     L308
  test   %r8,%r8
  jne    L97
  mov    %rax,%r8
  movb   $0x30,0x3(%rsp)
  shr    $0xc,%r8
  and    $0xf,%r8d
  cmp    $0x9,%r8
  ja     L191
  test   %r8,%r8
  jne    L56
  mov    %rax,%r8
  movb   $0x30,0x4(%rsp)
  shr    $0x8,%r8
  and    $0xf,%r8d
  cmp    $0x9,%r8
  ja     L23
  test   %r8,%r8
  jne    L226
  mov    %rax,%r8
  movb   $0x30,0x5(%rsp)
  shr    $0x4,%r8
  and    $0xf,%r8d
  cmp    $0x9,%r8
  ja     L297
  test   %r8,%r8
  jne    L225
  movb   $0x30,0x6(%rsp)
  xor    %edx,%edx
  jmp    L7
L56:
  xor    %edx,%edx
  nopw   0x0(%rax,%rax,1)
L220:
  add    $0x30,%r8d
  add    $0x1,%edx
  jmp    L319
L226:
  xor    %edx,%edx
  xchg   %ax,%ax
L242:
  add    $0x30,%r8d
  add    $0x1,%edx
  jmp    L153
L225:
  xor    %edx,%edx
  xchg   %ax,%ax
L287:
  add    $0x30,%r8d
  add    $0x1,%edx
  jmp    L264
L77:
  call   <__stack_chk_fail@plt>
L297:
  xor    %edx,%edx
  jmp    L354
L23:
  xor    %edx,%edx
  jmp    L62
L191:
  xor    %edx,%edx
  jmp    L268
L308:
  xor    %edx,%edx
  jmp    L98
L121:
  xor    %edx,%edx
  jmp    L144
```

assistant: ```c
void hprint2(int y, int x, unsigned long val, int digits) {
  unsigned long j;
  int i, idx, flag = 0;
  char buf[18];
  for (i = 0, idx = 0; i < 8; i++) {
    j = val >> (28 - (4 * i));
    j &= 0xf;
    if (j < 10) {
      if (flag || j || i == 7) {
        buf[idx++] = j + '0';
        flag++;
      } else {
        buf[idx++] = '0';
      }
    } else {
      buf[idx++] = j + 'a' - 10;
      flag++;
    }
  }
  if (digits > 8) {
    digits = 8;
  }
  if (flag > digits) {
    digits = flag;
  }
  buf[idx] = 0;
  cprint(y, x, buf + (idx - digits));
}
```