#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 atoi(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  int n = 0;
  scanf("%d", &n);
  char buffer[10];
  while (n--) {
    scanf("%s", buffer);
    if (buffer[0] == 'P') {
      printf("skipped\n");
      continue;
    }
    int index = 0;
    while (*(buffer + index) != '+')
      index++;
    buffer[index] = '\0';
    printf("%d\n", atoi(buffer) + atoi(buffer + index + 1));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xeb3(%rip),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
cmp    $0x0,%eax
je     1206 <main+0xd6>
lea    -0x12(%rbp),%rsi
lea    0xe8c(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
movsbl -0x12(%rbp),%eax
cmp    $0x50,%eax
jne    119e <main+0x6e>
lea    0xe74(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1158 <main+0x28>
movl   $0x0,-0x18(%rbp)
movslq -0x18(%rbp),%rax
movsbl -0x12(%rbp,%rax,1),%eax
cmp    $0x2b,%eax
je     11c5 <main+0x95>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11a5 <main+0x75>
movslq -0x18(%rbp),%rax
movb   $0x0,-0x12(%rbp,%rax,1)
lea    -0x12(%rbp),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x1c(%rbp)
lea    -0x12(%rbp),%rdi
movslq -0x18(%rbp),%rax
add    %rax,%rdi
add    $0x1,%rdi
call   1050 <atoi@plt>
mov    -0x1c(%rbp),%esi
add    %eax,%esi
lea    0xe15(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1158 <main+0x28>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
movl   $0x0,0x8(%rsp)
lea    0xea3(%rip),%rdi
lea    0x8(%rsp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
subl   $0x1,0x8(%rsp)
jae    1181 <main+0x41>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xe7b(%rip),%r14
lea    0xe(%rsp),%r13
lea    0xe72(%rip),%r15
lea    0xe6f(%rip),%r12
jmp    11d5 <main+0x95>
nopl   (%rax)
xor    %eax,%eax
mov    %eax,%ebx
movb   $0x0,0xe(%rsp,%rbx,1)
mov    %r13,%rdi
call   1060 <atoi@plt>
mov    %eax,%ebp
lea    (%rsp,%rbx,1),%rdi
add    $0xf,%rdi
call   1060 <atoi@plt>
add    %eax,%ebp
mov    %r15,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
subl   $0x1,0x8(%rsp)
jb     1170 <main+0x30>
mov    %r14,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    0xe(%rsp),%al
cmp    $0x2b,%al
je     11a0 <main+0x60>
cmp    $0x50,%al
jne    1210 <main+0xd0>
mov    %r12,%rdi
call   1030 <puts@plt>
subl   $0x1,0x8(%rsp)
jae    11d5 <main+0x95>
jmp    1170 <main+0x30>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    0x1(%rcx),%rax
cmpb   $0x2b,0xf(%rsp,%rcx,1)
mov    %rax,%rcx
jne    1220 <main+0xe0>
jmp    11a2 <main+0x62>

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

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