#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*/ ft_putchar(char);
int main(void) {
  char a;
  int i;
  a = 'a';
  i = 1;
  while (i < 27) {
    if (i % 2 == 0) {
      a = a - 32;
      ft_putchar(a);
      a = a + 33;
      i++;
    } else {
      ft_putchar(a);
      a++;
      i++;
    }
  }
  ft_putchar('\n');
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x61,-0x5(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x1b,-0xc(%rbp)
jge    1192 <main+0x82>
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1173 <main+0x63>
movsbl -0x5(%rbp),%eax
sub    $0x20,%eax
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
call   1030 <ft_putchar@plt>
movsbl -0x5(%rbp),%eax
add    $0x21,%eax
mov    %al,-0x5(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    118d <main+0x7d>
movsbl -0x5(%rbp),%edi
call   1030 <ft_putchar@plt>
mov    -0x5(%rbp),%al
add    $0x1,%al
mov    %al,-0x5(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112a <main+0x1a>
mov    $0xa,%edi
call   1030 <ft_putchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    %ebx,%eax
and    $0x1,%al
shl    $0x5,%al
add    %bl,%al
add    $0x40,%al
movsbl %al,%edi
call   1030 <ft_putchar@plt>
add    $0x1,%ebx
cmp    $0x1b,%ebx
jne    1120 <main+0x10>
mov    $0xa,%edi
call   1030 <ft_putchar@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i32
store i32 0, i32* %1
store i8 97, i8* %2
store i32 1, i32* %3
br label %4
4: ; preds = %31, %0
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 27
br i1 %6, label %7, label %32
7: ; preds = %4
%8 = load i32, i32* %3
%9 = srem i32 %8, 2
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %24
11: ; preds = %7
%12 = load i8, i8* %2
%13 = sext i8 %12 to i32
%14 = sub nsw i32 %13, 32
%15 = trunc i32 %14 to i8
store i8 %15, i8* %2
%16 = load i8, i8* %2
%17 = call i32 @ft_putchar(i8 signext %16)
%18 = load i8, i8* %2
%19 = sext i8 %18 to i32
%20 = add nsw i32 %19, 33
%21 = trunc i32 %20 to i8
store i8 %21, i8* %2
%22 = load i32, i32* %3
%23 = add nsw i32 %22, 1
store i32 %23, i32* %3
br label %31
24: ; preds = %7
%25 = load i8, i8* %2
%26 = call i32 @ft_putchar(i8 signext %25)
%27 = load i8, i8* %2
%28 = add i8 %27, 1
store i8 %28, i8* %2
%29 = load i32, i32* %3
%30 = add nsw i32 %29, 1
store i32 %30, i32* %3
br label %31
31: ; preds = %24, %11
br label %4
32: ; preds = %4
%33 = call i32 @ft_putchar(i8 signext 10)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 1, %0 ], [ %10, %1 ]
%3 = phi i8 [ 97, %0 ], [ %9, %1 ]
%4 = and i32 %2, 1
%5 = icmp eq i32 %4, 0
%6 = add nsw i8 %3, -32
%7 = select i1 %5, i8 %6, i8 %3
%8 = tail call i32 @ft_putchar(i8 signext %7)
%9 = add nuw nsw i8 %3, 1
%10 = add nuw nsw i32 %2, 1
%11 = icmp eq i32 %10, 27
br i1 %11, label %12, label %1
12: ; preds = %1
%13 = tail call i32 @ft_putchar(i8 signext 10)
ret i32 0
}