#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*/ naive_printf(char *, char);
int naive_scanf(char *, char *, char *);
int /*<<< orphan*/ solve(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
int program_main() {
  char s1[26 + 1], s2[26 + 1];
  while (naive_scanf("%s%s", s1, s2) == 2) {
    solve(s1, s2, strlen(s1));
    naive_printf("%c", ('\n'));
  }
  return 0;
}


x86 assembly (clang, -O0):
<program_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
lea    -0x20(%rbp),%rsi
lea    -0x40(%rbp),%rdx
lea    0xea9(%rip),%rdi
call   1050 <naive_scanf@plt>
cmp    $0x2,%eax
jne    11a3 <program_main+0x63>
lea    -0x20(%rbp),%rax
mov    %rax,-0x50(%rbp)
lea    -0x40(%rbp),%rax
mov    %rax,-0x48(%rbp)
lea    -0x20(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x50(%rbp),%rdi
mov    -0x48(%rbp),%rsi
mov    %eax,%edx
call   1030 <solve@plt>
lea    0xe71(%rip),%rdi
mov    $0xa,%esi
call   1060 <naive_printf@plt>
jmp    1148 <program_main+0x8>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<program_main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x48,%rsp
lea    0xeae(%rip),%rdi
lea    0x20(%rsp),%rsi
mov    %rsp,%rdx
call   1050 <naive_scanf@plt>
cmp    $0x2,%eax
jne    11b5 <program_main+0x75>
lea    0x20(%rsp),%rbx
mov    %rsp,%r14
lea    0xe92(%rip),%r15
lea    0xe86(%rip),%r12
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
call   1030 <solve@plt>
mov    %r15,%rdi
mov    $0xa,%esi
call   1060 <naive_printf@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1050 <naive_scanf@plt>
cmp    $0x2,%eax
je     1180 <program_main+0x40>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%s%s\00"
@.str.1 = [3 x i8] c"%c\00"
define i32 @program_main() {
%1 = alloca [27 x i8]
%2 = alloca [27 x i8]
br label %3
3: ; preds = %8, %0
%4 = getelementptr inbounds [27 x i8], [27 x i8]* %1, i64 0, i64 0
%5 = getelementptr inbounds [27 x i8], [27 x i8]* %2, i64 0, i64 0
%6 = call i32 @naive_scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %5)
%7 = icmp eq i32 %6, 2
br i1 %7, label %8, label %15
8: ; preds = %3
%9 = getelementptr inbounds [27 x i8], [27 x i8]* %1, i64 0, i64 0
%10 = getelementptr inbounds [27 x i8], [27 x i8]* %2, i64 0, i64 0
%11 = getelementptr inbounds [27 x i8], [27 x i8]* %1, i64 0, i64 0
%12 = call i32 @strlen(i8* %11)
%13 = call i32 @solve(i8* %9, i8* %10, i32 %12)
%14 = call i32 @naive_printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8 signext 10)
br label %3
15: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%s%s\00"
@.str.1 = [3 x i8] c"%c\00"
define i32 @program_main() {
%1 = alloca [27 x i8]
%2 = alloca [27 x i8]
%3 = getelementptr inbounds [27 x i8], [27 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [27 x i8], [27 x i8]* %2, i64 0, i64 0
%5 = call i32 @naive_scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %4)
%6 = icmp eq i32 %5, 2
br i1 %6, label %7, label %13
7: ; preds = %0, %7
%8 = call i32 @strlen(i8* %3)
%9 = call i32 @solve(i8* %3, i8* %4, i32 %8)
%10 = call i32 @naive_printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8 signext 10)
%11 = call i32 @naive_scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %4)
%12 = icmp eq i32 %11, 2
br i1 %12, label %7, label %13
13: ; preds = %7, %0
ret i32 0
}