#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 = 2, j = 3, k;
  printf("%d\n", k = i * j == 6);
  i = 5, j = 10, k = 1;
  printf("%d\n", k > i < j);
  i = 3, j = 2, k = 1;
  printf("%d\n", i < j == j < k);
  i = 3, j = 4, k = 5;
  printf("%d\n", i % j + i < k);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
movl   $0x3,-0xc(%rbp)
mov    -0x8(%rbp),%eax
imul   -0xc(%rbp),%eax
cmp    $0x6,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
mov    %esi,-0x10(%rbp)
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
movl   $0x5,-0x8(%rbp)
movl   $0xa,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x8(%rbp),%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
cmp    -0xc(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe7d(%rip),%rdi
call   1030 <printf@plt>
movl   $0x3,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
mov    -0xc(%rbp),%ecx
cmp    -0x10(%rbp),%ecx
setl   %cl
and    $0x1,%cl
movzbl %cl,%ecx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xe35(%rip),%rdi
call   1030 <printf@plt>
movl   $0x3,-0x8(%rbp)
movl   $0x4,-0xc(%rbp)
movl   $0x5,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
add    -0x8(%rbp),%edx
cmp    -0x10(%rbp),%edx
setl   %al
and    $0x1,%al
movzbl %al,%esi
lea    0xdff(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

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