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

```asm
<ShowHeader>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x3b0,%rsp
  mov    %rdi,-0x378(%rbp)
  mov    %rsi,-0x380(%rbp)
  mov    %rdx,-0x388(%rbp)
  mov    %rcx,-0x390(%rbp)
  movsd  %xmm0,-0x398(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  mov    -0x388(%rbp),%rax
  lea    D7(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x378(%rbp)
  mov    -0x390(%rbp),%rax
  lea    D49(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0x380(%rbp)
  cmpq   $0x0,-0x378(%rbp)
  je     L4
  cmpq   $0x0,-0x380(%rbp)
  jne    L32
L4:
  lea    D31(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
  mov    $0xffffffff,%edi
  call   <exit@plt>
  jmp    L46
L32:
  movl   $0x0,-0x364(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x358(%rbp)
  movsd  D75(%rip),%xmm0
  pxor   %xmm1,%xmm1
  divsd  %xmm1,%xmm0
  movq   D20(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,-0x350(%rbp)
  movsd  D75(%rip),%xmm0
  pxor   %xmm1,%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x348(%rbp)
  jmp    L28
L55:
  lea    -0x398(%rbp),%rdx
  mov    -0x378(%rbp),%rax
  lea    D60(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  call   <fscanf@plt>
  cmp    $0x1,%eax
  jne    L10
  mov    -0x398(%rbp),%rax
  movsd  -0x350(%rbp),%xmm0
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <max@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x350(%rbp)
  mov    -0x398(%rbp),%rax
  movsd  -0x348(%rbp),%xmm0
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <min@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x348(%rbp)
  movsd  -0x398(%rbp),%xmm0
  mov    -0x364(%rbp),%eax
  cltq
  movsd  %xmm0,-0x330(%rbp,%rax,8)
  movsd  -0x398(%rbp),%xmm0
  movsd  -0x358(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x358(%rbp)
  addl   $0x1,-0x364(%rbp)
L28:
  mov    -0x378(%rbp),%rax
  mov    %rax,%rdi
  call   <feof@plt>
  test   %eax,%eax
  je     L55
  jmp    L47
L10:
  nop
L47:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x340(%rbp)
  movl   $0x0,-0x360(%rbp)
  movl   $0x0,-0x35c(%rbp)
  jmp    L41
L35:
  mov    -0x35c(%rbp),%eax
  cltq
  movsd  -0x330(%rbp,%rax,8),%xmm2
  movsd  %xmm2,-0x3a0(%rbp)
  mov    -0x364(%rbp),%edx
  mov    -0x358(%rbp),%rax
  mov    %edx,%edi
  movq   %rax,%xmm0
  call   <average@plt>
  movsd  -0x3a0(%rbp),%xmm2
  subsd  %xmm0,%xmm2
  movsd  %xmm2,-0x3a0(%rbp)
  mov    -0x35c(%rbp),%eax
  cltq
  movsd  -0x330(%rbp,%rax,8),%xmm3
  movsd  %xmm3,-0x3a8(%rbp)
  mov    -0x364(%rbp),%edx
  mov    -0x358(%rbp),%rax
  mov    %edx,%edi
  movq   %rax,%xmm0
  call   <average@plt>
  movsd  -0x3a8(%rbp),%xmm1
  subsd  %xmm0,%xmm1
  movsd  -0x3a0(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x340(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x340(%rbp)
  addl   $0x1,-0x360(%rbp)
  addl   $0x1,-0x35c(%rbp)
L41:
  mov    -0x360(%rbp),%eax
  cmp    -0x364(%rbp),%eax
  jl     L35
  mov    -0x364(%rbp),%eax
  sub    $0x1,%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movsd  -0x340(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x338(%rbp)
  mov    -0x390(%rbp),%rdx
  mov    -0x380(%rbp),%rax
  lea    D55(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <fprintf@plt>
  mov    -0x364(%rbp),%edx
  mov    -0x358(%rbp),%rax
  mov    %edx,%edi
  movq   %rax,%xmm0
  call   <average@plt>
  movq   %xmm0,%rax
  mov    -0x380(%rbp),%rdx
  movq   %rax,%xmm0
  lea    D38(%rip),%rax
  mov    %rax,%rsi
  mov    %rdx,%rdi
  mov    $0x1,%eax
  call   <fprintf@plt>
  mov    -0x350(%rbp),%rdx
  mov    -0x380(%rbp),%rax
  movq   %rdx,%xmm0
  lea    D52(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <fprintf@plt>
  mov    -0x348(%rbp),%rdx
  mov    -0x380(%rbp),%rax
  movq   %rdx,%xmm0
  lea    D48(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <fprintf@plt>
  mov    -0x338(%rbp),%rax
  movq   %rax,%xmm0
  call   <stdDev@plt>
  movq   %xmm0,%rax
  mov    -0x380(%rbp),%rdx
  movq   %rax,%xmm0
  lea    D33(%rip),%rax
  mov    %rax,%rsi
  mov    %rdx,%rdi
  mov    $0x1,%eax
  call   <fprintf@plt>
L46:
  mov    -0x378(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  mov    -0x380(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L53
  call   <__stack_chk_fail@plt>
L53:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: label: D7
type: string
name: unpack_data
arguments: label: D49
type: string
name: unpack_data
arguments: label: D31
type: string
name: unpack_data
arguments: label: D75
type: f64
name: unpack_data
arguments: label: D20
type: f32[2]
name: unpack_data
arguments: label: D60
type: string
name: unpack_data
arguments: label: D55
type: string
name: unpack_data
arguments: label: D38
type: string
name: unpack_data
arguments: label: D52
type: string
name: unpack_data
arguments: label: D48
type: string
name: unpack_data
arguments: label: D33
type: string

tool: D7: r

tool: D49: w

tool: D31: Unable to open


tool: D75: 1

tool: {"D20": [0.0,-0.0]}

tool: D60: %lf

tool: D55: Program by Jonathan Buch
File Name: %s



tool: D38: Average: %lf


tool: D52: Maximum: %lf


tool: D48: Minimum: %lf


tool: D33: Standard Deviation: %lf


assistant: ```c
void ShowHeader(FILE *file1, FILE *file2, char inum[], char onum[], double val) {
  file1 = fopen(inum, "r");
  file2 = fopen(onum, "w");
  if (file1 == NULL || file2 == NULL) {
    printf("Unable to open\n");
    exit(-1);
  } else {
    int count = 0;
    double sum = 0;
    double vari[100];
    double final;
    double secValMax = -(1.0 / 0.0);
    double secValMin = (1.0 / 0.0);
    while (!feof(file1)) {
      if (fscanf(file1, "%lf", &val) != 1)
        break;
      secValMax = max(val, secValMax);
      secValMin = min(val, secValMin);
      vari[count] = val;
      sum += val;
      count++;
    }
    double result = 0;
    int i = 0;
    int count2 = 0;
    while (i < count) {
      result += ((vari[count2] - average(sum, count)) * (vari[count2] - average(sum, count)));
      i++;
      count2++;
    }
    final = (result / (count - 1));
    fprintf(file2, "Program by Jonathan Buch\nFile Name: %s\n\n", onum);
    fprintf(file2, "Average: %lf\n", average(sum, count));
    fprintf(file2, "Maximum: %lf\n", secValMax);
    fprintf(file2, "Minimum: %lf\n", secValMin);
    fprintf(file2, "Standard Deviation: %lf\n", stdDev(final));
  }
  fclose(file1);
  fclose(file2);
}
```