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

```asm
<Varianta_C>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0xe8,%rsp
  mov    %rsi,-0x100(%rbp)
  mov    %edx,-0xa0(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  movabs $0x2400000000,%rax
  movl   $0x2,-0x48(%rbp)
  mov    %rax,-0x80(%rbp)
  movabs $0x6e0000004a,%rax
  mov    %rax,-0x78(%rbp)
  movabs $0xb600000092,%rax
  mov    %rax,-0x70(%rbp)
  movabs $0xfffffffe00000000,%rax
  mov    %rax,-0x60(%rbp)
  movabs $0x100000003,%rax
  mov    %rax,-0x58(%rbp)
  movabs $0xfffffffdffffffff,%rax
  mov    %rax,-0x50(%rbp)
  movzbl (%rdi),%eax
  cmp    $0x1b,%al
  je     L302
  test   %al,%al
  je     L302
  mov    %rdi,%r8
  mov    $0x1,%eax
  jmp    L370
  nopw   0x0(%rax,%rax,1)
L438:
  cmp    $0x1b,%dl
  je     L149
L370:
  movzbl (%r8,%rax,1),%edx
  lea    -0x1(%rax),%esi
  mov    %eax,%edi
  mov    %rax,%rcx
  mov    %esi,%r9d
  add    $0x1,%rax
  test   %dl,%dl
  jne    L438
L149:
  add    $0xf,%rcx
  mov    %esi,-0xe0(%rbp)
  mov    %rsp,%rdx
  mov    %rcx,%rsi
  mov    %rcx,%rax
  mov    %edi,-0xf8(%rbp)
  and    $0xfffffffffffff000,%rsi
  mov    %r9d,-0x104(%rbp)
  and    $0xfffffffffffffff0,%rax
  sub    %rsi,%rdx
  cmp    %rdx,%rsp
  je     L339
L18:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rdx,%rsp
  jne    L18
L339:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  jne    L435
L156:
  mov    %rcx,%rsi
  mov    %rsp,-0xc8(%rbp)
  mov    %rcx,%rax
  mov    %rsp,%rdx
  and    $0xfffffffffffff000,%rsi
  and    $0xfffffffffffffff0,%rax
  sub    %rsi,%rdx
L127:
  cmp    %rdx,%rsp
  je     L154
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L127
L435:
  orq    $0x0,-0x8(%rsp,%rax,1)
  jmp    L156
L154:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  jne    L56
L38:
  mov    %rcx,%rax
  mov    %rsp,%rdx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,-0xd0(%rbp)
  sub    %rcx,%rdx
  and    $0xfffffffffffffff0,%rax
  cmp    %rdx,%rsp
  je     L508
L347:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rdx,%rsp
  jne    L347
L508:
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L58
  orq    $0x0,-0x8(%rsp,%rax,1)
L58:
  mov    -0xa0(%rbp),%eax
  mov    %rsp,-0xd8(%rbp)
  movl   $0x0,-0xb0(%rbp)
  sub    $0x1,%eax
  sar    %eax
  mov    %eax,-0xac(%rbp)
  movslq -0xe0(%rbp),%rax
  lea    -0x1(%rax),%rbx
  lea    (%r8,%rax,1),%r14
  mov    %rax,-0xc0(%rbp)
  mov    %eax,%eax
  mov    %rbx,-0xe8(%rbp)
  sub    %rax,%rbx
  lea    -0x60(%rbp),%rax
  mov    %r14,%r15
  mov    %rbx,-0xf0(%rbp)
  mov    %rax,-0xb8(%rbp)
  nopl   0x0(%rax)
L325:
  mov    -0xc0(%rbp),%eax
  mov    $0xdc,%ecx
  mov    %r15,%r8
  movl   $0x100,-0x9c(%rbp)
  mov    $0x6,%r14d
  mov    %ecx,%r15d
  mov    %eax,-0xdc(%rbp)
  jmp    L83
  nopl   0x0(%rax)
L397:
  mov    -0xd0(%rbp),%rax
  mov    %r12d,-0x9c(%rbp)
  mov    %bl,(%rax,%rcx,1)
  mov    -0xd8(%rbp),%rax
  mov    %r13b,(%rax,%rcx,1)
L423:
  sub    $0x1,%r14
  jb     L139
L89:
  mov    -0x80(%rbp,%r14,4),%r15d
L83:
  movzbl (%r8),%edi
  mov    %r8,-0x98(%rbp)
  sub    %r15d,%edi
  movsbl %dil,%edi
  call   <abs@plt>
  mov    -0xac(%rbp),%ecx
  add    %ecx,%eax
  cltd
  idivl  -0xa0(%rbp)
  mov    %eax,%ebx
  mov    -0xb8(%rbp),%rax
  sub    %ecx,%edx
  mov    %edx,%r13d
  mov    (%rax,%r14,4),%edx
  movsbl %dl,%edi
  mov    %edx,-0xa8(%rbp)
  call   <abs@plt>
  movsbl %r13b,%edi
  lea    (%rax,%rbx,1),%r12d
  call   <abs@plt>
  mov    -0x98(%rbp),%r8
  add    %eax,%r12d
  cmp    -0x9c(%rbp),%r12d
  jge    L423
  test   %r14,%r14
  mov    -0xa8(%rbp),%edx
  je     L0
L497:
  mov    -0xc8(%rbp),%rax
  mov    -0xc0(%rbp),%rcx
  mov    %dl,(%rax,%rcx,1)
  movsbl (%r8),%eax
  cmp    %r15d,%eax
  jge    L397
  mov    -0xc0(%rbp),%rax
  mov    -0xd0(%rbp),%rsi
  neg    %ebx
  neg    %r13d
  mov    %r12d,-0x9c(%rbp)
  mov    %bl,(%rsi,%rax,1)
  mov    -0xd8(%rbp),%rbx
  mov    %r13b,(%rbx,%rax,1)
  sub    $0x1,%r14
  jae    L89
  nopl   0x0(%rax,%rax,1)
L139:
  mov    -0xe8(%rbp),%rax
  mov    %r8,%r15
  sub    $0x1,%r15
  mov    %rax,-0xc0(%rbp)
  cmp    -0xf0(%rbp),%rax
  je     L246
  sub    $0x1,%rax
  mov    %rax,-0xe8(%rbp)
  jmp    L325
L302:
  lea    -0x81(%rbp),%rax
  movl   $0xffffffff,-0xb8(%rbp)
  mov    %rax,-0xd8(%rbp)
  lea    -0x82(%rbp),%rax
  mov    %rax,-0xd0(%rbp)
  lea    -0x83(%rbp),%rax
  movl   $0xffffffff,-0xac(%rbp)
  movl   $0x0,-0x9c(%rbp)
  movl   $0xffffffff,-0x104(%rbp)
  movl   $0x0,-0xf8(%rbp)
  mov    %rax,-0xc8(%rbp)
  movl   $0x0,-0xb0(%rbp)
  nopl   0x0(%rax,%rax,1)
L431:
  movslq -0xac(%rbp),%rax
  mov    $0xfffffffd,%r13d
  movl   $0xffffffff,-0x98(%rbp)
  mov    %rax,%rbx
  add    -0xc8(%rbp),%rax
  mov    %rax,-0xa8(%rbp)
  lea    0x1(%rbx),%r12d
  sub    %eax,%r12d
  nop
L102:
  xor    %r15d,%r15d
  test   %r13d,%r13d
  je     L390
  mov    %r13d,%edi
  call   <abs@plt>
  cmpl   $0x1,-0xb0(%rbp)
  lea    0x2(%rax,%rax,1),%r15d
  adc    $0xffffffff,%r15d
L390:
  cmpl   $0x1,-0x9c(%rbp)
  jle    L258
  mov    -0xa8(%rbp),%r14
  mov    %r13d,%ebx
  nopl   0x0(%rax,%rax,1)
L84:
  movzbl (%r14),%edi
  sub    $0x1,%r14
  sub    %ebx,%edi
  movsbl %dil,%edi
  call   <abs@plt>
  add    %eax,%r15d
  lea    (%r12,%r14,1),%eax
  cmp    $0x1,%eax
  jg     L84
L258:
  mov    -0x98(%rbp),%eax
  cmp    %eax,%r15d
  jl     L381
  test   %eax,%eax
  js     L381
L403:
  add    $0x1,%r13d
  cmp    $0x4,%r13d
  jne    L102
  mov    -0xf4(%rbp),%eax
  test   %eax,%eax
  je     L323
  cmpl   $0x1,-0x9c(%rbp)
  mov    %eax,%ebx
  jle    L225
  movslq -0xac(%rbp),%r13
  mov    -0xc8(%rbp),%rax
  lea    0x1(%r13),%ecx
  add    %r13,%rax
  sub    %eax,%ecx
  nopl   0x0(%rax)
L151:
  sub    %bl,(%rax)
  sub    $0x1,%rax
  lea    (%rcx,%rax,1),%edx
  cmp    $0x1,%edx
  jg     L151
  mov    -0x100(%rbp),%rsi
  lea    D82(%rip),%rdi
  neg    %ebx
  call   <pridej_retezec@plt>
  mov    $0x3c,%edi
  mov    %rax,%rsi
  call   <pridej_znak@plt>
  movsbl %bl,%edi
  mov    %rax,%rsi
  call   <opakuj@plt>
  mov    %rax,%rsi
L12:
  add    -0xc8(%rbp),%r13
  mov    -0xac(%rbp),%eax
  lea    -0x1(%r13),%r12
  mov    %r12,%rbx
  sub    %rax,%rbx
  jmp    L76
  nopw   0x0(%rax,%rax,1)
L97:
  sub    $0x1,%r12
L76:
  mov    $0x3c,%edi
  call   <pridej_znak@plt>
  movsbl 0x0(%r13),%edi
  mov    %r12,%r13
  mov    %rax,%rsi
  call   <opakuj@plt>
  mov    %rax,%rsi
  cmp    %r12,%rbx
  jne    L97
  mov    -0xf4(%rbp),%r8d
  test   %r8d,%r8d
  je     L196
L107:
  lea    D33(%rip),%rdi
  call   <pridej_retezec@plt>
  movsbl -0xf4(%rbp),%edi
  mov    %rax,%rsi
  call   <opakuj@plt>
  lea    D76(%rip),%rdi
  mov    %rax,%rsi
  call   <pridej_retezec@plt>
  mov    %rax,%rsi
  mov    -0xb8(%rbp),%eax
  cmp    $0xffffffff,%eax
  je     L289
  mov    %eax,-0xb0(%rbp)
  sub    $0x1,%eax
  mov    %eax,-0xb8(%rbp)
L401:
  mov    -0xb0(%rbp),%edi
  mov    -0xb8(%rbp),%ebx
  test   %edi,%edi
  je     L538
  nopl   0x0(%rax)
L462:
  mov    $0x3e,%edi
  call   <pridej_znak@plt>
  mov    %rax,%rsi
  sub    $0x1,%ebx
  jae    L462
L538:
  movsbl -0xa0(%rbp),%edi
  call   <opakuj@plt>
  mov    $0x5b,%edi
  mov    %rax,%rsi
  call   <pridej_znak@plt>
  mov    -0xf8(%rbp),%ecx
  mov    %rax,%rsi
  test   %ecx,%ecx
  je     L458
  movslq -0x104(%rbp),%rbx
  mov    -0xd0(%rbp),%r15
  add    %rbx,%r15
  mov    %ebx,%r12d
  lea    -0x1(%r15),%r14
  mov    %r14,%r13
  sub    %r12,%r13
  jmp    L486
  nopl   0x0(%rax)
L226:
  sub    $0x1,%r14
L486:
  mov    $0x3c,%edi
  call   <pridej_znak@plt>
  movsbl (%r15),%edi
  mov    %r14,%r15
  mov    %rax,%rsi
  call   <opakuj@plt>
  mov    %rax,%rsi
  cmp    %r14,%r13
  jne    L226
  lea    D65(%rip),%rdi
  call   <pridej_retezec@plt>
  add    -0xd8(%rbp),%rbx
  lea    -0x1(%rbx),%r13
  mov    %rax,%rsi
  mov    %r13,%r14
  sub    %r12,%r14
  jmp    L362
  nop
L88:
  sub    $0x1,%r13
L362:
  mov    $0x3c,%edi
  call   <pridej_znak@plt>
  movsbl (%rbx),%edi
  mov    %r13,%rbx
  mov    %rax,%rsi
  call   <opakuj@plt>
  mov    %rax,%rsi
  cmp    %r13,%r14
  jne    L88
L529:
  lea    D88(%rip),%rdi
  call   <pridej_retezec@plt>
  movb   $0x0,(%rax)
  mov    -0x38(%rbp),%rdx
  sub    %fs:0x28,%rdx
  jne    L286
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
  nopl   (%rax)
L381:
  mov    %r15d,-0x98(%rbp)
  mov    %r13d,-0xf4(%rbp)
  jmp    L403
L323:
  mov    -0x100(%rbp),%rsi
  lea    D82(%rip),%rdi
  call   <pridej_retezec@plt>
  mov    -0x9c(%rbp),%edx
  movslq -0xac(%rbp),%r13
  mov    %rax,%rsi
  test   %edx,%edx
  jne    L12
L196:
  lea    D80(%rip),%rdi
  call   <pridej_retezec@plt>
  mov    %rax,%rsi
  jmp    L401
L289:
  mov    $0x3c,%edi
  call   <pridej_znak@plt>
  mov    %rax,%rsi
  jmp    L538
L458:
  lea    D65(%rip),%rdi
  call   <pridej_retezec@plt>
  mov    %rax,%rsi
  jmp    L529
L225:
  mov    -0x100(%rbp),%rsi
  lea    D82(%rip),%rdi
  call   <pridej_retezec@plt>
  mov    $0x3c,%edi
  mov    %rax,%rsi
  call   <pridej_znak@plt>
  movzbl -0xf4(%rbp),%edi
  mov    %rax,%rsi
  neg    %edi
  movsbl %dil,%edi
  call   <opakuj@plt>
  mov    %rax,%rsi
  mov    -0x9c(%rbp),%eax
  test   %eax,%eax
  je     L107
  movslq -0xac(%rbp),%r13
  jmp    L12
  nopw   0x0(%rax,%rax,1)
L56:
  orq    $0x0,-0x8(%rsp,%rax,1)
  jmp    L38
  nopl   0x0(%rax,%rax,1)
L0:
  mov    -0xb0(%rbp),%esi
  mov    -0xdc(%rbp),%eax
  add    %esi,%eax
  cmp    -0xe0(%rbp),%eax
  jne    L139
  add    $0x1,%esi
  mov    %esi,-0xb0(%rbp)
  jmp    L497
L246:
  mov    -0xb0(%rbp),%ebx
  mov    -0xf8(%rbp),%eax
  sub    %ebx,%eax
  mov    %eax,-0x9c(%rbp)
  sub    $0x1,%eax
  mov    %eax,-0xac(%rbp)
  lea    -0x1(%rbx),%eax
  mov    %eax,-0xb8(%rbp)
  jmp    L431
L286:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: tag: D82
type_infered: string
name: unpack_data
arguments: tag: D33
type_infered: string
name: unpack_data
arguments: tag: D76
type_infered: string
name: unpack_data
arguments: tag: D65
type_infered: string
name: unpack_data
arguments: tag: D88
type_infered: string
name: unpack_data
arguments: tag: D80
type_infered: string

tool: D82: ++[

tool: D33: [>

tool: D76: ]>-------]

tool: D65: [>]<-]

tool: D88: [.>]

tool: D80: [>]<-------]

assistant: ```c
char *Varianta_C(char *veta, char *vysledek, int nasobek) {
  int vysledky[7] = {0, 36, 74, 110, 146, 182, 220};
  int posuny[7] = {0, -2, 3, 1, -1, -3, 2};
  int delka = 0;
  while (veta[delka] && veta[delka] != 27)
    delka++;
  char optimalni_pocatky[delka];
  char optimalni_opravy[delka];
  char optimalni_korekce[delka];
  int i, j, k;
  int pricti = (nasobek - 1) >> 1;
  int ignorovano = 0;
  i = delka;
  while (i--) {
    j = 7;
    int best_d = 256;
    while (j--) {
      k = abs(veta[i] - vysledky[j]);
      int nas = (k + pricti) / nasobek;
      int kor = (k + pricti) % nasobek;
      kor -= pricti;
      int d = abs(posuny[j]) + nas + abs(kor);
      if (d < best_d) {
        if (j == 0) {
          if (i + ignorovano + 1 == delka) {
            ignorovano++;
          } else
            break;
        }
        best_d = d;
        optimalni_pocatky[i] = posuny[j];
        if (veta[i] - vysledky[j] >= 0) {
          optimalni_opravy[i] = nas;
          optimalni_korekce[i] = kor;
        } else {
          optimalni_opravy[i] = -nas;
          optimalni_korekce[i] = -kor;
        }
      }
    }
  }
  int best_p;
  int best_d = -1;
  for (j = -3; j <= 3; j++) {
    k = 0;
    if (j) {
      k += 2 + 2 * abs(j);
      if (ignorovano)
        k--;
    }
    i = delka - ignorovano;
    while (i-- > 1)
      k += abs(optimalni_pocatky[i] - j);
    if (k < best_d || best_d < 0) {
      best_p = j;
      best_d = k;
    }
  }
  if (best_p) {
    i = delka - ignorovano;
    while (i-- > 1)
      optimalni_pocatky[i] -= best_p;
  }
  vysledek = pridej_retezec("++[", vysledek);
  if (best_p) {
    vysledek = pridej_znak('<', vysledek);
    vysledek = opakuj(-best_p, vysledek);
  }
  i = delka - ignorovano;
  while (i--) {
    vysledek = pridej_znak('<', vysledek);
    vysledek = opakuj(optimalni_pocatky[i], vysledek);
  }
  if (best_p) {
    vysledek = pridej_retezec("[>", vysledek);
    vysledek = opakuj(best_p, vysledek);
    vysledek = pridej_retezec("]>-------]", vysledek);
  } else
    vysledek = pridej_retezec("[>]<-------]", vysledek);
  i = ignorovano;
  if (best_p)
    i--;
  if (i < 0)
    vysledek = pridej_znak('<', vysledek);
  else
    while (i--)
      vysledek = pridej_znak('>', vysledek);
  vysledek = opakuj(nasobek, vysledek);
  vysledek = pridej_znak('[', vysledek);
  i = delka;
  while (i--) {
    vysledek = pridej_znak('<', vysledek);
    vysledek = opakuj(optimalni_opravy[i], vysledek);
  }
  vysledek = pridej_retezec("[>]<-]", vysledek);
  i = delka;
  while (i--) {
    vysledek = pridej_znak('<', vysledek);
    vysledek = opakuj(optimalni_korekce[i], vysledek);
  }
  vysledek = pridej_retezec("[.>]", vysledek);
  *vysledek = 0;
  return vysledek;
}
```