user: 这段汇编代码用C语言表示是什么样的：

```asm
<igbc_char_hex>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %edi,%eax
  mov    %al,-0x14(%rbp)
  movzbl -0x14(%rbp),%eax
  and    $0xf,%eax
  mov    %al,-0xa(%rbp)
  movzbl -0x14(%rbp),%eax
  shr    $0x4,%al
  mov    %al,-0x9(%rbp)
  mov    $0x2,%edi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  movsbl -0x9(%rbp),%eax
  cmp    $0xf,%eax
  ja     L311
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D22(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D22(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  mov    -0x8(%rbp),%rax
  movb   $0x30,(%rax)
  jmp    L311
  mov    -0x8(%rbp),%rax
  movb   $0x31,(%rax)
  jmp    L311
  mov    -0x8(%rbp),%rax
  movb   $0x32,(%rax)
  jmp    L311
  mov    -0x8(%rbp),%rax
  movb   $0x33,(%rax)
  jmp    L311
  mov    -0x8(%rbp),%rax
  movb   $0x34,(%rax)
  jmp    L311
  mov    -0x8(%rbp),%rax
  movb   $0x35,(%rax)
  jmp    L311
  mov    -0x8(%rbp),%rax
  movb   $0x36,(%rax)
  jmp    L311
  mov    -0x8(%rbp),%rax
  movb   $0x37,(%rax)
  jmp    L311
  mov    -0x8(%rbp),%rax
  movb   $0x38,(%rax)
  jmp    L311
  mov    -0x8(%rbp),%rax
  movb   $0x39,(%rax)
  jmp    L311
  mov    -0x8(%rbp),%rax
  movb   $0x41,(%rax)
  jmp    L311
  mov    -0x8(%rbp),%rax
  movb   $0x42,(%rax)
  jmp    L311
  mov    -0x8(%rbp),%rax
  movb   $0x43,(%rax)
  jmp    L311
  mov    -0x8(%rbp),%rax
  movb   $0x44,(%rax)
  jmp    L311
  mov    -0x8(%rbp),%rax
  movb   $0x45,(%rax)
  jmp    L311
  mov    -0x8(%rbp),%rax
  movb   $0x46,(%rax)
  nop
L311:
  movsbl -0xa(%rbp),%eax
  cmp    $0xf,%eax
  ja     L294
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D7(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D7(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movb   $0x30,(%rax)
  jmp    L294
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movb   $0x31,(%rax)
  jmp    L294
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movb   $0x32,(%rax)
  jmp    L294
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movb   $0x33,(%rax)
  jmp    L294
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movb   $0x34,(%rax)
  jmp    L294
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movb   $0x35,(%rax)
  jmp    L294
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movb   $0x36,(%rax)
  jmp    L294
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movb   $0x37,(%rax)
  jmp    L294
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movb   $0x38,(%rax)
  jmp    L294
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movb   $0x39,(%rax)
  jmp    L294
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movb   $0x41,(%rax)
  jmp    L294
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movb   $0x42,(%rax)
  jmp    L294
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movb   $0x43,(%rax)
  jmp    L294
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movb   $0x44,(%rax)
  jmp    L294
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movb   $0x45,(%rax)
  jmp    L294
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movb   $0x46,(%rax)
  nop
L294:
  mov    -0x8(%rbp),%rax
  leave
  ret
```

assistant: ```c
char *igbc_char_hex(char num) {
  char lower = num & 0x0F;
  char upper = (num >> 4) & 0x0F;
  char *out = (char *)malloc(2);
  switch (upper) {
  case 0x00:
    out[0] = '0';
    break;
  case 0x01:
    out[0] = '1';
    break;
  case 0x02:
    out[0] = '2';
    break;
  case 0x03:
    out[0] = '3';
    break;
  case 0x04:
    out[0] = '4';
    break;
  case 0x05:
    out[0] = '5';
    break;
  case 0x06:
    out[0] = '6';
    break;
  case 0x07:
    out[0] = '7';
    break;
  case 0x08:
    out[0] = '8';
    break;
  case 0x09:
    out[0] = '9';
    break;
  case 0x0A:
    out[0] = 'A';
    break;
  case 0x0B:
    out[0] = 'B';
    break;
  case 0x0C:
    out[0] = 'C';
    break;
  case 0x0D:
    out[0] = 'D';
    break;
  case 0x0E:
    out[0] = 'E';
    break;
  case 0x0F:
    out[0] = 'F';
    break;
  }
  switch (lower) {
  case 0x00:
    out[1] = '0';
    break;
  case 0x01:
    out[1] = '1';
    break;
  case 0x02:
    out[1] = '2';
    break;
  case 0x03:
    out[1] = '3';
    break;
  case 0x04:
    out[1] = '4';
    break;
  case 0x05:
    out[1] = '5';
    break;
  case 0x06:
    out[1] = '6';
    break;
  case 0x07:
    out[1] = '7';
    break;
  case 0x08:
    out[1] = '8';
    break;
  case 0x09:
    out[1] = '9';
    break;
  case 0x0A:
    out[1] = 'A';
    break;
  case 0x0B:
    out[1] = 'B';
    break;
  case 0x0C:
    out[1] = 'C';
    break;
  case 0x0D:
    out[1] = 'D';
    break;
  case 0x0E:
    out[1] = 'E';
    break;
  case 0x0F:
    out[1] = 'F';
    break;
  }
  return out;
}
```