#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*/ input_string(char *, char *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, int *);
int main(int argc, char const *argv[]) {
  int t;
  scanf("%d\n", &t);
  char string_array[t][200];
  char result_array[t][200];
  for (int i = 0; i < t; ++i) {
    input_string(string_array[i], result_array[i]);
  }
  for (int i = 0; i < t; ++i) {
    printf("%s\n", result_array[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x14(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x20(%rbp)
imul   $0xc8,%rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x48(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x28(%rbp)
mov    -0x14(%rbp),%eax
imul   $0xc8,%rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x40(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11ed <main+0xbd>
mov    -0x40(%rbp),%rsi
mov    -0x48(%rbp),%rdi
movslq -0x34(%rbp),%rax
imul   $0xc8,%rax,%rax
add    %rax,%rdi
movslq -0x34(%rbp),%rax
imul   $0xc8,%rax,%rax
add    %rax,%rsi
call   1040 <input_string@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11aa <main+0x7a>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    122c <main+0xfc>
mov    -0x40(%rbp),%rsi
movslq -0x38(%rbp),%rax
imul   $0xc8,%rax,%rax
add    %rax,%rsi
lea    0xdeb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    11f4 <main+0xc4>
movl   $0x0,-0x4(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xebb(%rip),%rdi
lea    -0x2c(%rbp),%rsi
call   1050 <scanf@plt>
mov    %rsp,%r12
mov    -0x2c(%rbp),%eax
mov    %rsp,%r15
imul   $0xc8,%rax,%rax
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r15
mov    %r15,%rsp
mov    -0x2c(%rbp),%eax
mov    %rsp,%r14
imul   $0xc8,%rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
sub    %rcx,%r14
mov    %r14,%rsp
test   %eax,%eax
jle    11ff <main+0xcf>
xor    %r13d,%r13d
mov    %r14,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r15,%rdi
mov    %rbx,%rsi
call   1040 <input_string@plt>
add    $0x1,%r13
movslq -0x2c(%rbp),%rax
add    $0xc8,%r15
add    $0xc8,%rbx
cmp    %rax,%r13
jl     11a0 <main+0x70>
test   %eax,%eax
jle    11ff <main+0xcf>
xor    %ebx,%ebx
lea    0xe31(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15,%rdi
mov    %r14,%rsi
call   1030 <printf@plt>
add    $0x1,%rbx
movslq -0x2c(%rbp),%rax
add    $0xc8,%r14
cmp    %rax,%rbx
jl     11e0 <main+0xb0>
mov    %r12,%rsp
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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