user: Demonstrate the C code that generates the assembly output below:

```asm
<output_data>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  lea    D43(%rip),%rsi
  lea    D37(%rip),%rdi
  call   <fopen@plt>
  mov    %rax,%r13
  test   %rax,%rax
  je     L46
L39:
  mov    $0x320,%edi
  call   <malloc@plt>
  mov    %rax,%r12
  mov    $0x320,%edi
  call   <malloc@plt>
  mov    %rax,%r14
  test   %r12,%r12
  je     L72
  test   %rax,%rax
  jne    L14
L73:
  lea    D5(%rip),%rdi
  call   <report_error@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L14:
  lea    D3(%rip),%rdi
  call   <report_error@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L20
L46:
  lea    D27(%rip),%rdi
  call   <report_error@plt>
  jmp    L39
L72:
  lea    D8(%rip),%rdi
  call   <report_error@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  test   %r14,%r14
  je     L73
L20:
  lea    0x8(%r12),%rbp
  mov    $0x1,%ebx
  lea    D30(%rip),%r15
L50:
  pxor   %xmm0,%xmm0
  cvtsi2sd %ebx,%xmm0
  mulsd  D51(%rip),%xmm0
  divsd  D44(%rip),%xmm0
  addsd  D108(%rip),%xmm0
  movsd  %xmm0,0x0(%rbp)
  mov    %r14,%rax
  sub    %r12,%rax
  movsd  (%rax,%rbp,1),%xmm1
  mov    %r15,%rsi
  mov    %r13,%rdi
  call   <fprintf@plt>
  add    $0x1,%ebx
  add    $0x8,%rbp
  cmp    $0x65,%ebx
  jne    L50
  test   %r13,%r13
  je     L76
  mov    %r13,%rdi
  call   <fclose@plt>
  test   %rax,%rax
  jne    L30
L76:
  mov    %r12,%rdi
  call   <free@plt>
  mov    %r14,%rdi
  call   <free@plt>
  mov    $0x0,%eax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L30:
  lea    D66(%rip),%rdi
  call   <report_error@plt>
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L76
```

tool_calls: name: parse_data
arguments: label: D43
type: string
name: parse_data
arguments: label: D37
type: string
name: parse_data
arguments: label: D5
type: string
name: parse_data
arguments: label: D3
type: string
name: parse_data
arguments: label: D27
type: string
name: parse_data
arguments: label: D8
type: string
name: parse_data
arguments: label: D30
type: string
name: parse_data
arguments: label: D51
type: byte[8]
name: parse_data
arguments: label: D44
type: byte[8]
name: parse_data
arguments: label: D108
type: byte[8]
name: parse_data
arguments: label: D66
type: string

tool: D43: w

tool: D37: out.csv

tool: D5: Cannot allocate memory for y

tool: D3: Failed to allocate memory.

tool: D27: Failed to open file for writing.

tool: D8: Cannot allocate memory for x

tool: D30: %f,%f


tool: {"D51": [0x00,0x00,0x00,0x00,0x00,0x80,0x66,0x40]}

tool: {"D44": [0x00,0x00,0x00,0x00,0x00,0x00,0x59,0x40]}

tool: {"D108": [0x00,0x00,0x00,0x00,0x00,0xc0,0x72,0x40]}

tool: D66: Failed to close file.

assistant: ```c
int output_data() {
  double min, max;
  int points, i;
  const char *file = "out.csv";
  FILE *fp;
  double *x, *y;
  min = 0;
  max = 0;
  points = 0;
  i = 0;
  fp = NULL;
  x = NULL;
  y = NULL;
  fp = fopen(file, "w");
  if (!fp) {
    report_error("Failed to open file for writing.");
  }
  min = 300;
  max = 480;
  points = 100;
  x = (double *)malloc(sizeof(double) * points);
  y = (double *)malloc(sizeof(double) * points);
  if (x == NULL) {
    report_error("Cannot allocate memory for x");
    exit(1);
  }
  if (y == NULL) {
    report_error("Cannot allocate memory for y");
    exit(1);
  }
  if (x || y == NULL) {
    report_error("Failed to allocate memory.");
    exit(1);
  }
  for (i = 1; i <= points; i++) {
    x[i] = min + (max - min) * i / points;
    fprintf(fp, "%f,%f\n", x[i], y[i]);
  }
  if (fp) {
    if (fclose(fp) != 0) {
      report_error("Failed to close file.");
      exit(1);
    }
  }
  free(x);
  free(y);
  return 0;
}
```