user: Converte this assembly snippet into its equivalent C code:

```asm
<main>:
  endbr64
  push   %r15
  mov    $0x11b72950,%edi
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x58,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  call   <createMatrix@plt>
  cmpq   $0x0,0x10(%rbx)
  mov    %rax,%rbp
  je     L47
  cmpq   $0x0,0x8(%rbx)
  je     L47
L228:
  mov    0x8(%rbx),%rdi
  lea    D30(%rip),%rsi
  call   <fopen@plt>
  mov    %rax,0x20(%rsp)
  test   %rax,%rax
  je     L111
  mov    0x10(%rbx),%rdi
  lea    D25(%rip),%rsi
  call   <fopen@plt>
  mov    %rax,0x28(%rsp)
  test   %rax,%rax
  je     L42
  mov    $0x1e,%edi
  xor    %r12d,%r12d
  xor    %ebx,%ebx
  call   <malloc@plt>
  lea    D13(%rip),%r15
  mov    %rax,%r14
  mov    %rax,%rdi
  call   <assert@plt>
  mov    %r14,%rax
  mov    %rbp,0x8(%rsp)
  mov    %rbp,%r9
  mov    %r12d,%r14d
  mov    %ebx,%ebp
  mov    %rax,%r12
  jmp    L277
L39:
  cmp    %ebx,%r14d
  jge    L46
L107:
  cvtdq2pd (%rsp),%xmm0
  movups %xmm0,(%r9)
  pxor   %xmm0,%xmm0
  add    $0x18,%r9
  cvtsi2sd %eax,%xmm0
  mov    %ebx,%r14d
  mov    %r13d,%ebp
  movsd  %xmm0,-0x8(%r9)
L277:
  mov    0x20(%rsp),%rdx
  mov    $0x1e,%esi
  mov    %r12,%rdi
  mov    %r9,(%rsp)
  call   <fgets@plt>
  mov    (%rsp),%r9
  test   %rax,%rax
  je     L196
  mov    %r15,%rsi
  mov    %r12,%rdi
  mov    %r9,0x18(%rsp)
  call   <strtok@plt>
  xor    %edi,%edi
  mov    %r15,%rsi
  mov    %rax,%r13
  call   <strtok@plt>
  xor    %edi,%edi
  mov    %r15,%rsi
  mov    %rax,%rbx
  call   <strtok@plt>
  xor    %esi,%esi
  mov    %r13,%rdi
  mov    %rax,0x10(%rsp)
  call   <strtod@plt>
  xor    %esi,%esi
  mov    %rbx,%rdi
  mov    %eax,%r13d
  call   <strtod@plt>
  mov    0x10(%rsp),%rdi
  movd   %r13d,%xmm7
  xor    %esi,%esi
  movd   %eax,%xmm5
  mov    %eax,%ebx
  punpckldq %xmm5,%xmm7
  movq   %xmm7,(%rsp)
  call   <strtod@plt>
  cmp    %r13d,%ebp
  mov    0x18(%rsp),%r9
  jl     L39
  cmp    %ebx,%r14d
  jge    L46
  mov    %ebp,%r13d
  jmp    L107
L196:
  mov    %r12,%rax
  mov    %r14d,%r12d
  mov    %ebp,%ebx
  mov    0x8(%rsp),%rbp
  mov    %rax,%rdi
  shl    $0x5,%r12d
  call   <free@plt>
  mov    %r12d,%edi
  call   <createMatrix@plt>
  mov    %rax,%r15
  test   %r12d,%r12d
  jle    L282
  mov    %rax,%rdx
  mov    %r12d,%eax
  movapd D150(%rip),%xmm0
  shr    %eax
  shl    $0x4,%rax
  add    %r15,%rax
L67:
  movups %xmm0,(%rdx)
  add    $0x10,%rdx
  cmp    %rax,%rdx
  jne    L67
L282:
  shl    $0x5,%ebx
  mov    %ebx,%edi
  call   <createMatrix@plt>
  mov    %rax,%r14
  test   %ebx,%ebx
  jle    L165
  mov    %rax,%rdx
  mov    %ebx,%eax
  movapd D150(%rip),%xmm0
  shr    %eax
  shl    $0x4,%rax
  add    %r14,%rax
L106:
  movups %xmm0,(%rdx)
  add    $0x10,%rdx
  cmp    %rax,%rdx
  jne    L106
L165:
  lea    0x38(%rsp),%rdi
  call   <get_walltime@plt>
  pxor   %xmm0,%xmm0
  movss  %xmm0,0x18(%rsp)
  movaps %xmm0,%xmm10
L274:
  movaps %xmm0,%xmm1
  subss  0x18(%rsp),%xmm1
  pxor   %xmm2,%xmm2
  cvtss2sd %xmm1,%xmm2
  comisd D19(%rip),%xmm2
  ja     L127
  pxor   %xmm7,%xmm7
  ucomiss %xmm7,%xmm0
  jp     L281
  je     L127
L281:
  pxor   %xmm7,%xmm7
  comiss %xmm1,%xmm7
  jbe    L151
L127:
  mov    $0x8db94a80,%eax
  mov    %rbp,%r13
  pxor   %xmm9,%xmm9
  add    %rbp,%rax
  mov    %rax,0x8(%rsp)
  lea    0x100(%r14),%rax
  mov    %rax,0x10(%rsp)
  nopw   0x0(%rax,%rax,1)
L85:
  cvttsd2si 0x0(%r13),%ebx
  sub    $0x8,%rsp
  mov    %r15,%r8
  mov    %r14,%r9
  cvttsd2si 0x8(%r13),%r12d
  movss  %xmm9,0x8(%rsp)
  mov    $0x20,%ecx
  cvttsd2si 0x10(%r13),%edx
  push   %rbp
  mov    %ebx,%edi
  mov    %r12d,%esi
  call   <computeEui@plt>
  movslq %ebx,%rdi
  movslq %r12d,%rax
  pxor   %xmm4,%xmm4
  shl    $0x8,%rax
  shl    $0x8,%rdi
  pop    %rcx
  movaps %xmm0,%xmm10
  lea    (%r15,%rax,1),%rdx
  lea    (%r14,%rdi,1),%rsi
  pop    %r8
  movapd D101(%rip),%xmm6
  lea    0x10(%r15,%rax,1),%rax
  movapd D78(%rip),%xmm5
  movss  (%rsp),%xmm9
  cvtss2sd %xmm0,%xmm4
  cmp    %rax,%rsi
  mov    D101(%rip),%rax
  movq   %rax,%xmm7
  mov    D78(%rip),%rax
  movq   %rax,%xmm8
  jae    L13
  lea    0x10(%r14,%rdi,1),%rax
  cmp    %rax,%rdx
  jb     L175
L13:
  pxor   %xmm2,%xmm2
  unpcklpd %xmm4,%xmm4
  xor    %eax,%eax
  movapd %xmm2,%xmm3
  nopl   0x0(%rax)
L121:
  movupd (%rdx,%rax,1),%xmm0
  movupd (%rsi,%rax,1),%xmm11
  movapd %xmm0,%xmm1
  movapd %xmm0,%xmm12
  mulpd  %xmm0,%xmm1
  mulpd  %xmm6,%xmm12
  addsd  %xmm1,%xmm3
  unpckhpd %xmm1,%xmm1
  addsd  %xmm1,%xmm3
  movapd %xmm11,%xmm1
  mulpd  %xmm11,%xmm1
  addsd  %xmm1,%xmm2
  unpckhpd %xmm1,%xmm1
  addsd  %xmm1,%xmm2
  movapd %xmm4,%xmm1
  mulpd  %xmm11,%xmm1
  mulpd  %xmm6,%xmm11
  subpd  %xmm12,%xmm1
  mulpd  %xmm5,%xmm1
  addpd  %xmm0,%xmm1
  mulpd  %xmm4,%xmm0
  movups %xmm1,(%rdx,%rax,1)
  movupd (%rsi,%rax,1),%xmm1
  subpd  %xmm11,%xmm0
  mulpd  %xmm5,%xmm0
  addpd  %xmm1,%xmm0
  movups %xmm0,(%rsi,%rax,1)
  add    $0x10,%rax
  cmp    $0x100,%rax
  jne    L121
L43:
  addsd  %xmm3,%xmm2
  mulss  %xmm10,%xmm10
  pxor   %xmm0,%xmm0
  cvtss2sd %xmm9,%xmm9
  add    $0x18,%r13
  mulsd  %xmm7,%xmm2
  cvtss2sd %xmm10,%xmm0
  addsd  %xmm0,%xmm2
  addsd  %xmm2,%xmm9
  cvtsd2ss %xmm9,%xmm9
  cmp    %r13,0x8(%rsp)
  jne    L85
  movss  0x18(%rsp),%xmm0
  movss  %xmm9,0x18(%rsp)
  jmp    L274
L46:
  cmp    %ebp,%r13d
  mov    %r14d,%ebx
  cmovl  %ebp,%r13d
  jmp    L107
L175:
  mov    0x10(%rsp),%rbx
  pxor   %xmm2,%xmm2
  mov    %rsi,%rax
  movapd %xmm2,%xmm3
  lea    (%rbx,%rdi,1),%rcx
  nopl   (%rax)
L225:
  movsd  (%rdx),%xmm0
  movsd  (%rax),%xmm11
  add    $0x8,%rax
  add    $0x8,%rdx
  movapd %xmm0,%xmm1
  movapd %xmm0,%xmm12
  mulsd  %xmm0,%xmm1
  mulsd  %xmm7,%xmm12
  addsd  %xmm1,%xmm3
  movapd %xmm11,%xmm1
  mulsd  %xmm11,%xmm1
  addsd  %xmm1,%xmm2
  movapd %xmm11,%xmm1
  mulsd  %xmm4,%xmm1
  mulsd  %xmm7,%xmm11
  subsd  %xmm12,%xmm1
  mulsd  %xmm8,%xmm1
  addsd  %xmm0,%xmm1
  mulsd  %xmm4,%xmm0
  movsd  %xmm1,-0x8(%rdx)
  subsd  %xmm11,%xmm0
  mulsd  %xmm8,%xmm0
  addsd  -0x8(%rax),%xmm0
  movsd  %xmm0,-0x8(%rax)
  cmp    %rax,%rcx
  jne    L225
  jmp    L43
L151:
  lea    0x40(%rsp),%rdi
  movss  %xmm10,(%rsp)
  call   <get_walltime@plt>
  mov    0x28(%rsp),%rbx
  movss  (%rsp),%xmm10
  lea    D44(%rip),%rsi
  movaps %xmm10,%xmm0
  mov    %rbx,%rdi
  call   <fprintf@plt>
  movss  (%rsp),%xmm10
  lea    D160(%rip),%rsi
  mov    %rbx,%rdi
  movaps %xmm10,%xmm0
  call   <fprintf@plt>
  movss  (%rsp),%xmm10
  lea    D128(%rip),%rsi
  mov    %rbx,%rdi
  movaps %xmm10,%xmm0
  call   <fprintf@plt>
  movss  (%rsp),%xmm10
  lea    D109(%rip),%rsi
  mov    %rbx,%rdi
  movaps %xmm10,%xmm0
  call   <fprintf@plt>
  movss  (%rsp),%xmm10
  lea    D57(%rip),%rsi
  mov    %rbx,%rdi
  movaps %xmm10,%xmm0
  call   <fprintf@plt>
  movsd  0x40(%rsp),%xmm0
  subsd  0x38(%rsp),%xmm0
  lea    D156(%rip),%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    0x20(%rsp),%rdi
  call   <fclose@plt>
  mov    %rbx,%rdi
  call   <fclose@plt>
L162:
  mov    0x48(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L32
  add    $0x58,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L47:
  lea    D86(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  xor    %edi,%edi
  call   <exit@plt>
  jmp    L228
L42:
  mov    0x20(%rsp),%rdi
  call   <fclose@plt>
L111:
  xor    %edi,%edi
  call   <fclose@plt>
  jmp    L162
L32:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D30
data_type: string
name: extract_symbolic_data
arguments: data_label: D25
data_type: string
name: extract_symbolic_data
arguments: data_label: D13
data_type: string
name: extract_symbolic_data
arguments: data_label: D150
data_type: f32[4]
name: extract_symbolic_data
arguments: data_label: D19
data_type: f64
name: extract_symbolic_data
arguments: data_label: D101
data_type: f64[2]
name: extract_symbolic_data
arguments: data_label: D78
data_type: f64[2]
name: extract_symbolic_data
arguments: data_label: D44
data_type: string
name: extract_symbolic_data
arguments: data_label: D160
data_type: string
name: extract_symbolic_data
arguments: data_label: D128
data_type: string
name: extract_symbolic_data
arguments: data_label: D109
data_type: string
name: extract_symbolic_data
arguments: data_label: D57
data_type: string
name: extract_symbolic_data
arguments: data_label: D156
data_type: string
name: extract_symbolic_data
arguments: data_label: D86
data_type: string

tool: D30: r

tool: D25: w

tool: D13:  

tool: {"D150": [0.0,1.875,0.0,1.875]}

tool: D19: 0.001

tool: {"D101": [0.005,0.005]}

tool: {"D78": [0.00125,0.00125]}

tool: D44: user: 427501 movie:  8 rating: %f


tool: D160: user: 260749 movie: 18 rating: %f


tool: D128: user: 311872 movie: 28 rating: %f


tool: D109: user:  73318 movie: 30 rating: %f


tool: D57: user: 182071 movie: 30 rating: %f


tool: D156: elapsed time: %f

tool: D86: not enough arguments

assistant: ```c
int main(int argc, char *argv[]) {
  int numProcessors, rank;
  double startTime, endTime;
  int i, u, f, y, r;
  int megaSize = 99072112 * 3;
  int n = 0;
  int m = 0;
  int factorCount = 32;
  double llamda = 0.005;
  double gamma = 0.00125;
  double errorLimit = 0.001;
  float e = 0;
  float totalError = 0;
  double *megaMatrix = createMatrix(megaSize);
  FILE *input;
  if (argv[2] == NULL || argv[1] == NULL) {
    printf("not enough arguments");
    exit(0);
  }
  input = fopen(argv[1], "r");
  if (!input) {
    fclose(input);
    return 0;
  }
  FILE *output;
  output = fopen(argv[2], "w");
  if (!output) {
    fclose(input);
    fclose(output);
    return 0;
  }
  int maxLineLength = 30;
  char *line = (char *)malloc(maxLineLength);
  assert(line);
  int count = 0;
  while (fgets(line, maxLineLength, input) != NULL) {
    char *user = strtok(line, " ");
    char *movie = strtok(NULL, " ");
    char *rating = strtok(NULL, " ");
    int userNum = strtod(user, NULL);
    int movieNum = strtod(movie, NULL);
    int ratingNum = strtod(rating, NULL);
    if (userNum > n && movieNum > m) {
      n = userNum;
      m = movieNum;
    } else if (movieNum > m) {
      m = movieNum;
    } else if (userNum > n) {
      n = userNum;
    }
    megaMatrix[count] = userNum;
    megaMatrix[count + 1] = movieNum;
    megaMatrix[count + 2] = ratingNum;
    count += 3;
  }
  free(line);
  double *q = createMatrix(m * factorCount);
  for (y = 0; y < m * factorCount; y++) {
    q[y] = 1;
  }
  double *p = createMatrix(n * factorCount);
  for (y = 0; y < n * factorCount; y++) {
    p[y] = 1;
  }
  float oldError = 0;
  get_walltime(&startTime);
  while (oldError - totalError > errorLimit || !oldError || oldError - totalError < 0) {
    oldError = totalError;
    totalError = 0;
#pragma omp parallel for schedule(guided, 1)
    for (y = 0; y < megaSize; y += 3) {
      u = megaMatrix[y];
      i = megaMatrix[y + 1];
      r = megaMatrix[y + 2];
      e = computeEui(u, i, r, factorCount, q, p, megaMatrix);
      double qNorm = 0;
      double pNorm = 0;
      for (f = 0; f < factorCount; f++) {
        double qi = q[i * factorCount + f];
        double pu = p[u * factorCount + f];
        qNorm += qi * qi;
        pNorm += pu * pu;
        q[i * factorCount + f] += gamma * (e * pu - (llamda * qi));
        p[u * factorCount + f] += gamma * (e * qi - (llamda * pu));
      }
      e = e * e;
      double noise = llamda * (qNorm + pNorm);
      totalError += (e + noise);
    }
  }
  get_walltime(&endTime);
  fprintf(output, "user: 427501 movie:  8 rating: %f\n", e);
  fprintf(output, "user: 260749 movie: 18 rating: %f\n", e);
  fprintf(output, "user: 311872 movie: 28 rating: %f\n", e);
  fprintf(output, "user:  73318 movie: 30 rating: %f\n", e);
  fprintf(output, "user: 182071 movie: 30 rating: %f\n", e);
  double timeElapsed = endTime - startTime;
  printf("elapsed time: %f", timeElapsed);
  printf("\n");
  printf("\n");
  fclose(input);
  fclose(output);
}
```