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

```asm
<analise_lru>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %edi,%r12d
  push   %rbx
  sub    $0x28,%rsp
  mov    %rsi,-0x50(%rbp)
  mov    %rsp,%rsi
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  movslq %edi,%rax
  lea    0xf(,%rax,4),%rax
  mov    %rax,%rdi
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rdi
  and    $0xfffffffffffffff0,%rcx
  sub    %rdi,%rsi
  cmp    %rsi,%rsp
  je     L15
L13:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L13
L15:
  and    $0xfff,%ecx
  sub    %rcx,%rsp
  test   %rcx,%rcx
  jne    L8
L19:
  mov    %rax,%rcx
  mov    %rsp,%rsi
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rbx
  sub    %rax,%rsi
  and    $0xfffffffffffffff0,%rcx
  cmp    %rsi,%rsp
  je     L158
L160:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L160
L158:
  and    $0xfff,%ecx
  sub    %rcx,%rsp
  test   %rcx,%rcx
  jne    L58
L91:
  movl   $0x0,-0x44(%rbp)
  mov    -0x50(%rbp),%r14
  mov    %rsp,%r13
  xor    %r15d,%r15d
  test   %r12d,%r12d
  jle    L98
  nopl   0x0(%rax)
L2:
  mov    (%r14),%edi
  test   %edi,%edi
  js     L193
  mov    %r15d,%r8d
  mov    %r13,%rcx
  mov    %r12d,%edx
  mov    %rbx,%rsi
  call   <quadro_ausente_lru@plt>
  test   %eax,%eax
  je     L32
  movslq -0x44(%rbp),%rax
  mov    (%r14),%ecx
  add    $0x1,%r15d
  add    $0x4,%r14
  mov    %rax,%rdx
  mov    %ecx,(%rbx,%rax,4)
  add    $0x1,%edx
  mov    %edx,-0x44(%rbp)
  cmp    %edx,%r12d
  jg     L2
L78:
  mov    -0x50(%rbp),%rsi
  movslq %r15d,%rax
  lea    (%rsi,%rax,4),%r14
L98:
  mov    (%r14),%edi
  test   %edi,%edi
  jle    L193
  mov    -0x50(%rbp),%rsi
  movslq %r15d,%rax
  lea    0x4(%rsi,%rax,4),%r9
  jmp    L80
  nopl   0x0(%rax)
L29:
  mov    %r9,%r14
  mov    (%r9),%edi
  add    $0x4,%r9
  add    $0x1,%r15d
  test   %edi,%edi
  jle    L193
L80:
  mov    %r15d,%r8d
  mov    %r13,%rcx
  mov    %r12d,%edx
  mov    %rbx,%rsi
  mov    %r9,-0x50(%rbp)
  call   <quadro_ausente_lru@plt>
  mov    -0x50(%rbp),%r9
  test   %eax,%eax
  je     L29
  mov    %r13,%rdi
  mov    %r12d,%esi
  addl   $0x1,-0x44(%rbp)
  call   <calc_posicao_lru@plt>
  mov    -0x50(%rbp),%r9
  mov    (%r14),%ecx
  cltq
  mov    %r9,%r14
  add    $0x4,%r9
  mov    %r15d,0x0(%r13,%rax,4)
  add    $0x1,%r15d
  mov    %ecx,(%rbx,%rax,4)
  mov    -0x4(%r9),%edi
  test   %edi,%edi
  jg     L80
  nopw   0x0(%rax,%rax,1)
L193:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L157
  mov    -0x44(%rbp),%eax
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
  nopl   0x0(%rax)
L8:
  orq    $0x0,-0x8(%rsp,%rcx,1)
  jmp    L19
  nopl   0x0(%rax,%rax,1)
L32:
  add    $0x1,%r15d
  add    $0x4,%r14
  cmp    -0x44(%rbp),%r12d
  jg     L2
  jmp    L78
L58:
  orq    $0x0,-0x8(%rsp,%rcx,1)
  jmp    L91
L157:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int analise_lru(int numero_de_quadros, int *referencias) {
  int vetor_quadros[numero_de_quadros], vetor_acesso[numero_de_quadros];
  int cont;
  int cont_alloc = 0;
  int page_fault;
  int qtd_page_fault = 0;
  int quadros_alocados = 0;
  for (cont = 0; quadros_alocados < numero_de_quadros; cont++) {
    if (referencias[cont] < 0) {
      return qtd_page_fault;
    }
    page_fault = quadro_ausente_lru(referencias[cont], vetor_quadros, numero_de_quadros, vetor_acesso, cont);
    if (page_fault) {
      vetor_quadros[quadros_alocados] = referencias[cont];
      quadros_alocados++;
      qtd_page_fault++;
    }
  }
  while (referencias[cont] > 0) {
    page_fault = quadro_ausente_lru(referencias[cont], vetor_quadros, numero_de_quadros, vetor_acesso, cont);
    if (page_fault) {
      qtd_page_fault++;
      cont_alloc = calc_posicao_lru(vetor_acesso, numero_de_quadros);
      vetor_quadros[cont_alloc] = referencias[cont];
      vetor_acesso[cont_alloc] = cont;
    }
    cont++;
  }
  return qtd_page_fault;
}
```