#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 atoi(char *);
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  if (argc != 2) {
    printf("Nombre de paramètres insuffisants\n");
    return 1;
  }
  int value1 = atoi(argv[1]);
  int i, j;
  for (i = 0; i < value1; i++) {
    for (j = 0; j <= value1 - (i + 1); j++)
      printf(" ");
    for (j = 0; j < 2 * i + 1; j++)
      printf("*");
    for (j = 0; j <= value1 - (i + 1); j++)
      printf(" ");
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     1158 <main+0x38>
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    123f <main+0x11f>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1238 <main+0x118>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%edx
add    $0x1,%edx
sub    %edx,%ecx
cmp    %ecx,%eax
jg     11b2 <main+0x92>
lea    0xe85(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1182 <main+0x62>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x18(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    11e7 <main+0xc7>
lea    0xe52(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11b9 <main+0x99>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%edx
add    $0x1,%edx
sub    %edx,%ecx
cmp    %ecx,%eax
jg     121e <main+0xfe>
lea    0xe19(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11ee <main+0xce>
lea    0xdfd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    116f <main+0x4f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
cmp    $0x2,%edi
jne    1204 <main+0xd4>
mov    0x8(%rsi),%rdi
call   1050 <atoi@plt>
test   %eax,%eax
jle    1217 <main+0xe7>
xor    %r13d,%r13d
mov    $0x1,%r12d
mov    %eax,%r14d
jmp    1195 <main+0x65>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%r14d
add    $0x2,%r12d
mov    0x4(%rsp),%ecx
mov    %ecx,%r13d
mov    %r15d,%eax
cmp    %r15d,%ecx
je     1217 <main+0xe7>
lea    0x1(%r13),%ecx
mov    %ecx,0x4(%rsp)
mov    %r14d,%ebx
mov    %r12d,%ebp
mov    %eax,%r15d
cmp    %r13d,%eax
jle    11d0 <main+0xa0>
nopl   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    11b0 <main+0x80>
mov    %r12d,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x2a,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
jne    11d0 <main+0xa0>
mov    %r14d,%ebx
cmp    %r13d,%r15d
jle    1170 <main+0x40>
nopw   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    11f0 <main+0xc0>
jmp    1170 <main+0x40>
lea    0xdf5(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%eax
jmp    1219 <main+0xe9>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [36 x i8] c"Nombre de param\C3\A8tres insuffisants\0A\00"
@.str.1 = [2 x i8] c" \00"
@.str.2 = [2 x i8] c"*\00"
@.str.3 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = load i32, i32* %4
%10 = icmp ne i32 %9, 2
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
br label %66
13: ; preds = %2
%14 = load i8**, i8*** %5
%15 = getelementptr inbounds i8*, i8** %14, i64 1
%16 = load i8*, i8** %15
%17 = call i32 @atoi(i8* %16)
store i32 %17, i32* %6
store i32 0, i32* %7
br label %18
18: ; preds = %62, %13
%19 = load i32, i32* %7
%20 = load i32, i32* %6
%21 = icmp slt i32 %19, %20
br i1 %21, label %22, label %65
22: ; preds = %18
store i32 0, i32* %8
br label %23
23: ; preds = %32, %22
%24 = load i32, i32* %8
%25 = load i32, i32* %6
%26 = load i32, i32* %7
%27 = add nsw i32 %26, 1
%28 = sub nsw i32 %25, %27
%29 = icmp sle i32 %24, %28
br i1 %29, label %30, label %35
30: ; preds = %23
%31 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %32
32: ; preds = %30
%33 = load i32, i32* %8
%34 = add nsw i32 %33, 1
store i32 %34, i32* %8
br label %23
35: ; preds = %23
store i32 0, i32* %8
br label %36
36: ; preds = %44, %35
%37 = load i32, i32* %8
%38 = load i32, i32* %7
%39 = mul nsw i32 2, %38
%40 = add nsw i32 %39, 1
%41 = icmp slt i32 %37, %40
br i1 %41, label %42, label %47
42: ; preds = %36
%43 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %44
44: ; preds = %42
%45 = load i32, i32* %8
%46 = add nsw i32 %45, 1
store i32 %46, i32* %8
br label %36
47: ; preds = %36
store i32 0, i32* %8
br label %48
48: ; preds = %57, %47
%49 = load i32, i32* %8
%50 = load i32, i32* %6
%51 = load i32, i32* %7
%52 = add nsw i32 %51, 1
%53 = sub nsw i32 %50, %52
%54 = icmp sle i32 %49, %53
br i1 %54, label %55, label %60
55: ; preds = %48
%56 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %57
57: ; preds = %55
%58 = load i32, i32* %8
%59 = add nsw i32 %58, 1
store i32 %59, i32* %8
br label %48
60: ; preds = %48
%61 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %62
62: ; preds = %60
%63 = load i32, i32* %7
%64 = add nsw i32 %63, 1
store i32 %64, i32* %7
br label %18
65: ; preds = %18
store i32 0, i32* %3
br label %66
66: ; preds = %65, %11
%67 = load i32, i32* %3
ret i32 %67
}

LLVM IR (-O2):
@str = [35 x i8] c"Nombre de param\C3\A8tres insuffisants\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
br label %39
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = tail call i32 @atoi(i8* %8)
%10 = icmp sgt i32 %9, 0
br i1 %10, label %11, label %39
11: ; preds = %6, %34
%12 = phi i32 [ %37, %34 ], [ 1, %6 ]
%13 = phi i32 [ %36, %34 ], [ %9, %6 ]
%14 = phi i32 [ %15, %34 ], [ 0, %6 ]
%15 = add nuw nsw i32 %14, 1
%16 = icmp sgt i32 %9, %14
br i1 %16, label %18, label %17
17: ; preds = %18, %11
br label %24
18: ; preds = %11, %18
%19 = phi i32 [ %21, %18 ], [ 0, %11 ]
%20 = tail call i32 @putchar(i32 32)
%21 = add nuw i32 %19, 1
%22 = icmp eq i32 %21, %13
br i1 %22, label %17, label %18
23: ; preds = %24
br i1 %16, label %29, label %34
24: ; preds = %17, %24
%25 = phi i32 [ %27, %24 ], [ 0, %17 ]
%26 = tail call i32 @putchar(i32 42)
%27 = add nuw i32 %25, 1
%28 = icmp eq i32 %27, %12
br i1 %28, label %23, label %24
29: ; preds = %23, %29
%30 = phi i32 [ %32, %29 ], [ 0, %23 ]
%31 = tail call i32 @putchar(i32 32)
%32 = add nuw i32 %30, 1
%33 = icmp eq i32 %32, %13
br i1 %33, label %34, label %29
34: ; preds = %29, %23
%35 = tail call i32 @putchar(i32 10)
%36 = add i32 %13, -1
%37 = add nuw i32 %12, 2
%38 = icmp eq i32 %15, %9
br i1 %38, label %39, label %11
39: ; preds = %34, %6, %4
%40 = phi i32 [ 1, %4 ], [ 0, %6 ], [ 0, %34 ]
ret i32 %40
}