user: What would the C source look like for the assembly code provided here:

```asm
<PERM>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %esi,%r12d
  push   %rbp
  mov    %edi,%ebp
  mov    %esi,%edi
  push   %rbx
  or     %edx,%edi
  mov    %edx,%ebx
  or     %ebp,%edi
  not    %edi
  sub    $0x58,%rsp
  shr    $0x1f,%edi
  mov    %fs:0x28,%rax
  mov    %rax,0x48(%rsp)
  xor    %eax,%eax
  lea    0x34(%rsp),%r14
  lea    0x38(%rsp),%r15
  call   <assert@plt>
  mov    %ebp,%eax
  mov    %ebp,%ecx
  mov    %ebp,%edx
  sar    %eax
  sar    $0x2,%ecx
  movd   %ebp,%xmm1
  mov    %r12d,%edi
  sar    $0x3,%edx
  movd   %eax,%xmm5
  movd   %ecx,%xmm0
  mov    %ebx,%eax
  movd   %edx,%xmm4
  punpckldq %xmm5,%xmm1
  sar    %eax
  mov    %ebx,%ecx
  punpckldq %xmm4,%xmm0
  mov    %ebx,%edx
  sar    $0x3,%ecx
  mov    %r14,%rsi
  punpcklqdq %xmm0,%xmm1
  sar    $0x4,%edx
  movd   %ecx,%xmm2
  mov    %ebx,%ecx
  sar    $0x7,%ecx
  movd   %edx,%xmm6
  mov    %ebx,%edx
  sar    $0x4,%ebp
  punpckldq %xmm6,%xmm2
  sar    $0x8,%edx
  and    $0x1,%ebp
  lea    0x3c(%rsp),%r13
  movdqa D0(%rip),%xmm0
  movd   %edx,%xmm4
  sar    $0x4,%edi
  mov    %r15,%rdx
  and    $0x1,%edi
  mov    %ebp,0x40(%rsp)
  lea    0x30(%rsp),%rbp
  pand   %xmm0,%xmm1
  movaps %xmm1,0x30(%rsp)
  movd   %eax,%xmm1
  mov    %ebx,%eax
  sar    $0x2,%eax
  movd   %eax,%xmm7
  mov    %ebx,%eax
  punpckldq %xmm7,%xmm1
  sar    $0x5,%eax
  punpcklqdq %xmm2,%xmm1
  movd   %ecx,%xmm2
  pand   %xmm0,%xmm1
  punpckldq %xmm4,%xmm2
  movaps %xmm1,0x10(%rsp)
  movd   %eax,%xmm1
  mov    %ebx,%eax
  sar    $0x6,%eax
  movd   %eax,%xmm5
  punpckldq %xmm5,%xmm1
  punpcklqdq %xmm2,%xmm1
  movdqa %xmm1,%xmm3
  pand   %xmm0,%xmm3
  movaps %xmm3,(%rsp)
  call   <BFLY@plt>
  mov    %r12d,%edi
  mov    %r13,%rdx
  mov    %rbp,%rsi
  sar    $0x3,%edi
  and    $0x1,%edi
  call   <BFLY@plt>
  mov    %r12d,%edi
  mov    %r13,%rdx
  mov    %r14,%rsi
  sar    $0x2,%edi
  mov    %r12d,0x2c(%rsp)
  lea    0x40(%rsp),%r12
  and    $0x1,%edi
  call   <BFLY@plt>
  mov    0x2c(%rsp),%edi
  mov    %r12,%rdx
  mov    %r15,%rsi
  sar    %edi
  and    $0x1,%edi
  call   <BFLY@plt>
  mov    0x2c(%rsp),%edi
  mov    %r13,%rdx
  mov    %rbp,%rsi
  and    $0x1,%edi
  call   <BFLY@plt>
  mov    %r12,%rdx
  mov    %r14,%rsi
  and    $0x1,%ebx
  pshufd $0xff,(%rsp),%xmm0
  movd   %xmm0,%edi
  call   <BFLY@plt>
  movdqa (%rsp),%xmm3
  mov    %r12,%rdx
  mov    %r13,%rsi
  movdqa %xmm3,%xmm0
  punpckhdq %xmm3,%xmm0
  movd   %xmm0,%edi
  call   <BFLY@plt>
  pshufd $0x55,(%rsp),%xmm0
  mov    %r15,%rdx
  movd   %xmm0,%edi
  mov    %rbp,%rsi
  call   <BFLY@plt>
  mov    (%rsp),%edi
  mov    %r13,%rdx
  mov    %r14,%rsi
  call   <BFLY@plt>
  pshufd $0xff,0x10(%rsp),%xmm0
  mov    %r12,%rdx
  movd   %xmm0,%edi
  mov    %rbp,%rsi
  call   <BFLY@plt>
  movdqa 0x10(%rsp),%xmm1
  mov    %r12,%rdx
  mov    %r13,%rsi
  movdqa %xmm1,%xmm0
  punpckhdq %xmm1,%xmm0
  movd   %xmm0,%edi
  call   <BFLY@plt>
  pshufd $0x55,0x10(%rsp),%xmm0
  mov    %r15,%rdx
  movd   %xmm0,%edi
  mov    %r14,%rsi
  call   <BFLY@plt>
  mov    0x10(%rsp),%edi
  mov    %r13,%rdx
  mov    %r15,%rsi
  call   <BFLY@plt>
  mov    %r14,%rdx
  mov    %ebx,%edi
  mov    %rbp,%rsi
  call   <BFLY@plt>
  mov    0x34(%rsp),%eax
  mov    0x3c(%rsp),%ecx
  lea    (%rax,%rax,1),%edx
  mov    0x38(%rsp),%eax
  and    $0x2,%edx
  add    0x30(%rsp),%edx
  shl    $0x2,%eax
  and    $0x4,%eax
  add    %edx,%eax
  lea    0x0(,%rcx,8),%edx
  and    $0x8,%edx
  add    %eax,%edx
  mov    0x40(%rsp),%eax
  shl    $0x4,%eax
  and    $0x10,%eax
  add    %edx,%eax
  mov    0x48(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L4
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L4:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D0
data_type: byte[16]

tool: {"D0": [0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00]}

assistant: ```c
int PERM(int ip1, int ip2, int ip3) {
  int z[5], p[14], op;
  int i;
  assert(ip1 >= 0 && ip2 >= 0 && ip3 >= 0);
  for (i = 0; i < 5; i++)
    z[i] = (ip1 >> i) & 0x1;
  for (i = 0; i < 14; i++) {
    if (i < 9)
      p[i] = ((ip3 >> i) & 0x1);
    else
      p[i] = (ip2 >> (i - 9)) & 0x1;
  }
  BFLY(p[13], &z[1], &z[2]);
  BFLY(p[12], &z[0], &z[3]);
  BFLY(p[11], &z[1], &z[3]);
  BFLY(p[10], &z[2], &z[4]);
  BFLY(p[9], &z[0], &z[3]);
  BFLY(p[8], &z[1], &z[4]);
  BFLY(p[7], &z[3], &z[4]);
  BFLY(p[6], &z[0], &z[2]);
  BFLY(p[5], &z[1], &z[3]);
  BFLY(p[4], &z[0], &z[4]);
  BFLY(p[3], &z[3], &z[4]);
  BFLY(p[2], &z[1], &z[2]);
  BFLY(p[1], &z[2], &z[3]);
  BFLY(p[0], &z[0], &z[1]);
  op = z[0];
  op = op + ((z[1] << 1) & 0x02);
  op = op + ((z[2] << 2) & 0x04);
  op = op + ((z[3] << 3) & 0x08);
  op = op + ((z[4] << 4) & 0x10);
  return (op);
}
```