user: 请将以下的汇编代码转换成C语言代码:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0xc8,%rsp
  mov    %edi,-0xc4(%rbp)
  mov    %rsi,-0xd0(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  cmpl   $0x3,-0xc4(%rbp)
  je     L25
  lea    D13(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D31(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D33(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D15(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0xffffffff,%edi
  call   <exit@plt>
L25:
  mov    -0xd0(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%rax
  lea    D18(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0xa8(%rbp)
  cmpq   $0x0,-0xa8(%rbp)
  jne    L29
  mov    -0xd0(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%rax
  mov    %rax,%rsi
  lea    D16(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0xffffffff,%edi
  call   <exit@plt>
  jmp    L29
L47:
  movl   $0x0,-0xb4(%rbp)
L121:
  mov    -0xa8(%rbp),%rax
  mov    %rax,%rdi
  call   <fgetc@plt>
  mov    %al,-0xb5(%rbp)
  mov    -0xa8(%rbp),%rax
  mov    %rax,%rdi
  call   <feof@plt>
  test   %rax,%rax
  je     L41
  mov    -0xb4(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xb4(%rbp)
  cltq
  movb   $0x0,-0x80(%rbp,%rax,1)
  jmp    L65
L41:
  cmpb   $0xa,-0xb5(%rbp)
  jne    L109
  mov    -0xb4(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xb4(%rbp)
  cltq
  movb   $0x0,-0x80(%rbp,%rax,1)
  jmp    L65
L109:
  mov    -0xb4(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    %edx,-0xb4(%rbp)
  cltq
  movzbl -0xb5(%rbp),%edx
  mov    %dl,-0x80(%rbp,%rax,1)
  jmp    L121
L65:
  lea    -0x80(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%ebx
  mov    -0xd0(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    %eax,%ebx
  jl     L29
  movl   $0x0,-0xb0(%rbp)
  jmp    L35
L82:
  movl   $0x0,-0xac(%rbp)
  jmp    L76
L118:
  mov    -0xb0(%rbp),%edx
  mov    -0xac(%rbp),%eax
  add    %edx,%eax
  cltq
  movzbl -0x80(%rbp,%rax,1),%edx
  mov    -0xac(%rbp),%eax
  cltq
  mov    %dl,-0xa0(%rbp,%rax,1)
  addl   $0x1,-0xac(%rbp)
L76:
  mov    -0xd0(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cmp    %eax,-0xac(%rbp)
  jl     L118
  mov    -0xac(%rbp),%eax
  cltq
  movb   $0x0,-0xa0(%rbp,%rax,1)
  mov    -0xd0(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rdx
  lea    -0xa0(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L157
  lea    -0x80(%rbp),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  jmp    L29
L157:
  addl   $0x1,-0xb0(%rbp)
L35:
  lea    -0x80(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%ebx
  mov    -0xd0(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    %ebx,%eax
  sub    %edx,%eax
  cmp    %eax,-0xb0(%rbp)
  jle    L82
L29:
  mov    -0xa8(%rbp),%rax
  mov    %rax,%rdi
  call   <feof@plt>
  test   %rax,%rax
  je     L47
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    $0x0,%eax
  mov    -0x18(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L156
  call   <__stack_chk_fail@plt>
L156:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D13
data_type: string
name: disassemble_data
arguments: data_label: D31
data_type: string
name: disassemble_data
arguments: data_label: D33
data_type: string
name: disassemble_data
arguments: data_label: D15
data_type: string
name: disassemble_data
arguments: data_label: D18
data_type: string
name: disassemble_data
arguments: data_label: D16
data_type: string

tool: D13: Number of Arguements provided != 3 

tool: D31: Arguements Required: 

tool: D33: Search Text 

tool: D15: Filename 

tool: D18: r

tool: D16: %s does not exist. 


assistant: ```c
int main(int argc, char *argv[]) {
  FILE *fd;
  char str[100];
  char c;
  int i, j, k, m, flag;
  char temp[30];
  if (argc != 3) {
    printf("Number of Arguements provided != 3 \n");
    printf("Arguements Required: \n");
    printf("Search Text \n");
    printf("Filename \n");
    exit(-1);
  }
  fd = fopen(argv[2], "r");
  if (!fd) {
    printf("%s does not exist. \n", argv[2]);
    exit(-1);
  }
  while (!feof(fd)) {
    i = 0;
    while (1) {
      c = fgetc(fd);
      if (feof(fd)) {
        str[i++] = '\0';
        break;
      }
      if (c == '\n') {
        str[i++] = '\0';
        break;
      }
      str[i++] = c;
    }
    if (strlen(str) >= strlen(argv[1])) {
      for (k = 0; k <= strlen(str) - strlen(argv[1]); k++) {
        for (m = 0; m < strlen(argv[1]); m++) {
          temp[m] = str[k + m];
        }
        temp[m] = '\0';
        if (strcmp(temp, argv[1]) == 0) {
          printf("%s\n", str);
          break;
        }
      }
    }
  }
  printf("\n");
  return 0;
}
```