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

```asm
<schreibe_statistik_sammelbilderproblem>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x38,%rsp
  mov    %edi,%ebx
  mov    %esi,-0x54(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  movslq %esi,%r13
  lea    0x0(,%r13,4),%rax
  mov    %rax,-0x60(%rbp)
  add    $0xf,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffffff0,%rcx
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rdx
  sub    %rax,%rdx
L42:
  cmp    %rdx,%rsp
  je     L5
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L42
L5:
  mov    %rcx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L120
  orq    $0x0,-0x8(%rsp,%rax,1)
L120:
  mov    %rsp,%r12
  mov    $0x0,%edx
  mov    -0x54(%rbp),%r14d
  mov    %r14d,%esi
  mov    %r12,%rdi
  call   <initialisiere_int_array@plt>
  mov    $0x0,%eax
  call   <initialisiere_zufallszahlengenerator@plt>
  mov    %ebx,%edx
  mov    %r12,%rsi
  mov    %r14d,%edi
  call   <simulier_einkaeufe@plt>
  mov    %ebx,%edi
  call   <durchschnittlich_benoetigten_kaeufe@plt>
  movsd  %xmm0,-0x48(%rbp)
  lea    0xf(,%r13,8),%rax
  mov    %rax,%rcx
  and    $0xfffffffffffffff0,%rcx
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rdx
  sub    %rax,%rdx
L33:
  cmp    %rdx,%rsp
  je     L76
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L33
L76:
  mov    %rcx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L64
  orq    $0x0,-0x8(%rsp,%rax,1)
L64:
  mov    %rsp,%r14
  sub    $0x8,%rsp
  lea    D0(%rip),%rax
  push   %rax
  lea    D130(%rip),%r9
  lea    D124(%rip),%r8
  lea    D91(%rip),%rcx
  lea    D21(%rip),%rdx
  lea    D31(%rip),%rsi
  lea    D131(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %r14,%rsp
  mov    -0x54(%rbp),%eax
  test   %eax,%eax
  jle    L89
  lea    0x1(%rax),%r15d
  mov    $0x1,%ebx
L77:
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x4(%r12,%rbx,4),%xmm0
  subsd  -0x48(%rbp),%xmm0
  andpd  D20(%rip),%xmm0
  movsd  %xmm0,-0x50(%rbp)
  mov    %ebx,%esi
  mov    %r12,%rdi
  call   <durchschnitt_int_array@plt>
  movapd %xmm0,%xmm2
  movsd  -0x48(%rbp),%xmm1
  movapd %xmm1,%xmm3
  subsd  %xmm0,%xmm3
  andpd  D20(%rip),%xmm3
  movsd  %xmm3,-0x8(%r14,%rbx,8)
  mov    -0x4(%r12,%rbx,4),%edx
  movsd  -0x50(%rbp),%xmm0
  mov    %ebx,%esi
  lea    D35(%rip),%rdi
  mov    $0x4,%eax
  call   <printf@plt>
  add    $0x1,%rbx
  cmp    %rbx,%r15
  jne    L77
L89:
  lea    D67(%rip),%rdi
  call   <puts@plt>
  mov    -0x54(%rbp),%r15d
  mov    %r15d,%esi
  mov    %r12,%rdi
  call   <median_int_array@plt>
  movq   %xmm0,%rbx
  mov    %r15d,%r12d
  mov    %r15d,%esi
  mov    %r14,%rdi
  call   <median_double_array@plt>
  movq   %xmm0,%r15
  mov    %r12d,%esi
  mov    %r14,%rdi
  call   <liefere_min_double_array@plt>
  mov    %rax,%r13
  mov    %r12d,%esi
  mov    %r14,%rdi
  call   <liefere_max_double_array@plt>
  mov    %rax,%r12
  movq   %rbx,%xmm0
  lea    D75(%rip),%rsi
  lea    D194(%rip),%rbx
  mov    %rbx,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  movq   %r15,%xmm0
  lea    D15(%rip),%rsi
  mov    %rbx,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  movsd  (%r12),%xmm0
  lea    D125(%rip),%rsi
  mov    %rbx,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  movsd  0x0(%r13),%xmm0
  lea    D37(%rip),%rsi
  mov    %rbx,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    -0x60(%rbp),%rax
  add    $0xf,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffffff0,%rcx
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rdx
  sub    %rax,%rdx
L90:
  cmp    %rdx,%rsp
  je     L82
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L90
L82:
  mov    %rcx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L23
  orq    $0x0,-0x8(%rsp,%rax,1)
L23:
  mov    %rsp,%r13
  mov    $0x0,%edx
  mov    -0x54(%rbp),%esi
  mov    %r13,%rdi
  call   <initialisiere_int_array@plt>
  mov    $0x3,%r12d
  movsd  D44(%rip),%xmm5
  movsd  %xmm5,-0x48(%rbp)
  lea    D135(%rip),%r15
L55:
  movsd  -0x48(%rbp),%xmm0
  mov    %r13,%rdx
  mov    -0x54(%rbp),%esi
  mov    %r14,%rdi
  call   <indizes_kleiner_als_double_array@plt>
  mov    %eax,%ebx
  movsd  -0x48(%rbp),%xmm0
  mov    %r15,%rsi
  lea    D9(%rip),%rdi
  mov    $0x1,%eax
  call   <printf@plt>
  mov    $0x5b,%edi
  call   <putchar@plt>
  mov    $0x0,%r8d
  lea    D72(%rip),%rcx
  mov    $0x0,%edx
  mov    %ebx,%esi
  mov    %r13,%rdi
  call   <schreibe_int_array@plt>
  mov    $0x5d,%edi
  call   <putchar@plt>
  movsd  -0x48(%rbp),%xmm4
  subsd  D54(%rip),%xmm4
  movsd  %xmm4,-0x48(%rbp)
  sub    $0x1,%r12d
  jne    L55
  mov    $0xa,%edi
  call   <putchar@plt>
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L129
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L129:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: label: D0
data_type: string
name: unpack_data
arguments: label: D130
data_type: string
name: unpack_data
arguments: label: D124
data_type: string
name: unpack_data
arguments: label: D91
data_type: string
name: unpack_data
arguments: label: D21
data_type: string
name: unpack_data
arguments: label: D31
data_type: string
name: unpack_data
arguments: label: D131
data_type: string
name: unpack_data
arguments: label: D20
data_type: qword[2]
name: unpack_data
arguments: label: D35
data_type: string
name: unpack_data
arguments: label: D67
data_type: string
name: unpack_data
arguments: label: D75
data_type: string
name: unpack_data
arguments: label: D194
data_type: string
name: unpack_data
arguments: label: D15
data_type: string
name: unpack_data
arguments: label: D125
data_type: string
name: unpack_data
arguments: label: D37
data_type: string
name: unpack_data
arguments: label: D44
data_type: f64
name: unpack_data
arguments: label: D135
data_type: string
name: unpack_data
arguments: label: D9
data_type: string
name: unpack_data
arguments: label: D72
data_type: string
name: unpack_data
arguments: label: D54
data_type: f64

tool: D0: AM

tool: D130: M

tool: D124: E

tool: D91: AE

tool: D21: KK

tool: D31: KNR

tool: D131: 
%5s %5s %15s %15s %15s %15s


tool: {"D20": [0x7fffffffffffffff,0x0000000000000000]}

tool: D35: 
%7d %5d %15lf %15lf %15lf %15lf

tool: D67: 


tool: D75: Median der Anzahl Kaeufe: 

tool: D194: %-25s %10lf


tool: D15: Median der Werte AM: 

tool: D125: groesster der Werte AM: 

tool: D37: kleinster der Werte AM: 

tool: D44: 1

tool: D135: Indizes der Werte AM < 

tool: D9: 
%-s %4.1lf :	

tool: D72: , 

tool: D54: 0.2

assistant: ```c
void schreibe_statistik_sammelbilderproblem(int sammelbilder, int kunden) {
  int anzahl_kaeufe_pro_kunde[kunden];
  initialisiere_int_array(anzahl_kaeufe_pro_kunde, kunden, 0);
  initialisiere_zufallszahlengenerator();
  simulier_einkaeufe(kunden, anzahl_kaeufe_pro_kunde, sammelbilder);
  double durchschnitt_versuche = durchschnitt_versuche = durchschnittlich_benoetigten_kaeufe(sammelbilder);
  double abweichung_versuche = 0.0;
  double durchschnitt_kaeufe = 0.0;
  double abweichung_kaeufe[kunden];
  printf("\n%5s %5s %15s %15s %15s %15s\n", "KNR", "KK", "AE", "E", "M", "AM");
  for (int i = 0; i < kunden; i++) {
    abweichung_versuche = fabs((double)anzahl_kaeufe_pro_kunde[i] - durchschnitt_versuche);
    durchschnitt_kaeufe = durchschnitt_int_array(anzahl_kaeufe_pro_kunde, i + 1);
    abweichung_kaeufe[i] = fabs(durchschnitt_versuche - durchschnitt_kaeufe);
    printf("\n%7d %5d %15lf %15lf %15lf %15lf", i + 1, anzahl_kaeufe_pro_kunde[i], abweichung_versuche, durchschnitt_versuche, durchschnitt_kaeufe, abweichung_kaeufe[i]);
  }
  printf("\n\n");
  double median_kaeufe = median_int_array(anzahl_kaeufe_pro_kunde, kunden);
  double median_am = median_double_array(abweichung_kaeufe, kunden);
  double *min = liefere_min_double_array(abweichung_kaeufe, kunden);
  double *max = liefere_max_double_array(abweichung_kaeufe, kunden);
  printf("%-25s %10lf\n", "Median der Anzahl Kaeufe: ", median_kaeufe);
  printf("%-25s %10lf\n", "Median der Werte AM: ", median_am);
  printf("%-25s %10lf\n", "groesster der Werte AM: ", *max);
  printf("%-25s %10lf\n", "kleinster der Werte AM: ", *min);
  int indizes_array[kunden];
  int anzahl_indizes = 0;
  initialisiere_int_array(indizes_array, kunden, 0);
  for (double i = 1.0; i > 0.6; i = i - 0.2) {
    anzahl_indizes = indizes_kleiner_als_double_array(abweichung_kaeufe, kunden, indizes_array, i);
    printf("\n%-s %4.1lf :\t", "Indizes der Werte AM < ", i);
    putchar('[');
    schreibe_int_array(indizes_array, anzahl_indizes, 0, ", ", 0);
    putchar(']');
  }
  putchar('\n');
}
```