#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);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char sentence[3000];
  int counter = 0;
  int alphabet[26];
  scanf("%[^\n]s", sentence);
  while (sentence[counter] != '\0') {
    printf("%d", counter);
    if (sentence[counter] >= 'a' && sentence[counter] <= 'z') {
    }
    counter++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xbc4(%rbp)
lea    -0xbc0(%rbp),%rsi
lea    0xeb6(%rip),%rdi
call   1040 <scanf@plt>
movslq -0xbc4(%rbp),%rax
movsbl -0xbc0(%rbp,%rax,1),%eax
ff
cmp    $0x0,%eax
je     11c2 <main+0xa2>
mov    -0xbc4(%rbp),%esi
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
movslq -0xbc4(%rbp),%rax
movsbl -0xbc0(%rbp,%rax,1),%eax
ff
cmp    $0x61,%eax
jl     11ae <main+0x8e>
movslq -0xbc4(%rbp),%rax
movsbl -0xbc0(%rbp,%rax,1),%eax
ff
cmp    $0x7a,%eax
jg     11ae <main+0x8e>
jmp    11ae <main+0x8e>
mov    -0xbc4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xbc4(%rbp)
jmp    114f <main+0x2f>
xor    %eax,%eax
add    $0xc30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0xbb8,%rsp
lea    0xecf(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
cmpb   $0x0,(%rsp)
je     1165 <main+0x45>
xor    %ebx,%ebx
lea    0xebf(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
cmpb   $0x0,0x1(%rsp,%rbx,1)
lea    0x1(%rbx),%rbx
jne    1150 <main+0x30>
xor    %eax,%eax
add    $0xbb8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%[^\0A]s\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca [3000 x i8]
%2 = getelementptr inbounds [3000 x i8], [3000 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = load i8, i8* %2
%5 = icmp eq i8 %4, 0
br i1 %5, label %14, label %6
6: ; preds = %0, %6
%7 = phi i64 [ %10, %6 ], [ 0, %0 ]
%8 = trunc i64 %7 to i32
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = add nuw i64 %7, 1
%11 = getelementptr inbounds [3000 x i8], [3000 x i8]* %1, i64 0, i64 %10
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %6
14: ; preds = %6, %0
ret i32 0
}