#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 */
scalar_t__ isalpha(char);
int /*<<< orphan*/ printf(char *, int, char);
int main() {
  char s[] = "cD1-5#Xt_Et";
  int i;
  for (i = 0; s[i] != 0; i++) {
    if (isalpha(s[i])) {
      printf("%d : %c \n", i, s[i]);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xec8(%rip),%eax
mov    %eax,-0x8(%rbp)
movl   $0x0,-0x14(%rbp)
movslq -0x14(%rbp),%rax
movsbl -0x10(%rbp,%rax,1),%eax
cmp    $0x0,%eax
je     119f <main+0x7f>
movslq -0x14(%rbp),%rax
movsbl -0x10(%rbp,%rax,1),%edi
call   1040 <isalpha@plt>
cmp    $0x0,%rax
je     118c <main+0x6c>
mov    -0x14(%rbp),%esi
movslq -0x14(%rbp),%rax
lea    0xe8a(%rip),%rdi
movsbl -0x10(%rbp,%rax,1),%edx
call   1030 <printf@plt>
jmp    1191 <main+0x71>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    114a <main+0x2a>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x63,%edi
call   1040 <isalpha@plt>
test   %rax,%rax
je     1143 <main+0x23>
lea    0xec9(%rip),%rdi
xor    %esi,%esi
mov    $0x63,%edx
call   1030 <printf@plt>
mov    $0x44,%edi
call   1040 <isalpha@plt>
test   %rax,%rax
je     1168 <main+0x48>
lea    0xea7(%rip),%rdi
mov    $0x1,%esi
mov    $0x44,%edx
call   1030 <printf@plt>
mov    $0x31,%edi
call   1040 <isalpha@plt>
test   %rax,%rax
je     118d <main+0x6d>
lea    0xe82(%rip),%rdi
mov    $0x2,%esi
mov    $0x31,%edx
call   1030 <printf@plt>
mov    $0x2d,%edi
call   1040 <isalpha@plt>
test   %rax,%rax
je     11b2 <main+0x92>
lea    0xe5d(%rip),%rdi
mov    $0x3,%esi
mov    $0x2d,%edx
call   1030 <printf@plt>
mov    $0x35,%edi
call   1040 <isalpha@plt>
test   %rax,%rax
je     11d7 <main+0xb7>
lea    0xe38(%rip),%rdi
mov    $0x4,%esi
mov    $0x35,%edx
call   1030 <printf@plt>
mov    $0x23,%edi
call   1040 <isalpha@plt>
test   %rax,%rax
je     11fc <main+0xdc>
lea    0xe13(%rip),%rdi
mov    $0x5,%esi
mov    $0x23,%edx
call   1030 <printf@plt>
mov    $0x58,%edi
call   1040 <isalpha@plt>
test   %rax,%rax
je     1221 <main+0x101>
lea    0xdee(%rip),%rdi
mov    $0x6,%esi
mov    $0x58,%edx
call   1030 <printf@plt>
mov    $0x74,%edi
call   1040 <isalpha@plt>
test   %rax,%rax
je     1246 <main+0x126>
lea    0xdc9(%rip),%rdi
mov    $0x7,%esi
mov    $0x74,%edx
call   1030 <printf@plt>
mov    $0x5f,%edi
call   1040 <isalpha@plt>
test   %rax,%rax
je     126b <main+0x14b>
lea    0xda4(%rip),%rdi
mov    $0x8,%esi
mov    $0x5f,%edx
call   1030 <printf@plt>
mov    $0x45,%edi
call   1040 <isalpha@plt>
test   %rax,%rax
je     1290 <main+0x170>
lea    0xd7f(%rip),%rdi
mov    $0x9,%esi
mov    $0x45,%edx
call   1030 <printf@plt>
mov    $0x74,%edi
call   1040 <isalpha@plt>
test   %rax,%rax
je     12b5 <main+0x195>
lea    0xd5a(%rip),%rdi
mov    $0xa,%esi
mov    $0x74,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"%d : %c \0A\00"
define i32 @main() {
%1 = tail call i64 @isalpha(i8 signext 99)
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 0, i8 signext 99)
br label %5
5: ; preds = %0, %3
%6 = tail call i64 @isalpha(i8 signext 68)
%7 = icmp eq i64 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 1, i8 signext 68)
br label %10
10: ; preds = %8, %5
%11 = tail call i64 @isalpha(i8 signext 49)
%12 = icmp eq i64 %11, 0
br i1 %12, label %15, label %13
13: ; preds = %10
%14 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 2, i8 signext 49)
br label %15
15: ; preds = %13, %10
%16 = tail call i64 @isalpha(i8 signext 45)
%17 = icmp eq i64 %16, 0
br i1 %17, label %20, label %18
18: ; preds = %15
%19 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 3, i8 signext 45)
br label %20
20: ; preds = %18, %15
%21 = tail call i64 @isalpha(i8 signext 53)
%22 = icmp eq i64 %21, 0
br i1 %22, label %25, label %23
23: ; preds = %20
%24 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 4, i8 signext 53)
br label %25
25: ; preds = %23, %20
%26 = tail call i64 @isalpha(i8 signext 35)
%27 = icmp eq i64 %26, 0
br i1 %27, label %30, label %28
28: ; preds = %25
%29 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 5, i8 signext 35)
br label %30
30: ; preds = %28, %25
%31 = tail call i64 @isalpha(i8 signext 88)
%32 = icmp eq i64 %31, 0
br i1 %32, label %35, label %33
33: ; preds = %30
%34 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 6, i8 signext 88)
br label %35
35: ; preds = %33, %30
%36 = tail call i64 @isalpha(i8 signext 116)
%37 = icmp eq i64 %36, 0
br i1 %37, label %40, label %38
38: ; preds = %35
%39 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 7, i8 signext 116)
br label %40
40: ; preds = %38, %35
%41 = tail call i64 @isalpha(i8 signext 95)
%42 = icmp eq i64 %41, 0
br i1 %42, label %45, label %43
43: ; preds = %40
%44 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 8, i8 signext 95)
br label %45
45: ; preds = %43, %40
%46 = tail call i64 @isalpha(i8 signext 69)
%47 = icmp eq i64 %46, 0
br i1 %47, label %50, label %48
48: ; preds = %45
%49 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 9, i8 signext 69)
br label %50
50: ; preds = %48, %45
%51 = tail call i64 @isalpha(i8 signext 116)
%52 = icmp eq i64 %51, 0
br i1 %52, label %55, label %53
53: ; preds = %50
%54 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 10, i8 signext 116)
br label %55
55: ; preds = %53, %50
ret i32 0
}