#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*/ stringEqualIgnoreCase(char *, char *);
int /*<<< orphan*/ test(int /*<<< orphan*/, int);
void testStringEqualIgnoreCase(void) {
  test(stringEqualIgnoreCase("cat", "dog"), (1 == 0));
  test(stringEqualIgnoreCase("abcde", "abcde"), (1 == 1));
  test(stringEqualIgnoreCase("ABCDE", "abcde"), (1 == 1));
  test(stringEqualIgnoreCase("abc", "abcde"), (1 == 0));
  test(stringEqualIgnoreCase("abcde", "abc"), (1 == 0));
  test(stringEqualIgnoreCase("", ""), (1 == 1));
}


x86 assembly (clang, -O0):
<testStringEqualIgnoreCase>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed2(%rip),%rsi
call   1030 <stringEqualIgnoreCase@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1040 <test@plt>
lea    0xec1(%rip),%rsi
mov    %rsi,%rdi
call   1030 <stringEqualIgnoreCase@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1040 <test@plt>
lea    0xeac(%rip),%rdi
lea    0xe9f(%rip),%rsi
call   1030 <stringEqualIgnoreCase@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1040 <test@plt>
lea    0xe93(%rip),%rdi
lea    0xe80(%rip),%rsi
call   1030 <stringEqualIgnoreCase@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1040 <test@plt>
lea    0xe6b(%rip),%rdi
lea    0xe70(%rip),%rsi
call   1030 <stringEqualIgnoreCase@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1040 <test@plt>
lea    0xe5a(%rip),%rsi
mov    %rsi,%rdi
call   1030 <stringEqualIgnoreCase@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1040 <test@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testStringEqualIgnoreCase>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%rdi
lea    0xed2(%rip),%rsi
call   1030 <stringEqualIgnoreCase@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1040 <test@plt>
lea    0xec1(%rip),%rbx
mov    %rbx,%rdi
mov    %rbx,%rsi
call   1030 <stringEqualIgnoreCase@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1040 <test@plt>
lea    0xea9(%rip),%rdi
mov    %rbx,%rsi
call   1030 <stringEqualIgnoreCase@plt>
mov    %eax,%edi
mov    $0x1,%esi
call   1040 <test@plt>
lea    0xe94(%rip),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <stringEqualIgnoreCase@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1040 <test@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <stringEqualIgnoreCase@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1040 <test@plt>
lea    0xe64(%rip),%rdi
mov    %rdi,%rsi
call   1030 <stringEqualIgnoreCase@plt>
mov    %eax,%edi
mov    $0x1,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <test@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"cat\00"
@.str.1 = [4 x i8] c"dog\00"
@.str.2 = [6 x i8] c"abcde\00"
@.str.3 = [6 x i8] c"ABCDE\00"
@.str.4 = [4 x i8] c"abc\00"
@.str.5 = [1 x i8] zeroinitializer
define void @testStringEqualIgnoreCase() {
%1 = call i32 @stringEqualIgnoreCase(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @test(i32 %1, i32 0)
%3 = call i32 @stringEqualIgnoreCase(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @test(i32 %3, i32 1)
%5 = call i32 @stringEqualIgnoreCase(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @test(i32 %5, i32 1)
%7 = call i32 @stringEqualIgnoreCase(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @test(i32 %7, i32 0)
%9 = call i32 @stringEqualIgnoreCase(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%10 = call i32 @test(i32 %9, i32 0)
%11 = call i32 @stringEqualIgnoreCase(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0))
%12 = call i32 @test(i32 %11, i32 1)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"cat\00"
@.str.1 = [4 x i8] c"dog\00"
@.str.2 = [6 x i8] c"abcde\00"
@.str.3 = [6 x i8] c"ABCDE\00"
@.str.4 = [4 x i8] c"abc\00"
@.str.5 = [1 x i8] zeroinitializer
define void @testStringEqualIgnoreCase() {
%1 = tail call i32 @stringEqualIgnoreCase(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test(i32 %1, i32 0)
%3 = tail call i32 @stringEqualIgnoreCase(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @test(i32 %3, i32 1)
%5 = tail call i32 @stringEqualIgnoreCase(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @test(i32 %5, i32 1)
%7 = tail call i32 @stringEqualIgnoreCase(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%8 = tail call i32 @test(i32 %7, i32 0)
%9 = tail call i32 @stringEqualIgnoreCase(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%10 = tail call i32 @test(i32 %9, i32 0)
%11 = tail call i32 @stringEqualIgnoreCase(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.5, i64 0, i64 0))
%12 = tail call i32 @test(i32 %11, i32 1)
ret void
}