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

```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    L18
  mov    %esi,%r14d
  lea    0x1(%rdi),%rbp
  mov    $0x1,%r12d
  xor    %ebx,%ebx
  lea    D43(%rip),%r9
  jmp    L181
  nopl   0x0(%rax)
L85:
  mov    %rbp,%rcx
  mov    %r12d,%r10d
  mov    %eax,%ebx
L72:
  mov    %dl,-0x1(%rbp)
  add    $0x1,%r12
  add    $0x1,%rbp
  cmp    %r14d,%ebx
  jge    L100
L181:
  movslq %ebx,%r13
  lea    0x1(%rbx),%eax
  lea    (%r15,%r13,1),%rcx
  movzbl (%rcx),%edx
  cmp    $0x5c,%dl
  jne    L85
  cmp    %eax,%r14d
  jle    L85
  lea    0x1(%r15,%r13,1),%rsi
  movzbl (%rsi),%edx
  lea    -0x22(%rdx),%eax
  cmp    $0x54,%al
  ja     L257
  movzbl %al,%eax
  movslq (%r9,%rax,4),%rax
  add    %r9,%rax
  notrack jmp *%rax
  nopl   0x0(%rax,%rax,1)
L18:
  mov    %rdi,%rcx
  xor    %r10d,%r10d
  xchg   %ax,%ax
L100:
  movb   $0x0,(%rcx)
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L148
  add    $0x28,%rsp
  mov    %r10d,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L257:
  mov    %edx,%eax
  and    $0xffffffdf,%eax
  cmp    $0x58,%al
  jne    L126
  lea    0x3(%rbx),%eax
  cmp    %r14d,%eax
  jl     L213
L174:
  mov    %rbp,%rcx
  mov    %r12d,%r10d
  add    $0x2,%ebx
  jmp    L72
  add    $0x2,%ebx
L201:
  mov    %rbp,%rcx
  mov    %r12d,%r10d
  jmp    L72
  nopl   0x0(%rax)
L126:
  lea    -0x30(%rdx),%eax
  cmp    $0x7,%al
  ja     L174
  lea    -0x2(%r14),%esi
  mov    $0x1,%eax
  lea    0x13(%rsp),%r11
  sub    %ebx,%esi
  add    $0x1,%rsi
L200:
  mov    %dl,(%r11,%rax,1)
  movzbl 0x1(%rcx,%rax,1),%edx
  movslq %eax,%rdi
  lea    -0x30(%rdx),%r10d
  cmp    $0x7,%r10b
  ja     L299
  cmp    %rsi,%rax
  je     L86
  add    $0x1,%rax
  cmp    $0x4,%rax
  jne    L200
  mov    $0x4,%r13d
  mov    $0x3,%edi
L59:
  movb   $0x0,0x14(%rsp,%rdi,1)
L223:
  lea    0x14(%rsp),%rdi
  mov    $0x8,%edx
  xor    %esi,%esi
  add    %r13d,%ebx
  call   <strtol@plt>
  lea    D43(%rip),%r9
L261:
  mov    %eax,%edx
  cmp    $0xffffffff,%eax
  jne    L201
  movslq %ebx,%rax
  movzbl 0x1(%r15,%rax,1),%edx
  jmp    L174
  nopl   0x0(%rax)
L213:
  lea    0x2(%r15,%r13,1),%rax
  mov    %rsi,(%rsp)
  movzbl (%rax),%edi
  mov    %rax,0x8(%rsp)
  call   <isxdigit@plt>
  mov    (%rsp),%rsi
  lea    D43(%rip),%r9
  test   %rax,%rax
  jne    L180
L273:
  movzbl (%rsi),%edx
  jmp    L174
  add    $0x2,%ebx
  mov    $0x9,%edx
  jmp    L201
  add    $0x2,%ebx
  mov    $0xd,%edx
  jmp    L201
  add    $0x2,%ebx
  mov    $0x7,%edx
  jmp    L201
  add    $0x2,%ebx
  mov    $0x8,%edx
  jmp    L201
  add    $0x2,%ebx
  mov    $0xb,%edx
  jmp    L201
  add    $0x2,%ebx
  mov    $0xc,%edx
  jmp    L201
  add    $0x2,%ebx
  mov    $0xa,%edx
  jmp    L201
L86:
  movslq %edi,%rax
  lea    0x1(%rdi),%r13d
  movb   $0x0,0x14(%rsp,%rax,1)
  jmp    L223
L180:
  movzbl 0x3(%r15,%r13,1),%edi
  mov    %rsi,(%rsp)
  call   <isxdigit@plt>
  lea    D43(%rip),%r9
  test   %rax,%rax
  jne    L267
  mov    (%rsp),%rsi
  jmp    L273
L267:
  mov    0x8(%rsp),%rdi
  add    $0x4,%ebx
  call   <x2c@plt>
  lea    D43(%rip),%r9
  jmp    L261
L299:
  lea    0x1(%rdi),%r13d
  jmp    L59
L148:
  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;
}
```