user: What would the C source look like for the assembly code provided here?

```asm
<xp_printf_get_type>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x28(%rbp)
  movl   $0x0,-0x14(%rbp)
  movl   $0x0,-0xc(%rbp)
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rax
  test   %rax,%rax
  jne    L605
  mov    $0x0,%eax
  jmp    L138
L605:
  mov    -0x28(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x25,%al
  je     L447
  mov    $0x0,%eax
  jmp    L138
L447:
  addq   $0x1,-0x8(%rbp)
  movl   $0x1,-0x10(%rbp)
  jmp    L389
L190:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x20,%eax
  cmp    $0x10,%eax
  ja     L580
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D40(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D40(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  addq   $0x1,-0x8(%rbp)
  jmp    L389
  addq   $0x1,-0x8(%rbp)
  jmp    L389
  addq   $0x1,-0x8(%rbp)
  jmp    L389
  addq   $0x1,-0x8(%rbp)
  jmp    L389
  addq   $0x1,-0x8(%rbp)
  jmp    L389
  addq   $0x1,-0x8(%rbp)
  jmp    L389
L580:
  movl   $0x0,-0x10(%rbp)
  nop
L389:
  cmpl   $0x0,-0x10(%rbp)
  jne    L190
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2a,%al
  jne    L349
  mov    $0x1,%eax
  jmp    L138
L128:
  addq   $0x1,-0x8(%rbp)
L349:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jle    L125
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x39,%al
  jle    L128
L125:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2e,%al
  jne    L654
  addq   $0x1,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2a,%al
  jne    L654
  mov    $0x1,%eax
  jmp    L138
L405:
  addq   $0x1,-0x8(%rbp)
L654:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x2f,%al
  jle    L387
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x39,%al
  jle    L405
L387:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x4c,%eax
  cmp    $0x2e,%eax
  ja     L70
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D62(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D62(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  movl   $0x68,-0x14(%rbp)
  addq   $0x1,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x68,%al
  jne    L384
  addq   $0x1,-0x8(%rbp)
  addl   $0x6800,-0x14(%rbp)
  jmp    L384
  movl   $0x6c,-0x14(%rbp)
  addq   $0x1,-0x8(%rbp)
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x6c,%al
  jne    L296
  addq   $0x1,-0x8(%rbp)
  addl   $0x6c00,-0x14(%rbp)
  jmp    L296
  movl   $0x6a,-0x14(%rbp)
  addq   $0x1,-0x8(%rbp)
  jmp    L70
  movl   $0x74,-0x14(%rbp)
  addq   $0x1,-0x8(%rbp)
  jmp    L70
  movl   $0x7a,-0x14(%rbp)
  addq   $0x1,-0x8(%rbp)
  jmp    L70
  movl   $0x4c,-0x14(%rbp)
  addq   $0x1,-0x8(%rbp)
  jmp    L70
L384:
  nop
  jmp    L70
L296:
  nop
L70:
  mov    -0x8(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  sub    $0x41,%eax
  cmp    $0x37,%eax
  ja     L363
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D50(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D50(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  cmpl   $0x6c6c,-0x14(%rbp)
  je     L162
  cmpl   $0x6c6c,-0x14(%rbp)
  jg     L135
  cmpl   $0x7a,-0x14(%rbp)
  jg     L346
  cmpl   $0x68,-0x14(%rbp)
  jl     L135
  mov    -0x14(%rbp),%eax
  sub    $0x68,%eax
  cmp    $0x12,%eax
  ja     L135
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D76(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D76(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
L346:
  cmpl   $0x6868,-0x14(%rbp)
  jne    L135
  movl   $0x1,-0xc(%rbp)
  jmp    L323
  movl   $0x1,-0xc(%rbp)
  jmp    L323
  movl   $0x4,-0xc(%rbp)
  jmp    L323
L162:
  movl   $0x6,-0xc(%rbp)
  jmp    L323
  movl   $0xc,-0xc(%rbp)
  jmp    L323
  movl   $0xe,-0xc(%rbp)
  jmp    L323
  movl   $0x4,-0xc(%rbp)
  jmp    L323
L135:
  movl   $0x1,-0xc(%rbp)
  nop
L323:
  jmp    L363
  cmpl   $0x6c6c,-0x14(%rbp)
  je     L218
  cmpl   $0x6c6c,-0x14(%rbp)
  jg     L11
  cmpl   $0x7a,-0x14(%rbp)
  jg     L448
  cmpl   $0x68,-0x14(%rbp)
  jl     L11
  mov    -0x14(%rbp),%eax
  sub    $0x68,%eax
  cmp    $0x12,%eax
  ja     L11
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D82(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D82(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
L448:
  cmpl   $0x6868,-0x14(%rbp)
  jne    L11
  movl   $0x2,-0xc(%rbp)
  jmp    L648
  movl   $0x2,-0xc(%rbp)
  jmp    L648
  movl   $0x5,-0xc(%rbp)
  jmp    L648
L218:
  movl   $0x7,-0xc(%rbp)
  jmp    L648
  movl   $0xd,-0xc(%rbp)
  jmp    L648
  movl   $0x5,-0xc(%rbp)
  jmp    L648
  movl   $0xf,-0xc(%rbp)
  jmp    L648
L11:
  movl   $0x2,-0xc(%rbp)
  nop
L648:
  jmp    L363
  cmpl   $0x4c,-0x14(%rbp)
  jne    L385
  movl   $0xa,-0xc(%rbp)
  jmp    L45
L385:
  movl   $0x9,-0xc(%rbp)
  nop
L45:
  jmp    L363
  movl   $0x3,-0xc(%rbp)
  jmp    L363
  movl   $0x3,-0xc(%rbp)
  jmp    L363
  movl   $0x8,-0xc(%rbp)
  jmp    L363
  movl   $0x8,-0xc(%rbp)
  jmp    L363
  movl   $0xb,-0xc(%rbp)
  nop
L363:
  mov    -0xc(%rbp),%eax
L138:
  pop    %rbp
  ret
```

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