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

```asm
<tparam1>:
  endbr64
  push   %r15
  mov    %rsi,%r15
  push   %r14
  mov    %r8,%r14
  push   %r13
  xor    %r13d,%r13d
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %r13d,%ebp
  mov    %rdi,%r13
  push   %rbx
  movslq %edx,%rbx
  add    %rsi,%rbx
  sub    $0x48,%rsp
  mov    %edx,0x20(%rsp)
  mov    %r9,0x8(%rsp)
  mov    %r9,0x28(%rsp)
  movl   $0x0,0x24(%rsp)
  movl   $0x0,0x14(%rsp)
  nopl   0x0(%rax,%rax,1)
L282:
  lea    0x5(%r15),%rax
  cmp    %rax,%rbx
  ja     L453
  mov    %rcx,0x18(%rsp)
  test   %ebp,%ebp
  jne    L4
L324:
  mov    0x20(%rsp),%eax
  add    $0x28,%rbx
  lea    0x28(%rax),%ebp
  xor    %eax,%eax
  mov    %ebp,%edi
  call   <xmalloc@plt>
  mov    %r15,%rdx
  mov    %r12,%rsi
  movslq %eax,%rdi
  sub    %r12,%rdx
  call   <memmove@plt>
  mov    0x18(%rsp),%rcx
  mov    %rax,%rdi
L283:
  mov    %rdi,%rax
  sub    %r12,%rax
  mov    %rdi,%r12
  add    %rax,%r15
  add    %rax,%rbx
L453:
  movsbl 0x0(%r13),%edx
  mov    %edx,%eax
  test   %edx,%edx
  je     L153
  cmp    $0x25,%edx
  je     L229
  add    $0x1,%r13
L62:
  mov    %al,(%r15)
  add    $0x1,%r15
  lea    0x5(%r15),%rax
  cmp    %rax,%rbx
  ja     L453
  mov    %rcx,0x18(%rsp)
  test   %ebp,%ebp
  je     L324
L4:
  movslq %ebp,%rax
  add    %ebp,%ebp
  mov    %r12,%rdi
  add    %rax,%rbx
  mov    %ebp,%esi
  xor    %eax,%eax
  call   <xrealloc@plt>
  mov    0x18(%rsp),%rcx
  movslq %eax,%rdi
  jmp    L283
  nopl   (%rax)
L229:
  mov    0x8(%rsp),%rsi
  movzbl 0x1(%r13),%eax
  lea    0x2(%r13),%rdi
  mov    (%rsi),%edx
  lea    -0x25(%rax),%esi
  cmp    $0x4d,%sil
  ja     L256
  lea    D4(%rip),%r11
  movzbl %sil,%esi
  movslq (%r11,%rsi,4),%rsi
  add    %r11,%rsi
  notrack jmp *%rsi
  xchg   %ax,%ax
L256:
  mov    %rdi,%r13
  jmp    L282
  nopl   0x0(%rax,%rax,1)
L153:
  mov    0x24(%rsp),%eax
  mov    %r14,%rbp
  movb   $0x0,(%r15)
  mov    %rcx,%r14
  lea    -0x1(%rax),%ebx
  test   %eax,%eax
  je     L142
  nopl   (%rax)
L466:
  mov    %r14,%rsi
  mov    %r15,%rdi
  call   <strcat@plt>
  sub    $0x1,%ebx
  jae    L466
L142:
  mov    0x14(%rsp),%eax
  lea    -0x1(%rax),%ebx
  test   %eax,%eax
  je     L216
  nopl   0x0(%rax,%rax,1)
L395:
  mov    %rbp,%rsi
  mov    %r15,%rdi
  call   <strcat@plt>
  sub    $0x1,%ebx
  jae    L395
L216:
  add    $0x48,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  mov    %r15,%r8
  cmp    $0x9,%edx
  jle    L79
  cmp    $0x63,%edx
  jle    L33
  cmp    $0x3e7,%edx
  jg     L138
L28:
  movslq %edx,%rax
  mov    %edx,%r9d
  lea    0x1(%r15),%rsi
  imul   $0x51eb851f,%rax,%r8
  sar    $0x1f,%r9d
  sar    $0x25,%r8
  sub    %r9d,%r8d
  add    $0x30,%r8d
  mov    %r8b,(%r15)
L341:
  imul   $0x51eb851f,%rax,%rax
  mov    %edx,%r8d
  sar    $0x1f,%r8d
  sar    $0x25,%rax
  sub    %r8d,%eax
  lea    0x1(%rsi),%r8
  imul   $0x64,%eax,%eax
  sub    %eax,%edx
  movslq %edx,%rax
  mov    %edx,%r9d
  imul   $0x66666667,%rax,%rax
  sar    $0x1f,%r9d
  sar    $0x22,%rax
  sub    %r9d,%eax
  add    $0x30,%eax
  mov    %al,(%rsi)
L79:
  movslq %edx,%rax
  mov    %edx,%esi
  addq   $0x4,0x8(%rsp)
  mov    %rdi,%r13
  imul   $0x66666667,%rax,%rax
  sar    $0x1f,%esi
  lea    0x1(%r8),%r15
  sar    $0x22,%rax
  sub    %esi,%eax
  lea    (%rax,%rax,4),%eax
  add    %eax,%eax
  sub    %eax,%edx
  add    $0x30,%edx
  mov    %dl,(%r8)
  jmp    L282
  nopl   0x0(%rax)
L138:
  movslq %edx,%rax
  mov    %edx,%esi
  add    $0x1,%r15
  imul   $0x10624dd3,%rax,%rax
  sar    $0x1f,%esi
  sar    $0x26,%rax
  sub    %esi,%eax
  lea    0x30(%rax),%esi
  imul   $0x3e8,%eax,%eax
  mov    %sil,-0x1(%r15)
  sub    %eax,%edx
  jmp    L28
  movsbl 0x2(%r13),%eax
  cmp    %edx,%eax
  jge    L261
  movsbl 0x3(%r13),%eax
  mov    0x8(%rsp),%rdi
  add    %edx,%eax
  mov    %eax,(%rdi)
L261:
  add    $0x4,%r13
  jmp    L282
  movslq %edx,%rax
  mov    %edx,%esi
  mov    %rdi,%r13
  imul   $0x66666667,%rax,%rax
  sar    $0x1f,%esi
  sar    $0x22,%rax
  sub    %esi,%eax
  mov    0x8(%rsp),%rsi
  lea    (%rax,%rax,2),%eax
  lea    (%rdx,%rax,2),%eax
  mov    %eax,(%rsi)
  jmp    L282
  mov    %r15,%r8
  cmp    $0x5f,%edx
  jle    L353
  movslq %edx,%rax
  mov    %edx,%esi
  add    $0x1,%r8
  imul   $0x2aaaaaab,%rax,%rax
  sar    $0x1f,%esi
  sar    $0x24,%rax
  sub    %esi,%eax
  mov    %al,(%r15)
  lea    (%rax,%rax,2),%eax
  shl    $0x5,%eax
  sub    %eax,%edx
L353:
  movsbl 0x2(%r13),%eax
  add    $0x3,%r13
  add    %eax,%edx
L262:
  test   %r14,%r14
  jne    L157
  test   %edx,%edx
  mov    $0xffffff80,%eax
  cmove  %eax,%edx
L228:
  mov    %dl,(%r8)
  lea    0x1(%r8),%r15
L80:
  addq   $0x4,0x8(%rsp)
  jmp    L282
  mov    %edx,%esi
  mov    %rdi,%r13
  sar    $0x1f,%esi
  shr    $0x1c,%esi
  lea    (%rdx,%rsi,1),%eax
  and    $0xf,%eax
  sub    %esi,%eax
  add    %eax,%eax
  sub    %eax,%edx
  mov    0x8(%rsp),%rax
  mov    %edx,(%rax)
  jmp    L282
  mov    0x8(%rsp),%rax
  add    $0x1,%edx
  mov    %rdi,%r13
  addl   $0x1,0x4(%rax)
  mov    %edx,(%rax)
  jmp    L282
  mov    0x8(%rsp),%rax
  mov    %rdi,%r13
  movabs $0x7f0000007f,%rsi
  xor    %rsi,(%rax)
  jmp    L282
  mov    0x8(%rsp),%rax
  mov    %rdi,%r13
  movabs $0x6000000060,%rsi
  xor    %rsi,(%rax)
  jmp    L282
  mov    0x8(%rsp),%rax
  movd   %edx,%xmm1
  addq   $0x4,0x28(%rsp)
  mov    %rdi,%r13
  movd   0x4(%rax),%xmm0
  punpckldq %xmm1,%xmm0
  movq   %xmm0,(%rax)
  jmp    L282
  subq   $0x4,0x8(%rsp)
  mov    %rdi,%r13
  jmp    L282
  movzbl 0x4(%r13),%esi
  and    $0x7f,%esi
  cmpb   $0x70,0x3(%r13)
  je     L22
  movsbl %sil,%esi
L479:
  movzbl 0x2(%r13),%eax
  cmp    $0x2d,%al
  je     L483
  cmp    $0x2b,%al
  je     L443
  cmp    $0x2a,%al
  je     L194
  cmp    $0x2f,%al
  jne    L394
  mov    %edx,%eax
  cltd
  idiv   %esi
  mov    %eax,%esi
  jmp    L394
L33:
  mov    %r15,%rsi
  movslq %edx,%rax
  jmp    L341
  mov    %rdi,%r13
  jmp    L62
  mov    %r15,%r8
  jmp    L353
  mov    %r15,%r8
  mov    %rdi,%r13
  jmp    L262
  mov    %rdi,%r13
  jmp    L80
  nopl   0x0(%rax,%rax,1)
L157:
  lea    -0x9(%rdx),%eax
  mov    %edx,%r15d
  cmp    $0x1,%eax
  jbe    L259
  test   %edx,%edx
  jne    L228
L259:
  mov    0x28(%rsp),%rdi
  cmp    %rdi,0x8(%rsp)
  je     L476
  mov    %r14,%rdi
  mov    %rcx,0x38(%rsp)
  mov    %edx,0x30(%rsp)
  mov    %r8,0x18(%rsp)
  call   <strlen@plt>
  mov    0x18(%rsp),%r8
  mov    0x30(%rsp),%edx
  mov    0x38(%rsp),%rcx
  neg    %rax
  cs nopw 0x0(%rax,%rax,1)
L434:
  mov    0x14(%rsp),%edi
  mov    %edx,%esi
  add    $0x1,%edx
  add    %rax,%rbx
  sub    $0x8,%esi
  add    %edx,%edi
  sub    %r15d,%edi
  cmp    $0x1,%esi
  jbe    L434
  test   %edx,%edx
  je     L434
L378:
  mov    %edi,0x14(%rsp)
  jmp    L228
L476:
  mov    %rcx,%rdi
  mov    %edx,0x38(%rsp)
  mov    %r8,0x30(%rsp)
  mov    %rcx,0x18(%rsp)
  call   <strlen@plt>
  mov    0x30(%rsp),%r8
  mov    0x38(%rsp),%edx
  mov    0x18(%rsp),%rcx
  neg    %rax
  nopl   (%rax)
L133:
  mov    0x24(%rsp),%edi
  mov    %edx,%esi
  add    $0x1,%edx
  add    %rax,%rbx
  sub    $0x8,%esi
  lea    (%rdi,%rdx,1),%r9d
  sub    %r15d,%r9d
  cmp    $0x1,%esi
  jbe    L133
  test   %edx,%edx
  je     L133
  mov    %r9d,0x24(%rsp)
  mov    0x14(%rsp),%edi
  jmp    L378
L483:
  sub    %esi,%edx
  mov    %edx,%esi
L394:
  mov    0x8(%rsp),%rax
  add    $0x5,%r13
  mov    %esi,(%rax)
  jmp    L282
L22:
  mov    0x8(%rsp),%rax
  movsbq %sil,%rsi
  mov    -0x100(%rax,%rsi,4),%esi
  jmp    L479
L194:
  imul   %edx,%esi
  jmp    L394
L443:
  add    %edx,%esi
  jmp    L394
```

