#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__ islower(char);
int /*<<< orphan*/ printf(char *, char);
int main(int argc, char *argv[]) {
  for (int i = 0; argv[1][i]; ++i)
    if (islower(argv[1][i]))
      printf("%c\n", argv[1][i]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movslq -0x14(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     11a1 <main+0x81>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
je     118e <main+0x6e>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movslq -0x14(%rbp),%rcx
lea    0xe7b(%rip),%rdi
movsbl (%rax,%rcx,1),%esi
call   1040 <printf@plt>
jmp    1193 <main+0x73>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    113d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
mov    0x8(%rsi),%rax
mov    (%rax),%al
test   %al,%al
je     1170 <main+0x50>
mov    %rsi,%r15
xor    %ebx,%ebx
lea    0xec5(%rip),%r14
jmp    1151 <main+0x31>
nopl   (%rax)
mov    0x8(%r15),%rax
movzbl 0x1(%rax,%rbx,1),%eax
add    $0x1,%rbx
test   %al,%al
je     1170 <main+0x50>
movsbl %al,%edi
call   1030 <islower@plt>
test   %rax,%rax
je     1140 <main+0x20>
mov    0x8(%r15),%rax
movsbl (%rax,%rbx,1),%esi
mov    %r14,%rdi
call   1040 <printf@plt>
jmp    1140 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%c\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %18, %2
ret i32 0
8: ; preds = %2, %18
%9 = phi i64 [ %19, %18 ], [ 0, %2 ]
%10 = phi i8 [ %22, %18 ], [ %5, %2 ]
%11 = tail call i64 @islower(i8 signext %10)
%12 = icmp eq i64 %11, 0
br i1 %12, label %18, label %13
13: ; preds = %8
%14 = load i8*, i8** %3
%15 = getelementptr inbounds i8, i8* %14, i64 %9
%16 = load i8, i8* %15
%17 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext %16)
br label %18
18: ; preds = %8, %13
%19 = add nuw i64 %9, 1
%20 = load i8*, i8** %3
%21 = getelementptr inbounds i8, i8* %20, i64 %19
%22 = load i8, i8* %21
%23 = icmp eq i8 %22, 0
br i1 %23, label %7, label %8
}