#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 i, j;
  for (i = 1; i <= 5; i++) {
    for (j = 1; j <= 5 - i; j++) {
      printf(".");
    }
    for (j = 1; j <= 2 * i - 1; j++) {
      printf("x");
    }
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jg     11b3 <main+0xa3>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x5,%ecx
sub    -0x8(%rbp),%ecx
cmp    %ecx,%eax
jg     1164 <main+0x54>
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1137 <main+0x27>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    $0x1,%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     1199 <main+0x89>
lea    0xe7c(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    116b <main+0x5b>
lea    0xe64(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2e,%edi
call   1030 <putchar@plt>
mov    $0x2e,%edi
call   1030 <putchar@plt>
mov    $0x2e,%edi
call   1030 <putchar@plt>
mov    $0x2e,%edi
call   1030 <putchar@plt>
mov    $0x78,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x2e,%edi
call   1030 <putchar@plt>
mov    $0x2e,%edi
call   1030 <putchar@plt>
mov    $0x2e,%edi
call   1030 <putchar@plt>
mov    $0x78,%edi
call   1030 <putchar@plt>
mov    $0x78,%edi
call   1030 <putchar@plt>
mov    $0x78,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x2e,%edi
call   1030 <putchar@plt>
mov    $0x2e,%edi
call   1030 <putchar@plt>
mov    $0x78,%edi
call   1030 <putchar@plt>
mov    $0x78,%edi
call   1030 <putchar@plt>
mov    $0x78,%edi
call   1030 <putchar@plt>
mov    $0x78,%edi
call   1030 <putchar@plt>
mov    $0x78,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x2e,%edi
call   1030 <putchar@plt>
mov    $0x78,%edi
call   1030 <putchar@plt>
mov    $0x78,%edi
call   1030 <putchar@plt>
mov    $0x78,%edi
call   1030 <putchar@plt>
mov    $0x78,%edi
call   1030 <putchar@plt>
mov    $0x78,%edi
call   1030 <putchar@plt>
mov    $0x78,%edi
call   1030 <putchar@plt>
mov    $0x78,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x78,%edi
call   1030 <putchar@plt>
mov    $0x78,%edi
call   1030 <putchar@plt>
mov    $0x78,%edi
call   1030 <putchar@plt>
mov    $0x78,%edi
call   1030 <putchar@plt>
mov    $0x78,%edi
call   1030 <putchar@plt>
mov    $0x78,%edi
call   1030 <putchar@plt>
mov    $0x78,%edi
call   1030 <putchar@plt>
mov    $0x78,%edi
call   1030 <putchar@plt>
mov    $0x78,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @putchar(i32 46)
%2 = tail call i32 @putchar(i32 46)
%3 = tail call i32 @putchar(i32 46)
%4 = tail call i32 @putchar(i32 46)
%5 = tail call i32 @putchar(i32 120)
%6 = tail call i32 @putchar(i32 10)
%7 = tail call i32 @putchar(i32 46)
%8 = tail call i32 @putchar(i32 46)
%9 = tail call i32 @putchar(i32 46)
%10 = tail call i32 @putchar(i32 120)
%11 = tail call i32 @putchar(i32 120)
%12 = tail call i32 @putchar(i32 120)
%13 = tail call i32 @putchar(i32 10)
%14 = tail call i32 @putchar(i32 46)
%15 = tail call i32 @putchar(i32 46)
%16 = tail call i32 @putchar(i32 120)
%17 = tail call i32 @putchar(i32 120)
%18 = tail call i32 @putchar(i32 120)
%19 = tail call i32 @putchar(i32 120)
%20 = tail call i32 @putchar(i32 120)
%21 = tail call i32 @putchar(i32 10)
%22 = tail call i32 @putchar(i32 46)
%23 = tail call i32 @putchar(i32 120)
%24 = tail call i32 @putchar(i32 120)
%25 = tail call i32 @putchar(i32 120)
%26 = tail call i32 @putchar(i32 120)
%27 = tail call i32 @putchar(i32 120)
%28 = tail call i32 @putchar(i32 120)
%29 = tail call i32 @putchar(i32 120)
%30 = tail call i32 @putchar(i32 10)
%31 = tail call i32 @putchar(i32 120)
%32 = tail call i32 @putchar(i32 120)
%33 = tail call i32 @putchar(i32 120)
%34 = tail call i32 @putchar(i32 120)
%35 = tail call i32 @putchar(i32 120)
%36 = tail call i32 @putchar(i32 120)
%37 = tail call i32 @putchar(i32 120)
%38 = tail call i32 @putchar(i32 120)
%39 = tail call i32 @putchar(i32 120)
%40 = tail call i32 @putchar(i32 10)
ret i32 0
}