#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 /*<<< orphan*/ putchar(char);
int strlen(char const *);
void titre(const char *titre) {
  int i, longueur = strlen(titre) + 10;
  printf("\n\n\t");
  for (i = 0; i < longueur; i++)
    (void)putchar(':');
  printf("\n\t:::  %s  :::\n\t", titre);
  for (i = 0; i < longueur; i++)
    (void)putchar(':');
  printf("\n\n");
}


x86 assembly (clang, -O0):
<titre>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
add    $0xa,%eax
mov    %eax,-0x10(%rbp)
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1184 <titre+0x54>
mov    $0x3a,%edi
call   1030 <putchar@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1160 <titre+0x30>
mov    -0x8(%rbp),%rsi
lea    0xe75(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    11c1 <titre+0x91>
mov    $0x3a,%edi
call   1030 <putchar@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    119d <titre+0x6d>
lea    0xe4d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<titre>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1050 <strlen@plt>
mov    %eax,%ebx
lea    0xea8(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
cmp    $0xfffffff6,%ebx
jle    11d1 <titre+0x91>
lea    0xa(%rbx),%r15d
cmp    $0x2,%r15d
mov    $0x1,%ebp
cmovge %r15d,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0x3a,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
jne    1180 <titre+0x40>
lea    0xe6e(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
cmp    $0xfffffff7,%ebx
jl     11e2 <titre+0xa2>
cmp    $0x2,%r15d
mov    $0x1,%ebx
cmovge %r15d,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x3a,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    11c0 <titre+0x80>
jmp    11e2 <titre+0xa2>
lea    0xe2c(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xe2c(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"\0A\0A\09\00"
@.str.1 = [17 x i8] c"\0A\09::: %s :::\0A\09\00"
@.str.2 = [3 x i8] c"\0A\0A\00"
define void @titre(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
%7 = add nsw i32 %6, 10
store i32 %7, i32* %4
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %9
9: ; preds = %15, %1
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %18
13: ; preds = %9
%14 = call i32 @putchar(i8 signext 58)
br label %15
15: ; preds = %13
%16 = load i32, i32* %3
%17 = add nsw i32 %16, 1
store i32 %17, i32* %3
br label %9
18: ; preds = %9
%19 = load i8*, i8** %2
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* %19)
store i32 0, i32* %3
br label %21
21: ; preds = %27, %18
%22 = load i32, i32* %3
%23 = load i32, i32* %4
%24 = icmp slt i32 %22, %23
br i1 %24, label %25, label %30
25: ; preds = %21
%26 = call i32 @putchar(i8 signext 58)
br label %27
27: ; preds = %25
%28 = load i32, i32* %3
%29 = add nsw i32 %28, 1
store i32 %29, i32* %3
br label %21
30: ; preds = %21
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"\0A\0A\09\00"
@.str.1 = [17 x i8] c"\0A\09::: %s :::\0A\09\00"
@str = [2 x i8] c"\0A\00"
define void @titre(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add i32 %2, 10
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%5 = icmp sgt i32 %2, -10
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %24
8: ; preds = %1
%9 = call i32 @llvm.smax.i32(i32 %3, i32 1)
br label %10
10: ; preds = %8, %10
%11 = phi i32 [ %13, %10 ], [ 0, %8 ]
%12 = tail call i32 @putchar(i8 signext 58)
%13 = add nuw nsw i32 %11, 1
%14 = icmp eq i32 %13, %9
br i1 %14, label %15, label %10
15: ; preds = %10
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br i1 %5, label %17, label %24
17: ; preds = %15
%18 = call i32 @llvm.smax.i32(i32 %3, i32 1)
br label %19
19: ; preds = %17, %19
%20 = phi i32 [ %22, %19 ], [ 0, %17 ]
%21 = tail call i32 @putchar(i8 signext 58)
%22 = add nuw nsw i32 %20, 1
%23 = icmp eq i32 %22, %18
br i1 %23, label %24, label %19
24: ; preds = %19, %6, %15
%25 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret void
}