#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 add(char *, char *, char *);
int /*<<< orphan*/ printf(char *, char);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  int i, j, k, c, len, num, temp, t, cy;
  char num1[101], num2[101], res[101];
  t = 10;
  while (t--) {
    scanf("%s", num1);
    scanf("%s", num2);
    k = add(num1, num2, res);
    for (i = 0; i < k; i++)
      printf("%c", res[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x170,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x24(%rbp)
cmp    $0x0,%eax
je     11de <main+0xae>
lea    -0x90(%rbp),%rsi
lea    0xe95(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x100(%rbp),%rsi
lea    0xe82(%rip),%rdi
call   1050 <scanf@plt>
lea    -0x90(%rbp),%rdi
lea    -0x100(%rbp),%rsi
lea    -0x170(%rbp),%rdx
call   1030 <add@plt>
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    11d9 <main+0xa9>
movslq -0x8(%rbp),%rax
lea    0xe45(%rip),%rdi
movsbl -0x170(%rbp,%rax,1),%esi
ff
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11a7 <main+0x77>
jmp    1149 <main+0x19>
xor    %eax,%eax
add    $0x170,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x148,%rsp
mov    $0x9,%ebp
lea    0xe0(%rsp),%r15
lea    0x70(%rsp),%r13
lea    0xea9(%rip),%rbx
jmp    1165 <main+0x35>
nopl   0x0(%rax)
sub    $0x1,%ebp
jb     11b8 <main+0x88>
lea    0xe94(%rip),%r14
mov    %r14,%rdi
mov    %r15,%rsi
call   1050 <scanf@plt>
mov    %r14,%rdi
mov    %r13,%rsi
call   1050 <scanf@plt>
mov    %r15,%rdi
mov    %r13,%rsi
mov    %rsp,%rdx
call   1030 <add@plt>
test   %eax,%eax
jle    1160 <main+0x30>
mov    %eax,%r12d
xor    %r14d,%r14d
nopw   0x0(%rax,%rax,1)
movsbl (%rsp,%r14,1),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
add    $0x1,%r14
cmp    %r14,%r12
jne    11a0 <main+0x70>
jmp    1160 <main+0x30>
xor    %eax,%eax
add    $0x148,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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