#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 */
bool rDictionaryLarger(char *str1, char *str2) {
  if (*str2 == '\0') {
    return false;
  } else if (*str1 == '\0') {
    return true;
  }
  if (*str2 > *str1) {
    return true;
  } else if (*str2 < *str1) {
    return false;
  } else {
    return rDictionaryLarger(str1 + 1, str2 + 1);
  }
}


x86 assembly (clang, -O0):
<rDictionaryLarger>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    113c <rDictionaryLarger+0x2c>
movl   $0x0,-0x4(%rbp)
jmp    11b9 <rDictionaryLarger+0xa9>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1158 <rDictionaryLarger+0x48>
movl   $0x1,-0x4(%rbp)
jmp    11b9 <rDictionaryLarger+0xa9>
jmp    115d <rDictionaryLarger+0x4d>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jle    117f <rDictionaryLarger+0x6f>
movl   $0x1,-0x4(%rbp)
jmp    11b9 <rDictionaryLarger+0xa9>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jge    11a1 <rDictionaryLarger+0x91>
movl   $0x0,-0x4(%rbp)
jmp    11b9 <rDictionaryLarger+0xa9>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
mov    -0x18(%rbp),%rsi
add    $0x1,%rsi
call   1030 <rDictionaryLarger@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rDictionaryLarger>:
mov    (%rsi),%r8b
test   %r8b,%r8b
je     1139 <rDictionaryLarger+0x39>
xor    %edx,%edx
nopw   0x0(%rax,%rax,1)
movzbl (%rdi,%rdx,1),%ecx
mov    $0x1,%eax
test   %cl,%cl
je     1138 <rDictionaryLarger+0x38>
cmp    %cl,%r8b
jg     1138 <rDictionaryLarger+0x38>
xor    %eax,%eax
cmp    %cl,%r8b
jl     1138 <rDictionaryLarger+0x38>
movzbl 0x1(%rsi,%rdx,1),%r8d
add    $0x1,%rdx
test   %r8b,%r8b
jne    1110 <rDictionaryLarger+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @rDictionaryLarger(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %5
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %2
store i32 0, i32* %3
br label %42
11: ; preds = %2
%12 = load i8*, i8** %4
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %11
store i32 1, i32* %3
br label %42
17: ; preds = %11
br label %18
18: ; preds = %17
%19 = load i8*, i8** %5
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = load i8*, i8** %4
%23 = load i8, i8* %22
%24 = sext i8 %23 to i32
%25 = icmp sgt i32 %21, %24
br i1 %25, label %26, label %27
26: ; preds = %18
store i32 1, i32* %3
br label %42
27: ; preds = %18
%28 = load i8*, i8** %5
%29 = load i8, i8* %28
%30 = sext i8 %29 to i32
%31 = load i8*, i8** %4
%32 = load i8, i8* %31
%33 = sext i8 %32 to i32
%34 = icmp slt i32 %30, %33
br i1 %34, label %35, label %36
35: ; preds = %27
store i32 0, i32* %3
br label %42
36: ; preds = %27
%37 = load i8*, i8** %4
%38 = getelementptr inbounds i8, i8* %37, i64 1
%39 = load i8*, i8** %5
%40 = getelementptr inbounds i8, i8* %39, i64 1
%41 = call i32 @rDictionaryLarger(i8* %38, i8* %40)
store i32 %41, i32* %3
br label %42
42: ; preds = %36, %35, %26, %16, %10
%43 = load i32, i32* %3
ret i32 %43
}

LLVM IR (-O2):
define i32 @rDictionaryLarger(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %20, label %5
5: ; preds = %2, %15
%6 = phi i8 [ %18, %15 ], [ %3, %2 ]
%7 = phi i8* [ %17, %15 ], [ %1, %2 ]
%8 = phi i8* [ %16, %15 ], [ %0, %2 ]
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
%11 = icmp sgt i8 %6, %9
%12 = select i1 %10, i1 true, i1 %11
br i1 %12, label %20, label %13
13: ; preds = %5
%14 = icmp slt i8 %6, %9
br i1 %14, label %20, label %15
15: ; preds = %13
%16 = getelementptr inbounds i8, i8* %8, i64 1
%17 = getelementptr inbounds i8, i8* %7, i64 1
%18 = load i8, i8* %17
%19 = icmp eq i8 %18, 0
br i1 %19, label %20, label %5
20: ; preds = %15, %5, %13, %2
%21 = phi i32 [ 0, %2 ], [ 0, %13 ], [ 1, %5 ], [ 0, %15 ]
ret i32 %21
}