#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 main(void) {
  int i = 1, j = i;
  int w1, w2;
  w1 = (i > 0) && (j < 0) || (i < 0) && (j > 0);
  w2 = (i <= 0) || (j >= 0) && (i >= 0) || (j <= 0);
  printf("%d", w1 == w2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1145 <main+0x35>
mov    $0x1,%al
cmpl   $0x0,-0xc(%rbp)
mov    %al,-0x15(%rbp)
jl     1164 <main+0x54>
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x16(%rbp)
jge    115e <main+0x4e>
cmpl   $0x0,-0xc(%rbp)
setg   %al
mov    %al,-0x16(%rbp)
mov    -0x16(%rbp),%al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x10(%rbp)
mov    $0x1,%al
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x17(%rbp)
jle    11a1 <main+0x91>
cmpl   $0x0,-0xc(%rbp)
jl     1197 <main+0x87>
mov    $0x1,%al
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x17(%rbp)
jge    11a1 <main+0x91>
cmpl   $0x0,-0xc(%rbp)
setle  %al
mov    %al,-0x17(%rbp)
mov    -0x17(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x14(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe3f(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 0
}