#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*/ build();
int calculate(int *, int, int *);
int /*<<< orphan*/ estimate();
int generate_inputs(int *);
scalar_t__ malloc(int);
int /*<<< orphan*/ printout();
int /*<<< orphan*/ test();
int main(int argc, char *argv[]) {
  int *T = (int *)malloc(sizeof(int));
  int *P = (int *)malloc(sizeof(int));
  int Ti, Pi;
  Ti = generate_inputs(T);
  Pi = calculate(T, Ti, P);
  estimate();
  build();
  test();
  printout();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x4,%edi
call   1070 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    $0x4,%edi
call   1070 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <generate_inputs@plt>
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x24(%rbp),%esi
mov    -0x20(%rbp),%rdx
call   1060 <calculate@plt>
mov    %eax,-0x28(%rbp)
mov    $0x0,%al
call   1080 <estimate@plt>
mov    $0x0,%al
call   1050 <build@plt>
mov    $0x0,%al
call   1090 <test@plt>
mov    $0x0,%al
call   1040 <printout@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x4,%edi
call   1070 <malloc@plt>
mov    %rax,%rbx
mov    $0x4,%edi
call   1070 <malloc@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <generate_inputs@plt>
mov    %rbx,%rdi
mov    %eax,%esi
mov    %r14,%rdx
call   1060 <calculate@plt>
xor    %eax,%eax
call   1080 <estimate@plt>
xor    %eax,%eax
call   1050 <build@plt>
xor    %eax,%eax
call   1090 <test@plt>
xor    %eax,%eax
call   1040 <printout@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %3
store i8** %1, i8*** %4
%9 = call i64 @malloc(i32 4)
%10 = inttoptr i64 %9 to i32*
store i32* %10, i32** %5
%11 = call i64 @malloc(i32 4)
%12 = inttoptr i64 %11 to i32*
store i32* %12, i32** %6
%13 = load i32*, i32** %5
%14 = call i32 @generate_inputs(i32* %13)
store i32 %14, i32* %7
%15 = load i32*, i32** %5
%16 = load i32, i32* %7
%17 = load i32*, i32** %6
%18 = call i32 @calculate(i32* %15, i32 %16, i32* %17)
store i32 %18, i32* %8
%19 = call i32 (...) @estimate()
%20 = call i32 (...) @build()
%21 = call i32 (...) @test()
%22 = call i32 (...) @printout()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 @malloc(i32 4)
%4 = inttoptr i64 %3 to i32*
%5 = tail call i64 @malloc(i32 4)
%6 = inttoptr i64 %5 to i32*
%7 = tail call i32 @generate_inputs(i32* %4)
%8 = tail call i32 @calculate(i32* %4, i32 %7, i32* %6)
%9 = tail call i32 (...) @estimate()
%10 = tail call i32 (...) @build()
%11 = tail call i32 (...) @test()
%12 = tail call i32 (...) @printout()
ret i32 0
}