int configurar(char tau[11][11], int freq[5]) {
  int col, i, j, k, confirmacio, op, mida_v, orientacio, pos_x, pos_y, an_fil,
      an_col;
  int lim_v[5];
  system("cls");
  printf("\nConfiguracio del Taulell");
  printf("\n\nIntrodueix nombre de files i columnes del taulell: ");
  scanf("%d", &col);
  while (col < 6 || col > 11) {
    printf("\nIntrodueix un nombre valid de files i columnes: ");
    scanf("%d", &col);
  }
  for (k = 0; k < 5; k++) {
    freq[k] = 0;
  }
  for (k = 0; k < 5; k++) {
    lim_v[k] = 5 - k;
  }
  for (i = 0; i < col; i++) {
    for (j = 0; j < col; j++) {
      tau[i][j] = '*';
    }
  }
  while (op != 5 && (freq[1] != lim_v[1] || freq[2] != lim_v[2] ||
                     freq[3] != lim_v[3] || freq[4] != lim_v[4])) {
    printf("\nQuin vaixell vols colocar?\n");
    printf("\n\t1.Submari (Disposes de 4 submarins, cada un ocupa 1 casella)");
    printf("\n\t2.Draga mines (Disposes de 3 draga mines, cada un ocupa 2 "
           "caselles)");
    printf("\n\t3.Destructor (Disposes de 2 destructors, cada un ocupa 3 "
           "caselles)");
    printf("\n\t4.Portaavions (Disposes de 1 portaavions, cada un ocupa 4 "
           "caselles)");
    printf("\n\t5.Sortir\n\t");
    scanf("%d", &op);
    while (op < 1 || op > 5) {
      printf("Introdueix un nombre valid: ");
      scanf("%d", &op);
    }
    if (op > 0 && op < 5) {
      if (freq[op] != lim_v[op]) {
        mida_v = op;
        printf("\nIndica les coordenades on vols posicionar el vaixell (Primer "
               "el valor de x i despres el de y) \n");
        scanf("%d", &pos_x);
        scanf("%d", &pos_y);
        while (pos_x > col || pos_y > col) {
          printf("Torna a introduir uns valors valids (Primer el valor de x i "
                 "despres el de y) \n");
          scanf("%d", &pos_x);
          scanf("%d", &pos_y);
        }
        if (mida_v != 1) {
          printf("\nIntrodueix la orientacio (0 Horitzontal, 1 vertical):\n");
          scanf("%d", &orientacio);
          while (orientacio != 0 && orientacio != 1) {
            printf("Introdueix 0 per a colocarlo horitzontalment o 1 per a "
                   "colocarlo verticalment: \n");
            scanf("%d", &orientacio);
          }
        }
        if (orientacio == 0) {
          an_fil = 0;
          an_col = 1;
        } else {
          an_fil = 1;
          an_col = 0;
        }
        colocar(tau, mida_v, orientacio, pos_x, pos_y, an_fil, an_col, col,
                freq);
      } else {
        system("cls");
        printf("\nS'ha esgotat el vaixell seleccionat.\n");
      }
    }
  }
  printf("\nVols veure com esta configurat el taulell??");
  printf("\n\t0. No");
  printf("\n\t1. Si\n\t");
  scanf("%d", &confirmacio);
  while (confirmacio < 0 || confirmacio > 1) {
    printf("Introdueix un nombre valid: ");
    scanf("%d", &confirmacio);
  }
  if (confirmacio == 1) {
    mostrarTaulell(tau, col);
  }
  return col;
}


