#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*/ printf(char *, ...);
int main(int argc, char **argv) {
  char nomFichier[40] = "#         nom fichier         #";
  char ligneIntro[40] = "###############################";
  printf("\n%s\n%s\n%s\n\n", ligneIntro, nomFichier, ligneIntro);
  printf("Hello world\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xebf(%rip),%rsi
mov    $0x28,%edx
call   1040 <memcpy@plt>
lea    -0x70(%rbp),%rdi
lea    0xeda(%rip),%rsi
mov    $0x28,%edx
call   1040 <memcpy@plt>
lea    -0x70(%rbp),%rsi
lea    -0x40(%rbp),%rdx
lea    -0x70(%rbp),%rcx
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x58,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xec9(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movq   $0x0,0x50(%rsp)
movaps 0xef4(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xed8(%rip),%xmm0
movaps %xmm0,(%rsp)
movq   $0x0,0x20(%rsp)
lea    0xeec(%rip),%rdi
lea    0x30(%rsp),%rdx
mov    %rsp,%rcx
mov    %rcx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xedf(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x58,%rsp
ret

LLVM IR (-O0):
@__const.main.nomFichier = [40 x i8] c"# nom fichier #\00\00\00\00\00\00\00\00\00"
@__const.main.ligneIntro = [40 x i8] c"###############################\00\00\00\00\00\00\00\00\00"
@.str = [12 x i8] c"\0A%s\0A%s\0A%s\0A\0A\00"
@.str.1 = [13 x i8] c"Hello world\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [40 x i8]
%7 = alloca [40 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = bitcast [40 x i8]* %6 to i8*
%9 = bitcast [40 x i8]* %7 to i8*
%10 = getelementptr inbounds [40 x i8], [40 x i8]* %7, i64 0, i64 0
%11 = getelementptr inbounds [40 x i8], [40 x i8]* %6, i64 0, i64 0
%12 = getelementptr inbounds [40 x i8], [40 x i8]* %7, i64 0, i64 0
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %10, i8* %11, i8* %12)
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@__const.main.nomFichier = [40 x i8] c"# nom fichier #\00\00\00\00\00\00\00\00\00"
@__const.main.ligneIntro = [40 x i8] c"###############################\00\00\00\00\00\00\00\00\00"
@.str = [12 x i8] c"\0A%s\0A%s\0A%s\0A\0A\00"
@str = [12 x i8] c"Hello world\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [40 x i8]
%4 = alloca [40 x i8]
%5 = getelementptr inbounds [40 x i8], [40 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [40 x i8], [40 x i8]* %4, i64 0, i64 0
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %6, i8* %5, i8* %6)
%8 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 0
}