user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x850,%rsp
  mov    %edi,-0x844(%rbp)
  mov    %rsi,-0x850(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x850(%rbp),%rax
  add    $0x8,%rax
  mov    (%rax),%rdx
  lea    -0x810(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    -0x850(%rbp),%rax
  add    $0x10,%rax
  mov    (%rax),%rdx
  lea    -0x610(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    -0x850(%rbp),%rax
  add    $0x18,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <atoi@plt>
  mov    %eax,-0x83c(%rbp)
  mov    -0x850(%rbp),%rax
  add    $0x20,%rax
  mov    (%rax),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <atoi@plt>
  mov    %eax,-0x838(%rbp)
  mov    -0x850(%rbp),%rax
  add    $0x28,%rax
  mov    (%rax),%rdx
  lea    -0x410(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    -0x850(%rbp),%rax
  add    $0x30,%rax
  mov    (%rax),%rdx
  lea    -0x210(%rbp),%rax
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  mov    -0x83c(%rbp),%eax
  imul   -0x838(%rbp),%eax
  cltq
  shl    $0x3,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x830(%rbp)
  mov    -0x83c(%rbp),%eax
  imul   -0x838(%rbp),%eax
  cltq
  shl    $0x2,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x828(%rbp)
  mov    -0x83c(%rbp),%eax
  imul   -0x838(%rbp),%eax
  cltq
  shl    $0x2,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x820(%rbp)
  mov    -0x838(%rbp),%eax
  cltq
  shl    $0x2,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x818(%rbp)
  mov    -0x83c(%rbp),%eax
  imul   -0x838(%rbp),%eax
  mov    %eax,%edx
  mov    -0x830(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <zeros@plt>
  mov    -0x838(%rbp),%edx
  mov    -0x83c(%rbp),%ecx
  mov    -0x830(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <print_data_double@plt>
  mov    -0x838(%rbp),%eax
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <rand_int@plt>
  mov    %eax,%edi
  mov    -0x838(%rbp),%edx
  mov    -0x83c(%rbp),%esi
  mov    -0x830(%rbp),%rax
  mov    %edx,%ecx
  mov    %edi,%edx
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <check_mat@plt>
  test   %eax,%eax
  je     L42
  mov    $0x1,%eax
  jmp    L17
L42:
  mov    -0x838(%rbp),%eax
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <rand_int@plt>
  mov    %eax,-0x834(%rbp)
  mov    -0x83c(%rbp),%eax
  sub    $0x1,%eax
  imul   -0x838(%rbp),%eax
  mov    %eax,%edx
  mov    -0x834(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x830(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x83c(%rbp),%eax
  sub    $0x1,%eax
  imul   -0x838(%rbp),%eax
  mov    %eax,%edx
  mov    -0x834(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x830(%rbp),%rax
  add    %rdx,%rax
  pxor   %xmm1,%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x838(%rbp),%ecx
  mov    -0x834(%rbp),%edx
  mov    -0x83c(%rbp),%esi
  mov    -0x830(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <check_mat@plt>
  test   %eax,%eax
  jne    L19
  mov    $0x1,%eax
  jmp    L17
L19:
  mov    -0x830(%rbp),%rcx
  mov    -0x838(%rbp),%edx
  mov    -0x83c(%rbp),%esi
  lea    -0x810(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <read_data_double@plt>
  mov    -0x83c(%rbp),%eax
  imul   -0x838(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x830(%rbp),%rax
  mov    $0x2,%edx
  mov    %ecx,%esi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <update_m@plt>
  mov    -0x830(%rbp),%rcx
  mov    -0x838(%rbp),%edx
  mov    -0x83c(%rbp),%esi
  lea    -0x410(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <write_data_double@plt>
  mov    -0x828(%rbp),%rcx
  mov    -0x838(%rbp),%edx
  mov    -0x83c(%rbp),%esi
  lea    -0x610(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <read_data_float@plt>
  mov    -0x838(%rbp),%ecx
  mov    -0x83c(%rbp),%edx
  mov    -0x820(%rbp),%rsi
  mov    -0x828(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <create_I@plt>
  mov    -0x820(%rbp),%rcx
  mov    -0x838(%rbp),%edx
  mov    -0x83c(%rbp),%esi
  lea    -0x210(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <write_data_int@plt>
  mov    -0x830(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x828(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x820(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x818(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    $0x0,%eax
L17:
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L32
  call   <__stack_chk_fail@plt>
L32:
  leave
  ret
```

assistant: ```c
int main(int argc, char *argv[]) {
  char input_file[512];
  char input_file2[512];
  char output_file1[512];
  char output_file2[512];
  int N, M, j;
  double *data;
  float *fata;
  int *I, *col;
  strcpy(input_file, argv[1]);
  strcpy(input_file2, argv[2]);
  N = (int)atoi(argv[3]);
  M = (int)atoi(argv[4]);
  strcpy(output_file1, argv[5]);
  strcpy(output_file2, argv[6]);
  data = (double *)malloc(N * M * sizeof(double));
  fata = (float *)malloc(N * M * sizeof(float));
  I = (int *)malloc(N * M * sizeof(int));
  col = (int *)malloc(M * sizeof(int));
  zeros(data, N * M);
  print_data_double(data, N, M);
  if (check_mat(data, N, rand_int(M), M))
    return 1;
  j = rand_int(M);
  data[(N - 1) * M + j] /= 0;
  if (!check_mat(data, N, j, M))
    return 1;
  read_data_double(input_file, N, M, data);
  update_m(data, N * M, 2);
  write_data_double(output_file1, N, M, data);
  read_data_float(input_file2, N, M, fata);
  create_I(fata, I, N, M);
  write_data_int(output_file2, N, M, I);
  free(data);
  free(fata);
  free(I);
  free(col);
  return 0;
}
```