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

```asm
<runLengthEncodeComp>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  call   <getCaminhoTabela@plt>
  lea    D26(%rip),%rsi
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L18
L90:
  lea    D35(%rip),%rsi
  lea    D7(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%r13
  test   %rax,%rax
  je     L43
L24:
  lea    0xd(%rsp),%r14
  mov    %r12,%rcx
  mov    $0x1,%edx
  mov    $0x1,%esi
  mov    %r14,%rdi
  lea    0xe(%rsp),%rbx
  call   <fread@plt>
  mov    %r12,%rdi
  movb   $0x23,0xf(%rsp)
  call   <feof@plt>
  test   %eax,%eax
  jne    L110
  nopl   (%rax)
L76:
  mov    $0x1,%ebp
  jmp    L102
  nop
L109:
  movzbl 0xe(%rsp),%eax
  cmp    %al,0xd(%rsp)
  jne    L104
  add    $0x1,%ebp
L102:
  mov    %r12,%rcx
  mov    $0x1,%edx
  mov    $0x1,%esi
  mov    %rbx,%rdi
  call   <fread@plt>
  cmp    $0x1,%eax
  je     L109
L104:
  cmp    $0x1,%ebp
  je     L58
  mov    %ebp,%edi
  call   <casasDecimais@plt>
  mov    %eax,%edi
  mov    %eax,%r15d
  call   <aloca@plt>
  mov    %ebp,%edi
  lea    0x10(%rsp),%rsi
  lea    0xf(%rsp),%rbp
  mov    %rax,0x10(%rsp)
  call   <intToString@plt>
  mov    %r13,%rcx
  mov    $0x1,%edx
  mov    %rbp,%rdi
  mov    $0x1,%esi
  call   <fwrite@plt>
  mov    0x10(%rsp),%rdi
  mov    %r13,%rcx
  mov    %r15d,%edx
  mov    $0x1,%esi
  call   <fwrite@plt>
  mov    %r13,%rcx
  mov    $0x1,%edx
  mov    %r14,%rdi
  mov    $0x1,%esi
  call   <fwrite@plt>
  mov    %r13,%rcx
  mov    $0x1,%edx
  mov    %rbp,%rdi
  mov    $0x1,%esi
  call   <fwrite@plt>
L56:
  movzbl 0xe(%rsp),%eax
  mov    %r12,%rdi
  mov    %al,0xd(%rsp)
  call   <feof@plt>
  test   %eax,%eax
  je     L76
L110:
  mov    %r12,%rdi
  call   <fclose@plt>
  mov    %r13,%rdi
  call   <fclose@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L95
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L58:
  mov    %r13,%rcx
  mov    $0x1,%edx
  mov    $0x1,%esi
  mov    %r14,%rdi
  call   <fwrite@plt>
  jmp    L56
L18:
  mov    $0x3,%edi
  call   <help@plt>
  mov    $0xffffffff,%edi
  call   <exit@plt>
  jmp    L90
L43:
  lea    D4(%rip),%rdi
  call   <printf@plt>
  mov    $0xffffffff,%edi
  call   <exit@plt>
  jmp    L24
L95:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: tag: D26
type_infered: string
name: unpack_data
arguments: tag: D35
type_infered: string
name: unpack_data
arguments: tag: D7
type_infered: string
name: unpack_data
arguments: tag: D4
type_infered: string

tool: D26: rb

tool: D35: wb

tool: D7: ../dados/saida.ori

tool: D4: Erro ao abrir o arquivo.


assistant: ```c
void runLengthEncodeComp(char *arquivoEntrada) {
  FILE *ptre, *ptrs;
  char c1, c2, hashtag, *contString, *caminho;
  int retorno, cont = 1, num;
  caminho = getCaminhoTabela(arquivoEntrada);
  ptre = fopen(caminho, "rb");
  if (ptre == NULL) {
    help(3);
    exit(-1);
  }
  ptrs = fopen("../dados/saida.ori", "wb");
  if (ptrs == NULL) {
    printf("Erro ao abrir o arquivo.\n");
    exit(-1);
  }
  fread(&c1, sizeof(char), 1, ptre);
  hashtag = '#';
  while (!feof(ptre)) {
    cont = 1;
    while ((fread(&c2, sizeof(char), 1, ptre) == 1) && (c1 == c2)) {
      cont++;
    }
    if (cont > 1) {
      num = casasDecimais(cont);
      contString = aloca(num);
      intToString(cont, &contString);
      fwrite(&hashtag, sizeof(char), 1, ptrs);
      fwrite(contString, sizeof(char), num, ptrs);
      fwrite(&c1, sizeof(char), 1, ptrs);
      fwrite(&hashtag, sizeof(char), 1, ptrs);
    } else
      fwrite(&c1, sizeof(char), 1, ptrs);
    c1 = c2;
  }
  fclose(ptre);
  fclose(ptrs);
}
```