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

```asm
<decode_quoted_printable>:
  endbr64
  push   %r15
  push   %r14
  mov    %esi,%r14d
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    (%rdx),%ebx
  movl   $0x0,(%rdx)
  test   %r14d,%r14d
  je     L349
  mov    %rdi,%r12
  lea    0x1(%r14),%edi
  mov    %rdx,%r13
  mov    %ecx,%r15d
  mov    %edi,(%rsp)
  call   <malloc@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L349
  test   %r15d,%r15d
  je     L125
  lea    -0x1(%r14),%edx
  mov    %rax,%rdi
  xor    %ecx,%ecx
  mov    $0x20,%r10d
  movabs $0x7e0000007e03ff,%r15
  jmp    L441
  nopl   0x0(%rax,%rax,1)
L41:
  cmp    $0x5f,%al
  cmove  %r10d,%eax
L400:
  add    $0x1,%ecx
  mov    %al,(%rdi)
  lea    0x1(%rdi),%rsi
  cmp    %ecx,%ebx
  jbe    L341
L435:
  lea    -0x1(%rdx),%eax
  test   %edx,%edx
  je     L341
  mov    %edx,%r14d
  mov    %rsi,%rdi
  mov    %eax,%edx
  mov    %r8,%r12
L441:
  movzbl (%r12),%eax
  lea    0x1(%r12),%r8
  cmp    $0x3d,%al
  jne    L41
  movzbl 0x1(%r12),%r9d
  mov    %r9d,%esi
  and    $0xffffffdf,%esi
  sub    $0x41,%esi
  cmp    $0x5,%sil
  jbe    L344
  lea    -0x30(%r9),%esi
  cmp    $0x9,%sil
  ja     L400
L344:
  movzbl 0x2(%r12),%esi
  lea    -0x30(%rsi),%r11d
  cmp    $0x36,%r11b
  ja     L400
  bt     %r11,%r15
  jae    L400
  movzbl %r9b,%eax
  mov    $0x30,%r8d
  cmp    $0x39,%r9b
  jbe    L372
  cmp    $0x47,%r9b
  sbb    %r8d,%r8d
  and    $0xffffffe0,%r8d
  add    $0x57,%r8d
L372:
  sub    %r8d,%eax
  mov    $0x30,%r8d
  shl    $0x4,%eax
  cmp    $0x39,%sil
  jbe    L213
  cmp    $0x47,%sil
  sbb    %r8d,%r8d
  and    $0xffffffe0,%r8d
  add    $0x57,%r8d
L213:
  sub    %r8d,%esi
  or     %esi,%eax
  test   %edx,%edx
  je     L326
  xor    %esi,%esi
  lea    -0x3(%r14),%edx
  cmp    $0x2,%r14d
  cmove  %esi,%edx
L326:
  mov    %al,(%rdi)
  lea    0x3(%r12),%r8
  lea    0x1(%rdi),%rsi
  add    $0x1,%ecx
  cmp    %ecx,%ebx
  ja     L435
  nopl   0x0(%rax)
L341:
  movb   $0x0,(%rsi)
  sub    %rbp,%rsi
  jmp    L287
L24:
  mov    %rbp,%rdi
  call   <free@plt>
L349:
  add    $0x18,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L125:
  mov    (%rsp),%edi
  call   <malloc@plt>
  mov    %rax,(%rsp)
  test   %rax,%rax
  je     L24
  mov    (%rsp),%r15
  mov    %r14d,%edx
  mov    %r12,%rsi
  movabs $0x7e0000007e03ff,%r12
  mov    %r15,%rdi
  call   <memcpy@plt>
  movb   $0x0,(%r15,%r14,1)
  mov    %r15,%r14
  mov    %rbp,%r15
L255:
  mov    $0xa,%esi
  mov    %r14,%rdi
  call   <strchr@plt>
  test   %rax,%rax
  je     L292
  lea    -0x1(%rax),%rdx
  lea    0x1(%rax),%rdi
  cmp    %r14,%rdx
  jb     L201
  movzbl -0x1(%rax),%ecx
  cmp    $0xd,%cl
  jne    L278
  jmp    L430
  nopl   0x0(%rax)
L147:
  movzbl (%rdx),%ecx
L278:
  cmp    $0x20,%cl
  je     L217
  cmp    $0x9,%cl
  jne    L201
L217:
  sub    $0x1,%rdx
  cmp    %r14,%rdx
  jae    L147
L201:
  movb   $0x0,0x1(%rdx)
  lea    0x1(%r15),%rax
  mov    %ebx,%r8d
  nopl   0x0(%rax)
L309:
  movzbl (%r14),%edx
  lea    -0x1(%rax),%rcx
  lea    0x1(%r14),%r10
  test   %dl,%dl
  je     L123
  cmp    $0x3d,%dl
  jne    L159
  movzbl 0x1(%r14),%r9d
  test   %r9b,%r9b
  je     L448
  mov    %r9d,%ecx
  and    $0xffffffdf,%ecx
  sub    $0x41,%ecx
  cmp    $0x5,%cl
  jbe    L231
  lea    -0x30(%r9),%ecx
  cmp    $0x9,%cl
  jbe    L231
  nopw   0x0(%rax,%rax,1)
L159:
  mov    %rax,%rcx
  mov    %r10,%r14
L96:
  mov    %rax,%rsi
  mov    %dl,-0x1(%rax)
  add    $0x1,%rax
  sub    %rbp,%rsi
  cmp    %r8,%rsi
  jl     L309
L115:
  movb   $0x0,(%rcx)
  mov    (%rsp),%rdi
  mov    %rsi,0x8(%rsp)
  call   <free@plt>
  mov    0x8(%rsp),%rsi
L287:
  mov    %esi,0x0(%r13)
  add    $0x18,%rsp
  mov    %rbp,%rdi
  add    $0x1,%esi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10f0 <realloc@plt>
  nopl   0x0(%rax,%rax,1)
L123:
  test   %rdi,%rdi
  je     L190
  mov    %rax,%rsi
  mov    %ebx,%edx
  movb   $0xa,(%rcx)
  mov    %rax,%r15
  sub    %rbp,%rsi
  cmp    %rdx,%rsi
  jge    L388
L161:
  mov    %rdi,%r14
  jmp    L255
L231:
  movzbl 0x2(%r14),%esi
  lea    -0x30(%rsi),%ecx
  cmp    $0x36,%cl
  ja     L159
  bt     %rcx,%r12
  jae    L159
  movzbl %r9b,%edx
  mov    $0x30,%ecx
  cmp    $0x39,%r9b
  jbe    L367
  cmp    $0x47,%r9b
  sbb    %ecx,%ecx
  and    $0xffffffe0,%ecx
  add    $0x57,%ecx
L367:
  sub    %ecx,%edx
  mov    $0x30,%r9d
  shl    $0x4,%edx
  cmp    $0x39,%sil
  jbe    L219
  cmp    $0x47,%sil
  sbb    %r9d,%r9d
  and    $0xffffffe0,%r9d
  add    $0x57,%r9d
L219:
  sub    %r9d,%esi
  mov    %rax,%rcx
  add    $0x3,%r14
  or     %esi,%edx
  jmp    L96
  nopw   0x0(%rax,%rax,1)
L448:
  mov    %rcx,%rsi
  mov    %ebx,%eax
  sub    %rbp,%rsi
  cmp    %rax,%rsi
  jge    L115
  test   %rdi,%rdi
  je     L115
  mov    %rcx,%r15
  jmp    L161
  nopw   0x0(%rax,%rax,1)
L190:
  mov    %rcx,%rsi
  sub    %rbp,%rsi
  jmp    L115
  nopl   0x0(%rax,%rax,1)
L292:
  mov    %r14,%rdi
  call   <strlen@plt>
  xor    %edi,%edi
  cltq
  lea    -0x1(%r14,%rax,1),%rdx
L195:
  cmp    %r14,%rdx
  jae    L147
  jmp    L201
  nopw   0x0(%rax,%rax,1)
L388:
  mov    %rax,%rcx
  jmp    L115
  nopl   0x0(%rax,%rax,1)
L430:
  lea    -0x2(%rax),%rdx
  jmp    L195
```

