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

```asm
<comparaData>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %rsi,-0x50(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x3c(%rbp)
  movl   $0x0,-0x38(%rbp)
  movl   $0x0,-0x40(%rbp)
  jmp    L116
L166:
  mov    -0x40(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x7c,%al
  jne    L158
  cmpl   $0x4,-0x3c(%rbp)
  je     L21
  addl   $0x1,-0x3c(%rbp)
  jmp    L4
L158:
  cmpl   $0x4,-0x3c(%rbp)
  jne    L4
  mov    -0x40(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%edx
  mov    -0x38(%rbp),%eax
  cltq
  mov    %dl,-0x13(%rbp,%rax,1)
  addl   $0x1,-0x38(%rbp)
L4:
  addl   $0x1,-0x40(%rbp)
L116:
  mov    -0x48(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    %eax,-0x40(%rbp)
  jl     L166
  jmp    L23
L21:
  nop
L23:
  mov    -0x38(%rbp),%eax
  cltq
  movb   $0x0,-0x13(%rbp,%rax,1)
  lea    -0x13(%rbp),%rax
  mov    %rax,%rdi
  call   <dtoi@plt>
  mov    %eax,-0x34(%rbp)
  mov    -0x50(%rbp),%rax
  mov    %rax,%rdi
  call   <dtoi@plt>
  mov    %eax,-0x30(%rbp)
  mov    -0x34(%rbp),%eax
  cmp    -0x30(%rbp),%eax
  jne    L70
  mov    $0x0,%eax
  jmp    L156
L70:
  lea    -0x2c(%rbp),%rdx
  mov    -0x30(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <pegaDiaMesAno@plt>
  lea    -0x20(%rbp),%rdx
  mov    -0x34(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <pegaDiaMesAno@plt>
  mov    -0x24(%rbp),%edx
  mov    -0x18(%rbp),%eax
  cmp    %eax,%edx
  jle    L212
  mov    $0xffffffff,%eax
  jmp    L156
L212:
  mov    -0x24(%rbp),%edx
  mov    -0x18(%rbp),%eax
  cmp    %eax,%edx
  jge    L59
  mov    $0x1,%eax
  jmp    L156
L59:
  mov    -0x28(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  cmp    %eax,%edx
  jle    L82
  mov    $0xffffffff,%eax
  jmp    L156
L82:
  mov    -0x28(%rbp),%edx
  mov    -0x1c(%rbp),%eax
  cmp    %eax,%edx
  jge    L215
  mov    $0x1,%eax
  jmp    L156
L215:
  mov    -0x2c(%rbp),%edx
  mov    -0x20(%rbp),%eax
  cmp    %eax,%edx
  jle    L55
  mov    $0xffffffff,%eax
  jmp    L156
L55:
  mov    -0x2c(%rbp),%edx
  mov    -0x20(%rbp),%eax
  cmp    %eax,%edx
  jge    L156
  mov    $0x1,%eax
  jmp    L156
L156:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L105
  call   <__stack_chk_fail@plt>
L105:
  leave
  ret
```

assistant: ```c
int comparaData(char registro[], char data_captura[]) {
  int datai, i, flag = 0, off = 0, datac;
  int dma[3], dma2[3];
  char data[11];
  for (i = 0; i < strlen(registro); i++) {
    if (registro[i] == '|') {
      if (flag == 4) {
        break;
      }
      flag++;
    } else if (flag == 4) {
      data[off] = registro[i];
      off++;
    }
  }
  data[off] = '\0';
  datai = dtoi(data);
  datac = dtoi(data_captura);
  if (datai == datac) {
    return 0;
  }
  pegaDiaMesAno(datac, &dma);
  pegaDiaMesAno(datai, &dma2);
  if (dma[2] > dma2[2]) {
    return -1;
  } else if (dma[2] < dma2[2]) {
    return 1;
  } else {
    if (dma[1] > dma2[1]) {
      return -1;
    } else if (dma[1] < dma2[1]) {
      return 1;
    } else {
      if (dma[0] > dma2[0]) {
        return -1;
      } else if (dma[0] < dma2[0]) {
        return 1;
      }
    }
  }
}
```