#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ imprMapaA();
int /*<<< orphan*/ imprMapaB();
void *meuAlocaMem(int);
void *meuCalocaMem(int, int);
int /*<<< orphan*/ meuLiberaMem(void *);
void *meuRealocaMem(void *, int);
int /*<<< orphan*/ printf(char *, int, ...);
int rand();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/);
int main(int argc, char **argv) {
  void *vetor[16 + 1];
  int i, j, tam;
  for (i = 0; i < 16; i++)
    vetor[i] = NULL;
  srand(time(0));
  for (i = 0; i < 16 / 2; i++) {
    tam = rand() % 64;
    printf("Alocando %d bytes em vetor[%d]\n", tam, i + 1);
    vetor[i] = meuAlocaMem(tam + 1);
    imprMapaB();
    imprMapaA();
  }
  printf("Num Operacoes: %d\n", i);
  for (i = 0; i < 32; i++) {
    j = rand() % 16;
    if (vetor[j] == NULL) {
      tam = rand() % 64;
      printf("Alocando %d bytes em vetor[%d]\n", tam, j + 1);
      vetor[j] = meuCalocaMem(2, tam + 1);
    } else {
      tam = rand() % 64;
      printf("Realocando %d bytes em vetor[%d]\n", tam, j + 1);
      vetor[j] = meuRealocaMem(vetor[j], tam + 1);
    }
    imprMapaB();
    imprMapaA();
  }
  for (i = 0; i < 16; i++)
    if (vetor[i] != NULL)
      meuLiberaMem(vetor[i]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0xa4(%rbp)
cmpl   $0x10,-0xa4(%rbp)
jge    11f7 <main+0x57>
movslq -0xa4(%rbp),%rax
movq   $0x0,-0xa0(%rbp,%rax,8)
mov    -0xa4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa4(%rbp)
jmp    11c3 <main+0x23>
xor    %edi,%edi
call   10a0 <time@plt>
mov    %eax,%edi
call   1080 <srand@plt>
movl   $0x0,-0xa4(%rbp)
cmpl   $0x8,-0xa4(%rbp)
jge    1290 <main+0xf0>
mov    $0x0,%al
call   10b0 <rand@plt>
mov    $0x40,%ecx
cltd
idiv   %ecx
mov    %edx,-0xac(%rbp)
mov    -0xac(%rbp),%esi
mov    -0xa4(%rbp),%edx
add    $0x1,%edx
lea    0xdb9(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0xac(%rbp),%edi
add    $0x1,%edi
call   1030 <meuAlocaMem@plt>
mov    %rax,%rcx
movslq -0xa4(%rbp),%rax
mov    %rcx,-0xa0(%rbp,%rax,8)
ff
mov    $0x0,%al
call   1090 <imprMapaB@plt>
mov    $0x0,%al
call   10c0 <imprMapaA@plt>
mov    -0xa4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa4(%rbp)
jmp    120f <main+0x6f>
mov    -0xa4(%rbp),%esi
lea    0xd83(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0xa4(%rbp)
cmpl   $0x20,-0xa4(%rbp)
jge    13c5 <main+0x225>
mov    $0x0,%al
call   10b0 <rand@plt>
mov    $0x10,%ecx
cltd
idiv   %ecx
mov    %edx,-0xa8(%rbp)
movslq -0xa8(%rbp),%rax
cmpq   $0x0,-0xa0(%rbp,%rax,8)
jne    1342 <main+0x1a2>
mov    $0x0,%al
call   10b0 <rand@plt>
mov    $0x40,%ecx
cltd
idiv   %ecx
mov    %edx,-0xac(%rbp)
mov    -0xac(%rbp),%esi
mov    -0xa8(%rbp),%edx
add    $0x1,%edx
lea    0xcef(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0xac(%rbp),%esi
add    $0x1,%esi
mov    $0x2,%edi
call   1050 <meuCalocaMem@plt>
mov    %rax,%rcx
movslq -0xa8(%rbp),%rax
mov    %rcx,-0xa0(%rbp,%rax,8)
ff
jmp    13a3 <main+0x203>
mov    $0x0,%al
call   10b0 <rand@plt>
mov    $0x40,%ecx
cltd
idiv   %ecx
mov    %edx,-0xac(%rbp)
mov    -0xac(%rbp),%esi
mov    -0xa8(%rbp),%edx
add    $0x1,%edx
lea    0xcc6(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movslq -0xa8(%rbp),%rax
mov    -0xa0(%rbp,%rax,8),%rdi
ff
mov    -0xac(%rbp),%esi
add    $0x1,%esi
call   1040 <meuRealocaMem@plt>
mov    %rax,%rcx
movslq -0xa8(%rbp),%rax
mov    %rcx,-0xa0(%rbp,%rax,8)
ff
mov    $0x0,%al
call   1090 <imprMapaB@plt>
mov    $0x0,%al
call   10c0 <imprMapaA@plt>
mov    -0xa4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa4(%rbp)
jmp    12ae <main+0x10e>
movl   $0x0,-0xa4(%rbp)
cmpl   $0x10,-0xa4(%rbp)
jge    141f <main+0x27f>
movslq -0xa4(%rbp),%rax
cmpq   $0x0,-0xa0(%rbp,%rax,8)
je     1406 <main+0x266>
movslq -0xa4(%rbp),%rax
mov    -0xa0(%rbp,%rax,8),%rdi
call   1070 <meuLiberaMem@plt>
jmp    140b <main+0x26b>
mov    -0xa4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa4(%rbp)
jmp    13cf <main+0x22f>
mov    -0x4(%rbp),%eax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
xor    %edi,%edi
call   10a0 <time@plt>
mov    %eax,%edi
call   1080 <srand@plt>
xor    %eax,%eax
call   10b0 <rand@plt>
mov    %eax,%ebx
lea    0x3f(%rbx),%ebp
test   %eax,%eax
cmovns %eax,%ebp
and    $0xffffffc0,%ebp
mov    %eax,%esi
sub    %ebp,%esi
lea    0xe0b(%rip),%r14
mov    %r14,%rdi
mov    $0x1,%edx
xor    %eax,%eax
call   1060 <printf@plt>
neg    %ebp
lea    (%rbx,%rbp,1),%edi
add    $0x1,%edi
call   1030 <meuAlocaMem@plt>
mov    %rax,(%rsp)
xor    %eax,%eax
call   1090 <imprMapaB@plt>
xor    %eax,%eax
call   10c0 <imprMapaA@plt>
xor    %eax,%eax
call   10b0 <rand@plt>
mov    %eax,%ebx
lea    0x3f(%rbx),%ebp
test   %eax,%eax
cmovns %eax,%ebp
and    $0xffffffc0,%ebp
mov    %eax,%esi
sub    %ebp,%esi
mov    %r14,%rdi
mov    $0x2,%edx
xor    %eax,%eax
call   1060 <printf@plt>
neg    %ebp
lea    (%rbx,%rbp,1),%edi
add    $0x1,%edi
call   1030 <meuAlocaMem@plt>
mov    %rax,0x8(%rsp)
xor    %eax,%eax
call   1090 <imprMapaB@plt>
xor    %eax,%eax
call   10c0 <imprMapaA@plt>
xor    %eax,%eax
call   10b0 <rand@plt>
mov    %eax,%ebx
lea    0x3f(%rbx),%ebp
test   %eax,%eax
cmovns %eax,%ebp
and    $0xffffffc0,%ebp
mov    %eax,%esi
sub    %ebp,%esi
mov    %r14,%rdi
mov    $0x3,%edx
xor    %eax,%eax
call   1060 <printf@plt>
neg    %ebp
lea    (%rbx,%rbp,1),%edi
add    $0x1,%edi
call   1030 <meuAlocaMem@plt>
mov    %rax,0x10(%rsp)
xor    %eax,%eax
call   1090 <imprMapaB@plt>
xor    %eax,%eax
call   10c0 <imprMapaA@plt>
xor    %eax,%eax
call   10b0 <rand@plt>
mov    %eax,%ebx
lea    0x3f(%rbx),%ebp
test   %eax,%eax
cmovns %eax,%ebp
and    $0xffffffc0,%ebp
mov    %eax,%esi
sub    %ebp,%esi
mov    %r14,%rdi
mov    $0x4,%edx
xor    %eax,%eax
call   1060 <printf@plt>
neg    %ebp
lea    (%rbx,%rbp,1),%edi
add    $0x1,%edi
call   1030 <meuAlocaMem@plt>
mov    %rax,0x18(%rsp)
xor    %eax,%eax
call   1090 <imprMapaB@plt>
xor    %eax,%eax
call   10c0 <imprMapaA@plt>
xor    %eax,%eax
call   10b0 <rand@plt>
mov    %eax,%ebx
lea    0x3f(%rbx),%ebp
test   %eax,%eax
cmovns %eax,%ebp
and    $0xffffffc0,%ebp
mov    %eax,%esi
sub    %ebp,%esi
mov    %r14,%rdi
mov    $0x5,%edx
xor    %eax,%eax
call   1060 <printf@plt>
neg    %ebp
lea    (%rbx,%rbp,1),%edi
add    $0x1,%edi
call   1030 <meuAlocaMem@plt>
mov    %rax,0x20(%rsp)
xor    %eax,%eax
call   1090 <imprMapaB@plt>
xor    %eax,%eax
call   10c0 <imprMapaA@plt>
xor    %eax,%eax
call   10b0 <rand@plt>
mov    %eax,%ebx
lea    0x3f(%rbx),%ebp
test   %eax,%eax
cmovns %eax,%ebp
and    $0xffffffc0,%ebp
mov    %eax,%esi
sub    %ebp,%esi
mov    %r14,%rdi
mov    $0x6,%edx
xor    %eax,%eax
call   1060 <printf@plt>
neg    %ebp
lea    (%rbx,%rbp,1),%edi
add    $0x1,%edi
call   1030 <meuAlocaMem@plt>
mov    %rax,0x28(%rsp)
xor    %eax,%eax
call   1090 <imprMapaB@plt>
xor    %eax,%eax
call   10c0 <imprMapaA@plt>
xor    %eax,%eax
call   10b0 <rand@plt>
mov    %eax,%ebx
lea    0x3f(%rbx),%ebp
test   %eax,%eax
cmovns %eax,%ebp
and    $0xffffffc0,%ebp
mov    %eax,%esi
sub    %ebp,%esi
mov    %r14,%rdi
mov    $0x7,%edx
xor    %eax,%eax
call   1060 <printf@plt>
neg    %ebp
lea    (%rbx,%rbp,1),%edi
add    $0x1,%edi
call   1030 <meuAlocaMem@plt>
mov    %rax,0x30(%rsp)
xor    %eax,%eax
call   1090 <imprMapaB@plt>
xor    %eax,%eax
call   10c0 <imprMapaA@plt>
xor    %eax,%eax
call   10b0 <rand@plt>
mov    %eax,%ebx
lea    0x3f(%rbx),%ebp
test   %eax,%eax
cmovns %eax,%ebp
and    $0xffffffc0,%ebp
mov    %eax,%esi
sub    %ebp,%esi
mov    %r14,%rdi
mov    $0x8,%edx
xor    %eax,%eax
call   1060 <printf@plt>
neg    %ebp
lea    (%rbx,%rbp,1),%edi
add    $0x1,%edi
call   1030 <meuAlocaMem@plt>
mov    %rax,0x38(%rsp)
xor    %eax,%eax
call   1090 <imprMapaB@plt>
xor    %eax,%eax
call   10c0 <imprMapaA@plt>
lea    0xc05(%rip),%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0x20,%ebp
jmp    1464 <main+0x2c4>
xchg   %ax,%ax
lea    0xbfc(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1060 <printf@plt>
add    $0x1,%ebx
mov    %r12,%rdi
mov    %ebx,%esi
call   1040 <meuRealocaMem@plt>
mov    %rax,(%rsp,%r14,8)
xor    %eax,%eax
call   1090 <imprMapaB@plt>
xor    %eax,%eax
call   10c0 <imprMapaA@plt>
add    $0xffffffff,%ebp
je     14cc <main+0x32c>
xor    %eax,%eax
call   10b0 <rand@plt>
mov    %eax,%r13d
lea    0xf(%r13),%r15d
test   %eax,%eax
cmovns %eax,%r15d
and    $0xfffffff0,%r15d
sub    %r15d,%eax
movslq %eax,%r14
mov    (%rsp,%r14,8),%r12
xor    %eax,%eax
call   10b0 <rand@plt>
mov    %eax,%ebx
lea    0x3f(%rbx),%eax
test   %ebx,%ebx
cmovns %ebx,%eax
and    $0xffffffc0,%eax
sub    %eax,%ebx
neg    %r15d
lea    (%r15,%r13,1),%edx
add    $0x1,%edx
test   %r12,%r12
jne    1430 <main+0x290>
lea    0xb4e(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1060 <printf@plt>
add    $0x1,%ebx
mov    $0x2,%edi
mov    %ebx,%esi
call   1050 <meuCalocaMem@plt>
jmp    144d <main+0x2ad>
mov    (%rsp),%rdi
test   %rdi,%rdi
je     14da <main+0x33a>
call   1070 <meuLiberaMem@plt>
mov    0x8(%rsp),%rdi
test   %rdi,%rdi
je     14e9 <main+0x349>
call   1070 <meuLiberaMem@plt>
mov    0x10(%rsp),%rdi
test   %rdi,%rdi
je     14f8 <main+0x358>
call   1070 <meuLiberaMem@plt>
mov    0x18(%rsp),%rdi
test   %rdi,%rdi
je     1507 <main+0x367>
call   1070 <meuLiberaMem@plt>
mov    0x20(%rsp),%rdi
test   %rdi,%rdi
je     1516 <main+0x376>
call   1070 <meuLiberaMem@plt>
mov    0x28(%rsp),%rdi
test   %rdi,%rdi
je     1525 <main+0x385>
call   1070 <meuLiberaMem@plt>
mov    0x30(%rsp),%rdi
test   %rdi,%rdi
je     1534 <main+0x394>
call   1070 <meuLiberaMem@plt>
mov    0x38(%rsp),%rdi
test   %rdi,%rdi
je     1543 <main+0x3a3>
call   1070 <meuLiberaMem@plt>
mov    0x40(%rsp),%rdi
test   %rdi,%rdi
je     1552 <main+0x3b2>
call   1070 <meuLiberaMem@plt>
mov    0x48(%rsp),%rdi
test   %rdi,%rdi
je     1561 <main+0x3c1>
call   1070 <meuLiberaMem@plt>
mov    0x50(%rsp),%rdi
test   %rdi,%rdi
je     1570 <main+0x3d0>
call   1070 <meuLiberaMem@plt>
mov    0x58(%rsp),%rdi
test   %rdi,%rdi
je     157f <main+0x3df>
call   1070 <meuLiberaMem@plt>
mov    0x60(%rsp),%rdi
test   %rdi,%rdi
je     158e <main+0x3ee>
call   1070 <meuLiberaMem@plt>
mov    0x68(%rsp),%rdi
test   %rdi,%rdi
je     159d <main+0x3fd>
call   1070 <meuLiberaMem@plt>
mov    0x70(%rsp),%rdi
test   %rdi,%rdi
je     15ac <main+0x40c>
call   1070 <meuLiberaMem@plt>
mov    0x78(%rsp),%rdi
test   %rdi,%rdi
je     15bb <main+0x41b>
call   1070 <meuLiberaMem@plt>
xor    %eax,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [32 x i8] c"Alocando %d bytes em vetor[%d]\0A\00"
@.str.1 = [19 x i8] c"Num Operacoes: %d\0A\00"
@.str.2 = [34 x i8] c"Realocando %d bytes em vetor[%d]\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [17 x i8*]
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %7
br label %10
10: ; preds = %17, %2
%11 = load i32, i32* %7
%12 = icmp slt i32 %11, 16
br i1 %12, label %13, label %20
13: ; preds = %10
%14 = load i32, i32* %7
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [17 x i8*], [17 x i8*]* %6, i64 0, i64 %15
store i8* null, i8** %16
br label %17
17: ; preds = %13
%18 = load i32, i32* %7
%19 = add nsw i32 %18, 1
store i32 %19, i32* %7
br label %10
20: ; preds = %10
%21 = call i32 @time(i32 0)
%22 = call i32 @srand(i32 %21)
store i32 0, i32* %7
br label %23
23: ; preds = %41, %20
%24 = load i32, i32* %7
%25 = icmp slt i32 %24, 8
br i1 %25, label %26, label %44
26: ; preds = %23
%27 = call i32 (...) @rand()
%28 = srem i32 %27, 64
store i32 %28, i32* %9
%29 = load i32, i32* %9
%30 = load i32, i32* %7
%31 = add nsw i32 %30, 1
%32 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %29, i32 %31)
%33 = load i32, i32* %9
%34 = add nsw i32 %33, 1
%35 = call i8* @meuAlocaMem(i32 %34)
%36 = load i32, i32* %7
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [17 x i8*], [17 x i8*]* %6, i64 0, i64 %37
store i8* %35, i8** %38
%39 = call i32 (...) @imprMapaB()
%40 = call i32 (...) @imprMapaA()
br label %41
41: ; preds = %26
%42 = load i32, i32* %7
%43 = add nsw i32 %42, 1
store i32 %43, i32* %7
br label %23
44: ; preds = %23
%45 = load i32, i32* %7
%46 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %45)
store i32 0, i32* %7
br label %47
47: ; preds = %91, %44
%48 = load i32, i32* %7
%49 = icmp slt i32 %48, 32
br i1 %49, label %50, label %94
50: ; preds = %47
%51 = call i32 (...) @rand()
%52 = srem i32 %51, 16
store i32 %52, i32* %8
%53 = load i32, i32* %8
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds [17 x i8*], [17 x i8*]* %6, i64 0, i64 %54
%56 = load i8*, i8** %55
%57 = icmp eq i8* %56, null
br i1 %57, label %58, label %71
58: ; preds = %50
%59 = call i32 (...) @rand()
%60 = srem i32 %59, 64
store i32 %60, i32* %9
%61 = load i32, i32* %9
%62 = load i32, i32* %8
%63 = add nsw i32 %62, 1
%64 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %61, i32 %63)
%65 = load i32, i32* %9
%66 = add nsw i32 %65, 1
%67 = call i8* @meuCalocaMem(i32 2, i32 %66)
%68 = load i32, i32* %8
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds [17 x i8*], [17 x i8*]* %6, i64 0, i64 %69
store i8* %67, i8** %70
br label %88
71: ; preds = %50
%72 = call i32 (...) @rand()
%73 = srem i32 %72, 64
store i32 %73, i32* %9
%74 = load i32, i32* %9
%75 = load i32, i32* %8
%76 = add nsw i32 %75, 1
%77 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i32 %74, i32 %76)
%78 = load i32, i32* %8
%79 = sext i32 %78 to i64
%80 = getelementptr inbounds [17 x i8*], [17 x i8*]* %6, i64 0, i64 %79
%81 = load i8*, i8** %80
%82 = load i32, i32* %9
%83 = add nsw i32 %82, 1
%84 = call i8* @meuRealocaMem(i8* %81, i32 %83)
%85 = load i32, i32* %8
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds [17 x i8*], [17 x i8*]* %6, i64 0, i64 %86
store i8* %84, i8** %87
br label %88
88: ; preds = %71, %58
%89 = call i32 (...) @imprMapaB()
%90 = call i32 (...) @imprMapaA()
br label %91
91: ; preds = %88
%92 = load i32, i32* %7
%93 = add nsw i32 %92, 1
store i32 %93, i32* %7
br label %47
94: ; preds = %47
store i32 0, i32* %7
br label %95
95: ; preds = %111, %94
%96 = load i32, i32* %7
%97 = icmp slt i32 %96, 16
br i1 %97, label %98, label %114
98: ; preds = %95
%99 = load i32, i32* %7
%100 = sext i32 %99 to i64
%101 = getelementptr inbounds [17 x i8*], [17 x i8*]* %6, i64 0, i64 %100
%102 = load i8*, i8** %101
%103 = icmp ne i8* %102, null
br i1 %103, label %104, label %110
104: ; preds = %98
%105 = load i32, i32* %7
%106 = sext i32 %105 to i64
%107 = getelementptr inbounds [17 x i8*], [17 x i8*]* %6, i64 0, i64 %106
%108 = load i8*, i8** %107
%109 = call i32 @meuLiberaMem(i8* %108)
br label %110
110: ; preds = %104, %98
br label %111
111: ; preds = %110
%112 = load i32, i32* %7
%113 = add nsw i32 %112, 1
store i32 %113, i32* %7
br label %95
114: ; preds = %95
%115 = load i32, i32* %3
ret i32 %115
}

LLVM IR (-O2):
@.str = [32 x i8] c"Alocando %d bytes em vetor[%d]\0A\00"
@.str.1 = [19 x i8] c"Num Operacoes: %d\0A\00"
@.str.2 = [34 x i8] c"Realocando %d bytes em vetor[%d]\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [17 x i8*]
%4 = bitcast [17 x i8*]* %3 to i8*
%5 = getelementptr inbounds [17 x i8*], [17 x i8*]* %3, i64 0, i64 8
%6 = bitcast i8** %5 to i8*
%7 = tail call i32 @time(i32 0)
%8 = tail call i32 @srand(i32 %7)
%9 = tail call i32 (...) @rand()
%10 = srem i32 %9, 64
%11 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %10, i32 1)
%12 = add nsw i32 %10, 1
%13 = tail call i8* @meuAlocaMem(i32 %12)
%14 = getelementptr inbounds [17 x i8*], [17 x i8*]* %3, i64 0, i64 0
store i8* %13, i8** %14
%15 = tail call i32 (...) @imprMapaB()
%16 = tail call i32 (...) @imprMapaA()
%17 = tail call i32 (...) @rand()
%18 = srem i32 %17, 64
%19 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %18, i32 2)
%20 = add nsw i32 %18, 1
%21 = tail call i8* @meuAlocaMem(i32 %20)
%22 = getelementptr inbounds [17 x i8*], [17 x i8*]* %3, i64 0, i64 1
store i8* %21, i8** %22
%23 = tail call i32 (...) @imprMapaB()
%24 = tail call i32 (...) @imprMapaA()
%25 = tail call i32 (...) @rand()
%26 = srem i32 %25, 64
%27 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %26, i32 3)
%28 = add nsw i32 %26, 1
%29 = tail call i8* @meuAlocaMem(i32 %28)
%30 = getelementptr inbounds [17 x i8*], [17 x i8*]* %3, i64 0, i64 2
store i8* %29, i8** %30
%31 = tail call i32 (...) @imprMapaB()
%32 = tail call i32 (...) @imprMapaA()
%33 = tail call i32 (...) @rand()
%34 = srem i32 %33, 64
%35 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %34, i32 4)
%36 = add nsw i32 %34, 1
%37 = tail call i8* @meuAlocaMem(i32 %36)
%38 = getelementptr inbounds [17 x i8*], [17 x i8*]* %3, i64 0, i64 3
store i8* %37, i8** %38
%39 = tail call i32 (...) @imprMapaB()
%40 = tail call i32 (...) @imprMapaA()
%41 = tail call i32 (...) @rand()
%42 = srem i32 %41, 64
%43 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %42, i32 5)
%44 = add nsw i32 %42, 1
%45 = tail call i8* @meuAlocaMem(i32 %44)
%46 = getelementptr inbounds [17 x i8*], [17 x i8*]* %3, i64 0, i64 4
store i8* %45, i8** %46
%47 = tail call i32 (...) @imprMapaB()
%48 = tail call i32 (...) @imprMapaA()
%49 = tail call i32 (...) @rand()
%50 = srem i32 %49, 64
%51 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %50, i32 6)
%52 = add nsw i32 %50, 1
%53 = tail call i8* @meuAlocaMem(i32 %52)
%54 = getelementptr inbounds [17 x i8*], [17 x i8*]* %3, i64 0, i64 5
store i8* %53, i8** %54
%55 = tail call i32 (...) @imprMapaB()
%56 = tail call i32 (...) @imprMapaA()
%57 = tail call i32 (...) @rand()
%58 = srem i32 %57, 64
%59 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %58, i32 7)
%60 = add nsw i32 %58, 1
%61 = tail call i8* @meuAlocaMem(i32 %60)
%62 = getelementptr inbounds [17 x i8*], [17 x i8*]* %3, i64 0, i64 6
store i8* %61, i8** %62
%63 = tail call i32 (...) @imprMapaB()
%64 = tail call i32 (...) @imprMapaA()
%65 = tail call i32 (...) @rand()
%66 = srem i32 %65, 64
%67 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %66, i32 8)
%68 = add nsw i32 %66, 1
%69 = tail call i8* @meuAlocaMem(i32 %68)
%70 = getelementptr inbounds [17 x i8*], [17 x i8*]* %3, i64 0, i64 7
store i8* %69, i8** %70
%71 = tail call i32 (...) @imprMapaB()
%72 = tail call i32 (...) @imprMapaA()
%73 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 8)
br label %74
74: ; preds = %2, %93
%75 = phi i32 [ 0, %2 ], [ %97, %93 ]
%76 = tail call i32 (...) @rand()
%77 = srem i32 %76, 16
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds [17 x i8*], [17 x i8*]* %3, i64 0, i64 %78
%80 = load i8*, i8** %79
%81 = icmp eq i8* %80, null
%82 = tail call i32 (...) @rand()
%83 = srem i32 %82, 64
%84 = add nsw i32 %77, 1
br i1 %81, label %85, label %89
85: ; preds = %74
%86 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %83, i32 %84)
%87 = add nsw i32 %83, 1
%88 = tail call i8* @meuCalocaMem(i32 2, i32 %87)
br label %93
89: ; preds = %74
%90 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i32 %83, i32 %84)
%91 = add nsw i32 %83, 1
%92 = tail call i8* @meuRealocaMem(i8* %80, i32 %91)
br label %93
93: ; preds = %89, %85
%94 = phi i8* [ %92, %89 ], [ %88, %85 ]
store i8* %94, i8** %79
%95 = tail call i32 (...) @imprMapaB()
%96 = tail call i32 (...) @imprMapaA()
%97 = add nuw nsw i32 %75, 1
%98 = icmp eq i32 %97, 32
br i1 %98, label %99, label %74
99: ; preds = %93
%100 = load i8*, i8** %14
%101 = icmp eq i8* %100, null
br i1 %101, label %104, label %102
102: ; preds = %99
%103 = tail call i32 @meuLiberaMem(i8* %100)
br label %104
104: ; preds = %99, %102
%105 = load i8*, i8** %22
%106 = icmp eq i8* %105, null
br i1 %106, label %109, label %107
107: ; preds = %104
%108 = tail call i32 @meuLiberaMem(i8* %105)
br label %109
109: ; preds = %107, %104
%110 = load i8*, i8** %30
%111 = icmp eq i8* %110, null
br i1 %111, label %114, label %112
112: ; preds = %109
%113 = tail call i32 @meuLiberaMem(i8* %110)
br label %114
114: ; preds = %112, %109
%115 = load i8*, i8** %38
%116 = icmp eq i8* %115, null
br i1 %116, label %119, label %117
117: ; preds = %114
%118 = tail call i32 @meuLiberaMem(i8* %115)
br label %119
119: ; preds = %117, %114
%120 = load i8*, i8** %46
%121 = icmp eq i8* %120, null
br i1 %121, label %124, label %122
122: ; preds = %119
%123 = tail call i32 @meuLiberaMem(i8* %120)
br label %124
124: ; preds = %122, %119
%125 = load i8*, i8** %54
%126 = icmp eq i8* %125, null
br i1 %126, label %129, label %127
127: ; preds = %124
%128 = tail call i32 @meuLiberaMem(i8* %125)
br label %129
129: ; preds = %127, %124
%130 = load i8*, i8** %62
%131 = icmp eq i8* %130, null
br i1 %131, label %134, label %132
132: ; preds = %129
%133 = tail call i32 @meuLiberaMem(i8* %130)
br label %134
134: ; preds = %132, %129
%135 = load i8*, i8** %70
%136 = icmp eq i8* %135, null
br i1 %136, label %139, label %137
137: ; preds = %134
%138 = tail call i32 @meuLiberaMem(i8* %135)
br label %139
139: ; preds = %137, %134
%140 = getelementptr inbounds [17 x i8*], [17 x i8*]* %3, i64 0, i64 8
%141 = load i8*, i8** %140
%142 = icmp eq i8* %141, null
br i1 %142, label %145, label %143
143: ; preds = %139
%144 = tail call i32 @meuLiberaMem(i8* %141)
br label %145
145: ; preds = %143, %139
%146 = getelementptr inbounds [17 x i8*], [17 x i8*]* %3, i64 0, i64 9
%147 = load i8*, i8** %146
%148 = icmp eq i8* %147, null
br i1 %148, label %151, label %149
149: ; preds = %145
%150 = tail call i32 @meuLiberaMem(i8* %147)
br label %151
151: ; preds = %149, %145
%152 = getelementptr inbounds [17 x i8*], [17 x i8*]* %3, i64 0, i64 10
%153 = load i8*, i8** %152
%154 = icmp eq i8* %153, null
br i1 %154, label %157, label %155
155: ; preds = %151
%156 = tail call i32 @meuLiberaMem(i8* %153)
br label %157
157: ; preds = %155, %151
%158 = getelementptr inbounds [17 x i8*], [17 x i8*]* %3, i64 0, i64 11
%159 = load i8*, i8** %158
%160 = icmp eq i8* %159, null
br i1 %160, label %163, label %161
161: ; preds = %157
%162 = tail call i32 @meuLiberaMem(i8* %159)
br label %163
163: ; preds = %161, %157
%164 = getelementptr inbounds [17 x i8*], [17 x i8*]* %3, i64 0, i64 12
%165 = load i8*, i8** %164
%166 = icmp eq i8* %165, null
br i1 %166, label %169, label %167
167: ; preds = %163
%168 = tail call i32 @meuLiberaMem(i8* %165)
br label %169
169: ; preds = %167, %163
%170 = getelementptr inbounds [17 x i8*], [17 x i8*]* %3, i64 0, i64 13
%171 = load i8*, i8** %170
%172 = icmp eq i8* %171, null
br i1 %172, label %175, label %173
173: ; preds = %169
%174 = tail call i32 @meuLiberaMem(i8* %171)
br label %175
175: ; preds = %173, %169
%176 = getelementptr inbounds [17 x i8*], [17 x i8*]* %3, i64 0, i64 14
%177 = load i8*, i8** %176
%178 = icmp eq i8* %177, null
br i1 %178, label %181, label %179
179: ; preds = %175
%180 = tail call i32 @meuLiberaMem(i8* %177)
br label %181
181: ; preds = %179, %175
%182 = getelementptr inbounds [17 x i8*], [17 x i8*]* %3, i64 0, i64 15
%183 = load i8*, i8** %182
%184 = icmp eq i8* %183, null
br i1 %184, label %187, label %185
185: ; preds = %181
%186 = tail call i32 @meuLiberaMem(i8* %183)
br label %187
187: ; preds = %185, %181
ret i32 0
}