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

```asm
<xp_printf_get_type>:
  endbr64
  mov    (%rdi),%rax
  xor    %r8d,%r8d
  test   %rax,%rax
  je     L373
  movabs $0x1288900000000,%rcx
  add    %rax,%rdi
  cmpb   $0x25,(%rdi)
  lea    0x1(%rdi),%rax
  jne    L373
  movzbl (%rax),%edx
  cmp    $0x30,%dl
  ja     L121
  nopl   (%rax)
L156:
  bt     %rdx,%rcx
  jb     L306
  cmp    $0x2a,%dl
  jne    L121
  mov    $0x1,%r8d
L373:
  mov    %r8d,%eax
  ret
  nopl   (%rax)
L306:
  movzbl 0x1(%rax),%edx
  add    $0x1,%rax
  cmp    $0x30,%dl
  jbe    L156
L121:
  lea    -0x30(%rdx),%ecx
  cmp    $0x9,%cl
  ja     L205
  nopl   (%rax)
L103:
  movzbl 0x1(%rax),%edx
  add    $0x1,%rax
  lea    -0x30(%rdx),%ecx
  cmp    $0x9,%cl
  jbe    L103
L205:
  mov    %rax,%rcx
  cmp    $0x2e,%dl
  jne    L20
  movzbl 0x1(%rax),%edx
  lea    0x1(%rax),%rcx
  mov    $0x1,%r8d
  cmp    $0x2a,%dl
  jne    L21
  jmp    L373
  nopl   (%rax)
L48:
  movzbl 0x1(%rcx),%edx
  add    $0x1,%rcx
L21:
  lea    -0x30(%rdx),%eax
  cmp    $0x9,%al
  jbe    L48
L20:
  lea    -0x4c(%rdx),%eax
  cmp    $0x2e,%al
  ja     L19
  lea    D61(%rip),%rsi
  movzbl %al,%eax
  movslq (%rsi,%rax,4),%rax
  add    %rsi,%rax
  notrack jmp *%rax
  nopw   0x0(%rax,%rax,1)
L19:
  xor    %ecx,%ecx
L278:
  sub    $0x41,%edx
  cmp    $0x37,%dl
  ja     L145
  lea    D45(%rip),%rsi
  movzbl %dl,%edx
  movslq (%rsi,%rdx,4),%rax
  add    %rsi,%rax
  notrack jmp *%rax
  xchg   %ax,%ax
L145:
  xor    %r8d,%r8d
  mov    %r8d,%eax
  ret
  cmp    $0x4c,%ecx
  jne    L347
  mov    $0xa,%r8d
  jmp    L373
  mov    $0x2,%r8d
  jmp    L373
  movzbl 0x1(%rcx),%eax
  sub    $0x41,%eax
  cmp    $0x37,%al
  ja     L145
  lea    D66(%rip),%rdx
  movzbl %al,%eax
  movslq (%rdx,%rax,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  movzbl 0x1(%rcx),%eax
  sub    $0x41,%eax
  cmp    $0x37,%al
  ja     L145
  lea    D3(%rip),%rdx
  movzbl %al,%eax
  movslq (%rdx,%rax,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  movzbl 0x1(%rcx),%eax
  cmp    $0x6c,%al
  je     L380
  sub    $0x41,%eax
  cmp    $0x37,%al
  ja     L145
  lea    D89(%rip),%rdx
  movzbl %al,%eax
  movslq (%rdx,%rax,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  movzbl 0x1(%rcx),%eax
  sub    $0x41,%eax
  cmp    $0x37,%al
  ja     L145
  lea    D80(%rip),%rdx
  movzbl %al,%eax
  movslq (%rdx,%rax,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  movzbl 0x1(%rcx),%eax
  cmp    $0x68,%al
  je     L136
  sub    $0x41,%eax
  cmp    $0x37,%al
  ja     L145
  lea    D30(%rip),%rdx
  movzbl %al,%eax
  movslq (%rdx,%rax,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  nopl   0x0(%rax)
  movzbl 0x1(%rcx),%edx
  mov    $0x4c,%ecx
  jmp    L278
L347:
  mov    $0x9,%r8d
  jmp    L373
  mov    $0x8,%r8d
  jmp    L373
  mov    $0x3,%r8d
  jmp    L373
  mov    $0x5,%r8d
  jmp    L373
  mov    $0xd,%r8d
  jmp    L373
  mov    $0xf,%r8d
  jmp    L373
  mov    $0xb,%r8d
  jmp    L373
  mov    $0xc,%r8d
  jmp    L373
  mov    $0x4,%r8d
  jmp    L373
  mov    $0xe,%r8d
  jmp    L373
L136:
  movzbl 0x2(%rcx),%eax
  sub    $0x41,%eax
  cmp    $0x37,%al
  ja     L145
  lea    D25(%rip),%rdx
  movzbl %al,%eax
  movslq (%rdx,%rax,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
L380:
  movzbl 0x2(%rcx),%eax
  sub    $0x41,%eax
  cmp    $0x37,%al
  ja     L145
  lea    D81(%rip),%rdx
  movzbl %al,%eax
  movslq (%rdx,%rax,4),%rax
  add    %rdx,%rax
  notrack jmp *%rax
  mov    $0x7,%r8d
  jmp    L373
  mov    $0x6,%r8d
  jmp    L373
```

