#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*/ puts(char *);
int main() {
  char array[6] = "abcGGG";
  int i;
  for (i = 0; i < 6; i++) {
    if (array[i] >= 'a' && array[i] <= 'z') {
      array[i] = array[i] - 32;
    } else if (array[i] >= 'A' && array[i] <= 'Z') {
      array[i] = array[i] + 32;
    }
  }
  puts(array);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xedb(%rip),%eax
mov    %eax,-0xa(%rbp)
mov    0xed5(%rip),%ax
mov    %ax,-0x6(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x6,-0x10(%rbp)
jge    11d5 <main+0xc5>
movslq -0x10(%rbp),%rax
movsbl -0xa(%rbp,%rax,1),%eax
cmp    $0x61,%eax
jl     1183 <main+0x73>
movslq -0x10(%rbp),%rax
movsbl -0xa(%rbp,%rax,1),%eax
cmp    $0x7a,%eax
jg     1183 <main+0x73>
movslq -0x10(%rbp),%rax
movsbl -0xa(%rbp,%rax,1),%eax
sub    $0x20,%eax
mov    %al,%cl
movslq -0x10(%rbp),%rax
mov    %cl,-0xa(%rbp,%rax,1)
jmp    11c2 <main+0xb2>
movslq -0x10(%rbp),%rax
movsbl -0xa(%rbp,%rax,1),%eax
cmp    $0x41,%eax
jl     11bd <main+0xad>
movslq -0x10(%rbp),%rax
movsbl -0xa(%rbp,%rax,1),%eax
cmp    $0x5a,%eax
jg     11bd <main+0xad>
movslq -0x10(%rbp),%rax
movsbl -0xa(%rbp,%rax,1),%eax
add    $0x20,%eax
mov    %al,%cl
movslq -0x10(%rbp),%rax
mov    %cl,-0xa(%rbp,%rax,1)
jmp    11c2 <main+0xb2>
jmp    11c7 <main+0xb7>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    113a <main+0x2a>
lea    -0xa(%rbp),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x67434241,0x2(%rsp)
67
movw   $0x6767,0x6(%rsp)
lea    0x2(%rsp),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.array = [6 x i8] c"abcGGG"
define i32 @main() {
%1 = alloca i32
%2 = alloca [6 x i8]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [6 x i8]* %2 to i8*
store i32 0, i32* %3
br label %5
5: ; preds = %60, %0
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 6
br i1 %7, label %8, label %63
8: ; preds = %5
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 %10
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp sge i32 %13, 97
br i1 %14, label %15, label %33
15: ; preds = %8
%16 = load i32, i32* %3
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 %17
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = icmp sle i32 %20, 122
br i1 %21, label %22, label %33
22: ; preds = %15
%23 = load i32, i32* %3
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 %24
%26 = load i8, i8* %25
%27 = sext i8 %26 to i32
%28 = sub nsw i32 %27, 32
%29 = trunc i32 %28 to i8
%30 = load i32, i32* %3
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 %31
store i8 %29, i8* %32
br label %59
33: ; preds = %15, %8
%34 = load i32, i32* %3
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 %35
%37 = load i8, i8* %36
%38 = sext i8 %37 to i32
%39 = icmp sge i32 %38, 65
br i1 %39, label %40, label %58
40: ; preds = %33
%41 = load i32, i32* %3
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 %42
%44 = load i8, i8* %43
%45 = sext i8 %44 to i32
%46 = icmp sle i32 %45, 90
br i1 %46, label %47, label %58
47: ; preds = %40
%48 = load i32, i32* %3
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 %49
%51 = load i8, i8* %50
%52 = sext i8 %51 to i32
%53 = add nsw i32 %52, 32
%54 = trunc i32 %53 to i8
%55 = load i32, i32* %3
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 %56
store i8 %54, i8* %57
br label %58
58: ; preds = %47, %40, %33
br label %59
59: ; preds = %58, %22
br label %60
60: ; preds = %59
%61 = load i32, i32* %3
%62 = add nsw i32 %61, 1
store i32 %62, i32* %3
br label %5
63: ; preds = %5
%64 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%65 = call i32 @puts(i8* %64)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [6 x i8]
%2 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
store i8 65, i8* %2
%3 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 1
store i8 66, i8* %3
%4 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 2
store i8 67, i8* %4
%5 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 3
store i8 103, i8* %5
%6 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 4
store i8 103, i8* %6
%7 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 5
store i8 103, i8* %7
%8 = call i32 @puts(i8* %2)
ret i32 0
}