#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*/ appli_function1(double *, int);
int /*<<< orphan*/ compute(int);
int /*<<< orphan*/ example_add_var(int *, int);
int example_do_event(int);
int /*<<< orphan*/ example_event(int *, int);
int /*<<< orphan*/ example_fcall(int *, int);
int /*<<< orphan*/ example_function1(double *, int);
int /*<<< orphan*/ example_function2(int *, int);
int /*<<< orphan*/ example_pop(int *, int);
int /*<<< orphan*/ example_push(int *, int);
int /*<<< orphan*/ example_set_var(int *, int);
int /*<<< orphan*/ example_set_var2(int *, int);
int /*<<< orphan*/ example_set_var3(int *, int);
int /*<<< orphan*/ example_set_var4(int *, int);
int /*<<< orphan*/ example_set_var5(int *, int);
int /*<<< orphan*/ example_sub_var(int *, int);
int main(int argc, char **argv) {
  double *double_array = NULL;
  int *int_array = NULL;
  int func_num = 0;
  func_num = example_do_event(func_num);
  example_function1(double_array, (1024 * 1024));
  compute(20);
  func_num = example_do_event(func_num);
  example_function2(int_array, (1024 * 1024));
  compute(20);
  func_num = example_do_event(func_num);
  example_fcall(int_array, (1024 * 1024));
  compute(20);
  func_num = example_do_event(func_num);
  example_push(int_array, (1024 * 1024));
  compute(20);
  func_num = example_do_event(func_num);
  example_pop(int_array, (1024 * 1024));
  compute(20);
  func_num = example_do_event(func_num);
  example_event(int_array, (1024 * 1024));
  compute(20);
  func_num = example_do_event(func_num);
  example_set_var(int_array, (1024 * 1024));
  compute(20);
  func_num = example_do_event(func_num);
  example_add_var(int_array, (1024 * 1024));
  compute(20);
  func_num = example_do_event(func_num);
  example_sub_var(int_array, (1024 * 1024));
  compute(20);
  func_num = example_do_event(func_num);
  example_set_var2(int_array, (1024 * 1024));
  compute(20);
  func_num = example_do_event(func_num);
  example_set_var3(int_array, (1024 * 1024));
  compute(20);
  func_num = example_do_event(func_num);
  example_set_var4(int_array, (1024 * 1024));
  compute(20);
  func_num = example_do_event(func_num);
  example_set_var5(int_array, (1024 * 1024));
  compute(20);
  func_num = example_do_event(func_num);
  appli_function1(double_array, (1024 * 1024));
  compute(20);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%edi
call   1090 <example_do_event@plt>
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x100000,%esi
call   1030 <example_function1@plt>
mov    $0x14,%edi
call   10f0 <compute@plt>
mov    -0x24(%rbp),%edi
call   1090 <example_do_event@plt>
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rdi
mov    $0x100000,%esi
call   10b0 <example_function2@plt>
mov    $0x14,%edi
call   10f0 <compute@plt>
mov    -0x24(%rbp),%edi
call   1090 <example_do_event@plt>
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rdi
mov    $0x100000,%esi
call   1050 <example_fcall@plt>
mov    $0x14,%edi
call   10f0 <compute@plt>
mov    -0x24(%rbp),%edi
call   1090 <example_do_event@plt>
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rdi
mov    $0x100000,%esi
call   10e0 <example_push@plt>
mov    $0x14,%edi
call   10f0 <compute@plt>
mov    -0x24(%rbp),%edi
call   1090 <example_do_event@plt>
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rdi
mov    $0x100000,%esi
call   1040 <example_pop@plt>
mov    $0x14,%edi
call   10f0 <compute@plt>
mov    -0x24(%rbp),%edi
call   1090 <example_do_event@plt>
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rdi
mov    $0x100000,%esi
call   1100 <example_event@plt>
mov    $0x14,%edi
call   10f0 <compute@plt>
mov    -0x24(%rbp),%edi
call   1090 <example_do_event@plt>
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rdi
mov    $0x100000,%esi
call   10a0 <example_set_var@plt>
mov    $0x14,%edi
call   10f0 <compute@plt>
mov    -0x24(%rbp),%edi
call   1090 <example_do_event@plt>
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rdi
mov    $0x100000,%esi
call   10c0 <example_add_var@plt>
mov    $0x14,%edi
call   10f0 <compute@plt>
mov    -0x24(%rbp),%edi
call   1090 <example_do_event@plt>
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rdi
mov    $0x100000,%esi
call   10d0 <example_sub_var@plt>
mov    $0x14,%edi
call   10f0 <compute@plt>
mov    -0x24(%rbp),%edi
call   1090 <example_do_event@plt>
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rdi
mov    $0x100000,%esi
call   1070 <example_set_var2@plt>
mov    $0x14,%edi
call   10f0 <compute@plt>
mov    -0x24(%rbp),%edi
call   1090 <example_do_event@plt>
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rdi
mov    $0x100000,%esi
call   1110 <example_set_var3@plt>
mov    $0x14,%edi
call   10f0 <compute@plt>
mov    -0x24(%rbp),%edi
call   1090 <example_do_event@plt>
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rdi
mov    $0x100000,%esi
call   1080 <example_set_var4@plt>
mov    $0x14,%edi
call   10f0 <compute@plt>
mov    -0x24(%rbp),%edi
call   1090 <example_do_event@plt>
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rdi
mov    $0x100000,%esi
call   1120 <example_set_var5@plt>
mov    $0x14,%edi
call   10f0 <compute@plt>
mov    -0x24(%rbp),%edi
call   1090 <example_do_event@plt>
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x100000,%esi
call   1060 <appli_function1@plt>
mov    $0x14,%edi
call   10f0 <compute@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %edi,%edi
call   1090 <example_do_event@plt>
mov    %eax,%ebx
xor    %edi,%edi
mov    $0x100000,%esi
call   1030 <example_function1@plt>
mov    $0x14,%edi
call   10f0 <compute@plt>
mov    %ebx,%edi
call   1090 <example_do_event@plt>
mov    %eax,%ebx
xor    %edi,%edi
mov    $0x100000,%esi
call   10b0 <example_function2@plt>
mov    $0x14,%edi
call   10f0 <compute@plt>
mov    %ebx,%edi
call   1090 <example_do_event@plt>
mov    %eax,%ebx
xor    %edi,%edi
mov    $0x100000,%esi
call   1050 <example_fcall@plt>
mov    $0x14,%edi
call   10f0 <compute@plt>
mov    %ebx,%edi
call   1090 <example_do_event@plt>
mov    %eax,%ebx
xor    %edi,%edi
mov    $0x100000,%esi
call   10e0 <example_push@plt>
mov    $0x14,%edi
call   10f0 <compute@plt>
mov    %ebx,%edi
call   1090 <example_do_event@plt>
mov    %eax,%ebx
xor    %edi,%edi
mov    $0x100000,%esi
call   1040 <example_pop@plt>
mov    $0x14,%edi
call   10f0 <compute@plt>
mov    %ebx,%edi
call   1090 <example_do_event@plt>
mov    %eax,%ebx
xor    %edi,%edi
mov    $0x100000,%esi
call   1100 <example_event@plt>
mov    $0x14,%edi
call   10f0 <compute@plt>
mov    %ebx,%edi
call   1090 <example_do_event@plt>
mov    %eax,%ebx
xor    %edi,%edi
mov    $0x100000,%esi
call   10a0 <example_set_var@plt>
mov    $0x14,%edi
call   10f0 <compute@plt>
mov    %ebx,%edi
call   1090 <example_do_event@plt>
mov    %eax,%ebx
xor    %edi,%edi
mov    $0x100000,%esi
call   10c0 <example_add_var@plt>
mov    $0x14,%edi
call   10f0 <compute@plt>
mov    %ebx,%edi
call   1090 <example_do_event@plt>
mov    %eax,%ebx
xor    %edi,%edi
mov    $0x100000,%esi
call   10d0 <example_sub_var@plt>
mov    $0x14,%edi
call   10f0 <compute@plt>
mov    %ebx,%edi
call   1090 <example_do_event@plt>
mov    %eax,%ebx
xor    %edi,%edi
mov    $0x100000,%esi
call   1070 <example_set_var2@plt>
mov    $0x14,%edi
call   10f0 <compute@plt>
mov    %ebx,%edi
call   1090 <example_do_event@plt>
mov    %eax,%ebx
xor    %edi,%edi
mov    $0x100000,%esi
call   1110 <example_set_var3@plt>
mov    $0x14,%edi
call   10f0 <compute@plt>
mov    %ebx,%edi
call   1090 <example_do_event@plt>
mov    %eax,%ebx
xor    %edi,%edi
mov    $0x100000,%esi
call   1080 <example_set_var4@plt>
mov    $0x14,%edi
call   10f0 <compute@plt>
mov    %ebx,%edi
call   1090 <example_do_event@plt>
mov    %eax,%ebx
xor    %edi,%edi
mov    $0x100000,%esi
call   1120 <example_set_var5@plt>
mov    $0x14,%edi
call   10f0 <compute@plt>
mov    %ebx,%edi
call   1090 <example_do_event@plt>
xor    %edi,%edi
mov    $0x100000,%esi
call   1060 <appli_function1@plt>
mov    $0x14,%edi
call   10f0 <compute@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 double*
%7 = alloca i32*
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store double* null, double** %6
store i32* null, i32** %7
store i32 0, i32* %8
%9 = load i32, i32* %8
%10 = call i32 @example_do_event(i32 %9)
store i32 %10, i32* %8
%11 = load double*, double** %6
%12 = call i32 @example_function1(double* %11, i32 1048576)
%13 = call i32 @compute(i32 20)
%14 = load i32, i32* %8
%15 = call i32 @example_do_event(i32 %14)
store i32 %15, i32* %8
%16 = load i32*, i32** %7
%17 = call i32 @example_function2(i32* %16, i32 1048576)
%18 = call i32 @compute(i32 20)
%19 = load i32, i32* %8
%20 = call i32 @example_do_event(i32 %19)
store i32 %20, i32* %8
%21 = load i32*, i32** %7
%22 = call i32 @example_fcall(i32* %21, i32 1048576)
%23 = call i32 @compute(i32 20)
%24 = load i32, i32* %8
%25 = call i32 @example_do_event(i32 %24)
store i32 %25, i32* %8
%26 = load i32*, i32** %7
%27 = call i32 @example_push(i32* %26, i32 1048576)
%28 = call i32 @compute(i32 20)
%29 = load i32, i32* %8
%30 = call i32 @example_do_event(i32 %29)
store i32 %30, i32* %8
%31 = load i32*, i32** %7
%32 = call i32 @example_pop(i32* %31, i32 1048576)
%33 = call i32 @compute(i32 20)
%34 = load i32, i32* %8
%35 = call i32 @example_do_event(i32 %34)
store i32 %35, i32* %8
%36 = load i32*, i32** %7
%37 = call i32 @example_event(i32* %36, i32 1048576)
%38 = call i32 @compute(i32 20)
%39 = load i32, i32* %8
%40 = call i32 @example_do_event(i32 %39)
store i32 %40, i32* %8
%41 = load i32*, i32** %7
%42 = call i32 @example_set_var(i32* %41, i32 1048576)
%43 = call i32 @compute(i32 20)
%44 = load i32, i32* %8
%45 = call i32 @example_do_event(i32 %44)
store i32 %45, i32* %8
%46 = load i32*, i32** %7
%47 = call i32 @example_add_var(i32* %46, i32 1048576)
%48 = call i32 @compute(i32 20)
%49 = load i32, i32* %8
%50 = call i32 @example_do_event(i32 %49)
store i32 %50, i32* %8
%51 = load i32*, i32** %7
%52 = call i32 @example_sub_var(i32* %51, i32 1048576)
%53 = call i32 @compute(i32 20)
%54 = load i32, i32* %8
%55 = call i32 @example_do_event(i32 %54)
store i32 %55, i32* %8
%56 = load i32*, i32** %7
%57 = call i32 @example_set_var2(i32* %56, i32 1048576)
%58 = call i32 @compute(i32 20)
%59 = load i32, i32* %8
%60 = call i32 @example_do_event(i32 %59)
store i32 %60, i32* %8
%61 = load i32*, i32** %7
%62 = call i32 @example_set_var3(i32* %61, i32 1048576)
%63 = call i32 @compute(i32 20)
%64 = load i32, i32* %8
%65 = call i32 @example_do_event(i32 %64)
store i32 %65, i32* %8
%66 = load i32*, i32** %7
%67 = call i32 @example_set_var4(i32* %66, i32 1048576)
%68 = call i32 @compute(i32 20)
%69 = load i32, i32* %8
%70 = call i32 @example_do_event(i32 %69)
store i32 %70, i32* %8
%71 = load i32*, i32** %7
%72 = call i32 @example_set_var5(i32* %71, i32 1048576)
%73 = call i32 @compute(i32 20)
%74 = load i32, i32* %8
%75 = call i32 @example_do_event(i32 %74)
store i32 %75, i32* %8
%76 = load double*, double** %6
%77 = call i32 @appli_function1(double* %76, i32 1048576)
%78 = call i32 @compute(i32 20)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @example_do_event(i32 0)
%4 = tail call i32 @example_function1(double* null, i32 1048576)
%5 = tail call i32 @compute(i32 20)
%6 = tail call i32 @example_do_event(i32 %3)
%7 = tail call i32 @example_function2(i32* null, i32 1048576)
%8 = tail call i32 @compute(i32 20)
%9 = tail call i32 @example_do_event(i32 %6)
%10 = tail call i32 @example_fcall(i32* null, i32 1048576)
%11 = tail call i32 @compute(i32 20)
%12 = tail call i32 @example_do_event(i32 %9)
%13 = tail call i32 @example_push(i32* null, i32 1048576)
%14 = tail call i32 @compute(i32 20)
%15 = tail call i32 @example_do_event(i32 %12)
%16 = tail call i32 @example_pop(i32* null, i32 1048576)
%17 = tail call i32 @compute(i32 20)
%18 = tail call i32 @example_do_event(i32 %15)
%19 = tail call i32 @example_event(i32* null, i32 1048576)
%20 = tail call i32 @compute(i32 20)
%21 = tail call i32 @example_do_event(i32 %18)
%22 = tail call i32 @example_set_var(i32* null, i32 1048576)
%23 = tail call i32 @compute(i32 20)
%24 = tail call i32 @example_do_event(i32 %21)
%25 = tail call i32 @example_add_var(i32* null, i32 1048576)
%26 = tail call i32 @compute(i32 20)
%27 = tail call i32 @example_do_event(i32 %24)
%28 = tail call i32 @example_sub_var(i32* null, i32 1048576)
%29 = tail call i32 @compute(i32 20)
%30 = tail call i32 @example_do_event(i32 %27)
%31 = tail call i32 @example_set_var2(i32* null, i32 1048576)
%32 = tail call i32 @compute(i32 20)
%33 = tail call i32 @example_do_event(i32 %30)
%34 = tail call i32 @example_set_var3(i32* null, i32 1048576)
%35 = tail call i32 @compute(i32 20)
%36 = tail call i32 @example_do_event(i32 %33)
%37 = tail call i32 @example_set_var4(i32* null, i32 1048576)
%38 = tail call i32 @compute(i32 20)
%39 = tail call i32 @example_do_event(i32 %36)
%40 = tail call i32 @example_set_var5(i32* null, i32 1048576)
%41 = tail call i32 @compute(i32 20)
%42 = tail call i32 @example_do_event(i32 %39)
%43 = tail call i32 @appli_function1(double* null, i32 1048576)
%44 = tail call i32 @compute(i32 20)
ret i32 0
}