assistant: ```c
char *decode_quoted_printable(unsigned char *buf, unsigned int len, unsigned int *ret_len, int header) {
  unsigned char *dest, *deststart;
  unsigned int limit = *ret_len;
  *ret_len = 0;
  if (!len)
    return NULL;
  if (!(dest = (unsigned char *)malloc(len + 1)))
    return NULL;
  deststart = dest;
  if (header) {
    unsigned int real_len = 0;
    while (len--) {
      unsigned char c = *buf++;
      if ('=' == c) {
        unsigned char c2;
        c = buf[0];
        c2 = buf[1];
        if (((((c) >= '0') && ((c) <= '9')) || (((c) >= 'A') && ((c) <= 'F')) || (((c) >= 'a') && ((c) <= 'f'))) && ((((c2) >= '0') && ((c2) <= '9')) || (((c2) >= 'A') && ((c2) <= 'F')) || (((c2) >= 'a') && ((c2) <= 'f')))) {
          c = (((c) - (((c) > '9') ? (((c) > 'F') ? 'a' - 10 : 'A' - 10) : '0')) << 4) | ((c2) - (((c2) > '9') ? (((c2) > 'F') ? 'a' - 10 : 'A' - 10) : '0'));
          if (len)
            len--;
          if (len)
            len--;
          buf += 2;
        } else
          c = '=';
      } else if ('_' == c)
        c = ' ';
      *dest++ = c;
      if (++real_len >= limit)
        break;
    }
    *dest = 0;
    *ret_len = dest - deststart;
    return (char *)realloc(deststart, *ret_len + 1);
  } else {
    unsigned char *text, *textstart;
    if (!(text = (unsigned char *)malloc(len + 1))) {
      free(dest);
      return NULL;
    }
    memcpy(text, buf, len);
    text[len] = 0;
    textstart = text;
    while (text) {
      unsigned char c;
      unsigned char *lp = text;
      {
        unsigned char *ep;
        if ((ep = (unsigned char *)strchr((char *)lp, '\n'))) {
          text = ep + 1;
          ep--;
          if (ep >= lp) {
            if ('\r' == *ep)
              ep--;
          }
        } else {
          ep = lp + strlen((char *)lp) - 1;
          text = NULL;
        }
        while ((ep >= lp) && (((c = *ep) == ' ') || (c == '\t')))
          ep--;
        *(ep + 1) = '\0';
      }
      do {
        switch (c = *lp++) {
        case '\0':
          if (text)
            *dest++ = '\n';
          break;
        case '=':
          if ((c = *lp)) {
            unsigned char d = *(lp + 1);
            if (((((c) >= '0') && ((c) <= '9')) || (((c) >= 'A') && ((c) <= 'F')) || (((c) >= 'a') && ((c) <= 'f'))) && ((((d) >= '0') && ((d) <= '9')) || (((d) >= 'A') && ((d) <= 'F')) || (((d) >= 'a') && ((d) <= 'f')))) {
              *dest++ = (((c) - (((c) > '9') ? (((c) > 'F') ? 'a' - 10 : 'A' - 10) : '0')) << 4) | ((d) - (((d) > '9') ? (((d) > 'F') ? 'a' - 10 : 'A' - 10) : '0'));
              lp += 2;
            } else {
              *dest++ = '=';
            }
          }
          break;
        default:
          *dest++ = c;
          break;
        }
        if ((dest - deststart) >= limit) {
          text = NULL;
          break;
        }
      } while (c);
    }
    *dest = 0;
    free(textstart);
    *ret_len = dest - deststart;
    return (char *)realloc(deststart, *ret_len + 1);
  }
}
```