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

```asm
<solve_model>:
  endbr64
  push   %r14
  pxor   %xmm5,%xmm5
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdx,%rbp
  push   %rbx
  sub    $0x220,%rsp
  movss  (%rdi),%xmm0
  movss  0x4(%rdi),%xmm1
  mov    %fs:0x28,%rax
  mov    %rax,0x218(%rsp)
  xor    %eax,%eax
  movss  0x8(%rdi),%xmm2
  movss  0xc(%rdi),%xmm3
  comiss %xmm5,%xmm0
  movss  0x10(%rdi),%xmm4
  jbe    L33
  comiss %xmm5,%xmm1
  jbe    L33
  movss  D69(%rip),%xmm6
  comiss %xmm1,%xmm6
  ja     L23
L33:
  movss  D83(%rip),%xmm5
  lea    D20(%rip),%rsi
  mov    %rbp,%rdi
  movss  %xmm5,0xc(%rsp)
  call   <fprintf@plt>
L77:
  mov    %rbp,%rdi
  call   <fflush@plt>
  movss  0xc(%rsp),%xmm0
  mov    0x218(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L17
  add    $0x220,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  xchg   %ax,%ax
L23:
  comiss %xmm5,%xmm2
  jbe    L33
  comiss %xmm2,%xmm6
  jbe    L33
  movsd  D18(%rip),%xmm6
  pxor   %xmm5,%xmm5
  cvtss2sd %xmm3,%xmm5
  comisd %xmm6,%xmm5
  jbe    L33
  pxor   %xmm5,%xmm5
  cvtss2sd %xmm4,%xmm5
  comisd %xmm6,%xmm5
  jbe    L33
  mov    %rdi,%rbx
  mov    %rsi,%r12
  mov    $0x200,%edi
  mov    $0x1,%esi
  call   <calloc@plt>
  lea    0x10(%rsp),%r14
  mov    %r12,%rdx
  lea    D43(%rip),%rsi
  mov    %rax,%r13
  mov    %r14,%rdi
  xor    %eax,%eax
  call   <sprintf@plt>
  mov    %r12,%rdx
  mov    %r14,%rcx
  mov    %r13,%rdi
  lea    D52(%rip),%rsi
  pxor   %xmm0,%xmm0
  pxor   %xmm4,%xmm4
  mov    $0x5,%eax
  pxor   %xmm3,%xmm3
  pxor   %xmm2,%xmm2
  pxor   %xmm1,%xmm1
  cvtss2sd (%rbx),%xmm0
  cvtss2sd 0x10(%rbx),%xmm4
  cvtss2sd 0xc(%rbx),%xmm3
  cvtss2sd 0x8(%rbx),%xmm2
  cvtss2sd 0x4(%rbx),%xmm1
  call   <sprintf@plt>
  mov    %r13,%rdi
  call   <system@plt>
  lea    D85(%rip),%rsi
  mov    %r14,%rdi
  call   <fopen@plt>
  mov    %rax,%r12
  test   %rax,%rax
  je     L93
L45:
  lea    0xc(%rsp),%rdx
  lea    D88(%rip),%rsi
  mov    %r12,%rdi
  call   <fscanf@plt>
  mov    %r12,%rdi
  call   <fclose@plt>
  movss  0xc(%rsp),%xmm5
  movss  0x10(%rbx),%xmm4
  mov    %rbp,%rdi
  movss  0xc(%rbx),%xmm3
  movss  0x8(%rbx),%xmm2
  lea    D75(%rip),%rsi
  movss  0x4(%rbx),%xmm1
  movss  (%rbx),%xmm0
  call   <fprintf@plt>
  mov    %r13,%rdi
  call   <free@plt>
  jmp    L77
L93:
  lea    D63(%rip),%rdi
  call   <nrerror@plt>
  jmp    L45
L17:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_label: D69
data_type: byte[4]
name: unpack_data
arguments: data_label: D83
data_type: byte[4]
name: unpack_data
arguments: data_label: D20
data_type: string
name: unpack_data
arguments: data_label: D18
data_type: f64
name: unpack_data
arguments: data_label: D43
data_type: string
name: unpack_data
arguments: data_label: D52
data_type: string
name: unpack_data
arguments: data_label: D85
data_type: string
name: unpack_data
arguments: data_label: D88
data_type: string
name: unpack_data
arguments: data_label: D75
data_type: string
name: unpack_data
arguments: data_label: D63
data_type: string

tool: {"D69": [0x00,0x00,0x80,0x3f]}

tool: {"D83": [0x00,0x00,0x20,0x41]}

tool: D20: Invalid Parameter Set (%f,%f,%f,%f,%f) -> returning %f


tool: D18: 0.1

tool: D43: R2.simp.%s.txt

tool: D52: %s %f %f %f %f %f %s

tool: D85: r

tool: D88: %f

tool: D75: Rsquared (%f,%f,%f,%f,%f) = %f


tool: D63: Unable to open Rsquared file

assistant: ```c
float solve_model(float *p, char *runstr, FILE *fopti) {
  FILE *fin;
  char *cmdstr;
  char filename[512];
  float Rsqr;
  int i, j;
  if ((p[0] > 0) && (p[1] > 0 && p[1] < 1) && (p[2] > 0 && p[2] < 1) && (p[3] > 0.10) && (p[4] > 0.10)) {
    cmdstr = (char *)calloc(512, sizeof(char));
    sprintf(filename, "R2.simp.%s.txt", runstr);
    sprintf(cmdstr, "%s %f %f %f %f %f %s", runstr, p[0], p[1], p[2], p[3], p[4], filename);
    system(cmdstr);
    if ((fin = fopen(filename, "r")) == NULL) {
      nrerror("Unable to open Rsquared file");
    }
    fscanf(fin, "%f", &Rsqr);
    fclose(fin);
    fprintf(fopti, "Rsquared (%f,%f,%f,%f,%f) = %f\n", p[0], p[1], p[2], p[3], p[4], Rsqr);
    free((char *)cmdstr);
  } else {
    Rsqr = (float)10;
    fprintf(fopti, "Invalid Parameter Set (%f,%f,%f,%f,%f) -> returning %f\n", p[0], p[1], p[2], p[3], p[4], Rsqr);
  }
  fflush(fopti);
  return (Rsqr);
}
```