#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*/ addch(char);
int /*<<< orphan*/ printw(char *, char);
void WriteLetters() {
  int i;
  addch(' ');
  addch(' ');
  for (i = 1; i <= 19; i++)
    printw(" %c", 'A' + i - 1);
  addch('\n');
}


x86 assembly (clang, -O0):
<WriteLetters>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x20,%edi
call   1040 <addch@plt>
mov    $0x20,%edi
call   1040 <addch@plt>
movl   $0x1,-0x4(%rbp)
cmpl   $0x13,-0x4(%rbp)
jg     1173 <WriteLetters+0x53>
mov    -0x4(%rbp),%eax
add    $0x41,%eax
sub    $0x1,%eax
lea    0xea3(%rip),%rdi
movsbl %al,%esi
call   1030 <printw@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1143 <WriteLetters+0x23>
mov    $0xa,%edi
call   1040 <addch@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WriteLetters>:
push   %rbx
mov    $0x20,%edi
call   1040 <addch@plt>
mov    $0x20,%edi
call   1040 <addch@plt>
lea    0xec4(%rip),%rbx
mov    %rbx,%rdi
mov    $0x41,%esi
call   1030 <printw@plt>
mov    %rbx,%rdi
mov    $0x42,%esi
call   1030 <printw@plt>
mov    %rbx,%rdi
mov    $0x43,%esi
call   1030 <printw@plt>
mov    %rbx,%rdi
mov    $0x44,%esi
call   1030 <printw@plt>
mov    %rbx,%rdi
mov    $0x45,%esi
call   1030 <printw@plt>
mov    %rbx,%rdi
mov    $0x46,%esi
call   1030 <printw@plt>
mov    %rbx,%rdi
mov    $0x47,%esi
call   1030 <printw@plt>
mov    %rbx,%rdi
mov    $0x48,%esi
call   1030 <printw@plt>
mov    %rbx,%rdi
mov    $0x49,%esi
call   1030 <printw@plt>
mov    %rbx,%rdi
mov    $0x4a,%esi
call   1030 <printw@plt>
mov    %rbx,%rdi
mov    $0x4b,%esi
call   1030 <printw@plt>
mov    %rbx,%rdi
mov    $0x4c,%esi
call   1030 <printw@plt>
mov    %rbx,%rdi
mov    $0x4d,%esi
call   1030 <printw@plt>
mov    %rbx,%rdi
mov    $0x4e,%esi
call   1030 <printw@plt>
mov    %rbx,%rdi
mov    $0x4f,%esi
call   1030 <printw@plt>
mov    %rbx,%rdi
mov    $0x50,%esi
call   1030 <printw@plt>
mov    %rbx,%rdi
mov    $0x51,%esi
call   1030 <printw@plt>
mov    %rbx,%rdi
mov    $0x52,%esi
call   1030 <printw@plt>
mov    %rbx,%rdi
mov    $0x53,%esi
call   1030 <printw@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1040 <addch@plt>

LLVM IR (-O0):
@.str = [4 x i8] c" %c\00"
define void @WriteLetters() {
%1 = alloca i32
%2 = call i32 @addch(i8 signext 32)
%3 = call i32 @addch(i8 signext 32)
store i32 1, i32* %1
br label %4
4: ; preds = %13, %0
%5 = load i32, i32* %1
%6 = icmp sle i32 %5, 19
br i1 %6, label %7, label %16
7: ; preds = %4
%8 = load i32, i32* %1
%9 = add nsw i32 65, %8
%10 = sub nsw i32 %9, 1
%11 = trunc i32 %10 to i8
%12 = call i32 @printw(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext %11)
br label %13
13: ; preds = %7
%14 = load i32, i32* %1
%15 = add nsw i32 %14, 1
store i32 %15, i32* %1
br label %4
16: ; preds = %4
%17 = call i32 @addch(i8 signext 10)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c" %c\00"
define void @WriteLetters() {
%1 = tail call i32 @addch(i8 signext 32)
%2 = tail call i32 @addch(i8 signext 32)
%3 = tail call i32 @printw(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext 65)
%4 = tail call i32 @printw(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext 66)
%5 = tail call i32 @printw(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext 67)
%6 = tail call i32 @printw(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext 68)
%7 = tail call i32 @printw(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext 69)
%8 = tail call i32 @printw(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext 70)
%9 = tail call i32 @printw(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext 71)
%10 = tail call i32 @printw(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext 72)
%11 = tail call i32 @printw(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext 73)
%12 = tail call i32 @printw(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext 74)
%13 = tail call i32 @printw(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext 75)
%14 = tail call i32 @printw(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext 76)
%15 = tail call i32 @printw(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext 77)
%16 = tail call i32 @printw(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext 78)
%17 = tail call i32 @printw(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext 79)
%18 = tail call i32 @printw(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext 80)
%19 = tail call i32 @printw(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext 81)
%20 = tail call i32 @printw(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext 82)
%21 = tail call i32 @printw(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext 83)
%22 = tail call i32 @addch(i8 signext 10)
ret void
}