#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*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
int strcmp(char *, char *);
int strlen(char *);
int main() {
  char a[101];
  char b[101];
  scanf("%s", a);
  scanf("%s", b);
  int i;
  for (i = 0; i < strlen(a); i++) {
    if (a[i] >= 65 && a[i] <= 90)
      a[i] = a[i] + 32;
    if (b[i] >= 65 && b[i] <= 90)
      b[i] = b[i] + 32;
  }
  int val;
  val = strcmp(a, b);
  if (val < 0)
    printf("-1\n");
  else if (val == 0)
    printf("0\n");
  else
    printf("1\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rsi
lea    0xea3(%rip),%rdi
call   1060 <scanf@plt>
lea    -0xe0(%rbp),%rsi
lea    0xe90(%rip),%rdi
call   1060 <scanf@plt>
movl   $0x0,-0xe4(%rbp)
mov    -0xe4(%rbp),%eax
mov    %eax,-0xec(%rbp)
lea    -0x70(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0xec(%rbp),%eax
cmp    %ecx,%eax
jge    1255 <main+0x115>
movslq -0xe4(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
cmp    $0x41,%eax
jl     11ea <main+0xaa>
movslq -0xe4(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
cmp    $0x5a,%eax
jg     11ea <main+0xaa>
movslq -0xe4(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
add    $0x20,%eax
mov    %al,%cl
movslq -0xe4(%rbp),%rax
mov    %cl,-0x70(%rbp,%rax,1)
movslq -0xe4(%rbp),%rax
movsbl -0xe0(%rbp,%rax,1),%eax
ff
cmp    $0x41,%eax
jl     123c <main+0xfc>
movslq -0xe4(%rbp),%rax
movsbl -0xe0(%rbp,%rax,1),%eax
ff
cmp    $0x5a,%eax
jg     123c <main+0xfc>
movslq -0xe4(%rbp),%rax
movsbl -0xe0(%rbp,%rax,1),%eax
ff
add    $0x20,%eax
mov    %al,%cl
movslq -0xe4(%rbp),%rax
mov    %cl,-0xe0(%rbp,%rax,1)
jmp    1241 <main+0x101>
mov    -0xe4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe4(%rbp)
jmp    117f <main+0x3f>
lea    -0x70(%rbp),%rdi
lea    -0xe0(%rbp),%rsi
call   1050 <strcmp@plt>
mov    %eax,-0xe8(%rbp)
cmpl   $0x0,-0xe8(%rbp)
jge    1289 <main+0x149>
lea    0xd84(%rip),%rdi
call   1040 <printf@plt>
jmp    12b8 <main+0x178>
cmpl   $0x0,-0xe8(%rbp)
jne    12a7 <main+0x167>
lea    0xd6a(%rip),%rdi
call   1040 <printf@plt>
jmp    12b3 <main+0x173>
lea    0xd56(%rip),%rdi
call   1040 <printf@plt>
jmp    12b8 <main+0x178>
xor    %eax,%eax
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0xd8,%rsp
lea    0xeaf(%rip),%rbx
mov    %rsp,%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <scanf@plt>
lea    0x70(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <scanf@plt>
mov    %r14,%rdi
call   1040 <strlen@plt>
test   %eax,%eax
jle    11b9 <main+0x79>
xor    %ebx,%ebx
mov    %rsp,%r14
jmp    1193 <main+0x53>
nop
add    $0x1,%rbx
mov    %r14,%rdi
call   1040 <strlen@plt>
cltq
cmp    %rax,%rbx
jge    11b9 <main+0x79>
movzbl (%rsp,%rbx,1),%eax
lea    -0x41(%rax),%ecx
cmp    $0x19,%cl
ja     11a4 <main+0x64>
add    $0x20,%al
mov    %al,(%rsp,%rbx,1)
movzbl 0x70(%rsp,%rbx,1),%eax
lea    -0x41(%rax),%ecx
cmp    $0x19,%cl
ja     1180 <main+0x40>
add    $0x20,%al
mov    %al,0x70(%rsp,%rbx,1)
jmp    1180 <main+0x40>
mov    %rsp,%rdi
lea    0x70(%rsp),%rsi
call   1050 <strcmp@plt>
test   %eax,%eax
lea    0xe34(%rip),%rax
lea    0xe30(%rip),%rcx
cmove  %rax,%rcx
lea    0xe24(%rip),%rdi
cmovns %rcx,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0xd8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"-1\0A\00"
@.str.2 = [3 x i8] c"0\0A\00"
@.str.3 = [3 x i8] c"1\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
br label %10
10: ; preds = %66, %0
%11 = load i32, i32* %4
%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 %69
15: ; preds = %10
%16 = load i32, i32* %4
%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 = sext i8 %19 to i32
%21 = icmp sge i32 %20, 65
br i1 %21, label %22, label %40
22: ; preds = %15
%23 = load i32, i32* %4
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [101 x i8], [101 x i8]* %2, i64 0, i64 %24
%26 = load i8, i8* %25
%27 = sext i8 %26 to i32
%28 = icmp sle i32 %27, 90
br i1 %28, label %29, label %40
29: ; preds = %22
%30 = load i32, i32* %4
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [101 x i8], [101 x i8]* %2, i64 0, i64 %31
%33 = load i8, i8* %32
%34 = sext i8 %33 to i32
%35 = add nsw i32 %34, 32
%36 = trunc i32 %35 to i8
%37 = load i32, i32* %4
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds [101 x i8], [101 x i8]* %2, i64 0, i64 %38
store i8 %36, i8* %39
br label %40
40: ; preds = %29, %22, %15
%41 = load i32, i32* %4
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds [101 x i8], [101 x i8]* %3, i64 0, i64 %42
%44 = load i8, i8* %43
%45 = sext i8 %44 to i32
%46 = icmp sge i32 %45, 65
br i1 %46, label %47, label %65
47: ; preds = %40
%48 = load i32, i32* %4
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds [101 x i8], [101 x i8]* %3, i64 0, i64 %49
%51 = load i8, i8* %50
%52 = sext i8 %51 to i32
%53 = icmp sle i32 %52, 90
br i1 %53, label %54, label %65
54: ; preds = %47
%55 = load i32, i32* %4
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds [101 x i8], [101 x i8]* %3, i64 0, i64 %56
%58 = load i8, i8* %57
%59 = sext i8 %58 to i32
%60 = add nsw i32 %59, 32
%61 = trunc i32 %60 to i8
%62 = load i32, i32* %4
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds [101 x i8], [101 x i8]* %3, i64 0, i64 %63
store i8 %61, i8* %64
br label %65
65: ; preds = %54, %47, %40
br label %66
66: ; preds = %65
%67 = load i32, i32* %4
%68 = add nsw i32 %67, 1
store i32 %68, i32* %4
br label %10
69: ; preds = %10
%70 = getelementptr inbounds [101 x i8], [101 x i8]* %2, i64 0, i64 0
%71 = getelementptr inbounds [101 x i8], [101 x i8]* %3, i64 0, i64 0
%72 = call i32 @strcmp(i8* %70, i8* %71)
store i32 %72, i32* %5
%73 = load i32, i32* %5
%74 = icmp slt i32 %73, 0
br i1 %74, label %75, label %77
75: ; preds = %69
%76 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %85
77: ; preds = %69
%78 = load i32, i32* %5
%79 = icmp eq i32 %78, 0
br i1 %79, label %80, label %82
80: ; preds = %77
%81 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %84
82: ; preds = %77
%83 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
br label %84
84: ; preds = %82, %80
br label %85
85: ; preds = %84, %75
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@str = [2 x i8] c"1\00"
@str.4 = [2 x i8] c"0\00"
@str.5 = [3 x i8] c"-1\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 %29
9: ; preds = %0, %24
%10 = phi i64 [ %25, %24 ], [ 0, %0 ]
%11 = getelementptr inbounds [101 x i8], [101 x i8]* %1, i64 0, i64 %10
%12 = load i8, i8* %11
%13 = add i8 %12, -65
%14 = icmp ult i8 %13, 26
br i1 %14, label %15, label %17
15: ; preds = %9
%16 = add nuw nsw i8 %12, 32
store i8 %16, i8* %11
br label %17
17: ; preds = %15, %9
%18 = getelementptr inbounds [101 x i8], [101 x i8]* %2, i64 0, i64 %10
%19 = load i8, i8* %18
%20 = add i8 %19, -65
%21 = icmp ult i8 %20, 26
br i1 %21, label %22, label %24
22: ; preds = %17
%23 = add nuw nsw i8 %19, 32
store i8 %23, i8* %18
br label %24
24: ; preds = %17, %22
%25 = add nuw nsw i64 %10, 1
%26 = call i32 @strlen(i8* %3)
%27 = sext i32 %26 to i64
%28 = icmp slt i64 %25, %27
br i1 %28, label %9, label %29
29: ; preds = %24, %0
%30 = call i32 @strcmp(i8* %3, i8* %4)
%31 = icmp slt i32 %30, 0
%32 = icmp eq i32 %30, 0
%33 = select i1 %32, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str.4, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0)
%34 = select i1 %31, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @str.5, i64 0, i64 0), i8* %33
%35 = call i32 @puts(i8* dereferenceable(1) %34)
ret i32 0
}