#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 *, char, int);
int main(int argc, char const *argv[]) {
  char i;
  for (i = 'A'; i <= 'Z'; i++) {
    printf("%c : %d\n", i, (int)i);
    printf("%c : %d\n", i + 32, (int)(i + 32));
  }
  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)
movb   $0x41,-0x11(%rbp)
movsbl -0x11(%rbp),%eax
cmp    $0x5a,%eax
jg     1177 <main+0x67>
mov    -0x11(%rbp),%al
movsbl -0x11(%rbp),%edx
lea    0xebb(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
movsbl -0x11(%rbp),%eax
add    $0x20,%eax
movsbl -0x11(%rbp),%edx
add    $0x20,%edx
lea    0xe9e(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
mov    -0x11(%rbp),%al
add    $0x1,%al
mov    %al,-0x11(%rbp)
jmp    112a <main+0x1a>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x41,%ebx
lea    0xee0(%rip),%r14
movsbl %bl,%esi
mov    %r14,%rdi
mov    %ebx,%edx
call   1030 <printf@plt>
lea    0x20(%rbx),%edx
movsbl %dl,%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x5b,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"%c : %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %2, %3
%4 = phi i32 [ 65, %2 ], [ %10, %3 ]
%5 = trunc i32 %4 to i8
%6 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8 signext %5, i32 %4)
%7 = add nuw nsw i32 %4, 32
%8 = trunc i32 %7 to i8
%9 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8 signext %8, i32 %7)
%10 = add nuw nsw i32 %4, 1
%11 = icmp eq i32 %10, 91
br i1 %11, label %12, label %3
12: ; preds = %3
ret i32 0
}