#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*/ assert(int);
int /*<<< orphan*/ consistent_tests();
int /*<<< orphan*/ dual_test();
int /*<<< orphan*/ flat_test();
int /*<<< orphan*/ simple_test();
int /*<<< orphan*/ talloc_enable_null_tracking();
unsigned int talloc_total_size(int /*<<< orphan*/ *);
int main() {
  unsigned int size;
  talloc_enable_null_tracking();
  size = talloc_total_size(NULL);
  simple_test();
  assert(talloc_total_size(NULL) == size);
  consistent_tests();
  assert(talloc_total_size(NULL) == size);
  flat_test();
  assert(talloc_total_size(NULL) == size);
  dual_test();
  assert(talloc_total_size(NULL) == size);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1080 <talloc_enable_null_tracking@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1090 <talloc_total_size@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <simple_test@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1090 <talloc_total_size@plt>
cmp    -0x8(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    $0x0,%al
call   1060 <consistent_tests@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1090 <talloc_total_size@plt>
cmp    -0x8(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    $0x0,%al
call   1070 <flat_test@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1090 <talloc_total_size@plt>
cmp    -0x8(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    $0x0,%al
call   1030 <dual_test@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1090 <talloc_total_size@plt>
cmp    -0x8(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1080 <talloc_enable_null_tracking@plt>
xor    %edi,%edi
call   1090 <talloc_total_size@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <simple_test@plt>
xor    %edi,%edi
call   1090 <talloc_total_size@plt>
xor    %edi,%edi
cmp    %ebx,%eax
sete   %dil
call   1050 <assert@plt>
xor    %eax,%eax
call   1060 <consistent_tests@plt>
xor    %edi,%edi
call   1090 <talloc_total_size@plt>
xor    %edi,%edi
cmp    %ebx,%eax
sete   %dil
call   1050 <assert@plt>
xor    %eax,%eax
call   1070 <flat_test@plt>
xor    %edi,%edi
call   1090 <talloc_total_size@plt>
xor    %edi,%edi
cmp    %ebx,%eax
sete   %dil
call   1050 <assert@plt>
xor    %eax,%eax
call   1030 <dual_test@plt>
xor    %edi,%edi
call   1090 <talloc_total_size@plt>
xor    %edi,%edi
cmp    %ebx,%eax
sete   %dil
call   1050 <assert@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @talloc_enable_null_tracking()
%4 = call i32 @talloc_total_size(i32* null)
store i32 %4, i32* %2
%5 = call i32 (...) @simple_test()
%6 = call i32 @talloc_total_size(i32* null)
%7 = load i32, i32* %2
%8 = icmp eq i32 %6, %7
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
%11 = call i32 (...) @consistent_tests()
%12 = call i32 @talloc_total_size(i32* null)
%13 = load i32, i32* %2
%14 = icmp eq i32 %12, %13
%15 = zext i1 %14 to i32
%16 = call i32 @assert(i32 %15)
%17 = call i32 (...) @flat_test()
%18 = call i32 @talloc_total_size(i32* null)
%19 = load i32, i32* %2
%20 = icmp eq i32 %18, %19
%21 = zext i1 %20 to i32
%22 = call i32 @assert(i32 %21)
%23 = call i32 (...) @dual_test()
%24 = call i32 @talloc_total_size(i32* null)
%25 = load i32, i32* %2
%26 = icmp eq i32 %24, %25
%27 = zext i1 %26 to i32
%28 = call i32 @assert(i32 %27)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @talloc_enable_null_tracking()
%2 = tail call i32 @talloc_total_size(i32* null)
%3 = tail call i32 (...) @simple_test()
%4 = tail call i32 @talloc_total_size(i32* null)
%5 = icmp eq i32 %4, %2
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
%8 = tail call i32 (...) @consistent_tests()
%9 = tail call i32 @talloc_total_size(i32* null)
%10 = icmp eq i32 %9, %2
%11 = zext i1 %10 to i32
%12 = tail call i32 @assert(i32 %11)
%13 = tail call i32 (...) @flat_test()
%14 = tail call i32 @talloc_total_size(i32* null)
%15 = icmp eq i32 %14, %2
%16 = zext i1 %15 to i32
%17 = tail call i32 @assert(i32 %16)
%18 = tail call i32 (...) @dual_test()
%19 = tail call i32 @talloc_total_size(i32* null)
%20 = icmp eq i32 %19, %2
%21 = zext i1 %20 to i32
%22 = tail call i32 @assert(i32 %21)
ret i32 0
}