#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 /*<<< orphan*/ system(char *);
int main1() {
  char c, arr['z' - 'a'], *pChar;
  int i, *pInt;
  int matr = 34;
  for (c = 'a'; c < 'z'; c++) {
    arr[c - 'a'] = c;
    printf("%c ", arr[c - 'a']);
  }
  printf("\n");
  pChar = arr + matr % 15;
  for (i = 0; i < 5; i++) {
    printf("%c ", *pChar);
    pChar++;
  }
  printf("\n");
  pInt = (int *)arr + matr % 2;
  for (i = 0; i < 5; i++) {
    pChar = (char *)pInt;
    printf("%c ", *pChar);
    pInt++;
  }
  system("pause");
  return 0;
}


x86 assembly (clang, -O0):
<main1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x22,-0x3c(%rbp)
movb   $0x61,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x7a,%eax
jge    1179 <main1+0x59>
mov    -0x1(%rbp),%cl
movsbl -0x1(%rbp),%eax
sub    $0x61,%eax
cltq
mov    %cl,-0x20(%rbp,%rax,1)
movsbl -0x1(%rbp),%eax
sub    $0x61,%eax
cltq
movsbl -0x20(%rbp,%rax,1),%esi
lea    0xe9b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x1(%rbp),%al
add    $0x1,%al
mov    %al,-0x1(%rbp)
jmp    1133 <main1+0x13>
lea    0xe84(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x20(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x3c(%rbp),%eax
mov    $0xf,%ecx
cltd
idiv   %ecx
mov    -0x48(%rbp),%rax
movslq %edx,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
cmpl   $0x5,-0x2c(%rbp)
jge    11e8 <main1+0xc8>
mov    -0x28(%rbp),%rax
movsbl (%rax),%esi
lea    0xe39(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11af <main1+0x8f>
lea    0xe15(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x20(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x3c(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    -0x50(%rbp),%rax
movslq %edx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
movl   $0x0,-0x2c(%rbp)
cmpl   $0x5,-0x2c(%rbp)
jge    1263 <main1+0x143>
mov    -0x38(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movsbl (%rax),%esi
lea    0xdbe(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x38(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x38(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1222 <main1+0x102>
lea    0xd9c(%rip),%rdi
call   1030 <system@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main1>:
push   %rbp
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    $0x61,%ebx
lea    0xebc(%rip),%r14
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
mov    %bl,(%rsp,%rbp,1)
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%ebx
add    $0x1,%rbp
cmp    $0x19,%rbp
jne    1150 <main1+0x20>
mov    $0xa,%edi
call   1030 <putchar@plt>
movsbl 0x4(%rsp),%r14d
lea    0xe7d(%rip),%rbx
mov    %rbx,%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
movsbl 0x5(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movsbl 0x6(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movsbl 0x7(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movsbl 0x8(%rsp),%ebp
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movsbl (%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    %r14d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
movsbl 0xc(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movsbl 0x10(%rsp),%esi
mov    %rbx,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xde0(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%c \00"
@.str.2 = [6 x i8] c"pause\00"
define i32 @main1() {
%1 = alloca [25 x i8]
%2 = getelementptr inbounds [25 x i8], [25 x i8]* %1, i64 0, i64 0
br label %3
3: ; preds = %0, %3
%4 = phi i32 [ 97, %0 ], [ %11, %3 ]
%5 = phi i64 [ 97, %0 ], [ %12, %3 ]
%6 = add nsw i64 %5, -97
%7 = getelementptr inbounds [25 x i8], [25 x i8]* %1, i64 0, i64 %6
%8 = trunc i32 %4 to i8
store i8 %8, i8* %7
%9 = trunc i64 %5 to i32
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i32 %4, 1
%12 = add nuw nsw i64 %5, 1
%13 = icmp eq i64 %12, 122
br i1 %13, label %14, label %3
14: ; preds = %3
%15 = tail call i32 @putchar(i32 10)
%16 = getelementptr inbounds [25 x i8], [25 x i8]* %1, i64 0, i64 4
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %18)
%20 = getelementptr inbounds [25 x i8], [25 x i8]* %1, i64 0, i64 5
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %22)
%24 = getelementptr inbounds [25 x i8], [25 x i8]* %1, i64 0, i64 6
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %26)
%28 = getelementptr inbounds [25 x i8], [25 x i8]* %1, i64 0, i64 7
%29 = load i8, i8* %28
%30 = sext i8 %29 to i32
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %30)
%32 = getelementptr inbounds [25 x i8], [25 x i8]* %1, i64 0, i64 8
%33 = load i8, i8* %32
%34 = sext i8 %33 to i32
%35 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %34)
%36 = tail call i32 @putchar(i32 10)
%37 = getelementptr inbounds [25 x i8], [25 x i8]* %1, i64 0, i64 0
%38 = load i8, i8* %37
%39 = sext i8 %38 to i32
%40 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %39)
%41 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %18)
%42 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %34)
%43 = getelementptr inbounds [25 x i8], [25 x i8]* %1, i64 0, i64 12
%44 = load i8, i8* %43
%45 = sext i8 %44 to i32
%46 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %45)
%47 = getelementptr inbounds [25 x i8], [25 x i8]* %1, i64 0, i64 16
%48 = load i8, i8* %47
%49 = sext i8 %48 to i32
%50 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %49)
%51 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}