user: Translate the below assembly code into C programming language:

```asm
<tgoto>:
  endbr64
  movzbl (%rdi),%eax
  test   %al,%al
  je     L65
  mov    %esi,%r8d
  mov    %edx,%r9d
  mov    $0x0,%esi
  mov    $0x0,%r11d
  lea    D42(%rip),%rdx
  mov    $0x1,%r10d
L240:
  cmp    $0x25,%al
  je     L61
  mov    %al,(%rdx)
  lea    0x1(%rdx),%rdx
  mov    %rdi,%rax
  lea    0x1(%rdi),%rdi
  movzbl 0x1(%rax),%eax
  test   %al,%al
  jne    L240
L76:
  movb   $0x0,(%rdx)
  lea    D42(%rip),%rax
  ret
L203:
  cmp    $0x25,%cl
  jne    L208
  movb   $0x25,(%rdx)
  lea    0x1(%rdx),%rdx
  jmp    L211
L208:
  lea    D45(%rip),%rax
L165:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L30:
  cmp    $0x69,%cl
  je     L15
  cmp    $0x72,%cl
  jne    L148
  mov    $0x1,%esi
L211:
  lea    0x1(%rax),%rdi
  movzbl 0x1(%rax),%eax
  test   %al,%al
  je     L234
  cmp    $0x25,%al
  je     L26
  mov    %al,(%rdx)
  lea    0x1(%rdx),%rdx
  mov    %rdi,%rax
  jmp    L211
L148:
  lea    D45(%rip),%rax
  jmp    L165
L60:
  test   %esi,%esi
  mov    %r8d,%ebx
  cmove  %r9d,%ebx
  lea    0x2(%rdi),%rax
  mov    %r11d,%ecx
  add    0x2(%rdi),%cl
  add    %ebx,%ecx
  mov    %cl,(%rdx)
  mov    %r10d,%ebx
  sub    %esi,%ebx
  mov    %ebx,%esi
  lea    0x1(%rdx),%rdx
  jmp    L211
L11:
  test   %esi,%esi
  mov    %r8d,%edi
  cmove  %r9d,%edi
  add    %r11d,%edi
  movslq %edi,%rcx
  imul   $0x10624dd3,%rcx,%rcx
  sar    $0x26,%rcx
  mov    %edi,%ebx
  sar    $0x1f,%ebx
  sub    %ebx,%ecx
  imul   $0x3e8,%ecx,%ebx
  mov    %edi,%ecx
  sub    %ebx,%ecx
  cmp    $0x63,%ecx
  jle    L201
  lea    0x1(%rdx),%rbx
  movslq %ecx,%rdi
  imul   $0x51eb851f,%rdi,%rdi
  sar    $0x25,%rdi
  mov    %ecx,%ebp
  sar    $0x1f,%ebp
  sub    %ebp,%edi
  add    $0x30,%edi
  mov    %dil,(%rdx)
L149:
  lea    0x1(%rbx),%rdx
  movslq %ecx,%rdi
  imul   $0x66666667,%rdi,%rdi
  sar    $0x22,%rdi
  mov    %ecx,%ebp
  sar    $0x1f,%ebp
  sub    %ebp,%edi
  movslq %edi,%rbp
  imul   $0x66666667,%rbp,%rbp
  sar    $0x22,%rbp
  mov    %edi,%r12d
  sar    $0x1f,%r12d
  sub    %r12d,%ebp
  lea    0x0(%rbp,%rbp,4),%ebp
  add    %ebp,%ebp
  sub    %ebp,%edi
  add    $0x30,%edi
  mov    %dil,(%rbx)
  jmp    L225
L201:
  cmp    $0x9,%ecx
  jg     L114
L225:
  movslq %ecx,%rdi
  imul   $0x66666667,%rdi,%rdi
  sar    $0x22,%rdi
  mov    %ecx,%ebx
  sar    $0x1f,%ebx
  sub    %ebx,%edi
  lea    (%rdi,%rdi,4),%edi
  add    %edi,%edi
  sub    %edi,%ecx
  add    $0x30,%ecx
  mov    %cl,(%rdx)
  mov    %r10d,%ebx
  sub    %esi,%ebx
  mov    %ebx,%esi
  lea    0x1(%rdx),%rdx
  jmp    L211
L114:
  mov    %rdx,%rbx
  jmp    L149
L15:
  mov    %r10d,%r11d
  jmp    L211
L65:
  lea    D42(%rip),%rdx
  jmp    L76
L234:
  movb   $0x0,(%rdx)
  lea    D42(%rip),%rax
  jmp    L165
L61:
  push   %r12
  push   %rbp
  push   %rbx
L26:
  lea    0x1(%rdi),%rax
  movzbl 0x1(%rdi),%ecx
  cmp    $0x64,%cl
  je     L11
  jg     L30
  cmp    $0x2b,%cl
  je     L60
  cmp    $0x32,%cl
  jne    L203
  test   %esi,%esi
  mov    %r8d,%edi
  cmove  %r9d,%edi
  add    %r11d,%edi
  movslq %edi,%rcx
  imul   $0x51eb851f,%rcx,%rcx
  sar    $0x25,%rcx
  mov    %edi,%ebx
  sar    $0x1f,%ebx
  sub    %ebx,%ecx
  imul   $0x64,%ecx,%ebx
  mov    %edi,%ecx
  sub    %ebx,%ecx
  movslq %ecx,%rdi
  imul   $0x66666667,%rdi,%rdi
  sar    $0x22,%rdi
  mov    %ecx,%ebx
  sar    $0x1f,%ebx
  sub    %ebx,%edi
  lea    0x30(%rdi),%ebx
  mov    %bl,(%rdx)
  lea    (%rdi,%rdi,4),%edi
  add    %edi,%edi
  sub    %edi,%ecx
  add    $0x30,%ecx
  mov    %cl,0x1(%rdx)
  mov    %r10d,%ebx
  sub    %esi,%ebx
  mov    %ebx,%esi
  lea    0x2(%rdx),%rdx
  jmp    L211
```

tool_calls: name: unpack_data
arguments: label: D45
type: string

tool: D45: OOPS

assistant: ```c
char *tgoto(cm, destcol, destline) const char *cm;
int destcol;
int destline;
{
  static char ret[24];
  char *rp = ret;
  int incr = 0;
  int argno = 0;
  int numval;
  for (; *cm; cm++) {
    if (*cm == '%') {
      switch (*++cm) {
      case 'i':
        incr = 1;
        break;
      case 'r':
        argno = 1;
        break;
      case '+':
        numval = (argno == 0 ? destline : destcol);
        *rp++ = numval + incr + *++cm;
        argno = 1 - argno;
        break;
      case '2':
        numval = (argno == 0 ? destline : destcol);
        numval = (numval + incr) % 100;
        *rp++ = '0' + (numval / 10);
        *rp++ = '0' + (numval % 10);
        argno = 1 - argno;
        break;
      case 'd':
        numval = (argno == 0 ? destline : destcol);
        numval = (numval + incr) % 1000;
        if (numval > 99)
          *rp++ = '0' + (numval / 100);
        if (numval > 9)
          *rp++ = '0' + (numval / 10) % 10;
        *rp++ = '0' + (numval % 10);
        argno = 1 - argno;
        break;
      case '%':
        *rp++ = '%';
        break;
      default:
        return ("OOPS");
      }
    } else
      *rp++ = *cm;
  }
  *rp = '\0';
  return (ret);
}
```