#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*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ stdin;
int strlen(char *);
int main() {
  char word[200], word2[200];
  fgets(word, 200, stdin);
  fgets(word2, 200, stdin);
  int min_len = strlen(word2);
  int diff = 1;
  if (strlen(word) < strlen(word2)) {
    min_len = strlen(word);
    diff = -1;
  }
  int compare = 0;
  for (int i = 0; i < min_len; i++) {
    if (word[i] > word2[i]) {
      compare = -1;
      break;
    } else if (word[i] < word2[i]) {
      compare = 1;
      break;
    }
  }
  if (compare == 0) {
    if (diff < 0) {
      compare = 1;
    } else if (diff > 0) {
      compare = -1;
    }
  }
  printf("%d\n", compare);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1c0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xd0(%rbp),%rdi
mov    0x2e98(%rip),%rax
mov    (%rax),%edx
mov    $0xc8,%esi
call   1050 <fgets@plt>
lea    -0x1a0(%rbp),%rdi
mov    0x2e7e(%rip),%rax
mov    (%rax),%edx
mov    $0xc8,%esi
call   1050 <fgets@plt>
lea    -0x1a0(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x1a4(%rbp)
movl   $0x1,-0x1a8(%rbp)
lea    -0xd0(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x1b4(%rbp)
lea    -0x1a0(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x1b4(%rbp),%eax
cmp    %ecx,%eax
jge    11dc <main+0xac>
lea    -0xd0(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x1a4(%rbp)
movl   $0xffffffff,-0x1a8(%rbp)
ff ff ff
movl   $0x0,-0x1ac(%rbp)
movl   $0x0,-0x1b0(%rbp)
mov    -0x1b0(%rbp),%eax
cmp    -0x1a4(%rbp),%eax
jge    128a <main+0x15a>
movslq -0x1b0(%rbp),%rax
movsbl -0xd0(%rbp,%rax,1),%eax
ff
movslq -0x1b0(%rbp),%rcx
movsbl -0x1a0(%rbp,%rcx,1),%ecx
ff
cmp    %ecx,%eax
jle    1237 <main+0x107>
movl   $0xffffffff,-0x1ac(%rbp)
ff ff ff
jmp    128a <main+0x15a>
movslq -0x1b0(%rbp),%rax
movsbl -0xd0(%rbp,%rax,1),%eax
ff
movslq -0x1b0(%rbp),%rcx
movsbl -0x1a0(%rbp,%rcx,1),%ecx
ff
cmp    %ecx,%eax
jge    126c <main+0x13c>
movl   $0x1,-0x1ac(%rbp)
jmp    128a <main+0x15a>
jmp    1271 <main+0x141>
jmp    1276 <main+0x146>
mov    -0x1b0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1b0(%rbp)
jmp    11f0 <main+0xc0>
cmpl   $0x0,-0x1ac(%rbp)
jne    12d4 <main+0x1a4>
cmpl   $0x0,-0x1a8(%rbp)
jge    12b3 <main+0x183>
movl   $0x1,-0x1ac(%rbp)
jmp    12cf <main+0x19f>
cmpl   $0x0,-0x1a8(%rbp)
jle    12ca <main+0x19a>
movl   $0xffffffff,-0x1ac(%rbp)
ff ff ff
jmp    12cf <main+0x19f>
jmp    12d4 <main+0x1a4>
mov    -0x1ac(%rbp),%esi
lea    0xd1f(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x1c0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x1a0,%rsp
mov    0x2ea6(%rip),%rbx
mov    (%rbx),%edx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0xc8,%esi
call   1050 <fgets@plt>
mov    (%rbx),%edx
lea    0xd0(%rsp),%rbp
mov    %rbp,%rdi
mov    $0xc8,%esi
call   1050 <fgets@plt>
mov    %rbp,%rdi
call   1030 <strlen@plt>
mov    %eax,%ebx
mov    %r14,%rdi
call   1030 <strlen@plt>
mov    %eax,%r14d
mov    %rbp,%rdi
call   1030 <strlen@plt>
mov    %eax,%ebp
cmp    %eax,%r14d
jge    1199 <main+0x69>
mov    %rsp,%rdi
call   1030 <strlen@plt>
mov    %eax,%ebx
test   %ebx,%ebx
jle    11cb <main+0x9b>
mov    %ebx,%eax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movzbl (%rsp,%rcx,1),%edx
movzbl 0xd0(%rsp,%rcx,1),%ebx
cmp    %bl,%dl
jg     11db <main+0xab>
jl     11e2 <main+0xb2>
add    $0x1,%rcx
cmp    %rcx,%rax
jne    11b0 <main+0x80>
xor    %eax,%eax
cmp    %ebp,%r14d
setl   %al
lea    (%rax,%rax,1),%esi
add    $0xffffffff,%esi
jmp    11e7 <main+0xb7>
mov    $0xffffffff,%esi
jmp    11e7 <main+0xb7>
mov    $0x1,%esi
lea    0xe12(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x1a0,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@stdin = global i32 0
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [200 x i8]
%3 = alloca [200 x i8]
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %1
%8 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%9 = load i32, i32* @stdin
%10 = call i32 @fgets(i8* %8, i32 200, i32 %9)
%11 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%12 = load i32, i32* @stdin
%13 = call i32 @fgets(i8* %11, i32 200, i32 %12)
%14 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%15 = call i32 @strlen(i8* %14)
store i32 %15, i32* %4
store i32 1, i32* %5
%16 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%17 = call i32 @strlen(i8* %16)
%18 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%19 = call i32 @strlen(i8* %18)
%20 = icmp slt i32 %17, %19
br i1 %20, label %21, label %24
21: ; preds = %0
%22 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%23 = call i32 @strlen(i8* %22)
store i32 %23, i32* %4
store i32 -1, i32* %5
br label %24
24: ; preds = %21, %0
store i32 0, i32* %6
store i32 0, i32* %7
br label %25
25: ; preds = %57, %24
%26 = load i32, i32* %7
%27 = load i32, i32* %4
%28 = icmp slt i32 %26, %27
br i1 %28, label %29, label %60
29: ; preds = %25
%30 = load i32, i32* %7
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 %31
%33 = load i8, i8* %32
%34 = sext i8 %33 to i32
%35 = load i32, i32* %7
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 %36
%38 = load i8, i8* %37
%39 = sext i8 %38 to i32
%40 = icmp sgt i32 %34, %39
br i1 %40, label %41, label %42
41: ; preds = %29
store i32 -1, i32* %6
br label %60
42: ; preds = %29
%43 = load i32, i32* %7
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 %44
%46 = load i8, i8* %45
%47 = sext i8 %46 to i32
%48 = load i32, i32* %7
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 %49
%51 = load i8, i8* %50
%52 = sext i8 %51 to i32
%53 = icmp slt i32 %47, %52
br i1 %53, label %54, label %55
54: ; preds = %42
store i32 1, i32* %6
br label %60
55: ; preds = %42
br label %56
56: ; preds = %55
br label %57
57: ; preds = %56
%58 = load i32, i32* %7
%59 = add nsw i32 %58, 1
store i32 %59, i32* %7
br label %25
60: ; preds = %54, %41, %25
%61 = load i32, i32* %6
%62 = icmp eq i32 %61, 0
br i1 %62, label %63, label %73
63: ; preds = %60
%64 = load i32, i32* %5
%65 = icmp slt i32 %64, 0
br i1 %65, label %66, label %67
66: ; preds = %63
store i32 1, i32* %6
br label %72
67: ; preds = %63
%68 = load i32, i32* %5
%69 = icmp sgt i32 %68, 0
br i1 %69, label %70, label %71
70: ; preds = %67
store i32 -1, i32* %6
br label %71
71: ; preds = %70, %67
br label %72
72: ; preds = %71, %66
br label %73
73: ; preds = %72, %60
%74 = load i32, i32* %6
%75 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %74)
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [200 x i8]
%2 = alloca [200 x i8]
%3 = getelementptr inbounds [200 x i8], [200 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%5 = load i32, i32* @stdin
%6 = call i32 @fgets(i8* %3, i32 200, i32 %5)
%7 = load i32, i32* @stdin
%8 = call i32 @fgets(i8* %4, i32 200, i32 %7)
%9 = call i32 @strlen(i8* %4)
%10 = call i32 @strlen(i8* %3)
%11 = call i32 @strlen(i8* %4)
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %15
13: ; preds = %0
%14 = call i32 @strlen(i8* %3)
br label %15
15: ; preds = %13, %0
%16 = phi i32 [ %14, %13 ], [ %9, %0 ]
%17 = icmp sgt i32 %16, 0
br i1 %17, label %18, label %32
18: ; preds = %15
%19 = zext i32 %16 to i64
br label %22
20: ; preds = %29
%21 = icmp eq i64 %31, %19
br i1 %21, label %32, label %22
22: ; preds = %18, %20
%23 = phi i64 [ 0, %18 ], [ %31, %20 ]
%24 = getelementptr inbounds [200 x i8], [200 x i8]* %1, i64 0, i64 %23
%25 = load i8, i8* %24
%26 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 %23
%27 = load i8, i8* %26
%28 = icmp sgt i8 %25, %27
br i1 %28, label %34, label %29
29: ; preds = %22
%30 = icmp slt i8 %25, %27
%31 = add nuw nsw i64 %23, 1
br i1 %30, label %34, label %20
32: ; preds = %20, %15
%33 = select i1 %12, i32 1, i32 -1
br label %34
34: ; preds = %29, %22, %32
%35 = phi i32 [ %33, %32 ], [ -1, %22 ], [ 1, %29 ]
%36 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %35)
ret i32 0
}