#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 check(char *);
int /*<<< orphan*/ printf(char *);
int main(int ac, char **av) {
  int ret;
  if (ac != 2)
    return -1;
  ret = check(av[1]);
  if (ret == 0xad6d)
    printf("Win\n");
  else
    printf("loose\n");
  return ret;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     114c <main+0x2c>
movl   $0xffffffff,-0x4(%rbp)
jmp    118c <main+0x6c>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <check@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xad6d,-0x14(%rbp)
jne    117a <main+0x5a>
lea    0xe90(%rip),%rdi
call   1030 <printf@plt>
jmp    1186 <main+0x66>
lea    0xe84(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xffffffff,%ebx
cmp    $0x2,%edi
jne    1152 <main+0x32>
mov    0x8(%rsi),%rdi
call   1040 <check@plt>
mov    %eax,%ebx
cmp    $0xad6d,%eax
lea    0xec4(%rip),%rax
lea    0xeb7(%rip),%rdi
cmove  %rax,%rdi
call   1030 <puts@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"Win\0A\00"
@.str.1 = [7 x i8] c"loose\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 2
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 -1, i32* %3
br label %23
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i32 @check(i8* %13)
store i32 %14, i32* %6
%15 = load i32, i32* %6
%16 = icmp eq i32 %15, 44397
br i1 %16, label %17, label %19
17: ; preds = %10
%18 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %21
19: ; preds = %10
%20 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
br label %21
21: ; preds = %19, %17
%22 = load i32, i32* %6
store i32 %22, i32* %3
br label %23
23: ; preds = %21, %9
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
@str = [6 x i8] c"loose\00"
@str.2 = [4 x i8] c"Win\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %11
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @check(i8* %6)
%8 = icmp eq i32 %7, 44397
%9 = select i1 %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0)
%10 = tail call i32 @puts(i8* dereferenceable(1) %9)
br label %11
11: ; preds = %4, %2
%12 = phi i32 [ -1, %2 ], [ %7, %4 ]
ret i32 %12
}