user: Please show me the C implementation that matches the assembly code listed below:

```asm
<_s2priv_round>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x50,%rsp
  movss  %xmm0,-0x44(%rbp)
  mov    %rdi,-0x50(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x20(%rbp)
  movss  D68(%rip),%xmm0
  movss  %xmm0,-0x1c(%rbp)
  movss  D64(%rip),%xmm0
  movss  %xmm0,-0x18(%rbp)
  movss  D56(%rip),%xmm0
  movss  %xmm0,-0x14(%rbp)
  pxor   %xmm0,%xmm0
  ucomiss -0x44(%rbp),%xmm0
  jp     L74
  pxor   %xmm0,%xmm0
  ucomiss -0x44(%rbp),%xmm0
  jne    L74
  cmpq   $0x0,-0x50(%rbp)
  je     L61
  mov    -0x50(%rbp),%rax
  movl   $0x2,(%rax)
L61:
  pxor   %xmm0,%xmm0
  jmp    L72
L74:
  movss  -0x44(%rbp),%xmm0
  movss  D9(%rip),%xmm1
  andps  %xmm1,%xmm0
  movss  %xmm0,-0x30(%rbp)
  mov    -0x30(%rbp),%eax
  movd   %eax,%xmm0
  call   <log10f@plt>
  movd   %xmm0,%eax
  mov    %eax,-0x2c(%rbp)
  mov    -0x2c(%rbp),%eax
  movd   %eax,%xmm0
  call   <truncf@plt>
  mov    %eax,-0x38(%rbp)
  pxor   %xmm0,%xmm0
  comiss -0x2c(%rbp),%xmm0
  jbe    L25
  subl   $0x1,-0x38(%rbp)
L25:
  pxor   %xmm0,%xmm0
  cvtsi2ssl -0x38(%rbp),%xmm0
  mov    D78(%rip),%rax
  movaps %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <powf@plt>
  movd   %xmm0,%eax
  mov    %eax,-0x28(%rbp)
  movss  -0x30(%rbp),%xmm0
  divss  -0x28(%rbp),%xmm0
  movss  %xmm0,-0x24(%rbp)
  movl   $0x3,-0x34(%rbp)
  movss  D64(%rip),%xmm0
  comiss -0x24(%rbp),%xmm0
  jb     L3
  movl   $0x2,-0x34(%rbp)
L3:
  movss  D68(%rip),%xmm0
  comiss -0x24(%rbp),%xmm0
  jb     L53
  movl   $0x1,-0x34(%rbp)
L53:
  cmpq   $0x0,-0x50(%rbp)
  je     L83
  mov    -0x50(%rbp),%rax
  movl   $0x5,(%rax)
L83:
  cmpl   $0x1,-0x34(%rbp)
  jne    L16
  cmpq   $0x0,-0x50(%rbp)
  je     L16
  mov    -0x50(%rbp),%rax
  movl   $0x2,(%rax)
L16:
  pxor   %xmm0,%xmm0
  comiss -0x44(%rbp),%xmm0
  jbe    L80
  mov    -0x34(%rbp),%eax
  cltq
  movss  -0x20(%rbp,%rax,4),%xmm0
  mulss  -0x28(%rbp),%xmm0
  movss  D9(%rip),%xmm1
  andps  %xmm1,%xmm0
  movss  D53(%rip),%xmm1
  xorps  %xmm1,%xmm0
  jmp    L72
L80:
  mov    -0x34(%rbp),%eax
  cltq
  movss  -0x20(%rbp,%rax,4),%xmm0
  mulss  -0x28(%rbp),%xmm0
  movss  D9(%rip),%xmm1
  andps  %xmm1,%xmm0
L72:
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L8
  call   <__stack_chk_fail@plt>
L8:
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D68
type_infered: f32
name: parse_data
arguments: data_tag: D64
type_infered: f32
name: parse_data
arguments: data_tag: D56
type_infered: f32
name: parse_data
arguments: data_tag: D9
type_infered: dword
name: parse_data
arguments: data_tag: D78
type_infered: f32[2]
name: parse_data
arguments: data_tag: D53
type_infered: byte[4]

tool: D68: 2

tool: D64: 5

tool: D56: 10

tool: D9: 2147483647

tool: {"D78": [0.0,2.5625]}

tool: {"D53": [0x00,0x00,0x00,0x80]}

assistant: ```c
float _s2priv_round(float x, int *nsub) {
  float nice[] = {0.0, 2.0, 5.0, 10.0};
  if (x == 0.0) {
    if (nsub) {
      *nsub = 2;
    }
    return 0.0;
  }
  float xx = fabsf(x);
  float xlog = log10f(xx);
  int ilog = (int)(truncf(xlog));
  if (xlog < 0) {
    ilog--;
  }
  float pwr = powf(10.0, (float)ilog);
  float frac = xx / pwr;
  int i = 3;
  if (frac <= 5.0) {
    i = 2;
  }
  if (frac <= 2.0) {
    i = 1;
  }
  if (nsub) {
    *nsub = 5;
  }
  if (i == 1) {
    if (nsub) {
      *nsub = 2;
    }
  }
  return (x < 0 ? -fabsf(pwr * nice[i]) : fabsf(pwr * nice[i]));
}
```