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

```asm
<af_filter_design_pfir>:
  endbr64
  mov    %esi,%r9d
  mov    %edi,%eax
  mov    %rdx,%rsi
  xor    %edx,%edx
  div    %r9d
  test   %eax,%eax
  jle    L174
  test   %r9d,%r9d
  je     L174
  test   %rsi,%rsi
  je     L174
  test   %rcx,%rcx
  je     L174
  mov    %r8d,%r11d
  push   %r14
  and    $0x10,%r11d
  and    $0x2,%r8d
  push   %rbx
  jne    L193
  mov    %r9d,%r10d
  xor    %edi,%edi
  movss  D1(%rip),%xmm2
  lea    0x0(,%r10,4),%rbx
  nopl   (%rax)
L121:
  test   %r9d,%r9d
  jle    L112
  mov    %edi,%edx
  lea    0x0(,%rdi,4),%r8
  and    $0x1,%edx
  test   %r11d,%r11d
  jne    L5
  xor    %edx,%edx
  nopl   0x0(%rax)
L187:
  movss  (%rsi,%rdx,4),%xmm1
  mov    (%rcx,%rdx,8),%r14
  add    $0x1,%rdx
  mulss  %xmm0,%xmm1
  movss  %xmm1,(%r14,%r8,1)
  cmp    %rdx,%r10
  jne    L187
L40:
  add    %rbx,%rsi
L112:
  add    $0x1,%rdi
  cmp    %edi,%eax
  jg     L121
  mov    $0xffffffff,%eax
  pop    %rbx
  pop    %r14
  ret
L174:
  mov    $0xffffffff,%eax
  ret
  cs nopw 0x0(%rax,%rax,1)
L5:
  test   %edx,%edx
  mov    $0x0,%edx
  jne    L190
  nopl   0x0(%rax)
L57:
  movss  (%rsi,%rdx,4),%xmm1
  mov    (%rcx,%rdx,8),%r14
  add    $0x1,%rdx
  mulss  %xmm0,%xmm1
  xorps  %xmm2,%xmm1
  movss  %xmm1,(%r14,%r8,1)
  cmp    %rdx,%r10
  jne    L57
  jmp    L40
  nopl   0x0(%rax)
L190:
  movss  (%rsi,%rdx,4),%xmm1
  mov    (%rcx,%rdx,8),%r14
  add    $0x1,%rdx
  mulss  %xmm0,%xmm1
  movss  %xmm1,(%r14,%r8,1)
  cmp    %rdx,%r10
  jne    L190
  jmp    L40
  nopl   0x0(%rax)
L193:
  lea    -0x1(%rax),%r10d
  mov    %r9d,%edi
  movss  D1(%rip),%xmm2
  movslq %r10d,%rdx
  lea    0x0(,%rdi,4),%rbx
  shl    $0x2,%rdx
  xchg   %ax,%ax
L135:
  test   %r9d,%r9d
  jle    L83
  mov    %r10d,%eax
  and    $0x1,%eax
  test   %r11d,%r11d
  jne    L85
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L22:
  movss  (%rsi,%rax,4),%xmm1
  mov    (%rcx,%rax,8),%r8
  add    $0x1,%rax
  mulss  %xmm0,%xmm1
  movss  %xmm1,(%r8,%rdx,1)
  cmp    %rax,%rdi
  jne    L22
L92:
  add    %rbx,%rsi
L83:
  sub    $0x1,%r10d
  sub    $0x4,%rdx
  cmp    $0xffffffff,%r10d
  jne    L135
  mov    $0xffffffff,%eax
  pop    %rbx
  pop    %r14
  ret
  xchg   %ax,%ax
L85:
  test   %eax,%eax
  mov    $0x0,%eax
  jne    L130
  nopl   0x0(%rax)
L119:
  movss  (%rsi,%rax,4),%xmm1
  mov    (%rcx,%rax,8),%r8
  add    $0x1,%rax
  mulss  %xmm0,%xmm1
  movss  %xmm1,(%r8,%rdx,1)
  cmp    %rax,%rdi
  jne    L119
  jmp    L92
  xchg   %ax,%ax
L130:
  movss  (%rsi,%rax,4),%xmm1
  mov    (%rcx,%rax,8),%r8
  add    $0x1,%rax
  mulss  %xmm0,%xmm1
  xorps  %xmm2,%xmm1
  movss  %xmm1,(%r8,%rdx,1)
  cmp    %rax,%rdi
  jne    L130
  jmp    L92
```

tool_calls: name: read_data
arguments: tag: D1
data_type: byte[4]

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

assistant: ```c
int af_filter_design_pfir(unsigned int n, unsigned int k, float *w, float **pw, float g, unsigned int flags) {
  int l = (int)n / k;
  int i;
  int j;
  float t;
  if (l < 1 || k < 1 || !w || !pw)
    return -1;
  if (flags & 0x00000002) {
    for (j = l - 1; j > -1; j--) {
      for (i = 0; i < (int)k; i++) {
        t = g * *w++;
        pw[i][j] = t * ((flags & 0x00000010) ? ((j & 1) ? -1 : 1) : 1);
      }
    }
  } else {
    for (j = 0; j < l; j++) {
      for (i = 0; i < (int)k; i++) {
        t = g * *w++;
        pw[i][j] = t * ((flags & 0x00000010) ? ((j & 1) ? 1 : -1) : 1);
      }
    }
  }
  return -1;
}
```