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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    $0x4,%edi
  call   <bam_new@plt>
  mov    %rax,-0x8(%rbp)
  movl   $0x0,-0x14(%rbp)
  movl   $0x0,-0x10(%rbp)
  movl   $0x0,-0xc(%rbp)
  mov    -0x8(%rbp),%rax
  mov    $0x1,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <bam_add_edge@plt>
  mov    -0x8(%rbp),%rax
  mov    $0x2,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <bam_add_edge@plt>
  mov    -0x8(%rbp),%rax
  mov    $0x3,%edx
  mov    $0x2,%esi
  mov    %rax,%rdi
  call   <bam_add_edge@plt>
  mov    -0x8(%rbp),%rax
  mov    $0x1,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <bam_test_edge@plt>
  test   %rax,%rax
  je     L23
  lea    D12(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
L23:
  mov    -0x8(%rbp),%rax
  mov    $0x0,%edx
  mov    $0x1,%esi
  mov    %rax,%rdi
  call   <bam_test_edge@plt>
  test   %rax,%rax
  jne    L44
  lea    D24(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
L44:
  mov    -0x8(%rbp),%rax
  mov    $0x1,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <bam_remove_edge@plt>
  mov    -0x8(%rbp),%rax
  mov    $0x1,%edx
  mov    $0x0,%esi
  mov    %rax,%rdi
  call   <bam_test_edge@plt>
  test   %rax,%rax
  jne    L32
  lea    D48(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
L32:
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <bam_size@plt>
  mov    %eax,-0xc(%rbp)
  lea    D3(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  movl   $0x0,-0x14(%rbp)
  jmp    L73
L21:
  movl   $0x0,-0x10(%rbp)
  jmp    L60
L78:
  mov    -0x10(%rbp),%edx
  mov    -0x14(%rbp),%ecx
  mov    -0x8(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <bam_test_edge@plt>
  test   %rax,%rax
  je     L65
  mov    -0x10(%rbp),%edx
  mov    -0x14(%rbp),%eax
  mov    %eax,%esi
  lea    D20(%rip),%rax
  mov    %rax,%rdi
  call   <printf@plt>
L65:
  addl   $0x1,-0x10(%rbp)
L60:
  mov    -0x10(%rbp),%eax
  cmp    -0xc(%rbp),%eax
  jl     L78
  addl   $0x1,-0x14(%rbp)
L73:
  mov    -0x14(%rbp),%eax
  cmp    -0xc(%rbp),%eax
  jl     L21
  mov    -0x8(%rbp),%rax
  mov    $0x1,%esi
  mov    %rax,%rdi
  call   <bam_destroy@plt>
  mov    $0x0,%eax
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D12
datatype: string
name: disassemble_data
arguments: data_label: D24
datatype: string
name: disassemble_data
arguments: data_label: D48
datatype: string
name: disassemble_data
arguments: data_label: D3
datatype: string
name: disassemble_data
arguments: data_label: D20
datatype: string

tool: D12: edge exists from 0 to 1

tool: D24: no edge exists from 1 to 0

tool: D48: removed edge from 0 to 1

tool: D3: 
list of all edges

tool: D20: %d -> %d


assistant: ```c
int main(void) {
  struct bitwise_adj_mat *bam = bam_new(4);
  int i = 0;
  int j = 0;
  int n = 0;
  bam_add_edge(bam, 0, 1);
  bam_add_edge(bam, 0, 2);
  bam_add_edge(bam, 2, 3);
  if (bam_test_edge(bam, 0, 1)) {
    puts("edge exists from 0 to 1");
  }
  if (!bam_test_edge(bam, 1, 0)) {
    puts("no edge exists from 1 to 0");
  }
  bam_remove_edge(bam, 0, 1);
  if (!bam_test_edge(bam, 0, 1)) {
    puts("removed edge from 0 to 1");
  }
  n = bam_size(bam);
  puts("\nlist of all edges");
  for (i = 0; i < n; ++i) {
    for (j = 0; j < n; ++j) {
      if (bam_test_edge(bam, i, j)) {
        printf("%d -> %d\n", i, j);
      }
    }
  }
  bam_destroy(bam, 1);
  return 0;
}
```