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

```asm
<escape_seq_decode>:
  endbr64
  push   %r15
  mov    %rdi,%r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  test   %esi,%esi
  jle    L266
  mov    %esi,%r14d
  lea    0x1(%rdi),%rbp
  mov    $0x1,%r12d
  xor    %ebx,%ebx
  lea    D24(%rip),%r9
  jmp    L312
  nopl   0x0(%rax)
L287:
  mov    %rbp,%rsi
  mov    %r12d,%r8d
  mov    %eax,%ebx
L133:
  mov    %dl,-0x1(%rbp)
  add    $0x1,%r12
  add    $0x1,%rbp
  cmp    %r14d,%ebx
  jge    L190
L312:
  movslq %ebx,%r13
  lea    0x1(%rbx),%eax
  movzbl (%r15,%r13,1),%edx
  cmp    $0x5c,%dl
  jne    L287
  cmp    %eax,%r14d
  jle    L287
  lea    0x1(%r15,%r13,1),%rsi
  movzbl (%rsi),%edx
  lea    -0x22(%rdx),%eax
  cmp    $0x54,%al
  ja     L295
  movzbl %al,%eax
  movslq (%r9,%rax,4),%rax
  add    %r9,%rax
  notrack jmp *%rax
  nopl   0x0(%rax)
L266:
  mov    %rdi,%rsi
  xor    %r8d,%r8d
  xchg   %ax,%ax
L190:
  movb   $0x0,(%rsi)
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L253
  add    $0x28,%rsp
  mov    %r8d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L295:
  mov    %edx,%eax
  and    $0xffffffdf,%eax
  cmp    $0x58,%al
  jne    L278
  lea    0x3(%rbx),%eax
  cmp    %r14d,%eax
  jl     L309
L229:
  mov    %rbp,%rsi
  mov    %r12d,%r8d
  add    $0x2,%ebx
  jmp    L133
  add    $0x2,%ebx
L117:
  mov    %rbp,%rsi
  mov    %r12d,%r8d
  jmp    L133
  nopl   0x0(%rax)
L278:
  lea    -0x30(%rdx),%eax
  cmp    $0x7,%al
  ja     L229
  lea    0x2(%rbx),%eax
  mov    %dl,0x14(%rsp)
  movslq %eax,%rdx
  movzbl (%r15,%rdx,1),%edx
  lea    -0x30(%rdx),%esi
  cmp    $0x7,%sil
  ja     L173
  cmp    %r14d,%eax
  jge    L173
  lea    0x3(%rbx),%eax
  mov    %dl,0x15(%rsp)
  movslq %eax,%rdx
  movzbl (%r15,%rdx,1),%edx
  lea    -0x30(%rdx),%esi
  cmp    $0x7,%sil
  ja     L58
  cmp    %eax,%r14d
  jle    L58
  mov    %dl,0x16(%rsp)
  add    $0x4,%ebx
  movb   $0x0,0x17(%rsp)
L115:
  lea    0x14(%rsp),%rdi
  mov    $0x8,%edx
  xor    %esi,%esi
  call   <strtol@plt>
  lea    D24(%rip),%r9
L71:
  mov    %eax,%edx
  cmp    $0xffffffff,%eax
  jne    L117
  movslq %ebx,%rax
  movzbl 0x1(%r15,%rax,1),%edx
  jmp    L229
  cs nopw 0x0(%rax,%rax,1)
L309:
  lea    0x2(%r15,%r13,1),%rax
  mov    %rsi,(%rsp)
  movzbl (%rax),%edi
  mov    %rax,0x8(%rsp)
  call   <isxdigit@plt>
  mov    (%rsp),%rsi
  lea    D24(%rip),%r9
  test   %rax,%rax
  jne    L285
L61:
  movzbl (%rsi),%edx
  jmp    L229
  add    $0x2,%ebx
  mov    $0x9,%edx
  jmp    L117
  add    $0x2,%ebx
  mov    $0xd,%edx
  jmp    L117
  add    $0x2,%ebx
  mov    $0x7,%edx
  jmp    L117
  add    $0x2,%ebx
  mov    $0x8,%edx
  jmp    L117
  add    $0x2,%ebx
  mov    $0xb,%edx
  jmp    L117
  add    $0x2,%ebx
  mov    $0xc,%edx
  jmp    L117
  add    $0x2,%ebx
  mov    $0xa,%edx
  jmp    L117
L285:
  movzbl 0x3(%r15,%r13,1),%edi
  mov    %rsi,(%rsp)
  call   <isxdigit@plt>
  lea    D24(%rip),%r9
  test   %rax,%rax
  jne    L155
  mov    (%rsp),%rsi
  jmp    L61
L155:
  mov    0x8(%rsp),%rdi
  add    $0x4,%ebx
  call   <x2c@plt>
  lea    D24(%rip),%r9
  jmp    L71
L173:
  movb   $0x0,0x15(%rsp)
  mov    %eax,%ebx
  jmp    L115
L58:
  movb   $0x0,0x16(%rsp)
  mov    %eax,%ebx
  jmp    L115
L253:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int escape_seq_decode(unsigned char *input, int input_len) {
  unsigned char *d = input;
  int i, count;
  i = count = 0;
  while (i < input_len) {
    if ((input[i] == '\\') && (i + 1 < input_len)) {
      int c = -1;
      switch (input[i + 1]) {
      case 'a':
        c = '\a';
        break;
      case 'b':
        c = '\b';
        break;
      case 'f':
        c = '\f';
        break;
      case 'n':
        c = '\n';
        break;
      case 'r':
        c = '\r';
        break;
      case 't':
        c = '\t';
        break;
      case 'v':
        c = '\v';
        break;
      case '\\':
        c = '\\';
        break;
      case '?':
        c = '?';
        break;
      case '\'':
        c = '\'';
        break;
      case '"':
        c = '"';
        break;
      }
      if (c != -1)
        i += 2;
      if (c == -1) {
        if ((input[i + 1] == 'x') || (input[i + 1] == 'X')) {
          if ((i + 3 < input_len) && (isxdigit(input[i + 2])) && (isxdigit(input[i + 3]))) {
            c = x2c(&input[i + 2]);
            i += 4;
          } else {
          }
        } else if (((input[i + 1] >= '0') && (input[i + 1] <= '7'))) {
          char buf[4];
          int j = 0;
          while ((i + 1 + j < input_len) && (j < 3)) {
            buf[j] = input[i + 1 + j];
            j++;
            if (!((input[i + 1 + j] >= '0') && (input[i + 1 + j] <= '7')))
              break;
          }
          buf[j] = '\0';
          if (j > 0) {
            c = strtol(buf, NULL, 8);
            i += 1 + j;
          }
        }
      }
      if (c == -1) {
        *d++ = input[i + 1];
        count++;
        i += 2;
      } else {
        *d++ = c;
        count++;
      }
    } else {
      *d++ = input[i++];
      count++;
    }
  }
  *d = '\0';
  return count;
}
```