x86 assembly (clang, -O0):
<configurar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xe96(%rip),%rdi
mov    $0x0,%al
call   1030 <system@plt>
lea    0xe8c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe98(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xec0(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
mov    $0x1,%al
cmpl   $0x6,-0x14(%rbp)
mov    %al,-0x61(%rbp)
jl     11b8 <configurar+0x68>
cmpl   $0xb,-0x14(%rbp)
setg   %al
mov    %al,-0x61(%rbp)
mov    -0x61(%rbp),%al
test   $0x1,%al
jne    11c8 <configurar+0x78>
jmp    11ed <configurar+0x9d>
lea    0xe88(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe77(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
jmp    119f <configurar+0x4f>
movl   $0x0,-0x20(%rbp)
cmpl   $0x5,-0x20(%rbp)
jge    121b <configurar+0xcb>
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    11f4 <configurar+0xa4>
movl   $0x0,-0x20(%rbp)
cmpl   $0x5,-0x20(%rbp)
jge    124a <configurar+0xfa>
mov    $0x5,%ecx
sub    -0x20(%rbp),%ecx
movslq -0x20(%rbp),%rax
mov    %ecx,-0x60(%rbp,%rax,4)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1222 <configurar+0xd2>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    12a8 <configurar+0x158>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1295 <configurar+0x145>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
imul   $0xb,%rcx,%rcx
add    %rcx,%rax
movslq -0x1c(%rbp),%rcx
movb   $0x2a,(%rax,%rcx,1)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1264 <configurar+0x114>
jmp    129a <configurar+0x14a>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1251 <configurar+0x101>
jmp    12ad <configurar+0x15d>
xor    %eax,%eax
cmpl   $0x5,-0x28(%rbp)
mov    %al,-0x62(%rbp)
je     1311 <configurar+0x1c1>
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%ecx
mov    $0x1,%al
cmp    -0x5c(%rbp),%ecx
mov    %al,-0x63(%rbp)
jne    130b <configurar+0x1bb>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%ecx
mov    $0x1,%al
cmp    -0x58(%rbp),%ecx
mov    %al,-0x63(%rbp)
jne    130b <configurar+0x1bb>
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%ecx
mov    $0x1,%al
cmp    -0x54(%rbp),%ecx
mov    %al,-0x63(%rbp)
jne    130b <configurar+0x1bb>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%eax
cmp    -0x50(%rbp),%eax
setne  %al
mov    %al,-0x63(%rbp)
mov    -0x63(%rbp),%al
mov    %al,-0x62(%rbp)
mov    -0x62(%rbp),%al
test   $0x1,%al
jne    1321 <configurar+0x1d1>
jmp    15a7 <configurar+0x457>
lea    0xd61(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd70(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xda1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xdd9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe10(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe48(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xcd8(%rip),%rdi
lea    -0x28(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
mov    $0x1,%al
cmpl   $0x1,-0x28(%rbp)
mov    %al,-0x64(%rbp)
jl     13a0 <configurar+0x250>
cmpl   $0x5,-0x28(%rbp)
setg   %al
mov    %al,-0x64(%rbp)
mov    -0x64(%rbp),%al
test   $0x1,%al
jne    13b0 <configurar+0x260>
jmp    13d5 <configurar+0x285>
lea    0xe0c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xc8f(%rip),%rdi
lea    -0x28(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
jmp    1387 <configurar+0x237>
cmpl   $0x0,-0x28(%rbp)
jle    15a2 <configurar+0x452>
cmpl   $0x5,-0x28(%rbp)
jge    15a2 <configurar+0x452>
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
movslq -0x28(%rbp),%rcx
cmp    -0x60(%rbp,%rcx,4),%eax
je     1581 <configurar+0x431>
mov    -0x28(%rbp),%eax
mov    %eax,-0x2c(%rbp)
lea    0xdd1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xc37(%rip),%rdi
lea    -0x34(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
lea    0xc25(%rip),%rdi
lea    -0x38(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
mov    -0x34(%rbp),%ecx
mov    $0x1,%al
cmp    -0x14(%rbp),%ecx
mov    %al,-0x65(%rbp)
jg     1457 <configurar+0x307>
mov    -0x38(%rbp),%eax
cmp    -0x14(%rbp),%eax
setg   %al
mov    %al,-0x65(%rbp)
mov    -0x65(%rbp),%al
test   $0x1,%al
jne    1467 <configurar+0x317>
jmp    149e <configurar+0x34e>
lea    0xdd3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xbd8(%rip),%rdi
lea    -0x34(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
lea    0xbc6(%rip),%rdi
lea    -0x38(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
jmp    143a <configurar+0x2ea>
cmpl   $0x1,-0x2c(%rbp)
je     151b <configurar+0x3cb>
lea    0xde1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xb97(%rip),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
xor    %eax,%eax
cmpl   $0x0,-0x30(%rbp)
mov    %al,-0x66(%rbp)
je     14e1 <configurar+0x391>
cmpl   $0x1,-0x30(%rbp)
setne  %al
mov    %al,-0x66(%rbp)
mov    -0x66(%rbp),%al
test   $0x1,%al
jne    14f1 <configurar+0x3a1>
jmp    1516 <configurar+0x3c6>
lea    0xdd0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xb4e(%rip),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
jmp    14c8 <configurar+0x378>
jmp    151b <configurar+0x3cb>
cmpl   $0x0,-0x30(%rbp)
jne    1538 <configurar+0x3e8>
movl   $0x0,-0x3c(%rbp)
movl   $0x1,-0x40(%rbp)
jmp    1546 <configurar+0x3f6>
movl   $0x1,-0x3c(%rbp)
movl   $0x0,-0x40(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x2c(%rbp),%esi
mov    -0x30(%rbp),%edx
mov    -0x34(%rbp),%ecx
mov    -0x38(%rbp),%r8d
mov    -0x3c(%rbp),%r9d
mov    -0x40(%rbp),%r11d
mov    -0x14(%rbp),%r10d
mov    -0x10(%rbp),%rax
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %rax,0x10(%rsp)
mov    $0x0,%al
call   1060 <colocar@plt>
jmp    159d <configurar+0x44d>
lea    0xa78(%rip),%rdi
mov    $0x0,%al
call   1030 <system@plt>
lea    0xd83(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    15a2 <configurar+0x452>
jmp    12ad <configurar+0x15d>
lea    0xd92(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xdb1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xdab(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xa7c(%rip),%rdi
lea    -0x24(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
mov    $0x1,%al
cmpl   $0x0,-0x24(%rbp)
mov    %al,-0x67(%rbp)
jl     15fc <configurar+0x4ac>
cmpl   $0x1,-0x24(%rbp)
setg   %al
mov    %al,-0x67(%rbp)
mov    -0x67(%rbp),%al
test   $0x1,%al
jne    160c <configurar+0x4bc>
jmp    1631 <configurar+0x4e1>
lea    0xbb0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xa33(%rip),%rdi
lea    -0x24(%rbp),%rsi
mov    $0x0,%al
call   1050 <scanf@plt>
jmp    15e3 <configurar+0x493>
cmpl   $0x1,-0x24(%rbp)
jne    1649 <configurar+0x4f9>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    $0x0,%al
call   1070 <mostrarTaulell@plt>
mov    -0x14(%rbp),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<configurar>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rsi,%r15
mov    %rdi,0x18(%rsp)
lea    0xe83(%rip),%rdi
xor    %eax,%eax
call   1040 <system@plt>
lea    0xe79(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe85(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xead(%rip),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1070 <scanf@plt>
mov    (%rsp),%eax
lea    -0xc(%rax),%ecx
cmp    $0xfffffff9,%ecx
ja     1202 <configurar+0x92>
lea    0xe94(%rip),%r14
lea    0xe8a(%rip),%rbp
mov    %rsp,%rbx
nopl   (%rax)
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1070 <scanf@plt>
mov    (%rsp),%eax
lea    -0xc(%rax),%ecx
cmp    $0xfffffffa,%ecx
jb     11e0 <configurar+0x70>
xorps  %xmm0,%xmm0
movups %xmm0,(%r15)
movl   $0x0,0x10(%r15)
movaps 0xde8(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movl   $0x1,0x30(%rsp)
mov    %eax,%r12d
lea    -0x1(%r12),%rax
mov    %r12d,%r14d
and    $0x7,%r14d
cmp    $0x7,%rax
jae    1241 <configurar+0xd1>
xor    %ebp,%ebp
jmp    12e8 <configurar+0x178>
mov    %r12d,%r13d
and    $0xfffffff8,%r13d
xor    %ebp,%ebp
mov    0x18(%rsp),%rbx
nop
mov    %rbx,%rdi
mov    $0x2a,%esi
mov    %r12,%rdx
call   1060 <memset@plt>
lea    0xb(%rbx),%rdi
mov    $0x2a,%esi
mov    %r12,%rdx
call   1060 <memset@plt>
lea    0x16(%rbx),%rdi
mov    $0x2a,%esi
mov    %r12,%rdx
call   1060 <memset@plt>
lea    0x21(%rbx),%rdi
mov    $0x2a,%esi
mov    %r12,%rdx
call   1060 <memset@plt>
lea    0x2c(%rbx),%rdi
mov    $0x2a,%esi
mov    %r12,%rdx
call   1060 <memset@plt>
lea    0x37(%rbx),%rdi
mov    $0x2a,%esi
mov    %r12,%rdx
call   1060 <memset@plt>
lea    0x42(%rbx),%rdi
mov    $0x2a,%esi
mov    %r12,%rdx
call   1060 <memset@plt>
lea    0x4d(%rbx),%rdi
mov    $0x2a,%esi
mov    %r12,%rdx
call   1060 <memset@plt>
add    $0x8,%rbp
add    $0x58,%rbx
cmp    %rbp,%r13
jne    1250 <configurar+0xe0>
test   %r14,%r14
je     1365 <configurar+0x1f5>
lea    0x0(,%rbp,4),%rax
add    %rbp,%rax
lea    0x0(,%rax,2),%r13
add    %rbp,%r13
add    0x18(%rsp),%r13
lea    (%r14,%r14,4),%rax
lea    (%r14,%rax,2),%rbp
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    (%rbx,%r13,1),%rdi
mov    $0x2a,%esi
mov    %r12,%rdx
call   1060 <memset@plt>
add    $0xb,%rbx
cmp    %rbx,%rbp
jne    1320 <configurar+0x1b0>
jmp    1365 <configurar+0x1f5>
nopl   0x0(%rax)
lea    0xcc9(%rip),%rdi
xor    %eax,%eax
call   1040 <system@plt>
lea    0xed9(%rip),%rdi
call   1030 <puts@plt>
cmpl   $0x5,0x10(%rsp)
je     159a <configurar+0x42a>
cmpl   $0x4,0x4(%r15)
jne    1390 <configurar+0x220>
cmpl   $0x3,0x8(%r15)
jne    1390 <configurar+0x220>
cmpl   $0x2,0xc(%r15)
jne    1390 <configurar+0x220>
cmpl   $0x1,0x10(%r15)
je     159a <configurar+0x42a>
cs nopw 0x0(%rax,%rax,1)
nop
lea    0xe7b(%rip),%rdi
call   1030 <puts@plt>
lea    0xcf6(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd27(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd5f(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd96(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xdce(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xc7b(%rip),%rdi
lea    0x10(%rsp),%rsi
xor    %eax,%eax
call   1070 <scanf@plt>
mov    0x10(%rsp),%ebx
lea    -0x6(%rbx),%eax
cmp    $0xfffffffa,%eax
ja     1443 <configurar+0x2d3>
lea    0xdae(%rip),%r14
lea    0xc55(%rip),%r12
lea    0x10(%rsp),%rbp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r12,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1070 <scanf@plt>
mov    0x10(%rsp),%ebx
lea    -0x6(%rbx),%eax
cmp    $0xfffffffb,%eax
jb     1420 <configurar+0x2b0>
cmp    $0x4,%ebx
ja     135a <configurar+0x1ea>
mov    %ebx,%eax
mov    (%r15,%rax,4),%ecx
cmp    0x20(%rsp,%rax,4),%ecx
je     1340 <configurar+0x1d0>
lea    0xdf1(%rip),%rdi
call   1030 <puts@plt>
lea    0xbf5(%rip),%rbp
lea    0x8(%rsp),%rsi
mov    %rbp,%rdi
xor    %eax,%eax
call   1070 <scanf@plt>
lea    0x4(%rsp),%rsi
mov    %rbp,%rdi
xor    %eax,%eax
call   1070 <scanf@plt>
mov    (%rsp),%eax
cmp    %eax,0x8(%rsp)
jg     149c <configurar+0x32c>
cmp    %eax,0x4(%rsp)
jle    14f1 <configurar+0x381>
lea    0xe98(%rip),%r12
lea    0xbba(%rip),%r13
lea    0x8(%rsp),%rbp
lea    0x4(%rsp),%r14
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r12,%rdi
call   1030 <puts@plt>
mov    %r13,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1070 <scanf@plt>
mov    %r13,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1070 <scanf@plt>
mov    (%rsp),%eax
cmp    %eax,0x8(%rsp)
jg     14c0 <configurar+0x350>
cmp    %eax,0x4(%rsp)
jg     14c0 <configurar+0x350>
cmp    $0x1,%ebx
jne    14fc <configurar+0x38c>
mov    0xc(%rsp),%edx
jmp    155e <configurar+0x3ee>
lea    0xdb1(%rip),%rdi
call   1030 <puts@plt>
lea    0xb55(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1070 <scanf@plt>
mov    0xc(%rsp),%edx
cmp    $0x2,%edx
jb     155e <configurar+0x3ee>
lea    0xdc0(%rip),%r14
lea    0xb32(%rip),%r12
lea    0xc(%rsp),%rbp
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1030 <puts@plt>
mov    %r12,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1070 <scanf@plt>
mov    0xc(%rsp),%edx
cmp    $0x1,%edx
ja     1540 <configurar+0x3d0>
xor    %ebp,%ebp
xor    %r9d,%r9d
test   %edx,%edx
sete   %bpl
setne  %r9b
mov    0x8(%rsp),%ecx
mov    0x4(%rsp),%r8d
mov    (%rsp),%r10d
sub    $0x8,%rsp
mov    0x20(%rsp),%rdi
mov    %ebx,%esi
xor    %eax,%eax
push   %r15
push   %r10
push   %rbp
call   1080 <colocar@plt>
add    $0x20,%rsp
jmp    135a <configurar+0x1ea>
lea    0xc32(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xc51(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xc4b(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xa99(%rip),%rdi
lea    0x14(%rsp),%rsi
xor    %eax,%eax
call   1070 <scanf@plt>
mov    0x14(%rsp),%eax
cmp    $0x2,%eax
jb     1620 <configurar+0x4b0>
lea    0xbcf(%rip),%r14
lea    0xa76(%rip),%rbp
lea    0x14(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1070 <scanf@plt>
mov    0x14(%rsp),%eax
cmp    $0x1,%eax
ja     1600 <configurar+0x490>
cmp    $0x1,%eax
jne    1634 <configurar+0x4c4>
mov    (%rsp),%esi
mov    0x18(%rsp),%rdi
xor    %eax,%eax
call   1090 <mostrarTaulell@plt>
mov    (%rsp),%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"cls\00"
@.str.1 = [26 x i8] c"\0AConfiguracio del Taulell\00"
@.str.2 = [54 x i8] c"\0A\0AIntrodueix nombre de files i columnes del taulell: \00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [50 x i8] c"\0AIntrodueix un nombre valid de files i columnes: \00"
@.str.5 = [29 x i8] c"\0AQuin vaixell vols colocar?\0A\00"
@.str.6 = [63 x i8] c"\0A\091.Submari (Disposes de 4 submarins, cada un ocupa 1 casella)\00"
@.str.7 = [70 x i8] c"\0A\092.Draga mines (Disposes de 3 draga mines, cada un ocupa 2 caselles)\00"
@.str.8 = [69 x i8] c"\0A\093.Destructor (Disposes de 2 destructors, cada un ocupa 3 caselles)\00"
@.str.9 = [70 x i8] c"\0A\094.Portaavions (Disposes de 1 portaavions, cada un ocupa 4 caselles)\00"
@.str.10 = [13 x i8] c"\0A\095.Sortir\0A\09\00"
@.str.11 = [29 x i8] c"Introdueix un nombre valid: \00"
@.str.12 = [97 x i8] c"\0AIndica les coordenades on vols posicionar el vaixell (Primer el valor de x i despres el de y) \0A\00"
@.str.13 = [79 x i8] c"Torna a introduir uns valors valids (Primer el valor de x i despres el de y) \0A\00"
@.str.14 = [56 x i8] c"\0AIntrodueix la orientacio (0 Horitzontal, 1 vertical):\0A\00"
@.str.15 = [81 x i8] c"Introdueix 0 per a colocarlo horitzontalment o 1 per a colocarlo verticalment: \0A\00"
@.str.16 = [39 x i8] c"\0AS'ha esgotat el vaixell seleccionat.\0A\00"
@.str.17 = [45 x i8] c"\0AVols veure com esta configurat el taulell??\00"
@.str.18 = [8 x i8] c"\0A\090. No\00"
@.str.19 = [10 x i8] c"\0A\091. Si\0A\09\00"
define i32 @configurar([11 x i8]* %0, i32* %1) {
%3 = alloca [11 x i8]*
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca [5 x i32]
store [11 x i8]* %0, [11 x i8]** %3
store i32* %1, i32** %4
%18 = call i32 (i8*, ...) bitcast (i32 (...)* @system to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.2, i64 0, i64 0))
%21 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %5)
br label %22
22: ; preds = %30, %2
%23 = load i32, i32* %5
%24 = icmp slt i32 %23, 6
br i1 %24, label %28, label %25
25: ; preds = %22
%26 = load i32, i32* %5
%27 = icmp sgt i32 %26, 11
br label %28
28: ; preds = %25, %22
%29 = phi i1 [ true, %22 ], [ %27, %25 ]
br i1 %29, label %30, label %33
30: ; preds = %28
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.4, i64 0, i64 0))
%32 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %5)
br label %22
33: ; preds = %28
store i32 0, i32* %8
br label %34
34: ; preds = %42, %33
%35 = load i32, i32* %8
%36 = icmp slt i32 %35, 5
br i1 %36, label %37, label %45
37: ; preds = %34
%38 = load i32*, i32** %4
%39 = load i32, i32* %8
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds i32, i32* %38, i64 %40
store i32 0, i32* %41
br label %42
42: ; preds = %37
%43 = load i32, i32* %8
%44 = add nsw i32 %43, 1
store i32 %44, i32* %8
br label %34
45: ; preds = %34
store i32 0, i32* %8
br label %46
46: ; preds = %55, %45
%47 = load i32, i32* %8
%48 = icmp slt i32 %47, 5
br i1 %48, label %49, label %58
49: ; preds = %46
%50 = load i32, i32* %8
%51 = sub nsw i32 5, %50
%52 = load i32, i32* %8
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds [5 x i32], [5 x i32]* %17, i64 0, i64 %53
store i32 %51, i32* %54
br label %55
55: ; preds = %49
%56 = load i32, i32* %8
%57 = add nsw i32 %56, 1
store i32 %57, i32* %8
br label %46
58: ; preds = %46
store i32 0, i32* %6
br label %59
59: ; preds = %80, %58
%60 = load i32, i32* %6
%61 = load i32, i32* %5
%62 = icmp slt i32 %60, %61
br i1 %62, label %63, label %83
63: ; preds = %59
store i32 0, i32* %7
br label %64
64: ; preds = %76, %63
%65 = load i32, i32* %7
%66 = load i32, i32* %5
%67 = icmp slt i32 %65, %66
br i1 %67, label %68, label %79
68: ; preds = %64
%69 = load [11 x i8]*, [11 x i8]** %3
%70 = load i32, i32* %6
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds [11 x i8], [11 x i8]* %69, i64 %71
%73 = load i32, i32* %7
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds [11 x i8], [11 x i8]* %72, i64 0, i64 %74
store i8 42, i8* %75
br label %76
76: ; preds = %68
%77 = load i32, i32* %7
%78 = add nsw i32 %77, 1
store i32 %78, i32* %7
br label %64
79: ; preds = %64
br label %80
80: ; preds = %79
%81 = load i32, i32* %6
%82 = add nsw i32 %81, 1
store i32 %82, i32* %6
br label %59
83: ; preds = %59
br label %84
84: ; preds = %212, %83
%85 = load i32, i32* %10
%86 = icmp ne i32 %85, 5
br i1 %86, label %87, label %117
87: ; preds = %84
%88 = load i32*, i32** %4
%89 = getelementptr inbounds i32, i32* %88, i64 1
%90 = load i32, i32* %89
%91 = getelementptr inbounds [5 x i32], [5 x i32]* %17, i64 0, i64 1
%92 = load i32, i32* %91
%93 = icmp ne i32 %90, %92
br i1 %93, label %115, label %94
94: ; preds = %87
%95 = load i32*, i32** %4
%96 = getelementptr inbounds i32, i32* %95, i64 2
%97 = load i32, i32* %96
%98 = getelementptr inbounds [5 x i32], [5 x i32]* %17, i64 0, i64 2
%99 = load i32, i32* %98
%100 = icmp ne i32 %97, %99
br i1 %100, label %115, label %101
101: ; preds = %94
%102 = load i32*, i32** %4
%103 = getelementptr inbounds i32, i32* %102, i64 3
%104 = load i32, i32* %103
%105 = getelementptr inbounds [5 x i32], [5 x i32]* %17, i64 0, i64 3
%106 = load i32, i32* %105
%107 = icmp ne i32 %104, %106
br i1 %107, label %115, label %108
108: ; preds = %101
%109 = load i32*, i32** %4
%110 = getelementptr inbounds i32, i32* %109, i64 4
%111 = load i32, i32* %110
%112 = getelementptr inbounds [5 x i32], [5 x i32]* %17, i64 0, i64 4
%113 = load i32, i32* %112
%114 = icmp ne i32 %111, %113
br label %115
115: ; preds = %108, %101, %94, %87
%116 = phi i1 [ true, %101 ], [ true, %94 ], [ true, %87 ], [ %114, %108 ]
br label %117
117: ; preds = %115, %84
%118 = phi i1 [ false, %84 ], [ %116, %115 ]
br i1 %118, label %119, label %213
119: ; preds = %117
%120 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.5, i64 0, i64 0))
%121 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.6, i64 0, i64 0))
%122 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.7, i64 0, i64 0))
%123 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.8, i64 0, i64 0))
%124 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str.9, i64 0, i64 0))
%125 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.10, i64 0, i64 0))
%126 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %10)
br label %127
127: ; preds = %135, %119
%128 = load i32, i32* %10
%129 = icmp slt i32 %128, 1
br i1 %129, label %133, label %130
130: ; preds = %127
%131 = load i32, i32* %10
%132 = icmp sgt i32 %131, 5
br label %133
133: ; preds = %130, %127
%134 = phi i1 [ true, %127 ], [ %132, %130 ]
br i1 %134, label %135, label %138
135: ; preds = %133
%136 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.11, i64 0, i64 0))
%137 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %10)
br label %127
138: ; preds = %133
%139 = load i32, i32* %10
%140 = icmp sgt i32 %139, 0
br i1 %140, label %141, label %212
141: ; preds = %138
%142 = load i32, i32* %10
%143 = icmp slt i32 %142, 5
br i1 %143, label %144, label %212
144: ; preds = %141
%145 = load i32*, i32** %4
%146 = load i32, i32* %10
%147 = sext i32 %146 to i64
%148 = getelementptr inbounds i32, i32* %145, i64 %147
%149 = load i32, i32* %148
%150 = load i32, i32* %10
%151 = sext i32 %150 to i64
%152 = getelementptr inbounds [5 x i32], [5 x i32]* %17, i64 0, i64 %151
%153 = load i32, i32* %152
%154 = icmp ne i32 %149, %153
br i1 %154, label %155, label %208
155: ; preds = %144
%156 = load i32, i32* %10
store i32 %156, i32* %11
%157 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([97 x i8], [97 x i8]* @.str.12, i64 0, i64 0))
%158 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %13)
%159 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %14)
br label %160
160: ; preds = %170, %155
%161 = load i32, i32* %13
%162 = load i32, i32* %5
%163 = icmp sgt i32 %161, %162
br i1 %163, label %168, label %164
164: ; preds = %160
%165 = load i32, i32* %14
%166 = load i32, i32* %5
%167 = icmp sgt i32 %165, %166
br label %168
168: ; preds = %164, %160
%169 = phi i1 [ true, %160 ], [ %167, %164 ]
br i1 %169, label %170, label %174
170: ; preds = %168
%171 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str.13, i64 0, i64 0))
%172 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %13)
%173 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %14)
br label %160
174: ; preds = %168
%175 = load i32, i32* %11
%176 = icmp ne i32 %175, 1
br i1 %176, label %177, label %192
177: ; preds = %174
%178 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.14, i64 0, i64 0))
%179 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %12)
br label %180
180: ; preds = %188, %177
%181 = load i32, i32* %12
%182 = icmp ne i32 %181, 0
br i1 %182, label %183, label %186
183: ; preds = %180
%184 = load i32, i32* %12
%185 = icmp ne i32 %184, 1
br label %186
186: ; preds = %183, %180
%187 = phi i1 [ false, %180 ], [ %185, %183 ]
br i1 %187, label %188, label %191
188: ; preds = %186
%189 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.15, i64 0, i64 0))
%190 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %12)
br label %180
191: ; preds = %186
br label %192
192: ; preds = %191, %174
%193 = load i32, i32* %12
%194 = icmp eq i32 %193, 0
br i1 %194, label %195, label %196
195: ; preds = %192
store i32 0, i32* %15
store i32 1, i32* %16
br label %197
196: ; preds = %192
store i32 1, i32* %15
store i32 0, i32* %16
br label %197
197: ; preds = %196, %195
%198 = load [11 x i8]*, [11 x i8]** %3
%199 = load i32, i32* %11
%200 = load i32, i32* %12
%201 = load i32, i32* %13
%202 = load i32, i32* %14
%203 = load i32, i32* %15
%204 = load i32, i32* %16
%205 = load i32, i32* %5
%206 = load i32*, i32** %4
%207 = call i32 ([11 x i8]*, i32, i32, i32, i32, i32, i32, i32, i32*, ...) bitcast (i32 (...)* @colocar to i32 ([11 x i8]*, i32, i32, i32, i32, i32, i32, i32, i32*, ...)*)([11 x i8]* %198, i32 %199, i32 %200, i32 %201, i32 %202, i32 %203, i32 %204, i32 %205, i32* %206)
br label %211
208: ; preds = %144
%209 = call i32 (i8*, ...) bitcast (i32 (...)* @system to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%210 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.16, i64 0, i64 0))
br label %211
211: ; preds = %208, %197
br label %212
212: ; preds = %211, %141, %138
br label %84
213: ; preds = %117
%214 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.17, i64 0, i64 0))
%215 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.18, i64 0, i64 0))
%216 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.19, i64 0, i64 0))
%217 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %9)
br label %218
218: ; preds = %226, %213
%219 = load i32, i32* %9
%220 = icmp slt i32 %219, 0
br i1 %220, label %224, label %221
221: ; preds = %218
%222 = load i32, i32* %9
%223 = icmp sgt i32 %222, 1
br label %224
224: ; preds = %221, %218
%225 = phi i1 [ true, %218 ], [ %223, %221 ]
br i1 %225, label %226, label %229
226: ; preds = %224
%227 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.11, i64 0, i64 0))
%228 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %9)
br label %218
229: ; preds = %224
%230 = load i32, i32* %9
%231 = icmp eq i32 %230, 1
br i1 %231, label %232, label %236
232: ; preds = %229
%233 = load [11 x i8]*, [11 x i8]** %3
%234 = load i32, i32* %5
%235 = call i32 ([11 x i8]*, i32, ...) bitcast (i32 (...)* @mostrarTaulell to i32 ([11 x i8]*, i32, ...)*)([11 x i8]* %233, i32 %234)
br label %236
236: ; preds = %232, %229
%237 = load i32, i32* %5
ret i32 %237
}

