#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 */
scalar_t__ calloc(int, int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ free(int *);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ realloc(int *, int);
int main() {
  int *buffer1 = NULL, *buffer2 = NULL, *buffer3 = NULL;
  int i;
  printf("[ANTES] endereco de buffer1 = %p\n", buffer1);
  buffer1 = (int *)malloc(10 * sizeof(int));
  if (buffer1 == NULL)
    exit(-1);
  printf("[DEPOIS] endereco de buffer1 = %p\n", buffer1);
  for (i = 0; i < 10; i++)
    printf("buffer1[%d] = %d\n", i, buffer1[i]);
  printf("[ANTES] endereco de buffer2 = %p\n", buffer2);
  buffer2 = (int *)calloc(10, sizeof(int));
  if (!buffer2)
    exit(-1);
  int *temp = buffer2;
  printf("[DEPOIS] endereco de buffer2 = %p\n", buffer2);
  for (i = 0; i < 10; i++)
    printf("buffer2[%d] = %d\n", i, *(temp++));
  printf("[ANTES] endereco de buffer3 = %p\n", buffer3);
  buffer3 = (int *)realloc(buffer2, 2 * 10 * sizeof(int));
  if (!buffer3)
    exit(-1);
  temp = buffer3;
  printf("[DEPOIS] endereco de buffer3 = %p\n", buffer3);
  for (i = 0; i < 2 * 10; i++)
    printf("buffer3[%d] = %d\n", i, *(temp++));
  free(buffer1);
  free(buffer3);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xe6e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x28,%edi
call   1060 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    11bc <main+0x5c>
mov    $0xffffffff,%edi
call   1080 <exit@plt>
mov    -0x10(%rbp),%rsi
lea    0xe5b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x24(%rbp)
cmpl   $0xa,-0x24(%rbp)
jge    1209 <main+0xa9>
mov    -0x24(%rbp),%esi
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
lea    0xe51(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11d5 <main+0x75>
mov    -0x18(%rbp),%rsi
lea    0xe43(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0xa,%edi
mov    $0x4,%esi
call   1050 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1243 <main+0xe3>
mov    $0xffffffff,%edi
call   1080 <exit@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xe23(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x24(%rbp)
cmpl   $0xa,-0x24(%rbp)
jge    129e <main+0x13e>
mov    -0x24(%rbp),%esi
mov    -0x30(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x30(%rbp)
mov    (%rax),%edx
lea    0xe13(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1264 <main+0x104>
mov    -0x20(%rbp),%rsi
lea    0xe05(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rdi
mov    $0x50,%esi
call   1070 <realloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    12d7 <main+0x177>
mov    $0xffffffff,%edi
call   1080 <exit@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%rsi
lea    0xde6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x24(%rbp)
cmpl   $0x14,-0x24(%rbp)
jge    1332 <main+0x1d2>
mov    -0x24(%rbp),%esi
mov    -0x30(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x30(%rbp)
mov    (%rax),%edx
lea    0xdd6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    12f8 <main+0x198>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
lea    0xe94(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x28,%edi
call   1060 <malloc@plt>
test   %rax,%rax
je     150d <main+0x3ad>
mov    %rax,%r14
lea    0xe90(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%r14),%edx
lea    0xe9f(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x4(%r14),%edx
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%r14),%edx
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xc(%r14),%edx
mov    %rbx,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%r14),%edx
mov    %rbx,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x14(%r14),%edx
mov    %rbx,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x18(%r14),%edx
mov    %rbx,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x1c(%r14),%edx
mov    %rbx,%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x20(%r14),%edx
mov    %rbx,%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x24(%r14),%edx
mov    %rbx,%rdi
mov    $0x9,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xdf3(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
mov    $0x4,%esi
call   1050 <calloc@plt>
test   %rax,%rax
je     150d <main+0x3ad>
mov    %rax,%rbx
lea    0xdea(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%rbx),%edx
lea    0xdfa(%rip),%r15
mov    %r15,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x4(%rbx),%edx
mov    %r15,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rbx),%edx
mov    %r15,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xc(%rbx),%edx
mov    %r15,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%rbx),%edx
mov    %r15,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x14(%rbx),%edx
mov    %r15,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x18(%rbx),%edx
mov    %r15,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x1c(%rbx),%edx
mov    %r15,%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x20(%rbx),%edx
mov    %r15,%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x24(%rbx),%edx
mov    %r15,%rdi
mov    $0x9,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xd57(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
mov    $0x50,%esi
call   1070 <realloc@plt>
test   %rax,%rax
je     150d <main+0x3ad>
mov    %rax,%rbx
lea    0xd50(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%rbx),%edx
lea    0xd60(%rip),%r15
mov    %r15,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x4(%rbx),%edx
mov    %r15,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%rbx),%edx
mov    %r15,%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0xc(%rbx),%edx
mov    %r15,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x10(%rbx),%edx
mov    %r15,%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x14(%rbx),%edx
mov    %r15,%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x18(%rbx),%edx
mov    %r15,%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x1c(%rbx),%edx
mov    %r15,%rdi
mov    $0x7,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x20(%rbx),%edx
mov    %r15,%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x24(%rbx),%edx
mov    %r15,%rdi
mov    $0x9,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x28(%rbx),%edx
mov    %r15,%rdi
mov    $0xa,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x2c(%rbx),%edx
mov    %r15,%rdi
mov    $0xb,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x30(%rbx),%edx
mov    %r15,%rdi
mov    $0xc,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x34(%rbx),%edx
mov    %r15,%rdi
mov    $0xd,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x38(%rbx),%edx
mov    %r15,%rdi
mov    $0xe,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x3c(%rbx),%edx
mov    %r15,%rdi
mov    $0xf,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x40(%rbx),%edx
mov    %r15,%rdi
mov    $0x10,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x44(%rbx),%edx
mov    %r15,%rdi
mov    $0x11,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x48(%rbx),%edx
mov    %r15,%rdi
mov    $0x12,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x4c(%rbx),%edx
mov    %r15,%rdi
mov    $0x13,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret
mov    $0xffffffff,%edi
call   1080 <exit@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"[ANTES] endereco de buffer1 = %p\0A\00"
@.str.1 = [35 x i8] c"[DEPOIS] endereco de buffer1 = %p\0A\00"
@.str.2 = [18 x i8] c"buffer1[%d] = %d\0A\00"
@.str.3 = [34 x i8] c"[ANTES] endereco de buffer2 = %p\0A\00"
@.str.4 = [35 x i8] c"[DEPOIS] endereco de buffer2 = %p\0A\00"
@.str.5 = [18 x i8] c"buffer2[%d] = %d\0A\00"
@.str.6 = [34 x i8] c"[ANTES] endereco de buffer3 = %p\0A\00"
@.str.7 = [35 x i8] c"[DEPOIS] endereco de buffer3 = %p\0A\00"
@.str.8 = [18 x i8] c"buffer3[%d] = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32*
store i32 0, i32* %1
store i32* null, i32** %2
store i32* null, i32** %3
store i32* null, i32** %4
%7 = load i32*, i32** %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32* %7)
%9 = call i64 @malloc(i32 40)
%10 = inttoptr i64 %9 to i32*
store i32* %10, i32** %2
%11 = load i32*, i32** %2
%12 = icmp eq i32* %11, null
br i1 %12, label %13, label %15
13: ; preds = %0
%14 = call i32 @exit(i32 -1)
unreachable
15: ; preds = %0
%16 = load i32*, i32** %2
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i32* %16)
store i32 0, i32* %5
br label %18
18: ; preds = %29, %15
%19 = load i32, i32* %5
%20 = icmp slt i32 %19, 10
br i1 %20, label %21, label %32
21: ; preds = %18
%22 = load i32, i32* %5
%23 = load i32*, i32** %2
%24 = load i32, i32* %5
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i32, i32* %23, i64 %25
%27 = load i32, i32* %26
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 %22, i32 %27)
br label %29
29: ; preds = %21
%30 = load i32, i32* %5
%31 = add nsw i32 %30, 1
store i32 %31, i32* %5
br label %18
32: ; preds = %18
%33 = load i32*, i32** %3
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0), i32* %33)
%35 = call i64 @calloc(i32 10, i32 4)
%36 = inttoptr i64 %35 to i32*
store i32* %36, i32** %3
%37 = load i32*, i32** %3
%38 = icmp ne i32* %37, null
br i1 %38, label %41, label %39
39: ; preds = %32
%40 = call i32 @exit(i32 -1)
unreachable
41: ; preds = %32
%42 = load i32*, i32** %3
store i32* %42, i32** %6
%43 = load i32*, i32** %3
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i32* %43)
store i32 0, i32* %5
br label %45
45: ; preds = %54, %41
%46 = load i32, i32* %5
%47 = icmp slt i32 %46, 10
br i1 %47, label %48, label %57
48: ; preds = %45
%49 = load i32, i32* %5
%50 = load i32*, i32** %6
%51 = getelementptr inbounds i32, i32* %50, i32 1
store i32* %51, i32** %6
%52 = load i32, i32* %50
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i32 %49, i32 %52)
br label %54
54: ; preds = %48
%55 = load i32, i32* %5
%56 = add nsw i32 %55, 1
store i32 %56, i32* %5
br label %45
57: ; preds = %45
%58 = load i32*, i32** %4
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.6, i64 0, i64 0), i32* %58)
%60 = load i32*, i32** %3
%61 = call i64 @realloc(i32* %60, i32 80)
%62 = inttoptr i64 %61 to i32*
store i32* %62, i32** %4
%63 = load i32*, i32** %4
%64 = icmp ne i32* %63, null
br i1 %64, label %67, label %65
65: ; preds = %57
%66 = call i32 @exit(i32 -1)
unreachable
67: ; preds = %57
%68 = load i32*, i32** %4
store i32* %68, i32** %6
%69 = load i32*, i32** %4
%70 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.7, i64 0, i64 0), i32* %69)
store i32 0, i32* %5
br label %71
71: ; preds = %80, %67
%72 = load i32, i32* %5
%73 = icmp slt i32 %72, 20
br i1 %73, label %74, label %83
74: ; preds = %71
%75 = load i32, i32* %5
%76 = load i32*, i32** %6
%77 = getelementptr inbounds i32, i32* %76, i32 1
store i32* %77, i32** %6
%78 = load i32, i32* %76
%79 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 %75, i32 %78)
br label %80
80: ; preds = %74
%81 = load i32, i32* %5
%82 = add nsw i32 %81, 1
store i32 %82, i32* %5
br label %71
83: ; preds = %71
%84 = load i32*, i32** %2
%85 = call i32 @free(i32* %84)
%86 = load i32*, i32** %4
%87 = call i32 @free(i32* %86)
ret i32 0
}

