#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() {
  char c;
  char str[20] = "C Language";
  int i = 0;
  while ((c = str[i]) != '\0') {
    if (c >= 'A' && c <= 'Z')
      c = c + 32;
    printf("%c", c);
    i++;
  }
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xed5(%rip),%eax
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x24(%rbp)
movslq -0x24(%rbp),%rax
mov    -0x20(%rbp,%rax,1),%al
mov    %al,-0x5(%rbp)
movsbl %al,%eax
cmp    $0x0,%eax
je     11a0 <main+0x90>
movsbl -0x5(%rbp),%eax
cmp    $0x41,%eax
jl     1180 <main+0x70>
movsbl -0x5(%rbp),%eax
cmp    $0x5a,%eax
jg     1180 <main+0x70>
movsbl -0x5(%rbp),%eax
add    $0x20,%eax
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%esi
lea    0xe89(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1145 <main+0x35>
lea    0xe70(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x63,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    $0x6c,%edi
call   1030 <putchar@plt>
mov    $0x61,%edi
call   1030 <putchar@plt>
mov    $0x6e,%edi
call   1030 <putchar@plt>
mov    $0x67,%edi
call   1030 <putchar@plt>
mov    $0x75,%edi
call   1030 <putchar@plt>
mov    $0x61,%edi
call   1030 <putchar@plt>
mov    $0x67,%edi
call   1030 <putchar@plt>
mov    $0x65,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @putchar(i32 99)
%2 = tail call i32 @putchar(i32 32)
%3 = tail call i32 @putchar(i32 108)
%4 = tail call i32 @putchar(i32 97)
%5 = tail call i32 @putchar(i32 110)
%6 = tail call i32 @putchar(i32 103)
%7 = tail call i32 @putchar(i32 117)
%8 = tail call i32 @putchar(i32 97)
%9 = tail call i32 @putchar(i32 103)
%10 = tail call i32 @putchar(i32 101)
%11 = tail call i32 @putchar(i32 10)
ret i32 0
}