#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 */
scalar_t__ abs(scalar_t__);
scalar_t__ deger(char);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, char *);
int strlen(char *);
int main() {
  char isim1[101];
  char isim2[101];
  scanf("%s", isim1);
  scanf("%s", isim2);
  int result = 0, i;
  for (i = 0; i < strlen(isim1); i++) {
    result += abs(deger(isim1[i]) - deger(isim2[i]));
  }
  printf("%d\n", result);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rsi
lea    0xe93(%rip),%rdi
call   1060 <scanf@plt>
lea    -0xe0(%rbp),%rsi
lea    0xe80(%rip),%rdi
call   1060 <scanf@plt>
movl   $0x0,-0xe4(%rbp)
movl   $0x0,-0xe8(%rbp)
mov    -0xe8(%rbp),%eax
mov    %eax,-0xec(%rbp)
lea    -0x70(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0xec(%rbp),%eax
cmp    %ecx,%eax
jge    1220 <main+0xd0>
movslq -0xe8(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%edi
call   1070 <deger@plt>
mov    %rax,-0xf8(%rbp)
movslq -0xe8(%rbp),%rax
movsbl -0xe0(%rbp,%rax,1),%edi
ff
call   1070 <deger@plt>
mov    -0xf8(%rbp),%rdi
sub    %rax,%rdi
call   1030 <abs@plt>
mov    %rax,%rcx
movslq -0xe4(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0xe4(%rbp)
mov    -0xe8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe8(%rbp)
jmp    1199 <main+0x49>
mov    -0xe4(%rbp),%esi
lea    0xdd6(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0xd8,%rsp
lea    0xeac(%rip),%rbx
mov    %rsp,%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <scanf@plt>
lea    0x70(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    %r14,%rdi
call   1030 <strlen@plt>
test   %eax,%eax
jle    11cb <main+0x8b>
xor    %ebp,%ebp
mov    %rsp,%r14
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsbl (%rsp,%rbp,1),%edi
call   1060 <deger@plt>
mov    %rax,%rbx
movsbl 0x70(%rsp,%rbp,1),%edi
call   1060 <deger@plt>
sub    %rax,%rbx
mov    %rbx,%rax
neg    %rax
cmovs  %rbx,%rax
add    %eax,%r15d
add    $0x1,%rbp
mov    %r14,%rdi
call   1030 <strlen@plt>
cltq
cmp    %rax,%rbp
jl     1190 <main+0x50>
jmp    11ce <main+0x8e>
xor    %r15d,%r15d
lea    0xe2e(%rip),%rdi
mov    %r15d,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xd8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

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