#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*/ free(int *);
scalar_t__ malloc(int);
int main(int argc, char **argv) {
  int *a, *b, *c, *d, *e;
  a = (int *)malloc(sizeof(int));
  b = (int *)malloc(sizeof(int));
  if (e == a) {
    *a = 12;
  } else {
    e = a;
  }
  a = c;
  if (d != b) {
    d = b;
  }
  b = c;
  free(d);
  free(e);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x38(%rbp),%rax
cmp    -0x18(%rbp),%rax
jne    116f <main+0x4f>
mov    -0x18(%rbp),%rax
movl   $0xc,(%rax)
jmp    1177 <main+0x57>
mov    -0x18(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x30(%rbp),%rax
cmp    -0x20(%rbp),%rax
je     1195 <main+0x75>
mov    -0x20(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%11 = call i64 @malloc(i32 4)
%12 = inttoptr i64 %11 to i32*
store i32* %12, i32** %6
%13 = call i64 @malloc(i32 4)
%14 = inttoptr i64 %13 to i32*
store i32* %14, i32** %7
%15 = load i32*, i32** %10
%16 = load i32*, i32** %6
%17 = icmp eq i32* %15, %16
br i1 %17, label %18, label %20
18: ; preds = %2
%19 = load i32*, i32** %6
store i32 12, i32* %19
br label %22
20: ; preds = %2
%21 = load i32*, i32** %6
store i32* %21, i32** %10
br label %22
22: ; preds = %20, %18
%23 = load i32*, i32** %8
store i32* %23, i32** %6
%24 = load i32*, i32** %9
%25 = load i32*, i32** %7
%26 = icmp ne i32* %24, %25
br i1 %26, label %27, label %29
27: ; preds = %22
%28 = load i32*, i32** %7
store i32* %28, i32** %9
br label %29
29: ; preds = %27, %22
%30 = load i32*, i32** %8
store i32* %30, i32** %7
%31 = load i32*, i32** %9
%32 = call i32 @free(i32* %31)
%33 = load i32*, i32** %10
%34 = call i32 @free(i32* %33)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 @malloc(i32 4)
%4 = tail call i64 @malloc(i32 4)
%5 = inttoptr i64 %4 to i32*
%6 = inttoptr i64 %3 to i32*
%7 = tail call i32 @free(i32* %5)
%8 = tail call i32 @free(i32* %6)
ret i32 0
}