#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*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ free(char *);
scalar_t__ malloc(int);
int main() {
  char *a = (char *)malloc(100);
  char *b = (char *)malloc(100);
  char *c = (char *)malloc(100);
  char *d = (char *)malloc(100);
  char *e = (char *)malloc(100);
  char *f = (char *)malloc(100);
  char *g = (char *)malloc(100);
  char *h = (char *)malloc(100);
  char *i = (char *)malloc(100);
  char *j = (char *)malloc(100);
  char *k = (char *)malloc(100);
  char *l = (char *)malloc(100);
  char *m = (char *)malloc(100);
  char *n = (char *)malloc(100);
  char *o = (char *)malloc(100);
  char *p = (char *)malloc(100);
  char *q = (char *)malloc(100);
  free(q);
  free(p);
  free(o);
  free(n);
  free(m);
  a[120] = 2;
  free(l);
  free(k);
  free(j);
  free(i);
  free(h);
  g[-9] = 2;
  free(g);
  free(f);
  free(e);
  free(d);
  free(c);
  free(b);
  free(a);
  exit(0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,-0x28(%rbp)
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,-0x30(%rbp)
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,-0x38(%rbp)
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,-0x40(%rbp)
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,-0x48(%rbp)
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,-0x50(%rbp)
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,-0x58(%rbp)
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,-0x60(%rbp)
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,-0x68(%rbp)
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,-0x70(%rbp)
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,-0x78(%rbp)
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,-0x80(%rbp)
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,-0x88(%rbp)
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,-0x90(%rbp)
mov    -0x90(%rbp),%rdi
call   1030 <free@plt>
mov    -0x88(%rbp),%rdi
call   1030 <free@plt>
mov    -0x80(%rbp),%rdi
call   1030 <free@plt>
mov    -0x78(%rbp),%rdi
call   1030 <free@plt>
mov    -0x70(%rbp),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rax
movb   $0x2,0x78(%rax)
mov    -0x68(%rbp),%rdi
call   1030 <free@plt>
mov    -0x60(%rbp),%rdi
call   1030 <free@plt>
mov    -0x58(%rbp),%rdi
call   1030 <free@plt>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%rax
movb   $0x2,-0x9(%rax)
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,0x28(%rsp)
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,0x50(%rsp)
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,0x48(%rsp)
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,0x40(%rsp)
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,0x38(%rsp)
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,0x30(%rsp)
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,%r14
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,0x20(%rsp)
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,0x18(%rsp)
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,0x10(%rsp)
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,0x8(%rsp)
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,%r15
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,%r12
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,%r13
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,%rbp
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,%rdi
call   1030 <free@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    %r13,%rdi
call   1030 <free@plt>
mov    %r12,%rdi
call   1030 <free@plt>
mov    %r15,%rdi
call   1030 <free@plt>
mov    0x28(%rsp),%rbp
movb   $0x2,0x78(%rbp)
mov    %rbx,%rdi
call   1030 <free@plt>
mov    0x8(%rsp),%rdi
call   1030 <free@plt>
mov    0x10(%rsp),%rdi
call   1030 <free@plt>
mov    0x18(%rsp),%rdi
call   1030 <free@plt>
mov    0x20(%rsp),%rdi
call   1030 <free@plt>
movb   $0x2,-0x9(%r14)
mov    %r14,%rdi
call   1030 <free@plt>
mov    0x30(%rsp),%rdi
call   1030 <free@plt>
mov    0x38(%rsp),%rdi
call   1030 <free@plt>
mov    0x40(%rsp),%rdi
call   1030 <free@plt>
mov    0x48(%rsp),%rdi
call   1030 <free@plt>
mov    0x50(%rsp),%rdi
call   1030 <free@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i8*
%16 = alloca i8*
%17 = alloca i8*
%18 = alloca i8*
store i32 0, i32* %1
%19 = call i64 @malloc(i32 100)
%20 = inttoptr i64 %19 to i8*
store i8* %20, i8** %2
%21 = call i64 @malloc(i32 100)
%22 = inttoptr i64 %21 to i8*
store i8* %22, i8** %3
%23 = call i64 @malloc(i32 100)
%24 = inttoptr i64 %23 to i8*
store i8* %24, i8** %4
%25 = call i64 @malloc(i32 100)
%26 = inttoptr i64 %25 to i8*
store i8* %26, i8** %5
%27 = call i64 @malloc(i32 100)
%28 = inttoptr i64 %27 to i8*
store i8* %28, i8** %6
%29 = call i64 @malloc(i32 100)
%30 = inttoptr i64 %29 to i8*
store i8* %30, i8** %7
%31 = call i64 @malloc(i32 100)
%32 = inttoptr i64 %31 to i8*
store i8* %32, i8** %8
%33 = call i64 @malloc(i32 100)
%34 = inttoptr i64 %33 to i8*
store i8* %34, i8** %9
%35 = call i64 @malloc(i32 100)
%36 = inttoptr i64 %35 to i8*
store i8* %36, i8** %10
%37 = call i64 @malloc(i32 100)
%38 = inttoptr i64 %37 to i8*
store i8* %38, i8** %11
%39 = call i64 @malloc(i32 100)
%40 = inttoptr i64 %39 to i8*
store i8* %40, i8** %12
%41 = call i64 @malloc(i32 100)
%42 = inttoptr i64 %41 to i8*
store i8* %42, i8** %13
%43 = call i64 @malloc(i32 100)
%44 = inttoptr i64 %43 to i8*
store i8* %44, i8** %14
%45 = call i64 @malloc(i32 100)
%46 = inttoptr i64 %45 to i8*
store i8* %46, i8** %15
%47 = call i64 @malloc(i32 100)
%48 = inttoptr i64 %47 to i8*
store i8* %48, i8** %16
%49 = call i64 @malloc(i32 100)
%50 = inttoptr i64 %49 to i8*
store i8* %50, i8** %17
%51 = call i64 @malloc(i32 100)
%52 = inttoptr i64 %51 to i8*
store i8* %52, i8** %18
%53 = load i8*, i8** %18
%54 = call i32 @free(i8* %53)
%55 = load i8*, i8** %17
%56 = call i32 @free(i8* %55)
%57 = load i8*, i8** %16
%58 = call i32 @free(i8* %57)
%59 = load i8*, i8** %15
%60 = call i32 @free(i8* %59)
%61 = load i8*, i8** %14
%62 = call i32 @free(i8* %61)
%63 = load i8*, i8** %2
%64 = getelementptr inbounds i8, i8* %63, i64 120
store i8 2, i8* %64
%65 = load i8*, i8** %13
%66 = call i32 @free(i8* %65)
%67 = load i8*, i8** %12
%68 = call i32 @free(i8* %67)
%69 = load i8*, i8** %11
%70 = call i32 @free(i8* %69)
%71 = load i8*, i8** %10
%72 = call i32 @free(i8* %71)
%73 = load i8*, i8** %9
%74 = call i32 @free(i8* %73)
%75 = load i8*, i8** %8
%76 = getelementptr inbounds i8, i8* %75, i64 -9
store i8 2, i8* %76
%77 = load i8*, i8** %8
%78 = call i32 @free(i8* %77)
%79 = load i8*, i8** %7
%80 = call i32 @free(i8* %79)
%81 = load i8*, i8** %6
%82 = call i32 @free(i8* %81)
%83 = load i8*, i8** %5
%84 = call i32 @free(i8* %83)
%85 = load i8*, i8** %4
%86 = call i32 @free(i8* %85)
%87 = load i8*, i8** %3
%88 = call i32 @free(i8* %87)
%89 = load i8*, i8** %2
%90 = call i32 @free(i8* %89)
%91 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @malloc(i32 100)
%2 = inttoptr i64 %1 to i8*
%3 = tail call i64 @malloc(i32 100)
%4 = inttoptr i64 %3 to i8*
%5 = tail call i64 @malloc(i32 100)
%6 = inttoptr i64 %5 to i8*
%7 = tail call i64 @malloc(i32 100)
%8 = inttoptr i64 %7 to i8*
%9 = tail call i64 @malloc(i32 100)
%10 = inttoptr i64 %9 to i8*
%11 = tail call i64 @malloc(i32 100)
%12 = inttoptr i64 %11 to i8*
%13 = tail call i64 @malloc(i32 100)
%14 = inttoptr i64 %13 to i8*
%15 = tail call i64 @malloc(i32 100)
%16 = inttoptr i64 %15 to i8*
%17 = tail call i64 @malloc(i32 100)
%18 = inttoptr i64 %17 to i8*
%19 = tail call i64 @malloc(i32 100)
%20 = inttoptr i64 %19 to i8*
%21 = tail call i64 @malloc(i32 100)
%22 = inttoptr i64 %21 to i8*
%23 = tail call i64 @malloc(i32 100)
%24 = inttoptr i64 %23 to i8*
%25 = tail call i64 @malloc(i32 100)
%26 = inttoptr i64 %25 to i8*
%27 = tail call i64 @malloc(i32 100)
%28 = inttoptr i64 %27 to i8*
%29 = tail call i64 @malloc(i32 100)
%30 = inttoptr i64 %29 to i8*
%31 = tail call i64 @malloc(i32 100)
%32 = inttoptr i64 %31 to i8*
%33 = tail call i64 @malloc(i32 100)
%34 = inttoptr i64 %33 to i8*
%35 = tail call i32 @free(i8* %34)
%36 = tail call i32 @free(i8* %32)
%37 = tail call i32 @free(i8* %30)
%38 = tail call i32 @free(i8* %28)
%39 = tail call i32 @free(i8* %26)
%40 = getelementptr inbounds i8, i8* %2, i64 120
store i8 2, i8* %40
%41 = tail call i32 @free(i8* %24)
%42 = tail call i32 @free(i8* %22)
%43 = tail call i32 @free(i8* %20)
%44 = tail call i32 @free(i8* %18)
%45 = tail call i32 @free(i8* %16)
%46 = getelementptr inbounds i8, i8* %14, i64 -9
store i8 2, i8* %46
%47 = tail call i32 @free(i8* %14)
%48 = tail call i32 @free(i8* %12)
%49 = tail call i32 @free(i8* %10)
%50 = tail call i32 @free(i8* %8)
%51 = tail call i32 @free(i8* %6)
%52 = tail call i32 @free(i8* %4)
%53 = tail call i32 @free(i8* %2)
%54 = tail call i32 @exit(i32 0)
unreachable
}