user: Please show me the C implementation that matches the assembly code listed below:

```asm
<test_bitmap2_120>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    $0x78,%edi
  call   <bitmap2_size@plt>
  cltq
  add    $0xf,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffffff0,%rcx
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rdx
  sub    %rax,%rdx
L52:
  cmp    %rdx,%rsp
  je     L49
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L52
L49:
  mov    %rcx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L0
  orq    $0x0,-0x8(%rsp,%rax,1)
L0:
  mov    $0x78,%esi
  mov    %rsp,%rdi
  call   <bitmap2_create@plt>
  mov    %rax,%r12
  mov    %rax,%rdi
  call   <bitmap2_len@plt>
  mov    %eax,%r14d
  cmp    $0x80,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  cmp    %r12,%rsp
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    %r12,%rdi
  call   <bitmap2_set_first_free@plt>
  cmp    $0x1,%rax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    $0x0,%esi
  mov    %r12,%rdi
  call   <bitmap2_clear@plt>
  lea    -0x1(%r14),%r15d
  test   %r15d,%r15d
  jle    L23
  mov    %r15d,%r13d
  mov    $0x0,%ebx
L46:
  mov    %ebx,%esi
  mov    %r12,%rdi
  call   <bitmap2_get@plt>
  test   %eax,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    %ebx,%esi
  mov    %r12,%rdi
  call   <bitmap2_set@plt>
  mov    %ebx,%esi
  mov    %r12,%rdi
  call   <bitmap2_get@plt>
  test   %eax,%eax
  setne  %dil
  movzbl %dil,%edi
  call   <assert@plt>
  add    $0x1,%ebx
  cmp    %ebx,%r13d
  jne    L46
L23:
  mov    %r12,%rdi
  call   <bitmap2_set_first_free@plt>
  movslq %r14d,%rdx
  cmp    %rax,%rdx
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    %r12,%rdi
  call   <bitmap2_set_first_free@plt>
  test   %rax,%rax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    $0x0,%esi
  mov    %r12,%rdi
  call   <bitmap2_get@plt>
  cmp    $0x1,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    %r15d,%esi
  mov    %r12,%rdi
  call   <bitmap2_get@plt>
  cmp    $0x1,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    %r15d,%esi
  mov    %r12,%rdi
  call   <bitmap2_clear@plt>
  mov    %r15d,%esi
  mov    %r12,%rdi
  call   <bitmap2_get@plt>
  test   %eax,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    %r14d,%esi
  mov    %r12,%rdi
  call   <bitmap2_get@plt>
  cmp    $0xffffffff,%eax
  sete   %dil
  movzbl %dil,%edi
  call   <assert@plt>
  mov    %r12,%rdi
  call   <bitmap2_debug@plt>
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L27
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L27:
  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);
}
```