#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*/ write(int, char *, int);
int main(void) {
  char min;
  char max;
  int i;
  min = 'a';
  max = 'B';
  i = 0;
  while (i <= 12) {
    write(1, &min, 1);
    write(1, &max, 1);
    min += 2;
    max += 2;
    i++;
  }
  write(1, "\n", 1);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x61,-0x5(%rbp)
movb   $0x42,-0x6(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xc,-0xc(%rbp)
jg     117a <main+0x6a>
mov    $0x1,%edx
lea    -0x5(%rbp),%rsi
mov    %edx,%edi
call   1030 <write@plt>
mov    $0x1,%edx
lea    -0x6(%rbp),%rsi
mov    %edx,%edi
call   1030 <write@plt>
movsbl -0x5(%rbp),%eax
add    $0x2,%eax
mov    %al,-0x5(%rbp)
movsbl -0x6(%rbp),%eax
add    $0x2,%eax
mov    %al,-0x6(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112e <main+0x1e>
mov    $0x1,%edx
lea    0xe7a(%rip),%rsi
mov    %edx,%edi
call   1030 <write@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
movb   $0x61,0xf(%rsp)
movb   $0x42,0xe(%rsp)
mov    $0xffffffe6,%ebx
lea    0xf(%rsp),%r14
lea    0xe(%rsp),%r15
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x1,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1030 <write@plt>
mov    $0x1,%edi
mov    %r15,%rsi
mov    $0x1,%edx
call   1030 <write@plt>
lea    0x7d(%rbx),%eax
mov    %al,0xf(%rsp)
lea    0x5e(%rbx),%eax
mov    %al,0xe(%rsp)
add    $0x2,%ebx
jne    1140 <main+0x30>
lea    0xe82(%rip),%rsi
mov    $0x1,%edi
mov    $0x1,%edx
call   1030 <write@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca i8
store i8 97, i8* %1
store i8 66, i8* %2
br label %3
3: ; preds = %0, %3
%4 = phi i8 [ 66, %0 ], [ %10, %3 ]
%5 = phi i8 [ 97, %0 ], [ %9, %3 ]
%6 = phi i32 [ 0, %0 ], [ %11, %3 ]
%7 = call i32 @write(i32 1, i8* %1, i32 1)
%8 = call i32 @write(i32 1, i8* %2, i32 1)
%9 = add i8 %5, 2
store i8 %9, i8* %1
%10 = add i8 %4, 2
store i8 %10, i8* %2
%11 = add nuw nsw i32 %6, 1
%12 = icmp eq i32 %11, 13
br i1 %12, label %13, label %3
13: ; preds = %3
%14 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
ret i32 0
}