#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 abs(int);
char *malloc(int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  int i = 0;
  char *word;
  char *word1;
  int count = 0;
  int hashtable[26];
  word = malloc(10000);
  word1 = malloc(10000);
  scanf("%s", word);
  scanf("%s", word1);
  for (i = 0; i < 26; i++)
    hashtable[i] = 0;
  for (i = 0; word[i] != '\0'; i++) {
    int temp = ((int)word[i] - 97);
    hashtable[temp]++;
  }
  for (i = 0; word1[i] != '\0'; i++) {
    int temp = ((int)word1[i] - 97);
    hashtable[temp]--;
  }
  for (i = 0; i < 26; i++) {
    count = count + abs(hashtable[i]);
  }
  printf("\n%d", count);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    $0x2710,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    $0x2710,%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xe79(%rip),%rdi
call   1060 <scanf@plt>
mov    -0x18(%rbp),%rsi
lea    0xe69(%rip),%rdi
call   1060 <scanf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x1a,-0x8(%rbp)
jge    11ca <main+0x8a>
movslq -0x8(%rbp),%rax
movl   $0x0,-0x90(%rbp,%rax,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11a3 <main+0x63>
movl   $0x0,-0x8(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x8(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1221 <main+0xe1>
mov    -0x10(%rbp),%rax
movslq -0x8(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
sub    $0x61,%eax
mov    %eax,-0x94(%rbp)
movslq -0x94(%rbp),%rax
mov    -0x90(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x90(%rbp,%rax,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    11d1 <main+0x91>
movl   $0x0,-0x8(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x8(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1278 <main+0x138>
mov    -0x18(%rbp),%rax
movslq -0x8(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
sub    $0x61,%eax
mov    %eax,-0x98(%rbp)
movslq -0x98(%rbp),%rax
mov    -0x90(%rbp,%rax,4),%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x90(%rbp,%rax,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1228 <main+0xe8>
movl   $0x0,-0x8(%rbp)
cmpl   $0x1a,-0x8(%rbp)
jge    12bd <main+0x17d>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x9c(%rbp)
movslq -0x8(%rbp),%rax
mov    -0x90(%rbp,%rax,4),%edi
call   1030 <abs@plt>
mov    %eax,%ecx
mov    -0x9c(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    127f <main+0x13f>
mov    -0x1c(%rbp),%esi
lea    0xd3c(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x70,%rsp
mov    $0x2710,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    $0x2710,%edi
call   1040 <malloc@plt>
mov    %rax,%r14
lea    0xea6(%rip),%r15
mov    %r15,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %r15,%rdi
mov    %r14,%rsi
call   1050 <scanf@plt>
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x50(%rsp)
movq   $0x0,0x60(%rsp)
mov    (%rbx),%al
test   %al,%al
je     11c7 <main+0x97>
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsbq %al,%rax
addl   $0x1,-0x184(%rsp,%rax,4)
01
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    11b0 <main+0x80>
mov    (%r14),%al
test   %al,%al
je     11f8 <main+0xc8>
add    $0x1,%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbq %al,%rax
addl   $0xffffffff,-0x184(%rsp,%rax,4)
ff
movzbl (%r14),%eax
add    $0x1,%r14
test   %al,%al
jne    11e0 <main+0xb0>
mov    (%rsp),%ecx
mov    0x4(%rsp),%edx
mov    %ecx,%eax
neg    %eax
cmovs  %ecx,%eax
mov    %edx,%ecx
neg    %ecx
cmovs  %edx,%ecx
movdqu 0x8(%rsp),%xmm0
movdqu 0x18(%rsp),%xmm1
movdqa %xmm1,%xmm2
psrad  $0x1f,%xmm2
paddd  %xmm2,%xmm1
pxor   %xmm2,%xmm1
movdqa %xmm0,%xmm2
psrad  $0x1f,%xmm2
paddd  %xmm2,%xmm0
pxor   %xmm2,%xmm0
paddd  %xmm1,%xmm0
movdqu 0x38(%rsp),%xmm1
movdqu 0x58(%rsp),%xmm2
movdqu 0x28(%rsp),%xmm3
movdqu 0x48(%rsp),%xmm4
movdqa %xmm4,%xmm5
psrad  $0x1f,%xmm5
paddd  %xmm5,%xmm4
pxor   %xmm5,%xmm4
movdqa %xmm3,%xmm5
psrad  $0x1f,%xmm5
paddd  %xmm5,%xmm3
pxor   %xmm5,%xmm3
paddd  %xmm4,%xmm3
movdqa %xmm2,%xmm4
psrad  $0x1f,%xmm4
paddd  %xmm4,%xmm2
pxor   %xmm4,%xmm2
movdqa %xmm1,%xmm4
psrad  $0x1f,%xmm4
paddd  %xmm4,%xmm1
pxor   %xmm4,%xmm1
paddd  %xmm2,%xmm1
paddd  %xmm3,%xmm1
pshufd $0xee,%xmm1,%xmm2
paddd  %xmm1,%xmm2
pshufd $0x55,%xmm2,%xmm1
paddd  %xmm2,%xmm1
movd   %xmm1,%edx
pshufd $0xee,%xmm0,%xmm1
paddd  %xmm0,%xmm1
pshufd $0x55,%xmm1,%xmm0
paddd  %xmm1,%xmm0
movd   %xmm0,%esi
add    %edx,%esi
add    %ecx,%esi
add    %eax,%esi
lea    0xd23(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"\0A%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca [26 x i32]
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 0, i32* %5
%9 = call i8* @malloc(i32 10000)
store i8* %9, i8** %3
%10 = call i8* @malloc(i32 10000)
store i8* %10, i8** %4
%11 = load i8*, i8** %3
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = load i8*, i8** %4
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %13)
store i32 0, i32* %2
br label %15
15: ; preds = %22, %0
%16 = load i32, i32* %2
%17 = icmp slt i32 %16, 26
br i1 %17, label %18, label %25
18: ; preds = %15
%19 = load i32, i32* %2
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [26 x i32], [26 x i32]* %6, i64 0, i64 %20
store i32 0, i32* %21
br label %22
22: ; preds = %18
%23 = load i32, i32* %2
%24 = add nsw i32 %23, 1
store i32 %24, i32* %2
br label %15
25: ; preds = %15
store i32 0, i32* %2
br label %26
26: ; preds = %47, %25
%27 = load i8*, i8** %3
%28 = load i32, i32* %2
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds i8, i8* %27, i64 %29
%31 = load i8, i8* %30
%32 = sext i8 %31 to i32
%33 = icmp ne i32 %32, 0
br i1 %33, label %34, label %50
34: ; preds = %26
%35 = load i8*, i8** %3
%36 = load i32, i32* %2
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds i8, i8* %35, i64 %37
%39 = load i8, i8* %38
%40 = sext i8 %39 to i32
%41 = sub nsw i32 %40, 97
store i32 %41, i32* %7
%42 = load i32, i32* %7
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds [26 x i32], [26 x i32]* %6, i64 0, i64 %43
%45 = load i32, i32* %44
%46 = add nsw i32 %45, 1
store i32 %46, i32* %44
br label %47
47: ; preds = %34
%48 = load i32, i32* %2
%49 = add nsw i32 %48, 1
store i32 %49, i32* %2
br label %26
50: ; preds = %26
store i32 0, i32* %2
br label %51
51: ; preds = %72, %50
%52 = load i8*, i8** %4
%53 = load i32, i32* %2
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds i8, i8* %52, i64 %54
%56 = load i8, i8* %55
%57 = sext i8 %56 to i32
%58 = icmp ne i32 %57, 0
br i1 %58, label %59, label %75
59: ; preds = %51
%60 = load i8*, i8** %4
%61 = load i32, i32* %2
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds i8, i8* %60, i64 %62
%64 = load i8, i8* %63
%65 = sext i8 %64 to i32
%66 = sub nsw i32 %65, 97
store i32 %66, i32* %8
%67 = load i32, i32* %8
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds [26 x i32], [26 x i32]* %6, i64 0, i64 %68
%70 = load i32, i32* %69
%71 = add nsw i32 %70, -1
store i32 %71, i32* %69
br label %72
72: ; preds = %59
%73 = load i32, i32* %2
%74 = add nsw i32 %73, 1
store i32 %74, i32* %2
br label %51
75: ; preds = %51
store i32 0, i32* %2
br label %76
76: ; preds = %87, %75
%77 = load i32, i32* %2
%78 = icmp slt i32 %77, 26
br i1 %78, label %79, label %90
79: ; preds = %76
%80 = load i32, i32* %5
%81 = load i32, i32* %2
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds [26 x i32], [26 x i32]* %6, i64 0, i64 %82
%84 = load i32, i32* %83
%85 = call i32 @abs(i32 %84)
%86 = add nsw i32 %80, %85
store i32 %86, i32* %5
br label %87
87: ; preds = %79
%88 = load i32, i32* %2
%89 = add nsw i32 %88, 1
store i32 %89, i32* %2
br label %76
90: ; preds = %76
%91 = load i32, i32* %5
%92 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %91)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"\0A%d\00"
define i32 @main() {
%1 = alloca [26 x i32]
%2 = bitcast [26 x i32]* %1 to i8*
%3 = tail call dereferenceable_or_null(10000) i8* @malloc(i32 10000)
%4 = tail call dereferenceable_or_null(10000) i8* @malloc(i32 10000)
%5 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%6 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%7 = load i8, i8* %3
%8 = icmp eq i8 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %12, %0
%10 = load i8, i8* %4
%11 = icmp eq i8 %10, 0
br i1 %11, label %24, label %45
12: ; preds = %0, %12
%13 = phi i64 [ %20, %12 ], [ 0, %0 ]
%14 = phi i8 [ %22, %12 ], [ %7, %0 ]
%15 = sext i8 %14 to i64
%16 = add nsw i64 %15, -97
%17 = getelementptr inbounds [26 x i32], [26 x i32]* %1, i64 0, i64 %16
%18 = load i32, i32* %17
%19 = add nsw i32 %18, 1
store i32 %19, i32* %17
%20 = add nuw nsw i64 %13, 1
%21 = getelementptr inbounds i8, i8* %3, i64 %20
%22 = load i8, i8* %21
%23 = icmp eq i8 %22, 0
br i1 %23, label %9, label %12
24: ; preds = %45, %9
%25 = getelementptr inbounds [26 x i32], [26 x i32]* %1, i64 0, i64 0
%26 = load i32, i32* %25
%27 = tail call i32 @llvm.abs.i32(i32 %26, i1 true)
%28 = getelementptr inbounds [26 x i32], [26 x i32]* %1, i64 0, i64 1
%29 = load i32, i32* %28
%30 = tail call i32 @llvm.abs.i32(i32 %29, i1 true)
%31 = getelementptr inbounds [26 x i32], [26 x i32]* %1, i64 0, i64 2
%32 = bitcast i32* %31 to <8 x i32>*
%33 = load <8 x i32>, <8 x i32>* %32
%34 = call <8 x i32> @llvm.abs.v8i32(<8 x i32> %33, i1 true)
%35 = getelementptr inbounds [26 x i32], [26 x i32]* %1, i64 0, i64 10
%36 = bitcast i32* %35 to <16 x i32>*
%37 = load <16 x i32>, <16 x i32>* %36
%38 = call <16 x i32> @llvm.abs.v16i32(<16 x i32> %37, i1 true)
%39 = call i32 @llvm.vector.reduce.add.v16i32(<16 x i32> %38)
%40 = call i32 @llvm.vector.reduce.add.v8i32(<8 x i32> %34)
%41 = add nuw nsw i32 %39, %40
%42 = add nuw nsw i32 %41, %30
%43 = add nuw nsw i32 %42, %27
%44 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %43)
ret i32 0
45: ; preds = %9, %45
%46 = phi i64 [ %53, %45 ], [ 0, %9 ]
%47 = phi i8 [ %55, %45 ], [ %10, %9 ]
%48 = sext i8 %47 to i64
%49 = add nsw i64 %48, -97
%50 = getelementptr inbounds [26 x i32], [26 x i32]* %1, i64 0, i64 %49
%51 = load i32, i32* %50
%52 = add nsw i32 %51, -1
store i32 %52, i32* %50
%53 = add nuw nsw i64 %46, 1
%54 = getelementptr inbounds i8, i8* %4, i64 %53
%55 = load i8, i8* %54
%56 = icmp eq i8 %55, 0
br i1 %56, label %24, label %45
}