assistant: ```c
int xp_printf_get_type(const char *format) {
  const char *p;
  int modifier = 0;
  int j;
  int correct_type = 0;
  if (!*(size_t *)format)
    return (0);
  p = format + *(size_t *)format;
  if (*p != '%')
    return (0);
  p++;
  j = 1;
  while (j) {
    switch (*p) {
    case '#':
      p++;
      break;
    case '-':
      p++;
      break;
    case '+':
      p++;
      break;
    case ' ':
      p++;
      break;
    case '0':
      p++;
      break;
    case '\'':
      p++;
      break;
    default:
      j = 0;
      break;
    }
  }
  if (*p == '*')
    return (1);
  while (*p >= '0' && *p <= '9')
    p++;
  if (*p == '.') {
    p++;
    if (*p == '*')
      return (1);
  }
  while (*p >= '0' && *p <= '9')
    p++;
  switch (*p) {
  case 'h':
    modifier = 'h';
    p++;
    if (*p == 'h') {
      p++;
      modifier += 'h' << 8;
    }
    break;
  case 'l':
    modifier = 'l';
    p++;
    if (*p == 'l') {
      p++;
      modifier += 'l' << 8;
    }
    break;
  case 'j':
    modifier = 'j';
    p++;
    break;
  case 't':
    modifier = 't';
    p++;
    break;
  case 'z':
    modifier = 'z';
    p++;
    break;
  case 'L':
    modifier = 'L';
    p++;
    break;
  }
  switch (*p) {
  case 'd':
  case 'i':
    switch (modifier) {
    case 'h' | 'h' << 8:
      correct_type = 1;
      break;
    case 'h':
      correct_type = 1;
      break;
    case 'l':
      correct_type = 4;
      break;
    case 'l' | 'l' << 8:
      correct_type = 6;
      break;
    case 'j':
      correct_type = 12;
      break;
    case 't':
      correct_type = 14;
      break;
    case 'z':
      correct_type = 4;
      break;
    default:
      correct_type = 1;
      break;
    }
    break;
  case 'o':
  case 'u':
  case 'x':
  case 'X':
    switch (modifier) {
    case 'h' | 'h' << 8:
      correct_type = 2;
      break;
    case 'h':
      correct_type = 2;
      break;
    case 'l':
      correct_type = 5;
      break;
    case 'l' | 'l' << 8:
      correct_type = 7;
      break;
    case 'j':
      correct_type = 13;
      break;
    case 't':
      correct_type = 5;
      break;
    case 'z':
      correct_type = 15;
      break;
    default:
      correct_type = 2;
      break;
    }
    break;
  case 'a':
  case 'A':
  case 'e':
  case 'E':
  case 'f':
  case 'F':
  case 'g':
  case 'G':
    switch (modifier) {
    case 'L':
      correct_type = 10;
      break;
    case 'l':
    default:
      correct_type = 9;
      break;
    }
    break;
  case 'C':
    correct_type = 3;
    break;
  case 'c':
    switch (modifier) {
    case 'l':
    default:
      correct_type = 3;
    }
    break;
  case 'S':
    correct_type = 8;
    break;
  case 's':
    switch (modifier) {
    case 'l':
    default:
      correct_type = 8;
    }
    break;
  case 'p':
    correct_type = 11;
    break;
  }
  return (correct_type);
}
```