assistant: ```c
char *tparam1(string, outstring, len, up, left, argp)
char *string;
char *outstring;
int len;
char *up, *left;
register int *argp;
{
  register int c;
  register char *p = string;
  register char *op = outstring;
  char *outend;
  int outlen = 0;
  register int tem;
  int *old_argp = argp;
  int doleft = 0;
  int doup = 0;
  outend = outstring + len;
  while (1) {
    if (op + 5 >= outend) {
      register char *new;
      if (outlen == 0) {
        outlen = len + 40;
        new = (char *)xmalloc(outlen);
        outend += 40;
        bcopy(outstring, new, op - outstring);
      } else {
        outend += outlen;
        outlen *= 2;
        new = (char *)xrealloc(outstring, outlen);
      }
      op += new - outstring;
      outend += new - outstring;
      outstring = new;
    }
    c = *p++;
    if (!c)
      break;
    if (c == '%') {
      c = *p++;
      tem = *argp;
      switch (c) {
      case 'd':
        if (tem < 10)
          goto onedigit;
        if (tem < 100)
          goto twodigit;
      case '3':
        if (tem > 999) {
          *op++ = tem / 1000 + '0';
          tem %= 1000;
        }
        *op++ = tem / 100 + '0';
      case '2':
      twodigit:
        tem %= 100;
        *op++ = tem / 10 + '0';
      onedigit:
        *op++ = tem % 10 + '0';
        argp++;
        break;
      case 'C':
        if (tem >= 96) {
          *op++ = tem / 96;
          tem %= 96;
        }
      case '+':
        tem += *p++;
      case '.':
        if (left) {
          while (tem == 0 || tem == '\n' || tem == '\t') {
            tem++;
            if (argp == old_argp)
              doup++, outend -= strlen(up);
            else
              doleft++, outend -= strlen(left);
          }
        }
        *op++ = tem ? tem : 0200;
      case 'f':
        argp++;
        break;
      case 'b':
        argp--;
        break;
      case 'r':
        argp[0] = argp[1];
        argp[1] = tem;
        old_argp++;
        break;
      case '>':
        if (argp[0] > *p++)
          argp[0] += *p;
        p++;
        break;
      case 'a':
        tem = p[2] & 0177;
        if (p[1] == 'p')
          tem = argp[tem - 0100];
        if (p[0] == '-')
          argp[0] -= tem;
        else if (p[0] == '+')
          argp[0] += tem;
        else if (p[0] == '*')
          argp[0] *= tem;
        else if (p[0] == '/')
          argp[0] /= tem;
        else
          argp[0] = tem;
        p += 3;
        break;
      case 'i':
        argp[0]++;
        argp[1]++;
        break;
      case '%':
        goto ordinary;
      case 'n':
        argp[0] ^= 0140;
        argp[1] ^= 0140;
        break;
      case 'm':
        argp[0] ^= 0177;
        argp[1] ^= 0177;
        break;
      case 'B':
        argp[0] += 6 * (tem / 10);
        break;
      case 'D':
        argp[0] -= 2 * (tem % 16);
        break;
      }
    } else
    ordinary:
      *op++ = c;
  }
  *op = 0;
  while (doup-- > 0)
    strcat(op, up);
  while (doleft-- > 0)
    strcat(op, left);
  return outstring;
}
```