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

```asm
<calc_icm_single>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r12
  push   %rbx
  sub    $0x40,%rsp
  mov    %edi,-0x34(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %edx,-0x38(%rbp)
  mov    %rcx,-0x48(%rbp)
  cmpl   $0x0,-0x38(%rbp)
  setg   %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  cmpl   $0x1,-0x34(%rbp)
  jle    L9
  mov    -0x40(%rbp),%rax
  movss  (%rax),%xmm2
  movss  %xmm2,-0x4c(%rbp)
  mov    -0x40(%rbp),%rdx
  mov    -0x34(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <array_sum_f@plt>
  movss  -0x4c(%rbp),%xmm1
  divss  %xmm0,%xmm1
  mov    -0x48(%rbp),%rax
  movss  (%rax),%xmm0
  mulss  %xmm1,%xmm0
  movss  %xmm0,-0x28(%rbp)
  cmpl   $0x1,-0x38(%rbp)
  jle    L25
  mov    -0x48(%rbp),%rdx
  mov    -0x38(%rbp),%eax
  mov    %eax,%esi
  mov    $0x1,%edi
  call   <array_slice_f@plt>
  mov    %rax,-0x20(%rbp)
  movl   $0x1,-0x24(%rbp)
  jmp    L3
L7:
  mov    -0x24(%rbp),%eax
  lea    0x1(%rax),%ecx
  mov    -0x40(%rbp),%rdx
  mov    -0x34(%rbp),%eax
  mov    %eax,%esi
  mov    %ecx,%edi
  call   <array_slice_f@plt>
  mov    %rax,%r12
  mov    -0x24(%rbp),%eax
  lea    0x1(%rax),%edx
  mov    -0x34(%rbp),%eax
  sub    %edx,%eax
  mov    %eax,%ebx
  mov    -0x40(%rbp),%rdx
  mov    -0x24(%rbp),%eax
  mov    %eax,%esi
  mov    $0x0,%edi
  call   <array_slice_f@plt>
  mov    %rax,%rsi
  mov    -0x24(%rbp),%eax
  mov    %r12,%rcx
  mov    %ebx,%edx
  mov    %eax,%edi
  call   <array_append_f@plt>
  mov    %rax,-0x18(%rbp)
  mov    -0x24(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm3
  movss  %xmm3,-0x4c(%rbp)
  mov    -0x40(%rbp),%rdx
  mov    -0x34(%rbp),%eax
  mov    %rdx,%rsi
  mov    %eax,%edi
  call   <array_sum_f@plt>
  movss  -0x4c(%rbp),%xmm3
  divss  %xmm0,%xmm3
  movss  %xmm3,-0x4c(%rbp)
  mov    -0x38(%rbp),%eax
  lea    -0x1(%rax),%esi
  mov    -0x34(%rbp),%eax
  lea    -0x1(%rax),%edi
  mov    -0x20(%rbp),%rdx
  mov    -0x18(%rbp),%rax
  mov    %rdx,%rcx
  mov    %esi,%edx
  mov    %rax,%rsi
  call   <calc_icm_single>
  mulss  -0x4c(%rbp),%xmm0
  movss  -0x28(%rbp),%xmm1
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x28(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  addl   $0x1,-0x24(%rbp)
L3:
  mov    -0x24(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jl     L7
L25:
  movss  -0x28(%rbp),%xmm0
  jmp    L10
L9:
  mov    -0x48(%rbp),%rax
  movss  (%rax),%xmm0
L10:
  add    $0x40,%rsp
  pop    %rbx
  pop    %r12
  pop    %rbp
  ret
```

assistant: ```c
float calc_icm_single(int players, float *player, int prizes, float *prize) {
  assert(prizes > 0);
  if (players > 1) {
    float value = (player[0] / array_sum_f(players, player)) * prize[0];
    if (prizes > 1) {
      float *rec_prize = array_slice_f(1, prizes, prize);
      float *rec_player;
      for (int i = 1; i < players; i++) {
        rec_player = array_append_f(i, array_slice_f(0, i, player), (players - (i + 1)), array_slice_f((i + 1), players, player));
        value += (player[i] / array_sum_f(players, player)) * calc_icm_single(players - 1, rec_player, prizes - 1, rec_prize);
        free(rec_player);
      }
    }
    return value;
  } else
    return prize[0];
}
```