#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() {
  int a = 3, b = 4, c = 5, x, y;
  printf("%d\n", a + b > c && b == c);
  printf("a=%d,b=%d,c=%d\n", a, b, c);
  printf("%d\n", a || b + c && b - c);
  printf("a=%d,b=%d,c=%d\n", a, b, c);
  a = 3, b = 4, c = 5;
  printf("%d\n", !(x = a) && (y = b) && 0);
  printf("x=%d,y=%d\n", x, y);
  printf("%d\n", !(a + b) + c - 1 && b + c / 2);
  printf("a=%d,b=%d,c=%d\n", a, b, c);
  printf("%d\n", (c >= 2 && c <= 6) || (c != 3) || (c != 5));
  printf("c=%d\n", c);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
movl   $0x4,-0xc(%rbp)
movl   $0x5,-0x10(%rbp)
mov    -0x8(%rbp),%ecx
add    -0xc(%rbp),%ecx
xor    %eax,%eax
cmp    -0x10(%rbp),%ecx
mov    %al,-0x19(%rbp)
jle    1154 <main+0x44>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
sete   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%esi
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xe86(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%al
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x1a(%rbp)
jne    11b9 <main+0xa9>
mov    -0xc(%rbp),%ecx
add    -0x10(%rbp),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x1b(%rbp)
je     11b3 <main+0xa3>
mov    -0xc(%rbp),%eax
sub    -0x10(%rbp),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x1b(%rbp)
mov    -0x1b(%rbp),%al
mov    %al,-0x1a(%rbp)
mov    -0x1a(%rbp),%al
and    $0x1,%al
movzbl %al,%esi
lea    0xe44(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xe21(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x3,-0x8(%rbp)
movl   $0x4,-0xc(%rbp)
movl   $0x5,-0x10(%rbp)
mov    -0x8(%rbp),%ecx
mov    %ecx,-0x14(%rbp)
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x1c(%rbp)
jne    122d <main+0x11d>
mov    -0xc(%rbp),%ecx
mov    %ecx,-0x18(%rbp)
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x1c(%rbp)
je     122d <main+0x11d>
xor    %eax,%eax
mov    %al,-0x1c(%rbp)
jmp    122d <main+0x11d>
mov    -0x1c(%rbp),%al
and    $0x1,%al
movzbl %al,%esi
lea    0xdd0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    0xdc0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%ecx
add    -0x10(%rbp),%ecx
sub    $0x1,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x1d(%rbp)
je     129f <main+0x18f>
mov    -0xc(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x24(%rbp),%eax
add    %ecx,%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x1d(%rbp)
mov    -0x1d(%rbp),%al
and    $0x1,%al
movzbl %al,%esi
lea    0xd5e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
lea    0xd3b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x2,-0x10(%rbp)
jl     12e5 <main+0x1d5>
mov    $0x1,%al
cmpl   $0x6,-0x10(%rbp)
mov    %al,-0x25(%rbp)
jle    12fe <main+0x1ee>
mov    $0x1,%al
cmpl   $0x3,-0x10(%rbp)
mov    %al,-0x25(%rbp)
jne    12fe <main+0x1ee>
cmpl   $0x5,-0x10(%rbp)
setne  %al
mov    %al,-0x25(%rbp)
mov    -0x25(%rbp),%al
and    $0x1,%al
movzbl %al,%esi
lea    0xcff(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
lea    0xcec(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xef1(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xed2(%rip),%r14
mov    %r14,%rdi
mov    $0x3,%esi
mov    $0x4,%edx
mov    $0x5,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0x3,%esi
mov    $0x4,%edx
mov    $0x5,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe8e(%rip),%rdi
mov    $0x3,%esi
mov    $0x4,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r14,%rdi
mov    $0x3,%esi
mov    $0x4,%edx
mov    $0x5,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe39(%rip),%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [16 x i8] c"a=%d,b=%d,c=%d\0A\00"
@.str.2 = [11 x i8] c"x=%d,y=%d\0A\00"
@.str.3 = [6 x i8] c"c=%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
store i32 3, i32* %2
store i32 4, i32* %3
store i32 5, i32* %4
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = add nsw i32 %7, %8
%10 = load i32, i32* %4
%11 = icmp sgt i32 %9, %10
br i1 %11, label %12, label %16
12: ; preds = %0
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = icmp eq i32 %13, %14
br label %16
16: ; preds = %12, %0
%17 = phi i1 [ false, %0 ], [ %15, %12 ]
%18 = zext i1 %17 to i32
%19 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %18)
%20 = load i32, i32* %2
%21 = load i32, i32* %3
%22 = load i32, i32* %4
%23 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %20, i32 %21, i32 %22)
%24 = load i32, i32* %2
%25 = icmp ne i32 %24, 0
br i1 %25, label %38, label %26
26: ; preds = %16
%27 = load i32, i32* %3
%28 = load i32, i32* %4
%29 = add nsw i32 %27, %28
%30 = icmp ne i32 %29, 0
br i1 %30, label %31, label %36
31: ; preds = %26
%32 = load i32, i32* %3
%33 = load i32, i32* %4
%34 = sub nsw i32 %32, %33
%35 = icmp ne i32 %34, 0
br label %36
36: ; preds = %31, %26
%37 = phi i1 [ false, %26 ], [ %35, %31 ]
br label %38
38: ; preds = %36, %16
%39 = phi i1 [ true, %16 ], [ %37, %36 ]
%40 = zext i1 %39 to i32
%41 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %40)
%42 = load i32, i32* %2
%43 = load i32, i32* %3
%44 = load i32, i32* %4
%45 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %42, i32 %43, i32 %44)
store i32 3, i32* %2
store i32 4, i32* %3
store i32 5, i32* %4
%46 = load i32, i32* %2
store i32 %46, i32* %5
%47 = icmp ne i32 %46, 0
br i1 %47, label %52, label %48
48: ; preds = %38
%49 = load i32, i32* %3
store i32 %49, i32* %6
%50 = icmp ne i32 %49, 0
br i1 %50, label %51, label %52
51: ; preds = %48
br label %52
52: ; preds = %51, %48, %38
%53 = phi i1 [ false, %48 ], [ false, %38 ], [ false, %51 ]
%54 = zext i1 %53 to i32
%55 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %54)
%56 = load i32, i32* %5
%57 = load i32, i32* %6
%58 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 %56, i32 %57)
%59 = load i32, i32* %2
%60 = load i32, i32* %3
%61 = add nsw i32 %59, %60
%62 = icmp ne i32 %61, 0
%63 = xor i1 %62, true
%64 = zext i1 %63 to i32
%65 = load i32, i32* %4
%66 = add nsw i32 %64, %65
%67 = sub nsw i32 %66, 1
%68 = icmp ne i32 %67, 0
br i1 %68, label %69, label %75
69: ; preds = %52
%70 = load i32, i32* %3
%71 = load i32, i32* %4
%72 = sdiv i32 %71, 2
%73 = add nsw i32 %70, %72
%74 = icmp ne i32 %73, 0
br label %75
75: ; preds = %69, %52
%76 = phi i1 [ false, %52 ], [ %74, %69 ]
%77 = zext i1 %76 to i32
%78 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %77)
%79 = load i32, i32* %2
%80 = load i32, i32* %3
%81 = load i32, i32* %4
%82 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 %79, i32 %80, i32 %81)
%83 = load i32, i32* %4
%84 = icmp sge i32 %83, 2
br i1 %84, label %85, label %88
85: ; preds = %75
%86 = load i32, i32* %4
%87 = icmp sle i32 %86, 6
br i1 %87, label %94, label %88
88: ; preds = %85, %75
%89 = load i32, i32* %4
%90 = icmp ne i32 %89, 3
br i1 %90, label %94, label %91
91: ; preds = %88
%92 = load i32, i32* %4
%93 = icmp ne i32 %92, 5
br label %94
94: ; preds = %91, %88, %85
%95 = phi i1 [ true, %88 ], [ true, %85 ], [ %93, %91 ]
%96 = zext i1 %95 to i32
%97 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %96)
%98 = load i32, i32* %4
%99 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32 %98)
%100 = load i32, i32* %1
ret i32 %100
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [16 x i8] c"a=%d,b=%d,c=%d\0A\00"
@.str.2 = [11 x i8] c"x=%d,y=%d\0A\00"
@.str.3 = [6 x i8] c"c=%d\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 3, i32 4, i32 5)
%3 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 3, i32 4, i32 5)
%5 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 0)
%6 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i32 3, i32 4)
%7 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1)
%8 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 3, i32 4, i32 5)
%9 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 1)
%10 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32 5)
ret i32 0
}