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

```asm
<ex2>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  lea    D29(%rip),%r14
  push   %r13
  push   %r12
  lea    D49(%rip),%r12
  push   %rbx
  lea    -0x40(%rbp),%rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  cs nopw 0x0(%rax,%rax,1)
L58:
  mov    %r12,%rdi
  call   <puts@plt>
  mov    %rbx,%rsi
  mov    %r14,%rdi
  call   <scanf@plt>
  movslq -0x40(%rbp),%rax
  test   %eax,%eax
  jle    L58
  lea    0xf(,%rax,4),%rax
  mov    %rsp,%rcx
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rcx
  and    $0xfffffffffffffff0,%rdx
  cmp    %rcx,%rsp
  je     L80
L21:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rcx,%rsp
  jne    L21
L80:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L92
L29:
  mov    %rsp,%r12
  xor    %ebx,%ebx
  lea    D35(%rip),%r15
  mov    %r12,%r13
  nopl   0x0(%rax)
L90:
  add    $0x1,%ebx
  mov    %r15,%rdi
  xor    %eax,%eax
  mov    %ebx,%esi
  call   <printf@plt>
  mov    %r13,%rsi
  mov    %r14,%rdi
  add    $0x4,%r13
  call   <scanf@plt>
  cmp    -0x40(%rbp),%ebx
  jl     L90
  lea    D40(%rip),%rdi
  call   <puts@plt>
  lea    -0x3c(%rbp),%rsi
  mov    %r14,%rdi
  call   <scanf@plt>
  mov    -0x40(%rbp),%eax
  mov    -0x3c(%rbp),%esi
  test   %eax,%eax
  jle    L118
  xor    %ecx,%ecx
  jmp    L111
  nopl   0x0(%rax)
L10:
  add    $0x4,%r12
  cmp    %eax,%ecx
  je     L118
L111:
  mov    %ecx,%edx
  add    $0x1,%ecx
  cmp    %esi,(%r12)
  jne    L10
  lea    D45(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
L62:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L30
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
  nopw   0x0(%rax,%rax,1)
L118:
  lea    D11(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L62
L92:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L29
L30:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_tag: D29
type_infered: string
name: parse_data
arguments: data_tag: D49
type_infered: string
name: parse_data
arguments: data_tag: D35
type_infered: string
name: parse_data
arguments: data_tag: D40
type_infered: string
name: parse_data
arguments: data_tag: D45
type_infered: string
name: parse_data
arguments: data_tag: D11
type_infered: string

tool: D29: %d

tool: D49: Informe o numero de valores:

tool: D35: Informe o %d valor:


tool: D40: Informe o valor desejado:

tool: D45: o numero %d esta na posicao %d do vetor e foi o %d numero a ser informado


tool: D11: o numero %d nao esta no vetor


assistant: ```c
void ex2() {
  int n, pick, verify = 0, tmp, x;
  do {
    puts("Informe o numero de valores:");
    scanf("%d", &n);
  } while (n <= 0);
  int array[n];
  for (x = 0; x < n; x++) {
    printf("Informe o %d valor:\n", x + 1);
    scanf("%d", &array[x]);
  }
  puts("Informe o valor desejado:");
  scanf("%d", &pick);
  for (x = 0; x < n; x++) {
    if (array[x] == pick) {
      verify = 1;
      break;
    }
  }
  if (verify == 1) {
    printf("o numero %d esta na posicao %d do vetor e foi o %d numero a ser informado\n", pick, x, x + 1);
  } else {
    printf("o numero %d nao esta no vetor\n", pick);
  }
}
```