#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*/ gets(char *);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  char str1[80], str2[80];
  int i = 0, j = 0, a = 0, b = 0;
  gets(str1);
  gets(str2);
  for (i = 0; str1[i] != '\0'; i++) {
    for (j = 0; str2[j] != '\0'; j++)
      ;
    printf("%d", str1[i] - str2[j]);
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xb4(%rbp)
movl   $0x0,-0xb8(%rbp)
movl   $0x0,-0xbc(%rbp)
movl   $0x0,-0xc0(%rbp)
lea    -0x60(%rbp),%rdi
call   1040 <gets@plt>
lea    -0xb0(%rbp),%rdi
call   1040 <gets@plt>
movl   $0x0,-0xb4(%rbp)
movslq -0xb4(%rbp),%rax
movsbl -0x60(%rbp,%rax,1),%eax
cmp    $0x0,%eax
je     1216 <main+0xf6>
movl   $0x0,-0xb8(%rbp)
movslq -0xb8(%rbp),%rax
movsbl -0xb0(%rbp,%rax,1),%eax
ff
cmp    $0x0,%eax
je     11c9 <main+0xa9>
jmp    11b5 <main+0x95>
mov    -0xb8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb8(%rbp)
jmp    1198 <main+0x78>
movslq -0xb4(%rbp),%rax
movsbl -0x60(%rbp,%rax,1),%esi
movslq -0xb8(%rbp),%rax
movsbl -0xb0(%rbp,%rax,1),%eax
ff
sub    %eax,%esi
lea    0xe13(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe08(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb4(%rbp)
jmp    1179 <main+0x59>
xor    %eax,%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0xa8,%rsp
mov    %rsp,%rdi
call   1050 <gets@plt>
lea    0x50(%rsp),%rdi
call   1050 <gets@plt>
mov    (%rsp),%al
test   %al,%al
je     1182 <main+0x52>
lea    0x1(%rsp),%rbx
lea    0xea1(%rip),%r14
nop
movsbl %al,%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1160 <main+0x30>
xor    %eax,%eax
add    $0xa8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca [80 x i8]
%2 = alloca [80 x i8]
%3 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [80 x i8], [80 x i8]* %2, i64 0, i64 0
%5 = call i32 @gets(i8* %3)
%6 = call i32 @gets(i8* %4)
%7 = load i8, i8* %3
%8 = icmp eq i8 %7, 0
br i1 %8, label %19, label %9
9: ; preds = %0, %9
%10 = phi i64 [ %15, %9 ], [ 0, %0 ]
%11 = phi i8 [ %17, %9 ], [ %7, %0 ]
%12 = sext i8 %11 to i32
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %12)
%14 = call i32 @putchar(i32 10)
%15 = add nuw i64 %10, 1
%16 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 %15
%17 = load i8, i8* %16
%18 = icmp eq i8 %17, 0
br i1 %18, label %19, label %9
19: ; preds = %9, %0
ret i32 0
}