user: Please show me the C implementation that matches the assembly code listed below:

```asm
<tooctal>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %rdi,-0x8(%rbp)
  mov    %esi,%eax
  mov    %al,-0xc(%rbp)
  cmpb   $0x1f,-0xc(%rbp)
  jbe    L17
  cmpb   $0x7e,-0xc(%rbp)
  ja     L17
  movzbl -0xc(%rbp),%edx
  mov    -0x8(%rbp),%rax
  mov    %dl,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movb   $0x0,(%rax)
  jmp    L34
L17:
  movzbl -0xc(%rbp),%eax
  cmp    $0xd,%eax
  ja     L4
  mov    %eax,%eax
  lea    0x0(,%rax,4),%rdx
  lea    D33(%rip),%rax
  mov    (%rdx,%rax,1),%eax
  cltq
  lea    D33(%rip),%rdx
  add    %rdx,%rax
  notrack jmp *%rax
  mov    -0x8(%rbp),%rax
  movb   $0x5c,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movb   $0x30,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0x2,%rax
  movb   $0x0,(%rax)
  jmp    L34
  mov    -0x8(%rbp),%rax
  movb   $0x5c,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movb   $0x61,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0x2,%rax
  movb   $0x0,(%rax)
  jmp    L34
  mov    -0x8(%rbp),%rax
  movb   $0x5c,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movb   $0x62,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0x2,%rax
  movb   $0x0,(%rax)
  jmp    L34
  mov    -0x8(%rbp),%rax
  movb   $0x5c,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movb   $0x66,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0x2,%rax
  movb   $0x0,(%rax)
  jmp    L34
  mov    -0x8(%rbp),%rax
  movb   $0x5c,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movb   $0x6e,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0x2,%rax
  movb   $0x0,(%rax)
  jmp    L34
  mov    -0x8(%rbp),%rax
  movb   $0x5c,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movb   $0x72,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0x2,%rax
  movb   $0x0,(%rax)
  jmp    L34
  mov    -0x8(%rbp),%rax
  movb   $0x5c,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movb   $0x74,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0x2,%rax
  movb   $0x0,(%rax)
  jmp    L34
  mov    -0x8(%rbp),%rax
  movb   $0x5c,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movb   $0x76,(%rax)
  mov    -0x8(%rbp),%rax
  add    $0x2,%rax
  movb   $0x0,(%rax)
  jmp    L34
L4:
  movzbl -0xc(%rbp),%eax
  shr    $0x6,%al
  movzbl %al,%eax
  cltq
  lea    D11(%rip),%rdx
  movzbl (%rax,%rdx,1),%edx
  mov    -0x8(%rbp),%rax
  mov    %dl,(%rax)
  movzbl -0xc(%rbp),%eax
  shr    $0x3,%al
  movzbl %al,%eax
  and    $0x7,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  movslq %ecx,%rax
  lea    D11(%rip),%rcx
  movzbl (%rax,%rcx,1),%eax
  mov    %al,(%rdx)
  movzbl -0xc(%rbp),%eax
  and    $0x7,%eax
  mov    %eax,%ecx
  mov    -0x8(%rbp),%rax
  lea    0x2(%rax),%rdx
  movslq %ecx,%rax
  lea    D11(%rip),%rcx
  movzbl (%rax,%rcx,1),%eax
  mov    %al,(%rdx)
  nop
L34:
  mov    -0x8(%rbp),%rax
  pop    %rbp
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D11
data_type: string

tool: D11: 01234567

assistant: ```c
const char *tooctal(char buf[3], unsigned char chr) {
  if (chr > 0x1f && chr < 0x7f) {
    buf[0] = chr;
    buf[1] = '\0';
  } else {
    switch (chr) {
    case '\0':
      buf[0] = '\\';
      buf[1] = '0';
      buf[2] = '\0';
      break;
    case '\a':
      buf[0] = '\\';
      buf[1] = 'a';
      buf[2] = '\0';
      break;
    case '\b':
      buf[0] = '\\';
      buf[1] = 'b';
      buf[2] = '\0';
      break;
    case '\f':
      buf[0] = '\\';
      buf[1] = 'f';
      buf[2] = '\0';
      break;
    case '\n':
      buf[0] = '\\';
      buf[1] = 'n';
      buf[2] = '\0';
      break;
    case '\r':
      buf[0] = '\\';
      buf[1] = 'r';
      buf[2] = '\0';
      break;
    case '\t':
      buf[0] = '\\';
      buf[1] = 't';
      buf[2] = '\0';
      break;
    case '\v':
      buf[0] = '\\';
      buf[1] = 'v';
      buf[2] = '\0';
      break;
    default:
      buf[0] = "01234567"[0x7 & (chr >> 6)];
      buf[1] = "01234567"[0x7 & (chr >> 3)];
      buf[2] = "01234567"[0x7 & (chr >> 0)];
      break;
    }
  }
  return buf;
}
```