#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 N = 6;
  int p = 0;
  char ch = 'F';
  for (; p < N; p++) {
    for (ch = 'F'; ch >= 'F' - p; ch--) {
      printf("%c", ch);
    }
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x6,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movb   $0x46,-0xd(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1190 <main+0x80>
movb   $0x46,-0xd(%rbp)
movsbl -0xd(%rbp),%eax
mov    $0x46,%ecx
sub    -0xc(%rbp),%ecx
cmp    %ecx,%eax
jl     1174 <main+0x64>
movsbl -0xd(%rbp),%esi
lea    0xea0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xd(%rbp),%al
add    $0xff,%al
mov    %al,-0xd(%rbp)
jmp    1141 <main+0x31>
lea    0xe88(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1131 <main+0x21>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x46,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x46,%edi
call   1030 <putchar@plt>
mov    $0x45,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x46,%edi
call   1030 <putchar@plt>
mov    $0x45,%edi
call   1030 <putchar@plt>
mov    $0x44,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x46,%edi
call   1030 <putchar@plt>
mov    $0x45,%edi
call   1030 <putchar@plt>
mov    $0x44,%edi
call   1030 <putchar@plt>
mov    $0x43,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x46,%edi
call   1030 <putchar@plt>
mov    $0x45,%edi
call   1030 <putchar@plt>
mov    $0x44,%edi
call   1030 <putchar@plt>
mov    $0x43,%edi
call   1030 <putchar@plt>
mov    $0x42,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x46,%edi
call   1030 <putchar@plt>
mov    $0x45,%edi
call   1030 <putchar@plt>
mov    $0x44,%edi
call   1030 <putchar@plt>
mov    $0x43,%edi
call   1030 <putchar@plt>
mov    $0x42,%edi
call   1030 <putchar@plt>
mov    $0x41,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @putchar(i32 70)
%2 = tail call i32 @putchar(i32 10)
%3 = tail call i32 @putchar(i32 70)
%4 = tail call i32 @putchar(i32 69)
%5 = tail call i32 @putchar(i32 10)
%6 = tail call i32 @putchar(i32 70)
%7 = tail call i32 @putchar(i32 69)
%8 = tail call i32 @putchar(i32 68)
%9 = tail call i32 @putchar(i32 10)
%10 = tail call i32 @putchar(i32 70)
%11 = tail call i32 @putchar(i32 69)
%12 = tail call i32 @putchar(i32 68)
%13 = tail call i32 @putchar(i32 67)
%14 = tail call i32 @putchar(i32 10)
%15 = tail call i32 @putchar(i32 70)
%16 = tail call i32 @putchar(i32 69)
%17 = tail call i32 @putchar(i32 68)
%18 = tail call i32 @putchar(i32 67)
%19 = tail call i32 @putchar(i32 66)
%20 = tail call i32 @putchar(i32 10)
%21 = tail call i32 @putchar(i32 70)
%22 = tail call i32 @putchar(i32 69)
%23 = tail call i32 @putchar(i32 68)
%24 = tail call i32 @putchar(i32 67)
%25 = tail call i32 @putchar(i32 66)
%26 = tail call i32 @putchar(i32 65)
%27 = tail call i32 @putchar(i32 10)
ret i32 0
}