#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*/ fgets(char *, int, int /*<<< orphan*/);
scalar_t__ isalpha(char);
scalar_t__ islower(char);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdin;
int strlen(char *);
int main(void) {
  int len = 0;
  int i = 0;
  char text[256] = {'\0'};
  fgets(text, 256, stdin);
  len = strlen(text);
  if (text[len - 1] == '\n') {
    text[len - 1] = '\0';
  }
  len = strlen(text);
  for (i = 0; i < len; i++) {
    if (isalpha(text[i])) {
      if (islower(text[i])) {
        printf("A lower alphabet.\n");
        return 0;
      }
    }
  }
  printf("Not a lower alphabet.\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
lea    -0x110(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   1060 <memset@plt>
lea    -0x110(%rbp),%rdi
mov    0x2e47(%rip),%rax
mov    (%rax),%edx
mov    $0x100,%esi
call   1070 <fgets@plt>
lea    -0x110(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
cltq
movsbl -0x110(%rbp,%rax,1),%eax
ff
cmp    $0xa,%eax
jne    11e5 <main+0x85>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
cltq
movb   $0x0,-0x110(%rbp,%rax,1)
lea    -0x110(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    126d <main+0x10d>
movslq -0xc(%rbp),%rax
movsbl -0x110(%rbp,%rax,1),%edi
ff
call   1080 <isalpha@plt>
cmp    $0x0,%rax
je     125a <main+0xfa>
movslq -0xc(%rbp),%rax
movsbl -0x110(%rbp,%rax,1),%edi
ff
call   1030 <islower@plt>
cmp    $0x0,%rax
je     1255 <main+0xf5>
lea    0xdbc(%rip),%rdi
call   1050 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1280 <main+0x120>
jmp    125a <main+0xfa>
jmp    125f <main+0xff>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11fb <main+0x9b>
lea    0xd9f(%rip),%rdi
call   1050 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x108,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0xf0(%rsp)
movaps %xmm0,0xe0(%rsp)
movaps %xmm0,0xd0(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
mov    0x2e19(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x100,%esi
call   1060 <fgets@plt>
mov    %rbx,%rdi
call   1050 <strlen@plt>
cltq
cmpb   $0xa,-0x1(%rax,%rbx,1)
jne    11f7 <main+0xa7>
movb   $0x0,-0x1(%rsp,%rax,1)
mov    %rsp,%rdi
call   1050 <strlen@plt>
lea    0xdfa(%rip),%r14
test   %eax,%eax
jle    1248 <main+0xf8>
mov    %eax,%r15d
xor    %ebx,%ebx
lea    0xe00(%rip),%r12
jmp    1229 <main+0xd9>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbx
cmp    %rbx,%r15
je     1248 <main+0xf8>
movsbl (%rsp,%rbx,1),%edi
call   1070 <isalpha@plt>
test   %rax,%rax
je     1220 <main+0xd0>
movsbl (%rsp,%rbx,1),%edi
call   1030 <islower@plt>
test   %rax,%rax
je     1220 <main+0xd0>
mov    %r12,%r14
mov    %r14,%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x108,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@stdin = global i32 0
@.str = [19 x i8] c"A lower alphabet.\0A\00"
@.str.1 = [23 x i8] c"Not a lower alphabet.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [256 x i8]
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %3
%5 = bitcast [256 x i8]* %4 to i8*
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%7 = load i32, i32* @stdin
%8 = call i32 @fgets(i8* %6, i32 256, i32 %7)
%9 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%10 = call i32 @strlen(i8* %9)
store i32 %10, i32* %2
%11 = load i32, i32* %2
%12 = sub nsw i32 %11, 1
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 %13
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 10
br i1 %17, label %18, label %23
18: ; preds = %0
%19 = load i32, i32* %2
%20 = sub nsw i32 %19, 1
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 %21
store i8 0, i8* %22
br label %23
23: ; preds = %18, %0
%24 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%25 = call i32 @strlen(i8* %24)
store i32 %25, i32* %2
store i32 0, i32* %3
br label %26
26: ; preds = %48, %23
%27 = load i32, i32* %3
%28 = load i32, i32* %2
%29 = icmp slt i32 %27, %28
br i1 %29, label %30, label %51
30: ; preds = %26
%31 = load i32, i32* %3
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 %32
%34 = load i8, i8* %33
%35 = call i64 @isalpha(i8 signext %34)
%36 = icmp ne i64 %35, 0
br i1 %36, label %37, label %47
37: ; preds = %30
%38 = load i32, i32* %3
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 %39
%41 = load i8, i8* %40
%42 = call i64 @islower(i8 signext %41)
%43 = icmp ne i64 %42, 0
br i1 %43, label %44, label %46
44: ; preds = %37
%45 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %1
br label %53
46: ; preds = %37
br label %47
47: ; preds = %46, %30
br label %48
48: ; preds = %47
%49 = load i32, i32* %3
%50 = add nsw i32 %49, 1
store i32 %50, i32* %3
br label %26
51: ; preds = %26
%52 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %1
br label %53
53: ; preds = %51, %44
%54 = load i32, i32* %1
ret i32 %54
}

LLVM IR (-O2):
@stdin = global i32 0
@str = [22 x i8] c"Not a lower alphabet.\00"
@str.2 = [18 x i8] c"A lower alphabet.\00"
define i32 @main() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stdin
%4 = call i32 @fgets(i8* %2, i32 256, i32 %3)
%5 = call i32 @strlen(i8* %2)
%6 = add nsw i32 %5, -1
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 %7
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 10
br i1 %10, label %11, label %12
11: ; preds = %0
store i8 0, i8* %8
br label %12
12: ; preds = %11, %0
%13 = call i32 @strlen(i8* %2)
%14 = icmp sgt i32 %13, 0
br i1 %14, label %15, label %30
15: ; preds = %12
%16 = zext i32 %13 to i64
br label %17
17: ; preds = %15, %27
%18 = phi i64 [ 0, %15 ], [ %28, %27 ]
%19 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 %18
%20 = load i8, i8* %19
%21 = call i64 @isalpha(i8 signext %20)
%22 = icmp eq i64 %21, 0
br i1 %22, label %27, label %23
23: ; preds = %17
%24 = load i8, i8* %19
%25 = call i64 @islower(i8 signext %24)
%26 = icmp eq i64 %25, 0
br i1 %26, label %27, label %30
27: ; preds = %17, %23
%28 = add nuw nsw i64 %18, 1
%29 = icmp eq i64 %28, %16
br i1 %29, label %30, label %17
30: ; preds = %27, %23, %12
%31 = phi i8* [ getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0), %12 ], [ getelementptr inbounds ([18 x i8], [18 x i8]* @str.2, i64 0, i64 0), %23 ], [ getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0), %27 ]
%32 = call i32 @puts(i8* dereferenceable(1) %31)
ret i32 0
}