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

```asm
<test60>:
  endbr64
  push   %r12
  xor    %edi,%edi
  xor    %eax,%eax
  push   %rbp
  push   %rbx
  xor    %ebx,%ebx
  call   <sbrk@plt>
  xor    %edi,%edi
  xor    %eax,%eax
  call   <sbrk@plt>
  movslq %eax,%rbp
  nop
L120:
  mov    %ebx,%edi
  xor    %eax,%eax
  add    $0x7,%ebx
  call   <sbrk@plt>
  cmp    $0x46,%ebx
  jne    L120
  xor    %ebx,%ebx
  nopl   0x0(%rax,%rax,1)
L105:
  mov    %ebx,%edi
  xor    %eax,%eax
  sub    $0x7,%ebx
  call   <sbrk@plt>
  cmp    $0xffffffba,%ebx
  jne    L105
  xor    %edi,%edi
  xor    %eax,%eax
  call   <sbrk@plt>
  cltq
  cmp    %rax,%rbp
  je     L30
  mov    $0x1,%edi
  xor    %eax,%eax
  call   <e@plt>
L30:
  mov    $0x1e,%edi
  xor    %eax,%eax
  call   <sbrk@plt>
  xor    %eax,%eax
  mov    %rbp,%rdi
  call   <brk@plt>
  test   %eax,%eax
  jne    L44
L94:
  xor    %edi,%edi
  xor    %eax,%eax
  call   <sbrk@plt>
  cltq
  cmp    %rax,%rbp
  je     L52
  mov    $0x3,%edi
  xor    %eax,%eax
  call   <e@plt>
L52:
  lea    0x1(%rbp),%rbx
  nopl   0x0(%rax,%rax,1)
L41:
  mov    %rbx,%rdi
  xor    %eax,%eax
  add    $0x1,%rbx
  call   <brk@plt>
  xor    %edi,%edi
  xor    %eax,%eax
  call   <sbrk@plt>
  cltq
  cmp    %rax,%rbp
  je     L41
  sub    %rbp,%rax
  mov    $0xffffffffffffffff,%rdi
  mov    %rax,%rbx
  xor    %eax,%eax
  call   <sbrk@plt>
  xor    %edi,%edi
  xor    %eax,%eax
  call   <sbrk@plt>
  cltq
  cmp    %rax,%rbp
  je     L7
  mov    $0x4,%edi
  xor    %eax,%eax
  call   <e@plt>
L7:
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <brk@plt>
  xor    %edi,%edi
  xor    %eax,%eax
  call   <sbrk@plt>
  cltq
  cmp    %rax,%rbp
  je     L35
  mov    $0x5,%edi
  xor    %eax,%eax
  call   <e@plt>
L35:
  lea    -0x1(%rbp),%r12
L84:
  mov    %r12,%rdi
  xor    %eax,%eax
  sub    $0x1,%r12
  call   <brk@plt>
  xor    %edi,%edi
  xor    %eax,%eax
  call   <sbrk@plt>
  cltq
  cmp    %rax,%rbp
  je     L84
  mov    %rbp,%r12
  mov    $0x1,%edi
  sub    %rax,%r12
  xor    %eax,%eax
  call   <sbrk@plt>
  xor    %edi,%edi
  xor    %eax,%eax
  call   <sbrk@plt>
  cltq
  cmp    %rax,%rbp
  je     L31
  mov    $0x6,%edi
  xor    %eax,%eax
  call   <e@plt>
L31:
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <brk@plt>
  xor    %edi,%edi
  xor    %eax,%eax
  call   <sbrk@plt>
  cltq
  cmp    %rax,%rbp
  je     L51
  mov    $0x8,%edi
  xor    %eax,%eax
  call   <e@plt>
L51:
  cmp    %r12d,%ebx
  je     L40
  mov    $0x9,%edi
  xor    %eax,%eax
  call   <e@plt>
L40:
  lea    (%rbx,%rbx,1),%r12d
  xor    %eax,%eax
  movslq %r12d,%r12
  add    %rbp,%r12
  mov    %r12,%rdi
  call   <brk@plt>
  xor    %edi,%edi
  xor    %eax,%eax
  call   <sbrk@plt>
  cltq
  cmp    %rax,%r12
  je     L12
  mov    $0xa,%edi
  xor    %eax,%eax
  call   <e@plt>
L12:
  lea    (%rbx,%rbx,2),%edi
  xor    %eax,%eax
  lea    (%rbx,%rbx,4),%ebx
  call   <sbrk@plt>
  xor    %edi,%edi
  xor    %eax,%eax
  call   <sbrk@plt>
  movslq %ebx,%rdx
  cltq
  add    %rbp,%rdx
  cmp    %rdx,%rax
  je     L80
  mov    $0xb,%edi
  xor    %eax,%eax
  call   <e@plt>
L80:
  mov    %ebx,%edi
  xor    %eax,%eax
  neg    %edi
  call   <sbrk@plt>
  xor    %edi,%edi
  xor    %eax,%eax
  call   <sbrk@plt>
  cltq
  cmp    %rax,%rbp
  je     L34
  pop    %rbx
  mov    $0xc,%edi
  pop    %rbp
  xor    %eax,%eax
  pop    %r12
  jmp    1090 <e@plt>
  nopl   (%rax)
L34:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
  nopl   (%rax)
L44:
  mov    $0x2,%edi
  xor    %eax,%eax
  call   <e@plt>
  jmp    L94
```

assistant: ```c
test60() {
  char *addr, *addr2, *addr3;
  int i, del, click, click2;
  addr = sbrk(0);
  addr = sbrk(0);
  for (i = 0; i < 10; i++)
    sbrk(7 * i);
  for (i = 0; i < 10; i++)
    sbrk(-7 * i);
  if (sbrk(0) != addr)
    e(1);
  sbrk(30);
  if (brk(addr) != 0)
    e(2);
  if (sbrk(0) != addr)
    e(3);
  del = 0;
  do {
    del++;
    brk(addr + del);
    addr2 = sbrk(0);
  } while (addr2 == addr);
  click = addr2 - addr;
  sbrk((char *)-1);
  if (sbrk(0) != addr)
    e(4);
  brk(addr);
  if (sbrk(0) != addr)
    e(5);
  del = 0;
  do {
    del++;
    brk(addr - del);
    addr3 = sbrk(0);
  } while (addr3 == addr);
  click2 = addr - addr3;
  sbrk((char *)1);
  if (sbrk(0) != addr)
    e(6);
  brk(addr);
  if (sbrk(0) != addr)
    e(8);
  if (click != click2)
    e(9);
  brk(addr + 2 * click);
  if (sbrk(0) != addr + 2 * click)
    e(10);
  sbrk(3 * click);
  if (sbrk(0) != addr + 5 * click)
    e(11);
  sbrk(-5 * click);
  if (sbrk(0) != addr)
    e(12);
}
```