#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);
int /*<<< orphan*/ scanf(char *, char *, char *);
int strcmp(char *, char *);
int strlen(char *);
char tolower(char);
int main(void) {
  char a[101], b[101];
  scanf("%s %s", a, b);
  for (int j = 0; j < strlen(a); j++) {
    a[j] = tolower(a[j]);
    b[j] = tolower(b[j]);
  }
  printf("%d", strcmp(a, b));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rsi
lea    -0xe0(%rbp),%rdx
lea    0xe8c(%rip),%rdi
call   1070 <scanf@plt>
movl   $0x0,-0xe4(%rbp)
mov    -0xe4(%rbp),%eax
mov    %eax,-0xe8(%rbp)
lea    -0x70(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0xe8(%rbp),%eax
cmp    %ecx,%eax
jge    11fe <main+0xae>
movslq -0xe4(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%edi
call   1060 <tolower@plt>
mov    %al,%cl
movslq -0xe4(%rbp),%rax
mov    %cl,-0x70(%rbp,%rax,1)
movslq -0xe4(%rbp),%rax
movsbl -0xe0(%rbp,%rax,1),%edi
ff
call   1060 <tolower@plt>
mov    %al,%cl
movslq -0xe4(%rbp),%rax
mov    %cl,-0xe0(%rbp,%rax,1)
mov    -0xe4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe4(%rbp)
jmp    1183 <main+0x33>
lea    -0x70(%rbp),%rdi
lea    -0xe0(%rbp),%rsi
call   1050 <strcmp@plt>
mov    %eax,%esi
lea    0xdef(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0xd8,%rsp
lea    0xe9f(%rip),%rdi
mov    %rsp,%rbx
lea    0x70(%rsp),%rdx
mov    %rbx,%rsi
call   1070 <scanf@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
test   %eax,%eax
jle    11bd <main+0x6d>
xor    %ebx,%ebx
mov    %rsp,%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl (%rsp,%rbx,1),%edi
call   1060 <tolower@plt>
mov    %al,(%rsp,%rbx,1)
movsbl 0x70(%rsp,%rbx,1),%edi
call   1060 <tolower@plt>
mov    %al,0x70(%rsp,%rbx,1)
add    $0x1,%rbx
mov    %r14,%rdi
call   1030 <strlen@plt>
cltq
cmp    %rax,%rbx
jl     1190 <main+0x40>
mov    %rsp,%rdi
lea    0x70(%rsp),%rsi
call   1050 <strcmp@plt>
lea    0xe35(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xd8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%s %s\00"
@.str.1 = [3 x i8] c"%d\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 ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %4)
%6 = call i32 @strlen(i8* %3)
%7 = icmp sgt i32 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %11, %0
%9 = call i32 @strcmp(i8* %3, i8* %4)
%10 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret i32 0
11: ; preds = %0, %11
%12 = phi i64 [ %19, %11 ], [ 0, %0 ]
%13 = getelementptr inbounds [101 x i8], [101 x i8]* %1, i64 0, i64 %12
%14 = load i8, i8* %13
%15 = call signext i8 @tolower(i8 signext %14)
store i8 %15, i8* %13
%16 = getelementptr inbounds [101 x i8], [101 x i8]* %2, i64 0, i64 %12
%17 = load i8, i8* %16
%18 = call signext i8 @tolower(i8 signext %17)
store i8 %18, i8* %16
%19 = add nuw nsw i64 %12, 1
%20 = call i32 @strlen(i8* %3)
%21 = sext i32 %20 to i64
%22 = icmp slt i64 %19, %21
br i1 %22, label %11, label %8
}