#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*/ LC_CTYPE;
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ setlocale(int /*<<< orphan*/, char *);
scalar_t__ wcscasecmp(char *, char *);
scalar_t__ wcsncasecmp(char *, char *, int);
int main(int argc, char *argv[]) {
  printf("1..6\n");
  setlocale(LC_CTYPE, "C");
  assert(wcscasecmp(L"", L"") == 0);
  assert(wcsncasecmp(L"", L"", 50) == 0);
  assert(wcsncasecmp(L"", L"", 0) == 0);
  printf("ok 1 - wcscasecmp\n");
  assert(wcscasecmp(L"abc", L"abc") == 0);
  assert(wcscasecmp(L"ABC", L"ABC") == 0);
  assert(wcscasecmp(L"abc", L"ABC") == 0);
  assert(wcscasecmp(L"ABC", L"abc") == 0);
  printf("ok 2 - wcscasecmp\n");
  assert(wcscasecmp(L"abc", L"xyz") < 0);
  assert(wcscasecmp(L"ABC", L"xyz") < 0);
  assert(wcscasecmp(L"abc", L"XYZ") < 0);
  assert(wcscasecmp(L"ABC", L"XYZ") < 0);
  assert(wcscasecmp(L"xyz", L"abc") > 0);
  assert(wcscasecmp(L"XYZ", L"abc") > 0);
  assert(wcscasecmp(L"xyz", L"ABC") > 0);
  assert(wcscasecmp(L"XYZ", L"ABC") > 0);
  printf("ok 3 - wcscasecmp\n");
  assert(wcscasecmp(L"abc", L"ABCD") < 0);
  assert(wcscasecmp(L"ABC", L"abcd") < 0);
  assert(wcscasecmp(L"abcd", L"ABC") > 0);
  assert(wcscasecmp(L"ABCD", L"abc") > 0);
  printf("ok 4 - wcscasecmp\n");
  assert(wcsncasecmp(L"abc", L"ABCD", 4) < 0);
  assert(wcsncasecmp(L"ABC", L"abcd", 4) < 0);
  assert(wcsncasecmp(L"abcd", L"ABC", 4) > 0);
  assert(wcsncasecmp(L"ABCD", L"abc", 4) > 0);
  assert(wcsncasecmp(L"abc", L"ABCD", 3) == 0);
  assert(wcsncasecmp(L"ABC", L"abcd", 3) == 0);
  printf("ok 5 - wcsncasecmp\n");
  assert(wcscasecmp(L"λ", L"Λ") != 0);
  setlocale(LC_CTYPE, "el_GR.UTF-8");
  assert(wcscasecmp(L"λ", L"Λ") == 0);
  assert(wcscasecmp(L"λ", L"Ω") < 0);
  assert(wcscasecmp(L"Ω", L"λ") > 0);
  printf("ok 6 - greek\n");
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xe83(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e5f(%rip),%rax
mov    (%rax),%edi
lea    0xe74(%rip),%rsi
call   1070 <setlocale@plt>
lea    0xf02(%rip),%rsi
mov    %rsi,%rdi
call   1050 <wcscasecmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    0xee2(%rip),%rsi
mov    $0x32,%edx
mov    %rsi,%rdi
call   1040 <wcsncasecmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    0xebd(%rip),%rsi
xor    %edx,%edx
mov    %rsi,%rdi
call   1040 <wcsncasecmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    0xe03(%rip),%rdi
call   1030 <printf@plt>
lea    0xe73(%rip),%rsi
mov    %rsi,%rdi
call   1050 <wcscasecmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    0xe63(%rip),%rsi
mov    %rsi,%rdi
call   1050 <wcscasecmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    0xe33(%rip),%rdi
lea    0xe3c(%rip),%rsi
call   1050 <wcscasecmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    0xe1f(%rip),%rdi
lea    0xe08(%rip),%rsi
call   1050 <wcscasecmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    0xd82(%rip),%rdi
call   1030 <printf@plt>
lea    0xddf(%rip),%rdi
lea    0xdf8(%rip),%rsi
call   1050 <wcscasecmp@plt>
cmp    $0x0,%rax
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    0xdcb(%rip),%rdi
lea    0xdd4(%rip),%rsi
call   1050 <wcscasecmp@plt>
cmp    $0x0,%rax
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    0xd97(%rip),%rdi
lea    0xdc0(%rip),%rsi
call   1050 <wcscasecmp@plt>
cmp    $0x0,%rax
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    0xd83(%rip),%rdi
lea    0xd9c(%rip),%rsi
call   1050 <wcscasecmp@plt>
cmp    $0x0,%rax
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    0xd6f(%rip),%rdi
lea    0xd48(%rip),%rsi
call   1050 <wcscasecmp@plt>
cmp    $0x0,%rax
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    0xd5b(%rip),%rdi
lea    0xd24(%rip),%rsi
call   1050 <wcscasecmp@plt>
cmp    $0x0,%rax
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    0xd27(%rip),%rdi
lea    0xd10(%rip),%rsi
call   1050 <wcscasecmp@plt>
cmp    $0x0,%rax
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    0xd13(%rip),%rdi
lea    0xcec(%rip),%rsi
call   1050 <wcscasecmp@plt>
cmp    $0x0,%rax
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    0xc69(%rip),%rdi
call   1030 <printf@plt>
lea    0xcb3(%rip),%rdi
lea    0xcec(%rip),%rsi
call   1050 <wcscasecmp@plt>
cmp    $0x0,%rax
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    0xc9f(%rip),%rdi
lea    0xcdc(%rip),%rsi
call   1050 <wcscasecmp@plt>
cmp    $0x0,%rax
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    0xcbf(%rip),%rdi
lea    0xc74(%rip),%rsi
call   1050 <wcscasecmp@plt>
cmp    $0x0,%rax
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    0xc87(%rip),%rdi
lea    0xc40(%rip),%rsi
call   1050 <wcscasecmp@plt>
cmp    $0x0,%rax
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    0xbe0(%rip),%rdi
call   1030 <printf@plt>
lea    0xc17(%rip),%rdi
lea    0xc50(%rip),%rsi
mov    $0x4,%edx
call   1040 <wcsncasecmp@plt>
cmp    $0x0,%rax
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    0xbfe(%rip),%rdi
lea    0xc3b(%rip),%rsi
mov    $0x4,%edx
call   1040 <wcsncasecmp@plt>
cmp    $0x0,%rax
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    0xc19(%rip),%rdi
lea    0xbce(%rip),%rsi
mov    $0x4,%edx
call   1040 <wcsncasecmp@plt>
cmp    $0x0,%rax
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    0xbdc(%rip),%rdi
lea    0xb95(%rip),%rsi
mov    $0x4,%edx
call   1040 <wcsncasecmp@plt>
cmp    $0x0,%rax
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    0xb73(%rip),%rdi
lea    0xbac(%rip),%rsi
mov    $0x3,%edx
call   1040 <wcsncasecmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    0xb5a(%rip),%rdi
lea    0xb97(%rip),%rsi
mov    $0x3,%edx
call   1040 <wcsncasecmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    0xaf1(%rip),%rdi
call   1030 <printf@plt>
lea    0xb7d(%rip),%rdi
lea    0xb7e(%rip),%rsi
call   1050 <wcscasecmp@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    0x2a55(%rip),%rax
mov    (%rax),%edi
lea    0xacc(%rip),%rsi
call   1070 <setlocale@plt>
lea    0xb44(%rip),%rdi
lea    0xb45(%rip),%rsi
call   1050 <wcscasecmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    0xb20(%rip),%rdi
lea    0xb29(%rip),%rsi
call   1050 <wcscasecmp@plt>
cmp    $0x0,%rax
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    0xb0c(%rip),%rdi
lea    0xaf5(%rip),%rsi
call   1050 <wcscasecmp@plt>
cmp    $0x0,%rax
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    0xa60(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1080 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xe9c(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e6a(%rip),%rbp
mov    0x0(%rbp),%edi
lea    0xe78(%rip),%rsi
call   1070 <setlocale@plt>
lea    0xf04(%rip),%rbx
mov    %rbx,%rdi
mov    %rbx,%rsi
call   1050 <wcscasecmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1060 <assert@plt>
mov    %rbx,%rdi
mov    %rbx,%rsi
mov    $0x32,%edx
call   1040 <wcsncasecmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1060 <assert@plt>
mov    %rbx,%rdi
mov    %rbx,%rsi
xor    %edx,%edx
call   1040 <wcsncasecmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1060 <assert@plt>
lea    0xe26(%rip),%rdi
call   1030 <puts@plt>
lea    0xe83(%rip),%r13
mov    %r13,%rdi
mov    %r13,%rsi
call   1050 <wcscasecmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1060 <assert@plt>
lea    0xe73(%rip),%r14
mov    %r14,%rdi
mov    %r14,%rsi
call   1050 <wcscasecmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1060 <assert@plt>
mov    %r13,%rdi
mov    %r14,%rsi
call   1050 <wcscasecmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1060 <assert@plt>
mov    %r14,%rdi
mov    %r13,%rsi
call   1050 <wcscasecmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1060 <assert@plt>
lea    0xdba(%rip),%rdi
call   1030 <puts@plt>
lea    0xe25(%rip),%r15
mov    %r13,%rdi
mov    %r15,%rsi
call   1050 <wcscasecmp@plt>
shr    $0x3f,%rax
mov    %eax,%edi
call   1060 <assert@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   1050 <wcscasecmp@plt>
shr    $0x3f,%rax
mov    %eax,%edi
call   1060 <assert@plt>
lea    0xe02(%rip),%rbx
mov    %r13,%rdi
mov    %rbx,%rsi
call   1050 <wcscasecmp@plt>
shr    $0x3f,%rax
mov    %eax,%edi
call   1060 <assert@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <wcscasecmp@plt>
shr    $0x3f,%rax
mov    %eax,%edi
call   1060 <assert@plt>
mov    %r15,%rdi
mov    %r13,%rsi
call   1050 <wcscasecmp@plt>
xor    %edi,%edi
test   %rax,%rax
setg   %dil
call   1060 <assert@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
call   1050 <wcscasecmp@plt>
xor    %edi,%edi
test   %rax,%rax
setg   %dil
call   1060 <assert@plt>
mov    %r15,%rdi
mov    %r14,%rsi
call   1050 <wcscasecmp@plt>
xor    %edi,%edi
test   %rax,%rax
setg   %dil
call   1060 <assert@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <wcscasecmp@plt>
xor    %edi,%edi
test   %rax,%rax
setg   %dil
call   1060 <assert@plt>
lea    0xcf6(%rip),%rdi
call   1030 <puts@plt>
lea    0xd6f(%rip),%r12
mov    %r13,%rdi
mov    %r12,%rsi
call   1050 <wcscasecmp@plt>
shr    $0x3f,%rax
mov    %eax,%edi
call   1060 <assert@plt>
lea    0xd66(%rip),%r15
mov    %r14,%rdi
mov    %r15,%rsi
call   1050 <wcscasecmp@plt>
shr    $0x3f,%rax
mov    %eax,%edi
call   1060 <assert@plt>
mov    %r15,%rdi
mov    %r14,%rsi
call   1050 <wcscasecmp@plt>
xor    %edi,%edi
test   %rax,%rax
setg   %dil
call   1060 <assert@plt>
mov    %r12,%rdi
mov    %r13,%rsi
call   1050 <wcscasecmp@plt>
xor    %edi,%edi
test   %rax,%rax
setg   %dil
call   1060 <assert@plt>
lea    0xc90(%rip),%rdi
call   1030 <puts@plt>
mov    %r13,%rdi
mov    %r12,%rsi
mov    $0x4,%edx
call   1040 <wcsncasecmp@plt>
shr    $0x3f,%rax
mov    %eax,%edi
call   1060 <assert@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x4,%edx
call   1040 <wcsncasecmp@plt>
shr    $0x3f,%rax
mov    %eax,%edi
call   1060 <assert@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    $0x4,%edx
call   1040 <wcsncasecmp@plt>
xor    %edi,%edi
test   %rax,%rax
setg   %dil
call   1060 <assert@plt>
mov    %r12,%rdi
mov    %r13,%rsi
mov    $0x4,%edx
call   1040 <wcsncasecmp@plt>
xor    %edi,%edi
test   %rax,%rax
setg   %dil
call   1060 <assert@plt>
mov    %r13,%rdi
mov    %r12,%rsi
mov    $0x3,%edx
call   1040 <wcsncasecmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1060 <assert@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x3,%edx
call   1040 <wcsncasecmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1060 <assert@plt>
lea    0xbe8(%rip),%rdi
call   1030 <puts@plt>
lea    0xc65(%rip),%r15
lea    0xc66(%rip),%r14
mov    %r15,%rdi
mov    %r14,%rsi
call   1050 <wcscasecmp@plt>
xor    %edi,%edi
test   %rax,%rax
setne  %dil
call   1060 <assert@plt>
mov    0x0(%rbp),%edi
lea    0xb59(%rip),%rsi
call   1070 <setlocale@plt>
mov    %r15,%rdi
mov    %r14,%rsi
call   1050 <wcscasecmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1060 <assert@plt>
lea    0xc26(%rip),%rbx
mov    %r15,%rdi
mov    %rbx,%rsi
call   1050 <wcscasecmp@plt>
shr    $0x3f,%rax
mov    %eax,%edi
call   1060 <assert@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1050 <wcscasecmp@plt>
xor    %edi,%edi
test   %rax,%rax
setg   %dil
call   1060 <assert@plt>
lea    0xb6a(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1080 <exit@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"1..6\0A\00"
@LC_CTYPE = global i32 0
@.str.1 = [2 x i8] c"C\00"
@.str.2 = [1 x i32] zeroinitializer
@.str.3 = [19 x i8] c"ok 1 - wcscasecmp\0A\00"
@.str.4 = [4 x i32] [i32 97, i32 98, i32 99, i32 0]
@.str.5 = [4 x i32] [i32 65, i32 66, i32 67, i32 0]
@.str.6 = [19 x i8] c"ok 2 - wcscasecmp\0A\00"
@.str.7 = [4 x i32] [i32 120, i32 121, i32 122, i32 0]
@.str.8 = [4 x i32] [i32 88, i32 89, i32 90, i32 0]
@.str.9 = [19 x i8] c"ok 3 - wcscasecmp\0A\00"
@.str.10 = [5 x i32] [i32 65, i32 66, i32 67, i32 68, i32 0]
@.str.11 = [5 x i32] [i32 97, i32 98, i32 99, i32 100, i32 0]
@.str.12 = [19 x i8] c"ok 4 - wcscasecmp\0A\00"
@.str.13 = [20 x i8] c"ok 5 - wcsncasecmp\0A\00"
@.str.14 = [2 x i32] [i32 955, i32 0]
@.str.15 = [2 x i32] [i32 923, i32 0]
@.str.16 = [12 x i8] c"el_GR.UTF-8\00"
@.str.17 = [2 x i32] [i32 937, i32 0]
@.str.18 = [14 x i8] c"ok 6 - greek\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @LC_CTYPE
%8 = call i32 @setlocale(i32 %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%9 = call i64 @wcscasecmp(i8* bitcast ([1 x i32]* @.str.2 to i8*), i8* bitcast ([1 x i32]* @.str.2 to i8*))
%10 = icmp eq i64 %9, 0
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = call i64 @wcsncasecmp(i8* bitcast ([1 x i32]* @.str.2 to i8*), i8* bitcast ([1 x i32]* @.str.2 to i8*), i32 50)
%14 = icmp eq i64 %13, 0
%15 = zext i1 %14 to i32
%16 = call i32 @assert(i32 %15)
%17 = call i64 @wcsncasecmp(i8* bitcast ([1 x i32]* @.str.2 to i8*), i8* bitcast ([1 x i32]* @.str.2 to i8*), i32 0)
%18 = icmp eq i64 %17, 0
%19 = zext i1 %18 to i32
%20 = call i32 @assert(i32 %19)
%21 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0))
%22 = call i64 @wcscasecmp(i8* bitcast ([4 x i32]* @.str.4 to i8*), i8* bitcast ([4 x i32]* @.str.4 to i8*))
%23 = icmp eq i64 %22, 0
%24 = zext i1 %23 to i32
%25 = call i32 @assert(i32 %24)
%26 = call i64 @wcscasecmp(i8* bitcast ([4 x i32]* @.str.5 to i8*), i8* bitcast ([4 x i32]* @.str.5 to i8*))
%27 = icmp eq i64 %26, 0
%28 = zext i1 %27 to i32
%29 = call i32 @assert(i32 %28)
%30 = call i64 @wcscasecmp(i8* bitcast ([4 x i32]* @.str.4 to i8*), i8* bitcast ([4 x i32]* @.str.5 to i8*))
%31 = icmp eq i64 %30, 0
%32 = zext i1 %31 to i32
%33 = call i32 @assert(i32 %32)
%34 = call i64 @wcscasecmp(i8* bitcast ([4 x i32]* @.str.5 to i8*), i8* bitcast ([4 x i32]* @.str.4 to i8*))
%35 = icmp eq i64 %34, 0
%36 = zext i1 %35 to i32
%37 = call i32 @assert(i32 %36)
%38 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0))
%39 = call i64 @wcscasecmp(i8* bitcast ([4 x i32]* @.str.4 to i8*), i8* bitcast ([4 x i32]* @.str.7 to i8*))
%40 = icmp slt i64 %39, 0
%41 = zext i1 %40 to i32
%42 = call i32 @assert(i32 %41)
%43 = call i64 @wcscasecmp(i8* bitcast ([4 x i32]* @.str.5 to i8*), i8* bitcast ([4 x i32]* @.str.7 to i8*))
%44 = icmp slt i64 %43, 0
%45 = zext i1 %44 to i32
%46 = call i32 @assert(i32 %45)
%47 = call i64 @wcscasecmp(i8* bitcast ([4 x i32]* @.str.4 to i8*), i8* bitcast ([4 x i32]* @.str.8 to i8*))
%48 = icmp slt i64 %47, 0
%49 = zext i1 %48 to i32
%50 = call i32 @assert(i32 %49)
%51 = call i64 @wcscasecmp(i8* bitcast ([4 x i32]* @.str.5 to i8*), i8* bitcast ([4 x i32]* @.str.8 to i8*))
%52 = icmp slt i64 %51, 0
%53 = zext i1 %52 to i32
%54 = call i32 @assert(i32 %53)
%55 = call i64 @wcscasecmp(i8* bitcast ([4 x i32]* @.str.7 to i8*), i8* bitcast ([4 x i32]* @.str.4 to i8*))
%56 = icmp sgt i64 %55, 0
%57 = zext i1 %56 to i32
%58 = call i32 @assert(i32 %57)
%59 = call i64 @wcscasecmp(i8* bitcast ([4 x i32]* @.str.8 to i8*), i8* bitcast ([4 x i32]* @.str.4 to i8*))
%60 = icmp sgt i64 %59, 0
%61 = zext i1 %60 to i32
%62 = call i32 @assert(i32 %61)
%63 = call i64 @wcscasecmp(i8* bitcast ([4 x i32]* @.str.7 to i8*), i8* bitcast ([4 x i32]* @.str.5 to i8*))
%64 = icmp sgt i64 %63, 0
%65 = zext i1 %64 to i32
%66 = call i32 @assert(i32 %65)
%67 = call i64 @wcscasecmp(i8* bitcast ([4 x i32]* @.str.8 to i8*), i8* bitcast ([4 x i32]* @.str.5 to i8*))
%68 = icmp sgt i64 %67, 0
%69 = zext i1 %68 to i32
%70 = call i32 @assert(i32 %69)
%71 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0))
%72 = call i64 @wcscasecmp(i8* bitcast ([4 x i32]* @.str.4 to i8*), i8* bitcast ([5 x i32]* @.str.10 to i8*))
%73 = icmp slt i64 %72, 0
%74 = zext i1 %73 to i32
%75 = call i32 @assert(i32 %74)
%76 = call i64 @wcscasecmp(i8* bitcast ([4 x i32]* @.str.5 to i8*), i8* bitcast ([5 x i32]* @.str.11 to i8*))
%77 = icmp slt i64 %76, 0
%78 = zext i1 %77 to i32
%79 = call i32 @assert(i32 %78)
%80 = call i64 @wcscasecmp(i8* bitcast ([5 x i32]* @.str.11 to i8*), i8* bitcast ([4 x i32]* @.str.5 to i8*))
%81 = icmp sgt i64 %80, 0
%82 = zext i1 %81 to i32
%83 = call i32 @assert(i32 %82)
%84 = call i64 @wcscasecmp(i8* bitcast ([5 x i32]* @.str.10 to i8*), i8* bitcast ([4 x i32]* @.str.4 to i8*))
%85 = icmp sgt i64 %84, 0
%86 = zext i1 %85 to i32
%87 = call i32 @assert(i32 %86)
%88 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.12, i64 0, i64 0))
%89 = call i64 @wcsncasecmp(i8* bitcast ([4 x i32]* @.str.4 to i8*), i8* bitcast ([5 x i32]* @.str.10 to i8*), i32 4)
%90 = icmp slt i64 %89, 0
%91 = zext i1 %90 to i32
%92 = call i32 @assert(i32 %91)
%93 = call i64 @wcsncasecmp(i8* bitcast ([4 x i32]* @.str.5 to i8*), i8* bitcast ([5 x i32]* @.str.11 to i8*), i32 4)
%94 = icmp slt i64 %93, 0
%95 = zext i1 %94 to i32
%96 = call i32 @assert(i32 %95)
%97 = call i64 @wcsncasecmp(i8* bitcast ([5 x i32]* @.str.11 to i8*), i8* bitcast ([4 x i32]* @.str.5 to i8*), i32 4)
%98 = icmp sgt i64 %97, 0
%99 = zext i1 %98 to i32
%100 = call i32 @assert(i32 %99)
%101 = call i64 @wcsncasecmp(i8* bitcast ([5 x i32]* @.str.10 to i8*), i8* bitcast ([4 x i32]* @.str.4 to i8*), i32 4)
%102 = icmp sgt i64 %101, 0
%103 = zext i1 %102 to i32
%104 = call i32 @assert(i32 %103)
%105 = call i64 @wcsncasecmp(i8* bitcast ([4 x i32]* @.str.4 to i8*), i8* bitcast ([5 x i32]* @.str.10 to i8*), i32 3)
%106 = icmp eq i64 %105, 0
%107 = zext i1 %106 to i32
%108 = call i32 @assert(i32 %107)
%109 = call i64 @wcsncasecmp(i8* bitcast ([4 x i32]* @.str.5 to i8*), i8* bitcast ([5 x i32]* @.str.11 to i8*), i32 3)
%110 = icmp eq i64 %109, 0
%111 = zext i1 %110 to i32
%112 = call i32 @assert(i32 %111)
%113 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.13, i64 0, i64 0))
%114 = call i64 @wcscasecmp(i8* bitcast ([2 x i32]* @.str.14 to i8*), i8* bitcast ([2 x i32]* @.str.15 to i8*))
%115 = icmp ne i64 %114, 0
%116 = zext i1 %115 to i32
%117 = call i32 @assert(i32 %116)
%118 = load i32, i32* @LC_CTYPE
%119 = call i32 @setlocale(i32 %118, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.16, i64 0, i64 0))
%120 = call i64 @wcscasecmp(i8* bitcast ([2 x i32]* @.str.14 to i8*), i8* bitcast ([2 x i32]* @.str.15 to i8*))
%121 = icmp eq i64 %120, 0
%122 = zext i1 %121 to i32
%123 = call i32 @assert(i32 %122)
%124 = call i64 @wcscasecmp(i8* bitcast ([2 x i32]* @.str.14 to i8*), i8* bitcast ([2 x i32]* @.str.17 to i8*))
%125 = icmp slt i64 %124, 0
%126 = zext i1 %125 to i32
%127 = call i32 @assert(i32 %126)
%128 = call i64 @wcscasecmp(i8* bitcast ([2 x i32]* @.str.17 to i8*), i8* bitcast ([2 x i32]* @.str.14 to i8*))
%129 = icmp sgt i64 %128, 0
%130 = zext i1 %129 to i32
%131 = call i32 @assert(i32 %130)
%132 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.18, i64 0, i64 0))
%133 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@LC_CTYPE = global i32 0
@.str.1 = [2 x i8] c"C\00"
@.str.2 = [1 x i32] zeroinitializer
@.str.4 = [4 x i32] [i32 97, i32 98, i32 99, i32 0]
@.str.5 = [4 x i32] [i32 65, i32 66, i32 67, i32 0]
@.str.7 = [4 x i32] [i32 120, i32 121, i32 122, i32 0]
@.str.8 = [4 x i32] [i32 88, i32 89, i32 90, i32 0]
@.str.10 = [5 x i32] [i32 65, i32 66, i32 67, i32 68, i32 0]
@.str.11 = [5 x i32] [i32 97, i32 98, i32 99, i32 100, i32 0]
@.str.14 = [2 x i32] [i32 955, i32 0]
@.str.15 = [2 x i32] [i32 923, i32 0]
@.str.16 = [12 x i8] c"el_GR.UTF-8\00"
@.str.17 = [2 x i32] [i32 937, i32 0]
@str = [5 x i8] c"1..6\00"
@str.19 = [18 x i8] c"ok 1 - wcscasecmp\00"
@str.20 = [18 x i8] c"ok 2 - wcscasecmp\00"
@str.21 = [18 x i8] c"ok 3 - wcscasecmp\00"
@str.22 = [18 x i8] c"ok 4 - wcscasecmp\00"
@str.23 = [19 x i8] c"ok 5 - wcsncasecmp\00"
@str.24 = [13 x i8] c"ok 6 - greek\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%4 = load i32, i32* @LC_CTYPE
%5 = tail call i32 @setlocale(i32 %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i64 @wcscasecmp(i8* bitcast ([1 x i32]* @.str.2 to i8*), i8* bitcast ([1 x i32]* @.str.2 to i8*))
%7 = icmp eq i64 %6, 0
%8 = zext i1 %7 to i32
%9 = tail call i32 @assert(i32 %8)
%10 = tail call i64 @wcsncasecmp(i8* bitcast ([1 x i32]* @.str.2 to i8*), i8* bitcast ([1 x i32]* @.str.2 to i8*), i32 50)
%11 = icmp eq i64 %10, 0
%12 = zext i1 %11 to i32
%13 = tail call i32 @assert(i32 %12)
%14 = tail call i64 @wcsncasecmp(i8* bitcast ([1 x i32]* @.str.2 to i8*), i8* bitcast ([1 x i32]* @.str.2 to i8*), i32 0)
%15 = icmp eq i64 %14, 0
%16 = zext i1 %15 to i32
%17 = tail call i32 @assert(i32 %16)
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.19, i64 0, i64 0))
%19 = tail call i64 @wcscasecmp(i8* bitcast ([4 x i32]* @.str.4 to i8*), i8* bitcast ([4 x i32]* @.str.4 to i8*))
%20 = icmp eq i64 %19, 0
%21 = zext i1 %20 to i32
%22 = tail call i32 @assert(i32 %21)
%23 = tail call i64 @wcscasecmp(i8* bitcast ([4 x i32]* @.str.5 to i8*), i8* bitcast ([4 x i32]* @.str.5 to i8*))
%24 = icmp eq i64 %23, 0
%25 = zext i1 %24 to i32
%26 = tail call i32 @assert(i32 %25)
%27 = tail call i64 @wcscasecmp(i8* bitcast ([4 x i32]* @.str.4 to i8*), i8* bitcast ([4 x i32]* @.str.5 to i8*))
%28 = icmp eq i64 %27, 0
%29 = zext i1 %28 to i32
%30 = tail call i32 @assert(i32 %29)
%31 = tail call i64 @wcscasecmp(i8* bitcast ([4 x i32]* @.str.5 to i8*), i8* bitcast ([4 x i32]* @.str.4 to i8*))
%32 = icmp eq i64 %31, 0
%33 = zext i1 %32 to i32
%34 = tail call i32 @assert(i32 %33)
%35 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.20, i64 0, i64 0))
%36 = tail call i64 @wcscasecmp(i8* bitcast ([4 x i32]* @.str.4 to i8*), i8* bitcast ([4 x i32]* @.str.7 to i8*))
%37 = lshr i64 %36, 63
%38 = trunc i64 %37 to i32
%39 = tail call i32 @assert(i32 %38)
%40 = tail call i64 @wcscasecmp(i8* bitcast ([4 x i32]* @.str.5 to i8*), i8* bitcast ([4 x i32]* @.str.7 to i8*))
%41 = lshr i64 %40, 63
%42 = trunc i64 %41 to i32
%43 = tail call i32 @assert(i32 %42)
%44 = tail call i64 @wcscasecmp(i8* bitcast ([4 x i32]* @.str.4 to i8*), i8* bitcast ([4 x i32]* @.str.8 to i8*))
%45 = lshr i64 %44, 63
%46 = trunc i64 %45 to i32
%47 = tail call i32 @assert(i32 %46)
%48 = tail call i64 @wcscasecmp(i8* bitcast ([4 x i32]* @.str.5 to i8*), i8* bitcast ([4 x i32]* @.str.8 to i8*))
%49 = lshr i64 %48, 63
%50 = trunc i64 %49 to i32
%51 = tail call i32 @assert(i32 %50)
%52 = tail call i64 @wcscasecmp(i8* bitcast ([4 x i32]* @.str.7 to i8*), i8* bitcast ([4 x i32]* @.str.4 to i8*))
%53 = icmp sgt i64 %52, 0
%54 = zext i1 %53 to i32
%55 = tail call i32 @assert(i32 %54)
%56 = tail call i64 @wcscasecmp(i8* bitcast ([4 x i32]* @.str.8 to i8*), i8* bitcast ([4 x i32]* @.str.4 to i8*))
%57 = icmp sgt i64 %56, 0
%58 = zext i1 %57 to i32
%59 = tail call i32 @assert(i32 %58)
%60 = tail call i64 @wcscasecmp(i8* bitcast ([4 x i32]* @.str.7 to i8*), i8* bitcast ([4 x i32]* @.str.5 to i8*))
%61 = icmp sgt i64 %60, 0
%62 = zext i1 %61 to i32
%63 = tail call i32 @assert(i32 %62)
%64 = tail call i64 @wcscasecmp(i8* bitcast ([4 x i32]* @.str.8 to i8*), i8* bitcast ([4 x i32]* @.str.5 to i8*))
%65 = icmp sgt i64 %64, 0
%66 = zext i1 %65 to i32
%67 = tail call i32 @assert(i32 %66)
%68 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.21, i64 0, i64 0))
%69 = tail call i64 @wcscasecmp(i8* bitcast ([4 x i32]* @.str.4 to i8*), i8* bitcast ([5 x i32]* @.str.10 to i8*))
%70 = lshr i64 %69, 63
%71 = trunc i64 %70 to i32
%72 = tail call i32 @assert(i32 %71)
%73 = tail call i64 @wcscasecmp(i8* bitcast ([4 x i32]* @.str.5 to i8*), i8* bitcast ([5 x i32]* @.str.11 to i8*))
%74 = lshr i64 %73, 63
%75 = trunc i64 %74 to i32
%76 = tail call i32 @assert(i32 %75)
%77 = tail call i64 @wcscasecmp(i8* bitcast ([5 x i32]* @.str.11 to i8*), i8* bitcast ([4 x i32]* @.str.5 to i8*))
%78 = icmp sgt i64 %77, 0
%79 = zext i1 %78 to i32
%80 = tail call i32 @assert(i32 %79)
%81 = tail call i64 @wcscasecmp(i8* bitcast ([5 x i32]* @.str.10 to i8*), i8* bitcast ([4 x i32]* @.str.4 to i8*))
%82 = icmp sgt i64 %81, 0
%83 = zext i1 %82 to i32
%84 = tail call i32 @assert(i32 %83)
%85 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.22, i64 0, i64 0))
%86 = tail call i64 @wcsncasecmp(i8* bitcast ([4 x i32]* @.str.4 to i8*), i8* bitcast ([5 x i32]* @.str.10 to i8*), i32 4)
%87 = lshr i64 %86, 63
%88 = trunc i64 %87 to i32
%89 = tail call i32 @assert(i32 %88)
%90 = tail call i64 @wcsncasecmp(i8* bitcast ([4 x i32]* @.str.5 to i8*), i8* bitcast ([5 x i32]* @.str.11 to i8*), i32 4)
%91 = lshr i64 %90, 63
%92 = trunc i64 %91 to i32
%93 = tail call i32 @assert(i32 %92)
%94 = tail call i64 @wcsncasecmp(i8* bitcast ([5 x i32]* @.str.11 to i8*), i8* bitcast ([4 x i32]* @.str.5 to i8*), i32 4)
%95 = icmp sgt i64 %94, 0
%96 = zext i1 %95 to i32
%97 = tail call i32 @assert(i32 %96)
%98 = tail call i64 @wcsncasecmp(i8* bitcast ([5 x i32]* @.str.10 to i8*), i8* bitcast ([4 x i32]* @.str.4 to i8*), i32 4)
%99 = icmp sgt i64 %98, 0
%100 = zext i1 %99 to i32
%101 = tail call i32 @assert(i32 %100)
%102 = tail call i64 @wcsncasecmp(i8* bitcast ([4 x i32]* @.str.4 to i8*), i8* bitcast ([5 x i32]* @.str.10 to i8*), i32 3)
%103 = icmp eq i64 %102, 0
%104 = zext i1 %103 to i32
%105 = tail call i32 @assert(i32 %104)
%106 = tail call i64 @wcsncasecmp(i8* bitcast ([4 x i32]* @.str.5 to i8*), i8* bitcast ([5 x i32]* @.str.11 to i8*), i32 3)
%107 = icmp eq i64 %106, 0
%108 = zext i1 %107 to i32
%109 = tail call i32 @assert(i32 %108)
%110 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.23, i64 0, i64 0))
%111 = tail call i64 @wcscasecmp(i8* bitcast ([2 x i32]* @.str.14 to i8*), i8* bitcast ([2 x i32]* @.str.15 to i8*))
%112 = icmp ne i64 %111, 0
%113 = zext i1 %112 to i32
%114 = tail call i32 @assert(i32 %113)
%115 = load i32, i32* @LC_CTYPE
%116 = tail call i32 @setlocale(i32 %115, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.16, i64 0, i64 0))
%117 = tail call i64 @wcscasecmp(i8* bitcast ([2 x i32]* @.str.14 to i8*), i8* bitcast ([2 x i32]* @.str.15 to i8*))
%118 = icmp eq i64 %117, 0
%119 = zext i1 %118 to i32
%120 = tail call i32 @assert(i32 %119)
%121 = tail call i64 @wcscasecmp(i8* bitcast ([2 x i32]* @.str.14 to i8*), i8* bitcast ([2 x i32]* @.str.17 to i8*))
%122 = lshr i64 %121, 63
%123 = trunc i64 %122 to i32
%124 = tail call i32 @assert(i32 %123)
%125 = tail call i64 @wcscasecmp(i8* bitcast ([2 x i32]* @.str.17 to i8*), i8* bitcast ([2 x i32]* @.str.14 to i8*))
%126 = icmp sgt i64 %125, 0
%127 = zext i1 %126 to i32
%128 = tail call i32 @assert(i32 %127)
%129 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.24, i64 0, i64 0))
%130 = tail call i32 @exit(i32 0)
unreachable
}