#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 *, char *, ...);
void isLesserThan(int num, int value) {
  if (num < value) {
    printf("%s        PASSED!\n%s", "\x1B[32m", "\x1B[0m");
  } else {
    printf("%s        NOT PASSED!\n        got: %d < %d %s\n", "\x1B[31m", num,
           value, "\x1B[0m");
  }
}


x86 assembly (clang, -O0):
<isLesserThan>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    114b <isLesserThan+0x3b>
lea    0xecf(%rip),%rdi
lea    0xedd(%rip),%rsi
lea    0xedc(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
jmp    116d <isLesserThan+0x5d>
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xec8(%rip),%rdi
lea    0xef0(%rip),%rsi
lea    0xeb5(%rip),%r8
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isLesserThan>:
cmp    %esi,%edi
jge    1130 <isLesserThan+0x20>
lea    0xee5(%rip),%rdi
lea    0xef3(%rip),%rsi
lea    0xef2(%rip),%rdx
xor    %eax,%eax
jmp    1030 <printf@plt>
mov    %esi,%ecx
mov    %edi,%edx
lea    0xee5(%rip),%rdi
lea    0xf0d(%rip),%rsi
lea    0xed2(%rip),%r8
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"%s PASSED!\0A%s\00"
@.str.1 = [6 x i8] c"\1B[32m\00"
@.str.2 = [5 x i8] c"\1B[0m\00"
@.str.3 = [47 x i8] c"%s NOT PASSED!\0A got: %d < %d %s\0A\00"
@.str.4 = [6 x i8] c"\1B[31m\00"
define void @isLesserThan(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp slt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %14
10: ; preds = %2
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 %11, i32 %12, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %14
14: ; preds = %10, %8
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"%s PASSED!\0A%s\00"
@.str.1 = [6 x i8] c"\1B[32m\00"
@.str.2 = [5 x i8] c"\1B[0m\00"
@.str.3 = [47 x i8] c"%s NOT PASSED!\0A got: %d < %d %s\0A\00"
@.str.4 = [6 x i8] c"\1B[31m\00"
define void @isLesserThan(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %8
6: ; preds = %2
%7 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i32 %0, i32 %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
br label %8
8: ; preds = %6, %4
ret void
}