#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 EXIT_SUCCESS;
int atoi(char *);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  int hauteur = atoi(argv[1]);
  for (int i = 1; i <= hauteur; i++) {
    for (int j = 1; j <= hauteur - i; j++) {
      printf(" ");
    }
    for (int j = 1; j <= (i * 2) - 1; j++) {
      printf("%c", argv[2][0]);
    }
    printf("\n");
  }
  return EXIT_SUCCESS;
}


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)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x14(%rbp)
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jg     11eb <main+0xcb>
movl   $0x1,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    -0x18(%rbp),%ecx
cmp    %ecx,%eax
jg     118d <main+0x6d>
lea    0xe88(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1160 <main+0x40>
movl   $0x1,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    -0x18(%rbp),%ecx
shl    $0x1,%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     11cf <main+0xaf>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
movsbl (%rax),%esi
lea    0xe48(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1194 <main+0x74>
lea    0xe2f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    114d <main+0x2d>
mov    0x2dee(%rip),%rax
mov    (%rax),%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
mov    %rsi,%r13
mov    0x8(%rsi),%rdi
call   1040 <atoi@plt>
test   %eax,%eax
jle    11ac <main+0x8c>
mov    %eax,%r14d
mov    $0x1,%r15d
mov    $0x1,%r12d
nopw   0x0(%rax,%rax,1)
mov    %r14d,%ebx
mov    %r15d,%ebp
cmp    %r12d,%r14d
jle    1180 <main+0x60>
nopl   0x0(%rax,%rax,1)
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
cmp    %ebx,%r12d
jne    1160 <main+0x40>
mov    %r15d,%ebp
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x10(%r13),%rax
movsbl (%rax),%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
jne    1180 <main+0x60>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x1(%r12),%eax
add    $0x2,%r15d
cmp    %r14d,%r12d
mov    %eax,%r12d
jne    1150 <main+0x30>
mov    0x2e2d(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c" \00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [2 x i8] c"\0A\00"
@EXIT_SUCCESS = global i32 0
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
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = call i32 @atoi(i8* %12)
store i32 %13, i32* %6
store i32 1, i32* %7
br label %14
14: ; preds = %50, %2
%15 = load i32, i32* %7
%16 = load i32, i32* %6
%17 = icmp sle i32 %15, %16
br i1 %17, label %18, label %53
18: ; preds = %14
store i32 1, i32* %8
br label %19
19: ; preds = %27, %18
%20 = load i32, i32* %8
%21 = load i32, i32* %6
%22 = load i32, i32* %7
%23 = sub nsw i32 %21, %22
%24 = icmp sle i32 %20, %23
br i1 %24, label %25, label %30
25: ; preds = %19
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %27
27: ; preds = %25
%28 = load i32, i32* %8
%29 = add nsw i32 %28, 1
store i32 %29, i32* %8
br label %19
30: ; preds = %19
store i32 1, i32* %9
br label %31
31: ; preds = %45, %30
%32 = load i32, i32* %9
%33 = load i32, i32* %7
%34 = mul nsw i32 %33, 2
%35 = sub nsw i32 %34, 1
%36 = icmp sle i32 %32, %35
br i1 %36, label %37, label %48
37: ; preds = %31
%38 = load i8**, i8*** %5
%39 = getelementptr inbounds i8*, i8** %38, i64 2
%40 = load i8*, i8** %39
%41 = getelementptr inbounds i8, i8* %40, i64 0
%42 = load i8, i8* %41
%43 = sext i8 %42 to i32
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %43)
br label %45
45: ; preds = %37
%46 = load i32, i32* %9
%47 = add nsw i32 %46, 1
store i32 %47, i32* %9
br label %31
48: ; preds = %31
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %50
50: ; preds = %48
%51 = load i32, i32* %7
%52 = add nsw i32 %51, 1
store i32 %52, i32* %7
br label %14
53: ; preds = %14
%54 = load i32, i32* @EXIT_SUCCESS
ret i32 %54
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @atoi(i8* %4)
%6 = icmp slt i32 %5, 1
br i1 %6, label %15, label %7
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 2
br label %9
9: ; preds = %7, %22
%10 = phi i32 [ 2, %7 ], [ %26, %22 ]
%11 = phi i32 [ %5, %7 ], [ %25, %22 ]
%12 = phi i32 [ 1, %7 ], [ %24, %22 ]
%13 = icmp sgt i32 %5, %12
br i1 %13, label %17, label %14
14: ; preds = %17, %9
br label %28
15: ; preds = %22, %2
%16 = load i32, i32* @EXIT_SUCCESS
ret i32 %16
17: ; preds = %9, %17
%18 = phi i32 [ %20, %17 ], [ 1, %9 ]
%19 = tail call i32 @putchar(i32 32)
%20 = add nuw i32 %18, 1
%21 = icmp eq i32 %20, %11
br i1 %21, label %14, label %17
22: ; preds = %28
%23 = tail call i32 @putchar(i32 10)
%24 = add nuw i32 %12, 1
%25 = add i32 %11, -1
%26 = add i32 %10, 2
%27 = icmp eq i32 %12, %5
br i1 %27, label %15, label %9
28: ; preds = %14, %28
%29 = phi i32 [ %34, %28 ], [ 1, %14 ]
%30 = load i8*, i8** %8
%31 = load i8, i8* %30
%32 = sext i8 %31 to i32
%33 = tail call i32 @putchar(i32 %32)
%34 = add nuw i32 %29, 1
%35 = icmp eq i32 %34, %10
br i1 %35, label %22, label %28
}