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

```asm
<test_bitmap2_120>:
  endbr64
  push   %rbp
  mov    $0x78,%edi
  mov    %rsp,%rbp
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x28(%rbp)
  xor    %eax,%eax
  call   <bitmap2_size@plt>
  mov    %rsp,%rcx
  cltq
  add    $0xf,%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L14
L69:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L69
L14:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L60
L49:
  mov    $0x78,%esi
  mov    %rsp,%rdi
  call   <bitmap2_create@plt>
  mov    %rax,%rdi
  mov    %rax,%r12
  call   <bitmap2_len@plt>
  xor    %edi,%edi
  cmp    $0x80,%eax
  mov    %eax,%r14d
  sete   %dil
  lea    -0x1(%r14),%r13d
  call   <assert@plt>
  xor    %edi,%edi
  cmp    %r12,%rsp
  sete   %dil
  call   <assert@plt>
  mov    %r12,%rdi
  call   <bitmap2_set_first_free@plt>
  xor    %edi,%edi
  cmp    $0x1,%rax
  sete   %dil
  call   <assert@plt>
  xor    %esi,%esi
  mov    %r12,%rdi
  call   <bitmap2_clear@plt>
  test   %r13d,%r13d
  jle    L36
  xor    %ebx,%ebx
  cs nopw 0x0(%rax,%rax,1)
L62:
  mov    %ebx,%esi
  mov    %r12,%rdi
  call   <bitmap2_get@plt>
  xor    %edi,%edi
  test   %eax,%eax
  sete   %dil
  call   <assert@plt>
  mov    %ebx,%esi
  mov    %r12,%rdi
  call   <bitmap2_set@plt>
  mov    %ebx,%esi
  mov    %r12,%rdi
  call   <bitmap2_get@plt>
  xor    %edi,%edi
  test   %eax,%eax
  setne  %dil
  add    $0x1,%ebx
  call   <assert@plt>
  cmp    %r13d,%ebx
  jne    L62
L36:
  mov    %r12,%rdi
  call   <bitmap2_set_first_free@plt>
  movslq %r14d,%rdx
  xor    %edi,%edi
  cmp    %rax,%rdx
  sete   %dil
  call   <assert@plt>
  mov    %r12,%rdi
  call   <bitmap2_set_first_free@plt>
  xor    %edi,%edi
  test   %rax,%rax
  sete   %dil
  call   <assert@plt>
  xor    %esi,%esi
  mov    %r12,%rdi
  call   <bitmap2_get@plt>
  xor    %edi,%edi
  cmp    $0x1,%eax
  sete   %dil
  call   <assert@plt>
  mov    %r13d,%esi
  mov    %r12,%rdi
  call   <bitmap2_get@plt>
  xor    %edi,%edi
  cmp    $0x1,%eax
  sete   %dil
  call   <assert@plt>
  mov    %r13d,%esi
  mov    %r12,%rdi
  call   <bitmap2_clear@plt>
  mov    %r13d,%esi
  mov    %r12,%rdi
  call   <bitmap2_get@plt>
  xor    %edi,%edi
  test   %eax,%eax
  sete   %dil
  call   <assert@plt>
  mov    %r14d,%esi
  mov    %r12,%rdi
  call   <bitmap2_get@plt>
  xor    %edi,%edi
  cmp    $0xffffffff,%eax
  sete   %dil
  call   <assert@plt>
  mov    %r12,%rdi
  call   <bitmap2_debug@plt>
  mov    -0x28(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L43
  lea    -0x20(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %rbp
  ret
L60:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L49
L43:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
void test_bitmap2_120() {
  int n = 120;
  char bm_storage[bitmap2_size(n)];
  struct bitmap2 *bm_s = (struct bitmap2 *)&bm_storage;
  struct bitmap2 *bm = bitmap2_create(bm_s, n);
  n = bitmap2_len(bm);
  assert(n == 128);
  assert(bm == bm_s);
  size_t idx = bitmap2_set_first_free(bm);
  assert(idx == 1);
  bitmap2_clear(bm, 0);
  for (int i = 0; i < n - 1; ++i) {
    int b = bitmap2_get(bm, i);
    assert(b == 0);
    bitmap2_set(bm, i);
    b = bitmap2_get(bm, i);
    assert(b != 0);
  }
  idx = bitmap2_set_first_free(bm);
  assert(idx == (size_t)n);
  idx = bitmap2_set_first_free(bm);
  assert(idx == 0);
  int b = bitmap2_get(bm, 0);
  assert(b == 1);
  b = bitmap2_get(bm, n - 1);
  assert(b == 1);
  bitmap2_clear(bm, n - 1);
  b = bitmap2_get(bm, n - 1);
  assert(b == 0);
  b = bitmap2_get(bm, n);
  assert(b == -1);
  bitmap2_debug(bm);
}
```