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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %edi,-0x34(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  lea    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <pipe@plt>
  test   %rax,%rax
  jns    L31
  lea    D24(%rip),%rax
  mov    %rax,%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L31:
  lea    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <pipe@plt>
  test   %rax,%rax
  jns    L12
  lea    D24(%rip),%rax
  mov    %rax,%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L12:
  mov    $0x0,%eax
  call   <fork@plt>
  mov    %rax,-0x20(%rbp)
  cmpq   $0x0,-0x20(%rbp)
  jns    L43
  lea    D84(%rip),%rax
  mov    %rax,%rdi
  call   <perror@plt>
  mov    $0x1,%edi
  call   <exit@plt>
L43:
  cmpq   $0x0,-0x20(%rbp)
  jne    L29
  lea    D37(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    -0x18(%rbp),%eax
  mov    %eax,%edi
  call   <close@plt>
  mov    -0xc(%rbp),%eax
  mov    %eax,%edi
  call   <close@plt>
  lea    D44(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x2c(%rbp),%rax
  mov    %rax,%rsi
  lea    D12(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  lea    D5(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    -0x28(%rbp),%rax
  mov    %rax,%rsi
  lea    D12(%rip),%rax
  mov    %rax,%rdi
  call   <scanf@plt>
  mov    -0x14(%rbp),%eax
  lea    -0x2c(%rbp),%rcx
  mov    $0x4,%edx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <write@plt>
  mov    -0x14(%rbp),%eax
  lea    -0x28(%rbp),%rcx
  mov    $0x4,%edx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <write@plt>
  mov    -0x10(%rbp),%eax
  lea    -0x24(%rbp),%rcx
  mov    $0x4,%edx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <read@plt>
  movss  -0x24(%rbp),%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd %xmm0,%xmm1
  movss  -0x28(%rbp),%xmm0
  cvtss2sd %xmm0,%xmm0
  movss  -0x2c(%rbp),%xmm2
  pxor   %xmm3,%xmm3
  cvtss2sd %xmm2,%xmm3
  movq   %xmm3,%rax
  movapd %xmm1,%xmm2
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  lea    D1(%rip),%rax
  mov    %rax,%rdi
  mov    $0x3,%eax
  call   <printf@plt>
  mov    $0x0,%edi
  call   <exit@plt>
L29:
  lea    D98(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    -0x18(%rbp),%eax
  lea    -0x2c(%rbp),%rcx
  mov    $0x4,%edx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <read@plt>
  mov    -0x18(%rbp),%eax
  lea    -0x28(%rbp),%rcx
  mov    $0x4,%edx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <read@plt>
  movss  -0x28(%rbp),%xmm0
  mov    -0x2c(%rbp),%eax
  movaps %xmm0,%xmm1
  movd   %eax,%xmm0
  call   <powf@plt>
  movd   %xmm0,%eax
  mov    %eax,-0x24(%rbp)
  mov    -0xc(%rbp),%eax
  lea    -0x24(%rbp),%rcx
  mov    $0x4,%edx
  mov    %rcx,%rsi
  mov    %eax,%edi
  call   <write@plt>
  mov    $0x0,%edi
  call   <wait@plt>
  mov    -0x14(%rbp),%eax
  mov    %eax,%edi
  call   <close@plt>
  mov    -0x18(%rbp),%eax
  mov    %eax,%edi
  call   <close@plt>
  mov    -0x10(%rbp),%eax
  mov    %eax,%edi
  call   <close@plt>
  mov    -0xc(%rbp),%eax
  mov    %eax,%edi
  call   <close@plt>
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L41
  call   <__stack_chk_fail@plt>
L41:
  leave
  ret
```

tool_calls: name: read_data
arguments: data_label: D24
type: string
name: read_data
arguments: data_label: D84
type: string
name: read_data
arguments: data_label: D37
type: string
name: read_data
arguments: data_label: D44
type: string
name: read_data
arguments: data_label: D12
type: string
name: read_data
arguments: data_label: D5
type: string
name: read_data
arguments: data_label: D1
type: string
name: read_data
arguments: data_label: D98
type: string

tool: D24: pipe

tool: D84: fork

tool: D37: Process A

tool: D44: a = 

tool: D12: %f

tool: D5: b = 

tool: D1: A: %f ^ %f = %f


tool: D98: Process B

assistant: ```c
int main(int argc, char *argv[]) {
  int a2b[2], b2a[2];
  if (pipe(a2b) < 0) {
    perror("pipe");
    exit(1);
  }
  if (pipe(b2a) < 0) {
    perror("pipe");
    exit(1);
  }
  pid_t pid_a = fork();
  if (pid_a < 0) {
    perror("fork");
    exit(1);
  }
  if (pid_a == 0) {
    float a, b;
    printf("Process A\n");
    close(a2b[0]);
    close(b2a[1]);
    printf("a = ");
    scanf("%f", &a);
    printf("b = ");
    scanf("%f", &b);
    write(a2b[1], &a, sizeof(a));
    write(a2b[1], &b, sizeof(b));
    float result;
    read(b2a[0], &result, sizeof(result));
    printf("A: %f ^ %f = %f\n", a, b, result);
    exit(0);
  }
  printf("Process B\n");
  float a, b;
  read(a2b[0], &a, sizeof(a));
  read(a2b[0], &b, sizeof(b));
  float result = powf(a, b);
  write(b2a[1], &result, sizeof(result));
  wait(0);
  close(a2b[1]);
  close(a2b[0]);
  close(b2a[0]);
  close(b2a[1]);
  return 0;
}
```