#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 */
typedef int /*<<< orphan*/ *time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ answerHello();
int /*<<< orphan*/ answerSomething(char *);
int /*<<< orphan*/ getTime(int, char *, int /*<<< orphan*/ *, struct tm);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  char format[128] = {0};
  time_t timeInit = NULL;
  struct tm date;
  printf("HelloWorld !!!\n");
  answerHello();
  answerSomething("Merdeuh!");
  printf("PAF1\n");
  getTime(128, format, timeInit, date);
  printf("PAF2\n");
  printf("%s\n", format);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x90(%rbp),%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1070 <memset@plt>
movq   $0x0,-0x98(%rbp)
lea    0xe79(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x0,%al
call   1040 <answerHello@plt>
lea    0xe74(%rip),%rdi
call   1030 <answerSomething@plt>
lea    0xe71(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0x90(%rbp),%rsi
mov    -0x98(%rbp),%rdx
mov    -0xa0(%rbp),%ecx
mov    $0x80,%edi
call   1050 <getTime@plt>
lea    0xe4b(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0x90(%rbp),%rsi
lea    0xe3c(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x80,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
lea    0xe90(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <answerHello@plt>
lea    0xe74(%rip),%rdi
call   1040 <answerSomething@plt>
lea    0xe80(%rip),%rdi
call   1030 <puts@plt>
mov    %rsp,%rbx
mov    $0x80,%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   1060 <getTime@plt>
lea    0xe67(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [16 x i8] c"HelloWorld !!!\0A\00"
@.str.1 = [9 x i8] c"Merdeuh!\00"
@.str.2 = [6 x i8] c"PAF1\0A\00"
@.str.3 = [6 x i8] c"PAF2\0A\00"
@.str.4 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [128 x i8]
%3 = alloca i32*
%4 = alloca %struct.tm
store i32 0, i32* %1
%5 = bitcast [128 x i8]* %2 to i8*
store i32* null, i32** %3
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (...) @answerHello()
%8 = call i32 @answerSomething(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%10 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%11 = load i32*, i32** %3
%12 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 0
%13 = load i32, i32* %12
%14 = call i32 @getTime(i32 128, i8* %10, i32* %11, i32 %13)
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%16 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* %16)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [9 x i8] c"Merdeuh!\00"
@str = [15 x i8] c"HelloWorld !!!\00"
@str.5 = [5 x i8] c"PAF1\00"
@str.6 = [5 x i8] c"PAF2\00"
define i32 @main() {
%1 = alloca [128 x i8]
%2 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (...) @answerHello()
%5 = tail call i32 @answerSomething(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str.5, i64 0, i64 0))
%7 = call i32 @getTime(i32 128, i8* %2, i32* null, i32 undef)
%8 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str.6, i64 0, i64 0))
%9 = call i32 @puts(i8* %2)
ret i32 0
}