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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x180,%rsp
  mov    %edi,-0x174(%rbp)
  mov    %rsi,-0x180(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movq   $0x0,-0x170(%rbp)
  movq   $0x0,-0x168(%rbp)
  movq   $0x0,-0x160(%rbp)
  movq   $0x0,-0x158(%rbp)
  lea    D17(%rip),%rax
  mov    %rax,-0x150(%rbp)
  lea    D26(%rip),%rax
  mov    %rax,%rsi
  lea    D18(%rip),%rax
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x148(%rbp)
  mov    -0x148(%rbp),%rdx
  lea    -0x168(%rbp),%rcx
  lea    -0x170(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <getline@plt>
  mov    -0x148(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  mov    -0x170(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %rax,-0x168(%rbp)
  mov    -0x170(%rbp),%rdx
  mov    -0x168(%rbp),%rax
  sub    $0x1,%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0xa,%al
  jne    L27
  mov    -0x170(%rbp),%rdx
  mov    -0x168(%rbp),%rax
  sub    $0x1,%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  jmp    L27
L32:
  mov    -0x160(%rbp),%rdx
  lea    -0x110(%rbp),%rax
  lea    D5(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <sprintf@plt>
  mov    -0x170(%rbp),%rax
  lea    -0x110(%rbp),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <concat@plt>
  mov    %rax,-0x158(%rbp)
  lea    -0x140(%rbp),%rdx
  mov    -0x158(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <calculate_md5@plt>
  mov    -0x150(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %rax,%rdx
  lea    -0x140(%rbp),%rcx
  mov    -0x150(%rbp),%rax
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <strncmp@plt>
  test   %rax,%rax
  je     L56
  mov    -0x158(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  addq   $0x1,-0x160(%rbp)
L27:
  cmpq   $0x0,-0x160(%rbp)
  jns    L32
  jmp    L52
L56:
  nop
L52:
  mov    -0x160(%rbp),%rax
  mov    %rax,%rsi
  lea    D5(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    -0x170(%rbp),%rax
  test   %rax,%rax
  je     L71
  mov    -0x170(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
L71:
  cmpq   $0x0,-0x158(%rbp)
  je     L62
  mov    -0x158(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
L62:
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L48
  call   <__stack_chk_fail@plt>
L48:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D17
type: string
name: unpack_data
arguments: data_tag: D26
type: string
name: unpack_data
arguments: data_tag: D18
type: string
name: unpack_data
arguments: data_tag: D5
type: string

tool: D17: 000000

tool: D26: r

tool: D18: ./input.txt

tool: D5: %ld

assistant: ```c
int main(int argc, char **argv) {
  FILE *fp;
  char *text = NULL;
  size_t len = 0;
  long number = 0;
  char str_number[256];
  char *answer = NULL;
  char md5hash[33];
  const char *zeroes = "000000";
  fp = fopen("./input.txt", "r");
  getline(&text, &len, fp);
  fclose(fp);
  len = strlen(text);
  if (text[len - 1] == 10) {
    text[len - 1] = '\0';
  }
  while (number >= 0) {
    sprintf(str_number, "%ld", number);
    answer = concat(text, str_number);
    calculate_md5(answer, md5hash);
    if (strncmp(zeroes, md5hash, strlen(zeroes)) == 0) {
      break;
    }
    free(answer);
    number += 1;
  }
  printf("%ld", number);
  if (text) {
    free(text);
  }
  if (answer) {
    free(answer);
  }
  return 0;
}
```