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)
L289:
  lea    0x5(%r15),%rax
  cmp    %rax,%rbx
  ja     L497
  mov    %rcx,0x18(%rsp)
  test   %ebp,%ebp
  jne    L426
L71:
  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   <memcpy@plt>
  mov    0x18(%rsp),%rcx
  mov    %rax,%rdi
L422:
  mov    %rdi,%rax
  sub    %r12,%rax
  mov    %rdi,%r12
  add    %rax,%r15
  add    %rax,%rbx
L497:
  movsbl 0x0(%r13),%edx
  mov    %edx,%eax
  test   %edx,%edx
  je     L335
  cmp    $0x25,%edx
  je     L134
  add    $0x1,%r13
L147:
  mov    %al,(%r15)
  add    $0x1,%r15
  lea    0x5(%r15),%rax
  cmp    %rax,%rbx
  ja     L497
  mov    %rcx,0x18(%rsp)
  test   %ebp,%ebp
  je     L71
L426:
  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    L422
  nopl   (%rax)
L134:
  mov    0x8(%rsp),%rsi
  movzbl 0x1(%r13),%eax
  lea    0x2(%r13),%rdi
  mov    (%rsi),%edx
  lea    -0x25(%rax),%esi
  cmp    $0x4d,%sil
  ja     L386
  lea    D5(%rip),%r11
  movzbl %sil,%esi
  movslq (%r11,%rsi,4),%rsi
  add    %r11,%rsi
  notrack jmp *%rsi
  xchg   %ax,%ax
L386:
  mov    %rdi,%r13
  jmp    L289
  nopl   0x0(%rax,%rax,1)
L335:
  mov    0x24(%rsp),%eax
  mov    %r14,%rbp
  movb   $0x0,(%r15)
  mov    %rcx,%r14
  lea    -0x1(%rax),%ebx
  test   %eax,%eax
  je     L514
  nopl   (%rax)
L83:
  mov    %r14,%rsi
  mov    %r15,%rdi
  call   <strcat@plt>
  sub    $0x1,%ebx
  jae    L83
L514:
  mov    0x14(%rsp),%eax
  lea    -0x1(%rax),%ebx
  test   %eax,%eax
  je     L66
  nopl   0x0(%rax,%rax,1)
L345:
  mov    %rbp,%rsi
  mov    %r15,%rdi
  call   <strcat@plt>
  sub    $0x1,%ebx
  jae    L345
L66:
  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    L100
  cmp    $0x63,%edx
  jle    L84
  cmp    $0x3e7,%edx
  jg     L151
L7:
  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)
L333:
  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)
L100:
  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    L289
  nopl   0x0(%rax)
L151:
  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    L7
  movsbl 0x2(%r13),%eax
  cmp    %edx,%eax
  jge    L300
  movsbl 0x3(%r13),%eax
  mov    0x8(%rsp),%rdi
  add    %edx,%eax
  mov    %eax,(%rdi)
L300:
  add    $0x4,%r13
  jmp    L289
  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    L289
  mov    %r15,%r8
  cmp    $0x5f,%edx
  jle    L115
  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
L115:
  movsbl 0x2(%r13),%eax
  add    $0x3,%r13
  add    %eax,%edx
L539:
  test   %r14,%r14
  jne    L454
  test   %edx,%edx
  mov    $0xffffff80,%eax
  cmove  %eax,%edx
L208:
  mov    %dl,(%r8)
  lea    0x1(%r8),%r15
L132:
  addq   $0x4,0x8(%rsp)
  jmp    L289
  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    L289
  mov    0x8(%rsp),%rax
  add    $0x1,%edx
  mov    %rdi,%r13
  addl   $0x1,0x4(%rax)
  mov    %edx,(%rax)
  jmp    L289
  mov    0x8(%rsp),%rax
  mov    %rdi,%r13
  movabs $0x7f0000007f,%rsi
  xor    %rsi,(%rax)
  jmp    L289
  mov    0x8(%rsp),%rax
  mov    %rdi,%r13
  movabs $0x6000000060,%rsi
  xor    %rsi,(%rax)
  jmp    L289
  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    L289
  subq   $0x4,0x8(%rsp)
  mov    %rdi,%r13
  jmp    L289
  movzbl 0x4(%r13),%esi
  and    $0x7f,%esi
  cmpb   $0x70,0x3(%r13)
  je     L258
  movsbl %sil,%esi
L265:
  movzbl 0x2(%r13),%eax
  cmp    $0x2d,%al
  je     L393
  cmp    $0x2b,%al
  je     L366
  cmp    $0x2a,%al
  je     L314
  cmp    $0x2f,%al
  jne    L433
  mov    %edx,%eax
  cltd
  idiv   %esi
  mov    %eax,%esi
  jmp    L433
L84:
  mov    %r15,%rsi
  movslq %edx,%rax
  jmp    L333
  mov    %rdi,%r13
  jmp    L147
  mov    %r15,%r8
  jmp    L115
  mov    %r15,%r8
  mov    %rdi,%r13
  jmp    L539
  mov    %rdi,%r13
  jmp    L132
  nopl   0x0(%rax,%rax,1)
L454:
  lea    -0x9(%rdx),%eax
  mov    %edx,%r15d
  cmp    $0x1,%eax
  jbe    L382
  test   %edx,%edx
  jne    L208
L382:
  mov    0x28(%rsp),%rdi
  cmp    %rdi,0x8(%rsp)
  je     L337
  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)
L168:
  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    L168
  test   %edx,%edx
  je     L168
L119:
  mov    %edi,0x14(%rsp)
  jmp    L208
L337:
  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)
L225:
  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    L225
  test   %edx,%edx
  je     L225
  mov    %r9d,0x24(%rsp)
  mov    0x14(%rsp),%edi
  jmp    L119
L393:
  sub    %esi,%edx
  mov    %edx,%esi
L433:
  mov    0x8(%rsp),%rax
  add    $0x5,%r13
  mov    %esi,(%rax)
  jmp    L289
L258:
  mov    0x8(%rsp),%rax
  movsbq %sil,%rsi
  mov    -0x100(%rax,%rsi,4),%esi
  jmp    L265
L314:
  imul   %edx,%esi
  jmp    L433
L366:
  add    %edx,%esi
  jmp    L433
```

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;
        memcpy((new), (outstring), (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;
}
```