#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*/ gets(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ proc(char *);
scalar_t__ scanf(char *, ...);
int main() {
  int n;
  char c;
  char sz[101] = {'\0'};
  scanf("%d", &n);
  while (scanf("%c", &c) && c != '\n')
    ;
  while (n-- > 0) {
    gets(sz);
    proc(sz);
    if (n != 0) {
      printf("\n");
    } else {
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
xor    %esi,%esi
mov    $0x65,%edx
call   1040 <memset@plt>
lea    0xe87(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1070 <scanf@plt>
lea    0xe78(%rip),%rdi
lea    -0x9(%rbp),%rsi
mov    $0x0,%al
call   1070 <scanf@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x71(%rbp)
je     11b5 <main+0x65>
movsbl -0x9(%rbp),%eax
cmp    $0xa,%eax
setne  %al
mov    %al,-0x71(%rbp)
mov    -0x71(%rbp),%al
test   $0x1,%al
jne    11c5 <main+0x75>
jmp    11ca <main+0x7a>
jmp    1184 <main+0x34>
jmp    11cf <main+0x7f>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
jle    121a <main+0xca>
lea    -0x70(%rbp),%rdi
call   1060 <gets@plt>
lea    -0x70(%rbp),%rdi
call   1050 <proc@plt>
cmpl   $0x0,-0x8(%rbp)
je     1210 <main+0xc0>
lea    0xe00(%rip),%rdi
call   1030 <printf@plt>
jmp    1215 <main+0xc5>
jmp    1215 <main+0xc5>
jmp    11cf <main+0x7f>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x78,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movq   $0x0,0x6d(%rsp)
lea    0xe88(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
lea    0xe78(%rip),%r14
lea    0xb(%rsp),%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <scanf@plt>
test   %rax,%rax
je     11a9 <main+0x69>
cmpb   $0xa,0xb(%rsp)
jne    1190 <main+0x50>
mov    0xc(%rsp),%eax
lea    -0x1(%rax),%ecx
mov    %ecx,0xc(%rsp)
test   %eax,%eax
jle    11f0 <main+0xb0>
lea    0x10(%rsp),%rbx
nopl   (%rax)
mov    %rbx,%rdi
call   1050 <gets@plt>
mov    %rbx,%rdi
call   1040 <proc@plt>
cmpl   $0x0,0xc(%rsp)
je     11f0 <main+0xb0>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0xc(%rsp),%eax
lea    -0x1(%rax),%ecx
mov    %ecx,0xc(%rsp)
test   %eax,%eax
jg     11c0 <main+0x80>
xor    %eax,%eax
add    $0x78,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca [101 x i8]
%4 = bitcast i32* %1 to i8*
%5 = getelementptr inbounds [101 x i8], [101 x i8]* %3, i64 0, i64 0
%6 = call i64 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
br label %7
7: ; preds = %7, %0
%8 = call i64 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%9 = icmp ne i64 %8, 0
%10 = load i8, i8* %2
%11 = icmp ne i8 %10, 10
%12 = select i1 %9, i1 %11, i1 false
br i1 %12, label %7, label %13
13: ; preds = %7
%14 = load i32, i32* %1
%15 = add nsw i32 %14, -1
store i32 %15, i32* %1
%16 = icmp sgt i32 %14, 0
br i1 %16, label %17, label %27
17: ; preds = %13, %22
%18 = call i32 @gets(i8* %5)
%19 = call i32 @proc(i8* %5)
%20 = load i32, i32* %1
%21 = icmp eq i32 %20, 0
br i1 %21, label %27, label %22
22: ; preds = %17
%23 = call i32 @putchar(i32 10)
%24 = load i32, i32* %1
%25 = add nsw i32 %24, -1
store i32 %25, i32* %1
%26 = icmp sgt i32 %24, 0
br i1 %26, label %17, label %27
27: ; preds = %22, %17, %13
ret i32 0
}