#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 strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char const *);
int /*<<< orphan*/ stringToLower(char *, char const *);
int compareIgnoreCase(const char *s1, const char *s2) {
  char holder1[255];
  char holder2[255];
  strcpy(holder1, s1);
  strcpy(holder2, s2);
  stringToLower(holder1, s1);
  stringToLower(holder2, s1);
  return strcmp(holder1, holder2);
}


x86 assembly (clang, -O0):
<compareIgnoreCase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x110(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0x210(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0x110(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1050 <stringToLower@plt>
lea    -0x210(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1050 <stringToLower@plt>
lea    -0x110(%rbp),%rdi
lea    -0x210(%rbp),%rsi
call   1040 <strcmp@plt>
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compareIgnoreCase>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x208,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0x100(%rsp),%r15
mov    %r15,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
mov    %rsp,%r12
mov    %r12,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1050 <stringToLower@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
call   1050 <stringToLower@plt>
mov    %r15,%rdi
mov    %r12,%rsi
call   1040 <strcmp@plt>
add    $0x208,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @compareIgnoreCase(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [255 x i8]
%6 = alloca [255 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 0
%8 = load i8*, i8** %3
%9 = call i32 @strcpy(i8* %7, i8* %8)
%10 = getelementptr inbounds [255 x i8], [255 x i8]* %6, i64 0, i64 0
%11 = load i8*, i8** %4
%12 = call i32 @strcpy(i8* %10, i8* %11)
%13 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 0
%14 = load i8*, i8** %3
%15 = call i32 @stringToLower(i8* %13, i8* %14)
%16 = getelementptr inbounds [255 x i8], [255 x i8]* %6, i64 0, i64 0
%17 = load i8*, i8** %3
%18 = call i32 @stringToLower(i8* %16, i8* %17)
%19 = getelementptr inbounds [255 x i8], [255 x i8]* %5, i64 0, i64 0
%20 = getelementptr inbounds [255 x i8], [255 x i8]* %6, i64 0, i64 0
%21 = call i32 @strcmp(i8* %19, i8* %20)
ret i32 %21
}

LLVM IR (-O2):
define i32 @compareIgnoreCase(i8* %0, i8* %1) {
%3 = alloca [255 x i8]
%4 = alloca [255 x i8]
%5 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [255 x i8], [255 x i8]* %4, i64 0, i64 0
%7 = call i32 @strcpy(i8* %5, i8* %0)
%8 = call i32 @strcpy(i8* %6, i8* %1)
%9 = call i32 @stringToLower(i8* %5, i8* %0)
%10 = call i32 @stringToLower(i8* %6, i8* %0)
%11 = call i32 @strcmp(i8* %5, i8* %6)
ret i32 %11
}