LLVM IR (-O2):
@.str = [4 x i8] c"cls\00"
@.str.1 = [26 x i8] c"\0AConfiguracio del Taulell\00"
@.str.2 = [54 x i8] c"\0A\0AIntrodueix nombre de files i columnes del taulell: \00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [50 x i8] c"\0AIntrodueix un nombre valid de files i columnes: \00"
@.str.6 = [63 x i8] c"\0A\091.Submari (Disposes de 4 submarins, cada un ocupa 1 casella)\00"
@.str.7 = [70 x i8] c"\0A\092.Draga mines (Disposes de 3 draga mines, cada un ocupa 2 caselles)\00"
@.str.8 = [69 x i8] c"\0A\093.Destructor (Disposes de 2 destructors, cada un ocupa 3 caselles)\00"
@.str.9 = [70 x i8] c"\0A\094.Portaavions (Disposes de 1 portaavions, cada un ocupa 4 caselles)\00"
@.str.10 = [13 x i8] c"\0A\095.Sortir\0A\09\00"
@.str.11 = [29 x i8] c"Introdueix un nombre valid: \00"
@.str.17 = [45 x i8] c"\0AVols veure com esta configurat el taulell??\00"
@.str.18 = [8 x i8] c"\0A\090. No\00"
@.str.19 = [10 x i8] c"\0A\091. Si\0A\09\00"
@str = [28 x i8] c"\0AQuin vaixell vols colocar?\00"
@str.20 = [38 x i8] c"\0AS'ha esgotat el vaixell seleccionat.\00"
@str.21 = [96 x i8] c"\0AIndica les coordenades on vols posicionar el vaixell (Primer el valor de x i despres el de y) \00"
@str.22 = [55 x i8] c"\0AIntrodueix la orientacio (0 Horitzontal, 1 vertical):\00"
@str.23 = [80 x i8] c"Introdueix 0 per a colocarlo horitzontalment o 1 per a colocarlo verticalment: \00"
@str.24 = [78 x i8] c"Torna a introduir uns valors valids (Primer el valor de x i despres el de y) \00"
define i32 @configurar([11 x i8]* %0, i32* %1) {
%3 = bitcast i32* %1 to i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca [5 x i32]
%11 = bitcast i32* %4 to i8*
%12 = bitcast i32* %5 to i8*
%13 = bitcast i32* %6 to i8*
%14 = bitcast i32* %7 to i8*
%15 = bitcast i32* %8 to i8*
%16 = bitcast i32* %9 to i8*
%17 = bitcast [5 x i32]* %10 to i8*
%18 = tail call i32 (i8*, ...) bitcast (i32 (...)* @system to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str.2, i64 0, i64 0))
%21 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %4)
%22 = load i32, i32* %4
%23 = add i32 %22, -12
%24 = icmp ult i32 %23, -6
br i1 %24, label %25, label %31
25: ; preds = %2, %25
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.4, i64 0, i64 0))
%27 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %4)
%28 = load i32, i32* %4
%29 = add i32 %28, -12
%30 = icmp ult i32 %29, -6
br i1 %30, label %25, label %31
31: ; preds = %25, %2
%32 = phi i32 [ %22, %2 ], [ %28, %25 ]
%33 = bitcast [5 x i32]* %10 to <4 x i32>*
store <4 x i32> <i32 5, i32 4, i32 3, i32 2>, <4 x i32>* %33
%34 = getelementptr inbounds [5 x i32], [5 x i32]* %10, i64 0, i64 4
store i32 1, i32* %34
%35 = zext i32 %32 to i64
%36 = add nsw i64 %35, -1
%37 = and i64 %35, 7
%38 = icmp ult i64 %36, 7
br i1 %38, label %41, label %39
39: ; preds = %31
%40 = and i64 %35, 4294967288
br label %56
41: ; preds = %56, %31
%42 = phi i64 [ 0, %31 ], [ %74, %56 ]
%43 = icmp eq i64 %37, 0
br i1 %43, label %51, label %44
44: ; preds = %41, %44
%45 = phi i64 [ %48, %44 ], [ %42, %41 ]
%46 = phi i64 [ %49, %44 ], [ 0, %41 ]
%47 = getelementptr [11 x i8], [11 x i8]* %0, i64 %45, i64 0
%48 = add nuw nsw i64 %45, 1
%49 = add i64 %46, 1
%50 = icmp eq i64 %49, %37
br i1 %50, label %51, label %44
51: ; preds = %44, %41
%52 = getelementptr inbounds i32, i32* %1, i64 4
%53 = getelementptr inbounds i32, i32* %1, i64 1
%54 = getelementptr inbounds i32, i32* %1, i64 2
%55 = getelementptr inbounds i32, i32* %1, i64 3
br label %77
56: ; preds = %56, %39
%57 = phi i64 [ 0, %39 ], [ %74, %56 ]
%58 = phi i64 [ 0, %39 ], [ %75, %56 ]
%59 = getelementptr [11 x i8], [11 x i8]* %0, i64 %57, i64 0
%60 = or i64 %57, 1
%61 = getelementptr [11 x i8], [11 x i8]* %0, i64 %60, i64 0
%62 = or i64 %57, 2
%63 = getelementptr [11 x i8], [11 x i8]* %0, i64 %62, i64 0
%64 = or i64 %57, 3
%65 = getelementptr [11 x i8], [11 x i8]* %0, i64 %64, i64 0
%66 = or i64 %57, 4
%67 = getelementptr [11 x i8], [11 x i8]* %0, i64 %66, i64 0
%68 = or i64 %57, 5
%69 = getelementptr [11 x i8], [11 x i8]* %0, i64 %68, i64 0
%70 = or i64 %57, 6
%71 = getelementptr [11 x i8], [11 x i8]* %0, i64 %70, i64 0
%72 = or i64 %57, 7
%73 = getelementptr [11 x i8], [11 x i8]* %0, i64 %72, i64 0
%74 = add nuw nsw i64 %57, 8
%75 = add i64 %58, 8
%76 = icmp eq i64 %75, %40
br i1 %76, label %41, label %56
77: ; preds = %51, %163
%78 = load i32, i32* %53
%79 = icmp eq i32 %78, 4
br i1 %79, label %80, label %89
80: ; preds = %77
%81 = load i32, i32* %54
%82 = icmp eq i32 %81, 3
br i1 %82, label %83, label %89
83: ; preds = %80
%84 = load i32, i32* %55
%85 = icmp eq i32 %84, 2
br i1 %85, label %86, label %89
86: ; preds = %83
%87 = load i32, i32* %52
%88 = icmp eq i32 %87, 1
br i1 %88, label %166, label %89
89: ; preds = %77, %80, %83, %86
%90 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
%91 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @.str.6, i64 0, i64 0))
%92 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([70 x i8], [70 x i8]* @.str.7, i64 0, i64 0))
%93 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @.str.8, i64 0, i64 0))
%94 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([70 x i8], [70 x i8]* @.str.9, i64 0, i64 0))
%95 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.10, i64 0, i64 0))
%96 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %6)
%97 = load i32, i32* %6
%98 = add i32 %97, -6
%99 = icmp ult i32 %98, -5
br i1 %99, label %100, label %106
100: ; preds = %89, %100
%101 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.11, i64 0, i64 0))
%102 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %6)
%103 = load i32, i32* %6
%104 = add i32 %103, -6
%105 = icmp ult i32 %104, -5
br i1 %105, label %100, label %106
106: ; preds = %100, %89
%107 = phi i32 [ %97, %89 ], [ %103, %100 ]
%108 = icmp ult i32 %107, 5
br i1 %108, label %109, label %163
109: ; preds = %106
%110 = zext i32 %107 to i64
%111 = getelementptr inbounds i32, i32* %1, i64 %110
%112 = load i32, i32* %111
%113 = getelementptr inbounds [5 x i32], [5 x i32]* %10, i64 0, i64 %110
%114 = load i32, i32* %113
%115 = icmp eq i32 %112, %114
br i1 %115, label %160, label %116
116: ; preds = %109
%117 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([96 x i8], [96 x i8]* @str.21, i64 0, i64 0))
%118 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %8)
%119 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %9)
%120 = load i32, i32* %8
%121 = load i32, i32* %4
%122 = icmp sgt i32 %120, %121
%123 = load i32, i32* %9
%124 = icmp sgt i32 %123, %121
%125 = select i1 %122, i1 true, i1 %124
br i1 %125, label %126, label %136
126: ; preds = %116, %126
%127 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([78 x i8], [78 x i8]* @str.24, i64 0, i64 0))
%128 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %8)
%129 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %9)
%130 = load i32, i32* %8
%131 = load i32, i32* %4
%132 = icmp sgt i32 %130, %131
%133 = load i32, i32* %9
%134 = icmp sgt i32 %133, %131
%135 = select i1 %132, i1 true, i1 %134
br i1 %135, label %126, label %136
136: ; preds = %126, %116
%137 = icmp eq i32 %107, 1
br i1 %137, label %138, label %140
138: ; preds = %136
%139 = load i32, i32* %7
br label %150
140: ; preds = %136
%141 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str.22, i64 0, i64 0))
%142 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %7)
%143 = load i32, i32* %7
%144 = icmp ult i32 %143, 2
br i1 %144, label %150, label %145
145: ; preds = %140, %145
%146 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @str.23, i64 0, i64 0))
%147 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %7)
%148 = load i32, i32* %7
%149 = icmp ult i32 %148, 2
br i1 %149, label %150, label %145
150: ; preds = %145, %138, %140
%151 = phi i32 [ %139, %138 ], [ %143, %140 ], [ %148, %145 ]
%152 = icmp eq i32 %151, 0
%153 = xor i1 %152, true
%154 = zext i1 %153 to i32
%155 = zext i1 %152 to i32
%156 = load i32, i32* %8
%157 = load i32, i32* %9
%158 = load i32, i32* %4
%159 = call i32 ([11 x i8]*, i32, i32, i32, i32, i32, i32, i32, i32*, ...) bitcast (i32 (...)* @colocar to i32 ([11 x i8]*, i32, i32, i32, i32, i32, i32, i32, i32*, ...)*)([11 x i8]* %0, i32 %107, i32 %151, i32 %156, i32 %157, i32 %154, i32 %155, i32 %158, i32* %1)
br label %163
160: ; preds = %109
%161 = call i32 (i8*, ...) bitcast (i32 (...)* @system to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%162 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.20, i64 0, i64 0))
br label %163
163: ; preds = %150, %160, %106
%164 = load i32, i32* %6
%165 = icmp eq i32 %164, 5
br i1 %165, label %166, label %77
166: ; preds = %86, %163
%167 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @.str.17, i64 0, i64 0))
%168 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.18, i64 0, i64 0))
%169 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.19, i64 0, i64 0))
%170 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %5)
%171 = load i32, i32* %5
%172 = icmp ugt i32 %171, 1
br i1 %172, label %173, label %178
173: ; preds = %166, %173
%174 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.11, i64 0, i64 0))
%175 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %5)
%176 = load i32, i32* %5
%177 = icmp ugt i32 %176, 1
br i1 %177, label %173, label %178
178: ; preds = %173, %166
%179 = phi i32 [ %171, %166 ], [ %176, %173 ]
%180 = icmp eq i32 %179, 1
br i1 %180, label %181, label %184
181: ; preds = %178
%182 = load i32, i32* %4
%183 = call i32 ([11 x i8]*, i32, ...) bitcast (i32 (...)* @mostrarTaulell to i32 ([11 x i8]*, i32, ...)*)([11 x i8]* %0, i32 %182)
br label %184
184: ; preds = %181, %178
%185 = load i32, i32* %4
ret i32 %185
}