#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*/ printf(char *, int, int, int, int, int, int);
void check(int x, int y) {
  printf("%d%d%d%d%d%d", (x << y) < 0, (x << y) == 0, (x << y) > 0,
         (x << y) < x, (x << y) == x, (x << y) > x);
}


x86 assembly (clang, -O0):
<check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
cmp    $0x0,%eax
setl   %al
and    $0x1,%al
movzbl %al,%esi
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edx
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
cmp    $0x0,%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
cmp    -0x4(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%r8d
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
cmp    -0x4(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%r9d
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
mov    -0xc(%rbp),%ecx
cmp    -0x4(%rbp),%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
lea    0xe61(%rip),%rdi
mov    %eax,(%rsp)
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check>:
push   %rax
mov    %esi,%ecx
mov    %edi,%eax
shl    %cl,%eax
mov    %eax,%esi
shr    $0x1f,%esi
xor    %edx,%edx
xor    %ecx,%ecx
test   %eax,%eax
sete   %dl
setg   %cl
xor    %r8d,%r8d
xor    %r9d,%r9d
xor    %r10d,%r10d
cmp    %edi,%eax
setl   %r8b
sete   %r9b
setg   %r10b
mov    %r10d,(%rsp)
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [13 x i8] c"%d%d%d%d%d%d\00"
define void @check(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = shl i32 %5, %6
%8 = icmp slt i32 %7, 0
%9 = zext i1 %8 to i32
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = shl i32 %10, %11
%13 = icmp eq i32 %12, 0
%14 = zext i1 %13 to i32
%15 = load i32, i32* %3
%16 = load i32, i32* %4
%17 = shl i32 %15, %16
%18 = icmp sgt i32 %17, 0
%19 = zext i1 %18 to i32
%20 = load i32, i32* %3
%21 = load i32, i32* %4
%22 = shl i32 %20, %21
%23 = load i32, i32* %3
%24 = icmp slt i32 %22, %23
%25 = zext i1 %24 to i32
%26 = load i32, i32* %3
%27 = load i32, i32* %4
%28 = shl i32 %26, %27
%29 = load i32, i32* %3
%30 = icmp eq i32 %28, %29
%31 = zext i1 %30 to i32
%32 = load i32, i32* %3
%33 = load i32, i32* %4
%34 = shl i32 %32, %33
%35 = load i32, i32* %3
%36 = icmp sgt i32 %34, %35
%37 = zext i1 %36 to i32
%38 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %14, i32 %19, i32 %25, i32 %31, i32 %37)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"%d%d%d%d%d%d\00"
define void @check(i32 %0, i32 %1) {
%3 = shl i32 %0, %1
%4 = lshr i32 %3, 31
%5 = icmp eq i32 %3, 0
%6 = zext i1 %5 to i32
%7 = icmp sgt i32 %3, 0
%8 = zext i1 %7 to i32
%9 = icmp slt i32 %3, %0
%10 = zext i1 %9 to i32
%11 = icmp eq i32 %3, %0
%12 = zext i1 %11 to i32
%13 = icmp sgt i32 %3, %0
%14 = zext i1 %13 to i32
%15 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %6, i32 %8, i32 %10, i32 %12, i32 %14)
ret void
}