#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 main(int argc, const char *argv[]) {
  int i = 20;
  int j = 25;
  int k = (i > j) ? 10 : 5;
  printf("Value of K is %i\n\n", k);
  if (5 < j - k) {
    printf("The first expression is true.");
  } else if (j < i) {
    printf("The second expression is true.");
  } else {
    printf("Neither expression is true.");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x14,-0x14(%rbp)
movl   $0x19,-0x18(%rbp)
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%esi
mov    $0x5,%eax
mov    $0xa,%ecx
cmp    %esi,%edx
cmovg  %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%ecx
sub    -0x1c(%rbp),%ecx
mov    $0x5,%eax
cmp    %ecx,%eax
jge    1183 <main+0x73>
lea    0xe9c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11b5 <main+0xa5>
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    11a2 <main+0x92>
lea    0xe9b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11b0 <main+0xa0>
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11b5 <main+0xa5>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [19 x i8] c"Value of K is %i\0A\0A\00"
@.str.1 = [30 x i8] c"The first expression is true.\00"
@.str.2 = [31 x i8] c"The second expression is true.\00"
@.str.3 = [28 x i8] c"Neither expression is true.\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 20, i32* %6
store i32 25, i32* %7
%9 = load i32, i32* %6
%10 = load i32, i32* %7
%11 = icmp sgt i32 %9, %10
%12 = zext i1 %11 to i64
%13 = select i1 %11, i32 10, i32 5
store i32 %13, i32* %8
%14 = load i32, i32* %8
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %14)
%16 = load i32, i32* %7
%17 = load i32, i32* %8
%18 = sub nsw i32 %16, %17
%19 = icmp slt i32 5, %18
br i1 %19, label %20, label %22
20: ; preds = %2
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
br label %31
22: ; preds = %2
%23 = load i32, i32* %7
%24 = load i32, i32* %6
%25 = icmp slt i32 %23, %24
br i1 %25, label %26, label %28
26: ; preds = %22
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0))
br label %30
28: ; preds = %22
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0))
br label %30
30: ; preds = %28, %26
br label %31
31: ; preds = %30, %20
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"Value of K is %i\0A\0A\00"
@.str.1 = [30 x i8] c"The first expression is true.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 5)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}