#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 main(void) {
  int a = 1, b = 2, c = 3;
  double x = 1.0;
  int res1, res2, res3, res4;
  res1 = (a > b) && (c < x);
  res2 = (a < (!b)) || (!(!a));
  res3 = (a + b) < ((!c) + c);
  res4 = (a - x) || ((b * c) && (b / a));
  printf("res1 = %d, res2 = %d, res3 = %d,  res4 = %d \n", res1, res2, res3,
         res4);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
movl   $0x3,-0x10(%rbp)
movsd  0xec4(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%ecx
xor    %eax,%eax
cmp    -0xc(%rbp),%ecx
mov    %al,-0x29(%rbp)
jle    1166 <main+0x56>
cvtsi2sdl -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
seta   %al
mov    %al,-0x29(%rbp)
mov    -0x29(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%ecx
cmpl   $0x0,-0xc(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edx
mov    $0x1,%al
cmp    %edx,%ecx
mov    %al,-0x2a(%rbp)
jl     119d <main+0x8d>
cmpl   $0x0,-0x8(%rbp)
setne  %al
xor    $0xff,%al
xor    $0xff,%al
mov    %al,-0x2a(%rbp)
mov    -0x2a(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
cmpl   $0x0,-0x10(%rbp)
setne  %cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
add    -0x10(%rbp),%ecx
cmp    %ecx,%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x24(%rbp)
cvtsi2sdl -0x8(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
mov    $0x1,%al
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x2b(%rbp)
jne    121b <main+0x10b>
jp     121b <main+0x10b>
mov    -0xc(%rbp),%ecx
imul   -0x10(%rbp),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x2c(%rbp)
je     1215 <main+0x105>
mov    -0xc(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cmp    $0x0,%eax
setne  %al
mov    %al,-0x2c(%rbp)
mov    -0x2c(%rbp),%al
mov    %al,-0x2b(%rbp)
mov    -0x2b(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x28(%rbp)
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
mov    -0x24(%rbp),%ecx
mov    -0x28(%rbp),%r8d
lea    0xdce(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [46 x i8] c"res1 = %d, res2 = %d, res3 = %d, res4 = %d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca double
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
store i32 2, i32* %3
store i32 3, i32* %4
store double 1.000000e+00, double* %5
%10 = load i32, i32* %2
%11 = load i32, i32* %3
%12 = icmp sgt i32 %10, %11
br i1 %12, label %13, label %18
13: ; preds = %0
%14 = load i32, i32* %4
%15 = sitofp i32 %14 to double
%16 = load double, double* %5
%17 = fcmp olt double %15, %16
br label %18
18: ; preds = %13, %0
%19 = phi i1 [ false, %0 ], [ %17, %13 ]
%20 = zext i1 %19 to i32
store i32 %20, i32* %6
%21 = load i32, i32* %2
%22 = load i32, i32* %3
%23 = icmp ne i32 %22, 0
%24 = xor i1 %23, true
%25 = zext i1 %24 to i32
%26 = icmp slt i32 %21, %25
br i1 %26, label %32, label %27
27: ; preds = %18
%28 = load i32, i32* %2
%29 = icmp ne i32 %28, 0
%30 = xor i1 %29, true
%31 = xor i1 %30, true
br label %32
32: ; preds = %27, %18
%33 = phi i1 [ true, %18 ], [ %31, %27 ]
%34 = zext i1 %33 to i32
store i32 %34, i32* %7
%35 = load i32, i32* %2
%36 = load i32, i32* %3
%37 = add nsw i32 %35, %36
%38 = load i32, i32* %4
%39 = icmp ne i32 %38, 0
%40 = xor i1 %39, true
%41 = zext i1 %40 to i32
%42 = load i32, i32* %4
%43 = add nsw i32 %41, %42
%44 = icmp slt i32 %37, %43
%45 = zext i1 %44 to i32
store i32 %45, i32* %8
%46 = load i32, i32* %2
%47 = sitofp i32 %46 to double
%48 = load double, double* %5
%49 = fsub double %47, %48
%50 = fcmp une double %49, 0.000000e+00
br i1 %50, label %63, label %51
51: ; preds = %32
%52 = load i32, i32* %3
%53 = load i32, i32* %4
%54 = mul nsw i32 %52, %53
%55 = icmp ne i32 %54, 0
br i1 %55, label %56, label %61
56: ; preds = %51
%57 = load i32, i32* %3
%58 = load i32, i32* %2
%59 = sdiv i32 %57, %58
%60 = icmp ne i32 %59, 0
br label %61
61: ; preds = %56, %51
%62 = phi i1 [ false, %51 ], [ %60, %56 ]
br label %63
63: ; preds = %61, %32
%64 = phi i1 [ true, %32 ], [ %62, %61 ]
%65 = zext i1 %64 to i32
store i32 %65, i32* %9
%66 = load i32, i32* %6
%67 = load i32, i32* %7
%68 = load i32, i32* %8
%69 = load i32, i32* %9
%70 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i32 %66, i32 %67, i32 %68, i32 %69)
%71 = load i32, i32* %1
ret i32 %71
}

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