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

```asm
<data_organizational_parameters_valid>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x24(%rbp)
  mov    %esi,-0x28(%rbp)
  mov    %edx,-0x2c(%rbp)
  mov    %ecx,-0x30(%rbp)
  mov    %r8d,-0x34(%rbp)
  movsd  %xmm0,-0x40(%rbp)
  mov    %r9d,%eax
  movsd  %xmm1,-0x48(%rbp)
  mov    %al,-0x38(%rbp)
  movl   $0x0,-0x20(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movl   $0x0,-0x1c(%rbp)
  movl   $0x0,-0x18(%rbp)
  movl   $0x0,-0x14(%rbp)
  movl   $0x0,-0x10(%rbp)
  movl   $0x0,-0xc(%rbp)
  cmpb   $0x0,-0x38(%rbp)
  jne    L99
  mov    -0x30(%rbp),%eax
  imul   -0x34(%rbp),%eax
  cmp    $0x100,%eax
  jle    L107
  mov    $0x0,%eax
  jmp    L51
L107:
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x2c(%rbp),%xmm0
  mov    -0x24(%rbp),%eax
  imul   -0x28(%rbp),%eax
  imul   -0x34(%rbp),%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movapd %xmm1,%xmm2
  mulsd  -0x40(%rbp),%xmm2
  movapd %xmm0,%xmm1
  divsd  %xmm2,%xmm1
  pxor   %xmm0,%xmm0
  comisd %xmm1,%xmm0
  jb     L8
  mov    $0x0,%eax
  jmp    L51
L8:
  mov    -0x24(%rbp),%eax
  imul   -0x28(%rbp),%eax
  shl    $0x3,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  -0x40(%rbp),%xmm0
  pxor   %xmm2,%xmm2
  cvtsi2sdl -0x30(%rbp),%xmm2
  movapd %xmm0,%xmm1
  divsd  %xmm2,%xmm1
  pxor   %xmm0,%xmm0
  comisd %xmm1,%xmm0
  jb     L20
  mov    $0x0,%eax
  jmp    L51
L20:
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x2c(%rbp),%xmm0
  mov    -0x24(%rbp),%eax
  imul   -0x28(%rbp),%eax
  imul   -0x34(%rbp),%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  movapd %xmm1,%xmm2
  mulsd  -0x40(%rbp),%xmm2
  movapd %xmm0,%xmm1
  divsd  %xmm2,%xmm1
  movsd  D18(%rip),%xmm0
  addsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,-0x18(%rbp)
  cmpl   $0x7,-0x18(%rbp)
  jg     L156
  mov    $0x0,%eax
  jmp    L51
L156:
  cmpl   $0x800,-0x18(%rbp)
  jle    L32
  mov    $0x0,%eax
  jmp    L51
L32:
  mov    -0x24(%rbp),%eax
  imul   -0x28(%rbp),%eax
  shl    $0x3,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  mulsd  -0x40(%rbp),%xmm0
  pxor   %xmm2,%xmm2
  cvtsi2sdl -0x30(%rbp),%xmm2
  movapd %xmm0,%xmm1
  divsd  %xmm2,%xmm1
  movsd  D18(%rip),%xmm0
  addsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%eax
  mov    %eax,-0x14(%rbp)
  cmpl   $0xf,-0x14(%rbp)
  jg     L100
  mov    $0x0,%eax
  jmp    L51
L100:
  cmpl   $0x200,-0x14(%rbp)
  jle    L14
  mov    $0x0,%eax
  jmp    L51
L99:
  mov    -0x24(%rbp),%eax
  imul   -0x34(%rbp),%eax
  lea    (%rax,%rax,1),%ecx
  mov    -0x2c(%rbp),%eax
  cltd
  idiv   %ecx
  test   %eax,%eax
  jg     L112
  mov    $0x0,%eax
  jmp    L51
L112:
  cmpl   $0x20,-0x34(%rbp)
  jle    L14
  mov    $0x0,%eax
  jmp    L51
L14:
  mov    $0x1,%eax
L51:
  pop    %rbp
  ret
```

tool_calls: name: retrieve_data
arguments: tag: D18
datatype: f64

tool: D18: 0.5

assistant: ```c
int data_organizational_parameters_valid(int B, int A, int C, int Ndwl, int Ndbl, double Nspd, char assoc, double NSubbanks) {
  int temp = 0;
  double before = 0.0;
  int tagbits = 0;
  int data_rows = 0, data_columns = 0, tag_rows = 0, tag_columns = 0;
  if (assoc == 0) {
    if (Ndwl * Ndbl > 256) {
      return (0);
    }
    if (C / (B * A * Ndbl * Nspd) <= 0) {
      return (0);
    }
    if ((8 * B * A * Nspd / Ndwl) <= 0) {
      return (0);
    }
    data_rows = (int)(C / (B * A * Ndbl * Nspd) + 0.5);
    if (8 > data_rows) {
      return (0);
    }
    if (2048 < data_rows) {
      return (0);
    }
    data_columns = (int)(8 * B * A * Nspd / Ndwl + 0.5);
    if (16 > data_columns) {
      return (0);
    }
    if (512 < data_columns) {
      return (0);
    }
  } else {
    if (C / (2 * B * Ndbl) <= 0) {
      return (0);
    }
    if (Ndbl > 32) {
      return (0);
    }
  }
  return (1);
}
```