#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*/);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ primeirasLetras(char *);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ stdin;
int main() {
  int qnt_casos;
  char linha[100];
  scanf("%d", &qnt_casos);
  getchar();
  while (qnt_casos--) {
    fgets(linha, 100, stdin);
    primeirasLetras(linha);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
je     119f <main+0x5f>
lea    -0x70(%rbp),%rdi
mov    0x2e63(%rip),%rax
mov    (%rax),%edx
mov    $0x64,%esi
call   1030 <fgets@plt>
lea    -0x70(%rbp),%rdi
call   1060 <primeirasLetras@plt>
jmp    1166 <main+0x26>
mov    -0x4(%rbp),%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x78,%rsp
lea    0xeb2(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
subl   $0x1,0xc(%rsp)
jb     119f <main+0x5f>
mov    0x2e7b(%rip),%r14
lea    0x10(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%r14),%edx
mov    %rbx,%rdi
mov    $0x64,%esi
call   1030 <fgets@plt>
mov    %rbx,%rdi
call   1060 <primeirasLetras@plt>
subl   $0x1,0xc(%rsp)
jae    1180 <main+0x40>
xor    %eax,%eax
add    $0x78,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@stdin = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [100 x i8]
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%5 = call i32 (...) @getchar()
br label %6
6: ; preds = %10, %0
%7 = load i32, i32* %2
%8 = add nsw i32 %7, -1
store i32 %8, i32* %2
%9 = icmp ne i32 %7, 0
br i1 %9, label %10, label %16
10: ; preds = %6
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%12 = load i32, i32* @stdin
%13 = call i32 @fgets(i8* %11, i32 100, i32 %12)
%14 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%15 = call i32 @primeirasLetras(i8* %14)
br label %6
16: ; preds = %6
%17 = load i32, i32* %1
ret i32 %17
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@stdin = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
%3 = bitcast i32* %1 to i8*
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = call i32 (...) @getchar()
%7 = load i32, i32* %1
%8 = add nsw i32 %7, -1
store i32 %8, i32* %1
%9 = icmp eq i32 %7, 0
br i1 %9, label %17, label %10
10: ; preds = %0, %10
%11 = load i32, i32* @stdin
%12 = call i32 @fgets(i8* %4, i32 100, i32 %11)
%13 = call i32 @primeirasLetras(i8* %4)
%14 = load i32, i32* %1
%15 = add nsw i32 %14, -1
store i32 %15, i32* %1
%16 = icmp eq i32 %14, 0
br i1 %16, label %17, label %10
17: ; preds = %10, %0
ret i32 0
}