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

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  lea    D54(%rip),%r14
  push   %r13
  lea    D65(%rip),%r13
  push   %r12
  lea    -0x40(%rbp),%r12
  push   %rbx
  sub    $0x18,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  cs nopw 0x0(%rax,%rax,1)
L153:
  mov    %r14,%rdi
  call   <puts@plt>
  mov    %r12,%rsi
  mov    %r13,%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  mov    -0x40(%rbp),%eax
  cmp    $0x64,%eax
  jg     L153
  movslq %eax,%rdx
  mov    %rsp,%rsi
  lea    0xf(,%rdx,4),%rdx
  mov    %rdx,%rcx
  and    $0xfffffffffffff000,%rdx
  sub    %rdx,%rsi
  and    $0xfffffffffffffff0,%rcx
  cmp    %rsi,%rsp
  je     L30
L55:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L55
L30:
  and    $0xfff,%ecx
  sub    %rcx,%rsp
  test   %rcx,%rcx
  jne    L63
L68:
  mov    %rsp,%r14
  xor    %r15d,%r15d
  mov    %r14,%r12
  test   %eax,%eax
  jle    L40
  nopl   (%rax)
L123:
  lea    D15(%rip),%rdi
  add    $0x1,%r15d
  call   <puts@plt>
  mov    %r12,%rsi
  mov    %r13,%rdi
  xor    %eax,%eax
  call   <scanf@plt>
  add    $0x4,%r12
  cmp    %r15d,-0x40(%rbp)
  jg     L123
L40:
  lea    D11(%rip),%rdi
  xor    %r15d,%r15d
  lea    D1(%rip),%r12
  call   <puts@plt>
  mov    %r13,%rdi
  lea    -0x3c(%rbp),%rsi
  xor    %eax,%eax
  call   <scanf@plt>
  mov    -0x40(%rbp),%eax
  lea    D40(%rip),%r13
  test   %eax,%eax
  jg     L169
  jmp    L118
  nopl   0x0(%rax,%rax,1)
L116:
  mov    %r12,%rdi
  add    $0x1,%r15
  call   <puts@plt>
  mov    -0x40(%rbp),%eax
  cmp    %r15d,%eax
  jle    L118
L169:
  mov    -0x3c(%rbp),%esi
  cmp    %esi,(%r14,%r15,4)
  jne    L116
  mov    %r13,%rdi
  xor    %eax,%eax
  mov    %r15d,%ebx
  add    $0x1,%r15
  call   <printf@plt>
  mov    -0x40(%rbp),%eax
  cmp    %r15d,%eax
  jg     L169
L118:
  lea    D47(%rip),%r13
  cmp    %ebx,%eax
  jle    L62
  nopl   0x0(%rax)
L164:
  lea    0x1(%rbx),%edx
  movslq %ebx,%rcx
  movslq %edx,%rdx
  mov    (%r14,%rdx,4),%edx
  mov    %edx,(%r14,%rcx,4)
  cmp    $0x1,%eax
  je     L62
  mov    %r14,%r12
  xor    %ebx,%ebx
  nopl   0x0(%rax,%rax,1)
L168:
  mov    %r12,%rsi
  mov    %r13,%rdi
  xor    %eax,%eax
  add    $0x4,%r12
  call   <printf@plt>
  mov    -0x40(%rbp),%eax
  mov    %ebx,%ecx
  add    $0x1,%ebx
  lea    -0x1(%rax),%edx
  cmp    %ebx,%edx
  jg     L168
  lea    0x2(%rcx),%ebx
  cmp    %ebx,%eax
  jg     L164
  nopw   0x0(%rax,%rax,1)
L62:
  xor    %eax,%eax
  call   <getchar@plt>
  xor    %eax,%eax
  call   <getchar@plt>
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L37
  lea    -0x28(%rbp),%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L63:
  orq    $0x0,-0x8(%rsp,%rcx,1)
  jmp    L68
L37:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: label: D54
type_guessed: string
name: parse_data
arguments: label: D65
type_guessed: string
name: parse_data
arguments: label: D15
type_guessed: string
name: parse_data
arguments: label: D11
type_guessed: string
name: parse_data
arguments: label: D1
type_guessed: string
name: parse_data
arguments: label: D40
type_guessed: string
name: parse_data
arguments: label: D47
type_guessed: string

tool: D54: Inserire k 

tool: D65: %d

tool: D15: Inserire numero nell'array' 

tool: D11: Inserire num 

tool: D1: Numero non trovato 

tool: D40: E' presente un numero all'interno dell'array uguale a %d 


tool: D47: -    %d 


assistant: ```c
main() {
  int k;
  int i;
  int trovato;
  int x;
  int num;
  do {
    printf("Inserire k \n");
    scanf("%d", &k);
  } while (k > 100);
  int numeri[k];
  i = 0;
  while (i < k) {
    printf("Inserire numero nell'array' \n");
    scanf("%d", &numeri[i]);
    i++;
  }
  printf("Inserire num \n");
  scanf("%d", &num);
  i = 0;
  while (i < k) {
    if (numeri[i] == num) {
      printf("E' presente un numero all'interno dell'array uguale a %d \n", num);
      trovato = 1;
      x = i;
    } else {
      printf("Numero non trovato \n");
    }
    i++;
  }
  if (trovato == 1) {
    i = x;
    while (i < k) {
      numeri[i] = numeri[i + 1];
      for (i = 0; i < k - 1; i++) {
        printf("-    %d \n", &numeri[i]);
      }
      i++;
    }
  } else {
    i = 0;
    while (i < k) {
      printf("%d", numeri[i]);
      i++;
    }
  }
  getchar();
  getchar();
}
```