LLVM IR (-O2):
@.str = [34 x i8] c"[ANTES] endereco de buffer1 = %p\0A\00"
@.str.1 = [35 x i8] c"[DEPOIS] endereco de buffer1 = %p\0A\00"
@.str.2 = [18 x i8] c"buffer1[%d] = %d\0A\00"
@.str.3 = [34 x i8] c"[ANTES] endereco de buffer2 = %p\0A\00"
@.str.4 = [35 x i8] c"[DEPOIS] endereco de buffer2 = %p\0A\00"
@.str.5 = [18 x i8] c"buffer2[%d] = %d\0A\00"
@.str.6 = [34 x i8] c"[ANTES] endereco de buffer3 = %p\0A\00"
@.str.7 = [35 x i8] c"[DEPOIS] endereco de buffer3 = %p\0A\00"
@.str.8 = [18 x i8] c"buffer3[%d] = %d\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32* null)
%2 = tail call i64 @malloc(i32 40)
%3 = inttoptr i64 %2 to i32*
%4 = icmp eq i64 %2, 0
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = tail call i32 @exit(i32 -1)
unreachable
7: ; preds = %0
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%9 = load i32, i32* %3
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 0, i32 %9)
%11 = getelementptr inbounds i32, i32* %3, i64 1
%12 = load i32, i32* %11
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 1, i32 %12)
%14 = getelementptr inbounds i32, i32* %3, i64 2
%15 = load i32, i32* %14
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 2, i32 %15)
%17 = getelementptr inbounds i32, i32* %3, i64 3
%18 = load i32, i32* %17
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 3, i32 %18)
%20 = getelementptr inbounds i32, i32* %3, i64 4
%21 = load i32, i32* %20
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 4, i32 %21)
%23 = getelementptr inbounds i32, i32* %3, i64 5
%24 = load i32, i32* %23
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 5, i32 %24)
%26 = getelementptr inbounds i32, i32* %3, i64 6
%27 = load i32, i32* %26
%28 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 6, i32 %27)
%29 = getelementptr inbounds i32, i32* %3, i64 7
%30 = load i32, i32* %29
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 7, i32 %30)
%32 = getelementptr inbounds i32, i32* %3, i64 8
%33 = load i32, i32* %32
%34 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 8, i32 %33)
%35 = getelementptr inbounds i32, i32* %3, i64 9
%36 = load i32, i32* %35
%37 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 9, i32 %36)
%38 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0), i32* null)
%39 = tail call i64 @calloc(i32 10, i32 4)
%40 = inttoptr i64 %39 to i32*
%41 = icmp eq i64 %39, 0
br i1 %41, label %42, label %44
42: ; preds = %7
%43 = tail call i32 @exit(i32 -1)
unreachable
44: ; preds = %7
%45 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.4, i64 0, i64 0), i32* %40)
%46 = getelementptr inbounds i32, i32* %40, i64 1
%47 = load i32, i32* %40
%48 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i32 0, i32 %47)
%49 = getelementptr inbounds i32, i32* %40, i64 2
%50 = load i32, i32* %46
%51 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i32 1, i32 %50)
%52 = getelementptr inbounds i32, i32* %40, i64 3
%53 = load i32, i32* %49
%54 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i32 2, i32 %53)
%55 = getelementptr inbounds i32, i32* %40, i64 4
%56 = load i32, i32* %52
%57 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i32 3, i32 %56)
%58 = getelementptr inbounds i32, i32* %40, i64 5
%59 = load i32, i32* %55
%60 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i32 4, i32 %59)
%61 = getelementptr inbounds i32, i32* %40, i64 6
%62 = load i32, i32* %58
%63 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i32 5, i32 %62)
%64 = getelementptr inbounds i32, i32* %40, i64 7
%65 = load i32, i32* %61
%66 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i32 6, i32 %65)
%67 = getelementptr inbounds i32, i32* %40, i64 8
%68 = load i32, i32* %64
%69 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i32 7, i32 %68)
%70 = getelementptr inbounds i32, i32* %40, i64 9
%71 = load i32, i32* %67
%72 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i32 8, i32 %71)
%73 = load i32, i32* %70
%74 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.5, i64 0, i64 0), i32 9, i32 %73)
%75 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.6, i64 0, i64 0), i32* null)
%76 = tail call i64 @realloc(i32* %40, i32 80)
%77 = inttoptr i64 %76 to i32*
%78 = icmp eq i64 %76, 0
br i1 %78, label %79, label %81
79: ; preds = %44
%80 = tail call i32 @exit(i32 -1)
unreachable
81: ; preds = %44
%82 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.7, i64 0, i64 0), i32* %77)
%83 = getelementptr inbounds i32, i32* %77, i64 1
%84 = load i32, i32* %77
%85 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 0, i32 %84)
%86 = getelementptr inbounds i32, i32* %77, i64 2
%87 = load i32, i32* %83
%88 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 1, i32 %87)
%89 = getelementptr inbounds i32, i32* %77, i64 3
%90 = load i32, i32* %86
%91 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 2, i32 %90)
%92 = getelementptr inbounds i32, i32* %77, i64 4
%93 = load i32, i32* %89
%94 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 3, i32 %93)
%95 = getelementptr inbounds i32, i32* %77, i64 5
%96 = load i32, i32* %92
%97 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 4, i32 %96)
%98 = getelementptr inbounds i32, i32* %77, i64 6
%99 = load i32, i32* %95
%100 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 5, i32 %99)
%101 = getelementptr inbounds i32, i32* %77, i64 7
%102 = load i32, i32* %98
%103 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 6, i32 %102)
%104 = getelementptr inbounds i32, i32* %77, i64 8
%105 = load i32, i32* %101
%106 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 7, i32 %105)
%107 = getelementptr inbounds i32, i32* %77, i64 9
%108 = load i32, i32* %104
%109 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 8, i32 %108)
%110 = getelementptr inbounds i32, i32* %77, i64 10
%111 = load i32, i32* %107
%112 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 9, i32 %111)
%113 = getelementptr inbounds i32, i32* %77, i64 11
%114 = load i32, i32* %110
%115 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 10, i32 %114)
%116 = getelementptr inbounds i32, i32* %77, i64 12
%117 = load i32, i32* %113
%118 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 11, i32 %117)
%119 = getelementptr inbounds i32, i32* %77, i64 13
%120 = load i32, i32* %116
%121 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 12, i32 %120)
%122 = getelementptr inbounds i32, i32* %77, i64 14
%123 = load i32, i32* %119
%124 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 13, i32 %123)
%125 = getelementptr inbounds i32, i32* %77, i64 15
%126 = load i32, i32* %122
%127 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 14, i32 %126)
%128 = getelementptr inbounds i32, i32* %77, i64 16
%129 = load i32, i32* %125
%130 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 15, i32 %129)
%131 = getelementptr inbounds i32, i32* %77, i64 17
%132 = load i32, i32* %128
%133 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 16, i32 %132)
%134 = getelementptr inbounds i32, i32* %77, i64 18
%135 = load i32, i32* %131
%136 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 17, i32 %135)
%137 = getelementptr inbounds i32, i32* %77, i64 19
%138 = load i32, i32* %134
%139 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 18, i32 %138)
%140 = load i32, i32* %137
%141 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 19, i32 %140)
%142 = tail call i32 @free(i32* %3)
%143 = tail call i32 @free(i32* %77)
ret i32 0
}