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

```asm
<submenu>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rdi,0x10(%rsp)
  mov    %rsi,%rbp
  mov    %edx,0x18(%rsp)
  mov    %ecx,0x1c(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x28(%rsp)
  xor    %eax,%eax
  lea    D58(%rip),%rdi
  call   <puts@plt>
  lea    D0(%rip),%rdi
  call   <puts@plt>
  lea    D14(%rip),%rdi
  call   <puts@plt>
  lea    D25(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  lea    0x24(%rsp),%rsi
  lea    D45(%rip),%rdi
  call   <scanf@plt>
  cmpl   $0x1,0x24(%rsp)
  je     L56
L50:
  cmpl   $0x2,0x24(%rsp)
  je     L91
L87:
  cmpl   $0x0,0x24(%rsp)
  je     L13
L19:
  mov    0x28(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L74
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L56:
  cmpl   $0x0,0x18(%rsp)
  jle    L19
  mov    0x10(%rsp),%r14
  movl   $0x0,0xc(%rsp)
  mov    $0x0,%r15d
  lea    D59(%rip),%r13
L75:
  mov    %r14,%r12
  add    $0x1,%r15d
  mov    (%r14),%edx
  mov    %r15d,%esi
  lea    D43(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  cmpl   $0x0,(%r14)
  jle    L108
  mov    0xc(%rsp),%eax
  lea    0x1(%rax),%ebx
  movslq %ebx,%rbx
L15:
  mov    -0x4(%rbp,%rbx,4),%esi
  mov    %r13,%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    %ebx,%edx
  add    $0x1,%rbx
  mov    %ebx,%eax
  sub    0xc(%rsp),%eax
  sub    $0x1,%eax
  cmp    %eax,(%r12)
  jg     L15
  mov    %edx,0xc(%rsp)
L108:
  lea    D5(%rip),%rdi
  call   <puts@plt>
  add    $0x4,%r14
  cmp    0x18(%rsp),%r15d
  jne    L75
  jmp    L50
L91:
  mov    0x1c(%rsp),%ecx
  mov    0x18(%rsp),%edx
  mov    %rbp,%rsi
  mov    0x10(%rsp),%rdi
  call   <euleriano@plt>
  jmp    L87
L13:
  mov    $0x0,%eax
  call   <limpa@plt>
  jmp    L19
L74:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: data_label: D58
type: string
name: unpack_data
arguments: data_label: D0
type: string
name: unpack_data
arguments: data_label: D14
type: string
name: unpack_data
arguments: data_label: D25
type: string
name: unpack_data
arguments: data_label: D45
type: string
name: unpack_data
arguments: data_label: D59
type: string
name: unpack_data
arguments: data_label: D43
type: string
name: unpack_data
arguments: data_label: D5
type: string

tool: D58: Digite 1 para mostrar o grafo


tool: D0: Digite 2 para encontrar um caminho euleriano


tool: D14: Digite 0 para retornar ao menu anterior


tool: D25: ::>

tool: D45: %i

tool: D59: %i 

tool: D43: Indice:%i Grau: %i Vizinhos: 

tool: D5: 


assistant: ```c
void submenu(int *vert, int *adj, int cont, int cont2) {
  int opcao, i, j, k = 0;
  puts("Digite 1 para mostrar o grafo\n");
  puts("Digite 2 para encontrar um caminho euleriano\n");
  puts("Digite 0 para retornar ao menu anterior\n");
  printf("::>");
  scanf("%i", &opcao);
  if (opcao == 1) {
    for (i = 0; i < cont; i++) {
      printf("Indice:%i Grau: %i Vizinhos: ", i + 1, vert[i]);
      for (j = 0; j < vert[i]; j++) {
        printf("%i ", adj[k]);
        k++;
      }
      puts("\n");
    }
  }
  if (opcao == 2) {
    euleriano(vert, adj, cont, cont2);
  }
  if (opcao == 0) {
    limpa();
    return;
  }
}
```